summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2015-10-26 16:08:07 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2015-10-26 16:14:49 +0900
commit51278333cbd2fa4a742fece36f8c19526b61210a (patch)
treecbd3b46c9ce23245348fb1db7a8a5228288b48f5
parentc26bc70414a5fffa66ef87add244b4e15585e20a (diff)
downloadfreetype2-51278333cbd2fa4a742fece36f8c19526b61210a.tar.gz
freetype2-51278333cbd2fa4a742fece36f8c19526b61210a.tar.bz2
freetype2-51278333cbd2fa4a742fece36f8c19526b61210a.zip
Imported Upstream version 2.5.5upstream/2.5.5
Change-Id: Icdd1e0321d1a4468cc8810fef353c553436590b6
-rw-r--r--CMakeLists.txt253
-rw-r--r--ChangeLog6599
-rw-r--r--ChangeLog.212
-rw-r--r--ChangeLog.232
-rw-r--r--ChangeLog.246360
-rw-r--r--Jamfile12
-rw-r--r--README60
-rw-r--r--README.git6
-rwxr-xr-xautogen.sh8
-rw-r--r--builds/amiga/README13
-rw-r--r--builds/amiga/include/config/ftconfig.h (renamed from builds/amiga/include/freetype/config/ftconfig.h)8
-rw-r--r--builds/amiga/include/config/ftmodule.h (renamed from builds/amiga/include/freetype/config/ftmodule.h)0
-rw-r--r--builds/amiga/makefile4
-rw-r--r--builds/amiga/makefile.os44
-rw-r--r--builds/amiga/smakefile4
-rw-r--r--builds/amiga/src/base/ftdebug.c50
-rw-r--r--builds/amiga/src/base/ftsystem.c14
-rw-r--r--builds/atari/deflinejoiner.awk6
-rw-r--r--builds/cmake/iOS.cmake275
-rw-r--r--builds/compiler/bcc-dev.mk2
-rw-r--r--builds/detect.mk10
-rw-r--r--builds/dos/detect.mk8
-rw-r--r--builds/exports.mk2
-rw-r--r--builds/freetype.mk42
-rw-r--r--builds/mac/README20
-rw-r--r--builds/mac/freetype-Info.plist36
-rw-r--r--builds/mac/ftmac.c92
-rw-r--r--builds/modules.mk4
-rw-r--r--builds/symbian/bld.inf92
-rw-r--r--builds/toplevel.mk15
-rw-r--r--builds/unix/aclocal.m42114
-rwxr-xr-xbuilds/unix/config.guess351
-rwxr-xr-xbuilds/unix/config.sub130
-rwxr-xr-xbuilds/unix/configure6681
-rw-r--r--builds/unix/configure.ac450
-rw-r--r--builds/unix/configure.raw448
-rw-r--r--builds/unix/detect.mk7
-rw-r--r--builds/unix/freetype-config.in49
-rw-r--r--builds/unix/freetype2.in16
-rw-r--r--builds/unix/freetype2.m46
-rw-r--r--builds/unix/ft2unix.h61
-rw-r--r--builds/unix/ftconfig.in292
-rw-r--r--builds/unix/ftsystem.c17
-rwxr-xr-xbuilds/unix/install-sh345
-rw-r--r--builds/unix/install.mk60
-rw-r--r--builds/unix/ltmain.sh5283
-rw-r--r--builds/unix/pkg.m4199
-rw-r--r--builds/unix/unix-def.in91
-rw-r--r--builds/vms/ftconfig.h169
-rw-r--r--builds/vms/ftsystem.c8
-rw-r--r--builds/win32/vc2010/freetype.vcxproj832
-rw-r--r--builds/win32/vc2010/index.html37
-rw-r--r--builds/wince/ftdebug.c33
-rw-r--r--builds/wince/vc2005-ce/freetype.vcproj86
-rw-r--r--builds/wince/vc2005-ce/index.html10
-rw-r--r--builds/wince/vc2008-ce/freetype.vcproj86
-rw-r--r--builds/wince/vc2008-ce/index.html10
-rw-r--r--builds/windows/detect.mk (renamed from builds/win32/detect.mk)13
-rw-r--r--builds/windows/ftdebug.c (renamed from builds/win32/ftdebug.c)39
-rw-r--r--builds/windows/vc2005/freetype.sln (renamed from builds/win32/vc2005/freetype.sln)0
-rw-r--r--builds/windows/vc2005/freetype.vcproj (renamed from builds/win32/vc2005/freetype.vcproj)22
-rw-r--r--builds/windows/vc2005/index.html (renamed from builds/win32/vc2005/index.html)10
-rw-r--r--builds/windows/vc2008/freetype.sln (renamed from builds/win32/vc2008/freetype.sln)0
-rw-r--r--builds/windows/vc2008/freetype.vcproj (renamed from builds/win32/vc2008/freetype.vcproj)22
-rw-r--r--builds/windows/vc2008/index.html (renamed from builds/win32/vc2008/index.html)10
-rw-r--r--builds/windows/vc2010/freetype.sln (renamed from builds/win32/vc2010/freetype.sln)32
-rw-r--r--builds/windows/vc2010/freetype.user.props68
-rw-r--r--builds/windows/vc2010/freetype.vcxproj1718
-rw-r--r--builds/windows/vc2010/freetype.vcxproj.filters (renamed from builds/win32/vc2010/freetype.vcxproj.filters)10
-rw-r--r--builds/windows/vc2010/index.html52
-rw-r--r--builds/windows/visualc/freetype.dsp (renamed from builds/win32/visualc/freetype.dsp)48
-rw-r--r--builds/windows/visualc/freetype.dsw (renamed from builds/win32/visualc/freetype.dsw)0
-rw-r--r--builds/windows/visualc/freetype.sln (renamed from builds/win32/visualc/freetype.sln)0
-rw-r--r--builds/windows/visualc/freetype.vcproj (renamed from builds/win32/visualc/freetype.vcproj)22
-rw-r--r--builds/windows/visualc/index.html (renamed from builds/win32/visualc/index.html)10
-rw-r--r--builds/windows/visualce/freetype.dsp (renamed from builds/win32/visualce/freetype.dsp)48
-rw-r--r--builds/windows/visualce/freetype.dsw (renamed from builds/win32/visualce/freetype.dsw)0
-rw-r--r--builds/windows/visualce/freetype.vcproj (renamed from builds/win32/visualce/freetype.vcproj)94
-rw-r--r--builds/windows/visualce/index.html (renamed from builds/win32/visualce/index.html)10
-rw-r--r--builds/windows/w32-bcc.mk (renamed from builds/win32/w32-bcc.mk)4
-rw-r--r--builds/windows/w32-bccd.mk (renamed from builds/win32/w32-bccd.mk)4
-rw-r--r--builds/windows/w32-dev.mk (renamed from builds/win32/w32-dev.mk)4
-rw-r--r--builds/windows/w32-gcc.mk (renamed from builds/win32/w32-gcc.mk)4
-rw-r--r--builds/windows/w32-icc.mk (renamed from builds/win32/w32-icc.mk)4
-rw-r--r--builds/windows/w32-intl.mk (renamed from builds/win32/w32-intl.mk)4
-rw-r--r--builds/windows/w32-lcc.mk (renamed from builds/win32/w32-lcc.mk)4
-rw-r--r--builds/windows/w32-mingw32.mk (renamed from builds/win32/w32-mingw32.mk)4
-rw-r--r--builds/windows/w32-vcc.mk (renamed from builds/win32/w32-vcc.mk)4
-rw-r--r--builds/windows/w32-wat.mk (renamed from builds/win32/w32-wat.mk)4
-rw-r--r--builds/windows/win32-def.mk (renamed from builds/win32/win32-def.mk)6
-rwxr-xr-xconfigure34
-rw-r--r--devel/ft2build.h29
-rw-r--r--devel/ftoption.h172
-rw-r--r--docs/CHANGES538
-rw-r--r--docs/CMAKE2
-rw-r--r--docs/CUSTOMIZE47
-rw-r--r--docs/DEBUG182
-rw-r--r--docs/INSTALL9
-rw-r--r--docs/INSTALL.ANY34
-rw-r--r--docs/INSTALL.CROSS96
-rw-r--r--docs/INSTALL.GNU26
-rw-r--r--docs/INSTALL.UNIX27
-rw-r--r--docs/LICENSE.TXT3
-rw-r--r--docs/VERSION.DLL64
-rw-r--r--docs/formats.txt2
-rw-r--r--docs/freetype-config.1108
-rw-r--r--docs/reference/ft2-auto_hinter.html370
-rw-r--r--docs/reference/ft2-base_interface.html4789
-rw-r--r--docs/reference/ft2-basic_types.html1508
-rw-r--r--docs/reference/ft2-bdf_fonts.html336
-rw-r--r--docs/reference/ft2-bitmap_handling.html385
-rw-r--r--docs/reference/ft2-bzip2.html151
-rw-r--r--docs/reference/ft2-cache_subsystem.html1504
-rw-r--r--docs/reference/ft2-cff_driver.html225
-rw-r--r--docs/reference/ft2-cid_fonts.html278
-rw-r--r--docs/reference/ft2-computations.html1016
-rw-r--r--docs/reference/ft2-font_formats.html147
-rw-r--r--docs/reference/ft2-gasp_table.html215
-rw-r--r--docs/reference/ft2-glyph_management.html697
-rw-r--r--docs/reference/ft2-glyph_stroker.html1161
-rw-r--r--docs/reference/ft2-glyph_variants.html353
-rw-r--r--docs/reference/ft2-gx_validation.html542
-rw-r--r--docs/reference/ft2-gzip.html201
-rw-r--r--docs/reference/ft2-header_file_macros.html1080
-rw-r--r--docs/reference/ft2-header_inclusion.html117
-rw-r--r--docs/reference/ft2-incremental.html450
-rw-r--r--docs/reference/ft2-index.html621
-rw-r--r--docs/reference/ft2-lcd_filtering.html271
-rw-r--r--docs/reference/ft2-list_processing.html636
-rw-r--r--docs/reference/ft2-lzw.html151
-rw-r--r--docs/reference/ft2-mac_specific.html438
-rw-r--r--docs/reference/ft2-module_management.html994
-rw-r--r--docs/reference/ft2-multiple_masters.html567
-rw-r--r--docs/reference/ft2-ot_validation.html317
-rw-r--r--docs/reference/ft2-outline_processing.html1485
-rw-r--r--docs/reference/ft2-pfr_fonts.html268
-rw-r--r--docs/reference/ft2-quick_advance.html265
-rw-r--r--docs/reference/ft2-raster.html736
-rw-r--r--docs/reference/ft2-sfnt_names.html302
-rw-r--r--docs/reference/ft2-sizes_management.html236
-rw-r--r--docs/reference/ft2-system_interface.html474
-rw-r--r--docs/reference/ft2-toc.html279
-rw-r--r--docs/reference/ft2-truetype_engine.html200
-rw-r--r--docs/reference/ft2-truetype_tables.html1508
-rw-r--r--docs/reference/ft2-tt_driver.html183
-rw-r--r--docs/reference/ft2-type1_tables.html1087
-rw-r--r--docs/reference/ft2-user_allocation.html105
-rw-r--r--docs/reference/ft2-version.html321
-rw-r--r--docs/reference/ft2-winfnt_fonts.html310
-rw-r--r--docs/release47
-rw-r--r--include/config/ftconfig.h (renamed from include/freetype/config/ftconfig.h)231
-rw-r--r--include/config/ftheader.h (renamed from include/freetype/config/ftheader.h)153
-rw-r--r--include/config/ftmodule.h (renamed from include/freetype/config/ftmodule.h)0
-rw-r--r--include/config/ftoption.h (renamed from include/freetype/config/ftoption.h)172
-rw-r--r--include/config/ftstdlib.h (renamed from include/freetype/config/ftstdlib.h)4
-rw-r--r--include/freetype.h (renamed from include/freetype/freetype.h)519
-rw-r--r--include/freetype/internal/internal.h51
-rw-r--r--include/ft2build.h23
-rw-r--r--include/ftadvanc.h (renamed from include/freetype/ftadvanc.h)32
-rw-r--r--include/ftautoh.h402
-rw-r--r--include/ftbbox.h (renamed from include/freetype/ftbbox.h)7
-rw-r--r--include/ftbdf.h (renamed from include/freetype/ftbdf.h)9
-rw-r--r--include/ftbitmap.h (renamed from include/freetype/ftbitmap.h)15
-rw-r--r--include/ftbzip2.h (renamed from include/freetype/ftbzip2.h)2
-rw-r--r--include/ftcache.h (renamed from include/freetype/ftcache.h)95
-rw-r--r--include/ftcffdrv.h262
-rw-r--r--include/ftchapters.h (renamed from include/freetype/ftchapters.h)19
-rw-r--r--include/ftcid.h (renamed from include/freetype/ftcid.h)3
-rw-r--r--include/fterrdef.h (renamed from include/freetype/fterrdef.h)184
-rw-r--r--include/fterrors.h (renamed from include/freetype/fterrors.h)23
-rw-r--r--include/ftgasp.h (renamed from include/freetype/ftgasp.h)3
-rw-r--r--include/ftglyph.h (renamed from include/freetype/ftglyph.h)31
-rw-r--r--include/ftgxval.h (renamed from include/freetype/ftgxval.h)35
-rw-r--r--include/ftgzip.h (renamed from include/freetype/ftgzip.h)50
-rw-r--r--include/ftimage.h (renamed from include/freetype/ftimage.h)235
-rw-r--r--include/ftincrem.h (renamed from include/freetype/ftincrem.h)5
-rw-r--r--include/ftlcdfil.h (renamed from include/freetype/ftlcdfil.h)44
-rw-r--r--include/ftlist.h (renamed from include/freetype/ftlist.h)15
-rw-r--r--include/ftlzw.h (renamed from include/freetype/ftlzw.h)2
-rw-r--r--include/ftmac.h (renamed from include/freetype/ftmac.h)6
-rw-r--r--include/ftmm.h (renamed from include/freetype/ftmm.h)11
-rw-r--r--include/ftmodapi.h (renamed from include/freetype/ftmodapi.h)202
-rw-r--r--include/ftmoderr.h (renamed from include/freetype/ftmoderr.h)64
-rw-r--r--include/ftotval.h (renamed from include/freetype/ftotval.h)19
-rw-r--r--include/ftoutln.h (renamed from include/freetype/ftoutln.h)66
-rw-r--r--include/ftpfr.h (renamed from include/freetype/ftpfr.h)2
-rw-r--r--include/ftrender.h (renamed from include/freetype/ftrender.h)1
-rw-r--r--include/ftsizes.h (renamed from include/freetype/ftsizes.h)4
-rw-r--r--include/ftsnames.h (renamed from include/freetype/ftsnames.h)6
-rw-r--r--include/ftstroke.h (renamed from include/freetype/ftstroke.h)56
-rw-r--r--include/ftsynth.h (renamed from include/freetype/ftsynth.h)10
-rw-r--r--include/ftsystem.h (renamed from include/freetype/ftsystem.h)12
-rw-r--r--include/fttrigon.h (renamed from include/freetype/fttrigon.h)14
-rw-r--r--include/ftttdrv.h170
-rw-r--r--include/fttypes.h (renamed from include/freetype/fttypes.h)40
-rw-r--r--include/ftwinfnt.h (renamed from include/freetype/ftwinfnt.h)9
-rw-r--r--include/ftxf86.h (renamed from include/freetype/ftxf86.h)7
-rw-r--r--include/internal/autohint.h (renamed from include/freetype/internal/autohint.h)71
-rw-r--r--include/internal/ftcalc.h (renamed from include/freetype/internal/ftcalc.h)323
-rw-r--r--include/internal/ftdebug.h (renamed from include/freetype/internal/ftdebug.h)29
-rw-r--r--include/internal/ftdriver.h (renamed from include/freetype/internal/ftdriver.h)398
-rw-r--r--include/internal/ftgloadr.h (renamed from include/freetype/internal/ftgloadr.h)30
-rw-r--r--include/internal/ftmemory.h (renamed from include/freetype/internal/ftmemory.h)176
-rw-r--r--include/internal/ftobjs.h (renamed from include/freetype/internal/ftobjs.h)832
-rw-r--r--include/internal/ftpic.h (renamed from include/freetype/internal/ftpic.h)32
-rw-r--r--include/internal/ftrfork.h (renamed from include/freetype/internal/ftrfork.h)49
-rw-r--r--include/internal/ftserv.h (renamed from include/freetype/internal/ftserv.h)143
-rw-r--r--include/internal/ftstream.h (renamed from include/freetype/internal/ftstream.h)87
-rw-r--r--include/internal/fttrace.h (renamed from include/freetype/internal/fttrace.h)12
-rw-r--r--include/internal/ftvalid.h (renamed from include/freetype/internal/ftvalid.h)37
-rw-r--r--include/internal/internal.h63
-rw-r--r--include/internal/psaux.h (renamed from include/freetype/internal/psaux.h)10
-rw-r--r--include/internal/pshints.h (renamed from include/freetype/internal/pshints.h)44
-rw-r--r--include/internal/services/svbdf.h (renamed from include/freetype/internal/services/svbdf.h)0
-rw-r--r--include/internal/services/svcid.h (renamed from include/freetype/internal/services/svcid.h)0
-rw-r--r--include/internal/services/svgldict.h (renamed from include/freetype/internal/services/svgldict.h)0
-rw-r--r--include/internal/services/svgxval.h (renamed from include/freetype/internal/services/svgxval.h)0
-rw-r--r--include/internal/services/svkern.h (renamed from include/freetype/internal/services/svkern.h)0
-rw-r--r--include/internal/services/svmm.h (renamed from include/freetype/internal/services/svmm.h)0
-rw-r--r--include/internal/services/svotval.h (renamed from include/freetype/internal/services/svotval.h)0
-rw-r--r--include/internal/services/svpfr.h (renamed from include/freetype/internal/services/svpfr.h)0
-rw-r--r--include/internal/services/svpostnm.h (renamed from include/freetype/internal/services/svpostnm.h)0
-rw-r--r--include/internal/services/svprop.h81
-rw-r--r--include/internal/services/svpscmap.h (renamed from include/freetype/internal/services/svpscmap.h)0
-rw-r--r--include/internal/services/svpsinfo.h (renamed from include/freetype/internal/services/svpsinfo.h)0
-rw-r--r--include/internal/services/svsfnt.h (renamed from include/freetype/internal/services/svsfnt.h)0
-rw-r--r--include/internal/services/svttcmap.h (renamed from include/freetype/internal/services/svttcmap.h)4
-rw-r--r--include/internal/services/svtteng.h (renamed from include/freetype/internal/services/svtteng.h)0
-rw-r--r--include/internal/services/svttglyf.h (renamed from include/freetype/internal/services/svttglyf.h)0
-rw-r--r--include/internal/services/svwinfnt.h (renamed from include/freetype/internal/services/svwinfnt.h)0
-rw-r--r--include/internal/services/svxf86nm.h (renamed from include/freetype/internal/services/svxf86nm.h)0
-rw-r--r--include/internal/sfnt.h (renamed from include/freetype/internal/sfnt.h)468
-rw-r--r--include/internal/t1types.h (renamed from include/freetype/internal/t1types.h)6
-rw-r--r--include/internal/tttypes.h (renamed from include/freetype/internal/tttypes.h)229
-rw-r--r--include/t1tables.h (renamed from include/freetype/t1tables.h)120
-rw-r--r--include/ttnameid.h (renamed from include/freetype/ttnameid.h)250
-rw-r--r--include/tttables.h (renamed from include/freetype/tttables.h)114
-rw-r--r--include/tttags.h (renamed from include/freetype/tttags.h)6
-rw-r--r--include/ttunpat.h (renamed from include/freetype/ttunpat.h)3
-rw-r--r--modules.cfg50
-rw-r--r--src/Jamfile4
-rw-r--r--src/autofit/afangles.c125
-rw-r--r--src/autofit/afblue.c177
-rw-r--r--src/autofit/afblue.cin39
-rw-r--r--src/autofit/afblue.dat337
-rw-r--r--src/autofit/afblue.h203
-rw-r--r--src/autofit/afblue.hin142
-rw-r--r--src/autofit/afcjk.c752
-rw-r--r--src/autofit/afcjk.h67
-rw-r--r--src/autofit/afcover.h105
-rw-r--r--src/autofit/afdummy.c46
-rw-r--r--src/autofit/afdummy.h8
-rw-r--r--src/autofit/afglobal.c399
-rw-r--r--src/autofit/afglobal.h97
-rw-r--r--src/autofit/afhints.c561
-rw-r--r--src/autofit/afhints.h140
-rw-r--r--src/autofit/afindic.c61
-rw-r--r--src/autofit/afindic.h9
-rw-r--r--src/autofit/aflatin.c1063
-rw-r--r--src/autofit/aflatin.h77
-rw-r--r--src/autofit/aflatin2.c227
-rw-r--r--src/autofit/aflatin2.h10
-rw-r--r--src/autofit/afloader.c111
-rw-r--r--src/autofit/afloader.h34
-rw-r--r--src/autofit/afmodule.c264
-rw-r--r--src/autofit/afmodule.h24
-rw-r--r--src/autofit/afpic.c120
-rw-r--r--src/autofit/afpic.h69
-rw-r--r--src/autofit/afranges.c220
-rw-r--r--src/autofit/afranges.h41
-rw-r--r--src/autofit/afscript.h139
-rw-r--r--src/autofit/afstyles.h164
-rw-r--r--src/autofit/aftypes.h471
-rw-r--r--src/autofit/afwrtsys.h52
-rw-r--r--src/autofit/autofit.c7
-rw-r--r--src/autofit/hbshim.c545
-rw-r--r--src/autofit/hbshim.h56
-rw-r--r--src/autofit/rules.mk13
-rw-r--r--src/base/basepic.c49
-rw-r--r--src/base/basepic.h45
-rw-r--r--src/base/ftadvanc.c26
-rw-r--r--src/base/ftbbox.c512
-rw-r--r--src/base/ftbdf.c43
-rw-r--r--src/base/ftbitmap.c269
-rw-r--r--src/base/ftcalc.c537
-rw-r--r--src/base/ftcid.c8
-rw-r--r--src/base/ftdbgmem.c105
-rw-r--r--src/base/ftdebug.c30
-rw-r--r--src/base/ftfstype.c4
-rw-r--r--src/base/ftgloadr.c12
-rw-r--r--src/base/ftglyph.c100
-rw-r--r--src/base/ftgxval.c20
-rw-r--r--src/base/ftinit.c32
-rw-r--r--src/base/ftlcdfil.c56
-rw-r--r--src/base/ftmac.c98
-rw-r--r--src/base/ftmm.c50
-rw-r--r--src/base/ftobjs.c814
-rw-r--r--src/base/ftotval.c10
-rw-r--r--src/base/ftoutln.c356
-rw-r--r--src/base/ftpfr.c23
-rw-r--r--src/base/ftpic.c5
-rw-r--r--src/base/ftrfork.c76
-rw-r--r--src/base/ftsnames.c2
-rw-r--r--src/base/ftstream.c60
-rw-r--r--src/base/ftstroke.c106
-rw-r--r--src/base/ftsynth.c37
-rw-r--r--src/base/ftsystem.c8
-rw-r--r--src/base/fttrigon.c368
-rw-r--r--src/base/fttype1.c45
-rw-r--r--src/base/ftutil.c142
-rw-r--r--src/base/ftwinfnt.c22
-rw-r--r--src/base/md5.c296
-rw-r--r--src/base/md5.h45
-rw-r--r--src/base/rules.mk16
-rw-r--r--src/bdf/bdfdrivr.c67
-rw-r--r--src/bdf/bdflib.c226
-rw-r--r--src/bzip2/ftbzip2.c38
-rw-r--r--src/cache/Jamfile4
-rw-r--r--src/cache/ftcbasic.c354
-rw-r--r--src/cache/ftccache.c11
-rw-r--r--src/cache/ftccache.h13
-rw-r--r--src/cache/ftccback.h5
-rw-r--r--src/cache/ftccmap.c120
-rw-r--r--src/cache/ftcmanag.c101
-rw-r--r--src/cache/ftcmanag.h6
-rw-r--r--src/cache/ftcmru.h4
-rw-r--r--src/cache/ftcsbits.c16
-rw-r--r--src/cff/cf2arrst.c241
-rw-r--r--src/cff/cf2arrst.h100
-rw-r--r--src/cff/cf2blues.c579
-rw-r--r--src/cff/cf2blues.h185
-rw-r--r--src/cff/cf2error.c52
-rw-r--r--src/cff/cf2error.h119
-rw-r--r--src/cff/cf2fixed.h95
-rw-r--r--src/cff/cf2font.c512
-rw-r--r--src/cff/cf2font.h116
-rw-r--r--src/cff/cf2ft.c691
-rw-r--r--src/cff/cf2ft.h147
-rw-r--r--src/cff/cf2glue.h144
-rw-r--r--src/cff/cf2hints.c1847
-rw-r--r--src/cff/cf2hints.h289
-rw-r--r--src/cff/cf2intrp.c1545
-rw-r--r--src/cff/cf2intrp.h83
-rw-r--r--src/cff/cf2read.c112
-rw-r--r--src/cff/cf2read.h68
-rw-r--r--src/cff/cf2stack.c205
-rw-r--r--src/cff/cf2stack.h106
-rw-r--r--src/cff/cf2types.h78
-rw-r--r--src/cff/cff.c13
-rw-r--r--src/cff/cffcmap.c16
-rw-r--r--src/cff/cffdrivr.c229
-rw-r--r--src/cff/cffgload.c259
-rw-r--r--src/cff/cffgload.h41
-rw-r--r--src/cff/cffload.c115
-rw-r--r--src/cff/cffobjs.c106
-rw-r--r--src/cff/cffobjs.h14
-rw-r--r--src/cff/cffparse.c163
-rw-r--r--src/cff/cffpic.c72
-rw-r--r--src/cff/cffpic.h81
-rw-r--r--src/cff/cfftypes.h5
-rw-r--r--src/cff/rules.mk19
-rw-r--r--src/cid/cidgload.c12
-rw-r--r--src/cid/cidload.c57
-rw-r--r--src/cid/cidobjs.c19
-rw-r--r--src/cid/cidparse.c14
-rw-r--r--src/cid/cidparse.h22
-rw-r--r--src/cid/cidriver.c17
-rw-r--r--src/gxvalid/gxvbsln.c56
-rw-r--r--src/gxvalid/gxvcommn.c284
-rw-r--r--src/gxvalid/gxvcommn.h80
-rw-r--r--src/gxvalid/gxverror.h6
-rw-r--r--src/gxvalid/gxvfeat.c38
-rw-r--r--src/gxvalid/gxvjust.c188
-rw-r--r--src/gxvalid/gxvkern.c156
-rw-r--r--src/gxvalid/gxvlcar.c36
-rw-r--r--src/gxvalid/gxvmod.c10
-rw-r--r--src/gxvalid/gxvmort.c53
-rw-r--r--src/gxvalid/gxvmort.h14
-rw-r--r--src/gxvalid/gxvmort0.c16
-rw-r--r--src/gxvalid/gxvmort1.c54
-rw-r--r--src/gxvalid/gxvmort2.c46
-rw-r--r--src/gxvalid/gxvmort4.c18
-rw-r--r--src/gxvalid/gxvmort5.c30
-rw-r--r--src/gxvalid/gxvmorx.c36
-rw-r--r--src/gxvalid/gxvmorx.h10
-rw-r--r--src/gxvalid/gxvmorx0.c16
-rw-r--r--src/gxvalid/gxvmorx1.c50
-rw-r--r--src/gxvalid/gxvmorx2.c52
-rw-r--r--src/gxvalid/gxvmorx4.c4
-rw-r--r--src/gxvalid/gxvmorx5.c34
-rw-r--r--src/gxvalid/gxvopbd.c32
-rw-r--r--src/gxvalid/gxvprop.c38
-rw-r--r--src/gxvalid/gxvtrak.c46
-rw-r--r--src/gzip/ftgzip.c136
-rw-r--r--src/gzip/inftrees.c10
-rw-r--r--src/gzip/rules.mk57
-rw-r--r--src/lzw/ftlzw.c30
-rw-r--r--src/lzw/ftzopen.h2
-rw-r--r--src/otvalid/otvbase.c50
-rw-r--r--src/otvalid/otvcommn.c170
-rw-r--r--src/otvalid/otvcommn.h158
-rw-r--r--src/otvalid/otverror.h4
-rw-r--r--src/otvalid/otvgdef.c36
-rw-r--r--src/otvalid/otvgpos.c186
-rw-r--r--src/otvalid/otvgsub.c108
-rw-r--r--src/otvalid/otvjstf.c83
-rw-r--r--src/otvalid/otvmath.c72
-rw-r--r--src/otvalid/otvmod.c8
-rw-r--r--src/pcf/README2
-rw-r--r--src/pcf/pcfdrivr.c88
-rw-r--r--src/pcf/pcfread.c252
-rw-r--r--src/pcf/pcfutil.c12
-rw-r--r--src/pfr/pfrcmap.c23
-rw-r--r--src/pfr/pfrdrivr.c18
-rw-r--r--src/pfr/pfrgload.c18
-rw-r--r--src/pfr/pfrload.c31
-rw-r--r--src/pfr/pfrobjs.c22
-rw-r--r--src/pfr/pfrsbit.c22
-rw-r--r--src/psaux/afmparse.c45
-rw-r--r--src/psaux/psconv.c215
-rw-r--r--src/psaux/psconv.h10
-rw-r--r--src/psaux/psobjs.c155
-rw-r--r--src/psaux/t1cmap.c22
-rw-r--r--src/psaux/t1decode.c80
-rw-r--r--src/pshinter/pshalgo.c20
-rw-r--r--src/pshinter/pshalgo.h11
-rw-r--r--src/pshinter/pshglob.c57
-rw-r--r--src/pshinter/pshglob.h4
-rw-r--r--src/pshinter/pshmod.c17
-rw-r--r--src/pshinter/pshpic.c17
-rw-r--r--src/pshinter/pshpic.h16
-rw-r--r--src/pshinter/pshrec.c54
-rw-r--r--src/pshinter/pshrec.h4
-rw-r--r--src/psnames/psmodule.c58
-rw-r--r--src/psnames/pspic.c19
-rw-r--r--src/psnames/pspic.h23
-rw-r--r--src/psnames/rules.mk4
-rw-r--r--src/raster/ftmisc.h21
-rw-r--r--src/raster/ftraster.c155
-rw-r--r--src/raster/ftrend1.c21
-rw-r--r--src/raster/rastpic.c32
-rw-r--r--src/raster/rastpic.h18
-rw-r--r--src/sfnt/pngshim.c377
-rw-r--r--src/sfnt/pngshim.h49
-rw-r--r--src/sfnt/rules.mk10
-rw-r--r--src/sfnt/sfdriver.c342
-rw-r--r--src/sfnt/sferrors.h4
-rw-r--r--src/sfnt/sfnt.c3
-rw-r--r--src/sfnt/sfntpic.c37
-rw-r--r--src/sfnt/sfntpic.h81
-rw-r--r--src/sfnt/sfobjs.c545
-rw-r--r--src/sfnt/ttbdf.c16
-rw-r--r--src/sfnt/ttcmap.c505
-rw-r--r--src/sfnt/ttcmap.h99
-rw-r--r--src/sfnt/ttcmapc.h19
-rw-r--r--src/sfnt/ttkern.c10
-rw-r--r--src/sfnt/ttload.c118
-rw-r--r--src/sfnt/ttmtx.c216
-rw-r--r--src/sfnt/ttmtx.h4
-rw-r--r--src/sfnt/ttpost.c32
-rw-r--r--src/sfnt/ttsbit.c2254
-rw-r--r--src/sfnt/ttsbit.h22
-rw-r--r--src/sfnt/ttsbit0.c1011
-rw-r--r--src/smooth/ftgrays.c265
-rw-r--r--src/smooth/ftsmooth.c177
-rw-r--r--src/smooth/ftspic.c37
-rw-r--r--src/smooth/ftspic.h17
-rw-r--r--src/tools/afblue.pl548
-rw-r--r--src/tools/apinames.c28
-rwxr-xr-xsrc/tools/chktrcmp.py4
-rw-r--r--src/tools/cordic.py62
-rw-r--r--src/tools/docmaker/content.py229
-rw-r--r--src/tools/docmaker/docmaker.py39
-rw-r--r--src/tools/docmaker/formatter.py73
-rw-r--r--src/tools/docmaker/sources.py236
-rw-r--r--src/tools/docmaker/tohtml.py478
-rw-r--r--src/tools/docmaker/utils.py81
-rw-r--r--src/tools/ftrandom/README2
-rw-r--r--src/tools/ftrandom/ftrandom.c38
-rw-r--r--src/tools/test_afm.c2
-rw-r--r--src/tools/test_bbox.c34
-rw-r--r--src/tools/test_trig.c98
-rw-r--r--src/truetype/rules.mk5
-rw-r--r--src/truetype/truetype.c3
-rw-r--r--src/truetype/ttdriver.c137
-rw-r--r--src/truetype/ttgload.c734
-rw-r--r--src/truetype/ttgload.h1
-rw-r--r--src/truetype/ttgxvar.c109
-rw-r--r--src/truetype/ttinterp.c1938
-rw-r--r--src/truetype/ttinterp.h102
-rw-r--r--src/truetype/ttobjs.c258
-rw-r--r--src/truetype/ttobjs.h35
-rw-r--r--src/truetype/ttpic.c21
-rw-r--r--src/truetype/ttpic.h39
-rw-r--r--src/truetype/ttpload.c38
-rw-r--r--src/truetype/ttsubpix.c1011
-rw-r--r--src/truetype/ttsubpix.h110
-rw-r--r--src/type1/t1afm.c22
-rw-r--r--src/type1/t1driver.c45
-rw-r--r--src/type1/t1gload.c16
-rw-r--r--src/type1/t1load.c236
-rw-r--r--src/type1/t1objs.c25
-rw-r--r--src/type1/t1parse.c68
-rw-r--r--src/type42/t42drivr.c21
-rw-r--r--src/type42/t42objs.c44
-rw-r--r--src/type42/t42parse.c137
-rw-r--r--src/winfonts/winfnt.c105
-rw-r--r--vms_make.com4
508 files changed, 69199 insertions, 39144 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..8b859a5
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,253 @@
+# CMakeLists.txt
+#
+# Copyright 2013, 2014 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# Written by John Cary <cary@txcorp.com>
+#
+# 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.
+#
+#
+# Say
+#
+# cmake CMakeLists.txt
+#
+# to create a Makefile that builds a static version of the library.
+#
+# For a dynamic library, use
+#
+# cmake CMakeLists.txt -DBUILD_SHARED_LIBS:BOOL=true
+#
+# For a framework on OS X, use
+#
+# cmake CMakeLists.txt -DBUILD_FRAMEWORK:BOOL=true -G Xcode
+#
+# instead.
+#
+# For an iOS static library, use
+#
+# cmake CMakeLists.txt -DIOS_PLATFORM=OS -G Xcode
+#
+# or
+#
+# cmake CMakeLists.txt -DIOS_PLATFORM=SIMULATOR -G Xcode
+#
+# Please refer to the cmake manual for further options, in particular, how
+# to modify compilation and linking parameters.
+#
+# Some notes.
+#
+# . `cmake' will overwrite FreeType's original (top-level) `Makefile' file.
+#
+# . You can use `cmake' directly on a freshly cloned FreeType git
+# repository.
+#
+# . `CMakeLists.txt' is provided as-is since it is not used by the
+# developer team.
+
+
+cmake_minimum_required(VERSION 2.6)
+
+# CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which
+# configures the base build environment and references the toolchain file
+if (APPLE)
+ if (DEFINED IOS_PLATFORM)
+ if (NOT "${IOS_PLATFORM}" STREQUAL "OS"
+ AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR")
+ message(FATAL_ERROR
+ "IOS_PLATFORM must be set to either OS or SIMULATOR")
+ endif ()
+ if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
+ message(AUTHOR_WARNING
+ "You should use Xcode generator with IOS_PLATFORM enabled to get Universal builds.")
+ endif ()
+ if (BUILD_SHARED_LIBS)
+ message(FATAL_ERROR
+ "BUILD_SHARED_LIBS can not be on with IOS_PLATFORM enabled")
+ endif ()
+ if (BUILD_FRAMEWORK)
+ message(FATAL_ERROR
+ "BUILD_FRAMEWORK can not be on with IOS_PLATFORM enabled")
+ endif ()
+
+ # iOS only uses static libraries
+ set(BUILD_SHARED_LIBS OFF)
+
+ set(CMAKE_TOOLCHAIN_FILE
+ ${PROJECT_SOURCE_DIR}/builds/cmake/iOS.cmake)
+ endif ()
+else ()
+ if (DEFINED IOS_PLATFORM)
+ message(FATAL_ERROR "IOS_PLATFORM is not supported on this platform")
+ endif ()
+endif ()
+
+project(freetype)
+
+if (BUILD_FRAMEWORK)
+ if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
+ message(FATAL_ERROR
+ "You should use Xcode generator with BUILD_FRAMEWORK enabled")
+ endif ()
+ set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)")
+ set(BUILD_SHARED_LIBS ON)
+endif ()
+
+set(VERSION_MAJOR "2")
+set(VERSION_MINOR "5")
+set(VERSION_PATCH "5")
+set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
+
+# Compiler definitions for building the library
+add_definitions(-DFT2_BUILD_LIBRARY)
+
+# Specify library include directories
+include_directories("${PROJECT_SOURCE_DIR}/include")
+
+# Create the configuration file
+message(STATUS "Creating directory, ${PROJECT_BINARY_DIR}/include/freetype2.")
+file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/freetype2)
+
+# For the auto-generated ftconfig.h file
+include_directories(BEFORE "${PROJECT_BINARY_DIR}/include/freetype2")
+message(STATUS "Creating ${PROJECT_BINARY_DIR}/include/freetype2/ftconfig.h.")
+execute_process(
+ COMMAND sed -e "s/FT_CONFIG_OPTIONS_H/<ftoption.h>/" -e "s/FT_CONFIG_STANDARD_LIBRARY_H/<ftstdlib.h>/" -e "s?/undef ?#undef ?"
+ INPUT_FILE ${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in
+ OUTPUT_FILE ${PROJECT_BINARY_DIR}/include/freetype2/ftconfig.h
+)
+
+file(GLOB PUBLIC_HEADERS "include/*.h")
+file(GLOB PUBLIC_CONFIG_HEADERS "include/config/*.h")
+file(GLOB PRIVATE_HEADERS "include/internal/*.h")
+
+set(BASE_SRCS
+ src/autofit/autofit.c
+ src/base/ftadvanc.c
+ src/base/ftbbox.c
+ src/base/ftbdf.c
+ src/base/ftbitmap.c
+ src/base/ftcalc.c
+ src/base/ftcid.c
+ src/base/ftdbgmem.c
+ src/base/ftdebug.c
+ src/base/ftfstype.c
+ src/base/ftgasp.c
+ src/base/ftgloadr.c
+ src/base/ftglyph.c
+ src/base/ftgxval.c
+ src/base/ftinit.c
+ src/base/ftlcdfil.c
+ src/base/ftmm.c
+ src/base/ftobjs.c
+ src/base/ftotval.c
+ src/base/ftoutln.c
+ src/base/ftpatent.c
+ src/base/ftpfr.c
+ src/base/ftrfork.c
+ src/base/ftsnames.c
+ src/base/ftstream.c
+ src/base/ftstroke.c
+ src/base/ftsynth.c
+ src/base/ftsystem.c
+ src/base/fttrigon.c
+ src/base/fttype1.c
+ src/base/ftutil.c
+ src/base/ftwinfnt.c
+ src/base/ftxf86.c
+ src/bdf/bdf.c
+ src/bzip2/ftbzip2.c
+ src/cache/ftcache.c
+ src/cff/cff.c
+ src/cid/type1cid.c
+ src/gzip/ftgzip.c
+ src/lzw/ftlzw.c
+ src/pcf/pcf.c
+ src/pfr/pfr.c
+ src/psaux/psaux.c
+ src/pshinter/pshinter.c
+ src/psnames/psmodule.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
+ src/winfonts/winfnt.c
+)
+
+include_directories("src/truetype")
+include_directories("src/sfnt")
+include_directories("src/autofit")
+include_directories("src/smooth")
+include_directories("src/raster")
+include_directories("src/psaux")
+include_directories("src/psnames")
+
+if (BUILD_FRAMEWORK)
+ set(BASE_SRCS
+ ${BASE_SRCS}
+ builds/mac/freetype-Info.plist
+ )
+endif ()
+
+add_library(freetype
+ ${PUBLIC_HEADERS}
+ ${PUBLIC_CONFIG_HEADERS}
+ ${PRIVATE_HEADERS}
+ ${BASE_SRCS}
+)
+
+if (BUILD_FRAMEWORK)
+ set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
+ PROPERTY MACOSX_PACKAGE_LOCATION Headers/config
+ )
+ set_target_properties(freetype PROPERTIES
+ FRAMEWORK TRUE
+ MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist
+ PUBLIC_HEADER "${PUBLIC_HEADERS}"
+ XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
+ )
+endif ()
+
+# Installations
+# Note the trailing slash in the argument to the `DIRECTORY' directive
+install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
+ DESTINATION include/freetype2
+ PATTERN "internal" EXCLUDE
+)
+install(TARGETS freetype
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ FRAMEWORK DESTINATION Library/Frameworks
+)
+
+# Packaging
+# CPack version numbers for release tarball name.
+set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
+set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}})
+if (NOT DEFINED CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_NAME}")
+endif ()
+if (NOT DEFINED CPACK_SOURCE_PACKAGE_FILE_NAME)
+ set(CPACK_SOURCE_PACKAGE_FILE_NAME
+ "${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}-r${PROJECT_REV}"
+ CACHE INTERNAL "tarball basename"
+ )
+endif ()
+set(CPACK_SOURCE_GENERATOR TGZ)
+set(CPACK_SOURCE_IGNORE_FILES
+ "/CVS/;/.svn/;.swp$;.#;/#;/build/;/serial/;/ser/;/parallel/;/par/;~;/preconfig.out;/autom4te.cache/;/.config")
+set(CPACK_GENERATOR TGZ)
+include(CPack)
+
+# add make dist target
+add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
+
+# eof
diff --git a/ChangeLog b/ChangeLog
index 9afc1aa..809b475 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4066 +1,5149 @@
-2012-03-08 Werner Lemberg <wl@gnu.org>
+2014-12-30 Werner Lemberg <wl@gnu.org>
- * Version 2.4.9 released.
+ * Version 2.5.5 released.
=========================
- Tag sources with `VER-2-4-9'.
-
- * docs/CHANGES: Updated.
+ Tag sources with `VER-2-5-5'.
* docs/VERSION.DLL: Update documentation and bump version number to
- 2.4.9.
-
- * 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,
+ 2.5.5.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
- builds/wince/vc2008-ce/index.html: s/2.4.8/2.4.9/, s/248/249/.
+ builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
+
+ * builds/unix/configure.raw (version_info): Set to 17:4:11.
+ * CMakeLists.txt (VERSION_PATCH): Set to 5.
+ * docs/CHANGES: Updated.
+
+2014-12-24 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Formatting and nanooptimizations.
+
+ * src/base/ftcalc.c,
+ * src/base/fttrigon.c: Revise sign restoration.
+
+2014-12-13 Werner Lemberg <wl@gnu.org>
+
+ * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08.
+
+2014-12-11 Werner Lemberg <wl@gnu.org>
+
+ * builds/toplevel.mk (dist): Use older POSIX standard for `tar'.
+
+ Apparently, BSD tar isn't capable yet of handling POSIX-1.2001
+ (contrary to GNU tar), so force the POSIX-1.1988 format.
+
+ Problem reported by Stephen Fisher <sfisher@SDF.ORG>.
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 9.
+2014-12-11 Werner Lemberg <wl@gnu.org>
- * builds/unix/configure.raw (version_info): Set to 14:1:8.
+ * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
-2012-03-08 Werner Lemberg <wl@gnu.org>
+2014-12-11 Werner Lemberg <wl@gnu.org>
- [bdf] Add missing overflow check.
+ * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
- * src/bdf/bdflib.c (_bdf_parse_glyphs) <BITMAP>: Add threshold for
- `glyph->bpr'.
+ Problem reported by Dennis Felsing <dennis@felsin9.de>.
-2012-03-07 Vinnie Falco <vinnie.falco@gmail.com>
+2014-12-11 Werner Lemberg <wl@gnu.org>
- Prepare source code for amalgamation.
+ * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'.
- * src\autofit\aferrors.h, src\bdf\bdferror.h, src\bzip2\ftbzip2.c,
- src\cache\ftcerror.h, src\cff\cfferrs.h, src\cid\ciderrs.h,
- src\gxvalid\gxverror.h, src\gzip\ftgzip.c, src\lzw\ftlzw.c,
- src\otvalid\otverror.h, src\pcf\pcferror.h, src\pfr\pfrerror.h,
- src\psaux\psauxerr.h, src\pshinter\pshnterr.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\type42\t42error.h, src\winfonts\fnterrs.h:
- Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX.
+ Problem reported by Dennis Felsing <dennis@felsin9.de>.
-2012-03-03 Werner Lemberg <wl@gnu.org>
+2014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- Fix Savannah bug #35660.
+ [gxvalid] Fix a naming convention conflicting with ftvalid.
- For some divisions, we use casts to 32bit entities. Always guard
- against division by zero with these casts also.
+ See previous changeset for otvalid.
- * src/base/ftcalc.c (ft_div64by32): Remove redundant cast.
- (FT_MulDiv, FT_MulDiv_No_Round): Add 32bit cast.
- (FT_DivFix): Add 32bit cast (this omission triggered the bug).
+ * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
+ `valid' by `gxvalid'.
+ * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
+ gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
+ gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
+ gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
+ gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
+ it is typed as GXV_Validator.
-2012-03-03 Werner Lemberg <wl@gnu.org>
+2014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- [psaux] Fix handling of track kerning.
+ [otvalid] Fix a naming convention conflicting with ftvalid.
- * src/psaux/afmparse.c (afm_parse_track_kern): Don't inverse sign
- for `min_kern'. It is indeed quite common that track kerning
- *increases* spacing for very small sizes.
+ Some prototypes in ftvalid.h use `valid' for the variables
+ typed as FT_Validator. Their implementations in src/base/
+ ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.
-2012-03-02 Werner Lemberg <wl@gnu.org>
+ Some macros in otvcommn.h assume the exist of the variable
+ `valid' typed as OTV_Validator in the caller.
- [truetype] Fix Savannah bug #35689.
+ Mixing these two conventions cause invalid pointer conversion
+ and unexpected SEGV in longjmp. To prevent it, all variables
+ typed as OTV_Validator are renamed to `otvalid'.
- * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check first outline
- point.
+ * src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
+ * src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
+ otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
+ if it is typed as OTV_Validator.
-2012-03-01 Werner Lemberg <wl@gnu.org>
+2014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- [bdf] Fix Savannah bug #35656.
+ [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
- * src/bdf/bdflib.c (_bdf_parse_glyphs) <_BDF_BITMAP>: Check validity
- of nibble characters instead of accessing `a2i' array.
+ Original patch is designed by Werner Lemberg. Extra part
+ for otvalid and gxvalid are added by suzuki toshiya, see
+ discussion:
+ http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
+ http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
-2012-03-01 Werner Lemberg <wl@gnu.org>
+ * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
+ * src/gxvalid/gxvcommn.h: Ditto.
+ * src/otvalid/otvcommn.h: Ditto.
- [winfonts] Fix Savannah bug #35659.
+2014-12-08 Werner Lemberg <wl@gnu.org>
- * src/winfonts/winfnt.c (FNT_Face_Init): Check number of glyphs.
+ [pcf] Fix Savannah bug #43774.
-2012-03-01 Werner Lemberg <wl@gnu.org>
+ Work around `features' of X11's `pcfWriteFont' and `pcfReadFont'
+ functions. Since the PCF format doesn't have an official
+ specification, we have to exactly follow these functions' behaviour.
- [bdf] Fix Savannah bug #35658.
+ The problem was unveiled with a patch from 2014-11-06, fixing issue
+ #43547.
- * src/bdf/bdflib.c (_bdf_list_split): Initialize `field' elements
- properly.
+ * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last
+ element. Instead, assign real size.
-2012-03-01 Werner Lemberg <wl@gnu.org>
+2014-12-07 Werner Lemberg <wl@gnu.org>
- [psaux] Fix Savannah bug #35657.
+ Work around a bug in Borland's C++ compiler.
- If in function `skip_spaces' the routine `skip_comment' comes to the
- end of buffer, `cur' is still increased by one, so we need to check
- for `p >= limit' and not `p == limit'.
+ See
+
+ http://qc.embarcadero.com/wc/qcmain.aspx?d=118998
- * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed,
- PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Fix boundary checking.
+ for Borland's bug tracker entry.
-2012-03-01 Werner Lemberg <wl@gnu.org>
+ Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
+ http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
- [truetype] Fix Savannah bug #35646.
+ * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
+ (gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
- * src/truetype/ttinterp.c (Ins_MIRP): Typo, present since ages. The
- code is now in sync with the other operators (e.g. MSIRP) which
- modify twilight points.
+2014-12-07 Werner Lemberg <wl@gnu.org>
-2012-03-01 Werner Lemberg <wl@gnu.org>
+ */*: Decorate hex constants with `U' and `L' where appropriate.
- [bdf] Fix Savannah bug #35643.
+2014-12-07 Werner Lemberg <wl@gnu.org>
- * src/bdf/bdflib.c (_bdf_list_ensure): Bring code in sync with
- comment before `_bdf_list_split', this is, really allocate at least
- five `field' elements.
+ [truetype] Prevent memory leak for buggy fonts.
-2012-03-01 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttobjs.c (tt_size_done): Unconditionally call
+ `tt_size_done_bytecode'.
- [bdf] Fix Savannah bug #35641.
+2014-12-06 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.5.4 released.
+ =========================
- * src/bdf/bdflib.c (_bdf_parse_glyphs) <DWIDTH, BBX>: Abort if
- _BDF_ENCODING isn't set. We need this because access to the `glyph'
- variable might be undefined otherwise.
-2012-03-01 Werner Lemberg <wl@gnu.org>
+ Tag sources with `VER-2-5-4'.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.5.4.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
+
+ * builds/unix/configure.raw (version_info): Set to 17:3:11.
+ * CMakeLists.txt (VERSION_PATCH): Set to 4.
+ * docs/CHANGES: Updated.
- [truetype] Fix Savannah bug #35640.
+2014-12-04 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (SkipCode, TT_RunIns): Fix boundary check
- for NPUSHB and NPUSHW instructions.
+ docs/CHANGES: Updated, formatted.
-2012-02-29 Werner Lemberg <wl@gnu.org>
+2014-12-04 Dave Arnold <darnold@adobe.com>
- [truetype] Fix Savannah bug #35601.
+ [cff] Modify an FT_ASSERT.
- * src/truetype/ttinterp.c (Ins_SHZ): Use number of points instead of
- last point for loop.
- Also remove redundant boundary check.
+ * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
+ bug #43661, the test font `...aspartam.otf' still triggers an
+ FT_ASSERT. Since hintmap still works with count==0, ...
+ (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
+ suppress the assert.
-2012-02-29 Werner Lemberg <wl@gnu.org>
+2014-12-04 Dave Arnold <darnold@adobe.com>
- [truetype] Remove redundant check.
+ [cff] Fix Savannah bug #43661.
- * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant
- second check for ordered contour start points.
+ * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
+ cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after
+ hintmask is constructed.
-2012-02-29 Werner Lemberg <wl@gnu.org>
+ * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to
+ avoid reading past end of hintmask.
- [truetype] Make SHC instruction behave similar to MS rasterizer.
+2014-12-03 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (Ins_SHC): Handle virtual contour in
- twilight zone.
+ docs/CHANGES: Updated.
-2012-02-29 Alexei Podtelezhnikov <apodtele@gmail.com>
+2014-12-03 Werner Lemberg <wl@gnu.org>
- Avoid modulo operators against a power-of-two denominator.
+ [autofit] Better fix for conversion specifiers in debug messages.
- * src/afcjk.c (af_hint_normal_stem), src/base/ftoutln.c
- (ft_contour_has), src/cff/cffgload.c (cff_decoder_parse_charstrings)
- <cff_op_vvcurveto, cff_op_hhcurveto, cff_op_hvcurveto>,
- src/gxvalid/gxvcommn.c (GXV_32BIT_ALIGNMENT_VALIDATE),
- src/gxvalid/gxvfeat.c (gxv_feat_setting_validate): Replace `%' with
- `&' operator.
+ Using `%ld' for pointer differences causes warnings on 32bit
+ platforms. The correct type would be (the relatively new) `%td',
+ however, this is missing on some important platforms.
-2012-02-29 Werner Lemberg <wl@gnu.org>
+ This patch improves the change from 2014-11-28.
- [autofit] Don't synchronize digit widths for light rendering mode.
+ * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our
+ pointer differences are always sufficiently small.
+ (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
+ af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
- We don't hint horizontally in this mode.
+2014-12-03 Werner Lemberg <wl@gnu.org>
- * src/autofit/afloader.c (af_loader_load_g) <Hint_Metrics>:
+ FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
+
+ All public FreeType enumeration and flag values are uppercase...
+
+ * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
+ compatilibity, retain the old values as macros.
+
+ * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
+ (get_sfnt_table): Updated.
+
+2014-12-02 Werner Lemberg <wl@gnu.org>
+
+ * include/*: Improve structure of documentation.
+
+ . Add and update many `<Order>' tags.
+ . Apply various documentation fixes.
+ . Remove details to deprecated (or never implemented) data.
+
+2014-12-02 Werner Lemberg <wl@gnu.org>
+
+ [docmaker] Always handle `<Order>' section elements.
+
+ Previously, those elements were handled only for sections present in
+ a `<Sections>' chapter element.
+
+ * src/tools/docmaker/content.py (ContentProcessor::finish):
Implement it.
-2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com>
+2014-12-02 Werner Lemberg <wl@gnu.org>
- [type42] Minor code optimization (again).
+ [docmaker] Properly handle empty rows in Synopsis.
- * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change.
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
+ `&nbsp;' for empty fields.
-2012-02-26 Mateusz Jurczyk <mjurczyk@google.com>
- Werner Lemberg <wl@gnu.org>
+2014-12-02 Werner Lemberg <wl@gnu.org>
- [smooth] Fix Savannah bug #35604.
+ [docmaker] Thinko.
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `FT_Pos'
- instead of `FT_UInt' for some variables and update comparisons
- accordingly. A detailed analysis can be found in the bug report.
+ * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
+ Emit `/empty/' string for first element also.
-2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com>
+2014-12-02 Werner Lemberg <wl@gnu.org>
- [type42] Minor code optimization.
+ [docmaker] Honour empty lines in `<Order>' section element.
- * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of
- modulo operator.
+ This greatly improves the readability of the `Synopsis' links.
-2012-02-26 Werner Lemberg <wl@gnu.org>
+ * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
+ Insert string `/empty/' between items.
- * docs/CHANGES: Updated.
+ * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
+ robust against nonexistent keys.
-2012-02-26 Werner Lemberg <wl@gnu.org>
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
+ empty <td> elements for `/empty/'.
- [type1] Fix Savannah bug #35608.
+2014-12-02 Werner Lemberg <wl@gnu.org>
- * src/type1/t1parse.c (T1_Get_Private_Dict): Reject too short
- dictionaries.
+ [docmaker] Ensure Python 3 compatibility.
-2012-02-26 Werner Lemberg <wl@gnu.org>
+ * src/tools/docmaker/content.py (ContentProcessor::set_section,
+ ContentProcessor::finish): Replace `has_key' function with `in'
+ keyword.
- [bdf] Support `ENCODING -1 <n>' format.
+ * src/tools/docmaker/formatter.py (Formatter::__init__): Replace
+ sorting function with a key generator.
+ (Formatter::add_identifier): Replace `has_key' function with `in'
+ keyword.
- * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Implement it.
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
+ Replace `has_key' function with `in' keyword.
+ (HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
+ integer division.
+ s/<>/>/.
-2012-02-26 Werner Lemberg <wl@gnu.org>
+ * src/tools/docmaker/utils.py: Import `itertools'.
+ (index_sort): Replaced by...
+ (index_key): ... this new key generator (doing exactly the same).
- [bdf] Fix Savannah bug #35607.
+2014-11-29 Werner Lemberg <wl@gnu.org>
- * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
- negative encoding values.
+ [docmaker] Don't output a block multiple times.
-2012-02-26 Werner Lemberg <wl@gnu.org>
+ This bug was hidden by not processing all lines of `<Order>' blocks.
- [type1] Fix Savannah bug #35606.
+ * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
+ out field names.
- * src/type1/t1load.c (parse_subrs): Add proper guards for `strncmp'.
+2014-11-29 Werner Lemberg <wl@gnu.org>
- * src/psaux/psobjs.c (ps_parser_skip_PS_token): Emit error message
- only if cur < limit.
+ [docmaker] Use field values as HTML link targets where possible.
-2012-02-25 Werner Lemberg <wl@gnu.org>
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
+ Accept second, optional argument to specify a name.
+ (HtmlFormatter::html_source_quote): Link to field ID if possible.
+ (HtmlFormatter::print_html_field_list): Emit `id' attribute.
- [pcf] Fix Savannah bug #35603.
+2014-11-29 Werner Lemberg <wl@gnu.org>
- * src/pcf/pcfread.c (pcf_get_properties): Assure final zero byte in
- `strings' array.
+ [docmaker] Allow empty lines in `<Order>' blocks.
-2012-02-25 Werner Lemberg <wl@gnu.org>
+ Before this patch, the suggested order of entries stopped at the
+ first empty line.
- [type42] Fix Savannah bug #35602.
+ Obviously, nobody noticed that this problem caused a much reduced
+ set of links in the `Synopsis' sections; in particular, the
+ `<Order>' blocks contain a lot of entries that wouldn't be listed
+ otherwise...
- * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size' more
- thoroughly.
+ * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
+ New function to iterate over all items.
+ (DocSection::process): Use it.
-2012-02-25 Werner Lemberg <wl@gnu.org>
+2014-11-29 Werner Lemberg <wl@gnu.org>
- [bdf] Fix Savannah bugs #35599 and #35600.
+ * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
- * src/bdf/bdflib.c (ACMSG16): New warning message.
- (_bdf_parse_glyphs) <_BDF_BITMAP>: Check line length.
+ After the single asterisk there must be no other immediately following
+ asterisk.
-2012-02-24 Werner Lemberg <wl@gnu.org>
+2014-11-29 Werner Lemberg <wl@gnu.org>
- [bdf] Fix Savannah bugs #35597 and #35598.
+ * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing.
- * src/bdf/bdflib.c (_bdf_is_atom): Fix handling of property value.
+2014-11-29 Werner Lemberg <wl@gnu.org>
-2012-02-24  Vinnie Falco <vinnie.falco@gmail.com>
+ [docmaker] Improve HTML code for table of contents.
- Prepare source code for amalgamation (6/6).
+ * src/tools/docmaker/tohtml.py: Introduce a new table class `toc',
+ together with proper CSS.
- * src/cff/cffdrivr.c: s/Load_Glyph/cff_glyph_load/.
+2014-11-29 Werner Lemberg <wl@gnu.org>
- * src/cid/cidload.c: s/parse_font_matrix/cid_parse_font_matrix/.
- s/t1_init_loader/cid_init_loader/.
- s/t1_done_loader/cid_done_loader/.
+ [docmaker] Provide higher-level markup and simplify HTML.
- * src/pxaux/t1cmap.c: s/t1_get_glyph_name/psaux_get_glyph_name/.
+ * src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
+ elements, use CSS descendants (of class `section') to format the
+ data.
- * src/truetype/ttdriver.c: s/Load_Glyph/tt_glyph_load/.
+ Also remove reduntant <p> and <br> elements, replacing them with
+ proper CSS.
- * src/type1/t1load.c: s/parse_font_matrix/t1_parse_font_matrix/.
+ Globally reduce page width to 75%.
-2012-02-24  Vinnie Falco <vinnie.falco@gmail.com>
+ (block_header): Rename <div> class to `section'.
- Prepare source code for amalgamation (5/6).
+2014-11-29 Werner Lemberg <wl@gnu.org>
- * include/freetype/fterrors.h: Undefine FT_KEEP_ERR_PREFIX after
- using it.
+ [docmaker] Add `top' links after blocks.
-2012-02-22  Vinnie Falco <vinnie.falco@gmail.com>
+ * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
- Prepare source code for amalgamation (4/6).
+2014-11-29 Werner Lemberg <wl@gnu.org>
- * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG,
- RAS_ARGS, RAS_VAR, and RAS_VARS before defining it.
+ * src/tools/docmaker/tohtml.py: Improve CSS for fields.
- * src/smooth/ftgrays.c: s/TRaster/black_TRaster/,
- s/PRaster/black_PRaster/.
- * src/raster/ftraster.c: s/TRaster/gray_TRaster/,
- s/PRaster/gray_PRaster/.
+ Make fields align horizontally relative to full line width.
-2012-02-20  Vinnie Falco <vinnie.falco@gmail.com>
+2014-11-29 Werner Lemberg <wl@gnu.org>
- Prepare source code for amalgamation (3/6).
+ * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
- * src/smooth/ftgrays.c: s/TWorker/black_TWorker/,
- s/PWorker/black_PWorker/.
- * src/raster/ftraster.c: s/TWorker/gray_TWorker/,
- s/PWorker/gray_PWorker/.
+ This thinko was introduced 2014-11-27.
-2012-02-20  Vinnie Falco <vinnie.falco@gmail.com>
+2014-11-28 Werner Lemberg <wl@gnu.org>
- Prepare source code for amalgamation (2/6).
+ [docmaker] Format field lists with CSS.
- * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine FLOOR,
- CEILING, TRUNC, and SCALED before defining it.
+ This also simplifies the inserted HTML code.
-2012-02-20  Vinnie Falco <vinnie.falco@gmail.com>
+ * src/tools/docmaker/tohtml.py
+ (HtmlFormatter::print_html_field_list): Do it.
- Prepare source code for amalgamation (1/6).
+2014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- See discussion starting at
+ Fix compiler warning to the comparison between signed and
+ unsigned variable.
- http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html
+ * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
+ between `ypos + ysize' and FT_INT_{MAX,MIN}.
- * src/smooth/ftgrays.c: s/TBand/gray_TBand/.
- * src/raster/ftraster.c: s/TBand/black_TBand/.
+2014-11-28 Werner Lemberg <wl@gnu.org>
-2012-02-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [docmaker] Replace empty `<td>' with CSS.
- [autofit] Fix outline flags.
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
+ it.
- * src/autofit/afloader.c (af_loader_load_g): Don't reassign
- `outline.flags' so that this information is preserved. See
- discussion starting at
+2014-11-28 Werner Lemberg <wl@gnu.org>
- http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
+ [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
-2012-02-11 Werner Lemberg <wl@gnu.org>
+ * src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
+ (source_*): Use `<div>'.
+ (HtmlFormatter::block_enter): s/<h4>/<h3>/.
- [truetype] Fix Savannah bug #35466.
+2014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- Jump instructions are now bound to the current function. The MS
- Windows rasterizer behaves the same, as confirmed by Greg Hitchcock.
+ Fix compiler warning to conversion specifiers in debug messages.
- * src/truetype/ttinterp.h (TT_CallRec): Add `Cur_End' element.
- * src/truetype/ttobjs.h (TT_DefRecord): Add `end' element.
+ * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length
+ modifier to dump long integers.
+ (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
- * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Check upper
- bound of jump address.
- (Ins_FDEF, Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns): Updated.
+2014-11-27 Werner Lemberg <wl@gnu.org>
-2012-02-11 Werner Lemberg <wl@gnu.org>
+ * src/tools/docmaker/tohtml.py: Use more CSS for index.
- We don't use `extensions'.
+2014-11-27 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/ftobjs.h (FT_DriverRec): Remove
- `extensions' field.
+ [docmaker] Replace `name' attribute of `<a>' with `id'.
-2012-02-11 Werner Lemberg <wl@gnu.org>
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
- Clean up `generic' fields.
+2014-11-27 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/ftobjs.h (FT_ModuleRec, FT_LibraryRec):
- Remove `generic' field since users can't access it.
+ * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
- * src/base/ftobjs.c (FT_Done_GlyphSlot): Call `generic.finalizer' as
- advertised in the documentation of FT_Generic.
- (Destroy_Module, FT_Done_Library): Updated to changes in `ftobjs.h'.
+ For `Index' and `TOC' links, we now simply use the `text-align' CSS
+ property of `<td>' to enforce flush-left and flush-right,
+ eliminating the hack with an empty, full-width `<td>' element
+ inbetween.
-2012-02-07 Werner Lemberg <wl@gnu.org>
+ The change also enforces the same (smaller) size for all index and
+ TOC links.
- [autofit] Harmonize function arguments.
+2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for
- `load_flags'.
+ * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
+ cf2font.c could not find it under `make multi' build.
-2012-02-07 Werner Lemberg <wl@gnu.org>
+2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/cff/cffobjs.c (cff_face_init): Remove unnecessary casts.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
+ unrequired negative value check for `width' and `height'.
-2012-01-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-11-27 Werner Lemberg <wl@gnu.org>
- [gxvalid] Fix Savannah bug #35286.
+ * src/tools/docmaker/tohtml.py: More HTML table refactoring.
- Patch submitted by anonymous reporter.
+ Replace some `<table>' tags with `<div>' to simplify structure.
- * src/gxvalid/gxvcommn.c (gxv_XStateTable_subtable_setup):
- gxv_set_length_by_ulong_offset() must be called with 3, not 4,
- the number of the subtables in the state tables; classTable,
- stateArray, entryTable.
+ Move `bgcolor' attribute to CSS.
-2012-01-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Replace most `width' attributes with CSS. The remaining instances
+ (providing a similar effect as LaTeX's `\hfill' command) are removed
+ in a later patch.
- [raccess] Modify for PIC build.
+2014-11-27 Werner Lemberg <wl@gnu.org>
- Based on the patch provided by Erik Dahlstrom <ed@opera.com>,
- http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html
+ * src/tools/docmaker/tohtml.py: Replace <font> with CSS.
- Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()'
- are renamed with `ft_' suffixes.
+2014-11-27 Werner Lemberg <wl@gnu.org>
- * src/base/ftbase.h: `raccess_rule_by_darwin_vfs()' is renamed
- to `ft_raccess_rule_by_darwin_vfs()'.
- * src/base/ftobjs.c: Ditto.
+ * src/tools/docmaker/tohtml.py: Center <table> with CSS.
- * src/base/ftrfork.c: Declarations of FT_RFork_Rule,
- raccess_guess_rec, are moved to...
- * include/freetype/internal/ftrfork.h: Here.
+2014-11-27 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/ftrfork.h:
- FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END} macros are defined
- to replace raccess_guess_table[] in both of PIC and non-PIC
- modes.
- * src/base/ftrfork.c: raccess_guess_table[] array is rewritten
- by FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END}.
+ * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'.
- * src/base/basepic.h (BasePIC): Add `ft_raccess_guess_table'
- storage. (FT_RACCESS_GUESS_TABLE_GET): New macro to retrieve
- the function pointer from `ft_raccess_guess_table' storage in
- `BasePIC' structure.
- * src/base/ftrfork.c (FT_Raccess_Guess): Rewritten with
- FT_RACCESS_GUESS_TABLE_GET.
- (raccess_get_rule_type_from_rule_index): Add `library' as the
- first argument to the function, to retrieve the storage of
- `ft_raccess_guess_table' from it. Also `raccess_guess_table'
- is replaced by FT_RACCESS_GUESS_TABLE_GET.
- (ft_raccess_rule_by_darwin_vfs): Ditto.
+2014-11-27 Werner Lemberg <wl@gnu.org>
-2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
- Remove trailing spaces.
+ This starts a series of commits into the direction of generating
+ valid HTML 5 code, especially using much more CSS.
-2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- Formatting PIC related sources.
+ Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
+ suggested by Alexei.
- * src/autofit/afpic.c: Harmonize to FT2 coding conventions.
- * src/base/basepic.c: Ditto.
- * src/base/ftpic.c: Ditto.
- * src/cff/cffpic.c: Ditto.
- * src/pshinter/pshpic.c: Ditto.
- * src/psnames/pspic.c: Ditto.
- * src/raster/rastpic.c: Ditto.
- * src/sfnt/sfntpic.c: Ditto.
- * src/smooth/ftspic.c: Ditto.
- * src/truetype/ttpic.c: Ditto.
+ * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
+ negative values in `xpos' and `ypos + ysize'.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
+ too negative values in `x_left' and `y_top'. Either negative
+ values in `width' and `height' are checked.
-2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-11-27 Werner Lemberg <wl@gnu.org>
- [autofit] Fix the inclusion of `aflatin2.h' in PIC file.
+ [docmaker] Produce better HTML code.
- * src/autofit/afpic.c: Include `aflatin2.h' when
- FT_OPTION_AUTOFIT2 is defined, as afglobal.c does so.
- Unconditionally inclusion causes declared but unimplemented
- warning by GCC 4.6.
+ * src/tools/docmaker/tohtml.py: Always use double quotes for
+ attribute values.
+ (source_footer): Close `td' and `tr' groups.
-2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-11-27 Werner Lemberg <wl@gnu.org>
- [cff] Remove redundant declarations of cff_cmap_XXX_class_rec.
+ Use better way to disable creation of .pyc files for `make refdoc'.
- * src/cff/cffpic.c: The declarations of
- FT_Init_Class_cff_cmap_encoding_class_rec() and
- FT_Init_Class_cff_cmap_unicode_class_rec() are removed.
- They can be obtained by the inclusion of cffcmap.h.
- cffcmap.h invokes FT_DECLARE_CMAP_CLASS() and it declares
- FT_Init_Class_cff_cmap_encoding_class_rec() etc in PIC mode.
+ Python 2.6 was released in 2008...
-2012-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/freetype.mk (refdoc): Use python's `-B' option.
- Fix redundant declaration warning in PIC mode.
+ * builds/detect.mk (std_setup, dos_setup): Mention required python
+ version for `refdoc' target.
- Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were
- designed to declare xxx_pic_{free,init} by themselves.
- Because these macros are used at the end of the module
- interface (e.g. ttdriver.c) and the wrapper source to build
- a module as a single object (e.g. truetype.c) includes
- the PIC file (e.g. ttpic.c) before the module interface,
- these macros are expanded AFTER xxx_pic_{free,init} body
- when the modules are built as single object.
- The declaration after the implementation causes the redundant
- declaration warnings, so the declarations are moved to module
- PIC headers (e.g. ttpic.h). Separating to other header files
- are needed for multi build.
+2014-11-27 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER):
- Remove class_##_pic_free and class_##_pic_init declarations.
- * include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
- FT_DEFINE_MODULE): Ditto.
+ * src/tools/docmaker/sources.py (re_bold, re_italic): Use
+ non-grouping parentheses.
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
+ Updated.
- * src/base/basepic.h: Insert a comment and fix coding style.
- * src/autofit/afpic.h: Declare autofit_module_class_pic_{free,
- init}.
- * src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}.
- * src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free,
- init}.
- * src/psnames/pspic.h: Declare psnames_module_class_pic_{free,
- init}.
- * src/raster/rastpic.h: Declare
- ft_raster{1,5}_renderer_class_pic_{free,init}
- * src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}.
- * src/smooth/ftspic.h: Declare
- ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}.
- * src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
+2014-11-27 Werner Lemberg <wl@gnu.org>
-2012-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
- Make pspic.c to include module error header to fix multi build.
+ Introdruced in previous change. Reported by Alexei.
- * src/psnames/pspic.c: Include `psnamerr.h'.
+2014-11-26 Werner Lemberg <wl@gnu.org>
-2012-01-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/*: Add checks for parameters of API functions where missing.
- [base] Fix a dereference of uninitialized variable in PIC mode.
+ `API functions' are functions tagged with `FT_EXPORT_DEF'.
- * src/base/ftglyph.c (FT_Glyph_To_Bitmap): `glyph' must be
- set before derefering to obtain `library'. The initialization
- of `clazz', `glyph', `library' and NULL pointer check are
- reordered to minimize PIC conditonals.
+ Besides trivial fixes, the following changes are included, too.
-2012-01-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
+ error code if no service is available.
- [base] Insert explicit cast for GCC 4.6 in PIC mode.
+ * src/base/ftinit.c (FT_Done_FreeType): Change return value for
+ invalid `library' parameter to `Invalid_Library_Handle'.
- * src/base/ftinit.c (FT_Add_Default_Modules): Under PIC
- configuration, FT_DEFAULT_MODULES_GET returns
- FT_Module_Class** pointer, GCC 4.6 warns that
- const FT_Module_Class* const* variable is warned as
- inappropriate to store it. To calm it, explicit cast is
- inserted. Also `library' is checked to prevent the NULL
- pointer dereference in FT_DEFAULT_MODULES_GET.
+ * src/base/ftobjs.c (FT_New_Size): Change return value for invalid
+ `asize' parameter to `Invalid_Argument'.
-2012-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftoutln.c (FT_Outline_Copy): Change return value for
+ invalid `source' and `target' parameters to `Invalid_Outline'.
+ (FT_Outline_Done_Internal): Change return value for invalid
+ `outline' parameter to `Invalid_Outline'.
- Fix PIC build broken by d9145241fe378104ba4c12a42534549faacc92e6.
+2014-11-26 Werner Lemberg <wl@gnu.org>
- Under PIC configuration, FT_{CFF,PSCMAPS,SFNT,TT}_SERVICES_GET
- take no arguments but derefer the variable named `library'
- internally.
+ * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'.
- * src/cff/cffdrivr.c (cff_get_interface): Declare `library' and
- set it if non-NULL driver is passed.
- * src/truetype/ttdriver.c (tt_get_interface): Ditto.
+2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/sfnt/sfdriver.c (sfnt_get_interface): Declare `library'
- under PIC configuration, and set it if non-NULL module is given.
- * src/psnames/psmodule.c (psnames_get_interface): Ditto.
+ * src/base/ftobj.c (Mac_Read_POST_Resource): Additional
+ overflow check in the summation of POST fragment lengths,
+ suggested by Mateusz Jurczyk <mjurczyk@google.com>.
-2012-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- Make PIC files include module error headers, to use the error codes
- with per-module prefix.
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
+ and fold too long tracing messages.
- * src/autofit/afpic.c: Include `aferrors.h'.
- * src/cff/cffpic.c: Include `cfferrs.h'.
- * src/pshinter/pshpic.c: Include `pshnterr.h'.
- * src/raster/rastpic.c: Include `rasterrs.h'.
- * src/sfnt/sfntpic.c: Include `sferrors.h'.
- * src/smooth/ftspic.c: Include `ftsmerrs.h'.
- * src/truetype/ttpic.c: Include `tterrors.h'.
+2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2012-01-04 Tobias Ringström <tobias@ringis.se>
+ Fix Savannah bug #43540.
- [truetype] Fix IP instruction if x_ppem != y_ppem.
+ * src/base/ftmac.c (parse_fond): Prevent a buffer overrun
+ caused by a font including too many (> 63) strings to store
+ names[] table.
- * src/truetype/ttinterp.c (Ins_IP): Scale `orus' coordinates
- properly.
+2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2012-01-02 Werner Lemberg <wl@gnu.org>
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
+ variables to read the lengths in POST fragments. Suggested by
+ Mateusz Jurczyk <mjurczyk@google.com>.
- Fix tracing message for `loca' table.
+2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/truetype/ttpload.c (tt_face_get_location): Don't emit a
- warning message if the last `loca' entry references an empty glyph.
+ Fix Savannah bug #43539.
-2011-12-10 Werner Lemberg <wl@gnu.org>
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
+ by a broken POST table in resource-fork.
- Add some variable initializations.
- Reported by Richard COOK <rscook@unicode.org>.
+2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'.
- * src/smooth/ftgrays.c (gray_render_conic): Initialize `levels'
- earlier.
+ Fix Savannah bug #43538.
-2011-12-08 Werner Lemberg <wl@gnu.org>
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
+ by a broken POST table in resource-fork.
- Fix serious scaling bug in `FT_Get_Advances'.
+2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * src/base/ftadvanc.c (FT_Get_Advances): Advance values returned by
- `FT_Load_Glyph' must be simply multiplied by 1024.
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
+ by a broken POST table in resource-fork. Return after freeing
+ the buffered POST table when it is found to be broken.
-2011-12-08 Werner Lemberg <wl@gnu.org>
+2014-11-25 Werner Lemberg <wl@gnu.org>
- * src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing.
+ */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
-2011-12-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-11-25 Werner Lemberg <wl@gnu.org>
- [mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH.
+ */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
- Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON
- was a configurable macro to disable Carbon-dependent code. Because
- now configure script sets DARWIN_NO_CARBON by default and disables
- Darwin & Carbon-dependent codes, these macros can be unified.
- FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON
- (defined by default) is removed, because DARWIN_NO_CARBON violates
- FT_XXX naming convention of public macros, and a macro configured by
- default is not portable for the building without configure (e.g.
- make devel).
+2014-11-25 Werner Lemberg <wl@gnu.org>
- * builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based
- old Mac font support is requested and Carbon is available.
- * builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support
- for Mac OS X without Carbon (e.g. Mac OS X 10.4 for ppc64) is
- requested.
- * include/freetype/config/ftconfig.in: Ditto.
- * builds/vms/ftconfig.h: Ditto.
+ */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
- * src/base/ftbase.h: Remove DARWIN_NO_CARBON.
- * src/base/ftbase.c: Ditto.
- * src/base/ftobjs.c: Ditto.
- * src/base/ftrfork.c: Ditto.
+2014-11-25 Werner Lemberg <wl@gnu.org>
- * src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined
- (same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c).
- * builds/mac/ftmac.c: Ditto.
+ */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
- * builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH.
- * builds/mac/FreeType.m68k_far.make.txt: Ditto.
- * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
- * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
+2014-11-25 Werner Lemberg <wl@gnu.org>
-2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
- Fix Savannah bug #34728 (`make devel' on Mac OS X).
+2014-11-24 Werner Lemberg <wl@gnu.org>
- * builds/toplevel.mk: Check `/dev/null' to identify the Unix-
- like systems without `init' nor `hurd' (e.g. Mac OS X >= 10.4).
- * builds/unix/detect.mk: Ditto.
+ [Savannah bug #43682] Adjust some renderer callbacks.
-2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/raster/ftraster.c (ft_black_set_mode): Change return type to
+ `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
- [apinames] Fix the overflow of signed integer hash.
+ * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
+ for orthogonality.
+ (ft_grays_raster): Use it.
- * src/tools/apinames.c (names_add): Change the type of `h' from
- int to unsigned int, to prevent undefined behaviour in the
- overflow of signed integers (overflow of unsigned int is defined
- to be wrap around). Found by clang test suggested by Sean
- McBride.
+2014-11-25 Werner Lemberg <wl@gnu.org>
-2011-11-30 Werner Lemberg <wl@gnu.org>
+ [Savannah bug #43682] Properly handle missing return errors.
- [winfonts] Remove casts.
+ The functions in this patch *do* return non-trivial errors that must
+ be taken care of.
- * src/winfonts/winfnt.c (winfnt_driver_class): Remove all casts and
- update affected functions.
- (FNT_Size_Select): Fix number of arguments.
+ * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
+ (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
+ src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
+ src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
+ (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
+ (load_truetype_glyph <subglyph loop>, tt_loader_init,
+ TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
+ src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
-2011-11-30 Werner Lemberg <wl@gnu.org>
+2014-11-25 Werner Lemberg <wl@gnu.org>
- [type42] Remove casts.
+ [Savannah bug #43682] Add/remove `void' casts to some functions.
- * src/type42/t42driver.c (t42_driver_class): Remove all casts and
- update affected functions.
+ We use a cast to indicate that we intentionally ignore a function's
+ return value. However, this doesn't apply to API functions where
+ errors can only happen for trivially invalid input.
- * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver
- changes.
+ * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder),
+ src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c
+ (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning),
+ src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
+ (t42_parse_encoding): Do it.
-2011-11-30 Werner Lemberg <wl@gnu.org>
+2014-11-25 Werner Lemberg <wl@gnu.org>
- [type1] Remove casts.
+ [Savannah bug #43682] Change some signatures to `void' return type.
- * src/type1/t1driver.c (t1_driver_class): Remove all casts and
- update affected functions.
+ * include/internal/pshints.h (PSH_Globals_SetScaleFunc),
+ include/internal/sfnt.h (TT_Get_Metrics_Func),
+ src/pshinter/pshglob.c (psh_globals_set_scale),
+ src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
+ (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
+ TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
+ TT_Save_Context): Do it.
- * src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1objs.c:
- Updated for t1driver changes.
- src/type1/t1objs.h (T1_Driver): Remove unused typedef.
- Updated for t1driver changes.
+ * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
+ src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
+ (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
+ (tt_size_run_fpgm, tt_size_run_prep): Updated.
-2011-11-27 Werner Lemberg <wl@gnu.org>
+2014-11-24 Werner Lemberg <wl@gnu.org>
- [bdf] Fix Savannah bug #34896.
+ Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
- ENCODING now covers the whole Unicode range.
+ This is no longer used.
- Note, however, that this change is quite expensive since it
- increases the size of three arrays by almost 400kByte in total. The
- right fix is to replace the logic with something smarter.
- Additionally, there exist very old BDFs for three-byte CCCII
- encoding which exceeds the range of Unicode (another reason to have
- a smarter logic).
+ * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
+ src/sfnt/ttcmap.c: Do it.
- * src/bdf/bdf.h (bdf_font_t): Increase size of `nmod' and `umod'
- arrays.
- * src/bdf/bdflib.c (bdf_parse_t): Increase size of `have' array.
+2014-11-24 Werner Lemberg <wl@gnu.org>
-2011-11-27 Werner Lemberg <wl@gnu.org>
+ [sfnt] Fix Savannah bug #43680.
- [bdf] Improve tracing.
+ This adds an additional constraint to make the fix from 2013-01-25
+ really work.
- * src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros.
- (_bdf_parse_glyphs): Use them.
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
+ Check `p' before `num_glyphs'.
-2011-11-26 Werner Lemberg <wl@gnu.org>
+2014-11-24 Werner Lemberg <wl@gnu.org>
- Improve tracing.
+ [truetype] Fix Savannah bug #43679.
- * src/bdf/bdfdrivr.c (BDF_Face_Done), src/pcf/pcfdrivr.c
- (PCF_Face_Done): Remove tracing message.
+ * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of
+ `record_size'.
- * src/bdf/bdfdrivr.c (BDF_Face_Init), src/cff/cffobjs.c
- (cff_face_init), src/cid/cidobjs.c (cid_face_init),
- src/pfr/pfrobjs.c (pfr_face_init), src/sfnt/sfobjs.c
- (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init),
- src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c
- (T42_Face_Init), src/winfonts/winfnt.c (FNT_Face_Init): Add
- `greeting' message.
+2014-11-24 Jarkko Pöyry <jarkko.poyry@gmail.com>
- * src/sfnt/sfobjs.c (sfnt_open_font), src/type42/t42objs.c
- (T42_Open_Face): Improve tracing.
+ [cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
-2011-11-26 Werner Lemberg <wl@gnu.org>
+ Don't cast cmap init function pointers to an incompatible type.
- [cid] Fix error code.
+ Without this patch, the number of parameters between declaration and
+ the real signature differs. Calling such a function results in
+ undefined behavior.
- * src/cid/cidparse.c (cid_parser_new): Do it.
+ ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
+ 6.5.2.2 Function calls
+ 9 If the function is defined with a type that is not
+ compatible with the type (of the expression) pointed to by
+ the expression that denotes the called function, the
+ behavior is undefined.
-2011-11-26 Werner Lemberg <wl@gnu.org>
+ On certain platforms (c -> js with emscripten) this causes
+ termination of execution or invalid calls because in the emscripten
+ implementation, function pointers of different types are stored in
+ different pointer arrays. Incorrect pointer type here results in
+ indexing of an incorrect array.
- [cff] Fix error code.
+ * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
+ src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
+ t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
+ t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
+ signature.
- * src/cff/cffload.c (cff_font_load): Do it.
+2014-11-24 Werner Lemberg <wl@gnu.org>
-2011-11-26 Werner Lemberg <wl@gnu.org>
+ [sfnt] Fix Savannah bug #43672.
- Add new error code FT_Err_Missing_Module.
+ * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
+ minimum table length test.
- Previously, FreeType misleadingly returned
- FT_Err_Unknown_File_Format if a module was missing (or a test was
- missing completely).
+2014-11-24 Werner Lemberg <wl@gnu.org>
- * include/freetype/fterrdef.h (FT_Err_Missing_Module): Define.
+ [type1, type42] Another fix for Savannah bug #43655.
- * src/cff/cffobjs.c (cff_face_init), src/cff/cffdrivr.c
- (cff_get_glyph_name), src/cid/cidobjs.c (cid_face_init),
- src/sfnt/sfobjs.c (sfnt_init_face), src/truetype/ttobjs.c
- (tt_face_init), src/type1/t1objs.c (T1_Face_Init),
- src/type42/t42objs.c (T42_Face_Init, T42_Driver_Init): Updated.
+ * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
+ (t42_parse_charstrings): Add another boundary testing.
- * src/type1/t1afm.c (T1_Read_Metrics), src/type/t1objs.c
- (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Remove now
- redundant test for `psaux'.
+2014-11-24 Werner Lemberg <wl@gnu.org>
-2011-11-25 Werner Lemberg <wl@gnu.org>
+ [docmaker] Formatting, copyright, improved documentation.
- [bdf] Add more error messages.
+ * src/tools/docmaker/*: No code changes besides trivial
+ modifications.
- * src/bdf/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
- Add line number argument.
- Update all callers.
- (ERRMSG5, ERRMSG6, ERRMSG7, ERRMSG8, ERRMSG9): New macros.
- (_bdf_readstream, _bdf_set_default_spacing, _bdf_add_property,
- _bdf_parse_glyphs, _bdf_parse_start): Add error messages.
+2014-11-22 Werner Lemberg <wl@gnu.org>
-2011-11-24 Werner Lemberg <wl@gnu.org>
+ [bdf] Fix Savannah bug #43660.
- * include/freetype/fterrors.h: Remove dead code.
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
+ `_BDF_GLYPH_BITS'.
-2011-11-15 Werner Lemberg <wl@gnu.org>
+2014-11-22 Werner Lemberg <wl@gnu.org>
- * docs/releases: Updated.
+ [type42] Allow only embedded TrueType fonts.
-2011-11-15 Werner Lemberg <wl@gnu.org>
+ This is a follow-up to Savannah bug #43659.
- * Version 2.4.8 released.
- =========================
+ * src/type42/t42objs.c (T42_Face_Init): Exclusively use the
+ `truetype' font driver for loading the font contained in the `sfnts'
+ array.
+2014-11-22 Werner Lemberg <wl@gnu.org>
- Tag sources with `VER-2-4-8'.
+ [type42] Fix Savannah bug #43659.
- * docs/CHANGES: Updated.
+ * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.4.8.
+ * src/type42/t42parse.c (t42_parse_sfnts): Always set
+ `face->ttf_size' directly. This ensures a correct stream size in
+ the call to `FT_Open_Face', which follows after parsing, even for
+ buggy input data.
+ Fix error messages.
- * 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.7/2.4.8/, s/247/248/.
+2014-11-22 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix Savannah bug #43658.
+
+ * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle
+ return values of point allocation routines.
+
+2014-11-22 Werner Lemberg <wl@gnu.org>
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
+ [sfnt] Fix Savannah bug #43656.
- * builds/unix/configure.raw (version_info): Set to 14:0:8.
+ * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
+ tests.
-2011-11-13 Chris Liddell <chris.liddell@artifex.com>
+2014-11-21 Werner Lemberg <wl@gnu.org>
- Add FT_Get_PS_Font_Value() API.
+ [type1, type42] Fix Savannah bug #43655.
- This allows a Type 1 font face to be interrogated to retrieve most
- of the dictionary keys (keys not relevant to FreeType's Type 1
- interpreter are not available).
+ * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
+ (t42_parse_charstrings): Fix boundary testing.
- * include/freetype/internal/services/svpsinfo.h
- (PS_GetFontValueFunc): New typedef.
- (PSInfo): Add `ps_get_font_value'.
- (FT_DEFINE_SERVICE_PSINFOREC): Updated.
+2014-11-21 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/t1types.h (T1_EncodingType): Moved to...
- * include/freetype/t1tables.h: Here.
- (PS_Dict_Keys): New enumeration.
- (FT_Get_PS_Font_Value): New declaration.
+ * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics.
- * src/base/fttype1.c (FT_Get_PS_Font_Value): New function.
+2014-11-21 Werner Lemberg <wl@gnu.org>
- * src/type1/t1driver.c (t1_ps_get_font_value): This new function
- does the real job.
- (t1_service_ps_info): Add it.
+ [ftlcdfil] Obey flow direction.
- * src/cff/cffdrivr.c (cff_service_ps_info), src/cid/cidriver.c
- (cid_service_ps_info), src/type42/t42drivr.c (t42_service_ps_info):
+ * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
+ Handle `up' flow.
+
+2014-11-21 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.
+
+ This commit completes argument checks and adds support for different
+ flow directions.
+
+2014-11-21 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve.
+
+ This commit adds argument checks and support for different flow
+ directions.
+
+2014-11-20 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
+
+2014-11-19 Werner Lemberg <wl@gnu.org>
+
+ Change some fields in `FT_Bitmap' to unsigned type.
+
+ This doesn't break ABI.
+
+ * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
+ `pixel_mode', and `palette_mode' unsigned types.
+
+ * src/base/ftbitmap.c: Updated.
+ (FT_Bitmap_Copy): Fix casts.
+
+ * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
Updated.
-2011-11-08 Braden Thomas <bthomas@apple.com>
+2014-11-19 Werner Lemberg <wl@gnu.org>
- [cid] Various loading fixes.
+ Make `FT_Bitmap_Convert' correctly handle negative `pitch' values.
- * src/cid/cidload.c (cid_load_keyword) <default>,
- (parse_font_matrix, parse_expansion_factor): Correctly check number
- of dictionaries.
- (cid_read_subrs): Protect against invalid values of `num_subrs'.
- Assure that the elements of the `offsets' array are ascending.
+ * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value
+ for the pitch while copying data.
+ Correctly set pitch sign in target bitmap.
-2011-11-05 Werner Lemberg <wl@gnu.org>
+2014-11-19 Werner Lemberg <wl@gnu.org>
- * README: We use copyright ranges also.
+ Minor code improvement in `FT_Bitmap_Embolden'.
- According to
+ * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
+ Fix thinko.
- http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
+2014-11-19 Alexei Podtelezhnikov <apodtele@gmail.com>
- this should be mentioned explicitly.
+ * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
-2011-10-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-11-19 Behdad Esfahbod <behdad@behdad.org>
- [raccess] Supplement for previous fix.
+ Avoid compiler warnings on x86-64 for `FT_MulFix'.
- * src/base/ftbase.h (raccess_rule_by_darwin_vfs): Do not declare
- it on native Mac OS X.
- * src/base/ftrfork.c (raccess_get_rule_type_from_rule_index):
- Hide raccess_get_rule_type_from_rule_index() on native Mac OS X
- too.
+ `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
+ but several inline implementations of it in `ftcalc.h' take
+ `FT_Int32' arguments. This is causing compiler warnings on x86-64:
+ If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
+ inline implementation of this function, integer values are truncated
+ from 64bit to 32bit.
-2011-10-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
+ casts.
- [raccess] Hide raccess_rule_by_darwin_vfs() on native Mac OS X.
+2014-11-15 Werner Lemberg <wl@gnu.org>
- * src/base/ftrfork.c (raccess_rule_by_darwin_vfs): Do not
- compile on native Mac OS X because it is not used.
+ [sfnt] Fix Savannah bug #43597.
-2011-10-25 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
+ bitmaps.
- [truetype] Fix MD instruction for twilight zone.
+2014-11-12 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (Ins_MD): Without this fix, the MD
- instruction applied to original coordinates of twilight points
- always returns zero.
+ [sfnt] Fix Savannah bug #43591.
-2011-10-18 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
+ and multiplication overflow.
- * Version 2.4.7 released.
- =========================
+2014-11-12 Werner Lemberg <wl@gnu.org>
+ [sfnt] Fix Savannah bug #43590.
- Tag sources with `VER-2-4-7'.
+ * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
+ Protect against addition overflow.
- * docs/CHANGES: Updated.
+2014-11-12 Werner Lemberg <wl@gnu.org>
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.4.7.
+ [sfnt] Fix Savannah bug #43589.
- * 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.6/2.4.7/, s/246/247/.
+ * src/sfnt/sfobjs.c (woff_open_font): Protect against addition
+ overflow.
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
+2014-11-12 Werner Lemberg <wl@gnu.org>
- * builds/unix/configure.raw (version_info): Set to 13:2:7.
+ [sfnt] Fix Savannah bug #43588.
-2011-10-15 Kal Conley <kcconley@gmail.com>
+ * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
+ tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
+ against overflow in additions and multiplications.
- Fix handling of transformations if no renderer is present.
+2014-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/base/ftobjs.c (FT_Load_Glyph): Thinko.
+ [base] CORDIC improvements.
-2011-10-15 Kal Conley <kcconley@gmail.com>
+ The scaling between the hypotenuse and its CORDIC approximation is
+ based on regression analysis. The smaller padding for `theta' is
+ justifed by its maximum error of less than 6.
- Fix conditions for autohinting.
+ * src/base/fttrigon.c (ft_trig_downscale): Borrow code from
+ ./ftcalc.c (ft_multo64), change linear intercept.
+ (ft_trig_pseudo_polarize): Decrease `theta' padding.
- * src/base/ftobjs.c (FT_Load_Glyph): Handle
- FT_LOAD_IGNORE_TRANSFORM.
+2014-11-09 Werner Lemberg <wl@gnu.org>
-2011-10-07 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections.
- [gxvalid] Fix a bug to detect too large offset in morx table.
+ One more place to check whether `radius' is zero.
- * src/gxvalid/gxvmorx2.c
- (gxv_morx_subtable_type2_ligActionIndex_validate): Fix a bug
- that too large positive offset cannot be detected.
+ Problem reported by Marco Wertz <marco.wertz@gmx.de>.
-2011-10-01 Braden Thomas <bthomas@apple.com>
+2014-11-07 Werner Lemberg <wl@gnu.org>
- Handle some border cases.
+ [bdf] Fix Savannah bug #43535.
- * include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro.
+ * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one
+ character more than `strncmp'.
+ s/ft_strncmp/_bdf_strncmp/ everywhere.
- * src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid
- value of `target->rows'.
+2014-11-06 Werner Lemberg <wl@gnu.org>
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for
- flex start.
+ [pcf] Fix Savannah bug #43548.
- * src/raster/ftrend1.c (ft_raster1_render): Check `width' and
- `height'.
+ * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row
+ and column values.
- * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against
- invalid values in `localpoints' array.
+2014-11-06 Werner Lemberg <wl@gnu.org>
-2011-10-01 Werner Lemberg <wl@gnu.org>
+ [pcf] Fix Savannah bug #43547.
- [psnames] Handle zapfdingbats.
- Problem reported by Nicolas Rougier <Nicolas.Rougier@inria.fr>.
+ * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset'
+ values.
- * src/tools/glnames.py (adobe_glyph_list): Add data from AGL's
- `zapfdingbats.txt' file.
+2014-11-06 Werner Lemberg <wl@gnu.org>
- * src/psnames/pstables.h: Regenerated.
+ * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak.
-2011-09-27 Simon Bünzli <zeniko@gmail.com>
+2014-11-03 Infinality <infinality@infinality.net>
- Fix Savannah bug #34189.
+ * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated.
- * src/type1/t1load.c (T1_Open_Face): Initialize
- `face->len_buildchar'.
+ The previous commit deteriorates rendering of DejaVu and similar
+ fonts; this gets compensated with this rule.
-2011-09-26 Werner Lemberg <wl@gnu.org>
+2014-11-03 Werner Lemberg <wl@gnu.org>
- [cff] Dump SIDs while tracing.
+ * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting.
- * src/cff/cffobjs.c (cff_face_init): Do it.
+ Before this patch, it was impossible to ever call DELTAP[123] in
+ subpixel hinting mode as described in the ClearType whitepaper; it
+ only worked if in `compatibility mode'. However, compatibility mode
+ essentially disables SHPIX, completely ruining hinting of
+ ttfautohint output, for example.
- * src/cff/cffparse.c (cff_parser_run) [FT_DEBUG_LEVEL_TRACE]
- <cff_kind_string>: Identify as SID.
+ We now follow the whitepaper more closely so that DELTAP[123]
+ instructions for touched points in the non-subpixel direction are
+ executed.
-2011-09-17 Werner Lemberg <wl@gnu.org>
+2014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
- Remove unused FT_ALIGNMENT macro.
+ [smooth] Improve code readability.
- * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
- include/freetype/config/ftconfig.h: Do it.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
-2011-09-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+2014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
- [smooth] Slightly optimize conic and cubic flatterners.
+ [smooth] Reduce outline translations during rendering.
- * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
- out some code from the main loop to speed it up.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
+ virtually by modifying cbox, actually translate outline if cumulative
+ shift is not zero.
-2011-09-11 Tomas Hoger <thoger@redhat.com>
+2014-10-30 Alexei Podtelezhnikov <apodtele@gmail.com>
- Slightly improve LZW_CLEAR handling.
+ [smooth] Fix Savannah bug #35604 (cont'd).
- * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_CODE>:
- Ensure that subsequent (modulo garbage byte(s)) LZW_CLEAR codes are
- handled as clear codes. This also re-sets old_code and old_char to
- predictable values, which is a little better than using `random'
- ones if the code following LZW_CLEAR is invalid.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
+ casts that became unnecessary after the variable type upgrades.
-2011-09-11 Tomas Hoger <thoger@redhat.com>
+2014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
- Add explicit LZW decompression stack size limit.
+ [smooth] Improve code readability.
- Stack larger than 1<<LZW_MAX_BITS is never needed if prefix table is
- constructed correctly. It's even less than that, see e.g.
- libarchive code comment for a better size upper bound:
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
- http://code.google.com/p/libarchive/source/browse/trunk/libarchive/archive_read_support_filter_compress.c?r=3635#121
+2014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
- This patch adds explicit stack size limit, enforced when stack is
- realloced.
+ Unify hypotenuse approximations.
- An alternative is to ensure that code < state->prefix[code - 256]
- when traversing prefix table. Such check is less efficient and
- should not be required if prefix table is constructed correctly in
- the first place.
+ * include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
+ * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
+ * src/smooth/ftgrays.c (gray_render_cubic): Use it here.
- * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Implement it.
+2014-10-25 Werner Lemberg <wl@gnu.org>
-2011-09-11 Tomas Hoger <thoger@redhat.com>
+ [cff] Test valid darkening parameter macros in `ftoption.h'.
- Protect against loops in the prefix table.
+ We no longer need an otherwise unused typedef that can cause a gcc
+ warning.
+ Problem reported by Alexei.
- LZW decompressor did not sufficiently check codes read from the
- input LZW stream. A specially-crafted or corrupted input could
- create a loop in the prefix table, which leads to memory usage
- spikes, as there's no decompression stack size limit.
+ * src/cff/cffobjs.c (cff_driver_init): Use
+ `CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly.
+ (SET_DARKENING_PARAMETERS): Removed.
+ Compile time tests are now ...
- * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_START>: First
- code in valid LZW stream must be 0..255.
- <FT_LZW_PHASE_CODE>: In the special KwKwK case, code == free_ent,
- code > free_ent is invalid.
+ * devel/ftoption.h, include/config/ftoption.h: ... here.
-2011-09-09 Werner Lemberg <wl@gnu.org>
+2014-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
- Better tracing of metrics.
+ Improve flat corner definition.
- * src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with
- FT_TRACE.
+ * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean
+ distance with the alpha max plus beta min algorithm.
+ * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab
+ metric.
-2011-09-07 Werner Lemberg <wl@gnu.org>
+2014-10-23 David Weiß <David.Weiss@ptvgroup.com>
- Fix Savannah bug #33816.
+ [build] Improve property file for vc2010.
- * src/cff/cfftypes.h (CFF_FontRecDictRec): New member
- `has_font_matrix'.
- * src/cff/cffparse.c (cff_parse_font_matrix): Set it.
- Update tracing output.
- * src/cff/cffobjs.c (cff_face_init): Use it so that the heuristics
- can be removed.
+ User-defined properties should be empty by default to prevent linker
+ failures.
-2011-08-30 Werner Lemberg <wl@gnu.org>
+ * builds/windows/vc2010/freetype.user.props,
+ builds/windows/vc2010/freetype.vcxproj:
+ s/OptionsDirectory/UserOptionDirectory/.
+ Comment out all user options.
- Better tracing of metrics.
+2014-10-23 Werner Lemberg <wl@gnu.org>
- * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics):
- Decorate with FT_TRACE.
+ [cff] Work around bug in preprocessor of MSVC 2010.
-2011-08-25 Werner Lemberg <wl@gnu.org>
+ We have been hit by
- [cff] Better tracing of the parsing process.
+ https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr
- * src/cff/cffload.c (cff_subfont_load, cff_font_load): Decorate with
- FT_TRACE.
+ * devel/ftoption.h, include/config/ftoption.h: Replace
+ `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros
+ `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'.
- * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
- cff_parse_private_dict, cff_parse_cid_ros): Updated.
- (CFF_FIELD_NUM, CFF_FIELD_FIXED, CFF_FIELD_FIXED_1000,
- CFF_FIELD_STRING, CFF_FIELD_BOOL, CFF_FIELD_CALLBACK, CFF_FIELD,
- CFF_FIELD_DELTA): Add argument for ID.
- (cff_parser_run): Decorate with FT_TRACE.
+ * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no
+ longer need double expansion.
+ (SET_DARKENING_PARAMETERS_0): Renamed to ...
+ (SET_DARKENING_PARAMETERS): ... this.
+ Update call.
- * src/cff/cffparse.h (CFF_Field_Handler) [FT_DEBUG_LEVEL_TRACE]: Add
- `id' member.
+2014-10-20 Werner Lemberg <wl@gnu.org>
- * src/cff/cfftoken.h: Add IDs to all fields.
+ [sbit] Minor fixes.
-2011-08-16 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
+ Accept overlay format also, but emit warning message in that case.
+ (tt_sbit_decoder_load_metrics): Add missing newline to error
+ message.
+ (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
+ 7.1) to the list of unsupported formats.
- Fix Savannah bug #34022.
+2014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
- * README, docs/INSTALL: Remove references to UPGRADE.UNIX.
+ [truetype] Clean up bytecode rounding.
-2011-08-15 Werner Lemberg <wl@gnu.org>
+ Zero distance does not have to be treated specially if you follow
+ specifications and check the sign as the very last step of rounding.
- Fix Savannah bug #34018.
+ * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
+ Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use
+ macros when available, do not check for non-zero distance.
+ (Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase
+ if sign changed.
- * docs/UPGRADE.UNIX: Removed. Obsolete.
+2014-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
-2011-08-15 David Bevan <david.bevan@pb.com>
+ [truetype] Unwrap engine compensation settings.
- Fix Savannah bug #33992.
+ * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated.
- * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix border case.
+2014-10-18 David Weiß <David.Weiss@ptvgroup.com>
-2011-08-12 Werner Lemberg <wl@gnu.org
+ [build] Add property file to vc2010 project.
- [truetype] Fix degenerate case in S{P,F,DP}VTL opcodes.
+ This simplifies custom build configurations, especially for
+ automated build environments.
- * src/truetype/ttinterp.c (Ins_SxVTL): Handle p1 == p2 specially.
- (Ins_SDPVTL): Handle v1 == v2 specially.
+ * builds/windows/vc2010/freetype.user.props: New configuration file.
-2011-08-09 Werner Lemberg <wl@gnu.org>
+ * builds/windows/vc2010/freetype.vcxproj: Include
+ `freetype.user.props' and use its data fields.
- Fix Savannah bug #33975.
+ * builds/windows/vc2010/index.html: Updated.
- * src/cff/cffparse.c (cff_parse_font_matrix): Fix typo.
+2014-10-18 Werner Lemberg <wl@gnu.org>
-2011-07-29 Werner Lemberg <wl@gnu.org>
+ [autofit] Add blue-zone support for Telugu.
- * Version 2.4.6 released.
- =========================
+ This essentially moves the Telugu script from the `Indic' hinter to
+ the `Latin' hinter.
+ Note that this is a first shot and quite certainly needs
+ refinements.
- Tag sources with `VER-2-4-6'.
+ * src/autofit/afblue.dat: Add blue zone data for Telugu.
- * docs/CHANGES: Updated.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.4.6.
+ * src/autofit/afscript.h: Add Telugu standard characters and move
+ data out of AF_CONFIG_OPTION_INDIC block.
- * 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.5/2.4.6/, s/245/246/.
+ * src/autofit/afranges.c: Move Telugu data out of
+ AF_CONFIG_OPTION_INDIC block.
+
+ * src/autofit/afstyles.h: Update Telugu data; in particular, use
+ AF_WRITING_SYSTEM_LATIN.
+
+2014-10-18 David Wimsey <david@wimsey.us>
+
+ [cmake] Add iOS build support.
+ From Savannah patch #8497.
+
+ * builds/cmake/iOS.cmake: New file. Universal binaries are built
+ with both 32 and 64 bit arm architectures.
+
+ * CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS
+ toolchain. Possible values are `OS' to build on iOS, or
+ `SIMULATOR' to build on APPLE.
+
+2014-10-16 Behdad Esfahbod <behdad@behdad.org>
+ Werner Lemberg <wl@gnu.org>
+
+ [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro.
+
+ * devel/ftoption.h, include/config/ftoption.h
+ (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro.
+
+ * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS,
+ SET_DARKENING_PARAMETERS_0): New macros.
+ (cff_driver_init): Use new macros.
+
+2014-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [truetype] Limit delta shift range.
+
+ The valid range for delta shift is zero through six. Negative values
+ are invalid according to
+
+ https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift
+
+ * src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned.
+ * src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift'
+ is out of range.
+ (Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'.
+
+2014-10-16 Werner Lemberg <wl@gnu.org>
+
+ A better fix for Savannah bug #43392.
+ Suggested by Doug Felt <dougfelt@gmail.com>.
+
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
+ `vertAdvance' to zero...
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
+ value for `vertAdvance' based on `linearVertAdvance' in case
+ `vertAdvance' is zero. Note that the previous computed ad-hoc value
+ for `linearVertAdvance' was apparently not tested in a real-life
+ situation.
+
+2014-10-14 David Weiß <David.Weiss@ptvgroup.com>
+
+ [build] Better optimization settings for vc2010 solution file.
+
+ * builds/windows/vc2010/freetype.sln,
+ builds/windows/vc2010/freetype.vcxproj: Updated.
+
+2014-10-14 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Adjust Devenagari character range.
+
+ * src/autofit/afranges.c (af_deva_uniranges): Omit characters that
+ are common to all other Indic scripts.
+
+2014-10-12 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix Savannah bug #43392.
+
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
+ vertical metrics uninitialized.
+
+2014-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Small bbox correction.
+
+ * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
+ instead of initial point that could be `off' in conic outlines.
+
+2014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Fix Savannah bug #43356.
+
+ * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
+ of implicit `to'.
+ (BBox_Line_To): New emitter that does not update bbox.
+
+2014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Introduce and use new macro `FT_UPDATE_BBOX'
+
+ * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
+ (FT_Outline_Get_BBox): Use it here.
+
+2014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Significant optimization of `ft_div64by32'
+
+ We shift as many bits as we can into the high register, perform
+ 32-bit division with modulo there, then work through the remaining
+ bits with long division. This optimization is especially noticeable
+ for smaller dividends that barely use the high register.
+
+ * src/base/ftcalc.c (ft_div64by32): Updated.
+
+2014-10-02 Dave Arnold <darnold@adobe.com>
+
+ [cff] Fix Savannah bug #43271.
+
+ * src/cff/cf2font.c (cf2_computeDarkening): Change overflow
+ detection to use logarithms and clamp `scaledStem'.
+
+2014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/ftcalc.c: Remove miscellaneous type casts.
+
+2014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Use more common `FT_MSB' implementation with masks.
+
+ * src/base/ftcalc.c (FT_MSB): Updated.
+
+2014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Clean up.
+
+ * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used
+ code.
+
+2014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Avoid unnecessary long division.
+
+ This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
+ lack thereof are predicted accurately.
+
+ * src/base/ftcalc.c (ft_div64by32): Improve readability.
+ (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
+ when multiplication stayed within 32 bits.
+
+2014-09-24 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Minor clean-ups.
+
+ * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_points,
+ af_glyph_hints_align_strong_points): Updated.
+
+ * src/autofit/aflatin.c (af_latin_hints_link_segments,
+ af_latin_hints_compute_segments), src/autofit/afcjk.c
+ (af_cjk_hints_link_segments), src/autofit/aflatin2.c
+ (af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
+ There are no longer fake segments since more than 10 years...
+
+2014-09-22 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Minor code streamlining.
+
+ * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
+ initialization.
+
+2014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/ftcalc.c: Harmonize code.
+
+2014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Tighten the overflow check in `FT_MulDiv'.
+
+ * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
+
+2014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Fix Savannah bug #43153.
+
+ * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
+ overflow in `divider'.
+
+2014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Tighten the overflow check in `FT_DivFix'.
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
+ This fixes a 13-year old bug. The original overflow check should have
+ been updated when rounding was introduced into this function
+ (c2cd00443b).
- * builds/unix/configure.raw (version_info): Set to 13:1:7.
+ * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
+ * include/freetype.h (FT_DivFix): Updated documentation.
-2011-07-29 Werner Lemberg <wl@gnu.org>
+2014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
- [cff] Add some more tracing infos.
+ [base] Tighten the overflow check in `FT_MulFix'.
- * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
- cff_parse_cid_ros): Add tracing.
+ * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
-2011-07-22 Dirk Müller <dmueller@suse.de>
+2014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
- [psaux, type1] Fix null pointer dereferences.
+ [truetype] Shortcut ppem calculations for square pixels.
- Found with font fuzzying.
+ * src/truetype/ttinterp.h (TT_ExecContextRec): New field
+ `cur_ppem_func' with a function pointer.
+ * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
+ depending on the pixel geometry to either...
+ (Current_Ppem_Stretched): ... this for stretched pixels.
+ (Current_Ppem): ... or this for square pixels.
+ (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Check
- `decoder->buildchar'.
+2014-08-31 Behdad Esfahbod <behdad@behdad.org>
- * src/type1/t1load.c (t1_load_keyword): Check `blend->num_designs'.
+ Don't use `register' keyword. Fixes compiler warnings.
-2011-07-20 Chris Morgan <cmorgan@cybexintl.com>
+ * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
+ * src/gzip/inftrees.c (huft_build): Ditto.
+ * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
- Add FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT.
+2014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com>
- Useful for embedded systems which don't need file stream support.
+ [truetype] Optimize DELTAP and DELTAC.
- * src/base/ftsystem.c, src/base/ftobjs.c (FT_Stream_New): Implement
+ * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
+ calculations outside of the loop.
+
+2014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Fix Savannah bug #43033.
+
+ * include/config/ftconfig.h, builds/unix/ftconfig.in,
+ builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
+ 64-bit type is `long'.
+
+2014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Small optimization of `FT_MulFix'.
+
+ * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
+ 32-bit calculations.
+
+2014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Use unsigned calculation in `FT_MulDiv'.
+
+ * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
+
+2014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Remove truncation in `FT_DivFix'.
+
+ * src/base/ftcalc.c (FT_DivFix): Updated.
+
+2014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Minor refactoring.
+
+ * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
+
+2014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Turn FT_MSB into a macro when using gcc builtins.
+
+ * src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
+
+2014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
+
+ * src/base/ftbbox.c (BBox_Cubic_Check): Update.
+ (update_cubic_max): Repalce with...
+ (cubic_peak): ... this, which now handles upscaling.
+
+2014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Handle collapsed outlines to avoid undefined FT_MSB.
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
+
+2014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Restore FT_MulFix inlining.
+
+ * include/freetype.h (FT_MulFix): Unconditionally defined.
+
+ * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
+
+ * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
+ which conditionally replaces the function with an inline version
+ through the macro.
+
+2014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
+
+2014-07-26 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix typo.
+
+ * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
+ offsets in third quadrant.
+
+ Reported by maks <maksqwe1@ukr.net>.
+
+2014-07-17 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #42788.
+
+ * src/pfr/pfrobjs.c: Include `ftcalc.h'.
+
+2014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Replace `ft_highpow2' function.
+
+ * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
+ `ft_highpow2'.
+
+ * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
it.
-2011-07-20 Elton Chung <elton328@gmail.com>
+2014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/base/ftpatent.c (FT_Face_SetUnpatentedHinting): Fix typo.
+ * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
-2011-07-16 Steven Chu <steven.f.chu@gmail.com>
+2014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
- [truetype] Fix metrics on size request for scalable fonts.
+ [base] Move assembler code back in the source file.
- * src/truetype/ttdriver.c (tt_size_request): Fix copying metrics
- from TT_Size to FT_Size if scalable font.
+ FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b.
- See
+ * include/config/ftconfig.h, builds/unix/ftconfig.in,
+ builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
- http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html
+ * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
- for some comparison images.
+2014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com>
-2011-07-14 Matthias Drochner <M.Drochner@fz-juelich.de>.
+ [base] Further clean up color bitmap conversion.
- [psaux] Fix potential sign extension problems.
+ * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
+ using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
- When shifting right a signed value, it is not defined by the
- C standard whether one gets a sign extension or not. Use a macro to
- do an explicit cast from a signed short (assuming that this is
- 16bit) to an int.
+2014-07-13 Werner Lemberg <wl@gnu.org>
- * src/psaux/t1decode.c (Fix2Int): New macro.
- Use it where appropriate.
+ [truetype] Improve handling of buggy `prep' tables.
-2011-07-14 Werner Lemberg <wl@gnu.org>
+ In case of an error in the `prep' table, no longer try to execute it
+ again and again. This makes FreeType handle endless loops in buggy
+ fonts much faster.
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
- <op_callothersubr>: Better handling of subroutine index 0.
- From Matthias Drochner <M.Drochner@fz-juelich.de>.
+ * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
+ and `cvt_ready' are now negative if not initialized yet, otherwise
+ they indicate the error code of the last run.
-2011-07-10 ÐлекÑей Подтележников <apodtele@gmail.com>
+ * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
+ tt_size_done_bytecode, tt_size_init_bytecode,
+ tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
+ Updated.
- [psaux] Optimize previous commit.
+ * src/truetype/ttgload.c (tt_loader_init): Updated.
+ * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
+ and `prep' only if we are in the `glyf' table.
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
- <op_callothersubr>: Move error check down to avoid testing twice for
- good cases.
+2014-07-12 Werner Lemberg <wl@gnu.org>
-2011-07-08 Werner Lemberg <wl@gnu.org>
+ * builds/vms/ftconfig.h: Synchronize.
+ Problem reported by Alexei.
- [psaux] Add better argument check for `callothersubr'.
+2014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
- <op_callothersubr>: Reject negative arguments.
+ [base] Clean up bitmap conversion.
-2011-07-07 Werner Lemberg <wl@gnu.org>
+ * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
+ appropriate FT_DivFix and remove superfluous upscaling.
- [sfnt] Try harder to find non-zero values for ascender and descender.
+2014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/sfnt/sfobjs.c (sfnt_load_face): Consult `OS/2' table in case
- the `hhea' table's values are zero.
+ [base] Small optimization of the ancient code.
-2011-07-03 Werner Lemberg <wl@gnu.org>
+ * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
+ condition for direct 32-bit calculations.
- Fix previous commit.
+2014-06-27 Werner Lemberg <wl@gnu.org>
- We want to unset FT_FACE_FLAG_SCALABLE only if there are bitmap
- strikes in the font.
+ Fix Apple standard glyph names.
- * src/truetype/ttobjs.c (tt_face_init): Implement it.
+ * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
+ `tools/glnames.py'
- * docs/CHANGES: Updated.
+ Problem reported by Adam Twardoch <adam@fontlab.com>.
-2011-07-02 Just Fill Bugs <mozbugbox@yahoo.com.au>
+2014-06-17 Werner Lemberg <wl@gnu.org>
- Fix Savannah bug #33246.
+ Partially revert commit from 2014-06-13.
- * src/truetype/ttobjs.c (tt_check_single_notdef): New function.
- (tt_face_init): Use it to test FT_FACE_FLAG_SCALABLE.
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
+ declaration of `p_first' and `p_last' out of the loop.
-2011-07-02 Werner Lemberg <wl@gnu.org>
+2014-06-17 Werner Lemberg <wl@gnu.org>
- * docs/CHANGES: Updated.
+ * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
-2011-07-02 David Bevan <david.bevan@pb.com>
+ This simplifies cross-compiling.
- [ftstroke] Major revision.
+2014-06-13 Werner Lemberg <wl@gnu.org>
- The main problems
- -----------------
+ Fix more compiler warnings.
+ Reported by Wojciech Mamrak <wmamrak@gmail.com>.
- o If FT_STROKER_LINEJOIN_BEVEL was specified, unlimited miter
- joins (not bevel joins) were generated. Indeed, the meanings of
- `miter' and `bevel' were incorrectly reversed (consistently) in
- both the code and comments.
+ * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
+ Make integer constant unsigned.
- o The way bevel joins were constructed (whether specified
- explicitly, or created as a result of exceeding the miter limit)
- did not match what is required for stroked text in PostScript or
- PDF.
+ * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
+ <TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
+ (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
+ casts.
- The main fixes
- --------------
+2014-06-13 Werner Lemberg <wl@gnu.org>
- o The behaviour of FT_STROKER_LINEJOIN_BEVEL has been corrected.
+ Fix compiler warnings.
+ Reported by Wojciech Mamrak <wmamrak@gmail.com>.
- o A new line join style, FT_STROKER_LINEJOIN_MITER_FIXED, has been
- introduced to support PostScript and PDF miter joins.
+ * src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
+ src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
+ `unsigned' issues.
- o FT_STROKER_LINEJOIN_MITER_VARIABLE has been introduced as an
- alias for FT_STROKER_LINEJOIN_MITER.
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
+ happy.
- Additionally, a variety of stroking errors have been fixed. These
- would cause various artifacts (including points `at infinity'),
- especially when stroking poor quality fonts.
+ * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
+ for `fir'.
+ Fix `signed' vs. `unsigned' issues.
- See
+ * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
+ (WRITE_USHORT, WRITE_ULONG): Add proper casts.
- http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html
+ * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
- for example documents. The FreeType stroker now produces results
- very similar to that produced by GhostScript and Distiller for these
- fonts.
+ * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
+ and `B2'.
- Other problems
- --------------
+2014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com>
- The following problems have been resolved:
+ [cmake] Add option to build OS X framework.
- o Inside corners could be generated incorrectly. Intersecting the
- inside corner could cause a missing triangular area and other
- effects.
+ * CMakeLists.txt: Update accordingly.
- The intersection point can only be used if the join is between
- two lines and both lines are long enough. The `optimization'
- condition in `ft_stroker_inside' has been corrected; this
- requires the line length to be passed into various functions and
- stored in `FT_StrokerRec'.
+ * builds/mac/freetype-Info.plist: New file.
- o Incorrect cubic curves could be generated. The angle
- calculations in `FT_Stroker_CubicTo' have been corrected to
- handle the case of the curve crossing the +/-PI direction.
+2014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com>
- o If the border radius was greater than the radius of curvature of
- a curve, then the negative sector would end up outside (not
- inside) the border. This situation is now recognized and the
- negative sector is circumnavigated in the opposite direction.
- (If round line joins are being used, this code is disabled
- because the line join will always cover the negative sector.)
+ * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'.
- o When a curve is split, the arcs may not join smoothly (especially
- if the curve turns sharply back on itself). Changes in
- direction between adjacent arcs were not handled. A round
- corner is now added if the deviation from one arc to the next is
- greater than a suitable threshold.
+2014-05-11 Werner Lemberg <wl@gnu.org>
- o The current direction wasn't retained if a the outline contained
- a zero length lineto or a curve that was determined to be
- `basically a point'. This could cause a spurious join to be
- added.
+ [autofit] Fix variable initializations.
- o Cubics with close control points could be mishandled. All eight
- cases are now distinguished correctly.
+ * src/autofit/afhints.c (af_glyph_hints_reload): Assign default
+ values to `in_dir' and `out_dir' for all points.
- Other improvements
- ------------------
+2014-05-11 Werner Lemberg <wl@gnu.org>
- o Borders for cubic curves could be too `flat'.
- FT_SMALL_CUBIC_THRESHOLD has been reduced a little to prevent
- this.
+ [autofit] Fix crash with font `CabinSketch-Bold.ttf'.
- o The handling and use of movable points has been simplified a
- little.
+ Problem reported by Ralf S. Engelschall <rse@engelschall.com>.
- o Various values are now computed only if the results are actually
- needed.
+ * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for
+ finding first non-near point.
+ Properly initialize non-near point deltas.
- o The directions of the outer and inner borders have been swapped,
- as recommended by Graham Asher.
+2014-05-01 Werner Lemberg <wl@gnu.org>
- * src/base/ftstroke.c: Revised.
- * include/freetype/ftstroke.h: Updated.
+ [autofit] Add blue-zone support for Devanagari.
-2011-06-30 İsmail Dönmez <ismail@namtrac.org>
+ This essentially moves the Devanagari script from the `Indic' hinter
+ to the `Latin' hinter. Thanks to Girish Dalvi
+ <girish.dalvi@gmail.com> for guidance with blue zone characters!
- * builds/toplevel.mk: We use git, not CVS, thus skip `.gitignore'.
+ * src/autofit/afblue.dat: Add blue zone data for Devanagari.
-2011-06-29 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
- Fix Savannah bug #33663.
+ * src/autofit/afscript.h: Add Devanagari standard characters and
+ move data out of AF_CONFIG_OPTION_INDIC block.
- * src/bdf/bdflib.c (_bdf_parse_glyphs): Handle negative values for
- ENCODING correctly.
+ * src/autofit/afranges.c: Move Devanagari data out of
+ AF_CONFIG_OPTION_INDIC block.
+ Move U+20B9, (new) Rupee sign, from Latin to Devanagari.
- * docs/CHANGES: Document it.
+ * src/autofit/afstyles.h: Update Devanagari data; in particular, use
+ AF_WRITING_SYSTEM_LATIN.
-2011-06-24 Werner Lemberg <wl@gnu.org>
+2014-05-01 Werner Lemberg <wl@gnu.org>
- * Version 2.4.5 released.
- =========================
+ [autofit] Fix handling of neutral blue zones in stems.
+
+ * src/autofit/afhints.h (AF_Edge_Flags): New value
+ `AF_EDGE_NEUTRAL'.
+
+ * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace
+ neutral blue zones with AF_EDGE_NEUTRAL.
+ (af_latin_hint_edges): Skip neutral blue zones if necessary.
+
+2014-04-28 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Introduce neutral blue zones to the latin module.
+
+ Such blue zones match either the top or the bottom of a contour. We
+ need them for scripts where accent-like elements directly touch the
+ base character (for example, some vowel signs in Devanagari, cf.
+ U+0913 or U+0914).
+
+ * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
+ property.
+
+ * src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
+ (AF_LATIN_BLUE_NEUTRAL): New enumeration value.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues,
+ af_latin_hints_compute_blue_edges): Handle neutral blue zones.
+
+2014-04-25 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/hbshim.c: Partially revert commit from 2014-04-17.
+
+ Using input glyph coverage data is simply wrong.
+
+ Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and
+ Mantas MikulÄ—nas <grawity@gmail.com>.
+
+2014-04-23 Werner Lemberg <wl@gnu.org>
+
+ * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode.
+
+ This spot has been missed while introducing support for various
+ drop-out modes years ago (including no drop-out mode, which this
+ commit fixes).
+
+ Problem reported by Patrick Thomas <pthomas505@gmail.com>.
+
+2014-04-22 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
+
+2014-04-20 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix Savannah bug #42148.
+
+ The adaptation of the cjk auto-hinter module to blue stringsets in
+ 2013-08-25 had three severe bugs. Mea culpa.
+
+ 1. Contrary to the latin auto-hinter, characters for reference and
+ overshoot values of a blue zone are specified separately. Due to
+ the screwed-up change it didn't work at all.
+
+ 2. A boolean comparison was erroneously replaced with a cast,
+ causing invalid results with the `^' operator later on. The
+ visual artifact caused by this problem is the topic of the bug
+ report.
+
+ 3. Two flag values were inverted, causing incorrect assignment of
+ reference and overshoot values.
+
+ * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
+ syntax to have both reference and overshoot characters in a single
+ string. This is error #1.
+ Add extensive comments.
+
+ * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
+ longer used.
+ (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
+ This is error #3.
+
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
+ Use character `|' to separate characters for reference and overshoot
+ values.
+ Improve tracing messages, synchronizing them with the latin
+ auto-hinter.
+ (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
+ This is error #2.
+ (af_cjk_align_linked_edge): Add tracing message.
+
+ * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
+ used.
+
+2014-04-17 Werner Lemberg <wl@gnu.org>
+
+ [autofit] More coverage fixes for complex scripts.
+
+ * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage
+ of GSUB lookups into output coverage. Otherwise, ligatures are not
+ handled properly.
+ Don't check blue zone characters for default coverage.
+
+2014-04-17 Werner Lemberg <wl@gnu.org>
+
+ Make `FT_Get_SubGlyph_Info' actually work.
+
+ * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
+ if there is no error.
+
+2014-04-15 Werner Lemberg <wl@gnu.org>
+
+ [afblue.pl]: Minor improvements.
+
+ * src/tools/afblue.pl: Allow whitespace before comments.
+ Ignore whitespace in strings.
+
+2014-04-14 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve coverage handling.
+
+ * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
+ appearing in the GPOS table if we are processing the default
+ coverage.
+
+2014-04-13 David Weber <weber.aulendorf@googlemail.com>
+
+ [smooth] Fix stand-alone compilation.
+
+ * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
+
+2014-04-12 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Redesign the recognition algorithm of strong points.
+ In particular, local extrema without horizontal or vertical segments
+ are better recognized:
- Tag sources with `VER-2-4-5'.
+ + A + D
+ \ /
+ \ /
+ \ /
+ \ /
+ \ + C
+ \ /
+ B +/
+
+ If the distances AB and CD are large, point B wasn't previously
+ detected as an extremum since the `ft_corner_is_flat' function
+ `swallowed' BC regardless of its direction, tagging point B as weak.
+ The next iteration started at B and made `ft_corner_is_flat' swallow
+ point C, tagging it as weak also, et voilà.
+
+ To improve that, another pass gets now performed before calling
+ `ft_corner_is_flat' to improve the `topology' of an outline: A
+ sequence of non-horizontal or non-vertical vectors that point into
+ the same quadrant are handled as a single, large vector.
+
+ Additionally, distances of near points are now accumulated, which
+ makes the auto-hinter handle them as if they were prepended to the
+ next non-near vector.
+
+ This generally improves the auto-hinter's rendering results.
+
+ * src/autofit/afhints.c (af_glyph_hints_reload): Implement it.
+
+ * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag
+ `AF_FLAG_NEAR'.
+
+2014-04-05 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve scoring algorithm for identifying stems.
+
+ Problem reported by Karsten Lücke <karsten.luecke@kltf.de>.
+
+ The new algorithm takes care of the width of stems: If the distance
+ between two segments is larger than the largest stem width, the
+ demerits quickly increase for larger distances. This improves
+ hinting of slanted fonts (especially if the inner parts of serifs
+ have non-horizontal `shoulders'), avoiding false stem links.
+
+ * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest
+ stem width (if available) to compute better demerits for distances
+ between stems.
+ (af_latin_hints_detect_features): Pass stem width array and array
+ size.
+ (af_latin_metrics_init_widths): Updated to use original algorithm.
+ (af_latin_hints_apply): Updated to use new algorithm.
+
+ * src/autofit/aflatin.h: Updated.
+ * src/autofit/afcjk.c: Updated.
+
+2014-04-03 Werner Lemberg <wl@gnu.org>
+
+ Don't require `gzip' module for `sfnt'.
+
+ Reported by Preet <prismatic.project@gmail.com>.
+
+ * src/sfnt/sfobjs.c (woff_open_font): Guard use of
+ FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
+
+2014-03-27 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #38235.
+
+ Work around a bug in pkg-config version 0.28 and earlier: If a
+ variable value gets surrounded by doublequotes (in particular values
+ for the `prefix' variable), the prefix override mechanism fails.
+
+ * builds/unix/freetype2.in: Don't use doublequotes.
+ * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
+ names with backslashes.
+
+2014-03-24 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #41946.
+
+ Based on a patch from Marek Kašík <mkasik@redhat.com>.
+
+ * builds/unix/configure.raw (LIBS_CONFIG): Remove.
+ * builds/unix/freetype-config.in (libs): Hard-code value.
+ * builds/unix/unix-def.in: Updated.
+
+2014-03-22 Werner Lemberg <wl@gnu.org>
+
+ Another revert for the change from 2014-03-18.
+
+ Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
+
+ * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol
+ gets always exported.
+
+2014-03-20 Werner Lemberg <wl@gnu.org>
+
+ CMakeLists.txt: Another fix for include directories.
+
+ Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
+
+2014-03-19 Werner Lemberg <wl@gnu.org>
+
+ CMakeLists.txt: Fix include directories.
+
+ Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
+
+2014-03-19 Werner Lemberg <wl@gnu.org>
+
+ Partially revert last commit.
+
+ Found by Alexei.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing
+ those variables is plain wrong, since we are in a loop.
+
+2014-03-18 Sean McBride <sean@rogue-research.com>
+ Werner Lemberg <wl@gnu.org>
+
+ Fix clang warnings.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
+ some variables.
+
+ * src/base/ftcalc.c (FT_MulFix): Only use code if
+ `FT_MULFIX_INLINED' is not defined.
+
+ * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
+ (ftc_basic_image_family_class, ftc_basic_image_cache_class,
+ ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
+ src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
+ (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
+ (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
+ function static.
+
+ * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
+ code.
+
+2014-03-17 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #41869.
+
+ This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
+ validate glyph indices returned by
+ `hb_ot_layout_lookup_collect_glyphs'.
+
+ * src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
* docs/CHANGES: Updated.
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.4.5
+2014-03-14 Werner Lemberg <wl@gnu.org>
- * 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/unix/configure.raw: Don't show error messages of `which'.
+
+2014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com>
+
+ Fix cppcheck 1.64 warning.
+
+ * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
+ dereference in case of error.
+
+2014-03-09 Sean McBride <sean@rogue-research.com>
+
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
+
+2014-03-06 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.5.3 released.
+ =========================
+
+
+ Tag sources with `VER-2-5-3'.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.5.3.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
- builds/wince/vc2008-ce/index.html: s/2.4.4/2.4.5/, s/244/245/.
+ builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
- * builds/unix/configure.raw (version_info): Set to 13:0:7.
+ * builds/unix/configure.raw (version_info): Set to 17:2:11.
+ * CMakeLists.txt (VERSION_PATCH): Set to 3.
+ * docs/CHANGES: Updated.
-2011-06-20 Werner Lemberg <wl@gnu.org>
+2014-03-06 Werner Lemberg <wl@gnu.org>
- * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix change
- from 2011-05-04.
+ Fixes for compilation with C++.
-2011-06-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'.
+ (af_get_coverage): Updated.
+ (COVERAGE): Add cast.
- [gxvalid] make the `prop' validation tracing verbose.
+2014-03-06 Sean McBride <sean@rogue-research.com>
- * src/gxvalid/gxvprop.c: Add tracing messages for errors.
+ Remove more clang analyzer warnings.
-2011-06-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c
+ (TT_Load_Glyph): Remove dead stores.
- [autogen.sh] Reflect environment variable LIBTOOLIZE.
+2014-03-05 Werner Lemberg <wl@gnu.org>
-2011-06-18 Werner Lemberg <wl@gnu.org>
+ * builds/unix/configure.raw: Simplify.
- Update license documentation.
+2014-03-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * docs/GPL.TXT: Renamed to...
- * docs/GPLv2.TXT: This.
+ Fix a bug in configure in library dependency setting
+ Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652.
- * docs/LICENSE.TXT: Updated.
+ * builds/unix/configure.raw: Use `x"${xxx}" != xno' style.
-2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-03-04 Werner Lemberg <wl@gnu.org>
- Fix g++4.6 compiler warnings in module drivers.
+ Minor fix for `make devel'.
- The background is same with previous commit.
+ * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use
+ pkg-config for bzip2 since not all GNU/Linux distributions have
+ `bzip2.pc' (and the header file `bzlib.h' is located in /usr/include
+ normally).
- * 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.
+2014-03-04 Sean McBride <sean@rogue-research.com>
-2011-05-27 Werner Lemberg <wl@gnu.org>
+ Fix several clang static analyzer dead store warnings.
- [autofit] Improve tracing of hinting process.
+ * src/autofit/afhints.c (af_glyph_hints_reload,
+ af_glyph_hints_align_weak_points): Remove unnecessary assignments.
- * src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message
- `ADJUST'.
+ * src/bdf/bdflib.c (bdf_font_load): Ditto.
-2011-05-26 Werner Lemberg <wl@gnu.org>
+ * src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
+ psh_glyph_interpolate_other_points): Ditto.
- [autofit] Fix trace message.
+ * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
- * src/autofit/aflatin.c (af_latin_hint_edges): Show correct value in
- tracing message.
+2014-03-03 Werner Lemberg <wl@gnu.org>
-2011-05-24 Daniel Zimmermann <netzimme@googlemail.com>
+ Rewrite library option handling in `configure'.
- Reduce warnings for MS Visual Studio 2010.
+ o Introduce `auto' value for `--with-XXX' library options; this is
+ now the default.
- * 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.
+ o First use `pkg-config' for library detection, then fall back to
+ other tests.
-2011-05-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
+ --with-harfbuzz): Rewrite.
+ Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
+ variables to collect data for `freetype2.pc' and `freetype-config'.
+ (FT2_EXTRA_LIBS): Renamed to ...
+ (ft2_extra_libs): This since it gets no longer substituted.
+ (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
+ New output variables, replacing `XXX_PKG' and `LIBXXX'.
+ Add notice at the end of `configure' showing the library
+ configuration.
- Automake component `builds/unix/install-sh' is removed.
+ * builds/unix/freetype-config.in (--static): New command line
+ option.
+ (libs): Updated.
+ (staticlibs): New variable, to be used if `--static' is given.
+ * docs/freetype-config.1: Document `--static'.
- * builds/unix/install-sh: Removed. It is not needed to
- include repository, because autogen.sh installs it.
- * builds/unix/.gitignore: Register install-sh.
+ * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
-2011-05-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-03-01 Werner Lemberg <wl@gnu.org>
- [autofit] Make trace message for CJK bluezone more verbose.
+ Avoid `long long' warnings with older gcc compilers.
+ Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
-2011-05-08 Just Fill Bugs <mozbugbox@yahoo.com.au>
- suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
+ versions < 4.6. This is especially needed for Max OS X since this
+ OS runs a gcc variant (or emulation) based on version 4.2.1.
- [autofit] Add bluezones for CJK Ideographs.
+2014-03-01 Werner Lemberg <wl@gnu.org>
- 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
+ * docs/INSTALL.CROSS: Revised and updated.
- * 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.
+2014-03-01 Werner Lemberg <wl@gnu.org>
- * 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.
+ Make `make clean' remove `freetype2.pc'.
- * docs/CHANGES: Note about CJK bluezone support.
+ This is a generated file at build time, not configure time.
-2011-05-06 Werner Lemberg <wl@gnu.org>
+ * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ...
+ (CLEAN): This variable.
- [autofit] Remove unused struct member.
+2014-03-01 Werner Lemberg <wl@gnu.org>
- * src/autofit/aflatin.h (AF_LatinAxis): Remove `control_overshoot'.
+ Use pkg-config for detecting libpng and libbz2 also.
-2011-05-04 Werner Lemberg <wl@gnu.org>
+ * builds/unix/configure.raw (HAVE_PKG): New variable.
+ Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/.
+ Search for libpng using `pkg-config'.
+ Fix definition of `LIBHARFBUZZ' variable.
+ * builds/unix/freetype-config.in ($libs): Updated.
+ * builds/unix/freetype2.in: Add `URL' field.
+ Update `Requires.private' and `Libs.private'.
+ * builds/unix/unix-def.in: Updated.
- * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Simplify.
+2014-03-01 Werner Lemberg <wl@gnu.org>
-2011-05-01 Just Fill Bugs <mozbugbox@yahoo.com.au>
- Werner Lemberg <wl@gnu.org>
+ Add configure support for HarfBuzz.
- [autofit] Add more debugging functions.
+ * builds/unix/pkg.m4: New file.
+ * builds/unix/configure.raw: Search for libharfbuzz using
+ `pkg-config'.
+ Add `--without-harfbuzz' option.
+ * builds/unix/freetype-config.in, builds/unix/freetype2.in,
+ builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
+ HarfBuzz.
- * src/autofit/afhints.c (af_glyph_hints_get_num_segments,
- af_glyph_hints_get_segment_offset): New functions.
+ * docs/INSTALL.UNIX: Document interdependency of Freetype with
+ HarfBuzz.
-2011-05-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
- Add new option `--disable-mmap' to configure script.
+ [cff] Math simplifications.
- * 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.
+ * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'.
+ * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
-2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-02-28 Dave Arnold <darnold@adobe.com>
- [truetype] Always recalculate the sfnt table checksum.
+ [cff] Fix Savannah bug #41697, part 2.
- * 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
+ * src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
+ cf2_initGlobalRegionBuffer): It is possible for a charstring to call
+ a subroutine if no subroutines exist. This is an error but should
+ not trigger an assert. Split the assert to account for this.
-2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-02-28 Dave Arnold <darnold@adobe.com>
- [truetype] Register a set of tricky fonts, NEC FA family.
+ [cff] Fix Savannah bug #41697, part 1.
- * 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.
+ * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is
+ invalid. In this case, it is not safe to use the length of
+ `hStemHintArray'; the exception has already been recorded in
+ `hintMask'.
-2011-04-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2014-02-26 Werner Lemberg <wl@gnu.org>
- [truetype] Fix a bug in the sfnt table checksum getter.
+ [sfnt] Fix Savannah bug #41696.
- * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Check the
- return value of face->goto_table() correctly.
+ * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
+ tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
-2011-04-28 Werner Lemberg <wl@gnu.org>
+2014-02-26 Werner Lemberg <wl@gnu.org>
- [autofit] Improve tracing messages.
+ [winfnt] Fix Savannah bug #41694.
- * src/autofit/aflatin.c (af_latin_metrics_init_blues,
- af_latin_align_linked_edge, af_latin_hint_edges): Do it.
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
-2011-04-25 Kan-Ru Chen <kanru@kanru.info>
+2014-02-26 Werner Lemberg <wl@gnu.org>
- [truetype] Always check the checksum to identify tricky fonts.
+ [cff] Fix Savannah bug #41693.
- 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/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
- * src/truetype/ttobjs.c (tt_check_trickyness): Even when
- tt_check_trickyness_family() finds no trickyness,
- tt_check_trickyness_sfnt_ids() is invoked.
+2014-02-26 Werner Lemberg <wl@gnu.org>
-2011-04-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [bdf] Fix Savannah bug #41692.
- [autofit] Add more Indic scripts with hanging baseline.
+ bdflib puts data from the input stream into a buffer in chunks of
+ 1024 bytes. The data itself gets then parsed line by line, simply
+ increasing the current pointer into the buffer; if the search for
+ the final newline character exceeds the buffer size, more data gets
+ read.
- * src/autofit/afindic.c (af_indic_uniranges): Tibetan, Limbu,
- Sundanese, Meetei Mayak, Syloti Nagri and Sharada scripts are
- added.
+ However, in case the current line's end is very near to the buffer
+ end, and the keyword to compare with is longer than the current
+ line's length, an out-of-bounds read might happen since `memcmp'
+ doesn't stop properly at the string end.
-2011-04-21 Behdad Esfahbod <behdad@behdad.org>
+ * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons
+ stop at string ends.
- Always ignore global advance.
+2014-02-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- 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.
+ [autofit] Fix `make multi' compilation.
- * 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.
+ * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
- * docs/CHANGES: Updated.
+2014-02-19 Werner Lemberg <wl@gnu.org>
+ Simon Bünzli <zeniko@gmail.com>
-2011-04-21 rainy6144 <rainy6144@gmail.com>
+ Fix Savannah bug #32902.
- [autofit] Blur CJK stems if too many to preserve their gaps.
+ Patch taken from
- 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.
+ https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87
- * 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.
+ with slight modifications.
-2011-04-18 Werner Lemberg <wl@gnu.org>
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to
+ handle fonts that incorrectly use \r at the beginning of an eexec
+ block.
- Integrate autofitter debugging stuff.
+2014-02-19 Simon Bünzli <zeniko@gmail.com>
- * devel/ftoption.h, include/freetype/config/ftoption.h
- (FT_DEBUG_AUTOFIT): New macro.
+ Fix Savannah bug #41590.
- * include/freetype/internal/fttrace.h: Add trace components for
- autofitter.
+ * src/type1/t1load.c (parse_encoding): Protect against invalid
+ number.
- * src/autofit/aftypes.h (AF_LOG): Removed.
- (_af_debug): Removed.
+2014-02-12 Dave Arnold <darnold@adobe.com>
- * src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/.
- s/AF_LOG/FT_TRACE5/.
- Define FT_COMPONENT where necessary.
+ [cff] Optimize by using `FT_MulDiv'.
+ Suggested by Alexei.
-2011-04-18 Werner Lemberg <wl@gnu.org>
+ * src/cff/cf2font.c (cf2_computeDarkening): Do it.
- Synchronize config files.
+2014-02-12 Werner Lemberg <wl@gnu.org>
- * builds/unix/ftconfig.in: Copy missing assembler routines from
- include/freetype/config/ftconfig.h.
+ Fix Savannah bug #41465.
-2011-04-13 Werner Lemberg <wl@gnu.org>
+ * builds/unix/unix-def.in (CLEAN): Add `freetype-config'.
+ (DISTCLEAN): Remove `freetype-config'.
- Fix Savannah bug #33047.
+2014-02-08 Sean McBride <sean@rogue-research.com>
- Patch submitted by anonymous reporter.
+ Fix clang static analyzer and compiler warnings.
- * src/psaux/psobjs.c (ps_table_add): Use FT_PtrDist for pointer
- difference.
+ * src/autofit/afhints.c (af_glyph_hints_align_weak_points),
+ src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
+ src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
+ (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
+ src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
+ (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
+ src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
+ (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
+ tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
+ code.
-2011-04-11 Kan-Ru Chen <kanru@kanru.info>
+ * src/autofit/afmodule.c (af_property_get_face_globals,
+ af_property_set, af_property_get), src/base/ftbitmap.c
+ (ft_gray_for_premultiplied_srgb_bgra): Make functions static.
- Fix reading of signed integers from files on 64bit platforms.
+ * src/base/ftobjs.c (ft_remove_renderer): Protect against
+ library == NULL.
+ (ft_property_do): Make function static.
- Previously, signed integers were converted to unsigned integers, but
- this can fail because of sign extension. For example, 0xa344a1eb
- becomes 0xffffffffa344a1eb.
+ * src/base/ftrfork.c: Include `ftbase.h'.
- We now do the reverse which is always correct because the integer
- size is the same during the cast from unsigned to signed.
+ * src/sfnt/ttsbit.c (tt_face_load_sbix_image)
+ [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
+ (T1_Compute_Max_Advance): Avoid compiler warning.
- * 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/truetype/ttinterp.c (TT_New_Context): Reduce scope of
+ variable.
- * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Updated.
+2014-02-08 Werner Lemberg <wl@gnu.org>
-2011-04-07 Werner Lemberg <wl@gnu.org>
+ Fix Windows build directories.
- Update Unicode ranges for CJK autofitter; in particular, add Hangul.
+ The build target is now `windows' instead of `win32'.
- * src/autofit/afcjk.c (af_cjk_uniranges): Update to Unicode 6.0.
+ Problem reported by Nickolas George <darknova.clan@gmail.com>.
-2011-04-04 Werner Lemberg <wl@gnu.org>
+ * builds/modules.mk: Don't use `win32' and `win16' (!) but
+ `windows'.
- Fix formatting of autofit debug dumps.
+ * builds/windows/detect.mk, builds/windows/win32-def.mk:
+ s/win32/windows/.
- * src/autofit/afhints.c (af_glyph_hints_dump_points,
- af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Adjust
- column widths.
+2014-02-08 Eugen Sawin <esawin@mozilla.com>
-2011-03-30 Werner Lemberg <wl@gnu.org>
+ Fix Savannah bug #41507.
- * src/autofit/aftypes.h (AF_OutlineRec): Removed, unused.
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
+ [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
-2011-03-24 Werner Lemberg <wl@gnu.org>
+2014-02-08 Dave Arnold <darnold@adobe.com>
- * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 256.
- This limit is given on p. 37 of Adobe Technical Note #5014.
+ [cff] Fix minor performance bug.
-2011-03-23 Werner Lemberg <wl@gnu.org>
+ * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
+ calculations are now cached and not recomputed on each glyph.
- * src/truetype/ttpload.c (tt_face_load_loca): Fix mismatch warning.
+2014-02-05 Werner Lemberg <wl@gnu.org>
-2011-03-20 Werner Lemberg <wl@gnu.org>
+ Fix problems with perl 5.8.8 as distributed with current MinGW.
- * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts.
+ * src/tools/afblue.pl: Work-around for Perl bug #63402.
+ (string_re): Avoid `possessive quantifiers', which have been
+ introduced in Perl version 5.10.
-2011-03-19 Werner Lemberg <wl@gnu.org>
+2014-02-04 Werner Lemberg <wl@gnu.org>
- More C++ compilation fixes.
+ Fix compilation with MinGW.
- * src/autofit/afhints.c (af_glyph_hints_dump_points,
- af_glyph_hints_dump_segments, af_glyph_hints_dump_edges)
- [__cplusplus]: Protect with `extern "C"'.
+ Right now, compilation out of the box with latest MinGW is broken
+ due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode,
+ cf.
-2011-03-18 Werner Lemberg <wl@gnu.org>
+ https://sourceforge.net/p/mingw/bugs/2024/
+ https://sourceforge.net/p/mingw/bugs/2046/
- C++ compilation fixes.
+ * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW.
- * src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/afcjk.c
- (af_cjk_hints_apply): Use cast for `dim'.
+2014-02-04 Werner Lemberg <wl@gnu.org>
-2011-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [autofit] Minor fix.
- A better fix for Savannah bug #32671.
+ * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
+ src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling
+ of alternative standard characters.
+ This also fixes a compilation warning in non-debug mode.
- * src/smooth/ftgrays.c (gray_render_conic): Clean up code and
- replace WHILE loop with a more natural DO-WHILE construct.
+2014-02-03 Werner Lemberg <wl@gnu.org>
-2011-03-16 Werner Lemberg <wl@gnu.org>.
+ [cff] Fix Savannah bug #41363.
- * src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field.
- Suggested by Graham Asher.
+ * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into
+ parameter check.
+ (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if
+ we are scaling the outline.
+ (cf2_getPpemY): Remove problematic assertion.
-2011-03-09 Werner Lemberg <wl@gnu.org>
+2014-01-26 Werner Lemberg <wl@gnu.org>
- Make FT_Sfnt_Table_Info return the number of SFNT tables.
+ [autofit] Introduce two more slots for standard characters.
- * src/sfnt/sfdriver.c (sfnt_table_info): Implement it.
- * include/freetype/tttables.h: Update documentation.
- * docs/CHANGES: Updated.
+ This is useful for OpenType features like `c2sc' (caps to small
+ caps) that don't have lowercase letters by definition, or other
+ features that mainly operate on numerals.
-2011-03-07 Bram Tassyns <bramt@enfocus.be>
+ * src/autofit/afscript.h: Add more standard characters.
- Fix Savannah bug #27988.
+ * src/autofit/aftypes.h: Update use of `SCRIPT' macro.
+ (AF_ScriptClassRec): Add members to hold two more standard
+ characters.
+ (AF_DEFINE_SCRIPT_CLASS): Updated.
- * src/cff/cffobjs.c (remove_style): New function.
- (cff_face_init): Use it to strip off the style part of the family
- name.
+ * src/autofit/afglobal.c, src/autofit/afglobal.h,
+ * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c:
+ Update use of `SCRIPT' macro.
-2011-03-07 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
+ src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more
+ standard characters.
- * docs/CHANGES: Updated.
+2014-01-24 Werner Lemberg <wl@gnu.org>
-2011-03-07 Alexei Podtelezhnikov <apodtele@gmail.com>
+ Fix Savannah bug #41320.
- Quick fix for Savannah bug #32671.
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues)
+ <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
- This isn't the optimal solution yet, but it restores the previous
- rendering quality (more or less).
+2014-01-23 Werner Lemberg <wl@gnu.org>
- * src/smooth/ftgrays.c (gray_render_conic): Do more splitting.
+ Fix Savannah bug #41310.
-2011-03-06 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
+ Don't check metrics, which this format doesn't have.
+ This is another correction to the commit from 2013-11-21.
- Fix autohinting fallback.
+2014-01-23 Werner Lemberg <wl@gnu.org>
- * src/base/ftobjs.c (FT_Load_Glyph): Assure that we only check TTFs,
- ignoring CFF-based OTFs.
+ Fix Savannah bug #41309.
-2011-02-27 Werner Lemberg <wl@gnu.org>
+ * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
+ of `T1_ToFixedArray'.
- Add AF_CONFIG_OPTION_USE_WARPER to control the autofit warper.
+ * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
+ `t1_parse_font_matrix'.
- * devel/ftoption.h, include/freetype/config/ftoption.h
- (AF_CONFIG_OPTION_USE_WARPER): New macro.
- * src/autofit/aftypes.h (AF_USE_WARPER): Remove.
+ * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
+ `t1_parse_font_matrix'.
+ (t42_parse_encoding): Synchronize with `t1_parse_encoding'.
- * src/autofit/*: s/AF_USE_WARPER/AF_CONFIG_OPTION_USE_WARPER/.
+ * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
+ <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
- * src/autofit/afwarp.c [!AF_CONFIG_OPTION_USE_WARPER]: Replace dummy
- variable assignment with a typedef.
+2014-01-22 Werner Lemberg <wl@gnu.org>
-2011-02-26 Werner Lemberg <wl@gnu.org>
+ * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
- [autofit] Slight simplifications.
+2014-01-16 Werner Lemberg <wl@gnu.org>
- * src/autofit/aflatin.c (af_latin_hints_link_segments): Remove
- test which always returns false.
- (af_latin_hints_compute_blue_edges): Remove redundant assignment.
+ [autofit] Improve tracing of style coverages.
-2011-02-24 Werner Lemberg <wl@gnu.org>
+ * include/internal/fttrace.h: Add `afglobal' for tracing style
+ coverages.
- * docs/PROBLEMS: Mention rendering differences on different
- platforms.
- Suggested and worded by Jason Owen <jason.a.owen@gmail.com>.
+ * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H.
+ (FT_COMPONENT): Define.
+ (af_face_globals_compute_style_coverage): Trace `gstyles' array
+ data.
-2011-02-24 Werner Lemberg <wl@gnu.org>
+2014-01-09 Werner Lemberg <wl@gnu.org>
- [autofit] Comment out unused code.
+ Fix Savannah bug #41158.
- * src/autofit/aflatin.c, src/autofit/aflatin2.c
- (af_latin_hints_compute_edges): Do it.
+ * builds/unix/install.mk (install): Create man page directory.
-2011-02-24 Werner Lemberg <wl@gnu.org>
+2014-01-08 Chongyu Zhu <lembacon@gmail.com>
- * src/autofit/afhints.h (AF_GlyphHints): Remove unused field.
+ [arm] Fix Savannah bug #41138, part 2.
-2011-02-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h
+ (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix
+ preprocessor conditionals for `add.w'.
- [cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'.
- Found by <ychen1392001@yahoo.com.cn>, see detail in
+2014-01-08 Werner Lemberg <wl@gnu.org>
- http://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html
+ [autofit] Fix Savannah bug #41138, part 1.
- * src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Check the node
- buckets[cache->p + cache->mask] too.
+ * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
+ enumeration names for generated `#else'.
-2011-02-19 Kevin Kofler <kevin.kofler@chello.at>
+ * src/autofit/afblue.h: Regenerated.
- Fall back to autohinting if a TTF/OTF doesn't contain any bytecode.
- This is Savannah patch #7471.
+2014-01-06 Werner Lemberg <wl@gnu.org>
- * src/base/ftobjs.c (FT_Load_Glyph): Implement it.
+ Add manual page for `freetype-config'.
+ Contributed by Nis Martensen <nis.martensen@web.de>.
-2011-02-19 John Tytgat <John.Tytgat@esko.com>
+ * docs/freetype-config.1: New file.
- [cff] Fix subset prefix removal.
- This is Savannah patch #7465.
+ * builds/unix/unix-def.in (mandir): Define.
+ * builds/unix/install.mk (install, uninstall): Handle manpage.
- * src/cff/cffobjs.c (remove_subset_prefix): Update length after
- subset prefix removal.
+2014-01-05 Werner Lemberg <wl@gnu.org>
-2011-02-13 Bradley Grainger <bgrainger@logos.com>
+ [autofit] Minor fixes for `afblue.pl'.
- Add inline assembly version of FT_MulFix for MSVC.
+ * src/tools/afblue.pl (aux_name): Don't use `reverse'.
+ <Handling #endif>: Use proper indentation for generated `#else'.
- * 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++.
+ * src/autofit/afblue.h: Regenerated.
-2011-02-13 Bradley Grainger <bgrainger@logos.com>
+2014-01-04 Werner Lemberg <wl@gnu.org>
- Add project and solution files in Visual Studio 2010 format.
+ [autofit] Fix Indic scripts.
- * 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.
+ Split the single, incorrect Indic entry into separate scripts so
+ that the covered ranges are the same: Bengali, Devanagari, Gujarati,
+ Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese,
+ Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove
+ entries for Meetai Mayak and Sharada – the Unicode ranges were
+ incorrect (and nobody has complained about that), fonts are scarce
+ for those scripts, and the Indic auto-hinter support is rudimentary
+ anyways.
-2011-02-01 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and
+ AF_CONFIG_OPTION_CJK.
- * src/autofit/afdummy.c: Include `aferrors.h'.
- Problem reported by Chris Liddell <chris.liddell@artifex.com>.
+ * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro.
+ Use it, together with AF_CONFIG_OPTION_INDIC and
+ AF_CONFIG_OPTION_CJK, to update.
-2011-02-01 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated.
+ [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed.
+ Sort entries by tags.
- [cff] Ignore unknown operators in charstrings.
- Patch suggested by Miles.Lau <sunliang_liu@foxitsoftware.com>.
+2014-01-03 Werner Lemberg <wl@gnu.org>
- * src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing
- message for unknown operators and continue instead of exiting with a
- syntax error.
+ [autofit] Thinko.
-2011-02-01 Werner Lemberg <wl@gnu.org>
+ * src/autofit/hbshim.c (af_get_char_index): Similar to
+ `af_get_coverage', reject glyphs which are not substituted.
- [truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also.
+2014-01-03 Werner Lemberg <wl@gnu.org>
- * 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.
+ [autofit] Fix handling of default coverages.
+
+ With this commit, the implementation of coverage handling is
+ completed.
-2011-01-31 Werner Lemberg <wl@gnu.org>
+ * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to
+ do.
+ Reject coverages which don't contain appropriate glyphs for blue
+ zones.
- [truetype] Protect jump instructions against endless loops.
+2014-01-03 Werner Lemberg <wl@gnu.org>
- * src/truetype/interp.c (DO_JROT, DO_JMPR, DO_JROF): Exit with error
- if offset is zero.
+ [autofit] Fix handling of default coverages.
-2011-01-31 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
+ First handle non-default coverages, then the default coverage of the
+ default script, and finally the other default coverages.
- [truetype] Improve handling of invalid references.
+2014-01-03 Werner Lemberg <wl@gnu.org>
- * 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.
+ [autofit] Fix scaling of HarfBuzz shaping.
-2011-01-31 Werner Lemberg <wl@gnu.org>
+ * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
- [truetype] Improve handling of stack underflow.
+2014-01-03 Werner Lemberg <wl@gnu.org>
- * 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.
+ [autofit] Better ftgrid support.
-2011-01-30 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add
+ parameters `is_blue' and `blue_offset'.
- * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message.
+2014-01-01 Werner Lemberg <wl@gnu.org>
-2011-01-30 LIU Sun-Liang <sunliang_liu@foxitsoftware.com>
+ [autofit] Remove some styles.
- [truetype]: Fix behaviour of MIAP for invalid arguments.
+ * src/autofit/afcover.h: Remove coverages for alternative fractions,
+ denominators, numerators, and fractions.
- * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in
- case of error.
+ * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
-2011-01-18 Werner Lemberg <wl@gnu.org>
+2014-01-01 Werner Lemberg <wl@gnu.org>
- [truetype] Fix handling of MIRP instruction.
+ [autofit] Add more styles.
- Thanks to Greg Hitchcock who explained the issue.
+ * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New
+ auxiliary macros; use them to define styles for Cyrillic, Greek, and
+ Latin.
- * 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.
+ * src/autofit/afcover.h: Remove coverage for oldstyle figures.
+ Since those digits are used in combination with ordinary letters, it
+ makes no sense to handle them separately.
-2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit
+ `options' parameter to 4 bits.
- Fix ARM assembly code in include/freetype/config/ftconfig.h.
+2014-01-01 Werner Lemberg <wl@gnu.org>
- * 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.
+ [autofit] Fix style assignments to glyphs.
- http://bugreports.qt.nokia.com/browse/QTBUG-6521
+ * src/autofit/hbshim.c (af_get_coverage)
+ [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also
+ so that we can skip glyphs that have both GSUB and GPOS data.
-2011-01-15 Werner Lemberg <wl@gnu.org>
+2014-01-01 Werner Lemberg <wl@gnu.org>
- [raster] Make bbox handling the same as with Microsoft's rasterizer.
+ * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
- 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.
+2014-01-01 Werner Lemberg <wl@gnu.org>
- Thanks to Greg Hitchcock who explained this behaviour.
+ [autofit] Implement and use `af_get_char_index' with HarfBuzz.
- * src/raster/ftrend1.c (ft_raster1_render): Implement it.
+ * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
+ Redefine to construct HarfBuzz features.
+ (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten.
-2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use
+ `y_offset' to adjust `best_y'.
- Copy -mcpu=* & -march=* options from CFLAGS to LDFLAGS.
+2013-12-31 Werner Lemberg <wl@gnu.org>
- * 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.
+ [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
-2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2013-12-31 Werner Lemberg <wl@gnu.org>
- Fix off-by-one bug in CFLAGS & LDFLAGS harmonizer.
+ [autofit] Fix interface of `af_get_char_index'.
- * 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.
+ * src/autofit/hbshim.c (af_get_char_index): Return error value.
+ Add argument for y offset (to be used in a yet-to-come patch).
-2011-01-13 Werner Lemberg <wl@gnu.org>
+ * src/autofit/hbshim.h, src/autofit/afcjk.c,
+ src/autofit/aflatin.c: Updated.
- [raster] Add undocumented drop-out rule to the other bbox side also.
+2013-12-30 Werner Lemberg <wl@gnu.org>
- * src/raster/ftraster.c (Vertical_Sweep_Drop,
- Horizontal_Sweep_Drop): Implement it.
+ [autofit] Don't combine multiple features into one set.
-2011-01-13 Werner Lemberg <wl@gnu.org>
+ Combining them, as originally envisioned, would lead to much more
+ complicated code, as investigations have shown meanwhile. The major
+ drawback is that we run out of available style slots much earlier.
+ However, this is only a theoretical issue since we don't support a
+ large number of scripts currently.
- [raster] Reduce jitter value.
+ * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with
+ a single-element `COVERAGE' macro, sort the elements by the feature
+ tags, and add entry for `ruby'.
- 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/autofit/aftypes.h: Updated.
+ * src/autofit/hbshim.c: Updated.
- * src/raster/ftraster.c (Set_High_Precision): Implement it.
+2013-12-28 Werner Lemberg <wl@gnu.org>
-2011-01-13 Werner Lemberg <wl@gnu.org>
+ [autofit] Code shuffling to reduce use of cpp macros.
- [raster] Handle drop-outs at glyph borders according to Microsoft.
+ * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
+ Call `af_get_coverage' unconditionally.
- 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.
+ * src/autofit/autofit.c: Include `hbshim.c' unconditionally.
- Thanks to Greg Hitchcock who explained this behaviour.
+ * src/autofit/hbshim.c (af_get_coverage)
+ [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
- * src/raster/ftraster.c (Vertical_Sweep_Drop,
- Horizontal_Sweep_Drop): Implement it.
+ * src/autofit/hbshim.h: Provide function declarations
+ unconditionally.
-2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2013-12-28 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Add wrapper function for `FT_Get_Char_Index'.
+
+ Yet-to-come changes will provide HarfBuzz functionality for the new
+ function.
- [cache] Fix Savannah bug #31923, patch drafted by Harsha.
+ * src/autofit/hbshim.c (af_get_char_index): New function.
+ * src/autofit/hbshim.h: Updated.
- 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/autofit/afcjk.c (af_cjk_metrics_init_widths,
+ af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
- * 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.
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths,
+ af_latin_metrics_init_blues, af_latin_metrics_check_digits):
+ Updated.
-2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2013-12-28 Werner Lemberg <wl@gnu.org>
- [cache] Notice if a cache query induced the node list change.
+ [autofit] Use `global' HarfBuzz font object.
- 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.
+ We now use `hb_font' instead of `hb_face' since yet-to-come changes
+ need this.
- * 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/autofit/afglobal.h: Include `hbshim.h'.
+ (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member
+ `hb_font'.
- * src/cache/ftccback.h (ftc_snode_compare): Updated to fit with new
- FTC_Node_CompareFunc type.
- (ftc_gnode_compare): Ditto.
+ * src/autofit/afglobal.c (af_face_globals_new)
+ [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'.
+ (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy
+ `hb_font'.
- * 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/autofit/hbshim.h: Include HarfBuzz headers.
- * 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/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz
+ headers.
+ (af_get_coverage): Updated.
- * 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.
+2013-12-27 Werner Lemberg <wl@gnu.org>
- * 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.
+ [autofit] Handle `DFLT' OpenType script for coverages.
- * 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.
+ * include/ftautoh.h: Document new `default-script' property.
-2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for
+ type of first parameter.
+ (script_tags): Add one more element.
+ (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag.
- [cache] Fit `FTC_GNode_Compare' to `FTC_Node_CompareFunc'.
+ * src/autofit/hbshim.h: Updated.
- * 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'.
+ * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
+ Updated.
-2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro.
- [cache] Deduplicate the code to get the top node by a hash.
+ * src/autofit/afmodule.h (AF_ModuleRec): New `default_script'
+ member.
- There are several duplicated code fragments getting the top node
- from a cache by a given hash, like:
+ * src/autofit/afmodule.c (af_property_set, af_property_get): Handle
+ `default-script' property.
+ (af_autofitter_init): Updated.
- idx = hash & cache->mask;
- if ( idx < cache->p )
- idx = hash & ( cache->mask * 2 + 1 );
- pnode = cache->buckets + idx;
+2013-12-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- 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.
+ [ftrfork] Fix the face order difference between POSIX and Carbon.
- * 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.
+ The fragmented resources in Suitcase and .dfont should be reordered
+ when `POST' resource for Type1 is being restored, but reordering of
+ sfnt resources induces the different face order. Now the ordering
+ is restricted to `POST' resource only, to prevent the different
+ order issue (e.g. the face index in the fontconfig cache generated
+ with Carbon framework is incompatible with that by FreeType 2
+ without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
-2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
+ http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
- [cache] inline-specific functions are conditionalized.
+ * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
+ `sort_by_res_id' to control the fragmented resource ordering.
+ * include/internal/ftrfork.h: Declare new switch.
+ * src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST'
+ resource, and disable the sorting for `sfnt' resource.
- * 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'.
+2013-12-25 Werner Lemberg <wl@gnu.org>
- * 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.
+ Fix Savannah bug #40997.
-2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
+ adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
+ be set.
+ * src/cff/cffobjs.c (cff_face_init): Ditto.
+ * src/cid/cidobjs.c (cid_face_init): Ditto.
+ * src/pcf/pcfread.c (pcf_load_font): Ditto.
+ * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
+ * src/type1/t1objs.c (T1_Face_Init): Ditto.
+ * src/type42/t42objs.c (T42_Face_Init): Ditto.
+ * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
- [cache] Correct a type mismatch under non-inlined config.
+2013-12-21 Werner Lemberg <wl@gnu.org>
- * 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'.
+ [autofit] Introduce `coverages'.
-2011-01-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Coverages are the interface to the HarfBuzz library to acces
+ OpenType features for handling glyphs not addressable by the cmap.
- Update Jamfile to include Bzip2 support.
+ Right now, compilation of HarfBuzz is only added to the development
+ build. A solution for standard build mode will be delayed until
+ HarfBuzz gets split into two libraries to avoid mutual dependencies
+ between FreeType and HarfBuzz.
- * 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)
+ Note that this is only a first step in handling coverages, basically
+ providing the framework only. Code for handling selected OpenType
+ features (this is, actually using the data in `afcover.h') will
+ follow.
-2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * devel/ftoption.h, include/config/ftoption.h
+ (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro.
- Update Symbian project files to include Bzip2 support.
+ * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h:
+ New files.
- Currently, it provides `FT_Stream_OpenBzip2' that returns
- unimplemented error always, to prevent unresolved symbol
- error for the applications designed for Unix systems.
+ * src/autofit/afscript.h: Add HarfBuzz script name tags.
- * builds/symbian/bld.inf: Include ftbzip2.h.
- * builds/symbian/freetype.mmp: Include ftbzip2.c.
+ * src/autofit/afstyles.h: Add default coverage enumeration values.
-2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros.
+ (AF_Coverage): New enumeration (generated by `afcover.h').
+ (AF_StyleClassRec): New member `coverage'.
+ (AF_DEFINE_STYLE_CLASS): Updated.
- Update classic MacOS makefiles to include Bzip2 support.
+ * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage
+ data.
- Currently, it provides `FT_Stream_OpenBzip2' that returns
- unimplemented error always, to prevent unresolved symbol
- error for the applications designed for Unix systems.
+ * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros.
+ (AF_SCRIPT_FALLBACK): Renamed to ...
+ (AF_STYLE_FALLBACK): ... this.
- * 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.
+ * src/autofit/afglobal.c: Include `hbshim.c'.
+ Update use of `SCRIPT' and `STYLE' macros.
+ (af_face_globals_compute_style_coverage)
+ [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'.
+ Update.
-2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afmodule.h (AF_ModuleRec):
+ s/fallback_script/fallback_style/.
- Update Amiga makefiles to include Bzip2 support.
+ * src/autofit/afmodule.c (af_property_set): Adapt handling of
+ `fallback-script' property to set a fallback style.
+ (af_property_get, af_autofitter_init): Updated.
- Currently, it provides `FT_Stream_OpenBzip2' that returns
- unimplemented error always, to prevent unresolved symbol
- error for the applications designed for Unix systems.
+ * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros.
- * 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.
+ * src/autofit/afranges.h: Update use of `SCRIPT' macro.
-2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
+ `hbshim.c'.
- Update pkg-config tools to reflect Bzip2 support.
+ * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'.
+ (AUTOF_DRV_H): Add `afcover.h'.
- * builds/unix/freetype-config.in: Include `-lbz2' to
- --libs output, if built with Bzip2 support.
- * builds/unix/freetype2.in: Ditto.
+ * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for
+ all libraries needed by FreeType.
-2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2013-12-21 Werner Lemberg <wl@gnu.org>
- * builds/unix/configure.raw: Remove `SYSTEM_BZ2LIB' macro.
+ Fix Savannah bug #40975 (sort of).
- 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.
+ * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType
+ behave the same as the Windows TrueType engine for the invalid case.
-2011-01-03 Werner Lemberg <wl@gnu.org>
+2013-12-21 Werner Lemberg <wl@gnu.org>
- */rules.mk: Handle `*pic.c' files.
+ [autofit] Make PIC mode work actually.
-2010-12-31 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
+ enumeration values automatically generated by including `afscript.h'
+ and friends.
- * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 64.
- Problem reported by Tom Bishop <wenlin@wenlin.com>.
+ * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
-2010-12-31 Werner Lemberg <wl@gnu.org>
+2013-12-21 Werner Lemberg <wl@gnu.org>
- Improve bzip2 support.
+ Fix PIC linking.
- * include/freetype/ftmoderr.h: Add bzip2.
+ * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
+ generated function name.
- * docs/INSTALL.ANY, docs/CHANGES: Updated.
+ * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
+ to ...
+ (FT_Init_Table_ft_raccess_guess_table): ... this so that the
+ function name correctly corresponds to what the macro framework
+ expects.
- * src/pcf/README: Updated.
- * include/freetype/internal/pcftypes.h: Obsolete, removed.
+ * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
+ that PIC functions are compiled also.
-2010-12-31 Joel Klinghed <the_jk@yahoo.com>
+2013-12-21 Werner Lemberg <wl@gnu.org>
- Add bzip2 compression support to handle *.pcf.bz2 files.
+ [base] Add missing dependencies to Makefile.
- * builds/unix/configure.raw: Test for libbz2 library.
+ * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
+ (BASE_H): Add `basepic.h'.
- * devel/ftoption.h, include/freetype/config/ftoption.h
- (FT_CONFIG_OPTION_USE_BZIP2): Define.
- * include/freetype/config/ftheader.h (FT_BZIP2_H): Define.
+2013-12-20 Werner Lemberg <wl@gnu.org>
- * include/freetype/ftbzip2.h: New file.
+ [autofit] Fix PIC compilation.
- * src/bzip2/*: New files.
+ * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
+ src/autofit/aflatin.c (af_latin_metrics_init_widths)
+ [FT_CONFIG_OPTION_PIC]: Declare `globals'.
- * 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.
+ * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
+ AF_DEFINE_STYLE_CLASS.
- * docs/formats.txt, modules.cfg: Updated.
+ * src/autofit/afpic.c: Include `afglobal.h'.
+ (autofit_module_class_pic_init): Typo.
-2010-12-25 Harsha <mm.harsha@gmail.com>
+ * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
+ AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
+ parameter and structure member.
- Apply Savannah patch #7422.
+2013-12-20 Werner Lemberg <wl@gnu.org>
- 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.
+ [autofit] Introduce `styles'.
- * src/cache/ftcsbits.c (FTC_SNode_New): Initialize sbit widths with
- value 255.
- (ftc_snode_compare): Fix condition.
+ This is the new top-level structure for handling glyph input data;
+ scripts are now defined separately.
-2010-12-13 Werner Lemberg <wl@gnu.org>
+ * src/autofit/aftypes.h (SCRIPT): Updated.
+ (AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
+ members to ...
+ (AF_Style_ClassRec): ... this new structure.
+ (AF_Style): New enumeration.
+ (AF_StyleMetricsRec): Replace `script' enumeration with
+ `style_class' pointer.
+ (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
+ (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.
- Fix parameter handling of `FT_Set_Renderer'.
- Reported by Kirill Tishin <siege@bk.ru>.
+ * src/autofit/afstyles.h: New file, using data from `afscript.h'.
+ * src/autofit/afscript.h: Updated.
- * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'.
+ * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
+ af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.
-2010-12-09 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afglobal.c (SCRIPT): Updated.
+ (STYLE): Redefine macro to load `afstyles.h'.
+ (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
+ (af_style_names): ... this array.
+ (af_face_globals_compute_script_coverage): Renamed to...
+ (af_face_globals_compute_style_coverage): ... this.
+ Updated.
+ (af_face_globals_new, af_face_globals_free,
+ af_face_globals_get_metrics): Updated.
+
+ * src/autofit/afglobal.h (SCRIPT): Updated.
+ (STYLE): Redefine macro to load `afstyles.h'.
+ (AF_SCRIPT_FALLBACK): Update definition. This will get more
+ refinements with later on.
+ (AF_SCRIPT_UNASSIGNED): Replace with...
+ (AF_STYLE_UNASSIGNED): ... this macro.
+ (AF_FaceGlobalsRec): Updated.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths,
+ af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
+ af_latin_hint_edges): Updated.
+
+ * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
+ (af_ltn2_uniranges): Removed.
+
+ * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
+ Updated.
+
+ * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
+ * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
+ (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
+ members.
+
+ * src/autofit/afranges.h: Updated.
+
+ * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
+
+2013-12-19 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Factor scripts and uniranges out of writing system files.
+
+ * src/autofit/afranges.c, src/autofit/afranges.h: New files.
+
+ * src/autofit/afscript.h: Extend `SCRIPT' macro with more
+ parameters, taking data from the writing system files.
+
+ * src/autofit/aftypes.h: Updated.
+
+ * src/autofit/afglobal.c: Include `afranges.h'.
+ Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
+ * src/autofit/afglobal.c: Include `afranges.h'.
+ Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.
+
+ * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
+ * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
+ * src/autofit/afindic.c, src/autofit/afindic.h: Updated.
+ * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
+ * src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated.
+
+ * src/autofit/afpic.c: Updated.
+
+ * src/autofir/autofit.c: Include `afranges.c'.
+ * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
+
+2013-12-18 Werner Lemberg <wl@gnu.org>
+
+ [autofit] More code orthogonality.
+
+ * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
+ pointer to an `AF_ScriptClass' structure with `script' index of type
+ `AF_Script'.
+ Move some code around.
+
+ * src/autofit/afcjk.c: Include `afpic.h'.
+ (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
+ af_cjk_hint_edges): Updated.
+
+ * src/autofit/aflatin.c: Include `afpic.h'.
+ (af_latin_metrics_init_widths, af_latin_metrics_init_blues,
+ af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.
+
+ * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.
+
+ * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
+ Updated.
+
+2013-12-18 Werner Lemberg <wl@gnu.org>
+
+ [autofit] s/ScriptMetrics/StyleMetrics/.
+
+2013-12-18 Werner Lemberg <wl@gnu.org>
+
+ [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
+
+2013-12-18 Werner Lemberg <wl@gnu.org>
+
+ [autofit] s/gscripts/gstyles/.
+
+2013-12-18 Werner Lemberg <wl@gnu.org>
+
+ [autofit] s/glyph_scripts/glyph_styles/.
+
+ This is the first commit of a series to create a new top-level
+ structure (a `style') for handling scripts, writing_systems, and
+ soon-to-be-added coverages.
+
+2013-12-17 Werner Lemberg <wl@gnu.org>
+
+ [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
+
+2013-12-11 Infinality <infinality@infinality.net>
+
+ [truetype] Simplify logic of rendering modes.
+
+ This patch unifies the subpixel and non-subpixel cases.
+
+ * src/truetype/ttinterp.h (TT_ExecContextRec): Remove
+ `grayscale_hinting'; all code should refer to `grayscale' instead.
+ Remove unused `native_hinting' member.
+ Rename `subpixel_hinting' member to `subpixel.
+
+ * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
+ (tt_loader_init): Updated.
+
+ * src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
+ Updated.
+
+2013-12-11 Werner Lemberg <wl@gnu.org>
+
+ [documentation] Add section how to include FreeType header files.
+ Problem reported by David Kastrup <dak@gnu.org>.
+
+ Surprisingly, a description how to do that was completely missing in
+ the API reference.
+
+ * include/freetype.h, include/ftchapters.h: New documentation
+ section `header_inclusion'.
+
+2013-12-10 Werner Lemberg <wl@gnu.org>
+
+ [autofit] s/DFLT/NONE/, s/dflt/none/.
- [cff] Allow `hlineto' and `vlineto' without arguments.
+2013-12-10 Werner Lemberg <wl@gnu.org>
- We simply ignore such instructions. This is invalid, but it doesn't
- harm; and indeed, there exist such subsetted fonts in PDFs.
+ [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
- Reported by Albert Astals Cid <aacid@kde.org>.
+2013-12-10 Werner Lemberg <wl@gnu.org>
- * src/cff/cffgload.c (cff_decoder_parse_charstrings)
- [cff_op_hlineto]: Ignore instruction if there aren't any arguments
- on the stack.
+ [truetype] Fix scaling of vertical phantom points.
-2010-11-28 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
+ pp4.x also.
- * Version 2.4.4 released.
+2013-12-10 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix positioning of composite glyphs.
+ Problem reported by Nigel Tao <nigeltao@golang.org>.
+
+ * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
+ the glyph (component) by a fractional value computed from the LSB
+ phantom point. This is wrong, since the horizontal phantom points
+ get rounded horizontally later on.
+
+2013-12-08 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.5.2 released.
=========================
- Tag sources with `VER-2-4-4'.
+ Tag sources with `VER-2-5-2'.
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.5.2.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
+ builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2005-ce/index.html,
+ builds/wince/vc2008-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
+
+ * builds/unix/configure.raw (version_info): Set to 17:1:11.
+ * CMakeLists.txt (VERSION_PATCH): Set to 2.
* docs/CHANGES: Updated.
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.4.4
+2013-12-07 Werner Lemberg <wl@gnu.org>
- * 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,
+ [truetype] Next round in phantom point handling.
+
+ Greg Hitchcock provided very interesting insights into the
+ complicated history of the horizontal positions of the TSB and BSB
+ phantom points.
+
+ * src/truetype/ttgload.c (TT_LOADER_SET_PP)
+ [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
+ `grayscale_hinting' flags as conditionals for the x position of TSB
+ and BSB.
+
+2013-12-05 Werner Lemberg <wl@gnu.org>
+
+ * builds/freetype.mk (FT_CC): Removed. Unused.
+
+2013-12-04 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix handling of embedded bitmap strikes.
+
+ This corrects the commit from 2013-11-21. Problem reported by
+ Andrey Panov <panov@canopus.iacp.dvo.ru>.
+
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
+ detect excessive bytes for bit-aligned bitmaps.
+
+2013-12-03 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Remove dead code.
+
+ Reported by Nigel Tao <nigeltao@golang.org>.
+
+ * include/internal/tttypes.h (TT_LoaderRec): Remove unused
+ `preserve_pps' field.
+ * src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
+
+2013-12-03 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix phantom point handling.
+
+ This is a further improvement to the changes from 2013-11-06.
+
+ * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
+ are rounded horizontally, vertical ones are rounded vertically.
+ (TT_LOADER_SET_PP): The horizontal position of vertical phantom
+ points in pre-ClearType mode is zero, as shown in the OpenType
+ specification.
+
+2013-12-02 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix change from 2013-11-20.
+
+ Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
+ `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
+ `IS_HINTED' clause.
+ Also remove redundant check using `maxSizeOfInstructions' – in
+ simple glyphs, the bytecode data comes before the outline data, and
+ a validity test for this is already present.
+
+2013-11-27 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix use of dumping functions in `ftgrid' demo program.
+
+ * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
+ (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
+ af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
+ handle output to stdout.
+ Use AF_DUMP.
+ (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
+ af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
+
+2013-11-25 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.5.1 released.
+ =========================
+
+
+ Tag sources with `VER-2-5-1'.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.5.1.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
- builds/wince/vc2008-ce/index.html: s/2.4.3/2.4.4/, s/243/244/.
+ builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
- * builds/unix/configure.raw (version_info): Set to 12:2:6.
+ * builds/unix/configure.raw (version_info): Set to 17:0:11.
+ * CMakeLists.txt (VERSION_PATCH): Set to 1.
+ * docs/CHANGES, docs/release: Updated.
-2010-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
+2013-11-23 Werner Lemberg <wl@gnu.org>
- [ftsmooth]: Minor code simplification.
+ [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
- * src/smooth/ftgrays (gray_render_cubic): Do only one comparison
- instead of two.
+ * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
+ TRICK_NAMES_COUNT): Updated.
+ (trick_names): Add family name for the two fonts.
-2010-11-26 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
+2013-11-23 Werner Lemberg <wl@gnu.org>
- [truetype] Better multi-threading support.
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
- * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
- references.
+2013-11-21 Werner Lemberg <wl@gnu.org>
-2010-11-23 John Tytgat <John.Tytgat@esko.com>
+ [sfnt] Typo.
- * 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).
+ Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
-2010-11-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
+ value if the font lacks an `OS/2' table.
- [truetype] Identify the tricky fonts by cvt/fpgm/prep checksums.
- Some Latin TrueType fonts are still expected to be unhinted.
- Fix Savannah bug #31645.
+2013-11-21 Werner Lemberg <wl@gnu.org>
- * 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.
+ [sfnt] Improve handling of buggy embedded bitmap strikes.
-2010-11-18 Werner Lemberg <wl@gnu.org>
+ We are now able to successfully load `AppleMyoungJo.ttf'.
+ Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
- [truetype] Fix `loca' handling for inconsistent number of glyphs.
- Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
+ format.
- * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing,
- handle case where `loca' is the last table in the font.
+2013-11-20 Werner Lemberg <wl@gnu.org>
-2010-11-18 Werner Lemberg <wl@gnu.org>
+ [truetype] Don't trust `maxp's `maxSizeOfInstructions'.
- [sfnt] Ignore all errors while loading `OS/2' table.
- Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
+ Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
- * src/sfnt/sfobjs.c (sfnt_load_face): Do it.
+ http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
-2010-11-18 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
+ for details.
- [type1] Fix matrix normalization.
+ * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
+ tables also for setting `autohint'.
- * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
- factor.
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
+ `TT_Process_Composite_Glyph' for handling unreliable values of
+ `maxSizeOfInstructions'.
-2010-11-18 Werner Lemberg <wl@gnu.org>
+2013-11-16 Werner Lemberg <wl@gnu.org>
- [type1] Improve guard against malformed data.
- Based on a patch submitted by Johnson Y. Yan
- <yinsen_yan@foxitsoftware.com>
+ [sfnt] Fix `OS/2' table version 5 support.
- * src/type1/t1load.c (read_binary_data): Check `size'.
+ We now follow the `official' announcement from Microsoft (on the
+ OpenType mailing list, which unfortunately hasn't a public archive).
-2010-11-17 Werner Lemberg <wl@gnu.org>
+ * include/freetype/tttables.h (TT_OS2):
+ s/usLowerPointSize/usLowerOpticalPointSize/,
+ s/usUpperPointSize/usUpperOpticalPointSize/.
- [sfnt] While tracing, output table checksums also.
+ * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
+ default values.
- * src/sfnt/ttload.c (tt_face_load_font_dir): Do it.
+2013-11-13 Werner Lemberg <wl@gnu.org>
-2010-11-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/unix/ft2unix.h: Remove. No longer necessary.
- [UVS] Fix `find_variant_selector_charmap', Savannah bug #31545.
+ * builds/unix/install.mk (install): Updated.
- 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.
+2013-11-13 Werner Lemberg <wl@gnu.org>
- * src/base/ftobjs.c (Fix find_variant_selector_charmap):
- Returns UVS cmap correctly.
+ Simplify header file hierarchy.
-2010-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+ This large patch changes the header file directory layout from
+ `include/freetype/...' to `include/...', effectively removing one
+ level. Since the file `ft2build.h' is also located in `include'
+ (and it stays there even after installation), all FreeType header
+ files are now in a single directory.
- [ftsmooth] Improve rendering.
+ Applications that use (a) `freetype-config' or FreeType's
+ `pkg-config' file to get the include directory for the compiler, and
+ (b) the documented way for header inclusion like
- * 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
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+ ...
- http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
+ don't need any change to the source code.
- and later mails in this thread.
+ * include/freetype/*: Move up to...
+ * include/*: ... this directory.
-2010-10-28 Werner Lemberg <wl@gnu.org>
+ * builds/amiga/include/freetype/*: Move up to...
+ * builds/amiga/include/*: ... this directory.
- [ftraster] Minor fixes.
+ */*: Essentially do `s@/freetype/@/@' where appropriate.
- Reported by Tom Bishop <wenlin@wenlin.com>.
+ * CMakeList.txt: Simplify.
+ * builds/unix/freetype-config.in, builds/unix/freetype2.in: For
+ `--cflags', return a single directory.
+ * builds/unix/install.mk (install): No longer try to remove `cache'
+ and `internal' subdirectories; instead, remove the `freetype'
+ subdirectory.
- * src/raster/ftraster.c (ULong): Remove unused typedef.
- (TWorker): Remove unused variable `precision_mask'.
+2013-11-12 Werner Lemberg <wl@gnu.org>
-2010-10-28 Werner Lemberg <wl@gnu.org>
+ [truetype] Fix last `truetype' commit.
- [ftraster] Fix rendering.
+ * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
+ Return error value.
+ (load_truetype_glyph): Updated.
- Problem reported by Tom Bishop <wenlin@wenlin.com>; see
- thread starting with
+2013-11-10 Werner Lemberg <wl@gnu.org>
- http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
+ * docs/CMAKE: New dummy file.
- * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
- since the involved multiplication exceeds 32 bits.
+2013-11-08 Dave Arnold <darnold@adobe.com>
-2010-10-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [cff] Fix for hints that touch.
- Revert a change of `_idx' type in `FTC_CACHE_LOOKUP_CMP'.
+ * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
+ finding index value of insertion point.
- * 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.
+2013-11-06 Werner Lemberg <wl@gnu.org>
-2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [truetype] Fix handling of phantom points in composite glyphs.
+ Problem reported by Nigel Tao <nigeltao@golang.org>.
- [cache] Change the hash types to FT_PtrDist.
+ This is a follow-up commit to the previous one.
- 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/truetype/ttgload.c (load_truetype_glyph): Call
+ `tt_get_metrics' after loading the glyph header.
- * 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.
+2013-11-06 Werner Lemberg <wl@gnu.org>
- * src/cache/ftccache.h (FTC_NodeRec): The type of the
- member `hash' is changed from FT_UInt32 to FT_PtrDist.
+ [truetype] Improve emulation of vertical metrics.
- * 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.
+ This commit also improves the start values of vertical phantom
+ points. Kudos to Greg Hitchcock for help.
- * 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.
+ * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
+ `yMax' value. Replace code with fixed Microsoft definition.
+ (tt_get_metrics): Updated.
+ (TT_LOADER_SET_PP): Add explanation how to initialize phantom
+ points, taken from both the OpenType specification and private
+ communication with Greg (which will eventually be added to the
+ standard).
+ Fix horizontal position of `pp3' and `pp4'.
-2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/truetype/ttgload.h: Updated.
- [cache] Hide internal macros incompatible with LLP64.
+ * src/truetype/ttdriver.c (tt_get_advances): Updated.
- `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.
+ * docs/CHANGES: Updated.
- For the history of these macros, see the investigation:
- http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
+2013-11-05 Werner Lemberg <wl@gnu.org>
-2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
+ PlatformToolSet version 110 is for VC2012.
- Change the type of `FT_MEM_VAL' from FT_ULong to FT_PtrDist.
+ Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
- 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.
+2013-11-05 Werner Lemberg <wl@gnu.org>
- * 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.
+ [truetype] Correctly reset point tags for glyph components.
+ Problem reported by Nigel Tao <nigeltao@golang.org>.
-2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
- Replace "%lx" for memory address by "%p", LLP64 platforms.
+2013-11-02 Werner Lemberg <wl@gnu.org>
- 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.
+ [truetype] Fix GETINFO opcode handling of subpixel hinting bits.
- * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p".
- (End_Profile) Ditto.
- * src/truetype/ttinterp.c (Init_Context): Ditto.
+ * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
+ get info on subpixel hinting.
-2010-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * docs/CHANGES: Updated.
- Fix thinko in spline flattening.
+2013-11-02 Werner Lemberg <wl@gnu.org>
- FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL.
+ Fix Savannah bug #40451.
- * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and
- replace it everywhere with ONE_PIXEL/8.
+ Simply apply the patch from the bug report.
-2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+ include/freetype/config/ftconfig.h: The used #pragma directives only
+ work with gcc versions 4.6 and higher.
- [raccess] Skip unrequired resource access rules by Darwin VFS.
+2013-11-01 Werner Lemberg <wl@gnu.org>
- 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
+ * docs/CHANGES: Updated.
- * 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.
+2013-11-01 Werner Lemberg <wl@gnu.org>
-2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [truetype] Minor code refactoring.
- [raccess] Grouping resource access rules based on Darwin VFS.
+ Two benefits: The allocated FDEF (and IDEF) array gets slightly
+ smaller, and the `ttdebug' demo program has access to function
+ numbers without additional costs.
- 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.
+ Fortunately, no changes to FontForge are necessary – this is the
+ only external TrueType debugger I know of, but others may exist and
+ should check the code accordingly.
- * 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.
+ * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
+ `Cur_End' with a pointer to the corresponding `TT_DefRecord'
+ structure.
-2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
+ Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
+ Updated.
- Prevent to open a FT_Stream for zero-sized file on non-Unix.
+2013-10-27 Werner Lemberg <wl@gnu.org>
- 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.
+ [sfnt] Implement support for `OS/2' table version 5.
- * 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.
+ See
-2010-10-12 Werner Lemberg <wl@gnu.org>
+ http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
- Fix Savannah bug #31310.
+ for the announcement.
- * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
- invalid `runcnt' values.
+ * include/freetype/tttables.h (TT_OS2): Add fields
+ `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
+ this structure only as a pointer through `FT_Get_Sfnt_Table', there
+ shouldn't be any ABI problems.
-2010-10-08 Chris Liddell <chris.liddell@artifex.com>
+ * src/sfnt/ttload.c (tt_face_load_os2): Implement it.
- Fix Savannah bug #31275.
+ * docs/CHANGES: Updated.
- * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H.
+2013-10-24 Werner Lemberg <wl@gnu.org>
-2010-10-06 Werner Lemberg <wl@gnu.org>
+ * README.git, docs/CHANGES, docs/INSTALL: Updated.
- [truetype] Improve error handling of `SHZ' bytecode instruction.
- Problem reported by Chris Evans <scarybeasts@gmail.com>.
+2013-10-24 John Cary <cary@txcorp.com>
- * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'.
+ Provide cmake support.
-2010-10-05 Werner Lemberg <wl@gnu.org>
+ * CMakeLists.txt: New file.
- Fix Savannah bug #31253.
- Patch submitted by an anonymous reporter.
+2013-10-23 Kenneth Miller <kennethadammiller@yahoo.com>
+ Werner Lemberg <wl@gnu.org>
- * configure: Use `awk' instead of `sed' to manipulate output of `ls
- -id'.
+ Provide support for x64 builds in Visual C++ project files.
-2010-10-03 Werner Lemberg <wl@gnu.org>
+ * src/builds/win32: Renamed to...
+ * src/builds/windows: This.
- * Version 2.4.3 released.
- =========================
+ * src/builds/windows/vc2010/*: Updated to handle x64 target.
+
+ * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
+ appropriate.
+
+2013-10-22 Werner Lemberg <wl@gnu.org>
+
+ * src/base/md5.c, src/base/md5.h: Updated to recent version.
+
+ * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
+
+ The canonical URL to get updates for this file is
+
+ http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
+
+ as the author told me in private communication.
+
+2013-10-19 Werner Lemberg <wl@gnu.org>
+
+ [autofit] s/SMALL_TOP/X_HEIGHT/.
+
+ * src/autofit/afblue.dat: Updated.
+
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/aflatin.c, src/autofit/aflatin.h,
+ src/autofit/atlatin2.c: Updated.
+
+2013-10-19 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
+
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+2013-10-16 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Add description strings to script entries.
+
+ Currently, this is unused.
+
+ * src/autofit/afscript.h: Do it.
+ * src/autofit/afglobal.c, src/autofit/afpic.c,
+ src/autofit/aftypes.h: Updated.
+
+2013-10-16 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve tracing message for extra light flag.
+
+ * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
+
+2013-10-15 Chongyu Zhu <lembacon@gmail.com>
+
+ [arm] Fix thumb2 inline assembly under LLVM.
+
+ When using `ADD' with an immediate operand, the instruction is
+ actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
+ immediate operand cannot exceed 4095. It will fail to compile with
+ LLVM.
+
+ However, in GCC, due to some legacy compatibility considerations,
+ `ADD.W' will be automatically emitted when the immediate operand is
+ larger than 4095.
+
+ * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
+ (FT_MulFix_arm) [__GNUC__]: Support clang compiler.
+
+ * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
+
+2013-10-12 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve tracing of `latin' hinter.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
+ zone types.
+ (af_latin_metrics_scale_dim): Report scaling changes due to x height
+ alignment.
+ Report scaled stroke width and blue zone values.
+
+2013-10-03 Dave Arnold <darnold@adobe.com>
+
+ * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
+
+ Note that the old code avoided using a region of the piecewise
+ linear function where the slope was zero. The recovery was to use a
+ different section of the function, which produced a different,
+ incorrect amount of darkening.
+
+2013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us>
+
+ * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
+2013-10-02 Dave Arnold <darnold@adobe.com>
- Tag sources with `VER-2-4-3'.
+ * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
+
+ This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect
+ is to use a previous darkening amount when producing an unhinted,
+ unscaled outline. This can cause autohint samples in ftgrid and
+ ftview to be based on darkened CFF outlines instead of unhinted,
+ undarkened ones.
+
+2013-09-29 Dave Arnold <darnold@adobe.com>
+
+ Fix Savannah bug #39295.
+
+ The bug was caused by switching to the initial hintmap (the one in
+ effect when `moveto' executes) just before drawing the final element
+ in the charstring. This ensured that the path was closed (in both
+ Character Space and Device Space). But if the final element was a
+ curve and if the final hintmap was different enough from the initial
+ one, then the curve was visibly distorted.
+
+ The first part of the fix is to draw the final curve using the final
+ hintmap as specified by the charstring. This corrects the
+ distortion but does not ensure closing in Device Space. It may
+ require the rasterizer to automatically generate an extra closing
+ line. Depending on the hintmap differences, this line could be from
+ zero to a couple pixels in length.
+
+ The second part of the fix covers the case where the charstring
+ subpath is closed with an explicit line. We now modify that line's
+ end point to avoid the distortion.
+
+ Some glyphs in the bug report font (TexGyreHeros-Regular) that show
+ the change are:
+
+ 25ppem S (98)
+ 24ppem eight (52)
+ 25.5ppem p (85)
+
+ Curves at the *end* of a subpath are no longer distorted. However,
+ some of these glyphs have bad hint substitutions in the middle of a
+ subpath, and these are not affected.
+
+ The patch has been tested with a set of 106 fonts that shipped with
+ Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
+ Google Fonts. There are 1.5 million glyphs, of which some 20k are
+ changed with the fix. A sampling of a few hundred of these changes
+ have been examined more closely, and the changes look good (or at
+ least acceptable).
+
+ * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
+ to indicate that we synthesize a closepath line.
+
+ * src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
+ (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
+ `lineto' operator) and adjust hint zone.
+ For synthesized closing lines, use end point in first hint zone.
+ (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In
+ particular, shift the detection of zero-length lines from character
+ space to device space.
+ (cf2_glyphpath_closeOpenPath): Remove assertion.
+ Updated.
+
+2013-09-25 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
+
+2013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [bdf, pcf] Refuse non-zero face_index.
+
+ Suggested by Akira Tagoh, see
+
+ http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
+ error if the font could be opened but non-zero `face_index' is
+ given.
+ * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
+
+ * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
+ macro for `face_index' because it is validated later.
+
+2013-09-23 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #40090.
+
+ * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
+ 306f8c5d (from 2013-08-25) affecting this function.
+
+2013-09-22 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Disunify Cyrillic and Greek handling from Latin.
+
+ * src/autofit/afscript.h: Add Cyrillic and Greek.
+
+ * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
+ AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
+ (AF_BLUE_STRINGSET_LATN): Fix typo.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
+ arrays.
+ (af_grek_script_class, af_cyrl_script_class): New scripts.
+ * src/autofit/aflatin.h: Updated.
+
+2013-09-20 Werner Lemberg <wl@gnu.org>
* docs/CHANGES: Updated.
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.4.3
+2013-09-20 Behdad Esfahbod <behdad@behdad.org>
- * 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/.
+ Fix vertical size of emboldened glyphs.
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
+ Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
- * builds/unix/configure.raw (version_info): Set to 12:1:6.
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
+ also.
-2010-10-03 Werner Lemberg <wl@gnu.org>
+2013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
- Avoid `configure' issues with symbolic links.
- Based on a patch from Alexander Stohr <Alexander.Stohr@gmx.de>.
+ * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
+ algorithm description.
- * configure: Compare directories using `ls -id'.
- Check existence of `reference' subdirectory before creating it.
+2013-09-11 Werner Lemberg <wl@gnu.org>
-2010-10-02 Werner Lemberg <wl@gnu.org>
+ [autofit] Improve Hebrew rendering.
- Fix Savannah bug #31088 (sort of).
+ This change introduces a new blue zone property
+ `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
+ top segments.
- * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64
- function entries.
+ * src/autofit/afblue.dat: Fix Hebrew blue strings.
+ Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
-2010-10-02 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
- [smooth] Fix splitting of cubics for negative values.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Updated.
- Reported by Róbert Márki <gsmiko@gmail.com>; see
- http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
+ `AF_LATIN_IS_LONG_BLUE'.
- * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
+ * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
-2010-10-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2013-08-28 Behdad Esfahbod <behdad@google.com>
- Fix Savannah bug #31040.
+ [sfnt] Fix frame access while reading WOFF table directory.
- * src/truetype/ttinterp.c (free_buffer_in_size): Remove.
- (TT_RunIns): Updated.
+ * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
+ while reading the directory entries for the whole loop.
-2010-09-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2013-08-29 Werner Lemberg <wl@gnu.org>
+ Behdad Esfahbod <behdad@google.com>
- [sfnt] Make error message filling NULL names less verbose.
+ Implement support for WOFF containers.
- * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message
- when we fill `post' names by NULL, instead of per-entry message.
+ We simply synthesize a SFNT from the WOFF, create a memory stream
+ for the new data, and load the SFNT as usual.
-2010-09-20 Graham Asher <graham.asher@btinternet.com>
- David Bevan <david.bevan@pb.com>
+ Does NOT add any API to access WOFF metadata or private blocks.
- [smooth] Fix and improve spline flattening.
+ * include/freetype/internal/tttypes.h (WOFF_HeaderRec,
+ WOFF_TableRec): New structures.
- This fixes the flattening of cubic, S-shaped curves and speeds up
- the handling of both the conic and cubic arcs.
+ * include/freetype/tttags.h (TTAG_wOFF): New macro.
- See the discussions on the freetype-devel mailing list in late
- August and September 2010 for details.
+ * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
+ `open_face'.
- * 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.
+ * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
+ `FT_GZIP_H'.
+ (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
+ writing to a stream.
+ (sfnt_stream_close, compare_offsets, woff_open_font): New functions.
+ (sfnt_open_font): Handle `TTAG_wOFF'.
+ (sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
-2010-09-19 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
+ `sfnt->init_face'.
- Minor fixes.
+ * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
+ argument so that a changed stream survives.
+ Update callers.
- * 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'.
+2013-08-28 Werner Lemberg <wl@gnu.org>
+
+ [gzip] New function `FT_Gzip_Uncompress'.
+
+ This is modeled after zlib's `uncompress' function. We need this
+ for WOFF support.
+
+ * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
+ New function.
-2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/gzip/rules.mk: Rewrite to better reflect dependencies.
- [cff] Truncate the element length at the end of the stream.
- See Savannah bug #30975.
+2013-08-28 Werner Lemberg <wl@gnu.org>
- * 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.
+ [autofit] Fix `make multi' compilation.
-2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
+ `afblue.h' but `aftypes.h'.
+ * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
- [cff] Ignore CID > 0xFFFFU.
- See Savannah bug #30975.
+2013-08-28 Werner Lemberg <wl@gnu.org>
- * 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.
+ [autofit] Fix C++ compilation.
-2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afglobal.c (af_face_globals_get_metrics),
+ src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
+ (af_deva_script_class): Use proper casts.
- [cff] Make trace message in` cff_charset_load' verbose.
- See Savannah bug #30975.
+2013-08-27 Behdad Esfahbod <behdad@google.com>
- * src/cff/cffload.c (cff_charset_load): Report the original `nleft'
- and truncated `nleft'.
+ * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
-2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2013-08-27 Behdad Esfahbod <behdad@google.com>
- [cff] Correct `max_cid' from CID array length to max CID.
- See Savannah bug #30975.
+ FT_Open_Face: Improve external stream handling.
- * 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.
+ If the font's `clazz->init_face' function wants to swap to new
+ stream, handling of whether original stream was external could
+ result to either memory leak or double free. Mark externality into
+ face flags before calling `init_face' such that the clazz can handle
+ external streams properly.
-2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftobjs.c (FT_Open_Face): Move code to set
+ FT_FACE_FLAG_EXTERNAL_STREAM to...
+ (open_face): This function.
- [truetype] Sanitize the broken offsets in `loca'.
- See Savannah bug #31040.
+2013-08-27 Werner Lemberg <wl@gnu.org>
- * 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.
+ Remove `FT_SqrtFixed' function.
-2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ It's no longer used.
- [sfnt] Prevent overrunning in `post' table parser.
- See Savannah bug #31040.
+ * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
- * 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.
+2013-08-27 Werner Lemberg <wl@gnu.org>
-2010-09-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [autofit] While tracing, report script names instead of ID values.
- [truetype] Don't duplicate size->twilight structure to be freed.
- See Savannah bug #31040 for detail.
+ * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
+ New array.
+ * src/autofit/afglobal.h: Updated.
- * 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.
+ * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
+ af_cjk_hint_edges): Use `af_script_names'.
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths,
+ af_latin_hint_edges): Ditto.
-2010-09-15 Werner Lemberg <wl@gnu.org>
+2013-08-26 Werner Lemberg <wl@gnu.org>
- Make bytecode debugging with FontForge work again.
+ [autofit] Report used script while hinting a glyph.
- * src/truetype/ttinterp.c (TT_RunIns): Don't call
- `free_buffer_in_size' in case of error if a debugger is active.
+ * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
+ (af_latin_hint_edges): Implement it.
-2010-09-14 Werner Lemberg <wl@gnu.org>
+2013-08-26 Werner Lemberg <wl@gnu.org>
+ [autofit] Add support for Hebrew script.
+
+ * src/autofit/afblue.dat: Add blue strings for Hebrew.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/aflatin.c (af_hebr_uniranges): New array.
+ (af_hebr_script_class): New script.
+ * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
+
+2013-08-26 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve tracing messages.
+
+ * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
+ ID in tracing message.
+ (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
+ loop.
Improve tracing messages.
+ (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
+ `num_actions' to count hinting actions.
+ Improve tracing messages.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
+ script ID in tracing message.
+ (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
+ messages.
+
+2013-08-26 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing
+ Better tracing of loaded glyphs.
+
+ Previously, the loading of a glyph was traced at level 4, if at all.
+ With this change, all font loading routines emit a tracing message
+ at level 1, making it easier to select tracing output (for example
+ using F2_DEBUG="any:1 afhints:7 aflatin:7").
+
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
+ * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
+ * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
+ messages.
+ * src/cid/cidgload.c (cid_load_glyph): Use level 1 for 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.
+ * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
+ * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
+ * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
+ * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
+ * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
-2010-09-13 Werner Lemberg <wl@gnu.org>
+2013-08-26 Werner Lemberg <wl@gnu.org>
- Fix minor issues reported by <muktha.narayan@wipro.com>.
+ [autofit] Fix script selection.
- * 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'.
+ * src/autofit/afglobal.c (af_face_globals_get_metrics): Use
+ `AF_SCRIPT_DFLT', not value 0.
+ Simplify code.
-2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afscript.h: Sort by script name.
- 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
+2013-08-26 Werner Lemberg <wl@gnu.org>
- * 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).
+ [autofit] Make `dummy' hinter work as expected.
-2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
+ information.
+ (af_dummy_hints_apply): Scale the glyphs.
- [truetype] Decrease the trace level catching the interpreter error.
+2013-08-25 Werner Lemberg <wl@gnu.org>
- * 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'.
+ [autofit] Make `cjk' module use blue stringsets.
-2010-08-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
+ (af_cjk_hani_blue_chars): Removed.
+ (AF_CJK_BLUE_TYPE_*): Removed.
+ (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
+ AF_BLUE_STRING_MAX_LEN.
+ Change loops to use offsets (in file `afblue.h') into the new arrays
+ `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
+ Instead of three dimensions (as used in the old blue string array)
+ we now use properties to do the same, saving one loop nesting level.
- [truetype] Prevent bytecode reuse after the interpretation error.
+ * src/autofit/afcjk.h: Remove old enumeration values superseded by
+ the new data in `afblue.h'.
+ (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
+ AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
+ `af_cjk_metrics_init_blues'.
+ (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
+ (AF_CJK_BLUE_IS_TOP): Renamed to...
+ (AF_CJK_BLUE_TOP): This.
+ (AF_CJK_MAX_BLUES): Remove.
+ (AF_CJKAxisRec): Updated.
- * 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.
+2013-08-25 Werner Lemberg <wl@gnu.org>
- This fixes Savannah bug #30798, reported by Robert Święcki.
+ [autofit] Typo.
-2010-08-29 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
+ cast.
- [ftraster] Pacify compiler.
+2013-08-25 Werner Lemberg <wl@gnu.org>
- * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is
- not used.
+ [autofit] Synchronize `cjk' with `latin' module (and vice versa).
-2010-08-29 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
+ messages.
+ (af_cjk_metrics_init_blues): Don't pass blue string array as
+ argument but use the global array directly.
+ Use `outline' directly.
+ Update and add tracing messages.
+ (af_cjk_metrics_init): Simplify code.
+ (af_cjk_metrics_scale_dim): Improve tracing message.
+ (af_cjk_metrics_scale): Synchronize.
- [cff] Allow SIDs >= 65000.
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths,
+ af_latin_metrics_init_blues): Improve and add tracing messages.
- * 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.
+2013-08-25 Werner Lemberg <wl@gnu.org>
- Problem reported by Ivan NinÄić <inincic@pdftron.com>.
+ [autofit] Make `latin' module use blue stringsets.
-2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
+ (af_latin_blue_chars): Removed.
+ (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
+ with AF_BLUE_STRING_MAX_LEN.
+ Change loops to use offsets (in file `afblue.h') into the new arrays
+ `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
+ Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
- Force hinting when the font lacks its familyname.
+ * src/autofit/aflatin.h: Remove old enumeration values superseded by
+ the new data in `afblue.h'.
+ (AF_LATIN_IS_TOP_BLUE): Updated definition.
+ (AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
+ (AF_LATIN_MAX_BLUES): Remove.
+ (AF_LatinAxisRec): Updated.
- 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:
+2013-08-25 Werner Lemberg <wl@gnu.org>
- http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
- http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
+ [autofit] Add blue stringsets.
- * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
- nameless font is given, TRUE is returned to enable hinting.
+ * src/autofit/aftypes.h: Include `afblue.h'.
+ (AF_ScriptClassRec): Add `blue_stringset' field.
+ (AF_DEFINE_SCRIPT_CLASS): Updated.
-2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/autofit.c: Include `afblue.c'.
- Register yet another tricky TrueType font.
+ * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
+ (af_dflt_script_class), src/autofit/afindic.c
+ (af_deva_script_class), src/autofit/aflatin.c
+ (af_latn_script_class), src/autofit/aflatin2.c
+ (af_ltn2_script_class): Updated.
- * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?',
- a Kaishu typeface paired with `HuaTianSongTi?' by Huatian
- Information Industry.
+ * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
-2010-08-17 Teijo Kinnunen <Teijo.Kinnunen@nuance.com>
+2013-08-25 Werner Lemberg <wl@gnu.org>
- Fix Savannah bug #30788.
+ [autofit] Introduce data file for blue strings.
- * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for
- NULL too.
+ The idea is to have a central file which gets processed by a Perl
+ script to create proper `.c' and `.h' files using templates. There
+ are two other reasons to do that:
-2010-08-10 Werner Lemberg <wl@gnu.org>
+ . The data file should be easily readable. We use UTF-8 encoding
+ which then gets converted to single bytes.
- Try to fix Savannah bug #30717 (and probably #30719 too).
+ . Since the number of supported scripts will increase soon, the
+ current usage of blue string arrays is a waste of space. Using
+ the Perl script it is possible to imitate jagged arrays,
+ defining enumeration constants as offsets into the arrays.
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
- overflow test for `width' and `height'.
+ This commit only adds files without changing any functionality.
-2010-08-06 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afblue.dat: New data file.
+ * src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
- * Version 2.4.2 released.
- =========================
+ * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
+ for...
+ * src/autofit/afblue.c, src/autofit/afblue.c: New source files.
+ To avoid a dependency on Perl, we add them too.
+2013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
- Tag sources with `VER-2-4-2'.
+ [base] Enable new algorithm for `BBox_Cubic_Check'.
- * docs/CHANGES: Updated.
+ * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
+ the old one.
+ Improve comments.
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.4.2
+2013-08-18 Werner Lemberg <wl@gnu.org>
- * 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/.
+ * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
+2013-08-18 Werner Lemberg <wl@gnu.org>
- * builds/unix/configure.raw (version_info): Set to 12:0:6.
+ Fix Savannah bug #39804.
-2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * builds/unix/configure.raw (LIBPNG): Define and export.
+ * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
+ libpng.
- Fix Savannah bug #30648.
+2013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
- * 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.
+ [base] Clean up BBox_Conic_Check.
-2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
+ * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
+ extremum at the segment ends, which are already within the bbox.
+ Slightly modify calculations.
- [raster] Fix valgrind warning.
+2013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/raster/ftraster.c (Decompose_Curve) <default>: Access point[0]
- only if we don't hit `limit'.
+ [base] Finish experimental (disabled) BBox_Cubic_Check implementation.
-2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
+ accuracy and avoid overflows.
- Fix Savannah bug #30658.
+2013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total
- length of collected POST segments does not overrun the allocated
- buffer.
+ [base] Refactor experimental (disabled) BBox_Cubic_Check.
-2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
+ * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
+ as the mirror image of the maximum search implemented here...
+ (update_max): New function.
- Fix conditional usage of FT_MulFix_i386.
- With -ansi flag, gcc does not define `i386', only `__i386__'.
+2013-08-06 John Tytgat <John.Tytgat@esko.com>
- * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in:
- s/i386/__i386__/.
+ Fix Savannah bug #39702.
-2010-08-05 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
+ != 0'; this stronger test is mandated by the CFF specification.
+ Fix test for INDEX structures which have one or more empty entries
+ at the end.
- Fix Savannah bug #30657.
+2013-08-05 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (BOUNDSL): New macro.
- Change `BOUNDS' to `BOUNDSL' where appropriate.
+ Fix gcc pragmas, part 2.
- * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of
- `cvtSize'.
+ * src/truetype/ttinterp.c (TT_MulFix14_long_long,
+ TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
+ introduced with gcc version 4.6.
-2010-08-05 Werner Lemberg <wl@gnu.org>
+2013-08-05 Werner Lemberg <wl@gnu.org>
- Fix Savannah bug #30656.
+ Fix gcc pragmas.
- * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative
- string_size.
- Fix comparison.
+ * src/truetype/ttinterp.c (TT_MulFix14_long_long,
+ TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
+ pragmas within a function body.
-2010-08-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2013-08-05 Werner Lemberg <wl@gnu.org>
- [cff] Don't use any values in decoder after parsing error.
+ Fix Savannah bug #39700.
- * src/cff/cffgload.c (cff_slot_load): Skip the evaluations
- of the values in decoder, if `cff_decoder_parse_charstrings'
- returns any error.
+ * builds/unix/ftconfig.h: Synchronize with
+ `include/freetype/config/ftconfig.h'.
-2010-08-04 Werner Lemberg <wl@gnu.org>
+ * builds/vms/ftconfig.h: Ditto.
+ Make the differences to the master `ftconfig.h' file as small as
+ possible for easier maintainance.
- Fix Savannah bug #30644.
+2013-08-05 Werner Lemberg <wl@gnu.org>
- * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
+ [autofit] Improve handling of `near' points.
-2010-08-04 Werner Lemberg <wl@gnu.org>
+ Points which are very near to each other are now marked as such.
+ The `weak' flag is then computed by using the `in' vector of the
+ first and the `out' vector of the last point of a group of near
+ points.
- `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
+ For example, this fixes the rendering of glyph `Oslash' in
+ `Roboto-Thin.ttf'.
- * devel/ftoption.h: Synchronize with
- include/freetype/config/ftoption.h.
+ * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
-2010-08-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afhints.c (af_glyph_hints_reload): Introduce
+ the heuristic value `near_limit' to decide whether the current point
+ is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
+ Store good `in' vector (of last non-near point) in
+ `last_good_in_{x,y}' and use it as an argument to
+ `ft_corner_is_flat' if necessary.
- [cff] Improve stack overflow test.
+2013-08-02 Werner Lemberg <wl@gnu.org>
- * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack
- after execution of operations too.
+ * include/freetype/ftcffdrv.h: Improve documentation.
+ This is based on blog entries from David Lemon and Dave Arnold (both
+ from Adobe) with kind permission. Dave also helped in
+ proof-reading.
-2010-07-18 Werner Lemberg <wl@gnu.org>
+2013-08-02 Werner Lemberg <wl@gnu.org>
- Add reference counters and to FT_Library and FT_Face objects.
+ [autofit] Move declaration of scripts into separate file.
- * include/freetype/freetype.h (FT_Reference_Face): New function.
- * include/freetype/ftmodapi.h (FT_Rererence_Library): New function.
+ This has the benefit that we don't need to duplicate the data at
+ different places.
- * include/freetype/internal/ftobjs.h (FT_Face_InternalRec,
- FT_LibraryRec): New field `refcount'.
+ * src/autofit/afscript.h: New file.
- * 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'.
+ * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
+ the enumeration values.
- * docs/CHANGES: Updated.
+ * src/autofit/afglobal.c: Include `afscript.h' to get the script
+ specific header files.
+ (af_script_classes): Include `afscript.h' to fill this array.
-2010-07-18 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afpic.c: Include `afscript.h' to get the script
+ specific header files.
+ (autofit_module_class_pic_init): Include `afscript.h' for
+ initialization.
+ * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
+ AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead.
- * Version 2.4.1 released.
- =========================
+ * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
+2013-08-02 Werner Lemberg <wl@gnu.org>
- Tag sources with `VER-2-4-1'.
+ [autofit] Move declaration of writing systems into separate file.
- * docs/CHANGES: Updated.
+ This has the benefit that we don't need to duplicate the data at
+ different places.
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.4.1.
+ * src/autofit/afwrtsys.h: New file.
- * 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/.
+ * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
+ define the enumeration values.
- * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
+ * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
+ system specific header files.
+ Include `afpic.h'.
+ (af_writing_system_classes): Include `afwrtsys.h' to fill this
+ array.
- * builds/unix/configure.raw (version_info): Set to 11:1:5.
+ * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
+ system specific header files.
+ (autofit_module_class_pic_init): Include `afwrtsys.h' for
+ initialization.
+ * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
+ AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use
+ `AF_WRITING_SYSTEM_MAX' instead.
-2010-07-17 Werner Lemberg <wl@gnu.org>
+2013-08-02 Werner Lemberg <wl@gnu.org>
- [cff] Final try to fix `hintmask' and `cntrmask' limit check.
+ [sfnt] Fix compilation with g++.
- Problem reported by Tobias Wolf <towolf@gmail.com>.
+ * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
+ cast.
+ (Load_SBit_Png): Pacify compiler.
- * 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.
+2013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Werner Lemberg <wl@gnu.org>
-2010-07-12 Werner Lemberg <wl@gnu.org>
+ [autofit] Fix `make multi'.
- * Version 2.4.0 released.
- =========================
+ * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
+ FT_LOCAL_ARRAY_DEF): New macros.
+ * src/autofit/afglobal.c (af_writing_system_classes,
+ af_script_classes): Use FT_LOCAL_ARRAY_DEF.
+ * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
+ `af_script_classes'.
+ * src/autofit/afloader.c: Include `afpic.h'.
- Tag sources with `VER-2-4-0'.
+2013-08-01 Werner Lemberg <wl@gnu.org>
- * docs/CHANGES: Updated.
+ Another round of cppcheck nitpicks.
- * docs/VERSION.DLL: Update documentation and bump version number to
- 2.4.0.
+ The call was (from the top-level of the FreeType tree):
- * 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/.
+ cppcheck --force \
+ --enable=all \
+ -I /usr/include \
+ -I /usr/local/include \
+ -I /usr/lib/gcc/i586-suse-linux/4.7/include \
+ -I include \
+ -I include/freetype \
+ -I include/freetype/config \
+ -I include/freetype/internal \
+ -DFT2_BUILD_LIBRARY \
+ . &> cppcheck.log
- * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4.
- (FREETYPE_PATCH): Set to 0.
+ using cppcheck git commit f7e93f99.
- * builds/unix/configure.raw (version_info): Set to 11:0:5.
+ Note that cppcheck still can't handle `#include FOO' (with `FOO' a
+ macro).
-2010-07-12 Werner Lemberg <wl@gnu.org>
+ */* Improve variable scopes.
+ */* Remove redundant initializations which get overwritten.
- Remove C++ warnings.
+ * src/gxvalid/*: Comment out redundant code or guard it with
+ FT_DEBUG_LEVEL_TRACE.
- */*: Initialize pointers where necessary to make g++ happy.
+2013-07-30 Werner Lemberg <wl@gnu.org>
-2010-07-12 malc <av1474@comtv.ru>
- Richard Henderson <rth@redhat.com>
+ [autofit] Introduce `writing systems'.
- Fix type-punning issues with C++.
+ This patch adds a new top level to the auto-hinter's script class
+ hierarchy. It defines `writing systems' which can contain multiple
+ scripts.
- * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]:
- Emulate a `typeof' operator with an inline template which uses
- `static_cast'.
+ For example, the `latin' writing system (in file `aflatin.c') is
+ able to support scripts like Latin, Cyrillic, Armenian, etc., which
+ can be handled similarly.
-2010-07-11 Werner Lemberg <wl@gnu.org>
+ Scripts are now named using four-letter OpenType tags.
- Fix C++ compilation issue.
+ * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
+ to...
+ (AF_WritingSystemClassRec): This new structure. It holds pointers
+ to functions which can be shared among related scripts.
+ (AF_WritingSystem): New enumeration.
+ (AF_Script): Revised values using four-letter tags.
+ (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
+ (AF_DEFINE_SCRIPT_CLASS): Updated.
- * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
- type of `dot' variable.
+ * src/autofit/afglobal.c (af_writing_system_classes): New global,
+ constant array.
+ (af_script_classes): Updated.
+ (af_face_globals_free): Updated.
+ Remove assertion.
+ (af_face_globals_get_metrics): Updated.
-2010-07-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
+ [!AF_CONFIG_OPTION_CJK]: Handle this case.
- Fix another case reported in Savannah bug #30373.
- Permit a face for Type1, Type42 and CFF without charmap,
- patch by Tor Andersson.
+ * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
+ Updated.
- * 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.
+ * src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
+ initialize structures for both writing systems and scripts.
+ * src/autofit/afpic.h: Updated.
+ (AF_WRITING_SYSTEM_CLASSES_GET): New macro.
-2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
+ system.
+ (af_cjk_uniranges): Renamed to...
+ (af_hani_uniranges): This.
+ (af_cjk_script_class): Reduced and renamed to...
+ (af_hani_script_class): This.
+ * src/autofit/afcjk.h: Updated.
- Use defined macros to set {platform,encoding}_id.
+ * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
+ system.
+ (af_dummy_script_class): Reduced and renamed to...
+ (af_dflt_script_class): This.
+ * src/autofit/afdummy.h: Updated.
- * 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.
+ * src/autofit/afindic.c (af_indic_writing_system_class): New writing
+ system.
+ (af_indic_uniranges): Renamed to...
+ (af_deva_uniranges): This.
+ (af_indic_script_class): Reduced and renamed to...
+ (af_deva_script_class): This.
+ * src/autofit/afcjk.h: Updated.
-2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/autofit/aflatin.c (af_latin_writing_system_class): New writing
+ system.
+ (af_latin_uniranges): Renamed to...
+ (af_latn_uniranges): This.
+ (af_latin_script_class): Reduced and renamed to...
+ (af_latn_script_class): This.
+ * src/autofit/aflatin.h: Updated.
- Fix Savannah bug #30373.
- Too serious check of errors by `FT_CMap_New' since 2010-07-04
- is fixed. Reported by Tor Andersson.
+ * src/autofit/aflatin2.c (af_latin2_writing_system_class): New
+ writing system.
+ (af_latin2_uniranges): Renamed to...
+ (af_ltn2_uniranges): This.
+ Synchronize ranges with `latin'.
+ (af_latin2_script_class): Reduced and renamed to...
+ (af_ltn2_script_class): This.
+ * src/autofit/aflatin2.h: Updated.
- * 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.
+2013-07-30 Werner Lemberg <wl@gnu.org>
- * 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.
+ [autofit] Variable renaming.
- * 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.
+ * src/autofit/aftypes.h (AF_ScriptMetricsRec):
+ s/clazz/script_class/.
+ Update all users.
-2010-07-09 Ken Sharp <ken.sharp@artifex.com>
+2013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- Make ftraster.c compile in stand-alone mode with MSVC compiler.
+ Ignore libpng-config under cross-building configuration,
+ because it will return the flags for the hosting environment.
- * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
- since there is no `inttypes.h' for MSVC.
+ * builds/unix/configure.raw: Ignore libpng-config when
+ `cross_compiling' == yes.
-2010-07-08 Werner Lemberg <wl@gnu.org>
+2013-07-30 Behdad Esfahbod <behdad@google.com>
- Fix Savannah bug #30361.
+ Prevent division by zero by a transparent color.
- * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check.
+ * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
+ Return 0 immediately, when alpha channel is zero.
-2010-07-06 Werner Lemberg <wl@gnu.org>
+2013-07-25 Behdad Esfahbod <behdad@google.com>
- Pacify compiler.
+ Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
- * src/cff/cffload.c (cff_index_get_pointers): Initialize
- `new_bytes'.
+ Also disambiguate Google's color bitmap tables.
-2010-07-05 Eugene A. Shatokhin <spectre@ispras.ru>
+ * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
+ New macros.
- Fix Savannah bug #27648.
+ * include/freetype/internal/tttypes.h (TT_SbitTableType): Add
+ TT_SBIT_TABLE_TYPE_CBLC.
- * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call
- `raster_done' only if we have an outline glyph format.
+ * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
-2010-07-05 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttsbit.c (tt_face_load_sbit,
+ tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
+ TT_SBIT_TABLE_TYPE_CBLC.
- Fix Savannah bug #30030.
+2013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
- * builds/win32/*/freetype.vcproj: Add ftxf86.c.
+ [sfnt] Fix for `make multi' target.
-2010-07-05 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
- [cff] Next try to fix `hintmask' and `cntrmask' limit check.
+2013-07-20 Werner Lemberg <wl@gnu.org>
- Problem reported by malc <av1474@comtv.ru>.
+ * docs/INSTALL.GNU: Updated.
- * 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.
+2013-07-20 Behdad Esfahbod <behdad@google.com>
-2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [sfnt] Fix `sbix' table version handling.
- Restrict the number of the charmaps in a rogue-compatible mode.
- Fix for Savannah bug #30059.
+ * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
+ USHORT version numbers are to be considered as `minor'.
- * 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).
+2013-07-19 Werner Lemberg <wl@gnu.org>
- * 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.
+ [autofit] Fix segment classification for blue zones.
- * 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.
+ The old code (essentially unchanged since the very beginning)
+ incorrectly handled this configuration
-2010-07-04 Werner Lemberg <wl@gnu.org>
+ x -o- x
+ / \
+ / \
+ / \
+ o o
- TrueType hinting is no longer patented.
+ as flat and this
- * include/freetype/config/ftoption.h, devel/ftoption.h
- (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
- (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.
+ o o
+ / /
+ x| x|
+ | |
+ o---------------o
- * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
- * docs/TRUETYPE, docs/PATENTS: Removed.
+ as round. (`o' and `x' are on and off points, respectively).
-2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ This is a major change which should improve the rendering results
+ enormously for many TrueType fonts, especially in the range approx.
+ 20-40ppem, fixing the appearance of many overshoots.
- Check error value by `FT_CMap_New'.
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
+ first and last points of the segment, not the points right before
+ and after.
- * 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.
+2013-07-19 Behdad Esfahbod <behdad@google.com>
-2010-07-03 Werner Lemberg <wl@gnu.org>
+ [sfnt] `sbix' fix-ups.
- Make ftgrays.c compile stand-alone again.
+ * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
+ are rendered scaled and then the `glyf' outline rendered on top. We
+ don't support that yet, so just ignore the `glyf' outline and
+ advertise it as a bitmap-only font.
- * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'.
- (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
+ * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
+ [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
+ (tt_face_load_sbix_image): Typo.
-2010-07-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+2013-07-18 Behdad Esfahbod <behdad@google.com>
- Additional fix for Savannah bug #30306.
+ [sfnt] Add support for Apple's `sbix' color bitmap table.
- * 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.
+ * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
+ fields to FT_Short and FT_UShort, respectively.
+ (TT_SBitTableType): New enumeration.
+ (TT_FaceRec): Add `sbit_table_type' field.
-2010-07-01 Werner Lemberg <wl@gnu.org>
+ * include/freetype/tttags.h (TTAG_sbix): New macro.
- [truetype] Protect against code range underflow.
+ * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
+ FT_GlyphSlot argument instead FT_Bitmap.
+ Add flag to control map and metrics handling.
+ Update all users.
- * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow
- negative IP values.
+ * src/sfnt/ttsbit.c: Include `ttmtx.h'.
+ (tt_face_load_eblc): Renamed to...
+ (tt_face_load_sbit): This.
+ Handlic `sbix' bitmaps.
+ (tt_face_free_eblc): Renamed to...
+ (tt_face_load_sbit): This.
+ Updated.
+ (tt_face_load_strike_metrics): Handle `sbix' bitmaps.
+ (tt_face_load_sbix_image): New function.
+ (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
+ tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
+ tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
+ tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
+ and handle load flags.
+ (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
+ handle formats 17-19.
+ Move color to grayscale conversion to...
+ (tt_face_load_sbit_image): Here.
+ Handle `sbix' bitmaps.
-2010-07-01 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/pngshim.h: Updated.
+ * src/sfnt/ttsbit.h: Updated.
+ * src/sfnt/sfdriver.c: Updated.
- [truetype] Add rudimentary tracing for bytecode instructions.
+2013-07-18 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New
- array.
- (TT_RunIns): Trace opcodes.
+ [sfnt] Ignore invalid magic number in `head' or `bhed'.
-2010-06-30 Werner Lemberg <wl@gnu.org>
+ Other font engines seem to ignore it also. Problem reported by
+ Hin-Tak Leung <htl10@users.sourceforge.net>.
- Fix Savannah bug #30263.
+ * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
+ we have an invalid magic number.
- * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned
- int' to avoid integer overflow.
+2013-07-16 Werner Lemberg <wl@gnu.org>
- * 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.
+ [smooth] Fix segfault caused by previous commit.
-2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/smooth/ftgrays.c (gray_set_cell): Always compute
+ `ras.invalid'.
- Initial fix for Savannah bug #30306.
+2013-07-16 David Turner <digit@google.com>
- * 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.
+ [smooth] Improve performance.
-2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Provide a work-around for an ARM-specific performance bug in GCC.
+ This speeds up the rasterizer by more than 5%.
- Additional fix for Savannah bug #30248 and #30249.
+ Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
+ also improves performance on other platforms by a tiny bit (<1%).
- * 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.
+ * src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
+ Use it where appropriate.
-2010-06-30 Alexei Podtelezhnikov <apodtele@gmail.com>
+ (gray_record_cell, gray_set_cell, gray_move_to,
+ gray_convert_glyph_inner): Streamline condition handling.
- Minor optimizations by avoiding divisions.
+2013-07-16 David Turner <digit@google.com>
- * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning):
- Replace divisions with multiplication in comparisons.
+ [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
-2010-06-29 Werner Lemberg <wl@gnu.org>
+ This patch provides slightly optimized versions for ARM, x86, and
+ x86_64 CPUs if built with GCC.
- Fix minor tracing issues.
+ Also remove some dead code.
- * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels.
+ * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
+ TT_DotFix14_long_long): New functions.
-2010-06-27 Werner Lemberg <wl@gnu.org>
+2013-07-16 David Turner <digit@google.com>
- [cff] Really fix `hintmask' and `cntrmask' limit check.
+ Optimize FT_MulFix for x86_64 GCC builds.
- * src/cff/cffgload.c (cff_decoder_parse_charstrings)
- <cff_op_hintmask>: Fix thinko and handle tracing also.
+ This patch provides an optimized `FT_MulFix' implementation for
+ x86_64 machines when FreeType is built with GCC, or compatible
+ compilers like Clang.
-2010-06-27 Werner Lemberg <wl@gnu.org>
+ Example:
+ bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
- Fix valgrind warning.
+ Before:
- * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize
- `result' array.
+ Load 4.863 us/op
+ Load_Advances (Normal) 4.816 us/op
+ Load_Advances (Fast) 0.028 us/op
+ Render 2.753 us/op
+ Get_Glyph 0.463 us/op
+ Get_CBox 0.077 us/op
+ Get_Char_Index 0.023 us/op
+ Iterate CMap 13.898 us/op
+ New_Face 12.368 us/op
+ Embolden 0.028 us/op
+ Get_BBox 0.302 us/op
-2010-06-27 Werner Lemberg <wl@gnu.org>
+ After:
- [cff] Fix memory leak.
+ Load 4.617 us/op
+ Load_Advances (Normal) 4.645 us/op
+ Load_Advances (Fast) 0.027 us/op
+ Render 2.789 us/op
+ Get_Glyph 0.460 us/op
+ Get_CBox 0.077 us/op
+ Get_Char_Index 0.024 us/op
+ Iterate CMap 13.403 us/op
+ New_Face 12.278 us/op
+ Embolden 0.028 us/op
+ Get_BBox 0.301 us/op
- * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
- case of errors.
+ * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
+ (FT_MulFix_x86_64): New function.
-2010-06-27 Werner Lemberg <wl@gnu.org>
+2013-07-16 David Turner <digit@google.com>
- [cff] Protect against invalid `hintmask' and `cntrmask' operators.
+ Speed up ARMv7 support.
- * 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.
+ When building for ARMv7 with thumb2 instructions, the optimized
+ `FT_MulFix_arm' assembly routine was not being used.
-2010-06-26 Werner Lemberg <wl@gnu.org>
+ The reason for this is in the `ftconfig.h' header, namely:
- Fix PFR change 2010-06-24.
+ - The assembly routine uses the `smull' instruction which is not
+ available when generating Thumb-1 machine code. It is available
+ in Thumb-2 mode, though.
- * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against
- invalid indices.
+ - The header was written a long time ago before Thumb-2 became
+ widely popular (e.g. with Android). So it simply doesn't use the
+ assembly routine if the `__thumb__' built-in macro is defined.
-2010-06-26 Werner Lemberg <wl@gnu.org>
+ - When compiling in Thumb-2 mode, the compiler will define both
+ `__thumb__' and `__thumb2__'.
- Improve PFR tracing messages.
+ By checking for `(__thumb2__ || !__thumb__)', we ensure that the
+ assembly routine is only avoided when generating Thumb-1 code.
- * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for
- simple and compound glyph offsets.
+ Given that this is performance-sensitive function, this improves
+ `ftbench' as follows on a Galaxy Nexus:
-2010-06-26 Werner Lemberg <wl@gnu.org>
+ Before (us/op) After (us/op)
- Fix last PFR change.
+ - loading Arial.ttf glyphs at 14 ppem [1]
- * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.
+ Load 34.285 33.098
-2010-06-26 Werner Lemberg <wl@gnu.org>
+ - same operation with the light auto-hinter [2]
- Fix Savannah bug #30262.
+ Load 31.317 29.590
- * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth'
- arbitrarily to 100 to avoid stack exhaustion.
+ - same operation without hinting [3]
-2010-06-26 Werner Lemberg <wl@gnu.org>
+ Load 6.143 5.376
- Add some memory checks (mainly for debugging).
+ - loading Arial.ttf advances at 14 ppem [4]
- * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error
- if the frame size is larger than the stream size.
+ Load_Advances (normal) 34.216 33.016
+ Load_Advances (fast) 0.176 0.176
- * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if
- seeking a position larger than the stream size.
+ [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
+ [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
+ [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
+ [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
-2010-06-25 Werner Lemberg <wl@gnu.org>
+ * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
+ (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
- Fix Savannah bug #30261.
+2013-06-28 Werner Lemberg <wl@gnu.org>
- * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain
- neither outline nor bitmap glyphs.
+ * docs/CHANGES: Updated.
-2010-06-25 Werner Lemberg <wl@gnu.org>
+2013-06-27 Werner Lemberg <wl@gnu.org>
- Fix Savannah bug #30254.
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
- * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for
- first offset also.
+2013-06-25 Werner Lemberg <wl@gnu.org>
-2010-06-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [cff] Add darkening limit to `darkening-parameters'.
- Initial fix for Savannah bug #30248 and #30249.
+ * src/cff/cffdrivr.c (cff_property_set): Add check.
- * 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.
+2013-06-25 Werner Lemberg <wl@gnu.org>
-2010-06-24 Werner Lemberg <wl@gnu.org>
+ [cff] Add `darkening-parameters' property.
- Fix Savannah bug #30247.
+ * include/freetype/ftcffdrv.h: Document it.
- * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with
- zero metrics.
+ * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
+ `darkening-parameters' property.
-2010-06-24 Graham Asher <graham.asher@btinternet.com>
+ * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
- * 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.
+ * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
+ argument and use it.
+ Update all callers.
-2010-06-24 Werner Lemberg <wl@gnu.org>
+ * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
+ `darken_params' values.
- */*: Use module specific error names where appropriate.
+ * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
-2010-06-24 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffobjs.c (cff_driver_init): Set default values for
+ `darken_params'.
- Fix Savannah bug #30236.
+2013-06-25 Werner Lemberg <wl@gnu.org>
- * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer
- to `cmap_table'.
+ [docmaker] Code shuffling.
-2010-06-24 Werner Lemberg <wl@gnu.org>
+ * src/tools/docmaker/tohtml.py (re_url): Move regexp...
+ * src/tools/docmaker/sources.py: ... to this file.
- Fix Savannah bug #30235.
+2013-06-25 Werner Lemberg <wl@gnu.org>
- * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against
- invalid indices if there aren't any coordinates for indexing.
+ [docmaker] Remove unused functions.
-2010-06-24 Werner Lemberg <wl@gnu.org>
+ * src/tools/docmaker/content.py (DocMarkup.get_start,
+ DocBlock.get_markup_name): Removed.
+ * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
+ HtmlFormatter.make_html_words): Removed.
- [bdf]: Font properties are optional.
+2013-06-25 Werner Lemberg <wl@gnu.org>
- * 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'.
+ * builds/freetype.mk (dll): Remove target.
-2010-06-23 Werner Lemberg <wl@gnu.org>
+ Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
- Fix Savannah bug #30220.
+2013-06-25 Werner Lemberg <wl@gnu.org>
- * include/freetype/fterrdef.h
- (BDF_Err_Missing_Fontboundingbox_Field): New error code.
+ [docmaker] Recognise URLs.
- * 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).
+ * src/tools/docmaker/tohtml.py (re_url): New regular expression.
+ (make_html_para): Use it.
-2010-06-21 Werner Lemberg <wl@gnu.org>
+2013-06-19 Werner Lemberg <wl@gnu.org>
- Fix Savannah bug #30168.
+ * Version 2.5.0.1 released.
+ ===========================
- * 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>
+ Tag sources with `VER-2-5-0-1'.
- Fix Savannah bug #30145.
+ * include/freetype/config/ftoption.h: Undefine
+ CFF_CONFIG_OPTION_OLD_ENGINE.
+ * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
- * src/psaux/psobjs.c (t1_builder_add_contour): Protect against
- `outline == NULL' which might happen in invalid fonts.
+2013-06-19 Werner Lemberg <wl@gnu.org>
-2010-06-19 Werner Lemberg <wl@gnu.org>
+ * builds/unix/install.mk (install): Don't create `cache' directory.
- Fix Savannah bug #30135.
+ Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
- * 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.
+2013-06-19 Werner Lemberg <wl@gnu.org>
-2010-06-15 Werner Lemberg <wl@gnu.org>
+ * Version 2.5.0 released.
+ =========================
- Fix Savannah bug #30108.
- * src/autofit/afglobal.c (af_face_globals_compute_script_coverage):
- Properly mask AF_DIGIT bit in comparison.
+ Tag sources with `VER-2-5-0'.
-2010-06-11 Werner Lemberg <wl@gnu.org>
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.5.0.
- Fix Savannah bug #30106.
+ * 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.12/2.5.0/, s/2412/250/.
- 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.
+ * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
+ (FREETYPE_PATCH): Set to 0.
- * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that
- `end_point' is not larger than `glyph->num_points'.
+ * builds/unix/configure.raw (version_info): Set to 16:2:10.
-2010-06-11 Werner Lemberg <wl@gnu.org>
+ * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
+ * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
- [cff]: Improve debugging output.
+2013-06-18 Werner Lemberg <wl@gnu.org>
- * src/cff/cffgload.c (cff_decoder_parse_charstrings)
- <cff_op_hintmask>: Implement it.
+ Fix Savannah bug #39269.
-2010-06-10 Graham Asher <graham.asher@btinternet.com>
+ * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
+ case of reacollocation failures.
- ftgrays: Speed up rendering of small cubic splines.
+2013-06-18 Andrew Church <achurch+savannah@achurch.org>
- * 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:
+ Fix Savannah bug #39266.
- http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
+ If memory allocations fail at certain points while opening a font,
+ FreeType can either crash due to a NULL dereference or leak memory.
-2010-06-09 Werner Lemberg <wl@gnu.org>
+ * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
+ FT_LibraryRec): Make `refcount' a signed integer. If, for example,
+ FT_Open_Face() fails in a memory allocation before the face's
+ reference count is set to 1, a subsequent `FT_Done_Library' call
+ would otherwise loop over `FT_Done_Face' 2^32 times before freeing
+ the face.
- Fix Savannah bug #30082.
+ * src/base/ftobjs.c (open_face): Initialize `stream' and friends
+ earlier.
+ (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
+ (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
- * src/cff/cffgload.c (cff_decoder_parse_charstrings)
- <cff_op_callothersubr>: Protect against stack underflow.
+2013-06-14 Werner Lemberg <wl@gnu.org>
-2010-06-08 Werner Lemberg <wl@gnu.org>
+ * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
- Fix Savannah bug #30053.
+2013-06-06 Dave Arnold <darnold@adobe.com>
+ Werner Lemberg <wl@gnu.org>
- * src/cff/cffparse.c (cff_parse_real): Handle border case where
- `fraction_length' has value 10.
+ [cff] Add code to Adobe's engine to handle ppem > 2000.
-2010-06-07 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffgload.c (cff_slot_load): If we get
+ FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
- Fix Savannah bug #30052.
- This bug has been introduced with commit 2415cbf3.
+2013-06-12 Werner Lemberg <wl@gnu.org>
- * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Protect
- against endless loop in case of corrupted font header data.
+ Another try on pragmas.
-2010-05-26 Werner Lemberg <wl@gnu.org>
+ * include/freetype/internal/ftdebug.h: Move pragmas to...
+ * include/freetype/internal/internal.h: ... this file since it gets
+ included by all source files.
+ * include/freetype/internal/ftserv.h: Remove pragma which has no
+ effect.
- Remove unused variable.
- Found by Graham.
+2013-06-12 Werner Lemberg <wl@gnu.org>
- * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused
- variable `first' in first block.
+ * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
-2010-05-22 Werner Lemberg <wl@gnu.org>
+ This partially undoes commit 3f6e0e0c.
- Fix various memory problems found by linuxtesting.org.
+2013-06-12 Werner Lemberg <wl@gnu.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'.
+ More compiler warning fixes.
- * 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'.
+ */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
-2010-05-22 Werner Lemberg <wl@gnu.org>
+2013-06-10 Werner Lemberg <wl@gnu.org>
- autofit: Remove dead code.
- Suggested by Graham.
+ [truetype] Improve handling of broken sbit advance widths.
- * src/autofit/afhints.c (af_glyph_hints_compute_inflections):
- Removed.
- (af_glyph_hints_reload): Remove third argument.
- Update all callers.
+ * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
+ `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
-2010-05-21 Bram Tassyns <bramt@enfocus.be>
+ Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
- Fix Savannah bug #27987.
+2013-06-10 Werner Lemberg <wl@gnu.org>
- * src/cff/cffobjs.c (remove_subset_prefix): New function.
- (cff_face_init): Use it to adjust `cffface->family_name'.
+ [sfnt] Improve embedded bitmap tracing.
-2010-05-20 Werner Lemberg <wl@gnu.org>
+ * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
+ bitmap strike match to...
+ (FT_Match_Size): This function.
- TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'.
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
+ tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
+ tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
+ tt_sbit_decoder_load_image): Decorate with tracing messages.
- Acroread does the same.
+2013-06-10 Werner Lemberg <wl@gnu.org>
- * 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.
+ Fix Savannah bug #39160.
- (load_truetype_glyph): Save `loader->byte_len' before recursive
- call.
+ * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
+ for the degenerate case.
- * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max):
- Declare it as FT_LOCAL.
+2013-06-09 David Turner <digit@google.com>
-2010-05-18 Hongbo Ni <hongbo@njstar.com>
+ * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
- Apply Savannah patch #7196.
+ This code, present since eight(!) years in the unused `CACHE'
+ branch, has been forgotten to apply to the master branch. It's
+ really amazing that noone has ever complained since
+ `FTC_Manager_Reset' is pretty useless without flushing the cache.
- * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont
- index is out of range.
+2013-06-07 Werner Lemberg <wl@gnu.org>
-2010-05-11 Werner Lemberg <wl@gnu.org>
+ Add and improve pragmas for MSVC compiler.
- * docs/formats.txt: Give pointer to PCF documentation.
- Information provided by Alan Coopersmith
- <alan.coopersmith@oracle.com>.
+ * include/freetype/internal/ftdebug.h: Remove pragmas.
+ * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
+ * include/freetype/internal/ftvalid.h: Handle warning C4324.
+ * src/base/ftobjs.c: Use push and pop for pragmas.
+ * src/gzip/ftgzip.c: Handle warning C4244.
-2010-05-10 Ken Sharp <ken.sharp@artifex.com>
+2013-06-07 Werner Lemberg <wl@gnu.org>
- Fix Savannah bug #29846.
+ [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
- 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.
+ * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
- This was fixed by simply ignoring the error and carrying on.
+2013-06-06 Dave Arnold <darnold@adobe.com>
- 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.
+ [cff] Add early exit feature for width-only calls.
- 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.
+ This is for `FT_Get_Advance'.
- (t1_decoder_parse_charstrings): Make `setcurrentpoint' use the top
- two elements of the stack to establish unconditionally the current x
- and y coordinates.
+ There are 7 places where the spec says the width can be defined:
- Make the `flex' subroutine handling (OtherSubr 0) put the current
- x,y coordinates onto the stack, instead of two dummy uninitialised
- values.
+ hstem/hstemhm
+ vstem/vstemhm
+ cntrmask/hintmask
+ hmoveto
+ vmoveto
+ rmoveto
+ endchar
-2010-04-14 Ken Sharp <ken.sharp@artifex.com>
+ * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
+ if possible.
- Fix Savannah bug #29444.
+ (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
+ <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
+ <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
- * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid)
- `lineto' immediately after `hsbw', in accordance with Acrobat, GS,
- and others.
+2013-06-06 Werner Lemberg <wl@gnu.org>
-2010-04-14 Michał Cichoń <thedmd@artifexmundi.com>
+ Next round of compiler fixes.
- Fix Savannah bug #27999.
+ * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
+ Add proper cast.
- * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove
- selected entry, not all.
+ * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
+ cast.
+ * include/freetype/internal/ftstream.h: Decorate stream and frame
+ macros with `FT_Long' and `FT_ULong' as appropriate.
-2010-04-06 Jonathan Kew <jfkthame@gmail.com>
+ * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
+ raccess_guess_darwin_newvfs): Use cast.
- Add overflow check to `fvar' table.
+ * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance
- count.
+ * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
+ * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
-2010-04-05 Ken Sharp <ken.sharp@artifex.com>
+ * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
+ * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
+ * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
- Fix Savannah bug #29335.
+ * src/cid/cidparse.c (cid_parser_new): Use cast.
- * src/raster/ftraster.c (Line_Up): Use slow multiplication to
- prevent overflow. This shouldn't have any serious impact on speed,
- however.
+ * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
-2010-04-05 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
- Add new function `FT_Library_SetLcdFilterWeights'.
+ * src/raster/ftraster.c (ft_black_reset): Use cast.
- This is based on code written by Lifter
- <http://unixforum.org/index.php?showuser=11691>. It fixes
- FreeDesktop bug #27386.
+ * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
+ (ALL_POINTS): Fix cast.
- * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
- function.
+ * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
- * include/freetype/ftlcdfil.h: Updated.
+2013-06-05 Dave Arnold <darnold@adobe.com>
- * docs/CHANGES: Updated.
+ Fix more MSVC Win32 compiler warnings.
+
+ * src/base/ftobjs.c: Fix typo in MS pragma.
-2010-04-01 John Tytgat <John.Tytgat@esko.com>
+ * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
+ `lineno' is only used in debug mode.
- Fix Savannah bug #29404.
+ * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
+ debug mode.
- * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1
- of `head' table of TrueType fonts).
+2013-06-05 Werner Lemberg <wl@gnu.org>
-2010-03-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Fix compiler warnings.
- Fix `multi build' for Tytgat's CFF driver improvement.
+ * include/freetype/internal/ftmemory.h: Decorate memory allocation
+ macros with `FT_Long' where appropriate.
+ Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
- * src/base/cffload.h (cff_index_get_name): Added.
+ * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
+ cast.
-2010-03-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
+ including `md5.c'.
- Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c.
+ * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
+ cast.
- * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'.
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
+ (tt_sbit_decoder_load_bitmap): Beautification.
-2010-03-11 Chris Liddell <chris.liddell@artifex.com>
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
+ variables (earlier).
- Fix Savannah bug #27442.
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
+ where appropriate.
+
+ * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
- * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'.
+2013-06-04 Werner Lemberg <wl@gnu.org>
-2010-03-09 Werner Lemberg <wl@gnu.org>
+ * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
+ Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
+
+2013-06-04 Werner Lemberg <wl@gnu.org>
+
+ Apply fixes for cppcheck nitpicks.
+
+ http://cppcheck.sourceforge.net/
+
+ The call was (from the top-level of the FreeType tree):
+
+ cppcheck --force \
+ --enable=all \
+ -I include \
+ -I include/freetype/ \
+ -I include/freetype/config/ \
+ -I include/freetype/internal/ \
+ . &> cppcheck.log
+
+ Note that the current version heavily chokes on FreeType, delivering
+ many wrong results. I will report those issues to the cppcheck team
+ so that a newer version gives improved results hopefully.
+
+ */* Improve variable scopes.
+ */* Remove redundant initializations which get overwritten.
+
+ * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
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/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
- * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
- call FT_Get_Next_Char anyway if necessary.
+ * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
+ Remove functionless code.
-2010-02-26 Behdad Esfahbod <behdad@behdad.org>
+ * src/tools/ftrandom.c (main): Fix memory leak.
- Improve handling of invalid glyph indices in char->index functions.
+2013-06-03 Werner Lemberg <wl@gnu.org>
- * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a
- loop.
+ Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
-2010-02-18 Chris Liddell <chris.liddell@artifex.com>
+ This controls whether the old FreeType CFF engine gets compiled into
+ FreeType. It is now disabled by default.
- Fix Savannah bug #28905.
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
+
+ * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
+ (CFF_Operator, cff_argument_counts, cff_builder_add_point,
+ cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
+ src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
+ CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
- Initialize phantom points before calling the incremental interface
- to update glyph metrics.
+ * docs/CHANGES: Updated.
+
+2013-06-02 Werner Lemberg <wl@gnu.org>
+
+ Fix PNG library handling.
+
+ * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
+ LIBPNG_LDFLAGS.
+
+2013-05-23 Behdad Esfahbod <behdad@google.com>
+
+ Add support for color embedded bitmaps (eg. color emoji).
+
+ A new load flag, FT_LOAD_COLOR, makes FreeType load color
+ embedded-bitmaps, following this draft specification
+
+ https://color-emoji.googlecode.com/git/specification/v1.html
+
+ which defines two new SFNT tables, `CBDT' and `CBLC' (named and
+ modeled after `EBDT' and `EBLC', respectively). The color bitmaps
+ are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
+ pre-multiplied sRGB images. If PNG support is available, PNG color
+ images as defined in the same proposed specification are supported
+ also.
+
+ Note that color bitmaps are converted to grayscale if client didn't
+ ask for color.
+
+ * builds/unix/configure.raw: Search for libpng.
+ Add `--without-png' option.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (FT_CONFIG_OPTION_USE_PNG): New macro.
- * src/truetype/ttgload.c (tt_get_metrics_incr_overrides)
- [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from...
- (tt_get_metrics): This.
+ * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
+
+ * include/freetype/ftimage.h (FT_Pixel_Mode): Add
+ `FT_PIXEL_MODE_BGRA'.
+
+ * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
+
+ * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
+ (ft_gray_for_premultiplied_srgb_bgra): New function.
+ (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
+
+ * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
+
+ * src/sfnt/sfnt.c: Include `pngshim.c'.
+
+ * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
+ (tt_face_load_eblc): Load `CBLC'.
+ (tt_sbit_decoder_init): Load `CBDT'.
+ (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
+ color and grayscale bitmaps.
+ Set `num_grays'. This is used by `ftview' to choose the blending
+ algorithm.
+ (tt_sbit_decoder_load_byte_aligned,
+ tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
+ tt_sbit_decoder_load_image): Pass load flag.
+ s/write/pwrite/.
+ Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
- (load_truetype_glyph): Use tt_get_metrics_incr_overrides.
+ (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
+ (tt_sbit_decoder_load_bitmap): Pass load flag.
+ Handle new glyph formats 17, 18, and 19.
+ Call `tt_sbit_decoder_alloc_bitmap'.
+ Flatten color bitmaps if necessary.
+ (tt_face_load_sbit_image): Updated.
+
+ * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
+
+ * docs/CHANGES: Updated.
+
+2013-05-24 Guenter <info@gknw.net>
+
+ Apply Savannah patch #8055.
+
+ Make `apinames' create an import file for NetWare.
+
+ * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
+ (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
+ (names_dump): Handle it.
+ (usage): Updated.
+ (main): Handle new command line flag `-wN'.
+
+2013-05-23 Behdad Esfahbod <behdad@behdad.org>
+
+ Compilation fix.
+
+ * src/truetype/ttinterp.c (TT_RunIns)
+ [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
+
+2013-05-22 Infinality <infinality@infinality.net>
+
+ [truetype] Formatting and an additional subpixel tweak.
+
+ * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
+ * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
+ Revert previous modification for Verdana clones.
+
+2013-05-22 Infinality <infinality@infinality.net>
+
+ [truetype] Adjust subpixel zp2 moves and tweak rules.
+
+ These modifications fix thin diagonal stems in some legacy fonts.
+
+ * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
+ (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
+ (Ins_SHP): Disable x moves here for subpixel rendering.
+ (Ins_SHPIX): Only disable x moves in compatibility mode.
+ Split out zp2 move reversals and reorder conditional respectively.
+
+ * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
+ Only adjust Verdana clones for 17 ppem.
+ (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
+ (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
+
+2013-05-20 Infinality <infinality@infinality.net>
+
+ [truetype] Simplify and improve subpixel function detection.
+
+ Some small enhancements have allowed the removal of many macros and
+ the simplification of existing rules in `ttsubpix.c'.
+
+ * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
+ SPH_TWEAK_ALLOW_X_MOVE_ZP2,
+ SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
+ SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
+ (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
+
+ * src/truetype/ttsubpix.c: Updated affected rules.
+
+ * src/truetype/ttinterp.c (Direct_Move_X): Updated.
+ (INS_FDEF): Add additional function detection.
+ (INS_ENDF): Set runtime flag.
+ (Ins_CALL): Skip the call under certain conditions.
+ Remove bad code.
+ (Ins_LOOPCALL): Skip the call under certain conditions.
+ Remove bad code.
+ (Move_Zp2_Point): Updated.
+ (Ins_SHPIX): Updated.
+ Skip the move under some situations.
+ (Ins_MIAP): Improve conditions.
+ (Ins_MIRP): Updated.
+ (Ins_DELTAP): Skip move under certain conditions.
+ Simplify conditions.
+ (TT_RunIns): Updated.
+ Add code to handle new function detection.
+ Trace messages.
+
+2013-05-17 Werner Lemberg <wl@gnu.org>
+
+ Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
+
+ * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
+ builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
+
+2013-05-15 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Add `interpreter-version' property.
+
+ This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
+ at runtime.
+
+ * include/freetype/ftttdrv.h: New file.
+
+ * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
+ macro.
+
+ * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
+ (tt_property_set, tt_property_get): Fill templates.
+
+ * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
+ member.
+ Remove unused `extension_component' member.
+
+ * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
+ (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
+ compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
+
+ * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
+ (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
+ Update all affected functions to use it.
+ Use TT_INTERPRETER_VERSION_XXX where appropriate.
+
+ * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
+ (tt_driver_init): Initialize `interpreter_version'.
+
+ * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
+ Use TT_INTERPRETER_VERSION_XXX where appropriate.
+
+2013-05-13 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Avoid empty source file.
+
+ * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
+ Provide dummy typedef.
+
+2013-05-13 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
+
+ Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
+
+2013-05-13 Brian Nixon <bnixon@yahoo.com>
+
+ Fix Savannah bug #38970.
+
+ * src/base/ftdebug.c, builds/win32/ftdebug.c,
+ builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
+ (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
+
+2013-05-12 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Add framework for TrueType properties.
+
+ * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
+ (tt_property_set, tt_property_get): New functions, still empty.
+ Define `tt_service_properties' service.
+ Update `tt_services'.
+
+ * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
+ (TT_SERVICE_PROPERTIES_GET): New macro.
+ (TTModulePIC): Add `tt_service_properties'.
+
+2013-05-12 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #38967.
+
+ * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
+
+2013-05-12 Werner Lemberg <wl@gnu.org>
+
+ Introduce unsigned 64bit type (if available).
+
+ * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
+ [FT_LONG64]: Provide FT_UInt64.
+
+ * builds/unix/ftconfig.in: Synchronized.
+
+2013-05-12 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #38968.
+
+ * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
+ FT_Property_{Set,Get}.
+ * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
+ FT_Property_{Set,Get}.
+
+2013-05-10 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Clean up bitmap code.
+
+ * src/sfnt/ttsbit.c: Deleted.
+ * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
+ * rules.mk (SFNT_DRV_H): Updated.
+
+2013-05-10 Werner Lemberg <wl@gnu.org>
+
+ */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
----------------------------------------------------------------------------
-Copyright 2010-2012 by
+Copyright 2013-2014 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/ChangeLog.21 b/ChangeLog.21
index d6371d1..300a094 100644
--- a/ChangeLog.21
+++ b/ChangeLog.21
@@ -6260,7 +6260,7 @@
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.
+ * include/freetype/ftbdf.h (BDF_PropertyType): New enumeration.
(BDF_Property, BDF_PropertyRec): New structure.
FT_Get_BDF_Property): New function.
* include/freetype/internal/bdftypes.h: Include FT_BDF_H.
diff --git a/ChangeLog.23 b/ChangeLog.23
index bc46c84..1a23848 100644
--- a/ChangeLog.23
+++ b/ChangeLog.23
@@ -6668,7 +6668,7 @@
2007-01-10 Derek Clegg <dclegg@apple.com>
- * src/type1/t1load.c (T1_Get_MM_Var): Always return fixed point
+ * src/type1/t1load.c (T1_Get_MM_Var): Always return fixed-point
values.
2007-01-08 David Turner <david@freetype.org>
diff --git a/ChangeLog.24 b/ChangeLog.24
new file mode 100644
index 0000000..01eb3b7
--- /dev/null
+++ b/ChangeLog.24
@@ -0,0 +1,6360 @@
+2013-05-08 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.12 released.
+ ==========================
+
+
+ Tag sources with `VER-2-4-12'.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.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/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.11/2.4.12/, s/2411/2412/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 12.
+
+ * builds/unix/configure.raw (version_info): Set to 16:1:10.
+
+2013-05-08 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2013-05-08 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Typo.
+
+2013-05-05 Werner Lemberg <wl@gnu.org>
+
+ Synchronize `ftconfig.h'.
+
+ * builds/unix/ftconfig.in: Updated.
+
+2013-05-05 Werner Lemberg <wl@gnu.org>
+
+ Fix compilation with C++.
+
+ * src/base/md5.c (body): Use proper cast.
+
+2013-05-05 Werner Lemberg <wl@gnu.org>
+
+ Fix 64bit compilation issues.
+
+ * include/freetype/config/ftconfig.h [FT_LONG64]: Typedef
+ `FT_Int64' here.
+
+ * src/base/ftcalc.c: Remove typedef of `FT_Int64'.
+ (FT_DivFix): Fix cast.
+ * src/base/fttrigon.c: Remove typedef of `FT_Int64'.
+
+2013-05-05 Werner Lemberg <wl@gnu.org>
+
+ [raster] Fix clang issues.
+
+ Fix suggested by <octoploid@yandex.com>.
+
+ * src/raster/ftraster.c (ULong): New typedef.
+ (SCALED): Add proper cast.
+
+2013-05-04 Werner Lemberg <wl@gnu.org>
+
+ Fix clang fixes.
+
+ * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate): Use
+ correct types.
+
+ * src/cff/cf2intrp.c (cf2_interpT2CharString) <default>: Force
+ unsigned for computations.
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Ditto.
+ * src/cff/cffparse.c (cff_parse_integer): Ditto.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
+
+2013-05-04 Werner Lemberg <wl@gnu.org>
+
+ [cff] Make Adobe CFF engine work correctly on 64bit hosts.
+
+ Reported by numerous people on the `freetype-devel' list. Without
+ this fix, glyphs aren't properly aligned on a common baseline.
+
+ On 64bit systems, `FT_Pos' expands to `long int', having a width of
+ 64bit. `CF2_Fixed' expands to `int' which is normally 32bit wide on
+ 64bit hosts also. Wrong casts filled up the blues arrays with
+ incorrect values. Note that all blues values are accessed with the
+ `cf2_blueToFixed' macro which handles the 64bit to 32bit conversion.
+
+ * src/cff/cf2ft.h (cf2_getBlueValues, cf2_getOtherBlues,
+ cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Use `FT_Pos' for
+ `data', not `CF2_Fixed'.
+ * src/cff/cf2ft.c (cf2_getBlueValues, cf2_getOtherBlues,
+ cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Updated.
+ * src/cff/cf2blues.c (cf2_blues_init): Updated.
+
+2013-05-04 Werner Lemberg <wl@gnu.org>
+
+ More fixes for clang's `sanitize' feature.
+
+ * src/base/ftcalc.c (FT_DivFix): Use unsigned values for
+ computations which use the left shift operator and convert to signed
+ as the last step.
+ * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate,
+ FT_Vector_Length, FT_Vector_Polarize): Ditto.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Simplify.
+ * src/cff/cffload.c (cff_subfont_load): Fix constant.
+ * src/cff/cffparse.c (cff_parse_integer, cff_parse_real, do_fixed,
+ cff_parse_fixed_dynamic): Use unsigned values for computations which
+ use the left shift operator and convert to signed as the last step.
+
+ * src/cid/cidload.c (cid_get_offset): Ditto.
+
+ * src/psaux/psconv.c (PS_Conv_ToFixed): Ditto.
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
+
+ * src/truetype/ttinterp.c (TT_MulFix14, TT_DotFix14): Ditto.
+
+2013-05-04 Werner Lemberg <wl@gnu.org>
+
+ Fix errors reported by clang's `sanitize' feature.
+
+ * include/freetype/internal/ftstream.h: Simplify and fix integer
+ extraction macros.
+ (FT_INT8_, FT_BYTE_I16, FT_BYTE_I32, FT_INT8_I16, FT_INT8_I32,
+ FT_INT8_I32, FT_INT8_U32): Removed.
+ (FT_PEEK_SHORT, FT_PEEK_LONG, FT_PEEK_OFF3, FT_PEEK_SHORT_LE,
+ FT_PEEK_LONG_LE, FT_PEEK_OFF3_LE): Use unsigned values for
+ computations and convert to signed as the last step.
+
+ * src/cff/cf2fixed.h (cf2_intToFixed, cf2_fixedToInt,
+ cf2_fracToFixed): Avoid shifts of negative values.
+ (cf2_intToFrac, cf2_fixedToFrac, cf2_fixedTo26Dot6): Removed,
+ unused.
+
+ * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdEXTENDEDNMBR,
+ default>: Use unsigned values for computations and convert to signed
+ as the last step.
+ Use proper types in tracing messages.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Use unsigned
+ values for computation of operands and convert to signed as the last
+ step.
+ Use proper type in tracing message.
+
+2013-05-03 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cf2blues.c: Remove dead code.
+
+2013-05-02 Chris Liddell <chris.liddell@artifex.com>
+
+ * src/cff/cffgload.c: Include FT_CFF_DRIVER_H.
+
+2013-04-27 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+ * README: Improved.
+
+2013-04-13 Werner Lemberg <wl@gnu.org>
+
+ [cff] Add a new Type 2 interpreter and hinter.
+
+ This work, written by Dave Arnold <darnold@adobe.com> and fully
+ integrated into FreeType by me, is a donation by Adobe in
+ collaboration with Google. It is vastly superior to the old CFF
+ engine, and it will replace it soon. Right now, it is still off by
+ default, and you have to explicitly select it using the new
+ `hinting-engine' property of the cff driver.
+
+ For convenience, (most of) the new files are committed separately.
+
+ * include/freetype/config/ftheader.h (FT_CFF_DRIVER_H): New macro.
+ * include/freetype/ftcffdrv.h: New file to access CFF driver
+ properties.
+ * include/freetype/fterrdef.h (FT_Err_Glyph_Too_Big): New error
+ code.
+ * include/freetype/internal/fttrace.h: Add `cf2blues', `cf2hints',
+ and `cf2interp'.
+
+ * src/cff/cffgload.h (CFF_SubFont): New member `current_subfont'.
+ * src/cff/cffobjs.h (CFF_DriverRec): New members `hinting_engine'
+ and `no_stem_darkening'.
+ * src/cff/cfftypes.h (CFF_FontRec): New member `cf2_instance'.
+
+ * src/cff/cff.c: Include new files.
+ * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
+ `hinting-engine' and `no-stem-darkening' properties (only the Adobe
+ engine listens to them).
+ * src/cff/cffgload.c: Include `cf2ft.h'.
+ (cff_decoder_prepare): Initialize `current_subfont'.
+ (cff_build_add_point): Handle Adobe engine which uses 16.16
+ coordinates.
+ (cff_slot_load): Handle FT_LOAD_NO_SCALE and FT_LOAD_NO_HINTING
+ separately.
+ Choose rendering engine based on `hinting_engine' property.
+ * src/cff/cffload.c (cff_font_done): Call finalizer of the Adobe
+ engine.
+ * src/cff/cffobjs.c: Include FT_CFF_DRIVER_H.
+ (cff_driver_init): Set default property values.
+
+ * src/cff/rules.mk (CFF_DRV_SRC, CFF_DRV_H): Add new files.
+
+ * src/cff/cf2*.*: New files, containing the Adobe engine.
+
+2013-04-12 Werner Lemberg <wl@gnu.org>
+
+ [cff] Minor code administration issues.
+
+ * src/cff/cffgload.c (check_points): Rename to...
+ (cff_check_points): ...this and make it FT_LOCAL.
+ (cff_builder_add_point, cff_builder_add_point1,
+ cff_builder_start_point, cff_builder_close_contour,
+ cff_lookup_glyph_by_stdcharcode, cff_get_glyph_data,
+ cff_free_glyph_data): Make them FT_LOCAL.
+
+ * src/cff/cffgload.h: Updated.
+
+2013-04-12 Werner Lemberg <wl@gnu.org>
+
+ Add output bitmap checksums.
+
+ Use `FT2_DEBUG=bitmap:3' for tracing.
+
+ * src/base/md5.c, src/base/md5.h: New files, taken from
+
+ http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
+
+ * include/freetype/internal/fttrace.h: Add `bitmap'.
+
+ * src/base/ftobjs.c [FT_DEBUG_LEVEL_TRACE]: Include `md5.c'
+
+ (FT_Render_Glyph_Internal) [FT_DEBUG_LEVEL_TRACE]: For tracing,
+ convert resulting bitmap to a uniform format and compute a checksum.
+ Use `bitmap' category for the tracing message.
+
+ * src/base/rules.mk (BASE_H): Updated.
+
+ * docs/LICENSE.TXT: Updated.
+
+2013-04-12 Werner Lemberg <wl@gnu.org>
+
+ [cff] Add framework for CFF properties.
+
+ * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC7):
+ New macro.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_PROPERTIES_H.
+ (cff_property_set, cff_property_get): New functions, still empty.
+ Define `cff_service_properties' service.
+ Update `cff_services'.
+
+ * src/cff/cffpic.h: Include FT_SERVICE_PROPERTIES_H.
+ (CFF_SERVICE_PROPERTIES_GET): New macro.
+ (CffModulePIC): Add `cff_service_properties'.
+
+2013-04-03 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #38589.
+
+ * src/bdf/bdflib.c (_bdf_readstream): Thinko.
+
+2013-03-31 Werner Lemberg <wl@gnu.org>
+
+ * configure: Use egrep, not grep.
+
+ Problem reported Mojca Miklavec <mojca.miklavec.lists@gmail.com>.
+
+2013-03-29 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftlcdfil.h: Add description of color filtering.
+
+ Based on a contribution from Antti S. Lankila <alankila@bel.fi>
+ (Savannah bug #38607).
+
+2013-03-23 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Minor.
+
+ * src/autofit/afmodule.c (af_property_set): Typo.
+ (af_autofitter_init, af_autofitter_done): Use cast.
+
+2013-03-21 Werner Lemberg <wl@gnu.org>
+
+ * configure: Automatically test for `gmake' also.
+
+ Suggested by Mojca Miklavec <mojca.miklavec.lists@gmail.com>.
+
+2013-03-21 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Respect CONFIG_SHELL from the environment.
+
+ Some large packages using FreeType have to use a broken (deficient)
+ /bin/sh. The configure scripts (as generated by Autoconf) are
+ clever enough to find a better shell and put that one into the
+ environment variable CONFIG_SHELL. If that environment variable is
+ already set the script skips the test and assumes to be already
+ running under a good shell.
+
+ * builds/unix/detect.mk: Honour CONFIG_SHELL.
+ * builds/unix/unix-def.in (SHELL): Define.
+
+2013-03-21 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah patch #7971.
+
+ * configure: Handle MAKE environment variable also.
+
+2013-03-17 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #38538.
+
+ * builds/amiga/src/base/ftdebug.c, builds/win32/ftdebug.c,
+ builds/wince/ftdebug.c (FT_Throw): Add function.
+
+2013-03-17 Werner Lemberg <wl@gnu.org>
+
+ [raster] Remove dead code.
+
+ * src/raster/rastpic.c (ft_raster1_renderer_class_pic_init)
+ src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init): Do it.
+
+2013-03-17 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshpic.h (GET_PIC): Use correct container.
+
+2013-03-15 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftmoderr.h: Fix commit from 2013-03-11.
+
+ The previous version was not backwards compatible. Reported by
+ Behdad.
+
+2013-03-14 Werner Lemberg <wl@gnu.org>
+
+ */*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate.
+
+ FT_Err_XXX and friends are no longer directly used in the source
+ code.
+
+2013-03-14 Werner Lemberg <wl@gnu.org>
+
+ New error management macros.
+
+ * include/freetype/fterrors.h (FT_ERR_XCAT, FT_ERR_CAT): Move to...
+ * include/freetype/fttypes.h: ... this file.
+ (FT_ERR, FT_ERR_EQ, FT_ERR_NEQ, FT_MODERR_EQ, FT_MODERR_NEQ): New
+ macros.
+
+ * include/freetype/freetype.h: Updated.
+
+2013-03-14 Werner Lemberg <wl@gnu.org>
+
+ */*: Use FT_Err_Ok only.
+
+ This is a purely mechanical conversion.
+
+2013-03-14 Werner Lemberg <wl@gnu.org>
+
+ */*: Use `FT_THROW'.
+
+ This is essentially a mechanical conversion, adding inclusion of
+ `FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for
+ stand-alone compiling modes of the rasterizer modules.
+
+ To convert the remaining occurrences of FT_Err_XXX and friends it is
+ necessary to rewrite the code. Note, however, that it doesn't harm
+ if some cases are not handled since FT_THROW is a no-op.
+
+2013-03-13 Werner Lemberg <wl@gnu.org>
+
+ Introduce `FT_THROW' macro.
+
+ The idea is to replace code like
+
+ return FT_Err_Foo_Bar;
+
+ or
+
+ return CFF_Err_Foo_Bar;
+
+ with
+
+ return FT_THROW( Foo_Bar );
+
+ The FT_THROW macro has two functions:
+
+ . It hides the module specific prefix.
+
+ . In debug mode, it calls the empty function `FT_Throw' which can
+ be thus used to set a breakpoint.
+
+ * include/freetype/internal/ftdebug.h (FT_THROW): New macro.
+ (FT_Throw): New prototype.
+ * src/base/ftdebug.c (FT_Throw): New function.
+
+2013-03-12 Werner Lemberg <wl@gnu.org>
+
+ Remove `FT_KEEP_ERR_PREFIX'.
+
+ The idea is to always have FT_ERR_PREFIX available internally.
+
+ * include/freetype/fterrors.h: Use FT2_BUILD_LIBRARY to guard
+ undefinition of FT_ERR_PREFIX
+
+ * src/gxvalid/gxverror.h, src/otvalid/otverror.h,
+ src/sfnt/sferrors.h: Updated.
+
+2013-03-11 Werner Lemberg <wl@gnu.org>
+
+ [gxvalid] Fix module error.
+
+ * src/gxvalid/gxverror.h (FT_ERR_BASE): Define as
+ FT_Mod_Err_GXvalid.
+ * include/freetype/ftmoderr.h: Add module error for `GXvalid'.
+
+2013-03-11 Werner Lemberg <wl@gnu.org>
+
+ Always use module related error codes.
+
+ * src/cff/cffobjs.c (cff_face_init), src/type1/t1objs.c
+ (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Use
+ `FT_ERROR_BASE'.
+
+ * src/type1/t1load.c (parse_encoding): Use
+ T1_Err_Unknown_File_Format.
+
+2013-03-08 Werner Lemberg <wl@gnu.org>
+
+ [cff] Set `linear{Hori,Vert}Advance' for embedded bitmaps also.
+
+ Problem reported by Khaled Hosny <khaledhosny@eglug.org>.
+
+ * src/cff/cffgload.c (cff_slot_load): Implement it.
+
+2013-02-23 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Fix commit ab02d9e8.
+
+ * src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22.
+
+2013-02-19 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] New bisecting BBox_Cubic_Check (disabled).
+
+ * src/base/ftbbox.c (BBox_Cubic_Check): New bisecting algorithm
+ for extremum search built around simple condition that defines
+ which half contains the extremum.
+
+2013-02-18 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [tools] Update BBox testing tool.
+
+ * src/tools/test_bbox.c: Add another cubic outline with exact BBox.
+ (REPEAT): Increase the number of benchmarking cycles.
+ (profile_outline): Tweak output formatting.
+
+2013-02-02 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #38235.
+
+ * builds/unix/configure.raw: Don't generate `freetype-config' and
+ `freetype.pc'.
+
+ * builds/unix/unix-def.in (FT2_EXTRA_LIBS, LIBBZ2, LIBZ,
+ build_libtool_libs, ft_version): New variables to be substituted.
+ (freetype-config, freetype.pc): New rules to generate those files.
+
+ * builds/unix/freetype-config.in: Remove code for handling `rpath'.
+ The use of $rpath has been accidentally removed in a patch from
+ 2009-12-22, and apparently noone has missed it since.
+ Use `%' instead of `@' as a variable substitution marker.
+ Use quotes.
+
+ * builds/unix/freetype.in: Use `%' instead of `@' as a variable
+ substitution marker.
+ Use quotes.
+
+2013-02-07 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttobjs.c (tt_size_run_prep): Reset more GS variables.
+
+ BTW, Greg agrees that the OpenType specification is missing the list
+ of GS variables which will always be reset to the default values
+ after the `prep' table has been executed.
+
+2013-02-06 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttobjs.c (tt_size_run_prep): Reset reference points.
+
+ Up to now, we simply took a snapshot of the Graphics State after the
+ `prep' table has been executed, and right before a glyph's bytecode
+ was run it got reloaded. However, as Greg Hitchcock has told us in
+ private communication, reference points get reset to zero in the MS
+ rasterizer and we follow in due course. While reasonable, this is
+ undocumented behaviour.
+
+ Most notably, this fixes the rendering of Arial's `x' glyph in
+ subpixel hinting mode.
+
+2013-02-05 Werner Lemberg <wl@gnu.org>
+
+ [truetype] A better fix for Savannah bug #38211.
+
+ * src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to
+ MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock).
+
+2013-02-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [pcf] Streamline parsing of PCF encoding table.
+
+ * src/pcf/pcfread.c (pcf_get_encodings): Use simpler double for-loop.
+ Reallocate array instead of using temporary storage.
+
+2013-02-01 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #38227.
+
+ * builds/unix/freetype-config.in: Set LC_ALL.
+
+2013-02-01 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #38221.
+
+ This complements commit 83c0ebab.
+
+ * src/base/ftcalc.c (FT_MulDiv_No_Round): Don't enclose with
+ `TT_USE_BYTECODE_INTERPRETER'.
+
+2013-02-01 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix Savannah bug #38211.
+
+ * src/truetype/ttinterp.c (Ins_IP): Make FreeType behave identical
+ to other interpreters if rp1 == rp2 (which is invalid).
+
+2013-01-28 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Small optimization of BBox calculation.
+
+ * src/base/ftbbox.c (BBox_Cubic_Check): Use FT_MSB function in
+ scaling algorithm.
+
+2013-01-26 Infinality <infinality@infinality.net>
+
+ [truetype] Minor formatting fix.
+
+ * src/truetype/ttinterp.c: Updated.
+ (DO_RS): Fix indentation.
+
+2013-01-26 Infinality <infinality@infinality.net>
+
+ [truetype] Fix rasterizer_version logic in sph.
+
+ * src/truetype/ttsubpix.c: Updated.
+ (ALWAYS_SKIP_DELTAP_Rules): Remove rule for Trebuchet MS.
+ (sph_set_tweaks): Fix `rasterizer_version' logic.
+
+2013-01-26 Infinality <infinality@infinality.net>
+
+ [truetype] Align more to ClearType whitepaper for sph.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Add flags
+ for detected opcode patterns and compatibility mode.
+
+ * src/truetype/ttgload.c (tt_loader_init): Complete conditional.
+
+ * src/truetype/ttinterp.c: Updated.
+ Remove SPH_DEBUG and replace with FT_TRACE7.
+ (DO_RS): More conditions.
+ (Ins_FDEF): Add more opcode detection patterns.
+ More specific conditions when flagging an fdef.
+ Make compatibility mode only turn on when delta fdefs are found.
+ (Ins_CALL, Ins_LOOPCALL): Set flags for currently executed fdef.
+ (Ins_SHPIX): Remove logic to handle ttfautohinted fonts.
+ Simplify conditionals where possible.
+ Use `&' instead of `%' operator for dumb compilers.
+ (Ins_MIAP): Adjust twilight zone conditional.
+ Ensure `ignore_x_mode' is on when testing sph conditionals.
+ (Ins_MIRP): Ensure `ignore_x_mode' is on when testing sph
+ conditionals.
+ Do cvt cutin always when `ignore_x_mode' is active.
+ Remove test for ttfautohinted fonts.
+ (Ins_DELTAP): Ensure `ignore_x_mode' is on when testing sph
+ conditionals.
+ Do cvt cutin always when `ignore_x_mode' is active.
+ Remove test for ttfautohinted fonts.
+ Use `&' instead of `%' operator for dumb compilers.
+ (Ins_GETINFO): Remove SPH_DEBUG and replace with FT_TRACE7.
+
+ * src/truetype/ttinterp.h: Updated.
+ (TT_ExecContextRec): Remove compatibility_mode variable.
+ Add variable to indicate when executing in special fdefs for sph.
+
+ * src/truetype/ttobjs.h: Updated.
+ (TT_DefRecord): Add flags to identify special fdefs for sph.
+ (TT_SizeRec): Remove unnecessary ttfautohinted variable.
+
+ * src/truetype/ttsubpix.c: Updated.
+ (COMPATIBILITY_MODE_Rules): Remove all. Auto-detected now.
+ (PIXEL_HINTING_Rules): Remove all. Unnecessary after fixes.
+ (SKIP_NONPIXEL_Y_MOVES_Rules): Remove Ubuntu.
+ (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Arial Bold `N'.
+ (SKIP_OFFPIXEL_Y_MOVES_Rules): Remove all. Happens automatically
+ now.
+ (ROUND_NONPIXEL_Y_MOVES_Rules): Remove Ubuntu.
+ (ROUND_NONPIXEL_Y_MOVES_Rules_Exceptions): Remove all.
+ (NORMAL_ROUND_Rules): Remove Verdana.
+ (NO_DELTAP_AFTER_IUP_Rules): Remove all.
+ (sph_set_tweaks): Performance fix. Don't run prep always.
+ Adjust conditional for sph_compatibility_mode.
+
+ * src/truetype/ttsubpix.h: Add new fdef flags for sph.
+
+2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Fix broken emboldening at small sizes.
+
+ * src/base/ftoutln.c (FT_Outline_EmboldenXY): Do not attempt to
+ normalize zero-length vectors.
+
+2013-01-25 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #38167.
+
+ This fixes commit 83c0ebab from 2012-06-27.
+
+ * src/truetype/ttinterp.h:
+ s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/.
+
+2013-01-25 Xi Wang <xi.wang@gmail.com>
+
+ [sfnt] Fix broken pointer overflow checks.
+
+ Many compilers such as gcc and clang optimize away pointer overflow
+ checks `p + n < p', because pointer overflow is undefined behavior.
+ Use a safe form `n > p_limit - p' instead.
+
+ Also avoid possible integer overflow issues, for example, using
+ `num_glyphs > ( p_limit - p ) / 2' rather than `num_glyphs * 2'
+ given a large `num_glyphs'.
+
+ * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Implement it.
+
+2013-01-25 Werner Lemberg <wl@gnu.org>
+
+ [base] Fix `make multi'.
+
+ * src/base/ftoutln.c, src/base/fttrigon.c: Include
+ FT_INTERNAL_CALC_H.
+
+2013-01-25 David 'Digit' Turner <digit@google.com>
+
+ [truetype] Fix C++ compilation.
+
+ * src/truetype/ttsubpix.h: Updated.
+ (SPH_X_SCALING_RULES_SIZE): Moved and renamed to...
+ * src/truetype/ttsubpix.c (X_SCALING_RULES_SIZE): This.
+ (sph_X_SCALING_Rules): Removed.
+ (scale_test_tweak): Make function static.
+ (sph_test_tweak_x_scaling): New function.
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Updated.
+
+2013-01-23 Werner Lemberg <wl@gnu.org>
+
+ [base] Make `FT_Hypot' really internal.
+
+ * include/freetype/fttrigon.h (FT_Hypot): Move to...
+ * include/freetype/internal/ftcalc.h: This file.
+
+ * src/base/fttrigon.c (FT_Hypot): Move to...
+ * src/base/ftcalc.c: This file.
+ Include FT_TRIGONOMETRY_H.
+
+ * src/truetype/ttgload.c: Don't include FT_TRIGONOMETRY_H.
+
+2013-01-23 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Revert change from 2013-01-22.
+
+ FreeType's `height' value is the baseline-to-baseline distance...
+
+ * src/truetype/ttobjs.c (tt_size_reset): Undo.
+
+2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base, truetype] New internal `FT_Hypot' function.
+
+ * include/freetype/fttrigon.h (FT_Hypot): Declare it.
+ * src/base/fttrigon.c (FT_Hypot): Define it.
+ * src/truetype/ttgload.c (TT_Process_Composite_Component): Use it
+ instead of explicit expressions.
+ * src/truetype/ttinterp.c (Current_Ratio, Normalize): Use it instead
+ of TT_VecLen.
+ (TT_VecLen): Removed.
+
+2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Fix integer overflow.
+
+ * src/base/ftoutln.c (FT_Outline_EmboldenXY): Normalize incoming and
+ outgoing vectors and use fixed point arithmetic.
+
+2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Fix integer overflow.
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Scale the
+ coordinates down to avoid overflow.
+
+2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Split out MSB function.
+
+ * src/base/fttrigon.c (ft_trig_prenorm): Borrow from here.
+ * include/freetype/internal/ftcalc.h (FT_MSB): Declare here.
+ * src/base/ftcalc.c (FT_MSB): Define here.
+
+2013-01-22 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix font height.
+
+ * src/truetype/ttobjs.c (tt_size_reset): The Windows rendering
+ engine uses rounded values of the ascender and descender to compute
+ the TrueType font height.
+
+2013-01-16 Behdad Esfahbod <behdad@behdad.org>
+
+ [sfnt] Fix optimized sbit loader.
+
+ It was not taking bit_depth into consideration when blitting!
+
+ * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_byte_aligned,
+ * tt_sbit_decoder_load_bit_aligned): Handle bit
+ depth.
+
+2013-01-16 David 'Digit' Turner <digit@google.com>
+
+ [truetype] Improve sub-pixel code.
+
+ This patches fixes many issues with the ttsubpix implementation.
+
+ 1. Data tables are defined, instead of declared, in the header, and
+ thus copied into each source file that includes it.
+
+ 2. These tables were defined as global, mutable, visible variables,
+ and thus costing private RAM to every process that loads the
+ library (> 50 KB / process, this is huge!).
+
+ Additionally, this also made the library export the symbols
+ completely needlessly.
+
+ 3. Missing `sph_' and `SPH_' prefixes to some of the definitions.
+
+ Note that this doesn't try to fix the incredibly inefficient storage
+ format for the data tables used by the code. This one will require
+ another pass in the future.
+
+ * src/truetype/ttinterp.h (MAX_NAME_SIZE, MAX_CLASS_MEMBERS):
+ Renamed to...
+ (SPH_MAX_NAME_SIZE, SPH_MAX_CLASS_MEMBERS): This.
+ Update all users.
+
+ (SPH_TweakRule, SPH_ScaleRule): Decorate with `const' where
+ appropriate.
+
+ (Font_Class): Rename to...
+ (SPH_Font_Class): This. Decorate with `const' where appropriate.
+
+ * src/truetype/ttsubpix.h (scale_test_tweak, sph_test_tweak):
+ Decorate arguments with `const' where appropriate.
+
+ Move font tweaking tables to...
+
+ * src/truetype/ttsubpic.c: This file and decorate them with `static'
+ and `const' where appropriate.
+
+ (X_SCALING_Rules, X_SCALING_RULES_SIZE): Renamed to...
+ (spu_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This.
+ Update all users.
+
+2013-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [truetype] Improve accuracy of normalization of short vectors.
+
+ Unit vector components are stored as 2.14 fixed-point numbers. In
+ order to calculate all 14 bits accurately, a short vector to be
+ normalized has to be upscaled to at least 14 bits before its length
+ is calculated. This has been safe since accurate CORDIC algorithms
+ were adopted.
+
+ * src/truetype/ttinterp.c (Normalize): Scale short vectors by 0x4000.
+
+2013-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [truetype] Kill very old vector normalization hacks.
+
+ Back in the days, vector length calculations were not very accurate
+ and the vector normalization function, Normalize, had to meticulously
+ correct the errors for long vectors [commit b7ef2b096867]. It was no
+ longer necessary after accurate CORDIC algorithms were adopted, but
+ the code remained. It is time to kill it.
+
+ * src/truetype/ttinterp.c (Normalize): Remove error compensation.
+ (TT_VecLen): Remove any mention of old less accurate implementation.
+
+2013-01-11 Werner Lemberg <wl@gnu.org>
+
+ Disable FT_CONFIG_OPTION_OLD_INTERNALS.
+
+ After the next release we are going to remove the code completely.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (FT_CONFIG_OPTION_OLD_INTERNALS): Comment out.
+ * docs/CHANGES: Document it.
+
+2013-01-10 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Update the overflow protection bit.
+
+ The recent optimizations of CORDIC iterations drastically reduce the
+ expansion factor. Vector components with MSB of 29 are now safe
+ from overflow.
+
+ * src/base/fttrigon.c (FT_TRIG_SAFE_MSB): New macro.
+ (ft_trig_prenorm): Use it and remove dead code.
+
+2013-01-09 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base, pshinter] Use FT_ABS, FT_MIN, and FT_MAX for readability.
+
+ * src/base/ftbbox.c: Updated.
+ * src/base/ftobjs.c: Updated.
+ * src/base/fttrigon.c: Updated.
+ * src/pshinter/pshalgo.c: Updated.
+ * src/pshinter/pshrec.c: Updated.
+
+2013-01-08 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Clean up trigonometric core.
+
+ * src/base/fttrigon.c: Document the algorithm in a large comment.
+ (FT_TRIG_COSCALE): Remove macro.
+ (FT_Tan: Use `FT_TRIG_SCALE' instead.
+ (FT_Cos, FT_Vector_Unit): Ditto and round the return values.
+
+2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Use rounding in CORDIC iterations.
+
+ * src/base/fttrigon.c (ft_trig_pseudo_rotate,
+ ft_trig_pseudo_polarize): Improve accuracy by rounding.
+
+2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Reduce trigonometric algorithms.
+
+ After we get within 45 degrees by means of true 90-degree rotations,
+ we can remove initial 45-degree CORDIC iteration and start from
+ atan(1/2) pseudorotation, reducing expansion factor thereby.
+
+ * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macros.
+ (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Update.
+
+ * src/tools/cordic.py: Bring up to date with trigonometric core.
+
+ * docs/CHANGES: Old typo.
+
+2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/pshinter/pshalgo.h: Remove unused code.
+
+2012-12-27 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (tt_loader_init): Add more tracing.
+
+2012-12-23 Werner Lemberg <wl@gnu.org>
+
+ [type1] Fix handling of /FontBBox in MM fonts.
+ Problem reported by Del Merritt <del@alum.mit.edu>
+
+ If we have
+
+ /FontBBox { { 11 12 13 14 15 16 17 18 }
+ { 21 22 23 24 25 26 27 28 }
+ { 31 32 33 34 35 36 37 38 }
+ { 41 42 43 44 45 46 47 48 } }
+
+ in the /Blend dictionary, then the first BBox is { 11 21 31 41 },
+ the second { 12 22 32 42 }, etc.
+
+ * include/freetype/internal/psaux.h (T1_FieldType): Add
+ `T1_FIELD_TYPE_MM_BBOX' (for temporary use).
+
+ * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
+ Implement it.
+
+2012-12-21 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/tools/cordic.py: Bring up to date with trigonometric core.
+
+2012-12-21 Werner Lemberg <wl@gnu.org>
+
+ Check parameters of `FT_Outline_New'.
+ Problem reported by Robin Watts <robin.watts@artifex.com>.
+
+ * src/base/ftoutln.c (FT_Outline_New_Internal): Ensure that
+ `numContours' and `numPoints' fit into FT_Outline's `n_points' and
+ `n_contours', respectively.
+
+2012-12-20 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.11 released.
+ ==========================
+
+
+ Tag sources with `VER-2-4-11'.
+
+ * docs/CHANGES, docs/release: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.11.
+
+ * 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.10/2.4.11/, s/2410/2411/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 11.
+
+ * builds/unix/configure.raw (version_info): Set to 16:0:10.
+
+ * builds/toplevel.mk (dist): Don't include `.mailmap'.
+
+2012-12-20 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Improve trigonometric core.
+
+ FreeType used to rely on a 24-step iteration CORDIC algorithm to
+ calculate trigonometric functions and rotate vectors. It turns out
+ that once the vector is in the right half-plane, the initial rotation
+ by 63 degrees is not necessary. The algorithm is perfectly capable
+ to converge to any angle starting from the second 45 degree rotation.
+ This patch removes the first rotation and makes it a 23-step CORDIC
+ algorithm.
+
+ * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macro
+ values.
+ (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Remove initial
+ rotation.
+
+2012-12-19 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (ft_property_do): Fix compiler warning.
+
+2012-12-19 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/ftrfork.c (FT_Raccess_Guess): Switch to FT_Int counters.
+
+2012-12-19 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Clean up trigonometric core.
+
+ * src/base/fttrrigon.c (ft_trig_pseudo_polarize): Align algorithm
+ with `ft_trig_pseudo_rotate'.
+
+2012-12-18 Infinality <infinality@infinality.net>
+
+ [truetype] Minor performance enhancement.
+
+ * src/truetype/ttgload.c: (TT_Process_Simple_Glyph): Use FT_MulFix
+ instead of FT_MulDiv.
+
+2012-12-17 Infinality <infinality@infinality.net>
+
+ [truetype] Remove unusued code and variables.
+
+ * src/truetype/ttinterp.c: Updated.
+ (Ins_FDEF): Remove opcode patterns that are not being used.
+
+2012-12-16 Werner Lemberg <wl@gnu.org>
+
+ Various compiler warning fixes.
+
+ * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Use
+ `logical not' operator instead of negation. The idea is that `~'
+ returns exactly the data type enforced by the cast to a pointer (be
+ it 32bit or 64bit or whatever), while a negative integer has not
+ this flexibility.
+ * src/cache/ftccmap.c (FTC_CMAP_UNKNOWN): Ditto.
+ * src/truetype/ttgxvar.c (ALL_POINTS, TT_Get_MM_Var): Ditto.
+ * src/type/t1load.c (T1_Get_MM_Var): Ditto.
+ (parse_blend_axis_types): Use cast.
+ * src/bdf/bdflib.c (_bdf_readstream): Use cast.
+
+2012-12-16 Infinality <infinality@infinality.net>
+
+ [truetype] Remove unusued code and variables. Add minor fixes.
+
+ * src/truetype/ttsubpix.h: Updated.
+ (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Trebuchet MS.
+ (ALLOW_X_DMOVEX_Rules): Remove Arial characters.
+ (ALLOW_X_DMOVE_Rules): Remove Arial characters.
+ (RASTERIZER_35_Rules): Verdana no longer needs to be here.
+ (SKIP_IUP_Rules): Formatting fix.
+ (DELTAP_SKIP_EXAGGERATED_VALUES_Rules): Remove Segoe UI.
+ (COMPATIBLE_WIDTHS_Rules): Add Monaco and Trebuchet MS.
+ (X_SCALING_Rules): Add misc. corrective fixes.
+
+ * src/truetype/ttgload.c: (TT_Process_Simple_Glyph): Adjust correction
+ factor for emboldening during scaling.
+
+ * src/truetype/ttinterp.h: Updated.
+ (TT_ExecContextRec): Remove unused variables.
+
+ * src/truetype/ttobjs.h: Updated.
+ (TT_SizeRec): Add ttfautohinted variable.
+
+ * src/truetype/ttinterp.c: Updated.
+ (Ins_FDEF): Rework code to fix bugs and add more detection.
+ (Ins_CALL): Remove unused code.
+ (Ins_LOOPCALL): Remove unused code.
+ (TT_RunIns): Remove unusued code.
+ (Ins_SHPIX): Add logic to handle ttfautohinted fonts.
+ (Ins_MIRP): Don't round x in cut-in calculation. Add logic to handle
+ ttfautohinted fonts.
+
+2012-12-16 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix Savannah bug #37936.
+
+ * src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak.
+
+2012-12-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Fix 11-year old bug.
+
+ Since the initial commit (ebe85f59) the value of FT_TRIG_SCALE has
+ always been slightly less than the correct value, which has been
+ given in the comment as a hexadecimal. As a result, vector lengths
+ were underestimated and rotated vectors were shortened.
+
+ * src/base/fttrigon.c (FT_TRIG_SCALE): Fix macro value.
+
+2012-12-15 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #37907.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
+ negative second parameter of `ENCODING' field also.
+
+2012-12-15 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #37906.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Use correct array
+ size for checking `glyph_enc'.
+
+2012-12-15 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #37905.
+
+ * src/bdf/bdflib.c (_bdf_parse_start) <STARTPROPERTIES>: Reset
+ `props_size' to zero in case of allocation error; this value gets
+ used in a loop in `bdf_free_font'.
+
+2012-12-10 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [truetype] Scale F_dot_P down.
+
+ The dot product between freeVector and projVector or cosine of
+ the angle between these FT_F2Dot14 unit vectors used to be scaled up
+ by 4 and routinely occupied 32 bits in an FT_Long field F_dot_P.
+ This patch scales the value down by 2^14 instead, which simplifies
+ its use throughout the bytecode interpreter.
+
+ This does not lead to the loss of precision because the lower bits
+ are unreliable anyway. Consider two unit vectors (1,0) and (.6,.8)
+ for which the true value of F_dot_P is .6 * 0x40000000 = 0x26666666.
+ These vectors are stored as (0x4000,0) and (0x2666,0x3333) after
+ rounding and F_dot_P is assigned 0x26660000. The lower bits were
+ already lost while rounding the unit vector components.
+
+ Besides code simplification, this change can lead to better
+ performance when FT_MulDiv with the scaled-down F_dot_P is less
+ likely to use the costly 64-bit path. We are not changing the type
+ of F_dot_P to FT_F2Dot14 at this point.
+
+ * src/truetype/ttinterp.c (Compute_Funcs): Scale F_dot_P down by 14
+ bits and modify its use accordingly.
+ (Direct_Move, Direct_Move_Orig, Compute_Point_Displacement): Modify
+ the use of F_dot_P field.
+ * src/truetype/ttobjs.c (tt_size_run_fpgm): Change arbitrary
+ assignment of F_dot_P to its theoretical maximum in case we decide
+ to scale back its type later.
+
+2012-12-09 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
+
+ [type1] Another fix for 2012-09-17 commit.
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Correctly set
+ `limit' value.
+
+2012-12-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [truetype] Tweak the previous commit.
+
+ * src/truetype/ttinterp.c (Current_Ratio): Put unit vector
+ components as the second TT_MulFix14 arguments. This is required
+ on 16-bit systems.
+
+2012-12-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [truetype] Microoptimizations in bytecode interpreter.
+
+ * src/truetype/ttinterp.c (TT_DivFix14): New macro.
+ (Normalize): Use it here.
+ (Current_Ratio): Use TT_MulFix14 instead of FT_MulDiv.
+ (Ins_SHPIX): Cancel out two TT_MulFix14 calls.
+
+2012-12-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [truetype] Cosmetic improvement in bytecode interpreter.
+
+ * src/truetype/ttinterp.c: Use explicit calls to FT_MulDiv,
+ FT_MulFix, and FT_DivFix instead of macros.
+
+2012-12-03 John Tytgat <John.Tytgat@esko.com>
+
+ [pshinter] Clamp BlueScale value.
+
+ This is Savannah bug #37856.
+
+ * src/pshinter/pshglob.c (psh_calc_max_height): New function.
+ (psh_globals_new): Use it to limit BlueScale value to
+ `1 / max_of_blue_zone_heights'.
+
+2012-12-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [truetype, type1] Revise the use of FT_MulDiv.
+
+ * src/truetype/ttgxvar.c: Updated.
+ * src/truetype/ttobjs.c: Updated.
+ * src/type1/t1load.c: Updated.
+
+2012-11-30 Werner Lemberg <wl@gnu.org>
+
+ [configure] Preserve customized `ftoption.h'.
+
+ Problem reported by Del Merritt <del@alum.mit.edu>.
+
+ * builds/unix/configure.raw <cpp computation of bit length>: Don't
+ remove existing FreeType configuration files.
+
+2012-11-29 John Tytgat <John.Tytgat@esko.com>
+
+ [type1] Fix Savannah bug #37831.
+
+ The bug report also contains a patch.
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Really fix
+ change from 2012-09-17.
+
+2012-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [truetype] Fix formatting and typo.
+
+2012-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [cid, type1, type42] Clean up units_per_EM calculations.
+
+ * src/cid/cidload.c (cid_parse_font_matrix): Updated.
+ * src/type1/t1load.c (t1_parse_font_matrix): Updated.
+ * src/type42/t42parse.c (t42_parse_font_matrix): Updated.
+
+2012-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [ftstroke] Minor improvement.
+
+ * src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with
+ FT_MulDiv.
+
+2012-11-17 Werner Lemberg <wl@gnu.org>
+
+ * src/base/fttrigon.c (ft_trig_downscale): Make 64bit version work.
+
+2012-11-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Fix integer overflows in dd5718c7d67a.
+
+ * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use FT_MulDiv.
+
+2012-11-15 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Trace stem widths.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths): Add some
+ FT_TRACE calls.
+
+2012-11-13 Werner Lemberg <wl@gnu.org>
+
+ [cff] Add support for OpenType Collections (OTC).
+
+ * src/cff/cffload.c (cff_font_load): Separate subfont and face
+ index handling to load both pure CFFs with multiple subfonts and
+ OTCs (with multiple faces where each face holds exactly one
+ subfont).
+ * src/cff/cffobjs.c (cff_face_init): Updated.
+
+2012-11-12 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Minor improvement.
+
+ * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Fix
+ loop.
+
+2012-11-10 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve tracing.
+
+ * src/autofit/aflatin.c (af_latin_hint_edges)
+ [FT_DEBUG_LEVEL_TRACE]: Count number of actions and emit something
+ if there weren't any.
+
+2012-11-04 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Fortify emboldening code against egregious distortions.
+
+ * src/base/ftoutln.c (FT_Outline_EmboldenXY): Threshold emboldening
+ strength when it leads to segment collapse.
+
+2012-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Clean up emboldening code and improve comments there.
+
+ * src/base/ftoutln.c (FT_Outline_EmboldenXY): Replace sequential
+ calls to FT_MulFix and FT_DivFix with FT_MulDiv.
+ Mention that bisectors are used to figure out the shift direction.
+
+2012-10-24 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Add standard character to `AF_ScriptClassRec' structure.
+
+ * src/autofit/aftypes.h (AF_ScriptClassRec): Add `standard_char'
+ member.
+ (AF_DEFINE_SCRIPT_CLASS): Updated.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths): Use it.
+ (af_latin_metrics_init, af_latin_script_class): Updated.
+
+ * src/autofit/aflatin.c (af_latin2_metrics_init_widths): Use it.
+ (af_latin2_metrics_init, af_latin2_script_class): Updated.
+
+ * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Use it.
+ (af_cjk_metrics_init, af_cjk_script_class): Updated.
+
+ * src/autofit/afindic.c (af_indic_metrics_init,
+ af_indic_script_class): Updated.
+
+ * src/autofit/afcjk.h, src/autofit/aflatin.h: Updated.
+
+ * src/autofit/afdummy.c: Updated.
+
+2012-10-24 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Only use Unicode CMap.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init): Implement it, to be
+ in sync with `af_face_globals_compute_script_coverage'.
+
+2012-10-21 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Improve parsing of invalid numbers.
+
+ * src/psaux/psconv.c (PS_Conv_Strtol): Always parse complete number,
+ even in case of overflow.
+ (PS_Conv_ToInt): Only increase cursor if parsing was successful.
+ (PS_Conv_ToFixed): Ditto.
+ Trace underflow and data error.
+
+2012-10-21 Werner Lemberg <wl@gnu.org>
+
+ [smooth] Improve tracing.
+
+ * src/smooth/ftgrays.c (gray_sweep): Trace last sweep line of
+ current band also.
+
+2012-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [truetype] Cheaper way to threshold angles between vectors.
+
+ * src/truetype/ttinterp.c (Ins_ISECT): Thresholding tangent is a lot
+ cheaper than thresholding sine.
+
+2012-10-20 Werner Lemberg <wl@gnu.org>
+
+ [cff] Improve parsing of invalid real numbers.
+
+ * src/cff/cffparse.c (cff_parse_real): Always parse complete number,
+ even in case of overflow or underflow.
+ Also trace one more underflow.
+
+2012-10-20 Andreas Pehnack <andreas.pehnack@me.com>
+
+ [sfnt] Load pure CFF fonts wrapped in SFNT container.
+
+ Such fonts only have a `cmap' and a `CFF' table.
+
+ * src/sfnt/ttload.c (tt_face_load_font_dir): Don't call
+ `check_table_dir' if font signature is `OTTO'.
+
+2012-10-20 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Fix some value overflows and improve tracing.
+
+ * src/psaux/psconv.c: Include FT_INTERNAL_DEBUG_H.
+ (FT_COMPONENT): Define.
+ (PS_Conv_Strtol): Return FT_Long.
+ Handle bad data and overflow.
+ Emit some tracing messages in case of error.
+ (PS_Conv_ToInt): Return FT_Long.
+ (PS_Conv_ToFixed): Updated.
+ * src/psaux/psconv.h: Updated.
+
+ * include/freetype/internal/fttrace.h: Add `psconv'.
+
+2012-10-20 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix `make multi CC=c++'.
+
+ * src/autofit/aflatin.c, src/autofit/aflatin2.c: Include
+ `afglobal.h'.
+ * src/autofit/afloader.c: Fix order of header files.
+ * src/autofit/afmodule.c: Include `afglobal.h' and `aferrors.h'.
+
+2012-10-19 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix more value errors and improve tracing.
+
+ * src/cff/cffparse.c (cff_parse_integer): Emit tracing message in
+ case of error.
+ (cff_parse_real): Handle and trace overflow, underflow, and bad data
+ consistently.
+ (do_fixed): New helper function, handling and tracing overflow.
+ (cff_parse_fixed, cff_parse_fixed_scaled): Use `do_fixed'.
+
+2012-10-17 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Fix some value overflows.
+
+ * src/psaux/psconv.c (PS_Conv_ToFixed): Implement it.
+
+2012-10-17 Bram Tassyns <BramT@enfocus.com>
+
+ [cff] Fix value overflow.
+
+ * src/cff/cffparse.c (cff_parse_fixed_scaled): Implement it.
+
+2012-10-17 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix Savannah bug #37572.
+
+ * src/truetype/ttinterp.c (Ins_ISECT): Use angle between vectors to
+ avoid grazing intersections. The previous threshold was too coarse,
+ incorrectly rejecting short but valid vectors.
+
+2012-09-30 Gilles Espinasse <g.esp@free.fr>
+
+ Remove useless `rm' detection.
+
+ `rm -f' is directly used in the `configure' script created by
+ autoconf, thus no availability test is necessary.
+
+ * builds/unix/configure.raw (RMF): Remove test.
+ * builds/unix/unix-def.in (DELETE): Updated.
+
+2012-09-29 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Minor optimization.
+
+ * src/autofit/afglobals.c (af_face_globals_compute_script_coverage):
+ Add loop condition.
+
+2012-09-29 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix thinko.
+
+ * src/autofit/aftypes.h (AF_SCRIPT):
+ s/AF_SCRIPT_NONE/AF_SCRIPT_DUMMY/. We already use `AF_SCRIPT_NONE'
+ as a bit mask.
+
+ * src/autofit/afdummy.c: Updated.
+
+2012-09-18 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Implement `increase-x-height' property.
+
+ * include/freetype/ftautoh.h (FT_Prop_IncreaseXHeight): New
+ structure.
+
+ * include/autofit/afmodule.c (af_property_get_face_globals): New
+ function, re-using code from `af_property_get'.
+ (af_property_set, af_property_get): Handle `increase-x-height'.
+ Updated.
+
+2012-09-18 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Implement Infinality's `increase glyph heights'.
+
+ This is an improved version of a similar fix contained in the
+ so-called `Infinality patch', taken from
+
+ http://www.infinality.net/fedora/linux/zips/freetype-infinality-2.4.10-20120616_01-x86_64.tar.bz2
+
+ which addresses various enhancements of the auto-hinter. Without
+ properties to control a module's metadata it wasn't possible to
+ adapt the patches because everything was originally controlled by
+ environment variables which I consider not suitable in general.
+
+ A patch to control `increase_x_height' follows.
+
+ * src/autofit/afglobal.h (AF_PROP_INCREASE_X_HEIGHT_MIN,
+ AF_PROP_INCREASE_X_HEIGHT_MAX): New macros.
+ (AF_FaceGlobalsRec): Add `increase_x_height' member.
+ * src/autofit/afglobal.c (af_face_globals_new): Initialize it.
+
+ * src/autofit/aflatin.c (af_latin_metrics_scale_dim),
+ * src/autofit/aflatin2.c (af_latin2_metrics_scale_dim): Implement
+ handling of `increase_x_height'.
+
+2012-09-18 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Add hierarchical property access to some structures.
+
+ * src/autofit/afglobal.h: Include `afmodule.h'.
+ (AF_FaceGlobalsRec): Add `module' member.
+ (AF_FaceGlobals): Typedef moved to...
+ * src/autofit/aftypes.h: Here.
+ (AF_ScriptMetricsRec): Add `globals' member.
+
+ * src/autofit/afglobal.c (af_face_globals_new,
+ af_face_globals_compute_script_coverage,
+ af_face_globals_get_metrics): Updated.
+
+ * src/autofit/afloader.c (af_loader_reset), src/autofit/afmodule.c
+ (af_property_get): Updated.
+
+2012-09-17 Werner Lemberg <wl@gnu.org>
+
+ [type1] Fix Savannah bug #37350.
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Check for ASCII
+ storage only if we actually have at least four bytes.
+
+2012-09-15 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Implement `fallback-script' property.
+
+ * src/autofit/afglobal.c: s/default_script/fallback_script/.
+ * src/autofit/afglobal.h: s/AF_SCRIPT_DEFAULT/AF_SCRIPT_FALLBACK/.
+
+ * src/autofit/afmodule.c: s/default_script/fallback_script/.
+ (af_property_set, af_property_get): Implement `fallback-script'.
+ * src/autofit/afmodule.h: s/default_script/fallback_script/.
+
+ * include/freetype/ftautoh.h: Document it.
+
+2012-09-15 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Correct previous Unicode 6.1.0 change.
+
+ The auto-hinter's latin module only handles latin ligatures in the
+ `Alphabetical Presentation Forms' block.
+
+ * src/autofit/aflatin.c (af_latin_uniranges): Fix it.
+
+2012-09-15 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afmodule.c: s/FT_Err_/AF_Err_/.
+
+2012-09-15 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Make default script a global property.
+
+ * src/autofit/afmodule.h (AF_ModuleRec): Add `default_script' field.
+
+ * src/autofit/afglobal.c (af_face_globals_compute_script_coverage,
+ af_face_globals_new), src/autofit/afloader.c (af_loader_reset),
+ src/autofit/afmodule.c (af_property_get) <glyph-to-script-map>,
+ af_autofitter_init:
+ Handle default script.
+
+ * src/autofit/afglobal.h: Updated.
+
+2012-09-15 Werner Lemberg <wl@gnu.org>
+
+ Use `FT_Module' instead of `FT_Library' argument in property funcs.
+
+ This internal change simplifies access to global module data.
+
+ * include/freetype/internal/services/svprop.h
+ (FT_Properties_SetFunc, FT_Properties_GetFunc): Change accordingly.
+
+ * src/base/ftobjs.c (ft_property_do), src/autofit/afmodule.c
+ (af_property_set, af_property_get): Updated.
+
+2012-09-14 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Update to Unicode 6.1.0.
+
+ * src/autofit/afcjk.c (af_cjk_uniranges), src/autofit/aflatin.c
+ (af_latin_uniranges): Add and fix ranges.
+
+2012-09-14 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Pass `AF_Module' instead of `AF_Loader'.
+
+ We want to access the (not yet existing) module's global data later
+ on.
+
+ * src/autofit/afloader.c: Include `afmodule.h'.
+ (af_loader_init, af_loader_reset, af_loader_done,
+ af_loader_load_glyph): Change accordingly.
+ * src/autofit/afmodule.c (AF_ModuleRec): Move to `afmodule.h'.
+ Updated.
+
+ * src/autofit/afmodule.h: Include `afloader.h'.
+ (AF_ModuleRec): Define here.
+ * src/autofit/afloader.h (AF_Module): Define here.
+ Updated.
+
+2012-09-14 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix `make multi'.
+
+ * include/freetype/internal/fttrace.h: Add `afmodule'.
+ * src/autofit/afmodule.c: Include FT_INTERNAL_DEBUG_H.
+ (FT_COMPONENT): Define.
+
+2012-09-14 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afmodule.c: s/FT_Autofitter/AF_Module/.
+
+2012-09-12 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Minor reorganization.
+
+ * src/autofit/afglobal.c (AF_SCRIPT_LIST_DEFAULT,
+ AF_SCRIPT_LIST_NONE, AF_DIGIT): Move to...
+ * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT, AF_SCRIPT_LIST_NONE,
+ AF_DIGIT): This and update code.
+
+2012-09-01 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Implement `glyph-to-script-map' property.
+
+ * include/freetype/ftautoh.h: New public header file.
+ * include/freetype/config/ftheader.h (FT_AUTOHINTER_H): New macro.
+
+ * src/autofit/afglobal.c (AF_FaceGlobalsRec): Move structure to...
+ * src/autofit/afglobal.h: This header file.
+ * src/autofit/afmodule.c: Include FT_AUTOHINTER_H.
+ (af_property_get): Handle `glyph-to-script-map'.
+
+2012-08-31 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Implement properties service framework.
+
+ No properties are added yet.
+
+ * src/autofit/afmodule.c: Include FT_SERVICE_PROPERTIES_H.
+ (af_property_set, af_property_get): New dummy functions.
+ (af_service_properties, af_services, af_get_interface): Provide
+ service setup.
+ (autofit_moduleclass): Add service interface.
+
+ * src/autofit/afpic.c: Add necessary forward declarations.
+ (autofit_module_class_pic_init): Add code for service addition.
+ (autofit_module_pic_free): Add code for service removal.
+ * src/autofit/afpic.h (AF_SERVICES_GET, AF_SERVICE_PROPERTIES_GET):
+ New macros which provide necessary syntactical sugar for PIC
+ support.
+
+2012-08-30 Werner Lemberg <wl@gnu.org>
+
+ Implement properties to control FreeType modules.
+
+ * include/freetype/fterrdef.h (FT_Err_Missing_Property): New error
+ code.
+ * include/freetype/ftmodapi.h (FT_Property_Set, FT_Property_Get):
+ New API.
+
+ * include/freetype/internal/services/svprop.h: New file.
+ * include/freetype/internal/ftserv.h (FT_SERVICE_PROPERTIES_H): New
+ macro.
+
+ * src/base/ftobjs.c: Include FT_SERVICE_PROPERTIES_H.
+ (ft_property_do, FT_Property_Set, FT_Property_Get): New functions.
+
+2012-08-29 Werner Lemberg <wl@gnu.org>
+
+ [docmaker] Allow `-' in tags and identifiers.
+
+ * src/tools/docmaker/content.py (re_identifier),
+ src/tools/docmaker/sources.py (re_markup_tag1, re_markup_tag2,
+ re_crossref): Add `-' in patterns.
+
+2012-08-27 Werner Lemberg <wl@gnu.org>
+
+ [FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings.
+
+ * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER),
+ include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
+ FT_DEFINE_MODULE), include/freetype/internal/ftserv.h
+ (FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2,
+ FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4,
+ FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6),
+ src/autofit/afpic.c (autofit_module_class_pic_init),
+ src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c
+ (ft_create_default_module_classes), src/cff/cffparse.c
+ (FT_Create_Class_cff_field_handlers), src/cff/cffpic.c
+ (cff_driver_class_pic_init), src/pshinter/pshpic.c
+ (pshinter_module_class_pic_init), src/psnames/pspic.c
+ (psnames_module_class_pic_init), src/raster/rastpic.c
+ (ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c
+ (sfnt_module_class_pic_init), src/sfnt/ttcmap.c
+ (FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c
+ (ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c
+ (tt_driver_class_pic_init): Initialize allocation variable.
+
+2012-08-27 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix compilation warning.
+
+ * src/truetype/ttgload.c (IS_HINTED): Move macro to...
+ * src/truetype/ttobjs.h: This header file.
+
+2012-08-27 Werner Lemberg <wl@gnu.org>
+
+ [autofit, cff, pshinter, psnames] More renamings for orthogonality.
+
+ * src/autofit/afmodule.c, src/autofit/afpic.h:
+ s/AF_AUTOFITTER_/AF_/.
+
+ * src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffparse.c,
+ src/cff/cffpic.h: s/FT_CFF_/CFF_/.
+
+ * src/pshinter/pshmod.c, src/pshinter/pshpic.h:
+ s/FT_PSHINTER_/PSHINTER_/.
+
+ * src/psnames/psmodule.c, src/psnames/pspic.h:
+ s/FT_PSCMAPS/PSCMAPS_/.
+
+2012-08-27 Werner Lemberg <wl@gnu.org>
+
+ [sfnt, truetype] More renamings for orthogonality.
+
+ * src/sfnt/sfdriver.c, src/sfnt/sfntpic.h, src/sfnt/ttcmap.c,
+ src/truetype/ttdriver.c, src/truetype/ttpic.h: s/FT_SFNT_/SFNT_/,
+ s/FT_TT_/TT_/, s/GET_CMAP_INFO_GET/CMAP_INFO_GET/.
+
+2012-08-27 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Some macro and variable renamings for orthogonality.
+
+ * include/freetype/internal/autohint.h, src/base/ftobjs.c,
+ src/autofit/afmodule.c, src/autofit/afpic.c, src/autofit/afpic.h:
+ s/SERVICE/INTERFACE/, s/service/interface/, s/Service/Interface/.
+
+2012-08-26 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #37178.
+
+ * src/base/ftobjs.c (FT_Open_Face): Initialize `error' with
+ `FT_Err_Missing_Module' before loop to indicate `no valid drivers'.
+
+2012-08-17 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Oblique): Fix shear angle.
+
+ The old value was far too large (more than 20°). The new one
+ corresponds to 12°, quite common in typography.
+
+2012-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Fix Savannah bug #37017.
+
+ * src/smooth/ftgrays.c (gray_render_cubic): Use a different set of
+ checks when detecting super curvy splines to be split.
+
+2012-08-05 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve recognition of flat segments.
+
+ Problem reported by Brad Dunzer <BDunzer@extensis.com>.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): We have
+ a flat segment if the horizontal distance of best on-points is
+ larger than a given threshold.
+
+2012-08-05 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Variable renamings.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Replace
+ `glyph' with `outline'.
+ s/best_first/best_contour_first/.
+ s/best_last/best_contour_last/.
+
+2012-07-31 Werner Lemberg <wl@gnu.org>
+
+ [type1] Fix Savannah bug #37000.
+
+ * src/type1/t1load.c (parse_encoding): Fix order of checks.
+
+2012-07-17 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Fix Savannah bug #36833.
+
+ * src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid
+ operator if we want metrics only.
+
+2012-07-16 Werner Lemberg <wl@gnu.org>
+
+ [type1] Fix Savannah bug #36832.
+
+ * src/type1/t1load.c (parse_charstrings): Reject negative number of
+ glyphs.
+
+2012-07-13 Werner Lemberg <wl@gnu.org>
+
+ [type1] Fix Savannah bug #36829.
+
+ * src/type1/t1load.c (parse_encoding): Check cursor position after
+ call to T1_Skip_PS_Token.
+
+2012-07-12 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Revert the last commit 45337b07.
+
+ * src/base/ftstroke.c (FT_Stroker_New): Revert the previous change.
+
+2012-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [ftstroke] Fix uninitialized return value.
+
+ * src/base/ftstroke.c (FT_Stroker_New): Return FT_Err_Ok instead.
+
+2012-07-11 Werner Lemberg <wl@gnu.org>
+
+ [smooth] Avoid memory leak in case of failure.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use flags to
+ indicate what to clean up after finishing the function, with and
+ without errors.
+
+2012-07-09 Werner Lemberg <wl@gnu.org>
+
+ Fix compilation with MSVC 5.0.
+
+ Problem reported by Peter Breitenlohner and Akira Kakuto.
+
+ * include/freetype/config/ftstdlib.h (ft_setjmp): Updated.
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove cast.
+
+2012-07-09 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve debugging messages; do some code cleanup.
+
+ * src/autofit/aflatin.c (af_latin_align_linked_edge,
+ af_latin_hint_edges): Synchronize with formatting used in the
+ ttfautohint project.
+
+2012-07-07 Gilles Espinasse <g.esp@free.fr>
+
+ Fix strict-aliasing warning.
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast.
+
+2012-07-07 Dave Thomas <dave.thomas@metaforic.com>
+
+ [ARM] Fix FT_MulFix_arm.
+
+ * include/freetype/config/ftconfig.h (FT_MulFix_arm) [__arm__]:
+ Avoid ADDS instruction to clobber condition codes.
+
+2012-07-06 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Do some code cleanup.
+
+ * src/autofit/afglobal.c (af_face_globals_new): Simplify.
+
+ * src/autofit/afhints.c: Use `FT_TRACE7' instead of `printf'
+ everywhere.
+ (FT_COMPONENT): New macro.
+ (af_glyph_hints_done): Simplify.
+
+ * include/freetype/internal/fttrace.h: Updated.
+
+2012-07-05 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve output of debugging information.
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_segments): Print more
+ data; report no data.
+ (af_glyph_hints_dump_edges): Report no data.
+
+2012-07-04 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix Savannah bug #36091.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues),
+ src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Change the
+ constraint for testing round vs. flat segment: Accept either a
+ small distance or a small angle.
+
+2012-07-04 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Beautify blue zone tracing.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues),
+ src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Implement it.
+
+2012-07-03 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Quantize stem widths.
+
+ * src/autofit/afangles.c (af_sort_widths): Rename to...
+ (af_sort_and_quantize_widths): This.
+ Add code to avoid stem widths which are almost identical.
+ * src/autofit/aftypes.h, src/autofit/aflatin.c, src/autofit/afcjk.c:
+ Updated.
+
+2012-07-03 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Minor speed-up.
+
+ * src/autofit/afangles (af_sort_pos, af_sort_widths): Don't swap
+ elements if they are equal.
+
+2012-06-30 Gilles Espinasse <g.esp@free.fr>
+
+ Fix `checking if gcc static flag -static works' test.
+
+ On my linux build tree, I receive yes answer in in every package I
+ build except freetype for this test checking if gcc static flag
+ `-static' works
+
+ On freetype, no is received, unless bzip2 and zlib are disabled using
+
+ ./configure --without-bzip2 --without-zlib
+
+ The reason is that bzip2 and zlib tests add `-lz' and `-lbz2' to
+ LDFLAGS and this broke static flag test.
+
+ * builds/unix/configure.raw: Update CFLAGS and LDFLAGS only after
+ LT_INIT has run.
+
+2012-06-28 Infinality <infinality@infinality.net>
+
+ [truetype] Fix various artifacts.
+
+ Verdana was broken in the original Infinality commit. Also
+ includes other minor fixes.
+
+ * src/truetype/ttsubpix.h: Updated. Removed unused macros.
+ (RASTERIZER_35_Rules): Add Verdana.
+ (SKIP_NONPIXEL_Y_MOVES_Rules): Add Tahoma `s'.
+ (MIRP_CVT_ZERO_Rules): Remove Verdana.
+ (ALWAYS_SKIP_DELTAP_Rules): Add Russian char 0x438.
+ (COMPATIBLE_WIDTHS_Rules): Rearrange some rules.
+ (X_SCALING_Rules): Adjust Verdana `a' at 12 and 13 ppem.
+
+ * src/truetype/ttsubpix.c: Updated.
+ (sph_set_tweaks): Re-execute fpgm always.
+
+2012-06-28 Gilles Espinasse <g.esp@free.fr>
+
+ Fix CFLAGS and LDFLAGS share configure test.
+
+ * builds/unix/configure.raw: Fix typo.
+
+2012-06-28 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Set the `subpixel_positioned' flag unconditionally.
+
+ This is how the code currently behaves.
+
+ * src/truetype/ttgload.c (tt_loader_init): Do it.
+
+2012-06-27 Werner Lemberg <wl@gnu.org>
+
+ Fix conditional compilation.
+
+ * src/base/basepic.c: Use FT_CONFIG_OPTION_MAC_FONTS.
+
+2012-06-27 Werner Lemberg <wl@gnu.org>
+
+ Fix conditional compilation.
+
+ * include/freetype/internal/ftcalc.h (FT_MulDiv_No_Round): Don't
+ enclose with `TT_USE_BYTECODE_INTERPRETER'; we now need the function
+ elsewhere also.
+
+ * src/autofit/afcjk.h: Use AF_CONFIG_OPTION_CJK.
+
+ * src/truetype/ttgload.c (tt_loader_init): Fix compiler warning.
+
+ * src/truetype/ttinterp.c (Ins_MSIRP): Fix compiler warning.
+
+ * src/truetype/ttinterp.h: Use
+ TT_CONFIG_OPTION_BYTECODE_INTERPRETER.
+
+2012-06-26 Infinality <infinality@infinality.net>
+
+ [truetype] Remove unused rounding functionality.
+
+ The subpixel hinting patch contained the concept of an adjustable
+ number of gridlines per pixel. This is no longer used due to x
+ being completely ignored instead. This will return some of the
+ code to its existing state prior to the original Infinality
+ commit.
+
+ * include/freetype/internal/ftobjs.h (FT_PIX_FLOOR_GRID,
+ FT_PIX_ROUND_GRID, FT_PIX_CEIL_GRID): Removed.
+
+ * src/truetype/ttinterp.c: Updated.
+ (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,
+ SetSuperRound): Remove parameter to handle the number of grid lines per
+ pixel.
+ (SET_SuperRound, ROUND_None, CUR_Func_round): Updated.
+ (DO_SROUND, DOS45ROUND, DO_ODD, DO_EVEN): Updated.
+ (DO_ROUND, DO_NROUND): Updated.
+ (Move_Zp2_Point, Ins_SHPIX, Ins_MSIRP, Ins_MDAP, Ins_MIAP,
+ Ins_MDRP, Ins_MIRP): Perform Round_None instead of calling a modified
+ rounding function. Remove gridlines_per_pixel. Create a local
+ variable to store control value cutin. Simplify the conditional for
+ ignore_x_mode. Adjust rounding calls to pass only two values.
+
+2012-06-25 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix Savannah bug #36705.
+
+ Handle numbers like 2.001 correctly.
+
+ * src/cff/cffparse.c (cff_parse_real): Avoid negative values for
+ `shift'.
+
+2012-06-18 Infinality <infinality@infinality.net>
+
+ [truetype] Support subpixel hinting.
+
+ This is the large, famous `Infinality' patch to support ClearType
+ bytecode which has been available from
+ http://www.infinality.net/blog/ for some time, and which has been
+ refined over the last years. While still experimental, it is now
+ mature enough to be included directly into FreeType.
+
+ Most of the code is based on the ClearType whitepaper written by
+ Greg Hitchcock
+
+ http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
+
+ which gives a detailed overview of the necessary changes to the
+ Microsoft rasterizer so that older fonts are supported. However, a
+ lot of details are still missing, and this patches provides a
+ framework to easily handle rendering issues down to the glyph level
+ of certain fonts.
+
+ Note that ClearType support is not completely implemented! In
+ particular, full support for the options `compatible_widths',
+ `symmetrical_smoothing, and `bgr' (via the GETINFO bytecode
+ instruction) is missing.
+
+ * src/truetype/ttsubpix.c: New file, providing code to handle
+ `tweaks', this is, rules for certain glyphs in certain fonts
+ (including wildcards) which need a special treatment.
+
+ * src/truetype/ttsubpix.h: New file, holding the tweaking rules.
+
+ * include/freetype/config/ftoption.h, src/devel/ftoption.h
+ (TT_CONFIG_OPTION_SUBPIXEL_HINTING): New macro.
+
+ * include/freetype/internal/ftobjs.h (FT_PIX_FLOOR_GRID,
+ FT_PIX_ROUND_GRID, FT_PIX_CEIL_GRID): New macros.
+
+ * src/truetype/truetype.c [TT_USE_BYTECODE_INTERPRETER]: Include
+ `ttsubpix.c'.
+
+ * src/truetype/ttgload.c: Include `ttsubpix.h'.
+ [All changes below are guarded by TT_CONFIG_OPTION_SUBPIXEL_HINTING.]
+
+ (tt_get_metrics): Set tweak flags.
+ (TT_Hint_Glyph): Call `FT_Outline_EmboldenXY' if necessary.
+ (TT_Process_Simple_Glyph): Compensate emboldening if necessary.
+ (compute_glyph_metrics): Handle `compatible widths' option.
+ (tt_loader_init): Handle ClearType GETINFO information bits.
+
+ * src/truetype/rules.mk (TT_DRC_SRC): Updated.
+
+ * src/truetype/ttinterp.c: Include `ttsubpix.h'.
+ [Where necessary, changes below are guarded by
+ TT_CONFIG_OPTION_SUBPIXEL_HINTING.]
+
+ (Direct_Move, Direct_Move_X): Extended.
+ (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,
+ SetSuperRound): Add parameter to handle the number of grid lines per
+ pixel.
+ (SET_SuperRound, ROUND_None, CUR_Func_round): Updated.
+ (DO_SROUND, DOS45ROUND, DO_ODD, DO_EVEN): Updated.
+ (DO_ROUND, DO_NROUND): Updated.
+ (DO_RS): Take care of `Typeman' bytecode patterns.
+ (Ins_FDEF): Add some debugging code. Commented out.
+ (Ins_ENDF): Restore state.
+ (Ins_CALL, Ins_LOOPCALL): Handle inline delta functions.
+ (Ins_MD): Handle `Vacuform' rounds.
+ (Move_Zp2_Point, Ins_SHPIX, Ins_MSIRP, Ins_MDAP, Ins_MIAP,
+ Ins_MDRP, Ins_MIRP): Handle tweaks.
+ (Ins_ALIGNRP): Add tweak guard.
+ (Ins_IUP, Ins_DELTAP): Handle tweaks.
+ (Ins_GETINFO): Handle new ClearType bits.
+ (TT_RunIns): Handle tweaks.
+
+ * src/truetype/ttinterp.h: Updated.
+ (SPH_TweakRule, SPH_ScaleRule): New structures for tweaks.
+ (TT_ExecContextRec): Add members for subpixel hinting support.
+
+ * src/truetype/ttobjs.h (TT_DefRecord): Add `inline_delta' member.
+
+2012-06-15 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.10 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-10'.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.10.
+
+ * 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.9/2.4.10/, s/249/2410/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.
+
+ * builds/unix/configure.raw (version_info): Set to 15:0:9.
+
+2012-06-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Improve spacing.
+
+ * docs/CHANGES: Updated.
+
+2012-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/exports.mk: Add CCexe_CFLAGS and CCexe_LDFLAGS.
+
+ to pass special compiler/linker flags under cross development.
+ Suggested by Savannah bug #36367.
+
+ ChangeLog on 2010-07-15 saying as they were removed was wrong
+ for the official trunk of FreeType2. This commit is the first
+ introduction of them.
+
+2012-06-14 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2012-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [truetype] Add new versions of NEC FA family to tricky font list.
+
+ NEC FA family dated in 1996 have different checksum.
+ Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>; see
+
+ http://lists.gnu.org/archive/html/freetype-devel/2012-06/msg00023.html
+
+ * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): 4 sets
+ of fpgm & prep table checksums for FA-Gothic, FA-Minchou,
+ FA-RoundedGothicM, FA-RoundedGothicB are added. The family
+ names in sample PDF are truncated, thus the list of the
+ family names in tt_check_trickyness_family() is not updated yet.
+
+2012-06-06 Werner Lemberg <wl@gnu.org>
+
+ [ftraster] Fix rounding issue causing visual artifacts.
+
+ Problem reported by jola <hans-jochen.lau@lhsystems.com>; see
+
+ http://lists.gnu.org/archive/html/freetype-devel/2012-05/msg00036.html
+
+ * src/raster/ftraster.c (SMulDiv_No_Round): New macro.
+ (Line_Up): Use it.
+ * src/raster/ftmisc.h (FT_MulDiv_No_Round): Copied from `ftcalc.c'.
+
+2012-05-28 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Simplify.
+
+ We now use the cross product of the direction vectors to compute the
+ outline's orientation.
+
+2012-05-28 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2012-05-28 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ New function FT_Outline_EmboldenXY.
+
+ * include/freetype/ftoutln.h (FT_Outline_EmboldenXY): Define it.
+
+ * src/base/ftoutln.c (FT_Outline_EmboldenXY): Implement it, using a
+ simplified embolding algorithm.
+ (FT_Outline_Embolden): Make it a special case of
+ `FT_Outline_EmboldenXY'
+
+2012-05-07 Werner Lemberg <wl@gnu.org>
+
+ [type1] Fix Savannah bug #36386.
+
+ * src/type1/t1load.c (t1_load_keyword): Ignore keyword if context is
+ not valid.
+
+2012-04-07 Werner Lemberg <wl@gnu.org>
+
+ Remove compiler warning.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph)
+ [!TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Access `glyph->face' directly.
+
+2012-03-28 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Properly copy scaler flags to script metrics object.
+
+ Without this patch, only the dummy and cjk autohinter modules get
+ them (since they copy the whole scaler object).
+
+ * src/autofit/aflatin.c (af_latin_metrics_scale),
+ src/autofit/aflatin2.c (af_latin2_metrics_scale): Implement it.
+
+2012-03-22 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [bdflib] Remove redundant macro.
+
+ * src/bdf/bdflib.c (isdigok): Remove and replace with sbitset, which
+ is exactly the same.
+
+2012-03-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [configure] Fix Savannah bug #35644.
+
+ * builds/unix/configure.raw: Check `-ansi' flag works even if gcc
+ is used. Bionic libc headers for Android lose the consistency
+ when they are parsed with __STDC_VERSION__ older than 199901L or
+ __STRICT_ANSI__.
+
+2012-03-20 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Improvement to Savannah bug #35656.
+
+ * src/bdf/bdflib.c (isdigok): Add cast, as suggested in report.
+
+2012-03-17 Chris Liddell <chris.liddell@artifex.com>
+
+ [type1] Fix Savannah bug #35847.
+
+ * src/type1/t1load.c (parse_subrs): Fix the loop exit condition;
+ we want to exit when we have run out of data.
+
+2012-03-16 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Really fix Savannah bug #35658.
+
+ * src/bdf/bdflib.c (_bdf_list_split): Add one more `field' initializer.
+
+2012-03-14 Yann Droneaud <yann@droneaud.fr>
+
+ [sfnt] Make arrays static like all others.
+
+ * src/sfnt/ttload.c (tt_face_load_maxp, tt_face_load_os2),
+ src/sfnt/ttmtx.c (tt_face_load_hhea): Add `static' keyword to frame
+ fields.
+
+2012-03-14 Huw Davies <huw@codeweavers.com>
+
+ [sfnt] A refinement of the previous commit.
+
+ * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
+ tt_name_entry_ascii_from_other): Stop at null byte.
+
+2012-03-14 Huw Davies <huw@codeweavers.com>
+
+ [sfnt] Add `name' table compatibility to MS Windows.
+
+ * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
+ tt_name_entry_ascii_from_other): Don't replace `\0' with question
+ marks when converting strings.
+
+2012-03-14 Werner Lemberg <wl@gnu.org>
+
+ [type1] Fix Savannah bug #35833.
+
+ Based on the patch given in the bug report.
+
+ * src/type1/t1load.c (IS_INCREMENTAL): New macro.
+ (read_binary_data): Add parameter `incremental'.
+ Update all callers using `IS_INCREMENTAL'.
+
+2012-03-11 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Return correct linear advance width values.
+
+ This was quite a subtle bug which accidentally showed up with glyph
+ `afii10023' of arial.ttf (version 2.76). This glyph is a composite;
+ the first component, `E', has an advance width of 1366 font units,
+ while the advance width of the composite itself (which looks like
+ uppercase `E' with dieresis) is 1367 font units. I think this is
+ actually a bug in the font itself, because there is no reason that
+ this glyph has not the same width as uppercase `E' without the
+ dieresis. Anyway, it helped identify this problem.
+
+ Using the TrueType hinter, the correct value (1367) of `afii10023'
+ was returned, but the autohinter mysteriously returned 1366.
+
+ Digging in the code showed that the autohinter recursively calls
+ FT_Load_Glyph to load the glyph, adding the FT_LOAD_NO_SCALE load
+ flag. However, the `linearHoriAdvance' field is still returned as a
+ scaled value. To avoid scaling twice, the old code in autofit reset
+ `linearHoriAdvance', using the `horiAdvance' field. This seemed to
+ work since FT_LOAD_NO_SCALE was in use, but it failed actually,
+ because `horiAdvance' is defined as the distance of the first
+ subglyph's phantom points, which in turn are initialized using the
+ advance width of the first subglyph. And as the given example
+ shows, these widths can differ.
+
+ * src/autofit/afloader.c (af_loader_load_g): Temporarily set
+ FT_LOAD_LINEAR_DESIGN while calling FT_Load_Glyph to get unscaled
+ values for the linear advance widths.
+
+2012-03-10 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix SSW instruction.
+
+ * src/truetype/ttinterp.c (DO_SSW): SSW *does* use font units. For
+ verification, it took some time to find a font which actually uses
+ this instruction.
+
+2012-03-09 Vinnie Falco <vinnie.falco@gmail.com>
+
+ Prepare source code for amalgamation.
+
+ * include/freetype/freetype.h: Swap order of preprocessor blocks.
+
+2012-03-08 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.9 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-9'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.9.
+
+ * 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.8/2.4.9/, s/248/249/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 9.
+
+ * builds/unix/configure.raw (version_info): Set to 14:1:8.
+
+2012-03-08 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Add missing overflow check.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <BITMAP>: Add threshold for
+ `glyph->bpr'.
+
+2012-03-07 Vinnie Falco <vinnie.falco@gmail.com>
+
+ Prepare source code for amalgamation.
+
+ * src/autofit/aferrors.h, src/bdf/bdferror.h, src/bzip2/ftbzip2.c,
+ src/cache/ftcerror.h, src/cff/cfferrs.h, src/cid/ciderrs.h,
+ src/gxvalid/gxverror.h, src/gzip/ftgzip.c, src/lzw/ftlzw.c,
+ src/otvalid/otverror.h, src/pcf/pcferror.h, src/pfr/pfrerror.h,
+ src/psaux/psauxerr.h, src/pshinter/pshnterr.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/type42/t42error.h, src/winfonts/fnterrs.h:
+ Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX.
+
+2012-03-03 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #35660.
+
+ For some divisions, we use casts to 32bit entities. Always guard
+ against division by zero with these casts also.
+
+ * src/base/ftcalc.c (ft_div64by32): Remove redundant cast.
+ (FT_MulDiv, FT_MulDiv_No_Round): Add 32bit cast.
+ (FT_DivFix): Add 32bit cast (this omission triggered the bug).
+
+2012-03-03 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Fix handling of track kerning.
+
+ * src/psaux/afmparse.c (afm_parse_track_kern): Don't inverse sign
+ for `min_kern'. It is indeed quite common that track kerning
+ *increases* spacing for very small sizes.
+
+2012-03-02 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix Savannah bug #35689.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check first outline
+ point.
+
+2012-03-01 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #35656.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <_BDF_BITMAP>: Check validity
+ of nibble characters instead of accessing `a2i' array.
+
+2012-03-01 Werner Lemberg <wl@gnu.org>
+
+ [winfonts] Fix Savannah bug #35659.
+
+ * src/winfonts/winfnt.c (FNT_Face_Init): Check number of glyphs.
+
+2012-03-01 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #35658.
+
+ * src/bdf/bdflib.c (_bdf_list_split): Initialize `field' elements
+ properly.
+
+2012-03-01 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Fix Savannah bug #35657.
+
+ If in function `skip_spaces' the routine `skip_comment' comes to the
+ end of buffer, `cur' is still increased by one, so we need to check
+ for `p >= limit' and not `p == limit'.
+
+ * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed,
+ PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Fix boundary checking.
+
+2012-03-01 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix Savannah bug #35646.
+
+ * src/truetype/ttinterp.c (Ins_MIRP): Typo, present since ages. The
+ code is now in sync with the other operators (e.g. MSIRP) which
+ modify twilight points.
+
+2012-03-01 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #35643.
+
+ * src/bdf/bdflib.c (_bdf_list_ensure): Bring code in sync with
+ comment before `_bdf_list_split', this is, really allocate at least
+ five `field' elements.
+
+2012-03-01 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #35641.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <DWIDTH, BBX>: Abort if
+ _BDF_ENCODING isn't set. We need this because access to the `glyph'
+ variable might be undefined otherwise.
+
+2012-03-01 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix Savannah bug #35640.
+
+ * src/truetype/ttinterp.c (SkipCode, TT_RunIns): Fix boundary check
+ for NPUSHB and NPUSHW instructions.
+
+2012-02-29 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix Savannah bug #35601.
+
+ * src/truetype/ttinterp.c (Ins_SHZ): Use number of points instead of
+ last point for loop.
+ Also remove redundant boundary check.
+
+2012-02-29 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Remove redundant check.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant
+ second check for ordered contour start points.
+
+2012-02-29 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Make SHC instruction behave similar to MS rasterizer.
+
+ * src/truetype/ttinterp.c (Ins_SHC): Handle virtual contour in
+ twilight zone.
+
+2012-02-29 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Avoid modulo operators against a power-of-two denominator.
+
+ * src/afcjk.c (af_hint_normal_stem), src/base/ftoutln.c
+ (ft_contour_has), src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_vvcurveto, cff_op_hhcurveto, cff_op_hvcurveto>,
+ src/gxvalid/gxvcommn.c (GXV_32BIT_ALIGNMENT_VALIDATE),
+ src/gxvalid/gxvfeat.c (gxv_feat_setting_validate): Replace `%' with
+ `&' operator.
+
+2012-02-29 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Don't synchronize digit widths for light rendering mode.
+
+ We don't hint horizontally in this mode.
+
+ * src/autofit/afloader.c (af_loader_load_g) <Hint_Metrics>:
+ Implement it.
+
+2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [type42] Minor code optimization (again).
+
+ * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change.
+
+2012-02-26 Mateusz Jurczyk <mjurczyk@google.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [smooth] Fix Savannah bug #35604.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `FT_Pos'
+ instead of `FT_UInt' for some variables and update comparisons
+ accordingly. A detailed analysis can be found in the bug report.
+
+2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [type42] Minor code optimization.
+
+ * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of
+ modulo operator.
+
+2012-02-26 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2012-02-26 Werner Lemberg <wl@gnu.org>
+
+ [type1] Fix Savannah bug #35608.
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Reject too short
+ dictionaries.
+
+2012-02-26 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Support `ENCODING -1 <n>' format.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Implement it.
+
+2012-02-26 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #35607.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
+ negative encoding values.
+
+2012-02-26 Werner Lemberg <wl@gnu.org>
+
+ [type1] Fix Savannah bug #35606.
+
+ * src/type1/t1load.c (parse_subrs): Add proper guards for `strncmp'.
+
+ * src/psaux/psobjs.c (ps_parser_skip_PS_token): Emit error message
+ only if cur < limit.
+
+2012-02-25 Werner Lemberg <wl@gnu.org>
+
+ [pcf] Fix Savannah bug #35603.
+
+ * src/pcf/pcfread.c (pcf_get_properties): Assure final zero byte in
+ `strings' array.
+
+2012-02-25 Werner Lemberg <wl@gnu.org>
+
+ [type42] Fix Savannah bug #35602.
+
+ * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size' more
+ thoroughly.
+
+2012-02-25 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bugs #35599 and #35600.
+
+ * src/bdf/bdflib.c (ACMSG16): New warning message.
+ (_bdf_parse_glyphs) <_BDF_BITMAP>: Check line length.
+
+2012-02-24 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bugs #35597 and #35598.
+
+ * src/bdf/bdflib.c (_bdf_is_atom): Fix handling of property value.
+
+2012-02-24  Vinnie Falco <vinnie.falco@gmail.com>
+
+ Prepare source code for amalgamation (6/6).
+
+ * src/cff/cffdrivr.c: s/Load_Glyph/cff_glyph_load/.
+
+ * src/cid/cidload.c: s/parse_font_matrix/cid_parse_font_matrix/.
+ s/t1_init_loader/cid_init_loader/.
+ s/t1_done_loader/cid_done_loader/.
+
+ * src/pxaux/t1cmap.c: s/t1_get_glyph_name/psaux_get_glyph_name/.
+
+ * src/truetype/ttdriver.c: s/Load_Glyph/tt_glyph_load/.
+
+ * src/type1/t1load.c: s/parse_font_matrix/t1_parse_font_matrix/.
+
+2012-02-24  Vinnie Falco <vinnie.falco@gmail.com>
+
+ Prepare source code for amalgamation (5/6).
+
+ * include/freetype/fterrors.h: Undefine FT_KEEP_ERR_PREFIX after
+ using it.
+
+2012-02-22  Vinnie Falco <vinnie.falco@gmail.com>
+
+ Prepare source code for amalgamation (4/6).
+
+ * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG,
+ RAS_ARGS, RAS_VAR, and RAS_VARS before defining it.
+
+ * src/smooth/ftgrays.c: s/TRaster/black_TRaster/,
+ s/PRaster/black_PRaster/.
+ * src/raster/ftraster.c: s/TRaster/gray_TRaster/,
+ s/PRaster/gray_PRaster/.
+
+2012-02-20  Vinnie Falco <vinnie.falco@gmail.com>
+
+ Prepare source code for amalgamation (3/6).
+
+ * src/smooth/ftgrays.c: s/TWorker/black_TWorker/,
+ s/PWorker/black_PWorker/.
+ * src/raster/ftraster.c: s/TWorker/gray_TWorker/,
+ s/PWorker/gray_PWorker/.
+
+2012-02-20  Vinnie Falco <vinnie.falco@gmail.com>
+
+ Prepare source code for amalgamation (2/6).
+
+ * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine FLOOR,
+ CEILING, TRUNC, and SCALED before defining it.
+
+2012-02-20  Vinnie Falco <vinnie.falco@gmail.com>
+
+ Prepare source code for amalgamation (1/6).
+
+ See discussion starting at
+
+ http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html
+
+ * src/smooth/ftgrays.c: s/TBand/gray_TBand/.
+ * src/raster/ftraster.c: s/TBand/black_TBand/.
+
+2012-02-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [autofit] Fix outline flags.
+
+ * src/autofit/afloader.c (af_loader_load_g): Don't reassign
+ `outline.flags' so that this information is preserved. See
+ discussion starting at
+
+ http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
+
+2012-02-11 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix Savannah bug #35466.
+
+ Jump instructions are now bound to the current function. The MS
+ Windows rasterizer behaves the same, as confirmed by Greg Hitchcock.
+
+ * src/truetype/ttinterp.h (TT_CallRec): Add `Cur_End' element.
+ * src/truetype/ttobjs.h (TT_DefRecord): Add `end' element.
+
+ * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Check upper
+ bound of jump address.
+ (Ins_FDEF, Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns): Updated.
+
+2012-02-11 Werner Lemberg <wl@gnu.org>
+
+ We don't use `extensions'.
+
+ * include/freetype/internal/ftobjs.h (FT_DriverRec): Remove
+ `extensions' field.
+
+2012-02-11 Werner Lemberg <wl@gnu.org>
+
+ Clean up `generic' fields.
+
+ * include/freetype/internal/ftobjs.h (FT_ModuleRec, FT_LibraryRec):
+ Remove `generic' field since users can't access it.
+
+ * src/base/ftobjs.c (FT_Done_GlyphSlot): Call `generic.finalizer' as
+ advertised in the documentation of FT_Generic.
+ (Destroy_Module, FT_Done_Library): Updated to changes in `ftobjs.h'.
+
+2012-02-07 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Harmonize function arguments.
+
+ * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for
+ `load_flags'.
+
+2012-02-07 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Remove unnecessary casts.
+
+2012-01-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [gxvalid] Fix Savannah bug #35286.
+
+ Patch submitted by anonymous reporter.
+
+ * src/gxvalid/gxvcommn.c (gxv_XStateTable_subtable_setup):
+ gxv_set_length_by_ulong_offset() must be called with 3, not 4,
+ the number of the subtables in the state tables; classTable,
+ stateArray, entryTable.
+
+2012-01-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [raccess] Modify for PIC build.
+
+ Based on the patch provided by Erik Dahlstrom <ed@opera.com>,
+ http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html
+
+ Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()'
+ are renamed with `ft_' suffixes.
+
+ * src/base/ftbase.h: `raccess_rule_by_darwin_vfs()' is renamed
+ to `ft_raccess_rule_by_darwin_vfs()'.
+ * src/base/ftobjs.c: Ditto.
+
+ * src/base/ftrfork.c: Declarations of FT_RFork_Rule,
+ raccess_guess_rec, are moved to...
+ * include/freetype/internal/ftrfork.h: Here.
+
+ * include/freetype/internal/ftrfork.h:
+ FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END} macros are defined
+ to replace raccess_guess_table[] in both of PIC and non-PIC
+ modes.
+ * src/base/ftrfork.c: raccess_guess_table[] array is rewritten
+ by FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END}.
+
+ * src/base/basepic.h (BasePIC): Add `ft_raccess_guess_table'
+ storage. (FT_RACCESS_GUESS_TABLE_GET): New macro to retrieve
+ the function pointer from `ft_raccess_guess_table' storage in
+ `BasePIC' structure.
+ * src/base/ftrfork.c (FT_Raccess_Guess): Rewritten with
+ FT_RACCESS_GUESS_TABLE_GET.
+ (raccess_get_rule_type_from_rule_index): Add `library' as the
+ first argument to the function, to retrieve the storage of
+ `ft_raccess_guess_table' from it. Also `raccess_guess_table'
+ is replaced by FT_RACCESS_GUESS_TABLE_GET.
+ (ft_raccess_rule_by_darwin_vfs): Ditto.
+
+2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Remove trailing spaces.
+
+2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Formatting PIC related sources.
+
+ * src/autofit/afpic.c: Harmonize to FT2 coding conventions.
+ * src/base/basepic.c: Ditto.
+ * src/base/ftpic.c: Ditto.
+ * src/cff/cffpic.c: Ditto.
+ * src/pshinter/pshpic.c: Ditto.
+ * src/psnames/pspic.c: Ditto.
+ * src/raster/rastpic.c: Ditto.
+ * src/sfnt/sfntpic.c: Ditto.
+ * src/smooth/ftspic.c: Ditto.
+ * src/truetype/ttpic.c: Ditto.
+
+2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [autofit] Fix the inclusion of `aflatin2.h' in PIC file.
+
+ * src/autofit/afpic.c: Include `aflatin2.h' when
+ FT_OPTION_AUTOFIT2 is defined, as afglobal.c does so.
+ Unconditionally inclusion causes declared but unimplemented
+ warning by GCC 4.6.
+
+2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cff] Remove redundant declarations of cff_cmap_XXX_class_rec.
+
+ * src/cff/cffpic.c: The declarations of
+ FT_Init_Class_cff_cmap_encoding_class_rec() and
+ FT_Init_Class_cff_cmap_unicode_class_rec() are removed.
+ They can be obtained by the inclusion of cffcmap.h.
+ cffcmap.h invokes FT_DECLARE_CMAP_CLASS() and it declares
+ FT_Init_Class_cff_cmap_encoding_class_rec() etc in PIC mode.
+
+2012-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix redundant declaration warning in PIC mode.
+
+ Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were
+ designed to declare xxx_pic_{free,init} by themselves.
+ Because these macros are used at the end of the module
+ interface (e.g. ttdriver.c) and the wrapper source to build
+ a module as a single object (e.g. truetype.c) includes
+ the PIC file (e.g. ttpic.c) before the module interface,
+ these macros are expanded AFTER xxx_pic_{free,init} body
+ when the modules are built as single object.
+ The declaration after the implementation causes the redundant
+ declaration warnings, so the declarations are moved to module
+ PIC headers (e.g. ttpic.h). Separating to other header files
+ are needed for multi build.
+
+ * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER):
+ Remove class_##_pic_free and class_##_pic_init declarations.
+ * include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
+ FT_DEFINE_MODULE): Ditto.
+
+ * src/base/basepic.h: Insert a comment and fix coding style.
+ * src/autofit/afpic.h: Declare autofit_module_class_pic_{free,
+ init}.
+ * src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}.
+ * src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free,
+ init}.
+ * src/psnames/pspic.h: Declare psnames_module_class_pic_{free,
+ init}.
+ * src/raster/rastpic.h: Declare
+ ft_raster{1,5}_renderer_class_pic_{free,init}
+ * src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}.
+ * src/smooth/ftspic.h: Declare
+ ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}.
+ * src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
+
+2012-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Make pspic.c to include module error header to fix multi build.
+
+ * src/psnames/pspic.c: Include `psnamerr.h'.
+
+2012-01-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [base] Fix a dereference of uninitialized variable in PIC mode.
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): `glyph' must be
+ set before derefering to obtain `library'. The initialization
+ of `clazz', `glyph', `library' and NULL pointer check are
+ reordered to minimize PIC conditonals.
+
+2012-01-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [base] Insert explicit cast for GCC 4.6 in PIC mode.
+
+ * src/base/ftinit.c (FT_Add_Default_Modules): Under PIC
+ configuration, FT_DEFAULT_MODULES_GET returns
+ FT_Module_Class** pointer, GCC 4.6 warns that
+ const FT_Module_Class* const* variable is warned as
+ inappropriate to store it. To calm it, explicit cast is
+ inserted. Also `library' is checked to prevent the NULL
+ pointer dereference in FT_DEFAULT_MODULES_GET.
+
+2012-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix PIC build broken by d9145241fe378104ba4c12a42534549faacc92e6.
+
+ Under PIC configuration, FT_{CFF,PSCMAPS,SFNT,TT}_SERVICES_GET
+ take no arguments but derefer the variable named `library'
+ internally.
+
+ * src/cff/cffdrivr.c (cff_get_interface): Declare `library' and
+ set it if non-NULL driver is passed.
+ * src/truetype/ttdriver.c (tt_get_interface): Ditto.
+
+ * src/sfnt/sfdriver.c (sfnt_get_interface): Declare `library'
+ under PIC configuration, and set it if non-NULL module is given.
+ * src/psnames/psmodule.c (psnames_get_interface): Ditto.
+
+2012-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Make PIC files include module error headers, to use the error codes
+ with per-module prefix.
+
+ * src/autofit/afpic.c: Include `aferrors.h'.
+ * src/cff/cffpic.c: Include `cfferrs.h'.
+ * src/pshinter/pshpic.c: Include `pshnterr.h'.
+ * src/raster/rastpic.c: Include `rasterrs.h'.
+ * src/sfnt/sfntpic.c: Include `sferrors.h'.
+ * src/smooth/ftspic.c: Include `ftsmerrs.h'.
+ * src/truetype/ttpic.c: Include `tterrors.h'.
+
+2012-01-04 Tobias Ringström <tobias@ringis.se>
+
+ [truetype] Fix IP instruction if x_ppem != y_ppem.
+
+ * src/truetype/ttinterp.c (Ins_IP): Scale `orus' coordinates
+ properly.
+
+2012-01-02 Werner Lemberg <wl@gnu.org>
+
+ Fix tracing message for `loca' table.
+
+ * src/truetype/ttpload.c (tt_face_get_location): Don't emit a
+ warning message if the last `loca' entry references an empty glyph.
+
+2011-12-10 Werner Lemberg <wl@gnu.org>
+
+ Add some variable initializations.
+ Reported by Richard COOK <rscook@unicode.org>.
+
+ * src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'.
+ * src/smooth/ftgrays.c (gray_render_conic): Initialize `levels'
+ earlier.
+
+2011-12-08 Werner Lemberg <wl@gnu.org>
+
+ Fix serious scaling bug in `FT_Get_Advances'.
+
+ * src/base/ftadvanc.c (FT_Get_Advances): Advance values returned by
+ `FT_Load_Glyph' must be simply multiplied by 1024.
+
+2011-12-08 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing.
+
+2011-12-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH.
+
+ Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON
+ was a configurable macro to disable Carbon-dependent code. Because
+ now configure script sets DARWIN_NO_CARBON by default and disables
+ Darwin & Carbon-dependent codes, these macros can be unified.
+ FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON
+ (defined by default) is removed, because DARWIN_NO_CARBON violates
+ FT_XXX naming convention of public macros, and a macro configured by
+ default is not portable for the building without configure (e.g.
+ make devel).
+
+ * builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based
+ old Mac font support is requested and Carbon is available.
+ * builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support
+ for Mac OS X without Carbon (e.g. Mac OS X 10.4 for ppc64) is
+ requested.
+ * include/freetype/config/ftconfig.in: Ditto.
+ * builds/vms/ftconfig.h: Ditto.
+
+ * src/base/ftbase.h: Remove DARWIN_NO_CARBON.
+ * src/base/ftbase.c: Ditto.
+ * src/base/ftobjs.c: Ditto.
+ * src/base/ftrfork.c: Ditto.
+
+ * src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined
+ (same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c).
+ * builds/mac/ftmac.c: Ditto.
+
+ * builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH.
+ * builds/mac/FreeType.m68k_far.make.txt: Ditto.
+ * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
+ * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
+
+2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix Savannah bug #34728 (`make devel' on Mac OS X).
+
+ * builds/toplevel.mk: Check `/dev/null' to identify the Unix-
+ like systems without `init' nor `hurd' (e.g. Mac OS X >= 10.4).
+ * builds/unix/detect.mk: Ditto.
+
+2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [apinames] Fix the overflow of signed integer hash.
+
+ * src/tools/apinames.c (names_add): Change the type of `h' from
+ int to unsigned int, to prevent undefined behaviour in the
+ overflow of signed integers (overflow of unsigned int is defined
+ to be wrap around). Found by clang test suggested by Sean
+ McBride.
+
+2011-11-30 Werner Lemberg <wl@gnu.org>
+
+ [winfonts] Remove casts.
+
+ * src/winfonts/winfnt.c (winfnt_driver_class): Remove all casts and
+ update affected functions.
+ (FNT_Size_Select): Fix number of arguments.
+
+2011-11-30 Werner Lemberg <wl@gnu.org>
+
+ [type42] Remove casts.
+
+ * src/type42/t42driver.c (t42_driver_class): Remove all casts and
+ update affected functions.
+
+ * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver
+ changes.
+
+2011-11-30 Werner Lemberg <wl@gnu.org>
+
+ [type1] Remove casts.
+
+ * src/type1/t1driver.c (t1_driver_class): Remove all casts and
+ update affected functions.
+
+ * src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1objs.c:
+ Updated for t1driver changes.
+ src/type1/t1objs.h (T1_Driver): Remove unused typedef.
+ Updated for t1driver changes.
+
+2011-11-27 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #34896.
+
+ ENCODING now covers the whole Unicode range.
+
+ Note, however, that this change is quite expensive since it
+ increases the size of three arrays by almost 400kByte in total. The
+ right fix is to replace the logic with something smarter.
+ Additionally, there exist very old BDFs for three-byte CCCII
+ encoding which exceeds the range of Unicode (another reason to have
+ a smarter logic).
+
+ * src/bdf/bdf.h (bdf_font_t): Increase size of `nmod' and `umod'
+ arrays.
+ * src/bdf/bdflib.c (bdf_parse_t): Increase size of `have' array.
+
+2011-11-27 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Improve tracing.
+
+ * src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros.
+ (_bdf_parse_glyphs): Use them.
+
+2011-11-26 Werner Lemberg <wl@gnu.org>
+
+ Improve tracing.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Done), src/pcf/pcfdrivr.c
+ (PCF_Face_Done): Remove tracing message.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init), src/cff/cffobjs.c
+ (cff_face_init), src/cid/cidobjs.c (cid_face_init),
+ src/pfr/pfrobjs.c (pfr_face_init), src/sfnt/sfobjs.c
+ (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init),
+ src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c
+ (T42_Face_Init), src/winfonts/winfnt.c (FNT_Face_Init): Add
+ `greeting' message.
+
+ * src/sfnt/sfobjs.c (sfnt_open_font), src/type42/t42objs.c
+ (T42_Open_Face): Improve tracing.
+
+2011-11-26 Werner Lemberg <wl@gnu.org>
+
+ [cid] Fix error code.
+
+ * src/cid/cidparse.c (cid_parser_new): Do it.
+
+2011-11-26 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix error code.
+
+ * src/cff/cffload.c (cff_font_load): Do it.
+
+2011-11-26 Werner Lemberg <wl@gnu.org>
+
+ Add new error code FT_Err_Missing_Module.
+
+ Previously, FreeType misleadingly returned
+ FT_Err_Unknown_File_Format if a module was missing (or a test was
+ missing completely).
+
+ * include/freetype/fterrdef.h (FT_Err_Missing_Module): Define.
+
+ * src/cff/cffobjs.c (cff_face_init), src/cff/cffdrivr.c
+ (cff_get_glyph_name), src/cid/cidobjs.c (cid_face_init),
+ src/sfnt/sfobjs.c (sfnt_init_face), src/truetype/ttobjs.c
+ (tt_face_init), src/type1/t1objs.c (T1_Face_Init),
+ src/type42/t42objs.c (T42_Face_Init, T42_Driver_Init): Updated.
+
+ * src/type1/t1afm.c (T1_Read_Metrics), src/type/t1objs.c
+ (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Remove now
+ redundant test for `psaux'.
+
+2011-11-25 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Add more error messages.
+
+ * src/bdf/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
+ Add line number argument.
+ Update all callers.
+ (ERRMSG5, ERRMSG6, ERRMSG7, ERRMSG8, ERRMSG9): New macros.
+ (_bdf_readstream, _bdf_set_default_spacing, _bdf_add_property,
+ _bdf_parse_glyphs, _bdf_parse_start): Add error messages.
+
+2011-11-24 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/fterrors.h: Remove dead code.
+
+2011-11-15 Werner Lemberg <wl@gnu.org>
+
+ * docs/releases: Updated.
+
+2011-11-15 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.8 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-8'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.8.
+
+ * 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.7/2.4.8/, s/247/248/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
+
+ * builds/unix/configure.raw (version_info): Set to 14:0:8.
+
+2011-11-13 Chris Liddell <chris.liddell@artifex.com>
+
+ Add FT_Get_PS_Font_Value() API.
+
+ This allows a Type 1 font face to be interrogated to retrieve most
+ of the dictionary keys (keys not relevant to FreeType's Type 1
+ interpreter are not available).
+
+ * include/freetype/internal/services/svpsinfo.h
+ (PS_GetFontValueFunc): New typedef.
+ (PSInfo): Add `ps_get_font_value'.
+ (FT_DEFINE_SERVICE_PSINFOREC): Updated.
+
+ * include/freetype/internal/t1types.h (T1_EncodingType): Moved to...
+ * include/freetype/t1tables.h: Here.
+ (PS_Dict_Keys): New enumeration.
+ (FT_Get_PS_Font_Value): New declaration.
+
+ * src/base/fttype1.c (FT_Get_PS_Font_Value): New function.
+
+ * src/type1/t1driver.c (t1_ps_get_font_value): This new function
+ does the real job.
+ (t1_service_ps_info): Add it.
+
+ * src/cff/cffdrivr.c (cff_service_ps_info), src/cid/cidriver.c
+ (cid_service_ps_info), src/type42/t42drivr.c (t42_service_ps_info):
+ Updated.
+
+2011-11-08 Braden Thomas <bthomas@apple.com>
+
+ [cid] Various loading fixes.
+
+ * src/cid/cidload.c (cid_load_keyword) <default>,
+ (parse_font_matrix, parse_expansion_factor): Correctly check number
+ of dictionaries.
+ (cid_read_subrs): Protect against invalid values of `num_subrs'.
+ Assure that the elements of the `offsets' array are ascending.
+
+2011-11-05 Werner Lemberg <wl@gnu.org>
+
+ * README: We use copyright ranges also.
+
+ According to
+
+ http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
+
+ this should be mentioned explicitly.
+
+2011-10-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [raccess] Supplement for previous fix.
+
+ * src/base/ftbase.h (raccess_rule_by_darwin_vfs): Do not declare
+ it on native Mac OS X.
+ * src/base/ftrfork.c (raccess_get_rule_type_from_rule_index):
+ Hide raccess_get_rule_type_from_rule_index() on native Mac OS X
+ too.
+
+2011-10-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [raccess] Hide raccess_rule_by_darwin_vfs() on native Mac OS X.
+
+ * src/base/ftrfork.c (raccess_rule_by_darwin_vfs): Do not
+ compile on native Mac OS X because it is not used.
+
+2011-10-25 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix MD instruction for twilight zone.
+
+ * src/truetype/ttinterp.c (Ins_MD): Without this fix, the MD
+ instruction applied to original coordinates of twilight points
+ always returns zero.
+
+2011-10-18 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.7 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-7'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.7.
+
+ * 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.6/2.4.7/, s/246/247/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
+
+ * builds/unix/configure.raw (version_info): Set to 13:2:7.
+
+2011-10-15 Kal Conley <kcconley@gmail.com>
+
+ Fix handling of transformations if no renderer is present.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Thinko.
+
+2011-10-15 Kal Conley <kcconley@gmail.com>
+
+ Fix conditions for autohinting.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Handle
+ FT_LOAD_IGNORE_TRANSFORM.
+
+2011-10-07 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [gxvalid] Fix a bug to detect too large offset in morx table.
+
+ * src/gxvalid/gxvmorx2.c
+ (gxv_morx_subtable_type2_ligActionIndex_validate): Fix a bug
+ that too large positive offset cannot be detected.
+
+2011-10-01 Braden Thomas <bthomas@apple.com>
+
+ Handle some border cases.
+
+ * include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro.
+
+ * src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid
+ value of `target->rows'.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for
+ flex start.
+
+ * src/raster/ftrend1.c (ft_raster1_render): Check `width' and
+ `height'.
+
+ * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against
+ invalid values in `localpoints' array.
+
+2011-10-01 Werner Lemberg <wl@gnu.org>
+
+ [psnames] Handle zapfdingbats.
+ Problem reported by Nicolas Rougier <Nicolas.Rougier@inria.fr>.
+
+ * src/tools/glnames.py (adobe_glyph_list): Add data from AGL's
+ `zapfdingbats.txt' file.
+
+ * src/psnames/pstables.h: Regenerated.
+
+2011-09-27 Simon Bünzli <zeniko@gmail.com>
+
+ [type1] Fix Savannah bug #34189.
+
+ * src/type1/t1load.c (T1_Open_Face): Initialize
+ `face->len_buildchar'.
+
+2011-09-26 Werner Lemberg <wl@gnu.org>
+
+ [cff] Dump SIDs while tracing.
+
+ * src/cff/cffobjs.c (cff_face_init): Do it.
+
+ * src/cff/cffparse.c (cff_parser_run) [FT_DEBUG_LEVEL_TRACE]
+ <cff_kind_string>: Identify as SID.
+
+2011-09-17 Werner Lemberg <wl@gnu.org>
+
+ Remove unused FT_ALIGNMENT macro.
+
+ * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+ include/freetype/config/ftconfig.h: Do it.
+
+2011-09-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [smooth] Slightly optimize conic and cubic flatterners.
+
+ * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
+ out some code from the main loop to speed it up.
+
+2011-09-11 Tomas Hoger <thoger@redhat.com>
+
+ Slightly improve LZW_CLEAR handling.
+
+ * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_CODE>:
+ Ensure that subsequent (modulo garbage byte(s)) LZW_CLEAR codes are
+ handled as clear codes. This also re-sets old_code and old_char to
+ predictable values, which is a little better than using `random'
+ ones if the code following LZW_CLEAR is invalid.
+
+2011-09-11 Tomas Hoger <thoger@redhat.com>
+
+ Add explicit LZW decompression stack size limit.
+
+ Stack larger than 1<<LZW_MAX_BITS is never needed if prefix table is
+ constructed correctly. It's even less than that, see e.g.
+ libarchive code comment for a better size upper bound:
+
+ http://code.google.com/p/libarchive/source/browse/trunk/libarchive/archive_read_support_filter_compress.c?r=3635#121
+
+ This patch adds explicit stack size limit, enforced when stack is
+ realloced.
+
+ An alternative is to ensure that code < state->prefix[code - 256]
+ when traversing prefix table. Such check is less efficient and
+ should not be required if prefix table is constructed correctly in
+ the first place.
+
+ * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Implement it.
+
+2011-09-11 Tomas Hoger <thoger@redhat.com>
+
+ Protect against loops in the prefix table.
+
+ LZW decompressor did not sufficiently check codes read from the
+ input LZW stream. A specially-crafted or corrupted input could
+ create a loop in the prefix table, which leads to memory usage
+ spikes, as there's no decompression stack size limit.
+
+ * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_START>: First
+ code in valid LZW stream must be 0..255.
+ <FT_LZW_PHASE_CODE>: In the special KwKwK case, code == free_ent,
+ code > free_ent is invalid.
+
+2011-09-09 Werner Lemberg <wl@gnu.org>
+
+ Better tracing of metrics.
+
+ * src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with
+ FT_TRACE.
+
+2011-09-07 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix Savannah bug #33816.
+
+ * src/cff/cfftypes.h (CFF_FontRecDictRec): New member
+ `has_font_matrix'.
+ * src/cff/cffparse.c (cff_parse_font_matrix): Set it.
+ Update tracing output.
+ * src/cff/cffobjs.c (cff_face_init): Use it so that the heuristics
+ can be removed.
+
+2011-08-30 Werner Lemberg <wl@gnu.org>
+
+ Better tracing of metrics.
+
+ * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics):
+ Decorate with FT_TRACE.
+
+2011-08-25 Werner Lemberg <wl@gnu.org>
+
+ [cff] Better tracing of the parsing process.
+
+ * src/cff/cffload.c (cff_subfont_load, cff_font_load): Decorate with
+ FT_TRACE.
+
+ * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
+ cff_parse_private_dict, cff_parse_cid_ros): Updated.
+ (CFF_FIELD_NUM, CFF_FIELD_FIXED, CFF_FIELD_FIXED_1000,
+ CFF_FIELD_STRING, CFF_FIELD_BOOL, CFF_FIELD_CALLBACK, CFF_FIELD,
+ CFF_FIELD_DELTA): Add argument for ID.
+ (cff_parser_run): Decorate with FT_TRACE.
+
+ * src/cff/cffparse.h (CFF_Field_Handler) [FT_DEBUG_LEVEL_TRACE]: Add
+ `id' member.
+
+ * src/cff/cfftoken.h: Add IDs to all fields.
+
+2011-08-16 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #34022.
+
+ * README, docs/INSTALL: Remove references to UPGRADE.UNIX.
+
+2011-08-15 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #34018.
+
+ * docs/UPGRADE.UNIX: Removed. Obsolete.
+
+2011-08-15 David Bevan <david.bevan@pb.com>
+
+ Fix Savannah bug #33992.
+
+ * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix border case.
+
+2011-08-12 Werner Lemberg <wl@gnu.org
+
+ [truetype] Fix degenerate case in S{P,F,DP}VTL opcodes.
+
+ * src/truetype/ttinterp.c (Ins_SxVTL): Handle p1 == p2 specially.
+ (Ins_SDPVTL): Handle v1 == v2 specially.
+
+2011-08-09 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix Savannah bug #33975.
+
+ * src/cff/cffparse.c (cff_parse_font_matrix): Fix typo.
+
+2011-07-29 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.6 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-6'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.6.
+
+ * 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.5/2.4.6/, s/245/246/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
+
+ * builds/unix/configure.raw (version_info): Set to 13:1:7.
+
+2011-07-29 Werner Lemberg <wl@gnu.org>
+
+ [cff] Add some more tracing infos.
+
+ * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
+ cff_parse_cid_ros): Add tracing.
+
+2011-07-22 Dirk Müller <dmueller@suse.de>
+
+ [psaux, type1] Fix null pointer dereferences.
+
+ Found with font fuzzying.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Check
+ `decoder->buildchar'.
+
+ * src/type1/t1load.c (t1_load_keyword): Check `blend->num_designs'.
+
+2011-07-20 Chris Morgan <cmorgan@cybexintl.com>
+
+ Add FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT.
+
+ Useful for embedded systems which don't need file stream support.
+
+ * src/base/ftsystem.c, src/base/ftobjs.c (FT_Stream_New): Implement
+ it.
+
+2011-07-20 Elton Chung <elton328@gmail.com>
+
+ * src/base/ftpatent.c (FT_Face_SetUnpatentedHinting): Fix typo.
+
+2011-07-16 Steven Chu <steven.f.chu@gmail.com>
+
+ [truetype] Fix metrics on size request for scalable fonts.
+
+ * src/truetype/ttdriver.c (tt_size_request): Fix copying metrics
+ from TT_Size to FT_Size if scalable font.
+
+ See
+
+ http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html
+
+ for some comparison images.
+
+2011-07-14 Matthias Drochner <M.Drochner@fz-juelich.de>.
+
+ [psaux] Fix potential sign extension problems.
+
+ When shifting right a signed value, it is not defined by the
+ C standard whether one gets a sign extension or not. Use a macro to
+ do an explicit cast from a signed short (assuming that this is
+ 16bit) to an int.
+
+ * src/psaux/t1decode.c (Fix2Int): New macro.
+ Use it where appropriate.
+
+2011-07-14 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_callothersubr>: Better handling of subroutine index 0.
+ From Matthias Drochner <M.Drochner@fz-juelich.de>.
+
+2011-07-10 ÐлекÑей Подтележников <apodtele@gmail.com>
+
+ [psaux] Optimize previous commit.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_callothersubr>: Move error check down to avoid testing twice for
+ good cases.
+
+2011-07-08 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Add better argument check for `callothersubr'.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_callothersubr>: Reject negative arguments.
+
+2011-07-07 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Try harder to find non-zero values for ascender and descender.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Consult `OS/2' table in case
+ the `hhea' table's values are zero.
+
+2011-07-03 Werner Lemberg <wl@gnu.org>
+
+ Fix previous commit.
+
+ We want to unset FT_FACE_FLAG_SCALABLE only if there are bitmap
+ strikes in the font.
+
+ * src/truetype/ttobjs.c (tt_face_init): Implement it.
+
+ * docs/CHANGES: Updated.
+
+2011-07-02 Just Fill Bugs <mozbugbox@yahoo.com.au>
+
+ [truetype] Fix Savannah bug #33246.
+
+ * src/truetype/ttobjs.c (tt_check_single_notdef): New function.
+ (tt_face_init): Use it to test FT_FACE_FLAG_SCALABLE.
+
+2011-07-02 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2011-07-02 David Bevan <david.bevan@pb.com>
+
+ [ftstroke] Major revision.
+
+ The main problems
+ -----------------
+
+ o If FT_STROKER_LINEJOIN_BEVEL was specified, unlimited miter
+ joins (not bevel joins) were generated. Indeed, the meanings of
+ `miter' and `bevel' were incorrectly reversed (consistently) in
+ both the code and comments.
+
+ o The way bevel joins were constructed (whether specified
+ explicitly, or created as a result of exceeding the miter limit)
+ did not match what is required for stroked text in PostScript or
+ PDF.
+
+ The main fixes
+ --------------
+
+ o The behaviour of FT_STROKER_LINEJOIN_BEVEL has been corrected.
+
+ o A new line join style, FT_STROKER_LINEJOIN_MITER_FIXED, has been
+ introduced to support PostScript and PDF miter joins.
+
+ o FT_STROKER_LINEJOIN_MITER_VARIABLE has been introduced as an
+ alias for FT_STROKER_LINEJOIN_MITER.
+
+ Additionally, a variety of stroking errors have been fixed. These
+ would cause various artifacts (including points `at infinity'),
+ especially when stroking poor quality fonts.
+
+ See
+
+ http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html
+
+ for example documents. The FreeType stroker now produces results
+ very similar to that produced by GhostScript and Distiller for these
+ fonts.
+
+ Other problems
+ --------------
+
+ The following problems have been resolved:
+
+ o Inside corners could be generated incorrectly. Intersecting the
+ inside corner could cause a missing triangular area and other
+ effects.
+
+ The intersection point can only be used if the join is between
+ two lines and both lines are long enough. The `optimization'
+ condition in `ft_stroker_inside' has been corrected; this
+ requires the line length to be passed into various functions and
+ stored in `FT_StrokerRec'.
+
+ o Incorrect cubic curves could be generated. The angle
+ calculations in `FT_Stroker_CubicTo' have been corrected to
+ handle the case of the curve crossing the +/-PI direction.
+
+ o If the border radius was greater than the radius of curvature of
+ a curve, then the negative sector would end up outside (not
+ inside) the border. This situation is now recognized and the
+ negative sector is circumnavigated in the opposite direction.
+ (If round line joins are being used, this code is disabled
+ because the line join will always cover the negative sector.)
+
+ o When a curve is split, the arcs may not join smoothly (especially
+ if the curve turns sharply back on itself). Changes in
+ direction between adjacent arcs were not handled. A round
+ corner is now added if the deviation from one arc to the next is
+ greater than a suitable threshold.
+
+ o The current direction wasn't retained if a the outline contained
+ a zero length lineto or a curve that was determined to be
+ `basically a point'. This could cause a spurious join to be
+ added.
+
+ o Cubics with close control points could be mishandled. All eight
+ cases are now distinguished correctly.
+
+ Other improvements
+ ------------------
+
+ o Borders for cubic curves could be too `flat'.
+ FT_SMALL_CUBIC_THRESHOLD has been reduced a little to prevent
+ this.
+
+ o The handling and use of movable points has been simplified a
+ little.
+
+ o Various values are now computed only if the results are actually
+ needed.
+
+ o The directions of the outer and inner borders have been swapped,
+ as recommended by Graham Asher.
+
+ * src/base/ftstroke.c: Revised.
+ * include/freetype/ftstroke.h: Updated.
+
+2011-06-30 İsmail Dönmez <ismail@namtrac.org>
+
+ * builds/toplevel.mk: We use git, not CVS, thus skip `.gitignore'.
+
+2011-06-29 Werner Lemberg <wl@gnu.org>
+
+ [bdf] Fix Savannah bug #33663.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs): Handle negative values for
+ ENCODING correctly.
+
+ * docs/CHANGES: Document it.
+
+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>
+
+ [psaux] 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>
+
+ [cff] 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>
+
+ [truetype] 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>
+
+ [sfnt] 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>
+
+ [sfnt] 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>
+
+ [truetype] 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>
+
+ [cache] 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>
+
+ [truetype] 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>
+
+ [type42] 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>
+
+ [truetype] 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>
+
+ [smooth] 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>
+
+ [sfnt] 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>
+
+ [pfr] 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>
+
+ [cff] 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>
+
+ [pcf] 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>
+
+ [sfnt] 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>
+
+ [pfr] 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>
+
+ [bdf] 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>
+
+ [pfr] 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>
+
+ [psaux] 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>
+
+ [bdf] 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>
+
+ [autofit] 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>
+
+ [pshinter] 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>
+
+ [cff] 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>
+
+ [cff] 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>
+
+ [cff] 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>
+
+ [psaux] 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.
+
+ * src/psaux/t1decode.c (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>
+
+ [psaux] 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>
+
+ [psaux] 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>
+
+ [truetype] 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>
+
+ [raster] 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>
+
+ [truetype] 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>
+
+ [raster] Fix Savannah bug #27442.
+
+ * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'.
+
+2010-03-09 Werner Lemberg <wl@gnu.org>
+
+ [cff] Remove unused variable.
+ Reported by Graham.
+
+ * src/cff/cffparse.c (cff_parse_real): Remove `rest'.
+
+2010-03-02 John Tytgat <John.Tytgat@esko.com>
+
+ [cff] 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>
+
+ [truetype] 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-2013 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This file is part of the FreeType project, and may only be used, modified,
+and distributed under the terms of the FreeType project license,
+LICENSE.TXT. By continuing to use, modify, or distribute this file you
+indicate that you have read the license and understand and accept it
+fully.
+
+
+Local Variables:
+version-control: never
+coding: utf-8
+End:
diff --git a/Jamfile b/Jamfile
index 313bda6..16e097e 100644
--- a/Jamfile
+++ b/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 top Jamfile.
#
-# Copyright 2001-2011 by
+# Copyright 2001-2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -140,9 +140,9 @@ DEFINES += FT2_BUILD_LIBRARY ;
# 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.
+# The file <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 include freetype config ftheader.h ] ;
HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
@@ -177,7 +177,7 @@ actions GenExportSymbols1 bind APINAMES
$(APINAMES) $(2) > $(1)
}
-GenExportSymbols ftexport.sym : include/freetype include/freetype/cache ;
+GenExportSymbols ftexport.sym : include include/cache ;
# Test files (hinter debugging). Only used by FreeType developers.
#
@@ -195,7 +195,7 @@ rule RefDoc
actions RefDoc
{
- python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.4.9 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h
+ python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.5.5 --output=$(DOC_DIR) $(FT2_INCLUDE)/*.h $(FT2_INCLUDE)/config/*.h
}
RefDoc refdoc ;
diff --git a/README b/README
index 84b1c44..f00a1ab 100644
--- a/README
+++ b/README
@@ -1,17 +1,22 @@
- FreeType 2.4.9
+ FreeType 2.5.5
==============
+ Homepage: http://www.freetype.org
+
+ FreeType is a freely available software library to render fonts.
+
+ It is written in C, designed to be small, efficient, highly
+ customizable, and portable while capable of producing high-quality
+ output (glyph images) of most vector and bitmap font formats.
+
Please read the docs/CHANGES file, it contains IMPORTANT
INFORMATION.
- Read the files `docs/INSTALL' for installation instructions.
-
- See the file `docs/LICENSE.TXT' for the available licenses. Note
- that we use ranges (`2008-2010') for copyright years also instead of
- listing individual years (`2008, 2009, 2010').
+ Read the files `docs/INSTALL*' for installation instructions; see
+ the file `docs/LICENSE.TXT' for the available licenses.
The FreeType 2 API reference is located in `docs/reference'; use the
- file `ft2-doc.html' as the top entry point. Additional
+ file `ft2-toc.html' as the top entry point. Additional
documentation is available as a separate package from our sites. Go
to
@@ -19,23 +24,44 @@
and download one of the following files.
- freetype-doc-2.4.9.tar.bz2
- freetype-doc-2.4.9.tar.gz
- ftdoc249.zip
+ freetype-doc-2.5.5.tar.bz2
+ freetype-doc-2.5.5.tar.gz
+ ftdoc255.zip
+
+ To view the documentation online, go to
+
+ http://www.freetype.org/freetype2/documentation.html
+
+
+ Mailing Lists
+ =============
+
+ The preferred way of communication with the FreeType team is using
+ e-mail lists.
+
+ general use and discussion: freetype@nongnu.org
+ engine internals, porting, etc.: freetype-devel@nongnu.org
+ announcements: freetype-announce@nongnu.org
+
+ The lists are moderated; see
+
+ http://www.freetype.org/contact.html
+
+ how to subscribe.
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
+ Please submit bug reports at
https://savannah.nongnu.org/bugs/?group=freetype
+ Alternatively, you might 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'.
+
Enjoy!
@@ -44,7 +70,7 @@
----------------------------------------------------------------------
-Copyright 2006-2011 by
+Copyright 2006-2014 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/README.git b/README.git
index 47cb242..021c121 100644
--- a/README.git
+++ b/README.git
@@ -31,9 +31,13 @@ configure script is necessary at all; saying
should work on all platforms which have GNU make (or makepp).
+Similarly, a build with `cmake' can be done directly from the git
+repository.
+
+
----------------------------------------------------------------------
-Copyright 2005, 2006, 2007, 2008, 2009, 2010 by
+Copyright 2005-2010, 2013 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/autogen.sh b/autogen.sh
index 9f2fb6a..cc0e661 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005, 2006, 2007, 2008, 2009, 2010 by
+# Copyright 2005-2010, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -55,7 +55,7 @@ compare_to_minimum_version ()
if test $MAJOR1 -lt $MAJOR2; then
echo 0
return
- else
+ else
if test $MAJOR1 -gt $MAJOR2; then
echo 1
return
@@ -67,7 +67,7 @@ compare_to_minimum_version ()
if test $MINOR1 -lt $MINOR2; then
echo 0
return
- else
+ else
if test $MINOR1 -gt $MINOR2; then
echo 1
return
@@ -139,7 +139,7 @@ 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`
+eval `sed -nf version.sed include/freetype.h`
# We set freetype-patch to an empty value if it is zero.
if test "$freetype_patch" = ".0"; then
diff --git a/builds/amiga/README b/builds/amiga/README
index 2b8f8e8..85fcc43 100644
--- a/builds/amiga/README
+++ b/builds/amiga/README
@@ -1,7 +1,7 @@
README for the builds/amiga subdirectory.
-Copyright 2005 by
+Copyright 2005, 2013 by
Werner Lemberg and Detlef Würkner.
This file is part of the FreeType project, and may only be used, modified,
@@ -51,8 +51,8 @@ directory. The results are:
- 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().
+ Debugging can be turned on in FT:include/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
@@ -64,15 +64,14 @@ directory. The results are:
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.
+ statements which modules you need. See include/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.
+ include/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
diff --git a/builds/amiga/include/freetype/config/ftconfig.h b/builds/amiga/include/config/ftconfig.h
index c2c2ac8..a73ace6 100644
--- a/builds/amiga/include/freetype/config/ftconfig.h
+++ b/builds/amiga/include/config/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* Amiga-specific configuration file (specification only). */
/* */
-/* Copyright 2005, 2006, 2007 by */
+/* Copyright 2005-2007, 2013 by */
/* Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -34,9 +34,9 @@
/* Now include the original file */
#ifndef __MORPHOS__
#ifdef __SASC
-#include "FT:include/freetype/config/ftconfig.h"
+#include "FT:include/config/ftconfig.h"
#else
-#include "/FT/include/freetype/config/ftconfig.h"
+#include "/FT/include/config/ftconfig.h"
#endif
#else
/* We must define that, it seems that
@@ -45,7 +45,7 @@
* binaries from http://www.morphos.de)
*/
#define _LIBC_LIMITS_H_
-#include "/FT/include/freetype/config/ftconfig.h"
+#include "/FT/include/config/ftconfig.h"
#endif
/*
diff --git a/builds/amiga/include/freetype/config/ftmodule.h b/builds/amiga/include/config/ftmodule.h
index 5873bab..5873bab 100644
--- a/builds/amiga/include/freetype/config/ftmodule.h
+++ b/builds/amiga/include/config/ftmodule.h
diff --git a/builds/amiga/makefile b/builds/amiga/makefile
index 379883d..8a1e4c6 100644
--- a/builds/amiga/makefile
+++ b/builds/amiga/makefile
@@ -5,7 +5,7 @@
#
-# Copyright 2005, 2006, 2007, 2009 by
+# Copyright 2005-2007, 2009, 2013 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -43,7 +43,7 @@
#
# 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).
+# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h).
all: libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
diff --git a/builds/amiga/makefile.os4 b/builds/amiga/makefile.os4
index 13758bc..a2e6ffc 100644
--- a/builds/amiga/makefile.os4
+++ b/builds/amiga/makefile.os4
@@ -4,7 +4,7 @@
#
-# Copyright 2005, 2006, 2007, 2009 by
+# Copyright 2005-2007, 2009, 2013 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -40,7 +40,7 @@
#
# 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).
+# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h).
all: assign libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
diff --git a/builds/amiga/smakefile b/builds/amiga/smakefile
index 097aec9..aee7fb9 100644
--- a/builds/amiga/smakefile
+++ b/builds/amiga/smakefile
@@ -3,7 +3,7 @@
#
-# Copyright 2005,2006, 2007, 2009 by
+# Copyright 2005-2007, 2009, 2013 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -40,7 +40,7 @@
#
# 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).
+# FT_DEBUG_LEVEL_TRACE in include/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 \
diff --git a/builds/amiga/src/base/ftdebug.c b/builds/amiga/src/base/ftdebug.c
index 5284e69..39688af 100644
--- a/builds/amiga/src/base/ftdebug.c
+++ b/builds/amiga/src/base/ftdebug.c
@@ -2,9 +2,9 @@
/* */
/* ftdebug.c */
/* */
-/* Debugging and logging component (body). */
+/* Debugging and logging component for amiga (body). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005 by */
+/* Copyright 1996-2002, 2004, 2005, 2013 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -41,12 +41,12 @@
/*************************************************************************/
-/*
- * Based on the default ftdebug.c,
- * replaced vprintf() with KVPrintF(),
- * commented out exit(),
- * replaced getenv() with GetVar().
- */
+ /*
+ * 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>
@@ -59,9 +59,9 @@
#include <clib/debug_protos.h>
#ifndef __amigaos4__
-extern struct Library *DOSBase;
+ extern struct Library *DOSBase;
#else
-extern struct DOSIFace *IDOS;
+ extern struct DOSIFace *IDOS;
#endif
@@ -75,13 +75,13 @@ extern struct DOSIFace *IDOS;
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
- FT_Message( const char* fmt, ... )
+ FT_Message( const char* fmt,
+ ... )
{
va_list ap;
va_start( ap, fmt );
-/* vprintf( fmt, ap ); */
KVPrintF( fmt, ap );
va_end( ap );
}
@@ -90,19 +90,34 @@ extern struct DOSIFace *IDOS;
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
- FT_Panic( const char* fmt, ... )
+ FT_Panic( const char* fmt,
+ ... )
{
va_list ap;
va_start( ap, fmt );
-/* vprintf( fmt, ap ); */
KVPrintF( fmt, ap );
va_end( ap );
/* exit( EXIT_FAILURE ); */
}
+
+ /* documentation is in ftdebug.h */
+
+ FT_BASE_DEF( int )
+ FT_Throw( FT_Error error,
+ int line,
+ const char* file )
+ {
+ FT_UNUSED( error );
+ FT_UNUSED( line );
+ FT_UNUSED( file );
+
+ return 0;
+ }
+
#endif /* FT_DEBUG_LEVEL_ERROR */
@@ -161,7 +176,7 @@ extern struct DOSIFace *IDOS;
/* 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 */
+ /* See the file <include/internal/fttrace.h> for details of the */
/* available toggle names. */
/* */
/* The level must be between 0 and 7; 0 means quiet (except for serious */
@@ -193,6 +208,9 @@ extern struct DOSIFace *IDOS;
while ( *p && *p != ':' )
p++;
+ if ( !*p )
+ break;
+
if ( *p == ':' && p > q )
{
FT_Int n, i, len = (FT_Int)( p - q );
@@ -221,7 +239,7 @@ extern struct DOSIFace *IDOS;
p++;
if ( *p )
{
- level = *p++ - '0';
+ level = *p - '0';
if ( level < 0 || level > 7 )
level = -1;
}
diff --git a/builds/amiga/src/base/ftsystem.c b/builds/amiga/src/base/ftsystem.c
index 6f9eac1..42a552d 100644
--- a/builds/amiga/src/base/ftsystem.c
+++ b/builds/amiga/src/base/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* Amiga-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2001, 2002, 2005, 2006, 2007, 2010 by */
+/* Copyright 1996-2002, 2005-2007, 2010, 2013 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -386,7 +386,7 @@ Free_VecPooled( APTR poolHeader,
if ( !stream )
- return FT_Err_Invalid_Stream_Handle;
+ return FT_THROW( Invalid_Stream_Handle );
#ifdef __amigaos4__
sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_SHARED );
@@ -398,7 +398,7 @@ Free_VecPooled( APTR poolHeader,
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
}
sysfile->file = Open( (STRPTR)filepathname, MODE_OLDFILE );
if ( !sysfile->file )
@@ -407,7 +407,7 @@ Free_VecPooled( APTR poolHeader,
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
}
fib = AllocDosObject( DOS_FIB, NULL );
@@ -418,7 +418,7 @@ Free_VecPooled( APTR poolHeader,
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
}
if ( !( ExamineFH( sysfile->file, fib ) ) )
{
@@ -428,7 +428,7 @@ Free_VecPooled( APTR poolHeader,
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
}
stream->size = fib->fib_Size;
FreeDosObject( DOS_FIB, fib );
@@ -447,7 +447,7 @@ Free_VecPooled( APTR poolHeader,
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;;
+ return FT_THROW( Cannot_Open_Stream );
}
FT_TRACE1(( "FT_Stream_Open:" ));
diff --git a/builds/atari/deflinejoiner.awk b/builds/atari/deflinejoiner.awk
index c872a70..16d9e6d 100644
--- a/builds/atari/deflinejoiner.awk
+++ b/builds/atari/deflinejoiner.awk
@@ -15,7 +15,7 @@ function shift( array, \
function init_cpp_src_line()
{
logical_line = ""
- delete break_pos
+ delete break_pos
}
@@ -110,8 +110,8 @@ function shrink_spaces_to_linebreak( pos, \
{
for ( i = 0; i < asorti( break_pos, junk ) && break_pos[i] < pos ; i++ )
;
-
- if ( break_pos[i] < 1 )
+
+ if ( break_pos[i] < 1 )
return;
part_str = substr( logical_line, pos, break_pos[i] - pos + 1 )
diff --git a/builds/cmake/iOS.cmake b/builds/cmake/iOS.cmake
new file mode 100644
index 0000000..a41a7ac
--- /dev/null
+++ b/builds/cmake/iOS.cmake
@@ -0,0 +1,275 @@
+# iOS.cmake
+#
+# Copyright 2014 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# Written by David Wimsey <david@wimsey.us>
+#
+# 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 derived from the files `Platform/Darwin.cmake' and
+# `Platform/UnixPaths.cmake', which are part of CMake 2.8.4. It has been
+# altered for iOS development.
+
+
+# Options
+# -------
+#
+# IOS_PLATFORM = OS | SIMULATOR
+#
+# This decides whether SDKS are selected from the `iPhoneOS.platform' or
+# `iPhoneSimulator.platform' folders.
+#
+# OS - the default, used to build for iPhone and iPad physical devices,
+# which have an ARM architecture.
+# SIMULATOR - used to build for the Simulator platforms, which have an
+# x86 architecture.
+#
+# CMAKE_IOS_DEVELOPER_ROOT = /path/to/platform/Developer folder
+#
+# By default, this location is automatically chosen based on the
+# IOS_PLATFORM value above. If you manually set this variable, it
+# overrides the default location and forces the use of a particular
+# Developer Platform.
+#
+# CMAKE_IOS_SDK_ROOT = /path/to/platform/Developer/SDKs/SDK folder
+#
+# By default, this location is automatically chosen based on the
+# CMAKE_IOS_DEVELOPER_ROOT value. In this case it is always the most
+# up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path. If you
+# manually set this variable, it forces the use of a specific SDK
+# version.
+#
+#
+# Macros
+# ------
+#
+# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE)
+#
+# A convenience macro for setting Xcode specific properties on targets.
+#
+# Example:
+#
+# set_xcode_property(myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1")
+#
+# find_host_package (PROGRAM ARGS)
+#
+# A macro to find executable programs on the host system, not within the
+# iOS environment. Thanks to the `android-cmake' project for providing
+# the command.
+
+
+# standard settings
+set(CMAKE_SYSTEM_NAME Darwin)
+set(CMAKE_SYSTEM_VERSION 1)
+set(UNIX True)
+set(APPLE True)
+set(IOS True)
+
+# required as of cmake 2.8.10
+set(CMAKE_OSX_DEPLOYMENT_TARGET ""
+ CACHE STRING "Force unset of the deployment target for iOS" FORCE
+)
+
+# determine the cmake host system version so we know where to find the iOS
+# SDKs
+find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
+if (CMAKE_UNAME)
+ exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
+ string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1"
+ DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
+endif (CMAKE_UNAME)
+
+# force the compilers to gcc for iOS
+include(CMakeForceCompiler)
+CMAKE_FORCE_C_COMPILER(gcc gcc)
+CMAKE_FORCE_CXX_COMPILER(g++ g++)
+
+# skip the platform compiler checks for cross compiling
+set(CMAKE_CXX_COMPILER_WORKS TRUE)
+set(CMAKE_C_COMPILER_WORKS TRUE)
+
+# all iOS/Darwin specific settings - some may be redundant
+set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
+set(CMAKE_SHARED_MODULE_PREFIX "lib")
+set(CMAKE_SHARED_MODULE_SUFFIX ".so")
+set(CMAKE_MODULE_EXISTS 1)
+set(CMAKE_DL_LIBS "")
+
+set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG
+ "-compatibility_version ")
+set(CMAKE_C_OSX_CURRENT_VERSION_FLAG
+ "-current_version ")
+set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG
+ "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
+set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG
+ "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
+
+# hidden visibility is required for cxx on iOS
+set(CMAKE_C_FLAGS_INIT "")
+set(CMAKE_CXX_FLAGS_INIT
+ "-headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden")
+
+set(CMAKE_C_LINK_FLAGS
+ "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
+set(CMAKE_CXX_LINK_FLAGS
+ "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
+
+set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS
+ "-dynamiclib -headerpad_max_install_names")
+set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
+ "-bundle -headerpad_max_install_names")
+set(CMAKE_SHARED_MODULE_LOADER_C_FLAG
+ "-Wl,-bundle_loader,")
+set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG
+ "-Wl,-bundle_loader,")
+set(CMAKE_FIND_LIBRARY_SUFFIXES
+ ".dylib" ".so" ".a")
+
+# hack: If a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old
+# build tree (where `install_name_tool' was hardcoded), and where
+# CMAKE_INSTALL_NAME_TOOL isn't in the cache and still cmake didn't
+# fail in `CMakeFindBinUtils.cmake' (because it isn't rerun), hardcode
+# CMAKE_INSTALL_NAME_TOOL here to `install_name_tool' so it behaves as
+# it did before.
+if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
+ find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
+endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
+
+# set up iOS platform unless specified manually with IOS_PLATFORM
+if (NOT DEFINED IOS_PLATFORM)
+ set(IOS_PLATFORM "OS")
+endif (NOT DEFINED IOS_PLATFORM)
+
+set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform")
+
+# check the platform selection and setup for developer root
+if (${IOS_PLATFORM} STREQUAL "OS")
+ set(IOS_PLATFORM_LOCATION "iPhoneOS.platform")
+
+ # this causes the installers to properly locate the output libraries
+ set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
+
+elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
+ set(IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")
+
+ # this causes the installers to properly locate the output libraries
+ set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
+
+else (${IOS_PLATFORM} STREQUAL "OS")
+ message(FATAL_ERROR
+ "Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR.")
+
+endif (${IOS_PLATFORM} STREQUAL "OS")
+
+# set up iOS developer location unless specified manually with
+# CMAKE_IOS_DEVELOPER_ROOT --
+# note that Xcode 4.3 changed the installation location; choose the most
+# recent one available
+set(XCODE_POST_43_ROOT
+ "/Applications/Xcode.app/Contents/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
+set(XCODE_PRE_43_ROOT
+ "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
+
+if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
+ if (EXISTS ${XCODE_POST_43_ROOT})
+ set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT})
+ elseif (EXISTS ${XCODE_PRE_43_ROOT})
+ set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT})
+ endif (EXISTS ${XCODE_POST_43_ROOT})
+endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
+
+set(CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT}
+ CACHE PATH "Location of iOS Platform"
+)
+
+# find and use the most recent iOS SDK unless specified manually with
+# CMAKE_IOS_SDK_ROOT
+if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
+ file(GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")
+ if (_CMAKE_IOS_SDKS)
+ list(SORT _CMAKE_IOS_SDKS)
+ list(REVERSE _CMAKE_IOS_SDKS)
+ list(GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
+ else (_CMAKE_IOS_SDKS)
+ message(FATAL_ERROR
+ "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
+ endif (_CMAKE_IOS_SDKS)
+
+ message(STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
+endif (NOT DEFINED CMAKE_IOS_SDK_ROOT)
+
+set(CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT}
+ CACHE PATH "Location of the selected iOS SDK"
+)
+
+# set the sysroot default to the most recent SDK
+set(CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT}
+ CACHE PATH "Sysroot used for iOS support"
+)
+
+# set the architecture for iOS --
+# note that currently both ARCHS_STANDARD_32_BIT and
+# ARCHS_UNIVERSAL_IPHONE_OS set armv7 only, so set both manually
+if (${IOS_PLATFORM} STREQUAL "OS")
+ set(IOS_ARCH $(ARCHS_STANDARD_32_64_BIT))
+else (${IOS_PLATFORM} STREQUAL "OS")
+ set(IOS_ARCH i386)
+endif (${IOS_PLATFORM} STREQUAL "OS")
+
+set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH}
+ CACHE string "Build architecture for iOS"
+)
+
+# set the find root to the iOS developer roots and to user defined paths
+set(CMAKE_FIND_ROOT_PATH
+ ${CMAKE_IOS_DEVELOPER_ROOT}
+ ${CMAKE_IOS_SDK_ROOT}
+ ${CMAKE_PREFIX_PATH}
+ CACHE string "iOS find search path root"
+)
+
+# default to searching for frameworks first
+set(CMAKE_FIND_FRAMEWORK FIRST)
+
+# set up the default search directories for frameworks
+set(CMAKE_SYSTEM_FRAMEWORK_PATH
+ ${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
+ ${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
+ ${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
+)
+
+# only search the iOS SDKs, not the remainder of the host filesystem
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# this little macro lets you set any Xcode specific property
+macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
+ set_property(TARGET ${TARGET}
+ PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
+endmacro(set_xcode_property)
+
+# this macro lets you find executable programs on the host system
+macro(find_host_package)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+ set(IOS FALSE)
+
+ find_package(${ARGN})
+
+ set(IOS TRUE)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+endmacro(find_host_package)
+
+# eof
diff --git a/builds/compiler/bcc-dev.mk b/builds/compiler/bcc-dev.mk
index 63a46ad..42a99b0 100644
--- a/builds/compiler/bcc-dev.mk
+++ b/builds/compiler/bcc-dev.mk
@@ -53,7 +53,7 @@ L :=
# Target flag -- no trailing space.
#
T := -o
-TE := -e
+TE := -e
# C flags
diff --git a/builds/detect.mk b/builds/detect.mk
index 987ae51..ff4045d 100644
--- a/builds/detect.mk
+++ b/builds/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001, 2002, 2003, 2006, 2008 by
+# Copyright 1996-2003, 2006, 2008, 2013, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -17,8 +17,8 @@
# 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.
+# `builds/$(PLATFORM)' but can be different for custom builds
+# of the library.
#
# The following variables must be defined in system specific `detect.mk'
# files:
@@ -124,7 +124,7 @@ std_setup:
@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 "or \`$(MAKE) refdoc' to build the API reference (this needs python >= 2.6)."
@echo ""
@$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
@@ -146,7 +146,7 @@ dos_setup:
@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).
+ @echo or 'make refdoc' to build the API reference (this needs python >= 2.6).
@type builds$(SEP)newline
@$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK)) > nul
diff --git a/builds/dos/detect.mk b/builds/dos/detect.mk
index 700a122..3e5e967 100644
--- a/builds/dos/detect.mk
+++ b/builds/dos/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2004, 2006 by
+# Copyright 1996-2000, 2003, 2004, 2006, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -45,12 +45,12 @@ ifeq ($(PLATFORM),ansi)
endif
# We also try to recognize Dos 7.x without Windows 9X launched.
- # See builds/win32/detect.mk for explanations about the logic.
+ # See builds/windows/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.
+ # If windows is available, do not trigger this test.
ifndef windir
is_dos := $(findstring Windows,$(strip $(shell ver)))
endif
@@ -124,7 +124,7 @@ ifeq ($(PLATFORM),dos)
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
+ # Windows NT derivatives, like XP. See builds/windows/detect.mk for
# explanations why we need hacking here.
#
ifeq ($(OS),Windows_NT)
diff --git a/builds/exports.mk b/builds/exports.mk
index 52f2912..96b10db 100644
--- a/builds/exports.mk
+++ b/builds/exports.mk
@@ -51,7 +51,7 @@ ifneq ($(EXPORTS_LIST),)
APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD))
$(APINAMES_EXE): $(APINAMES_SRC)
- $(CCexe) $(TE)$@ $<
+ $(CCexe) $(CCexe_CFLAGS) $(TE)$@ $< $(CCexe_LDFLAGS)
.PHONY: symbols_list
diff --git a/builds/freetype.mk b/builds/freetype.mk
index 7a89c8e..8b2e2ea 100644
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 by
+# Copyright 1996-2006, 2008, 2013, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -97,7 +97,7 @@ BASE_DIR := $(SRC_DIR)/base
# Other derived directories.
#
-PUBLIC_DIR := $(TOP_DIR)/include/freetype
+PUBLIC_DIR := $(TOP_DIR)/include
INTERNAL_DIR := $(PUBLIC_DIR)/internal
SERVICES_DIR := $(INTERNAL_DIR)/services
CONFIG_DIR := $(PUBLIC_DIR)/config
@@ -116,8 +116,8 @@ PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A
# 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.
+# in the `builds/<system>' directory, as these files will
+# override the default sources.
#
INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
$(DEVEL_DIR) \
@@ -126,6 +126,14 @@ INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
INCLUDE_FLAGS := $(INCLUDES:%=$I%)
+ifdef DEVEL_DIR
+ # We assume that all library dependencies for FreeType are fulfilled for a
+ # development build, so we directly access the necessary include directory
+ # information using `pkg-config'.
+ INCLUDE_FLAGS += $(shell pkg-config --cflags libpng \
+ harfbuzz )
+endif
+
# C flags used for the compilation of an object file. This must include at
# least the paths for the `base' and `builds/<system>' directories;
@@ -147,13 +155,14 @@ ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),)
FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="<ftoption.h>"
endif
+# Note that a build with the `configure' script uses $(CFLAGS) only.
+#
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)
@@ -178,7 +187,7 @@ 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) \
+ $(wildcard $(BUILD_DIR)/config/*.h) \
$(FTMODULE_H) \
$(FTOPTION_H)
DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
@@ -261,8 +270,6 @@ objects: $(OBJECTS_LIST)
library: $(PROJECT_LIBRARY)
-dll: $(PROJECT_LIBRARY) exported_symbols
-
.c.$O:
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
@@ -290,19 +297,16 @@ ifneq ($(findstring refdoc,$(MAKECMDGOALS)),)
version := $(major).$(minor).$(patch)
endif
-# We write-protect the docmaker directory to suppress generation
-# of .pyc files.
+# Option `-B' disables generation of .pyc files (available since python 2.6)
#
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
+ python -B $(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
.PHONY: clean_project_std distclean_project_std
diff --git a/builds/mac/README b/builds/mac/README
index bd3df8a..f58e47d 100644
--- a/builds/mac/README
+++ b/builds/mac/README
@@ -1,8 +1,8 @@
This folder contains
- * Makefile skeltons for Apple MPW (Macintosh's Programmers Workshop)
+ * Makefile skeletons for Apple MPW (Macintosh's Programmer's Workshop)
- * Python script to generate MPW makefile from skelton
+ * Python script to generate MPW makefile from skeleton
* Metrowerks CodeWarrior 9.0 project file in XML format
@@ -51,7 +51,7 @@ environment by Metrowerks. GCC for MPW and Symantec
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
+ skeletons. Python bundled to Mac OS X is enough. For
classic MacOS, MacPython is available:
http://homepages.cwi.nl/~jack/macpython/
@@ -78,10 +78,10 @@ environment by Metrowerks. GCC for MPW and Symantec
Detailed building procedure by Apple MPW is
described in following.
- 3-1-1. Generate MPW makefiles from the skeltons
+ 3-1-1. Generate MPW makefiles from the skeletons
------------------------------------------------
- Here are 4 skeltons for following targets are
+ Here are 4 skeletons for following targets are
included.
- FreeType.m68k_far.make.txt
@@ -109,7 +109,7 @@ environment by Metrowerks. GCC for MPW and Symantec
MPW makefile syntax uses 8bit characters. To keep
from violating them during version control, here
- we store skeltons in pure ASCII format. You must
+ we store skeletons in pure ASCII format. You must
generate MPW makefile by Python script ascii2mpw.py.
In Mac OS X terminal, you can convert as:
@@ -118,10 +118,10 @@ environment by Metrowerks. GCC for MPW and Symantec
< builds/mac/FreeType.m68k_far.make.txt \
> FreeType.m68k_far.make
- The skeltons are designed to use in the top
+ The skeletons 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.
+ ".txt" from source skeleton name.
3-1-2. Add resource forks to related files
------------------------------------------
@@ -392,12 +392,10 @@ ATSFontGetFileSpecification() | x | x | x | x |
ATS font manager is not published in these versions.
------------------------------------------------------------
-Last update: 2009-Jul-25.
+Last update: 2013-Nov-03.
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/builds/mac/freetype-Info.plist b/builds/mac/freetype-Info.plist
new file mode 100644
index 0000000..b3d114d
--- /dev/null
+++ b/builds/mac/freetype-Info.plist
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
+ "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+
+<plist version="1.0">
+
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+
+ <key>CFBundleExecutable</key>
+ <string>FreeType</string>
+
+ <key>CFBundleGetInfoString</key>
+ <string>FreeType ${PROJECT_VERSION}</string>
+
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+
+ <key>CFBundleName</key>
+ <string>FreeType</string>
+
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+
+ <key>CFBundleShortVersionString</key>
+ <string>${PROJECT_VERSION}</string>
+
+ <key>CFBundleSignature</key>
+ <string>????</string>
+
+ <key>CFBundleVersion</key>
+ <string>${PROJECT_VERSION}</string>
+</dict>
+
+</plist>
diff --git a/builds/mac/ftmac.c b/builds/mac/ftmac.c
index 719dd0c..27b5511 100644
--- a/builds/mac/ftmac.c
+++ b/builds/mac/ftmac.c
@@ -5,7 +5,7 @@
/* 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 */
+/* Copyright 1996-2008, 2013, 2014 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -184,7 +184,7 @@ typedef short ResourceIndex;
FT_UNUSED( pathSpec );
FT_UNUSED( face_index );
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
#else
@@ -204,6 +204,9 @@ typedef short ResourceIndex;
FMFontFamily family = 0;
+ if ( !fontName || !face_index )
+ return FT_THROW( Invalid_Argument );
+
*face_index = 0;
while ( status == 0 && !the_font )
{
@@ -270,7 +273,7 @@ typedef short ResourceIndex;
return FT_Err_Ok;
}
else
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
}
#endif /* HAVE_QUICKDRAW_CARBON */
@@ -323,10 +326,10 @@ typedef short ResourceIndex;
CFRelease( cf_fontName );
if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
if ( noErr != FT_ATSFontGetFileReference( ats_font_id, ats_font_ref ) )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
/* face_index calculation by searching preceding fontIDs */
/* with same FSRef */
@@ -365,7 +368,7 @@ typedef short ResourceIndex;
FT_UNUSED( maxPathSize );
FT_UNUSED( face_index );
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
#else
@@ -381,11 +384,11 @@ typedef short ResourceIndex;
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
- if ( FT_Err_Ok != err )
+ if ( err )
return err;
if ( noErr != FSRefMakePath( &ref, path, maxPathSize ) )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
return FT_Err_Ok;
}
@@ -404,7 +407,7 @@ typedef short ResourceIndex;
FT_UNUSED( pathSpec );
FT_UNUSED( face_index );
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
#else
@@ -420,12 +423,12 @@ typedef short ResourceIndex;
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
- if ( FT_Err_Ok != err )
+ if ( err )
return err;
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL,
pathSpec, NULL ) )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
return FT_Err_Ok;
}
@@ -580,7 +583,7 @@ typedef short ResourceIndex;
if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
/* at present, no support for dfont format */
err = FSOpenResourceFile( &ref, 0, NULL, fsRdPerm, res );
@@ -598,7 +601,7 @@ typedef short ResourceIndex;
if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
/* at present, no support for dfont format without FSRef */
/* (see above), try original resource-fork font */
@@ -696,11 +699,9 @@ typedef short ResourceIndex;
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 );
@@ -847,17 +848,17 @@ typedef short ResourceIndex;
/* We should not extract parent directory by string manipulation. */
if ( noErr != FSPathMakeRef( path_fond, &ref, FALSE ) )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
NULL, NULL, NULL, &par_ref ) )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( noErr != FSRefMakePath( &par_ref, path_lwfn, path_size ) )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* now we have absolute dirname in path_lwfn */
if ( path_lwfn[0] == '/' )
@@ -870,11 +871,11 @@ typedef short ResourceIndex;
path_lwfn[dirname_len + base_lwfn[0]] = '\0';
if ( noErr != FSPathMakeRef( path_lwfn, &ref, FALSE ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
NULL, NULL, NULL, NULL ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
return FT_Err_Ok;
@@ -886,7 +887,7 @@ typedef short ResourceIndex;
/* pathname for FSSpec is always HFS format */
if ( ft_strlen( (char *)path_fond ) > path_size )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
ft_strcpy( (char *)path_lwfn, (char *)path_fond );
@@ -895,7 +896,7 @@ typedef short ResourceIndex;
i--;
if ( i + 1 + base_lwfn[0] > path_size )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( ':' == path_lwfn[i] )
{
@@ -909,7 +910,7 @@ typedef short ResourceIndex;
}
if ( noErr != FT_FSPathMakeSpec( path_lwfn, &spec, FALSE ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
return FT_Err_Ok;
@@ -1003,7 +1004,7 @@ typedef short ResourceIndex;
/* detect integer overflows */
if ( total_size < old_total_size )
{
- error = FT_Err_Array_Too_Large;
+ error = FT_ERR( Array_Too_Large );
goto Error;
}
@@ -1088,7 +1089,7 @@ typedef short ResourceIndex;
if ( noErr != FT_FSPathMakeRes( pathname, &res ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
pfb_data = NULL;
pfb_size = 0;
@@ -1123,7 +1124,7 @@ typedef short ResourceIndex;
sfnt = GetResource( TTAG_sfnt, sfnt_id );
if ( sfnt == NULL )
- return FT_Err_Invalid_Handle;
+ return FT_THROW( Invalid_Handle );
sfnt_size = (FT_ULong)GetHandleSize( sfnt );
if ( FT_ALLOC( sfnt_data, (FT_Long)sfnt_size ) )
@@ -1182,23 +1183,26 @@ typedef short ResourceIndex;
FT_Long face_index,
FT_Face* aface )
{
- FT_Error error = FT_Err_Cannot_Open_Resource;
+ 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;
+ short num_faces_in_res;
if ( noErr != FT_FSPathMakeRes( pathname, &res_ref ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
UseResFile( res_ref );
if ( ResError() )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
num_faces_in_res = 0;
for ( res_index = 1; ; ++res_index )
{
+ short num_faces_in_fond;
+
+
fond = Get1IndResource( TTAG_FOND, res_index );
if ( ResError() )
break;
@@ -1237,9 +1241,12 @@ typedef short ResourceIndex;
FT_Error error = FT_Err_Ok;
+ /* test for valid `aface' and `library' delayed to */
+ /* `FT_New_Face_From_XXX' */
+
GetResInfo( fond, &fond_id, &fond_type, fond_name );
if ( ResError() != noErr || fond_type != TTAG_FOND )
- return FT_Err_Invalid_File_Format;
+ return FT_THROW( Invalid_File_Format );
HLock( fond );
parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, face_index );
@@ -1322,7 +1329,7 @@ typedef short ResourceIndex;
face_index,
aface );
else
- error = FT_Err_Unknown_File_Format;
+ error = FT_ERR( Unknown_File_Format );
found_no_lwfn_file:
if ( have_sfnt && FT_Err_Ok != error )
@@ -1389,9 +1396,8 @@ typedef short ResourceIndex;
/* test for valid `library' and `aface' delayed to FT_Open_Face() */
if ( !pathname )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
- error = FT_Err_Ok;
*aface = NULL;
/* try resourcefork based font: LWFN, FFIL */
@@ -1432,7 +1438,7 @@ typedef short ResourceIndex;
FT_UNUSED( face_index );
FT_UNUSED( aface );
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
#else
@@ -1442,12 +1448,14 @@ typedef short ResourceIndex;
UInt8 pathname[PATH_MAX];
+ /* test for valid `library' and `aface' delayed to `FT_Open_Face' */
+
if ( !ref )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
err = FSRefMakePath( ref, pathname, sizeof ( pathname ) );
if ( err )
- error = FT_Err_Cannot_Open_Resource;
+ error = FT_ERR( Cannot_Open_Resource );
error = FT_New_Face_From_Resource( library, pathname, face_index, aface );
if ( error != 0 || *aface != NULL )
@@ -1487,7 +1495,7 @@ typedef short ResourceIndex;
if ( !spec || FSpMakeFSRef( spec, &ref ) != noErr )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
else
return FT_New_Face_From_FSRef( library, &ref, face_index, aface );
@@ -1500,11 +1508,11 @@ typedef short ResourceIndex;
if ( !spec )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
err = FT_FSpMakePath( spec, pathname, sizeof ( pathname ) );
if ( err )
- error = FT_Err_Cannot_Open_Resource;
+ error = FT_ERR( Cannot_Open_Resource );
error = FT_New_Face_From_Resource( library, pathname, face_index, aface );
if ( error != 0 || *aface != NULL )
@@ -1522,7 +1530,7 @@ typedef short ResourceIndex;
FT_UNUSED( face_index );
FT_UNUSED( aface );
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
#endif /* HAVE_FSREF, HAVE_FSSPEC */
diff --git a/builds/modules.mk b/builds/modules.mk
index c4a882c..3c1b083 100644
--- a/builds/modules.mk
+++ b/builds/modules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2006, 2008 by
+# Copyright 1996-2000, 2003, 2006, 2008, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -28,7 +28,7 @@ $(FTMODULE_H): $(MODULES_CFG)
$(FTMODULE_H_CREATE)
$(FTMODULE_H_DONE)
-ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
+ifneq ($(findstring $(PLATFORM),dos windows os2),)
OPEN_MODULE := @echo$(space)
CLOSE_MODULE := >> $(subst /,$(SEP),$(FTMODULE_H))
REMOVE_MODULE := @-$(DELETE) $(subst /,$(SEP),$(FTMODULE_H))
diff --git a/builds/symbian/bld.inf b/builds/symbian/bld.inf
index dd5f559..bc8c160 100644
--- a/builds/symbian/bld.inf
+++ b/builds/symbian/bld.inf
@@ -2,7 +2,7 @@
// FreeType 2 project for the symbian platform
//
-// Copyright 2008, 2009 by
+// Copyright 2008, 2009, 2013 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used, modified,
@@ -19,48 +19,48 @@ freetype.mmp
PRJ_EXPORTS
../../include/ft2build.h
-../../include/freetype/config/ftconfig.h freetype/config/ftconfig.h
-../../include/freetype/config/ftheader.h freetype/config/ftheader.h
-../../include/freetype/config/ftmodule.h freetype/config/ftmodule.h
-../../include/freetype/config/ftoption.h freetype/config/ftoption.h
-../../include/freetype/config/ftstdlib.h freetype/config/ftstdlib.h
-../../include/freetype/freetype.h freetype/freetype.h
-../../include/freetype/ftbbox.h freetype/ftbbox.h
-../../include/freetype/ftbdf.h freetype/ftbdf.h
-../../include/freetype/ftbitmap.h freetype/ftbitmap.h
-../../include/freetype/ftcache.h freetype/ftcache.h
-../../include/freetype/ftcid.h freetype/ftcid.h
-../../include/freetype/fterrdef.h freetype/fterrdef.h
-../../include/freetype/fterrors.h freetype/fterrors.h
-../../include/freetype/ftgasp.h freetype/ftgasp.h
-../../include/freetype/ftglyph.h freetype/ftglyph.h
-../../include/freetype/ftgxval.h freetype/ftgxval.h
-../../include/freetype/ftgzip.h freetype/ftgzip.h
-../../include/freetype/ftbzip2.h freetype/ftbzip2.h
-../../include/freetype/ftimage.h freetype/ftimage.h
-../../include/freetype/ftincrem.h freetype/ftincrem.h
-../../include/freetype/ftlcdfil.h freetype/ftlcdfil.h
-../../include/freetype/ftlist.h freetype/ftlist.h
-../../include/freetype/ftlzw.h freetype/ftlzw.h
-../../include/freetype/ftmac.h freetype/ftmac.h
-../../include/freetype/ftmm.h freetype/ftmm.h
-../../include/freetype/ftmodapi.h freetype/ftmodapi.h
-../../include/freetype/ftmoderr.h freetype/ftmoderr.h
-../../include/freetype/ftotval.h freetype/ftotval.h
-../../include/freetype/ftoutln.h freetype/ftoutln.h
-../../include/freetype/ftpfr.h freetype/ftpfr.h
-../../include/freetype/ftrender.h freetype/ftrender.h
-../../include/freetype/ftsizes.h freetype/ftsizes.h
-../../include/freetype/ftsnames.h freetype/ftsnames.h
-../../include/freetype/ftstroke.h freetype/ftstroke.h
-../../include/freetype/ftsynth.h freetype/ftsynth.h
-../../include/freetype/ftsystem.h freetype/ftsystem.h
-../../include/freetype/fttrigon.h freetype/fttrigon.h
-../../include/freetype/fttypes.h freetype/fttypes.h
-../../include/freetype/ftwinfnt.h freetype/ftwinfnt.h
-../../include/freetype/ftxf86.h freetype/ftxf86.h
-../../include/freetype/t1tables.h freetype/t1tables.h
-../../include/freetype/ttnameid.h freetype/ttnameid.h
-../../include/freetype/tttables.h freetype/tttables.h
-../../include/freetype/tttags.h freetype/tttags.h
-../../include/freetype/ttunpat.h freetype/ttunpat.h
+../../include/config/ftconfig.h config/ftconfig.h
+../../include/config/ftheader.h config/ftheader.h
+../../include/config/ftmodule.h config/ftmodule.h
+../../include/config/ftoption.h config/ftoption.h
+../../include/config/ftstdlib.h config/ftstdlib.h
+../../include/freetype.h freetype.h
+../../include/ftbbox.h ftbbox.h
+../../include/ftbdf.h ftbdf.h
+../../include/ftbitmap.h ftbitmap.h
+../../include/ftcache.h ftcache.h
+../../include/ftcid.h ftcid.h
+../../include/fterrdef.h fterrdef.h
+../../include/fterrors.h fterrors.h
+../../include/ftgasp.h ftgasp.h
+../../include/ftglyph.h ftglyph.h
+../../include/ftgxval.h ftgxval.h
+../../include/ftgzip.h ftgzip.h
+../../include/ftbzip2.h ftbzip2.h
+../../include/ftimage.h ftimage.h
+../../include/ftincrem.h ftincrem.h
+../../include/ftlcdfil.h ftlcdfil.h
+../../include/ftlist.h ftlist.h
+../../include/ftlzw.h ftlzw.h
+../../include/ftmac.h ftmac.h
+../../include/ftmm.h ftmm.h
+../../include/ftmodapi.h ftmodapi.h
+../../include/ftmoderr.h ftmoderr.h
+../../include/ftotval.h ftotval.h
+../../include/ftoutln.h ftoutln.h
+../../include/ftpfr.h ftpfr.h
+../../include/ftrender.h ftrender.h
+../../include/ftsizes.h ftsizes.h
+../../include/ftsnames.h ftsnames.h
+../../include/ftstroke.h ftstroke.h
+../../include/ftsynth.h ftsynth.h
+../../include/ftsystem.h ftsystem.h
+../../include/fttrigon.h fttrigon.h
+../../include/fttypes.h fttypes.h
+../../include/ftwinfnt.h ftwinfnt.h
+../../include/ftxf86.h ftxf86.h
+../../include/t1tables.h t1tables.h
+../../include/ttnameid.h ttnameid.h
+../../include/tttables.h tttables.h
+../../include/tttags.h tttags.h
+../../include/ttunpat.h ttunpat.h
diff --git a/builds/toplevel.mk b/builds/toplevel.mk
index 18bcef2..16d4be8 100644
--- a/builds/toplevel.mk
+++ b/builds/toplevel.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001, 2003, 2006, 2008, 2009, 2010 by
+# Copyright 1996-2001, 2003, 2006, 2008-2010, 2012-2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -112,10 +112,10 @@ ifdef check_platform
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
+ # 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
+ # GNU make. Similarly, `nul' is created if e.g. `make setup windows' has
# been erroneously used.
#
# Note: This test is duplicated in `builds/unix/detect.mk'.
@@ -176,7 +176,7 @@ include $(TOP_DIR)/builds/modules.mk
# we check for `dist', not `distclean'
ifneq ($(findstring distx,$(MAKECMDGOALS)x),)
- FT_H := include/freetype/freetype.h
+ FT_H := include/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))
@@ -201,6 +201,7 @@ dist:
currdir=`pwd` ; \
for f in `find . -wholename '*/.git' -prune \
-o -name .gitignore \
+ -o -name .mailmap \
-o -type d \
-o -print` ; do \
ln -s $$currdir/$$f tmp/$$f ; \
@@ -219,9 +220,9 @@ dist:
mv tmp freetype-$(version)
- tar cfh - freetype-$(version) \
+ tar -H ustar -chf - freetype-$(version) \
| gzip -9 -c > freetype-$(version).tar.gz
- tar cfh - freetype-$(version) \
+ tar -H ustar -chf - freetype-$(version) \
| bzip2 -c > freetype-$(version).tar.bz2
@# Use CR/LF for zip files.
diff --git a/builds/unix/aclocal.m4 b/builds/unix/aclocal.m4
index f90ad9f..2c03164 100644
--- a/builds/unix/aclocal.m4
+++ b/builds/unix/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.14 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,11 +11,10 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2014 Free Software Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is free software; the Free Software Foundation gives
@@ -23,36 +22,30 @@
# modifications, as long as this notice is preserved.
m4_define([_LT_COPYING], [dnl
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool 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 of the License, or
+# (at your option) any later version.
#
-# GNU Libtool 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.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
])
-# serial 57 LT_INIT
+# serial 58 LT_INIT
# LT_PREREQ(VERSION)
@@ -104,7 +97,7 @@ dnl Parse OPTIONS
_LT_SET_OPTIONS([$0], [$1])
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -143,7 +136,7 @@ cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
# _LT_FILEUTILS_DEFAULTS
# ----------------------
# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
m4_defun([_LT_FILEUTILS_DEFAULTS],
[: ${CP="cp -f"}
: ${MV="mv -f"}
@@ -192,13 +185,13 @@ m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
m4_require([_LT_WITH_SYSROOT])dnl
_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
])
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
@@ -211,7 +204,7 @@ aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
+ if test set != "${COLLECT_NAMES+set}"; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -222,14 +215,14 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
# Set sane defaults for various variables
test -z "$CC" && CC=cc
@@ -282,21 +275,21 @@ no_glob_subst='s/\*/\\\*/g'
# _LT_PROG_LTMAIN
# ---------------
-# Note that this code is called both from `configure', and `config.status'
+# Note that this code is called both from 'configure', and 'config.status'
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# 'config.status' has no value for ac_aux_dir unless we are using Automake,
# so we pass a copy along to make sure it has a sensible value anyway.
m4_defun([_LT_PROG_LTMAIN],
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
])# _LT_PROG_LTMAIN
# So that we can recreate a full libtool script including additional
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
+# in macros and then make a single call at the end using the 'libtool'
# label.
@@ -428,8 +421,8 @@ m4_define([_lt_decl_all_varnames],
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'. VARNAME
+# Quote a variable value, and forward it to 'config.status' so that its
+# declaration there will have the same value as in 'configure'. VARNAME
# must have a single quote delimited value for this to work.
m4_define([_LT_CONFIG_STATUS_DECLARE],
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
@@ -453,7 +446,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
# Output comment and list of tags supported by the script
m4_defun([_LT_LIBTOOL_TAGS],
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
+available_tags='_LT_TAGS'dnl
])
@@ -481,7 +474,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
# _LT_LIBTOOL_CONFIG_VARS
# -----------------------
# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
# section) are produced by _LT_LIBTOOL_TAG_VARS.
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
@@ -507,8 +500,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
# variables for single and double quote escaping we saved from calls
# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'. Finally, any additional code accumulated
+# into 'config.status', and then the shell code to quote escape them in
+# for loops in 'config.status'. Finally, any additional code accumulated
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
m4_defun([_LT_CONFIG_COMMANDS],
[AC_PROVIDE_IFELSE([LT_OUTPUT],
@@ -554,7 +547,7 @@ for var in lt_decl_all_varnames([[ \
]], lt_decl_quote_varnames); do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -567,7 +560,7 @@ for var in lt_decl_all_varnames([[ \
]], lt_decl_dquote_varnames); do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -583,7 +576,7 @@ _LT_OUTPUT_LIBTOOL_INIT
# Generate a child script FILE with all initialization necessary to
# reuse the environment learned by the parent script, and make the
# file executable. If COMMENT is supplied, it is inserted after the
-# `#!' sequence but before initialization text begins. After this
+# '#!' sequence but before initialization text begins. After this
# macro, additional text can be appended to FILE to form the body of
# the child script. The macro ends with non-zero status if the
# file could not be fully written (such as if the disk is full).
@@ -605,7 +598,7 @@ AS_SHELL_SANITIZE
_AS_PREPARE
exec AS_MESSAGE_FD>&1
_ASEOF
-test $lt_write_fail = 0 && chmod +x $1[]dnl
+test 0 = "$lt_write_fail" && chmod +x $1[]dnl
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
# LT_OUTPUT
@@ -628,7 +621,7 @@ exec AS_MESSAGE_LOG_FD>>config.log
} >&AS_MESSAGE_LOG_FD
lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
+'$as_me' creates a local libtool stub from the current configuration,
for use in further configure time tests before the real libtool is
generated.
@@ -650,7 +643,7 @@ Copyright (C) 2011 Free Software Foundation, Inc.
This config.lt script is free software; the Free Software Foundation
gives unlimited permision to copy, distribute and modify it."
-while test $[#] != 0
+while test 0 != $[#]
do
case $[1] in
--version | --v* | -V )
@@ -663,10 +656,10 @@ do
lt_cl_silent=: ;;
-*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
+Try '$[0] --help' for more information.]) ;;
*) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
+Try '$[0] --help' for more information.]) ;;
esac
shift
done
@@ -692,7 +685,7 @@ chmod +x "$CONFIG_LT"
# open by configure. Here we exec the FD to /dev/null, effectively closing
# config.log, so it can be properly (re)opened and appended to by config.lt.
lt_cl_success=:
-test "$silent" = yes &&
+test yes = "$silent" &&
lt_config_lt_args="$lt_config_lt_args --quiet"
exec AS_MESSAGE_LOG_FD>/dev/null
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
@@ -712,24 +705,25 @@ m4_defun([_LT_CONFIG],
_LT_CONFIG_SAVE_COMMANDS([
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
m4_if(_LT_TAG, [C], [
- # See if we are running on zsh, and set the options which allow our
+ # See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
+ if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
- cfgfile="${ofile}T"
+ cfgfile=${ofile}T
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
$RM "$cfgfile"
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
_LT_COPYING
_LT_LIBTOOL_TAGS
@@ -746,7 +740,7 @@ _LT_EOF
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -763,8 +757,6 @@ _LT_EOF
sed '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
- _LT_PROG_REPLACE_SHELLFNS
-
mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
@@ -782,7 +774,6 @@ _LT_EOF
[m4_if([$1], [], [
PACKAGE='$PACKAGE'
VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
RM='$RM'
ofile='$ofile'], [])
])dnl /_LT_CONFIG_SAVE_COMMANDS
@@ -979,7 +970,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
[lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
+ if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
# by either setting the environment variable LT_MULTI_MODULE
# non-empty at configure time, or by adding -multi_module to the
@@ -997,7 +988,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
cat conftest.err >&AS_MESSAGE_LOG_FD
# Otherwise, if the output was created with a 0 exit code from
# the compiler, it worked.
- elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1015,7 +1006,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
[lt_cv_ld_exported_symbols_list=yes],
[lt_cv_ld_exported_symbols_list=no])
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
])
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
@@ -1037,7 +1028,7 @@ _LT_EOF
_lt_result=$?
if test -s conftest.err && $GREP force_load conftest.err; then
cat conftest.err >&AS_MESSAGE_LOG_FD
- elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1047,32 +1038,32 @@ _LT_EOF
])
case $host_os in
rhapsody* | darwin1.[[012]])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
darwin*) # darwin 5.x on
# if running on 10.5 or later, the deployment target defaults
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10.[[012]]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
_lt_dar_single_mod='$single_module'
fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
fi
- if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
_lt_dsymutil='~$DSYMUTIL $lib || :'
else
_lt_dsymutil=
@@ -1092,29 +1083,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_automatic, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- if test "$lt_cv_ld_force_load" = "yes"; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test yes = "$lt_cv_ld_force_load"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
[FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
fi
_LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test "$_lt_dar_can_shared" = "yes"; then
+ if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
m4_if([$1], [CXX],
-[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+[ if test yes != "$lt_cv_apple_cc_single_mod"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi
],[])
else
@@ -1134,7 +1125,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
# Allow to override them for all tags through lt_cv_aix_libpath.
m4_defun([_LT_SYS_MODULE_PATH_AIX],
[m4_require([_LT_DECL_SED])dnl
-if test "${lt_cv_aix_libpath+set}" = set; then
+if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
@@ -1152,7 +1143,7 @@ else
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi],[])
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
- _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
fi
])
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
@@ -1172,8 +1163,8 @@ m4_define([_LT_SHELL_INIT],
# -----------------------
# Find how we can fake an echo command that does not interpret backslash.
# In particular, with Autoconf 2.60 or later we add some code to the start
-# of the generated configure script which will find a shell with a builtin
-# printf (which we can use as an echo command).
+# of the generated configure script that will find a shell with a builtin
+# printf (that we can use as an echo command).
m4_defun([_LT_PROG_ECHO_BACKSLASH],
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
@@ -1201,10 +1192,10 @@ fi
# Invoke $ECHO with all args, space-separated.
func_echo_all ()
{
- $ECHO "$*"
+ $ECHO "$*"
}
-case "$ECHO" in
+case $ECHO in
printf*) AC_MSG_RESULT([printf]) ;;
print*) AC_MSG_RESULT([print -r]) ;;
*) AC_MSG_RESULT([cat]) ;;
@@ -1230,16 +1221,17 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
AC_DEFUN([_LT_WITH_SYSROOT],
[AC_MSG_CHECKING([for sysroot])
AC_ARG_WITH([sysroot],
-[ --with-sysroot[=DIR] Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).],
+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+ [Search for dependent libraries within DIR (or the compiler's sysroot
+ if not specified).])],
[], [with_sysroot=no])
dnl lt_sysroot will always be passed unquoted. We quote it here
dnl in case the user passed a directory name.
lt_sysroot=
-case ${with_sysroot} in #(
+case $with_sysroot in #(
yes)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
@@ -1249,14 +1241,14 @@ case ${with_sysroot} in #(
no|'')
;; #(
*)
- AC_MSG_RESULT([${with_sysroot}])
+ AC_MSG_RESULT([$with_sysroot])
AC_MSG_ERROR([The sysroot must be an absolute path.])
;;
esac
AC_MSG_RESULT([${lt_sysroot:-no}])
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
-[dependent libraries, and in which our libraries should be installed.])])
+[dependent libraries, and where our libraries should be installed.])])
# _LT_ENABLE_LOCK
# ---------------
@@ -1264,31 +1256,33 @@ m4_defun([_LT_ENABLE_LOCK],
[AC_ARG_ENABLE([libtool-lock],
[AS_HELP_STRING([--disable-libtool-lock],
[avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
ia64-*-hpux*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
- HPUX_IA64_MODE="32"
+ HPUX_IA64_MODE=32
;;
*ELF-64*)
- HPUX_IA64_MODE="64"
+ HPUX_IA64_MODE=64
;;
esac
fi
rm -rf conftest*
;;
*-*-irix6*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
@@ -1317,9 +1311,46 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
@@ -1329,9 +1360,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -1350,7 +1391,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -1368,19 +1412,20 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
+ SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
[AC_LANG_PUSH(C)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ if test yes != "$lt_cv_cc_needs_belf"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
+ CFLAGS=$SAVE_CFLAGS
fi
;;
*-*solaris*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
@@ -1388,7 +1433,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
case $lt_cv_prog_gnu_ld in
yes*)
case $host in
- i?86-*-solaris*)
+ i?86-*-solaris*|x86_64-*-solaris*)
LD="${LD-ld} -m elf_x86_64"
;;
sparc*-*-solaris*)
@@ -1397,7 +1442,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
esac
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
- LD="${LD-ld}_sol2"
+ LD=${LD-ld}_sol2
fi
;;
*)
@@ -1413,7 +1458,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
])# _LT_ENABLE_LOCK
@@ -1432,11 +1477,11 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
[echo conftest.$ac_objext > conftest.lst
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
AC_TRY_EVAL([lt_ar_try])
- if test "$ac_status" -eq 0; then
+ if test 0 -eq "$ac_status"; then
# Ensure the archiver fails upon bogus file names.
rm -f conftest.$ac_objext libconftest.a
AC_TRY_EVAL([lt_ar_try])
- if test "$ac_status" -ne 0; then
+ if test 0 -ne "$ac_status"; then
lt_cv_ar_at_file=@
fi
fi
@@ -1444,7 +1489,7 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
])
])
-if test "x$lt_cv_ar_at_file" = xno; then
+if test no = "$lt_cv_ar_at_file"; then
archiver_list_spec=
else
archiver_list_spec=$lt_cv_ar_at_file
@@ -1475,7 +1520,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
- openbsd*)
+ bitrig* | openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
@@ -1511,7 +1556,7 @@ AC_CACHE_CHECK([$1], [$2],
[$2=no
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
+ lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -1538,7 +1583,7 @@ AC_CACHE_CHECK([$1], [$2],
$RM conftest*
])
-if test x"[$]$2" = xyes; then
+if test yes = "[$]$2"; then
m4_if([$5], , :, [$5])
else
m4_if([$6], , :, [$6])
@@ -1560,7 +1605,7 @@ AC_DEFUN([_LT_LINKER_OPTION],
m4_require([_LT_DECL_SED])dnl
AC_CACHE_CHECK([$1], [$2],
[$2=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $3"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -1579,10 +1624,10 @@ AC_CACHE_CHECK([$1], [$2],
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
])
-if test x"[$]$2" = xyes; then
+if test yes = "[$]$2"; then
m4_if([$4], , :, [$4])
else
m4_if([$5], , :, [$5])
@@ -1603,7 +1648,7 @@ AC_DEFUN([LT_CMD_MAX_LEN],
AC_MSG_CHECKING([the maximum length of command line arguments])
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
i=0
- teststring="ABCD"
+ teststring=ABCD
case $build_os in
msdosdjgpp*)
@@ -1643,7 +1688,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192;
;;
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1693,22 +1738,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
;;
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
# Make teststring a little bigger before we do anything with it.
# a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
+ for i in 1 2 3 4 5 6 7 8; do
teststring=$teststring$teststring
done
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
- while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
+ test 17 != "$i" # 1/2 MB should be enough
do
i=`expr $i + 1`
teststring=$teststring$teststring
@@ -1724,7 +1770,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
;;
esac
])
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
else
AC_MSG_RESULT(none)
@@ -1752,7 +1798,7 @@ m4_defun([_LT_HEADER_DLFCN],
# ----------------------------------------------------------------
m4_defun([_LT_TRY_DLOPEN_SELF],
[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
+if test yes = "$cross_compiling"; then :
[$4]
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -1801,7 +1847,7 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -1827,7 +1873,7 @@ int main ()
return status;
}]
_LT_EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -1848,7 +1894,7 @@ rm -fr conftest*
# ------------------
AC_DEFUN([LT_SYS_DLOPEN_SELF],
[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
+if test yes != "$enable_dlopen"; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
@@ -1858,44 +1904,52 @@ else
case $host_os in
beos*)
- lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen=load_add_on
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
;;
mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen=LoadLibrary
lt_cv_dlopen_libs=
;;
cygwin*)
- lt_cv_dlopen="dlopen"
+ lt_cv_dlopen=dlopen
lt_cv_dlopen_libs=
;;
darwin*)
- # if libdl is installed we need to link against it
+ # if libdl is installed we need to link against it
AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
+ lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
])
;;
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
*)
AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
+ [lt_cv_dlopen=shl_load],
[AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
[AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
+ [lt_cv_dlopen=dlopen],
[AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
[AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
[AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
])
])
])
@@ -1904,21 +1958,21 @@ else
;;
esac
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
+ if test no = "$lt_cv_dlopen"; then
enable_dlopen=no
+ else
+ enable_dlopen=yes
fi
case $lt_cv_dlopen in
dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
- save_LIBS="$LIBS"
+ save_LIBS=$LIBS
LIBS="$lt_cv_dlopen_libs $LIBS"
AC_CACHE_CHECK([whether a program can dlopen itself],
@@ -1928,7 +1982,7 @@ else
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
])
- if test "x$lt_cv_dlopen_self" = xyes; then
+ if test yes = "$lt_cv_dlopen_self"; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
lt_cv_dlopen_self_static, [dnl
@@ -1938,9 +1992,9 @@ else
])
fi
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
;;
esac
@@ -2032,8 +2086,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS],
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
_LT_COMPILER_C_O([$1])
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
AC_MSG_CHECKING([if we can lock with hard links])
hard_links=yes
@@ -2043,8 +2097,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" !=
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ if test no = "$hard_links"; then
+ AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
need_locks=warn
fi
else
@@ -2071,8 +2125,8 @@ objdir=$lt_cv_objdir
_LT_DECL([], [objdir], [0],
[The name of the directory that contains temporary libtool files])dnl
m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries.])
+AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
+ [Define to the sub-directory where libtool stores uninstalled libraries.])
])# _LT_CHECK_OBJDIR
@@ -2084,15 +2138,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
_LT_TAGVAR(hardcode_action, $1)=
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+ test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
# We can hardcode non-existent directories.
- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
+ test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
# Linking always hardcodes the temporary library directory.
_LT_TAGVAR(hardcode_action, $1)=relink
else
@@ -2106,12 +2160,12 @@ else
fi
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
+ test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
# Fast installation is not supported
enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -2135,7 +2189,7 @@ else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
darwin*)
- if test -n "$STRIP" ; then
+ if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
AC_MSG_RESULT([yes])
@@ -2166,14 +2220,14 @@ m4_require([_LT_CHECK_SHELL_FEATURES])dnl
AC_MSG_CHECKING([dynamic linker characteristics])
m4_if([$1],
[], [
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
- *) lt_sed_strip_eq="s,=/,/,g" ;;
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
case $lt_search_path_spec in
@@ -2189,28 +2243,35 @@ if test "$GCC" = yes; then
;;
esac
# Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
+ # and add multilib dir if necessary...
lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
test -d "$lt_sys_path" && \
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
for (lt_i = NF; lt_i > 0; lt_i--) {
if ($lt_i != "" && $lt_i != ".") {
if ($lt_i == "..") {
lt_count++;
} else {
if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
+ lt_foo = "/" $lt_i lt_foo;
} else {
lt_count--;
}
@@ -2224,7 +2285,7 @@ BEGIN {RS=" "; FS="/|\n";} {
# for these hosts.
case $host_os in
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
else
@@ -2233,7 +2294,7 @@ fi])
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -2253,11 +2314,11 @@ need_version=unknown
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
+ soname_spec='$libname$release$shared_ext$major'
;;
aix[[4-9]]*)
@@ -2265,40 +2326,40 @@ aix[[4-9]]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[[01]] | aix4.[[01]].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
+ if test yes = "$aix_use_runtimelinking"; then
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
else
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
fi
shlibpath_var=LIBPATH
fi
@@ -2309,18 +2370,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='${libname}${shared_ext}'
+ library_names_spec='$libname$shared_ext'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -2328,8 +2389,8 @@ beos*)
bsdi[[45]]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -2341,7 +2402,7 @@ bsdi[[45]]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=".dll"
+ shrext_cmds=.dll
need_version=no
need_lib_prefix=no
@@ -2350,8 +2411,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -2367,17 +2428,17 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -2386,8 +2447,8 @@ m4_if([$1], [],[
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- library_names_spec='${libname}.dll.lib'
+ soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
case $build_os in
mingw*)
@@ -2414,7 +2475,7 @@ m4_if([$1], [],[
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec="$LIB"
+ sys_lib_search_path_spec=$LIB
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -2427,8 +2488,8 @@ m4_if([$1], [],[
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -2441,7 +2502,7 @@ m4_if([$1], [],[
*)
# Assume MSVC wrapper
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -2454,8 +2515,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -2468,8 +2529,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -2487,12 +2548,12 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
need_version=yes
;;
esac
@@ -2517,26 +2578,15 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ shlibpath_overrides_runpath=no
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -2554,9 +2604,9 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
@@ -2569,8 +2619,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -2579,8 +2629,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -2593,8 +2643,8 @@ interix[[3-9]]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -2605,7 +2655,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -2613,8 +2663,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -2633,8 +2683,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
hardcode_into_libs=yes
;;
@@ -2643,13 +2693,33 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ ;;
+
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -2694,12 +2764,12 @@ netbsd*)
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -2709,7 +2779,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -2718,45 +2788,34 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd*)
+openbsd* | bitrig*)
version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
else
- shlibpath_overrides_runpath=yes
+ need_version=yes
fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
;;
os2*)
libname_spec='$name'
- shrext_cmds=".dll"
+ shrext_cmds=.dll
need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
+ library_names_spec='$libname$shared_ext $libname.a'
dynamic_linker='OS/2 ld.exe'
shlibpath_var=LIBPATH
;;
@@ -2765,11 +2824,11 @@ osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
rdos*)
@@ -2780,8 +2839,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -2791,11 +2850,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
need_lib_prefix=no
fi
need_version=yes
@@ -2803,8 +2862,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -2825,10 +2884,10 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
@@ -2837,12 +2896,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
version_type=freebsd-elf
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -2860,7 +2919,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -2868,8 +2927,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -2878,18 +2937,18 @@ uts4*)
;;
esac
AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
fi
_LT_DECL([], [variables_saved_for_relink], [1],
@@ -2931,32 +2990,32 @@ _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
# _LT_PATH_TOOL_PREFIX(TOOL)
# --------------------------
-# find a file program which can recognize shared library
+# find a file program that can recognize shared library
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
[m4_require([_LT_DECL_EGREP])dnl
AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
[case $MAGIC_CMD in
[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
ac_dummy="m4_if([$2], , $PATH, [$2])"
for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -f "$ac_dir/$1"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -2979,11 +3038,11 @@ _LT_EOF
break
fi
done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
;;
esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
AC_MSG_RESULT($MAGIC_CMD)
else
@@ -3001,7 +3060,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
# _LT_PATH_MAGIC
# --------------
-# find a file program which can recognize a shared library
+# find a file program that can recognize a shared library
m4_defun([_LT_PATH_MAGIC],
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -3028,16 +3087,16 @@ m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
AC_ARG_WITH([gnu-ld],
[AS_HELP_STRING([--with-gnu-ld],
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_ld=yes],
+ [test no = "$withval" || with_gnu_ld=yes],
[with_gnu_ld=no])dnl
ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by $CC])
case $host in
*-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
+ # gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -3051,7 +3110,7 @@ if test "$GCC" = yes; then
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
- test -z "$LD" && LD="$ac_prog"
+ test -z "$LD" && LD=$ac_prog
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -3062,37 +3121,37 @@ if test "$GCC" = yes; then
with_gnu_ld=unknown
;;
esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(lt_cv_path_LD,
[if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD=$ac_dir/$ac_prog
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
+ test no != "$with_gnu_ld" && break
;;
*)
- test "$with_gnu_ld" != yes && break
+ test yes != "$with_gnu_ld" && break
;;
esac
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
fi])
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
@@ -3146,13 +3205,13 @@ esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- if test "$GCC" != yes; then
+ if test yes != "$GCC"; then
reload_cmds=false
fi
;;
darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
@@ -3178,13 +3237,13 @@ lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
case $host_os in
aix[[4-9]]*)
@@ -3211,8 +3270,7 @@ mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
- # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
- if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ if ( file / ) >/dev/null 2>&1; then
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -3248,10 +3306,6 @@ freebsd* | dragonfly*)
fi
;;
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
haiku*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3290,7 +3344,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3312,8 +3366,8 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
@@ -3406,33 +3460,33 @@ AC_DEFUN([LT_PATH_NM],
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
- lt_cv_path_NM="$NM"
+ lt_cv_path_NM=$NM
else
- lt_nm_to_check="${ac_tool_prefix}nm"
+ lt_nm_to_check=${ac_tool_prefix}nm
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
# Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
*/dev/null* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
- break
+ break 2
;;
*)
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
- break
+ break 2
;;
*)
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -3443,21 +3497,21 @@ else
esac
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
done
: ${lt_cv_path_NM=no}
fi])
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
else
# Didn't find any BSD compatible name lister, look for dumpbin.
if test -n "$DUMPBIN"; then :
# Let the user override the test.
else
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
- case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
*COFF*)
- DUMPBIN="$DUMPBIN -symbols"
+ DUMPBIN="$DUMPBIN -symbols -headers"
;;
*)
DUMPBIN=:
@@ -3465,8 +3519,8 @@ else
esac
fi
AC_SUBST([DUMPBIN])
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
fi
fi
test -z "$NM" && NM=nm
@@ -3512,8 +3566,8 @@ lt_cv_sharedlib_from_linklib_cmd,
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # two different shell functions defined in ltmain.sh
- # decide which to use based on capabilities of $DLLTOOL
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
*--identify-strict*)
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -3525,7 +3579,7 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
*)
# fallback: assume linklib IS sharedlib
- lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
;;
esac
])
@@ -3552,13 +3606,28 @@ AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool
lt_cv_path_mainfest_tool=yes
fi
rm -f conftest*])
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
+if test yes != "$lt_cv_path_mainfest_tool"; then
MANIFEST_TOOL=:
fi
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
])# _LT_PATH_MANIFEST_TOOL
+# _LT_DLL_DEF_P([FILE])
+# ---------------------
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with func_dll_def_p in the libtool script
+AC_DEFUN([_LT_DLL_DEF_P],
+[dnl
+ test DEF = "`$SED -n dnl
+ -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
+ -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
+ -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
+ -e q dnl Only consider the first "real" line
+ $1`" dnl
+])# _LT_DLL_DEF_P
+
+
# LT_LIB_M
# --------
# check for math library
@@ -3570,11 +3639,11 @@ case $host in
# These system don't have libm, or don't need it
;;
*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
;;
*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
+ AC_CHECK_LIB(m, cos, LIBM=-lm)
;;
esac
AC_SUBST([LIBM])
@@ -3593,7 +3662,7 @@ m4_defun([_LT_COMPILER_NO_RTTI],
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
case $cc_basename in
nvcc*)
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
@@ -3645,7 +3714,7 @@ cygwin* | mingw* | pw32* | cegcc*)
symcode='[[ABCDGISTW]]'
;;
hpux*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
symcode='[[ABCDEGRST]]'
fi
;;
@@ -3678,14 +3747,44 @@ case `$NM -V 2>&1` in
symcode='[[ABCDGIRSTW]]' ;;
esac
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
# Handle CRLF in mingw tool chain
opt_cr=
@@ -3703,21 +3802,24 @@ for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
# Also find C++ and __fastcall symbols from MSVC++,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK ['"\
" {last_section=section; section=\$ 3};"\
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx]"
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -3757,11 +3859,11 @@ _LT_EOF
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT@&t@_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT@&t@_DLSYM_CONST
#else
@@ -3787,7 +3889,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] =
{
{ "@PROGRAM@", (void *) 0 },
_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cat <<\_LT_EOF >> conftest.$ac_ext
{0, (void *) 0}
};
@@ -3807,9 +3909,9 @@ _LT_EOF
mv conftest.$ac_objext conftstm.$ac_objext
lt_globsym_save_LIBS=$LIBS
lt_globsym_save_CFLAGS=$CFLAGS
- LIBS="conftstm.$ac_objext"
+ LIBS=conftstm.$ac_objext
CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
pipe_works=yes
fi
LIBS=$lt_globsym_save_LIBS
@@ -3830,7 +3932,7 @@ _LT_EOF
rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
+ if test yes = "$pipe_works"; then
break
else
lt_cv_sys_global_symbol_pipe=
@@ -3857,12 +3959,16 @@ _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
[Take the output of nm and produce a listing of raw symbols and C names])
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
[Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
+ [Transform the output of nm into a list of symbols to manually relocate])
_LT_DECL([global_symbol_to_c_name_address],
[lt_cv_sys_global_symbol_to_c_name_address], [1],
[Transform the output of nm in a C name address pair])
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
[Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
+ [The name lister interface])
_LT_DECL([], [nm_file_list_spec], [1],
[Specify filename containing input files for $NM])
]) # _LT_CMD_GLOBAL_SYMBOLS
@@ -3878,17 +3984,18 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)=
m4_if([$1], [CXX], [
# C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
fi
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
amigaos*)
@@ -3899,8 +4006,8 @@ m4_if([$1], [CXX], [
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -3965,7 +4072,7 @@ m4_if([$1], [CXX], [
case $host_os in
aix[[4-9]]*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
else
@@ -4006,14 +4113,14 @@ m4_if([$1], [CXX], [
case $cc_basename in
CC*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ if test ia64 != "$host_cpu"; then
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
fi
;;
aCC*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
case $host_cpu in
hppa*64*|ia64*)
# +Z the default
@@ -4042,7 +4149,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -4050,7 +4157,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
+ # old Intel C++ for x86_64, which still supported -KPIC.
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
@@ -4195,17 +4302,18 @@ m4_if([$1], [CXX], [
fi
],
[
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
fi
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
amigaos*)
@@ -4216,8 +4324,8 @@ m4_if([$1], [CXX], [
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -4304,7 +4412,7 @@ m4_if([$1], [CXX], [
case $host_os in
aix*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
else
@@ -4312,6 +4420,20 @@ m4_if([$1], [CXX], [
fi
;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+
mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
@@ -4332,7 +4454,7 @@ m4_if([$1], [CXX], [
;;
esac
# Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
;;
irix5* | irix6* | nonstopux*)
@@ -4341,9 +4463,9 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
+ # old Intel for x86_64, which still supported -KPIC.
ecc*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4368,6 +4490,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
@@ -4465,7 +4593,7 @@ m4_if([$1], [CXX], [
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
fi
@@ -4494,7 +4622,7 @@ m4_if([$1], [CXX], [
fi
])
case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
+ # For platforms that do not support PIC, -DPIC is meaningless:
*djgpp*)
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
;;
@@ -4570,7 +4698,7 @@ m4_if([$1], [CXX], [
fi
;;
pw32*)
- _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
@@ -4616,9 +4744,9 @@ m4_if([$1], [CXX], [
# included in the symbol list
_LT_TAGVAR(include_expsyms, $1)=
# exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
@@ -4634,7 +4762,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
- if test "$GCC" != yes; then
+ if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
@@ -4642,7 +4770,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
- openbsd*)
+ openbsd* | bitrig*)
with_gnu_ld=no
;;
esac
@@ -4652,7 +4780,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
# On some targets, GNU ld is compatible enough with the native linker
# that we're better off using the native interface for both.
lt_use_gnu_ld_interface=no
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
case $host_os in
aix*)
# The AIX port of GNU ld has always aspired to compatibility
@@ -4674,24 +4802,24 @@ dnl Note also adjust exclude_expsyms for C++ above.
esac
fi
- if test "$lt_use_gnu_ld_interface" = yes; then
+ if test yes = "$lt_use_gnu_ld_interface"; then
# If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
+ wlarc='$wl'
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=
fi
supports_anon_versioning=no
- case `$LD -v 2>&1` in
+ case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -4704,7 +4832,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
case $host_os in
aix[[3-9]]*)
# On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
+ if test ia64 != "$host_cpu"; then
_LT_TAGVAR(ld_shlibs, $1)=no
cat <<_LT_EOF 1>&2
@@ -4723,7 +4851,7 @@ _LT_EOF
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)=''
;;
m68k)
@@ -4739,7 +4867,7 @@ _LT_EOF
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
@@ -4749,7 +4877,7 @@ _LT_EOF
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=no
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -4757,61 +4885,61 @@ _LT_EOF
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
haiku*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
_LT_TAGVAR(link_all_deplibs, $1)=yes
;;
interix[[3-9]]*)
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
+ if test linux-dietlibc = "$host_os"; then
case $cc_basename in
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
esac
fi
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
+ && test no = "$tmp_diet"
then
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group f77 and f90 compilers
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
@@ -4822,42 +4950,44 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
_LT_TAGVAR(whole_archive_flag_spec, $1)=
tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
tmp_addflag= ;;
nvcc*) # Cuda Compiler Driver 2.2
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
_LT_TAGVAR(compiler_needs_object, $1)=yes
;;
esac
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*) # Sun C 5.9
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
_LT_TAGVAR(compiler_needs_object, $1)=yes
tmp_sharedflag='-G' ;;
*Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;;
esac
- _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
;;
esac
@@ -4871,8 +5001,8 @@ _LT_EOF
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -4890,8 +5020,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
@@ -4903,7 +5033,7 @@ _LT_EOF
_LT_TAGVAR(ld_shlibs, $1)=no
cat <<_LT_EOF 1>&2
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
*** reliably create shared libraries on SCO systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
@@ -4918,9 +5048,9 @@ _LT_EOF
# DT_RUNPATH tag from executables and libraries. But doing so
# requires that you compile everything twice, which is a pain.
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
@@ -4937,15 +5067,15 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
esac
- if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
runpath_var=
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
@@ -4961,7 +5091,7 @@ _LT_EOF
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
_LT_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
_LT_TAGVAR(hardcode_direct, $1)=unsupported
@@ -4969,12 +5099,12 @@ _LT_EOF
;;
aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=""
+ no_entry_flag=
else
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
@@ -4992,7 +5122,7 @@ _LT_EOF
# need to do runtime linking.
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
aix_use_runtimelinking=yes
break
fi
@@ -5015,13 +5145,13 @@ _LT_EOF
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+ _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
case $host_os in aix4.[[012]]|aix4.[[012]].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
+ collect2name=`$CC -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -5040,61 +5170,61 @@ _LT_EOF
;;
esac
shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
fi
else
# not using gcc
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
else
- shared_flag='${wl}-bM:SRE'
+ shared_flag='$wl-bM:SRE'
fi
fi
fi
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
_LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
+ if test yes = "$aix_use_runtimelinking"; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
_LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ if test ia64 = "$host_cpu"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
_LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
# We only use this code for GNU lds that support --whole-archive.
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
fi
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
# This is similar to how AIX traditionally builds its shared libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $wl-bnoentry $compiler_flags $wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
@@ -5103,7 +5233,7 @@ _LT_EOF
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)=''
;;
m68k)
@@ -5133,16 +5263,17 @@ _LT_EOF
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
- else
- sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -5151,18 +5282,18 @@ _LT_EOF
# Don't use ranlib
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile="$lt_outputfile.exe"
- lt_tool_outputfile="$lt_tool_outputfile.exe"
- ;;
- esac~
- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# Assume MSVC wrapper
@@ -5171,7 +5302,7 @@ _LT_EOF
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
@@ -5221,33 +5352,33 @@ _LT_EOF
;;
hpux9*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
else
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(hardcode_direct, $1)=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
_LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
;;
hpux10*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
_LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -5255,25 +5386,25 @@ _LT_EOF
;;
hpux11*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ if test yes,no = "$GCC,$with_gnu_ld"; then
case $host_cpu in
hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
m4_if($1, [], [
@@ -5281,14 +5412,14 @@ _LT_EOF
# (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
_LT_LINKER_OPTION([if $CC understands -b],
_LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
- [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
[_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
- [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
;;
esac
fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
case $host_cpu in
@@ -5299,7 +5430,7 @@ _LT_EOF
*)
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
@@ -5310,16 +5441,16 @@ _LT_EOF
;;
irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
# Try to use the -exported_symbol ld option, if it does not
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
# This should be the same for all languages, so no per-tag cache variable.
AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
[lt_cv_irix_exported_symbol],
- [save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ [save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
AC_LINK_IFELSE(
[AC_LANG_SOURCE(
[AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
@@ -5332,16 +5463,16 @@ _LT_EOF
end]])])],
[lt_cv_irix_exported_symbol=yes],
[lt_cv_irix_exported_symbol=no])
- LDFLAGS="$save_LDFLAGS"])
- if test "$lt_cv_irix_exported_symbol" = yes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ LDFLAGS=$save_LDFLAGS])
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
fi
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(inherit_rpath, $1)=yes
_LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -5361,7 +5492,7 @@ _LT_EOF
newsos6)
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
_LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
@@ -5369,27 +5500,19 @@ _LT_EOF
*nto* | *qnx*)
;;
- openbsd*)
+ openbsd* | bitrig*)
if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
fi
else
_LT_TAGVAR(ld_shlibs, $1)=no
@@ -5405,28 +5528,28 @@ _LT_EOF
;;
osf3*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
else
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
fi
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
else
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
# Both c and cxx compiler support -rpath directly
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -5437,24 +5560,24 @@ _LT_EOF
solaris*)
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
wlarc=''
- _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
;;
*)
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ wlarc='$wl'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
;;
esac
fi
@@ -5464,11 +5587,11 @@ _LT_EOF
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
# but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
else
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
fi
@@ -5478,10 +5601,10 @@ _LT_EOF
;;
sunos4*)
- if test "x$host_vendor" = xsequent; then
+ if test sequent = "$host_vendor"; then
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
else
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -5530,43 +5653,43 @@ _LT_EOF
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
runpath_var='LD_RUN_PATH'
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
+ # Note: We CANNOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
runpath_var='LD_RUN_PATH'
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
@@ -5581,17 +5704,17 @@ _LT_EOF
;;
esac
- if test x$host_vendor = xsni; then
+ if test sni = "$host_vendor"; then
case $host in
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
;;
esac
fi
fi
])
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
@@ -5608,7 +5731,7 @@ x|xyes)
# Assume -lc should be added
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- if test "$enable_shared" = yes && test "$GCC" = yes; then
+ if test yes,yes = "$GCC,$enable_shared"; then
case $_LT_TAGVAR(archive_cmds, $1) in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -5688,12 +5811,12 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
[Whether we need a single "-rpath" flag with a separated argument])
_LT_TAGDECL([], [hardcode_direct], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
DIR into the resulting binary])
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ "absolute", i.e impossible to change by setting $shlibpath_var if the
library is relocated])
_LT_TAGDECL([], [hardcode_minus_L], [0],
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
@@ -5734,10 +5857,10 @@ dnl [Compiler flag to generate thread safe objects])
# ------------------------
# Ensure that the configuration variables for a C compiler are suitably
# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
m4_defun([_LT_LANG_C_CONFIG],
[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
+lt_save_CC=$CC
AC_LANG_PUSH(C)
# Source file extension for C test sources.
@@ -5773,18 +5896,18 @@ if test -n "$compiler"; then
LT_SYS_DLOPEN_SELF
_LT_CMD_STRIPLIB
- # Report which library types will actually be built
+ # Report what library types will actually be built
AC_MSG_CHECKING([if libtool supports shared libraries])
AC_MSG_RESULT([$can_build_shared])
AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
+ test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test "$enable_shared" = yes && enable_static=no
+ test yes = "$enable_shared" && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
@@ -5792,8 +5915,8 @@ if test -n "$compiler"; then
;;
aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
+ if test ia64 != "$host_cpu" && test no = "$aix_use_runtimelinking"; then
+ test yes = "$enable_shared" && enable_static=no
fi
;;
esac
@@ -5801,13 +5924,13 @@ if test -n "$compiler"; then
AC_MSG_CHECKING([whether to build static libraries])
# Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
+ test yes = "$enable_shared" || enable_static=yes
AC_MSG_RESULT([$enable_static])
_LT_CONFIG($1)
fi
AC_LANG_POP
-CC="$lt_save_CC"
+CC=$lt_save_CC
])# _LT_LANG_C_CONFIG
@@ -5815,14 +5938,14 @@ CC="$lt_save_CC"
# --------------------------
# Ensure that the configuration variables for a C++ compiler are suitably
# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
m4_defun([_LT_LANG_CXX_CONFIG],
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
m4_require([_LT_DECL_EGREP])dnl
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
+if test -n "$CXX" && ( test no != "$CXX" &&
+ ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+ (test g++ != "$CXX"))); then
AC_PROG_CXXCPP
else
_lt_caught_CXX_error=yes
@@ -5864,7 +5987,7 @@ _LT_TAGVAR(objext, $1)=$objext
# the CXX compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
+if test yes != "$_lt_caught_CXX_error"; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;"
@@ -5906,35 +6029,35 @@ if test "$_lt_caught_CXX_error" != yes; then
if test -n "$compiler"; then
# We don't want -fno-exception when compiling C++ code, so set the
# no_builtin_flag separately
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
else
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
fi
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
# Set up default GNU C++ configuration
LT_PATH_LD
# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ if test yes = "$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
# If archive_cmds runs LD, not CC, wlarc should be empty
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
# investigate it a little bit more. (MM)
- wlarc='${wl}'
+ wlarc='$wl'
# ancient GNU ld didn't support --whole-archive et. al.
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
$GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=
fi
@@ -5970,12 +6093,12 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=no
;;
aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=""
+ no_entry_flag=
else
aix_use_runtimelinking=no
@@ -6009,13 +6132,13 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+ _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
case $host_os in aix4.[[012]]|aix4.[[012]].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
+ collect2name=`$CC -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -6033,56 +6156,56 @@ if test "$_lt_caught_CXX_error" != yes; then
fi
esac
shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag=$shared_flag' $wl-G'
fi
else
# not using gcc
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
else
- shared_flag='${wl}-bM:SRE'
+ shared_flag='$wl-bM:SRE'
fi
fi
fi
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to
# export.
_LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
+ if test yes = "$aix_use_runtimelinking"; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
# Determine the default libpath from the value encoded in an empty
# executable.
_LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ if test ia64 = "$host_cpu"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
_LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
# We only use this code for GNU lds that support --whole-archive.
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
@@ -6090,7 +6213,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
# This is similar to how AIX traditionally builds its shared
# libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $wl-bnoentry $compiler_flags $wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
@@ -6100,7 +6223,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
@@ -6128,57 +6251,58 @@ if test "$_lt_caught_CXX_error" != yes; then
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
- else
- $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
# Don't use ranlib
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile="$lt_outputfile.exe"
- lt_tool_outputfile="$lt_tool_outputfile.exe"
- ;;
- esac~
- func_to_tool_file "$lt_outputfile"~
- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# g++
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=no
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
@@ -6223,18 +6347,15 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=yes
;;
- gnu*)
- ;;
-
haiku*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
_LT_TAGVAR(link_all_deplibs, $1)=yes
;;
hpux9*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
# but as the default
@@ -6246,7 +6367,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=no
;;
aCC*)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -6255,11 +6376,11 @@ if test "$_lt_caught_CXX_error" != yes; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test "$GXX" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ if test yes = "$GXX"; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
else
# FIXME: insert proper C++ library support
_LT_TAGVAR(ld_shlibs, $1)=no
@@ -6269,15 +6390,15 @@ if test "$_lt_caught_CXX_error" != yes; then
;;
hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
case $host_cpu in
hppa*64*|ia64*)
;;
*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
;;
esac
fi
@@ -6303,13 +6424,13 @@ if test "$_lt_caught_CXX_error" != yes; then
aCC*)
case $host_cpu in
hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
esac
# Commands to make compiler produce verbose output that lists
@@ -6320,20 +6441,20 @@ if test "$_lt_caught_CXX_error" != yes; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
case $host_cpu in
hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
esac
fi
@@ -6348,22 +6469,22 @@ if test "$_lt_caught_CXX_error" != yes; then
interix[[3-9]]*)
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
irix5* | irix6*)
case $cc_basename in
CC*)
# SGI C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
# Archives containing C++ object files must be created using
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
@@ -6372,22 +6493,22 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
;;
*)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
fi
fi
_LT_TAGVAR(link_all_deplibs, $1)=yes
;;
esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(inherit_rpath, $1)=yes
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -6395,8 +6516,8 @@ if test "$_lt_caught_CXX_error" != yes; then
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -6405,10 +6526,10 @@ if test "$_lt_caught_CXX_error" != yes; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
# Archives containing C++ object files must be created using
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -6422,59 +6543,59 @@ if test "$_lt_caught_CXX_error" != yes; then
# earlier do not add the objects themselves.
case `$CC -V 2>&1` in
*"Version 7."*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
*) # Version 8.0 or newer
tmp_idyn=
case $host_cpu in
ia64*) tmp_idyn=' -i_dynamic';;
esac
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
esac
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
;;
pgCC* | pgcpp*)
# Portland Group C++ compiler
case `$CC -V` in
*pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
- $RANLIB $oldlib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
*) # Version 6 and above use weak symbols
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
;;
cxx*)
# Compaq C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
runpath_var=LD_RUN_PATH
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -6488,18 +6609,18 @@ if test "$_lt_caught_CXX_error" != yes; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
;;
xl* | mpixl* | bgxl*)
# IBM XL 8.0 on PPC, with GNU ld
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
;;
*)
@@ -6507,10 +6628,10 @@ if test "$_lt_caught_CXX_error" != yes; then
*Sun\ C*)
# Sun C++ 5.9
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
_LT_TAGVAR(compiler_needs_object, $1)=yes
# Not sure whether something based on
@@ -6568,22 +6689,17 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=yes
;;
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- openbsd*)
+ openbsd* | bitrig*)
if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
fi
output_verbose_link_cmd=func_echo_all
else
@@ -6599,9 +6715,9 @@ if test "$_lt_caught_CXX_error" != yes; then
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
# Archives containing C++ object files must be created using
@@ -6619,17 +6735,17 @@ if test "$_lt_caught_CXX_error" != yes; then
cxx*)
case $host in
osf3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
;;
*)
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+ $RM $lib.exp'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
;;
esac
@@ -6644,21 +6760,21 @@ if test "$_lt_caught_CXX_error" != yes; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
case $host in
osf3*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
;;
esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
# Commands to make compiler produce verbose output that lists
@@ -6704,9 +6820,9 @@ if test "$_lt_caught_CXX_error" != yes; then
# Sun C++ 4.2, 5.x and Centerline C++
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -6714,7 +6830,7 @@ if test "$_lt_caught_CXX_error" != yes; then
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
+ # but understands '-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
;;
@@ -6731,30 +6847,30 @@ if test "$_lt_caught_CXX_error" != yes; then
;;
gcx*)
# Green Hills C++ Compiler
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
# The C++ compiler must be used to create the archive.
_LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
;;
*)
# GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # g++ 2.7 appears to require '-G' NOT '-shared' on this
# platform.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
@@ -6762,11 +6878,11 @@ if test "$_lt_caught_CXX_error" != yes; then
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
;;
esac
fi
@@ -6775,52 +6891,52 @@ if test "$_lt_caught_CXX_error" != yes; then
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
runpath_var='LD_RUN_PATH'
case $cc_basename in
CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
+ # Note: We CANNOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
runpath_var='LD_RUN_PATH'
case $cc_basename in
CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
- '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ '"$_LT_TAGVAR(old_archive_cmds, $1)"
_LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
- '"$_LT_TAGVAR(reload_cmds, $1)"
+ '"$_LT_TAGVAR(reload_cmds, $1)"
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
;;
@@ -6851,10 +6967,10 @@ if test "$_lt_caught_CXX_error" != yes; then
esac
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
- test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+ test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
- _LT_TAGVAR(GCC, $1)="$GXX"
- _LT_TAGVAR(LD, $1)="$LD"
+ _LT_TAGVAR(GCC, $1)=$GXX
+ _LT_TAGVAR(LD, $1)=$LD
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
@@ -6881,7 +6997,7 @@ if test "$_lt_caught_CXX_error" != yes; then
lt_cv_path_LD=$lt_save_path_LD
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
+fi # test yes != "$_lt_caught_CXX_error"
AC_LANG_POP
])# _LT_LANG_CXX_CONFIG
@@ -6903,9 +7019,9 @@ AC_REQUIRE([_LT_DECL_SED])
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
func_stripname_cnf ()
{
- case ${2} in
- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ case @S|@2 in
+ .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
+ *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
esac
} # func_stripname_cnf
])# _LT_FUNC_STRIPNAME_CNF
@@ -6993,13 +7109,13 @@ if AC_TRY_EVAL(ac_compile); then
pre_test_object_deps_done=no
for p in `eval "$output_verbose_link_cmd"`; do
- case ${prev}${p} in
+ case $prev$p in
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
# Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
+ if test x-L = "$p" ||
+ test x-R = "$p"; then
prev=$p
continue
fi
@@ -7015,16 +7131,16 @@ if AC_TRY_EVAL(ac_compile); then
case $p in
=*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
esac
- if test "$pre_test_object_deps_done" = no; then
- case ${prev} in
+ if test no = "$pre_test_object_deps_done"; then
+ case $prev in
-L | -R)
# Internal compiler library paths should come after those
# provided the user. The postdeps already come after the
# user supplied libs so there is no need to process them.
if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
else
- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
fi
;;
# The "-l" case would never come before the object being
@@ -7032,9 +7148,9 @@ if AC_TRY_EVAL(ac_compile); then
esac
else
if test -z "$_LT_TAGVAR(postdeps, $1)"; then
- _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ _LT_TAGVAR(postdeps, $1)=$prev$p
else
- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
fi
fi
prev=
@@ -7049,15 +7165,15 @@ if AC_TRY_EVAL(ac_compile); then
continue
fi
- if test "$pre_test_object_deps_done" = no; then
+ if test no = "$pre_test_object_deps_done"; then
if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
- _LT_TAGVAR(predep_objects, $1)="$p"
+ _LT_TAGVAR(predep_objects, $1)=$p
else
_LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
fi
else
if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
- _LT_TAGVAR(postdep_objects, $1)="$p"
+ _LT_TAGVAR(postdep_objects, $1)=$p
else
_LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
fi
@@ -7104,7 +7220,7 @@ linux*)
;;
esac
- if test "$solaris_use_stlport4" != yes; then
+ if test yes != "$solaris_use_stlport4"; then
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
fi
;;
@@ -7127,7 +7243,7 @@ solaris*)
# Adding this requires a known-good setup of shared libraries for
# Sun compiler versions before 5.6, else PIC objects from an old
# archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
+ if test yes != "$solaris_use_stlport4"; then
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
fi
;;
@@ -7141,7 +7257,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in
esac
_LT_TAGVAR(compiler_lib_search_dirs, $1)=
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
fi
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
[The directories searched by this compiler when creating a shared library])
@@ -7161,10 +7277,10 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
# --------------------------
# Ensure that the configuration variables for a Fortran 77 compiler are
# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
m4_defun([_LT_LANG_F77_CONFIG],
[AC_LANG_PUSH(Fortran 77)
-if test -z "$F77" || test "X$F77" = "Xno"; then
+if test -z "$F77" || test no = "$F77"; then
_lt_disable_F77=yes
fi
@@ -7201,7 +7317,7 @@ _LT_TAGVAR(objext, $1)=$objext
# the F77 compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
+if test yes != "$_lt_disable_F77"; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="\
subroutine t
@@ -7223,7 +7339,7 @@ if test "$_lt_disable_F77" != yes; then
_LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
+ lt_save_CC=$CC
lt_save_GCC=$GCC
lt_save_CFLAGS=$CFLAGS
CC=${F77-"f77"}
@@ -7237,21 +7353,21 @@ if test "$_lt_disable_F77" != yes; then
AC_MSG_RESULT([$can_build_shared])
AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
+ test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test "$enable_shared" = yes && enable_static=no
+ test yes = "$enable_shared" && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
fi
;;
aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
+ if test ia64 != "$host_cpu" && test no = "$aix_use_runtimelinking"; then
+ test yes = "$enable_shared" && enable_static=no
fi
;;
esac
@@ -7259,11 +7375,11 @@ if test "$_lt_disable_F77" != yes; then
AC_MSG_CHECKING([whether to build static libraries])
# Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
+ test yes = "$enable_shared" || enable_static=yes
AC_MSG_RESULT([$enable_static])
- _LT_TAGVAR(GCC, $1)="$G77"
- _LT_TAGVAR(LD, $1)="$LD"
+ _LT_TAGVAR(GCC, $1)=$G77
+ _LT_TAGVAR(LD, $1)=$LD
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
@@ -7280,9 +7396,9 @@ if test "$_lt_disable_F77" != yes; then
fi # test -n "$compiler"
GCC=$lt_save_GCC
- CC="$lt_save_CC"
- CFLAGS="$lt_save_CFLAGS"
-fi # test "$_lt_disable_F77" != yes
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_F77"
AC_LANG_POP
])# _LT_LANG_F77_CONFIG
@@ -7292,11 +7408,11 @@ AC_LANG_POP
# -------------------------
# Ensure that the configuration variables for a Fortran compiler are
# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
m4_defun([_LT_LANG_FC_CONFIG],
[AC_LANG_PUSH(Fortran)
-if test -z "$FC" || test "X$FC" = "Xno"; then
+if test -z "$FC" || test no = "$FC"; then
_lt_disable_FC=yes
fi
@@ -7333,7 +7449,7 @@ _LT_TAGVAR(objext, $1)=$objext
# the FC compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
+if test yes != "$_lt_disable_FC"; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="\
subroutine t
@@ -7355,7 +7471,7 @@ if test "$_lt_disable_FC" != yes; then
_LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
+ lt_save_CC=$CC
lt_save_GCC=$GCC
lt_save_CFLAGS=$CFLAGS
CC=${FC-"f95"}
@@ -7371,21 +7487,21 @@ if test "$_lt_disable_FC" != yes; then
AC_MSG_RESULT([$can_build_shared])
AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
+ test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test "$enable_shared" = yes && enable_static=no
+ test yes = "$enable_shared" && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
fi
;;
aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
+ if test ia64 != "$host_cpu" && test no = "$aix_use_runtimelinking"; then
+ test yes = "$enable_shared" && enable_static=no
fi
;;
esac
@@ -7393,11 +7509,11 @@ if test "$_lt_disable_FC" != yes; then
AC_MSG_CHECKING([whether to build static libraries])
# Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
+ test yes = "$enable_shared" || enable_static=yes
AC_MSG_RESULT([$enable_static])
- _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
- _LT_TAGVAR(LD, $1)="$LD"
+ _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
+ _LT_TAGVAR(LD, $1)=$LD
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
@@ -7417,7 +7533,7 @@ if test "$_lt_disable_FC" != yes; then
GCC=$lt_save_GCC
CC=$lt_save_CC
CFLAGS=$lt_save_CFLAGS
-fi # test "$_lt_disable_FC" != yes
+fi # test yes != "$_lt_disable_FC"
AC_LANG_POP
])# _LT_LANG_FC_CONFIG
@@ -7427,7 +7543,7 @@ AC_LANG_POP
# --------------------------
# Ensure that the configuration variables for the GNU Java Compiler compiler
# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
m4_defun([_LT_LANG_GCJ_CONFIG],
[AC_REQUIRE([LT_PROG_GCJ])dnl
AC_LANG_SAVE
@@ -7461,7 +7577,7 @@ CC=${GCJ-"gcj"}
CFLAGS=$GCJFLAGS
compiler=$CC
_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
+_LT_TAGVAR(LD, $1)=$LD
_LT_CC_BASENAME([$compiler])
# GCJ did not exist at the time GCC didn't implicitly link libc in.
@@ -7494,7 +7610,7 @@ CFLAGS=$lt_save_CFLAGS
# --------------------------
# Ensure that the configuration variables for the GNU Go compiler
# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
m4_defun([_LT_LANG_GO_CONFIG],
[AC_REQUIRE([LT_PROG_GO])dnl
AC_LANG_SAVE
@@ -7528,7 +7644,7 @@ CC=${GOC-"gccgo"}
CFLAGS=$GOFLAGS
compiler=$CC
_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
+_LT_TAGVAR(LD, $1)=$LD
_LT_CC_BASENAME([$compiler])
# Go did not exist at the time GCC didn't implicitly link libc in.
@@ -7561,7 +7677,7 @@ CFLAGS=$lt_save_CFLAGS
# -------------------------
# Ensure that the configuration variables for the Windows resource compiler
# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
m4_defun([_LT_LANG_RC_CONFIG],
[AC_REQUIRE([LT_PROG_RC])dnl
AC_LANG_SAVE
@@ -7577,7 +7693,7 @@ _LT_TAGVAR(objext, $1)=$objext
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
+lt_simple_link_test_code=$lt_simple_compile_test_code
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_TAG_COMPILER
@@ -7587,7 +7703,7 @@ _LT_COMPILER_BOILERPLATE
_LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
lt_save_CFLAGS=$CFLAGS
lt_save_GCC=$GCC
GCC=
@@ -7616,7 +7732,7 @@ AC_DEFUN([LT_PROG_GCJ],
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
[AC_CHECK_TOOL(GCJ, gcj,)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
AC_SUBST(GCJFLAGS)])])[]dnl
])
@@ -7725,7 +7841,7 @@ lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
# along with /bin/sed that truncates output.
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
+ test ! -f "$lt_ac_sed" && continue
cat /dev/null > conftest.in
lt_ac_count=0
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -7742,9 +7858,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
cmp -s conftest.out conftest.nl || break
# 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
+ test 10 -lt "$lt_ac_count" && break
lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
+ if test "$lt_ac_count" -gt "$lt_ac_max"; then
lt_ac_max=$lt_ac_count
lt_cv_path_SED=$lt_ac_sed
fi
@@ -7768,27 +7884,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], [])
# Find out whether the shell is Bourne or XSI compatible,
# or has some other useful features.
m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,b/c, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
lt_unset=unset
else
lt_unset=false
@@ -7812,102 +7908,9 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
])# _LT_CHECK_SHELL_FEATURES
-# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
-# ------------------------------------------------------
-# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
-# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
-m4_defun([_LT_PROG_FUNCTION_REPLACE],
-[dnl {
-sed -e '/^$1 ()$/,/^} # $1 /c\
-$1 ()\
-{\
-m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
-} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-])
-
-
-# _LT_PROG_REPLACE_SHELLFNS
-# -------------------------
-# Replace existing portable implementations of several shell functions with
-# equivalent extended shell implementations where those features are available..
-m4_defun([_LT_PROG_REPLACE_SHELLFNS],
-[if test x"$xsi_shell" = xyes; then
- _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac])
-
- _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
- func_basename_result="${1##*/}"])
-
- _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
- func_basename_result="${1##*/}"])
-
- _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}])
-
- _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
- func_split_long_opt_name=${1%%=*}
- func_split_long_opt_arg=${1#*=}])
-
- _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
- func_split_short_opt_arg=${1#??}
- func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
-
- _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac])
-
- _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
-
- _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
-
- _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
-fi
-
-if test x"$lt_shell_append" = xyes; then
- _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
-
- _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
- func_quote_for_eval "${2}"
-dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
- eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
-
- # Save a `func_append' function call where possible by direct use of '+='
- sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-else
- # Save a `func_append' function call even when '+=' is not available
- sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
- AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
-fi
-])
-
# _LT_PATH_CONVERSION_FUNCTIONS
# -----------------------------
-# Determine which file name conversion functions should be used by
+# Determine what file name conversion functions should be used by
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
# for certain cross-compile configurations and native mingw.
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
@@ -7974,15 +7977,15 @@ _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
# Helper functions for option handling. -*- Autoconf -*-
#
-# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 2004-2005, 2007-2009, 2011-2014 Free Software
+# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
-# serial 7 ltoptions.m4
+# serial 8 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -8003,7 +8006,7 @@ m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
- [m4_warning([Unknown $1 option `$2'])])[]dnl
+ [m4_warning([Unknown $1 option '$2'])])[]dnl
])
@@ -8049,13 +8052,13 @@ m4_if([$1],[LT_INIT],[
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
- dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
- [_LT_ENABLE_FAST_INSTALL])
+ [_LT_ENABLE_FAST_INSTALL])
])
])# _LT_SET_OPTIONS
@@ -8083,7 +8086,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
+put the 'dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
@@ -8119,7 +8122,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
+put the 'win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
@@ -8128,9 +8131,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+# implement the --enable-shared flag, and supports the 'shared' and
+# 'disable-shared' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
@@ -8143,14 +8146,14 @@ AC_ARG_ENABLE([shared],
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
@@ -8182,9 +8185,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+# implement the --enable-static flag, and support the 'static' and
+# 'disable-static' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
@@ -8197,14 +8200,14 @@ AC_ARG_ENABLE([static],
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
@@ -8236,9 +8239,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+# implement the --enable-fast-install flag, and support the 'fast-install'
+# and 'disable-fast-install' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
@@ -8251,14 +8254,14 @@ AC_ARG_ENABLE([fast-install],
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
@@ -8275,14 +8278,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
+the 'fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
+the 'disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
@@ -8292,9 +8295,9 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_PIC([MODE])
# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
# LT_INIT options.
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
@@ -8305,19 +8308,17 @@ m4_define([_LT_WITH_PIC],
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac],
- [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+ [pic_mode=m4_default([$1], [default])])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
@@ -8330,7 +8331,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
+put the 'pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
@@ -8353,7 +8354,8 @@ LT_OPTION_DEFINE([LTDL_INIT], [convenience],
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004-2005, 2007-2008, 2011-2014 Free Software
+# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -8386,7 +8388,7 @@ m4_define([_lt_join],
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
+# Autoconf-2.59, which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
@@ -8397,7 +8399,7 @@ m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
@@ -8477,7 +8479,7 @@ m4_define([lt_dict_filter],
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011-2014 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -8486,22 +8488,23 @@ m4_define([lt_dict_filter],
# @configure_input@
-# serial 3337 ltversion.m4
+# serial 4092 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4.2])
-m4_define([LT_PACKAGE_REVISION], [1.3337])
+m4_define([LT_PACKAGE_VERSION], [2.4.2.444.28-053d])
+m4_define([LT_PACKAGE_REVISION], [2.4.2.444.28])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.2'
-macro_revision='1.3337'
+[macro_version='2.4.2.444.28-053d'
+macro_revision='2.4.2.444.28'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
-# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2014 Free Software
+# Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
@@ -8512,7 +8515,7 @@ _LT_DECL(, macro_revision, 0)
# These exist entirely to fool aclocal when bootstrapping libtool.
#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
@@ -8526,7 +8529,7 @@ _LT_DECL(, macro_revision, 0)
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
@@ -8599,3 +8602,4 @@ m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
m4_include([ft-munmap.m4])
+m4_include([pkg.m4])
diff --git a/builds/unix/config.guess b/builds/unix/config.guess
index d622a44..6c32c86 100755
--- a/builds/unix/config.guess
+++ b/builds/unix/config.guess
@@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2012-02-10'
+timestamp='2014-11-04'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-02-10'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches to <config-patches@gnu.org>.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -54,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -560,8 +579,9 @@ EOF
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
@@ -801,10 +821,13 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- i*:MSYS*:*)
+ *:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
@@ -852,21 +875,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -879,59 +902,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -950,54 +968,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1201,6 +1228,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1227,19 +1257,31 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1256,7 +1298,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1330,157 +1372,6 @@ EOF
exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
cat >&2 <<EOF
$0: unable to guess system type
diff --git a/builds/unix/config.sub b/builds/unix/config.sub
index c894da4..7ffe373 100755
--- a/builds/unix/config.sub
+++ b/builds/unix/config.sub
@@ -1,24 +1,18 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2012-02-10'
+timestamp='2014-12-03'
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 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.
+# 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, see <http://www.gnu.org/licenses/>.
@@ -26,11 +20,12 @@ timestamp='2012-02-10'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -123,7 +116,7 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
@@ -156,7 +149,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -225,6 +218,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
@@ -253,10 +252,12 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | be32 | be64 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
@@ -264,10 +265,11 @@ case $basic_machine in
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -281,23 +283,26 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | open8 \
- | or32 \
+ | open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
+ | riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
@@ -308,6 +313,7 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -322,7 +328,10 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -364,13 +373,13 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -379,11 +388,13 @@ case $basic_machine in
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -397,18 +408,22 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
@@ -426,6 +441,7 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
+ | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -763,6 +779,9 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
@@ -782,11 +801,15 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -814,6 +837,10 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -822,7 +849,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-msys
;;
mvs)
@@ -1013,7 +1040,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1340,29 +1371,29 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1486,9 +1517,6 @@ case $os in
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
@@ -1537,6 +1565,12 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
tic54x-*)
os=-coff
;;
diff --git a/builds/unix/configure b/builds/unix/configure
index 7d2eb89..08357a9 100755
--- a/builds/unix/configure
+++ b/builds/unix/configure
@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for FreeType 2.4.9.
+# Generated by GNU Autoconf 2.69 for FreeType 2.5.5.
#
# Report bugs to <freetype@nongnu.org>.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -169,12 +192,12 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1
test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
@@ -182,7 +205,8 @@ test \$(( 1 + 1 )) = 2 || exit 1
ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
PATH=/empty FPATH=/empty; export PATH FPATH
test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
- || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
if (eval "$as_required") 2>/dev/null; then :
as_have_required=yes
else
@@ -222,21 +246,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -339,6 +367,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -460,6 +496,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -494,16 +534,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -515,28 +555,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -570,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='FreeType'
PACKAGE_TARNAME='freetype'
-PACKAGE_VERSION='2.4.9'
-PACKAGE_STRING='FreeType 2.4.9'
+PACKAGE_VERSION='2.5.5'
+PACKAGE_STRING='FreeType 2.5.5'
PACKAGE_BUGREPORT='freetype@nongnu.org'
PACKAGE_URL=''
@@ -618,6 +638,27 @@ LIBOBJS
build_libtool_libs
wl
hardcode_libdir_flag_spec
+LIBSSTATIC_CONFIG
+LIBS_PRIVATE
+REQUIRES_PRIVATE
+ftmac_c
+HARFBUZZ_LIBS
+HARFBUZZ_CFLAGS
+LIBPNG_LIBS
+LIBPNG_CFLAGS
+BZIP2_LIBS
+BZIP2_CFLAGS
+ZLIB_LIBS
+ZLIB_CFLAGS
+XX_ANSIFLAGS
+XX_CFLAGS
+FTSYS_SRC
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+RMDIR
+EXEEXT_BUILD
+CC_BUILD
OTOOL64
OTOOL
LIPO
@@ -635,28 +676,16 @@ ac_ct_DUMPBIN
DUMPBIN
LD
FGREP
+EGREP
+GREP
SED
LIBTOOL
OBJDUMP
DLLTOOL
AS
-SYSTEM_ZLIB
-FT2_EXTRA_LIBS
-LIBBZ2
-LIBZ
-ftmac_c
-FTSYS_SRC
-EGREP
-GREP
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-RMDIR
-RMF
-XX_ANSIFLAGS
-XX_CFLAGS
-EXEEXT_BUILD
-CC_BUILD
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
CPP
OBJEXT
EXEEXT
@@ -716,23 +745,25 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
enable_biarch_config
enable_mmap
with_zlib
with_bzip2
+with_png
+with_harfbuzz
with_old_mac_fonts
with_fsspec
with_fsref
with_quickdraw_toolbox
with_quickdraw_carbon
with_ats
-enable_shared
-enable_static
-with_pic
-enable_fast_install
-with_gnu_ld
-with_sysroot
-enable_libtool_lock
'
ac_precious_vars='build_alias
host_alias
@@ -742,7 +773,18 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP'
+CPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+ZLIB_CFLAGS
+ZLIB_LIBS
+BZIP2_CFLAGS
+BZIP2_LIBS
+LIBPNG_CFLAGS
+LIBPNG_LIBS
+HARFBUZZ_CFLAGS
+HARFBUZZ_LIBS'
# Initialize some variables set by options.
@@ -1198,8 +1240,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1285,7 +1325,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures FreeType 2.4.9 to adapt to many kinds of systems.
+\`configure' configures FreeType 2.5.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1350,7 +1390,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of FreeType 2.4.9:";;
+ short | recursive ) echo "Configuration of FreeType 2.5.5:";;
esac
cat <<\_ACEOF
@@ -1358,20 +1398,34 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-biarch-config install biarch ftconfig.h to support multiple
- architectures by single file
- --disable-mmap do not check mmap() and do not use
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-biarch-config install biarch ftconfig.h to support multiple
+ architectures by single file
+ --disable-mmap do not check mmap() and do not use
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --without-zlib use internal zlib instead of system-wide
- --without-bzip2 do not support bzip2 compressed fonts
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
+ compiler's sysroot if not specified).
+ --with-zlib=[yes|no|auto]
+ use system zlib instead of internal library
+ [default=auto]
+ --with-bzip2=[yes|no|auto]
+ support bzip2 compressed fonts [default=auto]
+ --with-png=[yes|no|auto]
+ support png compressed OpenType embedded bitmaps
+ [default=auto]
+ --with-harfbuzz=[yes|no|auto]
+ improve auto-hinting of OpenType fonts
+ [default=auto]
--with-old-mac-fonts allow Mac resource-based fonts to be used
--with-fsspec use obsolete FSSpec API of MacOS, if available
(default=yes)
@@ -1383,11 +1437,6 @@ Optional Packages:
--with-quickdraw-carbon use MacOS QuickDraw in Carbon, if available
(default=yes)
--with-ats use AppleTypeService, if available (default=yes)
- --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
- both]
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-sysroot=DIR Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).
Some influential environment variables:
CC C compiler command
@@ -1398,6 +1447,23 @@ Some influential environment variables:
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
+ ZLIB_LIBS linker flags for ZLIB, overriding pkg-config
+ BZIP2_CFLAGS
+ C compiler flags for BZIP2, overriding pkg-config
+ BZIP2_LIBS linker flags for BZIP2, overriding pkg-config
+ LIBPNG_CFLAGS
+ C compiler flags for LIBPNG, overriding pkg-config
+ LIBPNG_LIBS linker flags for LIBPNG, overriding pkg-config
+ HARFBUZZ_CFLAGS
+ C compiler flags for HARFBUZZ, overriding pkg-config
+ HARFBUZZ_LIBS
+ linker flags for HARFBUZZ, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1465,10 +1531,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-FreeType configure 2.4.9
-generated by GNU Autoconf 2.68
+FreeType configure 2.5.5
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1554,6 +1620,83 @@ fi
} # ac_fn_c_try_cpp
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
@@ -1596,6 +1739,73 @@ fi
} # ac_fn_c_try_run
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
@@ -1687,37 +1897,6 @@ fi
} # ac_fn_c_check_header_mongrel
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -1735,7 +1914,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -1751,7 +1931,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -1777,7 +1958,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -1793,7 +1975,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -1827,7 +2010,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -1896,119 +2080,6 @@ rm -f conftest.val
} # ac_fn_c_compute_int
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_func
-
# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
# ---------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
@@ -2058,8 +2129,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by FreeType $as_me 2.4.9, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by FreeType $as_me 2.5.5, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2414,7 +2485,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Don't forget to update docs/VERSION.DLL!
-version_info='14:1:8'
+version_info='17:4:11'
ft_version=`echo $version_info | tr : .`
@@ -2548,7 +2619,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2588,7 +2659,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2641,7 +2712,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2682,7 +2753,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2740,7 +2811,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2784,7 +2855,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3230,8 +3301,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3456,207 +3526,34 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# checks for native programs to generate building tool
-if test ${cross_compiling} = yes; then
- # Extract the first word of "${build}-gcc", so it can be a program name with args.
-set dummy ${build}-gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC_BUILD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC_BUILD"; then
- ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC_BUILD="${build}-gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-fi
-fi
-CC_BUILD=$ac_cv_prog_CC_BUILD
-if test -n "$CC_BUILD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5
-$as_echo "$CC_BUILD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
- test -z "${CC_BUILD}" && # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC_BUILD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC_BUILD"; then
- ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC_BUILD="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-fi
-fi
-CC_BUILD=$ac_cv_prog_CC_BUILD
-if test -n "$CC_BUILD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5
-$as_echo "$CC_BUILD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- test -z "${CC_BUILD}" && # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC_BUILD+:} false; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$CC_BUILD"; then
- ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC_BUILD="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC_BUILD
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC_BUILD to just the basename; use the full file name.
- shift
- ac_cv_prog_CC_BUILD="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC_BUILD=$ac_cv_prog_CC_BUILD
-if test -n "$CC_BUILD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5
-$as_echo "$CC_BUILD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -z "${CC_BUILD}" && as_fn_error $? "cannot find native C compiler" "$LINENO" 5
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of native executables" >&5
-$as_echo_n "checking for suffix of native executables... " >&6; }
- rm -f a.* b.* a_out.exe conftest.*
- echo > conftest.c "int main() { return 0;}"
- ${CC_BUILD} conftest.c || as_fn_error $? "native C compiler is not working" "$LINENO" 5
- 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.*
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT_BUILD" >&5
-$as_echo "$EXEEXT_BUILD" >&6; }
-else
- CC_BUILD=${CC}
- EXEEXT_BUILD=${EXEEXT}
-fi
-
-
-
-
-
-
-# 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=
- ;;
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
*)
- XX_CFLAGS=
- XX_ANSIFLAGS=
- ;;
- esac
-fi
-
-
-
-
-# auxiliary programs
-
-# Extract the first word of "rm", so it can be a program name with args.
-set dummy rm; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RMF+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$RMF"; then
- ac_cv_prog_RMF="$RMF" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RMF="rm -f"
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -3664,36 +3561,42 @@ done
done
IFS=$as_save_IFS
+ ;;
+esac
fi
-fi
-RMF=$ac_cv_prog_RMF
-if test -n "$RMF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMF" >&5
-$as_echo "$RMF" >&6; }
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-# Extract the first word of "rmdir", so it can be a program name with args.
-set dummy rmdir; ac_word=$2
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RMDIR+:} false; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$RMDIR"; then
- ac_cv_prog_RMDIR="$RMDIR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RMDIR="rmdir"
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -3701,1621 +3604,48 @@ done
done
IFS=$as_save_IFS
+ ;;
+esac
fi
-fi
-RMDIR=$ac_cv_prog_RMDIR
-if test -n "$RMDIR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
-$as_echo "$RMDIR" >&6; }
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-
-
-
-# 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.
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
- done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-case "$INSTALL" in
-/*)
- ;;
-*/*)
- INSTALL="`pwd`/$INSTALL"
- ;;
-esac
-
-
-# checks for header files
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
fi
else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in fcntl.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-# checks for typedefs, structures, and compiler characteristics
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset cs;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *pcpcc;
- char **ppc;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- pcpcc = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++pcpcc;
- ppc = (char**) pcpcc;
- pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- if (s) return 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- if (!foo) return 0;
- }
- return !cs[0] && !zero.x;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_const=yes
-else
- ac_cv_c_const=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-$as_echo "#define const /**/" >>confdefs.h
-
-fi
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_int=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_long=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-
-
-# check whether cpp computation of size of int and long in ftconfig.in works
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpp computation of bit length in ftconfig.in works" >&5
-$as_echo_n "checking whether cpp computation of bit length in ftconfig.in works... " >&6; }
-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
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
-# Check whether --enable-biarch-config was given.
-if test "${enable_biarch_config+set}" = set; then :
- enableval=$enable_biarch_config;
fi
-
-
-case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in
- :yes:yes:)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: broken but use it" >&5
-$as_echo "broken but use it" >&6; }
- unset ft_use_autoconf_sizeof_types
- ;;
- ::no:)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: works but ignore it" >&5
-$as_echo "works but ignore it" >&6; }
- ft_use_autoconf_sizeof_types=yes
- ;;
- ::yes: | :::)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.24
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- unset ft_use_autoconf_sizeof_types
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ft_use_autoconf_sizeof_types=yes
- ;;
-esac
-
-if test x"${ft_use_autoconf_sizeof_types}" = xyes; then
- $as_echo "#define FT_USE_AUTOCONF_SIZEOF_TYPES 1" >>confdefs.h
-
-fi
-
-CPPFLAGS="${orig_CPPFLAGS}"
-
-
-# checks for library functions
-
-# Here we check whether we can use our mmap file component.
-
-# Check whether --enable-mmap was given.
-if test "${enable_mmap+set}" = set; then :
- enableval=$enable_mmap; enable_mmap="no"
-else
- enable_mmap="yes"
-fi
-
-if test "x${enable_mmap}" != "xno"; then
-
-
-
- for ac_header in $ac_header_list
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-for ac_func in getpagesize
-do :
- ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
-if test "x$ac_cv_func_getpagesize" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETPAGESIZE 1
-_ACEOF
-
-fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
-$as_echo_n "checking for working mmap... " >&6; }
-if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_mmap_fixed_mapped=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-/* malloc might have been renamed as rpl_malloc. */
-#undef malloc
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the file system buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propagated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
-char *malloc ();
-#endif
-
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-int
-main ()
-{
- char *data, *data2, *data3;
- const char *cdata2;
- int i, pagesize;
- int fd, fd2;
-
- pagesize = getpagesize ();
-
- /* First, make a file with some known garbage in it. */
- data = (char *) malloc (pagesize);
- if (!data)
- return 1;
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand ();
- umask (0);
- fd = creat ("conftest.mmap", 0600);
- if (fd < 0)
- return 2;
- if (write (fd, data, pagesize) != pagesize)
- return 3;
- close (fd);
-
- /* Next, check that the tail of a page is zero-filled. File must have
- non-zero length, otherwise we risk SIGBUS for entire page. */
- fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
- if (fd2 < 0)
- return 4;
- cdata2 = "";
- if (write (fd2, cdata2, 1) != 1)
- return 5;
- data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
- if (data2 == MAP_FAILED)
- return 6;
- for (i = 0; i < pagesize; ++i)
- if (*(data2 + i))
- return 7;
- close (fd2);
- if (munmap (data2, pagesize))
- return 8;
-
- /* Next, try to mmap the file at a fixed address which already has
- something else allocated at it. If we can, also make sure that
- we see the same garbage. */
- fd = open ("conftest.mmap", O_RDWR);
- if (fd < 0)
- return 9;
- if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- return 10;
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- return 11;
-
- /* Finally, make sure that changes to the mapped area do not
- percolate back to the file as seen by read(). (This is a bug on
- some variants of i386 svr4.0.) */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = (char *) malloc (pagesize);
- if (!data3)
- return 12;
- if (read (fd, data3, pagesize) != pagesize)
- return 13;
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- return 14;
- close (fd);
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_mmap_fixed_mapped=yes
-else
- ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
-$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-
-$as_echo "#define HAVE_MMAP 1" >>confdefs.h
-
-fi
-rm -f conftest.mmap conftest.txt
-
-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_fn_c_check_decl "$LINENO" "munmap" "ac_cv_have_decl_munmap" "
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <sys/mman.h>
-
-
-"
-if test "x$ac_cv_have_decl_munmap" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MUNMAP $ac_have_decl
-_ACEOF
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for munmap's first parameter type" >&5
-$as_echo_n "checking for munmap's first parameter type... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-#include <unistd.h>
-#include <sys/mman.h>
-int munmap(void *, size_t);
-
-
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: void *" >&5
-$as_echo "void *" >&6; }
-
-$as_echo "#define MUNMAP_USES_VOIDP /**/" >>confdefs.h
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: char *" >&5
-$as_echo "char *" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-
-
-for ac_func in memcpy memmove
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-# check for system zlib
-
-# don't quote AS_HELP_STRING!
-
-# Check whether --with-zlib was given.
-if test "${with_zlib+set}" = set; then :
- withval=$with_zlib;
-fi
-
-if test x$with_zlib != xno && test -z "$LIBZ"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzsetparams in -lz" >&5
-$as_echo_n "checking for gzsetparams in -lz... " >&6; }
-if ${ac_cv_lib_z_gzsetparams+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gzsetparams ();
-int
-main ()
-{
-return gzsetparams ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_gzsetparams=yes
-else
- ac_cv_lib_z_gzsetparams=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzsetparams" >&5
-$as_echo "$ac_cv_lib_z_gzsetparams" >&6; }
-if test "x$ac_cv_lib_z_gzsetparams" = xyes; then :
- ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = xyes; then :
- LIBZ='-lz'
-fi
-
-
-fi
-
-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!
-
-# Check whether --with-bzip2 was given.
-if test "${with_bzip2+set}" = set; then :
- withval=$with_bzip2;
-fi
-
-if test x$with_bzip2 != xno && test -z "$LIBBZ2"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzDecompress in -lbz2" >&5
-$as_echo_n "checking for BZ2_bzDecompress in -lbz2... " >&6; }
-if ${ac_cv_lib_bz2_BZ2_bzDecompress+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbz2 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char BZ2_bzDecompress ();
-int
-main ()
-{
-return BZ2_bzDecompress ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_bz2_BZ2_bzDecompress=yes
-else
- ac_cv_lib_bz2_BZ2_bzDecompress=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzDecompress" >&5
-$as_echo "$ac_cv_lib_bz2_BZ2_bzDecompress" >&6; }
-if test "x$ac_cv_lib_bz2_BZ2_bzDecompress" = xyes; then :
- ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_bzlib_h" = xyes; then :
- LIBBZ2='-lbz2'
-fi
-
-
-fi
-
-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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CFLAGS and LDFLAGS share ${c} ${a}" >&5
-$as_echo_n "checking whether CFLAGS and LDFLAGS share ${c} ${a}... " >&6; }
- if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, copy to LDFLAGS" >&5
-$as_echo "no, copy to LDFLAGS" >&6; }
- LDFLAGS="${LDFLAGS} ${c} ${a}"
- fi
- shift 1
- ;;
- -m32|-m64|-march=*|-mcpu=*) # options taking no argument
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: whether CFLAGS and LDFLAGS share ${c}" >&5
-$as_echo "whether CFLAGS and LDFLAGS share ${c}" >&6; }
- if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, copy to LDFLAGS" >&5
-$as_echo "no, copy to LDFLAGS" >&6; }
- 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!
-
-# Check whether --with-old-mac-fonts was given.
-if test "${with_old_mac_fonts+set}" = set; then :
- withval=$with_old_mac_fonts;
-fi
-
-if test x$with_old_mac_fonts = xyes; then
- orig_LDFLAGS="${LDFLAGS}"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking CoreServices & ApplicationServices of Mac OS X" >&5
-$as_echo_n "checking CoreServices & ApplicationServices of Mac OS X... " >&6; }
- FT2_EXTRA_LIBS="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices"
- LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-#if defined(__GNUC__) && defined(__APPLE_CC__)
-# include <CoreServices/CoreServices.h>
-# include <ApplicationServices/ApplicationServices.h>
-#else
-# include <ConditionalMacros.h>
-# include <Files.h>
-#endif
-
-
-int
-main ()
-{
-
-
- short res = 0;
-
-
- UseResFile( res );
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- ftmac_c='ftmac.c'
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OS_INLINE macro is ANSI compatible" >&5
-$as_echo_n "checking whether OS_INLINE macro is ANSI compatible... " >&6; }
- orig_CFLAGS="$CFLAGS -DFT_MACINTOSH"
- CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-#if defined(__GNUC__) && defined(__APPLE_CC__)
-# include <CoreServices/CoreServices.h>
-# include <ApplicationServices/ApplicationServices.h>
-#else
-# include <ConditionalMacros.h>
-# include <Files.h>
-#endif
-
-
-int
-main ()
-{
-
-
- /* OSHostByteOrder() is typed as OS_INLINE */
- int32_t os_byte_order = OSHostByteOrder();
-
-
- if ( OSBigEndian != os_byte_order )
- return 1;
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- CFLAGS="$orig_CFLAGS"
- CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1"
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, ANSI incompatible" >&5
-$as_echo "no, ANSI incompatible" >&6; }
- CFLAGS="$orig_CFLAGS"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking type ResourceIndex" >&5
-$as_echo_n "checking type ResourceIndex... " >&6; }
- orig_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-#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
-
-
-int
-main ()
-{
-
-
- ResourceIndex i = 0;
- return i;
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- CFLAGS="$orig_CFLAGS"
- CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=1"
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- CFLAGS="$orig_CFLAGS"
- CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- FT2_EXTRA_LIBS=""
- LDFLAGS="${orig_LDFLAGS}"
- CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- case x$host_os in
- xdarwin*)
- CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
- ;;
- *)
- ;;
- esac
-fi
-
-
-# Whether to use FileManager which is deprecated since Mac OS X 10.4.
-
-
-# Check whether --with-fsspec was given.
-if test "${with_fsspec+set}" = set; then :
- withval=$with_fsspec;
-fi
-
-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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking FSSpec-based FileManager" >&5
-$as_echo_n "checking FSSpec-based FileManager... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-#if defined(__GNUC__) && defined(__APPLE_CC__)
-# include <CoreServices/CoreServices.h>
-# include <ApplicationServices/ApplicationServices.h>
-#else
-# include <ConditionalMacros.h>
-# include <Files.h>
-#endif
-
-
-int
-main ()
-{
-
-
- 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 );
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- CFLAGS="$CFLAGS -DHAVE_FSSPEC=1"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
-
-# Whether to use FileManager in Carbon since MacOS 9.x.
-
-
-# Check whether --with-fsref was given.
-if test "${with_fsref+set}" = set; then :
- withval=$with_fsref;
-fi
-
-if test x$with_fsref = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
-*** WARNING
- FreeType2 built without FSRef API cannot load
- data-fork fonts on MacOS, except of XXX.dfont.
- " >&5
-$as_echo "$as_me: WARNING:
-*** WARNING
- FreeType2 built without FSRef API cannot load
- data-fork fonts on MacOS, except of XXX.dfont.
- " >&2;}
- CFLAGS="$CFLAGS -DHAVE_FSREF=0"
-elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking FSRef-based FileManager" >&5
-$as_echo_n "checking FSRef-based FileManager... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-#if defined(__GNUC__) && defined(__APPLE_CC__)
-# include <CoreServices/CoreServices.h>
-# include <ApplicationServices/ApplicationServices.h>
-#else
-# include <ConditionalMacros.h>
-# include <Files.h>
-#endif
-
-
-int
-main ()
-{
-
-
- 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
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- CFLAGS="$CFLAGS -DHAVE_FSREF=1"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- CFLAGS="$CFLAGS -DHAVE_FSREF=0"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
-
-# Whether to use QuickDraw API in ToolBox which is deprecated since
-# Mac OS X 10.4.
-
-
-# Check whether --with-quickdraw-toolbox was given.
-if test "${with_quickdraw_toolbox+set}" = set; then :
- withval=$with_quickdraw_toolbox;
-fi
-
-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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking QuickDraw FontManager functions in ToolBox" >&5
-$as_echo_n "checking QuickDraw FontManager functions in ToolBox... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-#if defined(__GNUC__) && defined(__APPLE_CC__)
-# include <CoreServices/CoreServices.h>
-# include <ApplicationServices/ApplicationServices.h>
-#else
-# include <ConditionalMacros.h>
-# include <Fonts.h>
-#endif
-
-
-int
-main ()
-{
-
-
- Str255 familyName;
- SInt16 familyID = 0;
- FMInput* fmIn = NULL;
- FMOutput* fmOut = NULL;
-
-
- GetFontName( familyID, familyName );
- GetFNum( familyName, &familyID );
- fmOut = FMSwapFont( fmIn );
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
-
-# Whether to use QuickDraw API in Carbon which is deprecated since
-# Mac OS X 10.4.
-
-
-# Check whether --with-quickdraw-carbon was given.
-if test "${with_quickdraw_carbon+set}" = set; then :
- withval=$with_quickdraw_carbon;
-fi
-
-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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking QuickDraw FontManager functions in Carbon" >&5
-$as_echo_n "checking QuickDraw FontManager functions in Carbon... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-#if defined(__GNUC__) && defined(__APPLE_CC__)
-# include <CoreServices/CoreServices.h>
-# include <ApplicationServices/ApplicationServices.h>
-#else
-# include <ConditionalMacros.h>
-# include <Fonts.h>
-#endif
-
-
-int
-main ()
-{
-
-
- 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 );
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
-
-# Whether to use AppleTypeService since Mac OS X.
-
-# don't quote AS_HELP_STRING!
-
-# Check whether --with-ats was given.
-if test "${with_ats+set}" = set; then :
- withval=$with_ats;
-fi
-
-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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking AppleTypeService functions" >&5
-$as_echo_n "checking AppleTypeService functions... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-#if defined(__GNUC__) && defined(__APPLE_CC__)
-# include <CoreServices/CoreServices.h>
-# include <ApplicationServices/ApplicationServices.h>
-#else
-# include <ConditionalMacros.h>
-# include <Files.h>
-#endif
-
-
-int
-main ()
-{
-
-
- FSSpec* pathSpec;
-
-
- ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
-#if HAVE_FSSPEC
- ATSFontGetFileSpecification( 0, pathSpec );
-#endif
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- CFLAGS="$CFLAGS -DHAVE_ATS=1"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- CFLAGS="$CFLAGS -DHAVE_ATS=0"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+ PKG_CONFIG=""
+ fi
fi
-case "$CFLAGS" in
- *HAVE_FSSPEC* | *HAVE_FSREF* | *HAVE_QUICKDRAW* | *HAVE_ATS* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
-*** WARNING
- FSSpec/FSRef/QuickDraw/ATS options are explicitly given,
- thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c.
- " >&5
-$as_echo "$as_me: WARNING:
-*** WARNING
- FSSpec/FSRef/QuickDraw/ATS options are explicitly given,
- thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c.
- " >&2;}
- CFLAGS="$CFLAGS "'-I$(TOP_DIR)/builds/mac/'
- ;;
- *)
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
case `pwd` in
*\ * | *\ *)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
@@ -5324,8 +3654,8 @@ esac
-macro_version='2.4.2'
-macro_revision='1.3337'
+macro_version='2.4.2.444.28-053d'
+macro_revision='2.4.2.444.28'
@@ -5339,7 +3669,7 @@ macro_revision='1.3337'
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
# Backslashify metacharacters that are still active within
# double-quoted strings.
@@ -5388,7 +3718,7 @@ func_echo_all ()
$ECHO ""
}
-case "$ECHO" in
+case $ECHO in
printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
$as_echo "printf" >&6; } ;;
print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
@@ -5432,7 +3762,7 @@ do
for ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+ as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
case `"$ac_path_SED" --version 2>&1` in
@@ -5492,6 +3822,136 @@ Xsed="$SED -e 1s/^X//"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
$as_echo_n "checking for fgrep... " >&6; }
if ${ac_cv_path_FGREP+:} false; then :
@@ -5511,7 +3971,7 @@ do
for ac_prog in fgrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+ as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
case `"$ac_path_FGREP" --version 2>&1` in
@@ -5581,19 +4041,19 @@ test -z "$GREP" && GREP=grep
# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
else
with_gnu_ld=no
fi
ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
+ # gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -5607,7 +4067,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
- test -z "$LD" && LD="$ac_prog"
+ test -z "$LD" && LD=$ac_prog
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -5618,7 +4078,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
with_gnu_ld=unknown
;;
esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
$as_echo_n "checking for GNU ld... " >&6; }
else
@@ -5629,32 +4089,32 @@ if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD=$ac_dir/$ac_prog
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
+ test no != "$with_gnu_ld" && break
;;
*)
- test "$with_gnu_ld" != yes && break
+ test yes != "$with_gnu_ld" && break
;;
esac
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
fi
fi
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
if test -n "$LD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
$as_echo "$LD" >&6; }
@@ -5697,33 +4157,33 @@ if ${lt_cv_path_NM+:} false; then :
else
if test -n "$NM"; then
# Let the user override the test.
- lt_cv_path_NM="$NM"
+ lt_cv_path_NM=$NM
else
- lt_nm_to_check="${ac_tool_prefix}nm"
+ lt_nm_to_check=${ac_tool_prefix}nm
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
# Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
*/dev/null* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
- break
+ break 2
;;
*)
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
- break
+ break 2
;;
*)
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -5734,15 +4194,15 @@ else
esac
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
done
: ${lt_cv_path_NM=no}
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
else
# Didn't find any BSD compatible name lister, look for dumpbin.
if test -n "$DUMPBIN"; then :
@@ -5767,7 +4227,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5811,7 +4271,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5848,9 +4308,9 @@ esac
fi
fi
- case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
*COFF*)
- DUMPBIN="$DUMPBIN -symbols"
+ DUMPBIN="$DUMPBIN -symbols -headers"
;;
*)
DUMPBIN=:
@@ -5858,8 +4318,8 @@ fi
esac
fi
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
fi
fi
test -z "$NM" && NM=nm
@@ -5910,7 +4370,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then :
$as_echo_n "(cached) " >&6
else
i=0
- teststring="ABCD"
+ teststring=ABCD
case $build_os in
msdosdjgpp*)
@@ -5950,7 +4410,7 @@ else
lt_cv_sys_max_cmd_len=8192;
;;
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -6000,22 +4460,23 @@ else
;;
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
# Make teststring a little bigger before we do anything with it.
# a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
+ for i in 1 2 3 4 5 6 7 8; do
teststring=$teststring$teststring
done
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
- while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
+ test 17 != "$i" # 1/2 MB should be enough
do
i=`expr $i + 1`
teststring=$teststring$teststring
@@ -6033,7 +4494,7 @@ else
fi
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
else
@@ -6051,30 +4512,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
: ${MV="mv -f"}
: ${RM="rm -f"}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,b/c, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
lt_unset=unset
else
@@ -6197,13 +4634,13 @@ esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- if test "$GCC" != yes; then
+ if test yes != "$GCC"; then
reload_cmds=false
fi
;;
darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
@@ -6235,7 +4672,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6275,7 +4712,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6328,13 +4765,13 @@ lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
case $host_os in
aix[4-9]*)
@@ -6361,8 +4798,7 @@ mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
- # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
- if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ if ( file / ) >/dev/null 2>&1; then
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -6398,10 +4834,6 @@ freebsd* | dragonfly*)
fi
;;
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
haiku*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -6440,7 +4872,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -6462,8 +4894,8 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -6578,7 +5010,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6618,7 +5050,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6670,8 +5102,8 @@ else
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # two different shell functions defined in ltmain.sh
- # decide which to use based on capabilities of $DLLTOOL
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
*--identify-strict*)
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -6683,7 +5115,7 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
*)
# fallback: assume linklib IS sharedlib
- lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
;;
esac
@@ -6699,6 +5131,7 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
if test -n "$ac_tool_prefix"; then
for ac_prog in ar
do
@@ -6718,7 +5151,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6762,7 +5195,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6837,7 +5270,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- if test "$ac_status" -eq 0; then
+ if test 0 -eq "$ac_status"; then
# Ensure the archiver fails upon bogus file names.
rm -f conftest.$ac_objext libconftest.a
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
@@ -6845,7 +5278,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- if test "$ac_status" -ne 0; then
+ if test 0 -ne "$ac_status"; then
lt_cv_ar_at_file=@
fi
fi
@@ -6858,7 +5291,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
$as_echo "$lt_cv_ar_at_file" >&6; }
-if test "x$lt_cv_ar_at_file" = xno; then
+if test no = "$lt_cv_ar_at_file"; then
archiver_list_spec=
else
archiver_list_spec=$lt_cv_ar_at_file
@@ -6887,7 +5320,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6927,7 +5360,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6986,7 +5419,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7026,7 +5459,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7075,7 +5508,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
- openbsd*)
+ bitrig* | openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
@@ -7130,7 +5563,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7207,7 +5640,7 @@ cygwin* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
symcode='[ABCDEGRST]'
fi
;;
@@ -7240,14 +5673,44 @@ case `$NM -V 2>&1` in
symcode='[ABCDGIRSTW]' ;;
esac
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
# Handle CRLF in mingw tool chain
opt_cr=
@@ -7265,21 +5728,24 @@ for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
# Also find C++ and __fastcall symbols from MSVC++,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK '"\
" {last_section=section; section=\$ 3};"\
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx"
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -7327,11 +5793,11 @@ _LT_EOF
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
@@ -7357,7 +5823,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] =
{
{ "@PROGRAM@", (void *) 0 },
_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cat <<\_LT_EOF >> conftest.$ac_ext
{0, (void *) 0}
};
@@ -7377,13 +5843,13 @@ _LT_EOF
mv conftest.$ac_objext conftstm.$ac_objext
lt_globsym_save_LIBS=$LIBS
lt_globsym_save_CFLAGS=$CFLAGS
- LIBS="conftstm.$ac_objext"
+ LIBS=conftstm.$ac_objext
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
pipe_works=yes
fi
LIBS=$lt_globsym_save_LIBS
@@ -7404,7 +5870,7 @@ _LT_EOF
rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
+ if test yes = "$pipe_works"; then
break
else
lt_cv_sys_global_symbol_pipe=
@@ -7457,6 +5923,16 @@ fi
+
+
+
+
+
+
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
$as_echo_n "checking for sysroot... " >&6; }
@@ -7469,9 +5945,9 @@ fi
lt_sysroot=
-case ${with_sysroot} in #(
+case $with_sysroot in #(
yes)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
@@ -7481,8 +5957,8 @@ case ${with_sysroot} in #(
no|'')
;; #(
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
-$as_echo "${with_sysroot}" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
;;
esac
@@ -7499,13 +5975,14 @@ if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
fi
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
ia64-*-hpux*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -7514,24 +5991,25 @@ ia64-*-hpux*)
test $ac_status = 0; }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
- HPUX_IA64_MODE="32"
+ HPUX_IA64_MODE=32
;;
*ELF-64*)
- HPUX_IA64_MODE="64"
+ HPUX_IA64_MODE=64
;;
esac
fi
rm -rf conftest*
;;
*-*-irix6*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
echo '#line '$LINENO' "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
@@ -7560,9 +6038,50 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -7576,9 +6095,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7597,7 +6126,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7615,7 +6147,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
+ SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -belf"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
@@ -7655,13 +6187,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
$as_echo "$lt_cv_cc_needs_belf" >&6; }
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ if test yes != "$lt_cv_cc_needs_belf"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
+ CFLAGS=$SAVE_CFLAGS
fi
;;
*-*solaris*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -7673,7 +6206,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
case $lt_cv_prog_gnu_ld in
yes*)
case $host in
- i?86-*-solaris*)
+ i?86-*-solaris*|x86_64-*-solaris*)
LD="${LD-ld} -m elf_x86_64"
;;
sparc*-*-solaris*)
@@ -7682,7 +6215,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
esac
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
- LD="${LD-ld}_sol2"
+ LD=${LD-ld}_sol2
fi
;;
*)
@@ -7698,7 +6231,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
;;
esac
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
@@ -7717,7 +6250,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7757,7 +6290,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7809,7 +6342,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
$as_echo "$lt_cv_path_mainfest_tool" >&6; }
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
+if test yes != "$lt_cv_path_mainfest_tool"; then
MANIFEST_TOOL=:
fi
@@ -7837,7 +6370,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7877,7 +6410,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7929,7 +6462,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7969,7 +6502,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8021,7 +6554,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8061,7 +6594,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LIPO="lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8113,7 +6646,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8153,7 +6686,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL="otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8205,7 +6738,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8245,7 +6778,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL64="otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8312,7 +6845,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
+ if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
# by either setting the environment variable LT_MULTI_MODULE
# non-empty at configure time, or by adding -multi_module to the
@@ -8330,7 +6863,7 @@ else
cat conftest.err >&5
# Otherwise, if the output was created with a 0 exit code from
# the compiler, it worked.
- elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&5
@@ -8369,7 +6902,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
@@ -8398,7 +6931,7 @@ _LT_EOF
_lt_result=$?
if test -s conftest.err && $GREP force_load conftest.err; then
cat conftest.err >&5
- elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&5
@@ -8411,32 +6944,32 @@ fi
$as_echo "$lt_cv_ld_force_load" >&6; }
case $host_os in
rhapsody* | darwin1.[012])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
darwin*) # darwin 5.x on
# if running on 10.5 or later, the deployment target defaults
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10.[012]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
_lt_dar_single_mod='$single_module'
fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
fi
- if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
_lt_dsymutil='~$DSYMUTIL $lib || :'
else
_lt_dsymutil=
@@ -8444,6 +6977,136 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
;;
esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
for ac_header in dlfcn.h
do :
ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
@@ -8483,7 +7146,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AS="${ac_tool_prefix}as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8523,7 +7186,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AS="as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8575,7 +7238,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8615,7 +7278,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8667,7 +7330,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8707,7 +7370,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8778,14 +7441,14 @@ if test "${enable_shared+set}" = set; then :
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8809,14 +7472,14 @@ if test "${enable_static+set}" = set; then :
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8840,14 +7503,14 @@ if test "${with_pic+set}" = set; then :
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8855,8 +7518,6 @@ else
fi
-test -z "$pic_mode" && pic_mode=default
-
@@ -8872,14 +7533,14 @@ if test "${enable_fast_install+set}" = set; then :
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8897,7 +7558,7 @@ fi
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -8946,7 +7607,7 @@ test -z "$LN_S" && LN_S="ln -s"
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
@@ -8985,7 +7646,7 @@ aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
+ if test set != "${COLLECT_NAMES+set}"; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -8996,14 +7657,14 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
# Set sane defaults for various variables
test -z "$CC" && CC=cc
@@ -9035,22 +7696,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -f "$ac_dir/${ac_tool_prefix}file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -9073,13 +7734,13 @@ _LT_EOF
break
fi
done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
;;
esac
fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
$as_echo "$MAGIC_CMD" >&6; }
@@ -9101,22 +7762,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -f "$ac_dir/file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -9139,13 +7800,13 @@ _LT_EOF
break
fi
done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
;;
esac
fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
$as_echo "$MAGIC_CMD" >&6; }
@@ -9166,7 +7827,7 @@ esac
# Use C for the default configuration in the libtool script
-lt_save_CC="$CC"
+lt_save_CC=$CC
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -9224,7 +7885,7 @@ if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
case $cc_basename in
nvcc*)
lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
@@ -9240,7 +7901,7 @@ else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
+ lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -9270,7 +7931,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
else
:
@@ -9288,17 +7949,18 @@ lt_prog_compiler_pic=
lt_prog_compiler_static=
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_static='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
fi
+ lt_prog_compiler_pic='-fPIC'
;;
amigaos*)
@@ -9309,8 +7971,8 @@ lt_prog_compiler_static=
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -9396,7 +8058,7 @@ lt_prog_compiler_static=
case $host_os in
aix*)
lt_prog_compiler_wl='-Wl,'
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
else
@@ -9404,6 +8066,20 @@ lt_prog_compiler_static=
fi
;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
@@ -9423,7 +8099,7 @@ lt_prog_compiler_static=
;;
esac
# Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='${wl}-a ${wl}archive'
+ lt_prog_compiler_static='$wl-a ${wl}archive'
;;
irix5* | irix6* | nonstopux*)
@@ -9432,9 +8108,9 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
+ # old Intel for x86_64, which still supported -KPIC.
ecc*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
@@ -9459,6 +8135,12 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-PIC'
lt_prog_compiler_static='-Bstatic'
;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
@@ -9556,7 +8238,7 @@ lt_prog_compiler_static=
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
lt_prog_compiler_pic='-Kconform_pic'
lt_prog_compiler_static='-Bstatic'
fi
@@ -9585,7 +8267,7 @@ lt_prog_compiler_static=
fi
case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
+ # For platforms that do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic=
;;
@@ -9617,7 +8299,7 @@ else
lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -9647,7 +8329,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
case $lt_prog_compiler_pic in
"" | " "*) ;;
*) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -9679,7 +8361,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -9698,13 +8380,13 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works"; then
:
else
lt_prog_compiler_static=
@@ -9824,8 +8506,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
$as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -9837,9 +8519,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
ln conftest.a conftest.b 2>/dev/null && hard_links=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ if test no = "$hard_links"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -9882,9 +8564,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# included in the symbol list
include_expsyms=
# exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
@@ -9899,7 +8581,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
- if test "$GCC" != yes; then
+ if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
@@ -9907,7 +8589,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
- openbsd*)
+ openbsd* | bitrig*)
with_gnu_ld=no
;;
esac
@@ -9917,7 +8599,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# On some targets, GNU ld is compatible enough with the native linker
# that we're better off using the native interface for both.
lt_use_gnu_ld_interface=no
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
case $host_os in
aix*)
# The AIX port of GNU ld has always aspired to compatibility
@@ -9939,24 +8621,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
esac
fi
- if test "$lt_use_gnu_ld_interface" = yes; then
+ if test yes = "$lt_use_gnu_ld_interface"; then
# If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
+ wlarc='$wl'
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec='$wl--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
whole_archive_flag_spec=
fi
supports_anon_versioning=no
- case `$LD -v 2>&1` in
+ case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -9969,7 +8651,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
case $host_os in
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
+ if test ia64 != "$host_cpu"; then
ld_shlibs=no
cat <<_LT_EOF 1>&2
@@ -9988,7 +8670,7 @@ _LT_EOF
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
archive_expsym_cmds=''
;;
m68k)
@@ -10004,7 +8686,7 @@ _LT_EOF
allow_undefined_flag=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
else
ld_shlibs=no
fi
@@ -10014,7 +8696,7 @@ _LT_EOF
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
- export_dynamic_flag_spec='${wl}--export-all-symbols'
+ export_dynamic_flag_spec='$wl--export-all-symbols'
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -10022,61 +8704,61 @@ _LT_EOF
exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs=no
fi
;;
haiku*)
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
link_all_deplibs=yes
;;
interix[3-9]*)
hardcode_direct=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
+ if test linux-dietlibc = "$host_os"; then
case $cc_basename in
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
esac
fi
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
+ && test no = "$tmp_diet"
then
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
@@ -10087,42 +8769,44 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
whole_archive_flag_spec=
tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
tmp_addflag= ;;
nvcc*) # Cuda Compiler Driver 2.2
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object=yes
;;
esac
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object=yes
tmp_sharedflag='-G' ;;
*Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;;
esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
;;
esac
@@ -10136,8 +8820,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -10155,8 +8839,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -10168,7 +8852,7 @@ _LT_EOF
ld_shlibs=no
cat <<_LT_EOF 1>&2
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
*** reliably create shared libraries on SCO systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
@@ -10183,9 +8867,9 @@ _LT_EOF
# DT_RUNPATH tag from executables and libraries. But doing so
# requires that you compile everything twice, which is a pain.
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -10202,15 +8886,15 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
- if test "$ld_shlibs" = no; then
+ if test no = "$ld_shlibs"; then
runpath_var=
hardcode_libdir_flag_spec=
export_dynamic_flag_spec=
@@ -10226,7 +8910,7 @@ _LT_EOF
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
@@ -10234,12 +8918,12 @@ _LT_EOF
;;
aix[4-9]*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=""
+ no_entry_flag=
else
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
@@ -10257,7 +8941,7 @@ _LT_EOF
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
aix_use_runtimelinking=yes
break
fi
@@ -10280,13 +8964,13 @@ _LT_EOF
hardcode_direct_absolute=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
- file_list_spec='${wl}-f,'
+ file_list_spec='$wl-f,'
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
+ collect2name=`$CC -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -10305,35 +8989,35 @@ _LT_EOF
;;
esac
shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
fi
else
# not using gcc
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
else
- shared_flag='${wl}-bM:SRE'
+ shared_flag='$wl-bM:SRE'
fi
fi
fi
- export_dynamic_flag_spec='${wl}-bexpall'
+ export_dynamic_flag_spec='$wl-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
+ if test yes = "$aix_use_runtimelinking"; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
@@ -10368,7 +9052,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_="/usr/lib:/lib"
+ lt_cv_aix_libpath_=/usr/lib:/lib
fi
fi
@@ -10376,17 +9060,17 @@ fi
aix_libpath=$lt_cv_aix_libpath_
fi
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
@@ -10421,7 +9105,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_="/usr/lib:/lib"
+ lt_cv_aix_libpath_=/usr/lib:/lib
fi
fi
@@ -10429,21 +9113,21 @@ fi
aix_libpath=$lt_cv_aix_libpath_
fi
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- no_undefined_flag=' ${wl}-bernotok'
- allow_undefined_flag=' ${wl}-berok'
- if test "$with_gnu_ld" = yes; then
+ no_undefined_flag=' $wl-bernotok'
+ allow_undefined_flag=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
# We only use this code for GNU lds that support --whole-archive.
- whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec='$convenience'
fi
archive_cmds_need_lc=yes
# This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $wl-bnoentry $compiler_flags $wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
@@ -10452,7 +9136,7 @@ fi
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
archive_expsym_cmds=''
;;
m68k)
@@ -10482,16 +9166,17 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
- else
- sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
enable_shared_with_static_runtimes=yes
@@ -10500,18 +9185,18 @@ fi
# Don't use ranlib
old_postinstall_cmds='chmod 644 $oldlib'
postlink_cmds='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile="$lt_outputfile.exe"
- lt_tool_outputfile="$lt_tool_outputfile.exe"
- ;;
- esac~
- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# Assume MSVC wrapper
@@ -10520,7 +9205,7 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
@@ -10539,24 +9224,24 @@ fi
hardcode_direct=no
hardcode_automatic=yes
hardcode_shlibpath_var=unsupported
- if test "$lt_cv_ld_force_load" = "yes"; then
- whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
else
whole_archive_flag_spec=''
fi
link_all_deplibs=yes
- allow_undefined_flag="$_lt_dar_allow_undefined"
+ allow_undefined_flag=$_lt_dar_allow_undefined
case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test "$_lt_dar_can_shared" = "yes"; then
+ if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
else
ld_shlibs=no
@@ -10598,33 +9283,33 @@ fi
;;
hpux9*)
- if test "$GCC" = yes; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ if test yes = "$GCC"; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
fi
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
;;
hpux10*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
@@ -10632,25 +9317,25 @@ fi
;;
hpux11*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ if test yes,no = "$GCC,$with_gnu_ld"; then
case $host_cpu in
hppa*64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
hppa*64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
@@ -10662,7 +9347,7 @@ if ${lt_cv_prog_compiler__b+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler__b=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -b"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -10681,14 +9366,14 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
$as_echo "$lt_cv_prog_compiler__b" >&6; }
-if test x"$lt_cv_prog_compiler__b" = xyes; then
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+if test yes = "$lt_cv_prog_compiler__b"; then
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -10696,8 +9381,8 @@ fi
;;
esac
fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
case $host_cpu in
@@ -10708,7 +9393,7 @@ fi
*)
hardcode_direct=yes
hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
@@ -10719,8 +9404,8 @@ fi
;;
irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
# Try to use the -exported_symbol ld option, if it does not
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
@@ -10730,8 +9415,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >
if ${lt_cv_irix_exported_symbol+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo (void) { return 0; }
@@ -10743,19 +9428,19 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
$as_echo "$lt_cv_irix_exported_symbol" >&6; }
- if test "$lt_cv_irix_exported_symbol" = yes; then
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
fi
archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
inherit_rpath=yes
link_all_deplibs=yes
@@ -10775,7 +9460,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
newsos6)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
hardcode_shlibpath_var=no
;;
@@ -10783,27 +9468,19 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
*nto* | *qnx*)
;;
- openbsd*)
+ openbsd* | bitrig*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
hardcode_shlibpath_var=no
hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
fi
else
ld_shlibs=no
@@ -10819,28 +9496,28 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
fi
archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
# Both c and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
@@ -10851,24 +9528,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris*)
no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
;;
*)
- wlarc='${wl}'
- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ wlarc='$wl'
+ archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
;;
esac
fi
@@ -10878,11 +9555,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
# but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ if test yes = "$GCC"; then
+ whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
else
whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
fi
@@ -10892,10 +9569,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sunos4*)
- if test "x$host_vendor" = xsequent; then
+ if test sequent = "$host_vendor"; then
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -10944,43 +9621,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='${wl}-z,text'
+ no_undefined_flag='$wl-z,text'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
runpath_var='LD_RUN_PATH'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
+ # Note: We CANNOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- no_undefined_flag='${wl}-z,text'
- allow_undefined_flag='${wl}-z,nodefs'
+ no_undefined_flag='$wl-z,text'
+ allow_undefined_flag='$wl-z,nodefs'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_flag_spec='$wl-R,$libdir'
hardcode_libdir_separator=':'
link_all_deplibs=yes
- export_dynamic_flag_spec='${wl}-Bexport'
+ export_dynamic_flag_spec='$wl-Bexport'
runpath_var='LD_RUN_PATH'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
@@ -10995,10 +9672,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
esac
- if test x$host_vendor = xsni; then
+ if test sni = "$host_vendor"; then
case $host in
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='${wl}-Blargedynsym'
+ export_dynamic_flag_spec='$wl-Blargedynsym'
;;
esac
fi
@@ -11006,7 +9683,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
+test no = "$ld_shlibs" && can_build_shared=no
with_gnu_ld=$with_gnu_ld
@@ -11032,7 +9709,7 @@ x|xyes)
# Assume -lc should be added
archive_cmds_need_lc=yes
- if test "$enable_shared" = yes && test "$GCC" = yes; then
+ if test yes,yes = "$GCC,$enable_shared"; then
case $archive_cmds in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -11247,14 +9924,14 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
$as_echo_n "checking dynamic linker characteristics... " >&6; }
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
- *) lt_sed_strip_eq="s,=/,/,g" ;;
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
case $lt_search_path_spec in
@@ -11270,28 +9947,35 @@ if test "$GCC" = yes; then
;;
esac
# Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
+ # and add multilib dir if necessary...
lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
test -d "$lt_sys_path" && \
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
for (lt_i = NF; lt_i > 0; lt_i--) {
if ($lt_i != "" && $lt_i != ".") {
if ($lt_i == "..") {
lt_count++;
} else {
if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
+ lt_foo = "/" $lt_i lt_foo;
} else {
lt_count--;
}
@@ -11305,7 +9989,7 @@ BEGIN {RS=" "; FS="/|\n";} {
# for these hosts.
case $host_os in
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+ $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
else
@@ -11314,7 +9998,7 @@ fi
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -11334,11 +10018,11 @@ need_version=unknown
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
+ soname_spec='$libname$release$shared_ext$major'
;;
aix[4-9]*)
@@ -11346,40 +10030,40 @@ aix[4-9]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
+ if test yes = "$aix_use_runtimelinking"; then
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
else
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
fi
shlibpath_var=LIBPATH
fi
@@ -11390,18 +10074,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='${libname}${shared_ext}'
+ library_names_spec='$libname$shared_ext'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -11409,8 +10093,8 @@ beos*)
bsdi[45]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -11422,7 +10106,7 @@ bsdi[45]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=".dll"
+ shrext_cmds=.dll
need_version=no
need_lib_prefix=no
@@ -11431,8 +10115,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -11448,17 +10132,17 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -11467,8 +10151,8 @@ cygwin* | mingw* | pw32* | cegcc*)
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- library_names_spec='${libname}.dll.lib'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
case $build_os in
mingw*)
@@ -11495,7 +10179,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec="$LIB"
+ sys_lib_search_path_spec=$LIB
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -11508,8 +10192,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -11522,7 +10206,7 @@ cygwin* | mingw* | pw32* | cegcc*)
*)
# Assume MSVC wrapper
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -11535,8 +10219,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -11549,8 +10233,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -11568,12 +10252,12 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
need_version=yes
;;
esac
@@ -11598,26 +10282,15 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ shlibpath_overrides_runpath=no
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -11635,9 +10308,9 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
@@ -11650,8 +10323,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -11660,8 +10333,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -11674,8 +10347,8 @@ interix[3-9]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -11686,7 +10359,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -11694,8 +10367,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -11714,8 +10387,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
hardcode_into_libs=yes
;;
@@ -11724,13 +10397,33 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -11794,12 +10487,12 @@ netbsd*)
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -11809,7 +10502,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -11818,45 +10511,34 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd*)
+openbsd* | bitrig*)
version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
else
- shlibpath_overrides_runpath=yes
+ need_version=yes
fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
;;
os2*)
libname_spec='$name'
- shrext_cmds=".dll"
+ shrext_cmds=.dll
need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
+ library_names_spec='$libname$shared_ext $libname.a'
dynamic_linker='OS/2 ld.exe'
shlibpath_var=LIBPATH
;;
@@ -11865,11 +10547,11 @@ osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
rdos*)
@@ -11880,8 +10562,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -11891,11 +10573,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
need_lib_prefix=no
fi
need_version=yes
@@ -11903,8 +10585,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -11925,10 +10607,10 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
@@ -11937,12 +10619,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
version_type=freebsd-elf
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -11960,7 +10642,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -11968,8 +10650,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -11979,18 +10661,18 @@ uts4*)
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
fi
@@ -12089,15 +10771,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" ||
test -n "$runpath_var" ||
- test "X$hardcode_automatic" = "Xyes" ; then
+ test yes = "$hardcode_automatic"; then
# We can hardcode non-existent directories.
- if test "$hardcode_direct" != no &&
+ if test no != "$hardcode_direct" &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
- test "$hardcode_minus_L" != no; then
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+ test no != "$hardcode_minus_L"; then
# Linking always hardcodes the temporary library directory.
hardcode_action=relink
else
@@ -12112,12 +10794,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
$as_echo "$hardcode_action" >&6; }
-if test "$hardcode_action" = relink ||
- test "$inherit_rpath" = yes; then
+if test relink = "$hardcode_action" ||
+ test yes = "$inherit_rpath"; then
# Fast installation is not supported
enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -12127,7 +10809,7 @@ fi
- if test "x$enable_dlopen" != xyes; then
+ if test yes != "$enable_dlopen"; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
@@ -12137,23 +10819,23 @@ else
case $host_os in
beos*)
- lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen=load_add_on
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
;;
mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen=LoadLibrary
lt_cv_dlopen_libs=
;;
cygwin*)
- lt_cv_dlopen="dlopen"
+ lt_cv_dlopen=dlopen
lt_cv_dlopen_libs=
;;
darwin*)
- # if libdl is installed we need to link against it
+ # if libdl is installed we need to link against it
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlopen+:} false; then :
@@ -12191,10 +10873,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
else
- lt_cv_dlopen="dyld"
+ lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -12202,10 +10884,18 @@ fi
;;
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
if test "x$ac_cv_func_shl_load" = xyes; then :
- lt_cv_dlopen="shl_load"
+ lt_cv_dlopen=shl_load
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
$as_echo_n "checking for shl_load in -ldld... " >&6; }
@@ -12244,11 +10934,11 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+ lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
else
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen"
+ lt_cv_dlopen=dlopen
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
@@ -12287,7 +10977,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
$as_echo_n "checking for dlopen in -lsvld... " >&6; }
@@ -12326,7 +11016,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
$as_echo_n "checking for dld_link in -ldld... " >&6; }
@@ -12365,7 +11055,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
fi
@@ -12386,21 +11076,21 @@ fi
;;
esac
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
+ if test no = "$lt_cv_dlopen"; then
enable_dlopen=no
+ else
+ enable_dlopen=yes
fi
case $lt_cv_dlopen in
dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
- save_LIBS="$LIBS"
+ save_LIBS=$LIBS
LIBS="$lt_cv_dlopen_libs $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
@@ -12408,7 +11098,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -12457,7 +11147,7 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -12487,7 +11177,7 @@ _LT_EOF
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -12507,14 +11197,14 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
$as_echo "$lt_cv_dlopen_self" >&6; }
- if test "x$lt_cv_dlopen_self" = xyes; then
+ if test yes = "$lt_cv_dlopen_self"; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self_static+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -12563,7 +11253,7 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -12593,7 +11283,7 @@ _LT_EOF
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -12614,9 +11304,9 @@ fi
$as_echo "$lt_cv_dlopen_self_static" >&6; }
fi
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
;;
esac
@@ -12660,7 +11350,7 @@ else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
darwin*)
- if test -n "$STRIP" ; then
+ if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -12688,7 +11378,7 @@ fi
- # Report which library types will actually be built
+ # Report what library types will actually be built
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
$as_echo_n "checking if libtool supports shared libraries... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
@@ -12696,13 +11386,13 @@ $as_echo "$can_build_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
$as_echo_n "checking whether to build shared libraries... " >&6; }
- test "$can_build_shared" = "no" && enable_shared=no
+ test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test "$enable_shared" = yes && enable_static=no
+ test yes = "$enable_shared" && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
@@ -12710,8 +11400,8 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
;;
aix[4-9]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
+ if test ia64 != "$host_cpu" && test no = "$aix_use_runtimelinking"; then
+ test yes = "$enable_shared" && enable_static=no
fi
;;
esac
@@ -12721,7 +11411,7 @@ $as_echo "$enable_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
+ test yes = "$enable_shared" || enable_static=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
$as_echo "$enable_static" >&6; }
@@ -12735,7 +11425,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-CC="$lt_save_CC"
+CC=$lt_save_CC
@@ -12761,6 +11451,2315 @@ CC="$lt_save_CC"
+# checks for native programs to generate building tool
+
+if test ${cross_compiling} = yes; then
+ # Extract the first word of "${build}-gcc", so it can be a program name with args.
+set dummy ${build}-gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC_BUILD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC_BUILD"; then
+ ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC_BUILD="${build}-gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC_BUILD=$ac_cv_prog_CC_BUILD
+if test -n "$CC_BUILD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5
+$as_echo "$CC_BUILD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "${CC_BUILD}" && # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC_BUILD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC_BUILD"; then
+ ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC_BUILD="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC_BUILD=$ac_cv_prog_CC_BUILD
+if test -n "$CC_BUILD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5
+$as_echo "$CC_BUILD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "${CC_BUILD}" && # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC_BUILD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC_BUILD"; then
+ ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC_BUILD="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC_BUILD
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC_BUILD to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC_BUILD="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC_BUILD=$ac_cv_prog_CC_BUILD
+if test -n "$CC_BUILD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5
+$as_echo "$CC_BUILD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "${CC_BUILD}" && as_fn_error $? "cannot find native C compiler" "$LINENO" 5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of native executables" >&5
+$as_echo_n "checking for suffix of native executables... " >&6; }
+ rm -f a.* b.* a_out.exe conftest.*
+ echo > conftest.c "int main() { return 0;}"
+ ${CC_BUILD} conftest.c || as_fn_error $? "native C compiler is not working" "$LINENO" 5
+ 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.*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT_BUILD" >&5
+$as_echo "$EXEEXT_BUILD" >&6; }
+else
+ CC_BUILD=${CC}
+ EXEEXT_BUILD=${EXEEXT}
+fi
+
+
+
+
+
+# auxiliary programs
+
+# Extract the first word of "rmdir", so it can be a program name with args.
+set dummy rmdir; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RMDIR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RMDIR"; then
+ ac_cv_prog_RMDIR="$RMDIR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RMDIR="rmdir"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RMDIR=$ac_cv_prog_RMDIR
+if test -n "$RMDIR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
+$as_echo "$RMDIR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+# 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.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+case "$INSTALL" in
+/*)
+ ;;
+*/*)
+ INSTALL="`pwd`/$INSTALL"
+ ;;
+esac
+
+
+# checks for header files
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+for ac_header in fcntl.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# checks for typedefs, structures, and compiler characteristics
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this sort of thing. */
+ typedef int charset[2];
+ const charset cs = { 0, 0 };
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this sort of thing. */
+ char tx;
+ char *t = &tx;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; } bx;
+ struct s *b = &bx; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+
+# check whether cpp computation of size of int and long in ftconfig.in works
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpp computation of bit length in ftconfig.in works" >&5
+$as_echo_n "checking whether cpp computation of bit length in ftconfig.in works... " >&6; }
+orig_CPPFLAGS="${CPPFLAGS}"
+CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}"
+
+ac_clean_files=
+for f in ft2build.h ftoption.h ftstdlib.h; do
+ if test ! -f $f; then
+ ac_clean_files="$ac_clean_files $f"
+ touch $f
+ fi
+done
+
+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`
+rm -f conftest.* $ac_clean_files
+
+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
+
+# Check whether --enable-biarch-config was given.
+if test "${enable_biarch_config+set}" = set; then :
+ enableval=$enable_biarch_config;
+fi
+
+
+case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in
+ :yes:yes:)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: broken but use it" >&5
+$as_echo "broken but use it" >&6; }
+ unset ft_use_autoconf_sizeof_types
+ ;;
+ ::no:)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: works but ignore it" >&5
+$as_echo "works but ignore it" >&6; }
+ ft_use_autoconf_sizeof_types=yes
+ ;;
+ ::yes: | :::)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ unset ft_use_autoconf_sizeof_types
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ft_use_autoconf_sizeof_types=yes
+ ;;
+esac
+
+if test x"${ft_use_autoconf_sizeof_types}" = xyes; then
+
+$as_echo "#define FT_USE_AUTOCONF_SIZEOF_TYPES /**/" >>confdefs.h
+
+fi
+
+CPPFLAGS="${orig_CPPFLAGS}"
+
+
+# checks for library functions
+
+# Here we check whether we can use our mmap file component.
+
+# Check whether --enable-mmap was given.
+if test "${enable_mmap+set}" = set; then :
+ enableval=$enable_mmap; enable_mmap="no"
+else
+ enable_mmap="yes"
+fi
+
+if test "x${enable_mmap}" != "xno"; then
+
+
+
+ for ac_header in $ac_header_list
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+for ac_func in getpagesize
+do :
+ ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
+$as_echo_n "checking for working mmap... " >&6; }
+if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the file system buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propagated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+char *malloc ();
+#endif
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+int
+main ()
+{
+ char *data, *data2, *data3;
+ const char *cdata2;
+ int i, pagesize;
+ int fd, fd2;
+
+ pagesize = getpagesize ();
+
+ /* First, make a file with some known garbage in it. */
+ data = (char *) malloc (pagesize);
+ if (!data)
+ return 1;
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand ();
+ umask (0);
+ fd = creat ("conftest.mmap", 0600);
+ if (fd < 0)
+ return 2;
+ if (write (fd, data, pagesize) != pagesize)
+ return 3;
+ close (fd);
+
+ /* Next, check that the tail of a page is zero-filled. File must have
+ non-zero length, otherwise we risk SIGBUS for entire page. */
+ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
+ if (fd2 < 0)
+ return 4;
+ cdata2 = "";
+ if (write (fd2, cdata2, 1) != 1)
+ return 5;
+ data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
+ if (data2 == MAP_FAILED)
+ return 6;
+ for (i = 0; i < pagesize; ++i)
+ if (*(data2 + i))
+ return 7;
+ close (fd2);
+ if (munmap (data2, pagesize))
+ return 8;
+
+ /* Next, try to mmap the file at a fixed address which already has
+ something else allocated at it. If we can, also make sure that
+ we see the same garbage. */
+ fd = open ("conftest.mmap", O_RDWR);
+ if (fd < 0)
+ return 9;
+ if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ return 10;
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ return 11;
+
+ /* Finally, make sure that changes to the mapped area do not
+ percolate back to the file as seen by read(). (This is a bug on
+ some variants of i386 svr4.0.) */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = (char *) malloc (pagesize);
+ if (!data3)
+ return 12;
+ if (read (fd, data3, pagesize) != pagesize)
+ return 13;
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ return 14;
+ close (fd);
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_mmap_fixed_mapped=yes
+else
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
+$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+
+$as_echo "#define HAVE_MMAP 1" >>confdefs.h
+
+fi
+rm -f conftest.mmap conftest.txt
+
+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_fn_c_check_decl "$LINENO" "munmap" "ac_cv_have_decl_munmap" "
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/mman.h>
+
+
+"
+if test "x$ac_cv_have_decl_munmap" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MUNMAP $ac_have_decl
+_ACEOF
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for munmap's first parameter type" >&5
+$as_echo_n "checking for munmap's first parameter type... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+
+#include <unistd.h>
+#include <sys/mman.h>
+int munmap(void *, size_t);
+
+
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: void *" >&5
+$as_echo "void *" >&6; }
+
+$as_echo "#define MUNMAP_USES_VOIDP /**/" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: char *" >&5
+$as_echo "char *" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+
+for ac_func in memcpy memmove
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+# get compiler flags right
+#
+# We try to make the compiler work for C89-strict source. Even if the
+# C compiler is gcc and C89 flags are available, some system headers
+# (e.g., Android Bionic libc) are broken in C89 mode. We have to check
+# whether the compilation finishes successfully.
+#
+# Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW.
+#
+# To avoid zillions of
+#
+# ISO C90 does not support 'long long'
+#
+# warnings, we disable `-pedantic' for gcc version < 4.6.
+#
+if test "x$GCC" = xyes; then
+ XX_CFLAGS="-Wall"
+ case "$host" in
+ *-*-mingw*)
+ XX_ANSIFLAGS="-pedantic"
+ ;;
+ *)
+ GCC_VERSION=`$CC -dumpversion`
+ GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([^.][^.]*\).*/\1/'`
+ GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[^.][^.]*.\([^.][^.]*\).*/\1/'`
+
+ XX_PEDANTIC=-pedantic
+ if test $GCC_MAJOR -lt 4; then
+ XX_PEDANTIC=
+ else
+ if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then
+ XX_PEDANTIC=
+ fi
+ fi
+
+ XX_ANSIFLAGS=""
+ for a in $XX_PEDANTIC -ansi
+ do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc compiler flag ${a} to assure ANSI C works correctly" >&5
+$as_echo_n "checking gcc compiler flag ${a} to assure ANSI C works correctly... " >&6; }
+ orig_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+
+#include <stdio.h>
+
+
+int
+main ()
+{
+
+
+ {
+ puts( "" );
+ return 0;
+ }
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok, add it to XX_ANSIFLAGS" >&5
+$as_echo "ok, add it to XX_ANSIFLAGS" >&6; }
+ XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}"
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="${orig_CFLAGS}"
+ done
+ ;;
+ esac
+else
+ case "$host" in
+ *-dec-osf*)
+ CFLAGS=
+ XX_CFLAGS="-std1 -g3"
+ XX_ANSIFLAGS=
+ ;;
+ *)
+ XX_CFLAGS=
+ XX_ANSIFLAGS=
+ ;;
+ esac
+fi
+
+
+
+
+# All library tests below try `pkg-config' first. If that fails, a function
+# from the library is tested in the traditional autoconf way (zlib, bzip2),
+# or a config script is called (libpng).
+#
+# The `xxx_reqpriv' variables are for the `Requires.private' field in
+# `freetype2.pc'. The `xxx_libpriv' variables are for the `Libs.private'
+# field in `freetype2.pc' if pkg-config doesn't find a proper .pc file.
+#
+# The `xxx_libstaticconf' variables are for the `freetype-config' script.
+#
+# Note that a call to PKG_CHECK_MODULES(XXX, ...) sets and creates the
+# output variables `XXX_CFLAGS' and `XXX_LIBS'. In case one or both are set
+# for a library by the user, no entry for this library is added to
+# `Requires.private'. Instead, it gets added to `Libs.private'
+
+
+# check for system zlib
+
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then :
+ withval=$with_zlib;
+else
+ with_zlib=auto
+fi
+
+
+have_zlib=no
+if test x"$with_zlib" = xyes -o x"$with_zlib" = xauto; then
+ zlib_pkg="zlib"
+ have_zlib_pkg=no
+
+ if test x"$ZLIB_CFLAGS" = x -a x"$ZLIB_LIBS" = x; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$zlib_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$zlib_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ have_zlib_pkg=yes
+fi
+ fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5
+$as_echo_n "checking for ZLIB... " >&6; }
+
+if test -n "$ZLIB_CFLAGS"; then
+ pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$zlib_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$zlib_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "$zlib_pkg" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$ZLIB_LIBS"; then
+ pkg_cv_ZLIB_LIBS="$ZLIB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$zlib_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$zlib_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "$zlib_pkg" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$zlib_pkg" 2>&1`
+ else
+ ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$zlib_pkg" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ZLIB_PKG_ERRORS" >&5
+
+ :
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ :
+else
+ ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS
+ ZLIB_LIBS=$pkg_cv_ZLIB_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_zlib="yes (pkg-config)"
+fi
+
+ if test $have_zlib_pkg = yes; then
+ # we have zlib.pc
+ zlib_reqpriv="$zlib_pkg"
+ zlib_libpriv=
+ zlib_libstaticconf=`$PKG_CONFIG --static --libs "$zlib_pkg"`
+ else
+ zlib_reqpriv=
+
+ if test "$have_zlib" != no; then
+ # ZLIB_CFLAGS and ZLIB_LIBS are set by the user
+ zlib_libpriv="$ZLIB_LIBS"
+ zlib_libstaticconf="$ZLIB_LIBS"
+ have_zlib="yes (ZLIB_CFLAGS and ZLIB_LIBS)"
+ else
+ # fall back to standard autoconf test
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzsetparams in -lz" >&5
+$as_echo_n "checking for gzsetparams in -lz... " >&6; }
+if ${ac_cv_lib_z_gzsetparams+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gzsetparams ();
+int
+main ()
+{
+return gzsetparams ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_z_gzsetparams=yes
+else
+ ac_cv_lib_z_gzsetparams=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzsetparams" >&5
+$as_echo "$ac_cv_lib_z_gzsetparams" >&6; }
+if test "x$ac_cv_lib_z_gzsetparams" = xyes; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes; then :
+ have_zlib="yes (autoconf test)"
+ zlib_libpriv="-lz"
+ zlib_libstaticconf="$zlib_libpriv"
+ ZLIB_LIBS="$zlib_libpriv"
+fi
+
+
+fi
+
+ fi
+ fi
+fi
+
+if test x"$with_zlib" = xyes -a "$have_zlib" = no; then
+ as_fn_error $? "external zlib support requested but library not found" "$LINENO" 5
+fi
+
+
+# check for system libbz2
+
+
+# Check whether --with-bzip2 was given.
+if test "${with_bzip2+set}" = set; then :
+ withval=$with_bzip2;
+else
+ with_bzip2=auto
+fi
+
+
+have_bzip2=no
+if test x"$with_bzip2" = xyes -o x"$with_bzip2" = xauto; then
+ bzip2_pkg="bzip2"
+ have_bzip2_pkg=no
+
+ if test x"$BZIP2_CFLAGS" = x -a x"$BZIP2_LIBS" = x; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$bzip2_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$bzip2_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ have_bzip2_pkg=yes
+fi
+ fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZIP2" >&5
+$as_echo_n "checking for BZIP2... " >&6; }
+
+if test -n "$BZIP2_CFLAGS"; then
+ pkg_cv_BZIP2_CFLAGS="$BZIP2_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$bzip2_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$bzip2_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_BZIP2_CFLAGS=`$PKG_CONFIG --cflags "$bzip2_pkg" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$BZIP2_LIBS"; then
+ pkg_cv_BZIP2_LIBS="$BZIP2_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$bzip2_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$bzip2_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_BZIP2_LIBS=`$PKG_CONFIG --libs "$bzip2_pkg" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ BZIP2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$bzip2_pkg" 2>&1`
+ else
+ BZIP2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$bzip2_pkg" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$BZIP2_PKG_ERRORS" >&5
+
+ :
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ :
+else
+ BZIP2_CFLAGS=$pkg_cv_BZIP2_CFLAGS
+ BZIP2_LIBS=$pkg_cv_BZIP2_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_bzip2="yes (pkg-config)"
+fi
+
+ if test $have_bzip2_pkg = yes; then
+ # we have bzip2.pc
+ bzip2_reqpriv="$bzip2_pkg"
+ bzip2_libpriv=
+ bzip2_libstaticconf=`$PKG_CONFIG --static --libs "$bzip2_pkg"`
+ else
+ bzip2_reqpriv=
+
+ if test "$have_bzip2" != no; then
+ # BZIP2_CFLAGS and BZIP2_LIBS are set by the user
+ bzip2_libpriv="$BZIP2_LIBS"
+ bzip2_libstaticconf="$BZIP2_LIBS"
+ have_bzip2="yes (BZIP2_CFLAGS and BZIP2_LIBS)"
+ else
+ # fall back to standard autoconf test
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzDecompress in -lbz2" >&5
+$as_echo_n "checking for BZ2_bzDecompress in -lbz2... " >&6; }
+if ${ac_cv_lib_bz2_BZ2_bzDecompress+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbz2 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char BZ2_bzDecompress ();
+int
+main ()
+{
+return BZ2_bzDecompress ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_bz2_BZ2_bzDecompress=yes
+else
+ ac_cv_lib_bz2_BZ2_bzDecompress=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzDecompress" >&5
+$as_echo "$ac_cv_lib_bz2_BZ2_bzDecompress" >&6; }
+if test "x$ac_cv_lib_bz2_BZ2_bzDecompress" = xyes; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_bzlib_h" = xyes; then :
+ have_bzip2="yes (autoconf test)"
+ bzip2_libpriv="-lbz2"
+ bzip2_libstaticconf="$bzip2_libpriv"
+ BZIP2_LIBS="$bzip2_libpriv"
+fi
+
+
+fi
+
+ fi
+ fi
+fi
+
+if test x"$with_bzip2" = xyes -a "$have_bzip2" = no; then
+ as_fn_error $? "bzip2 support requested but library not found" "$LINENO" 5
+fi
+
+
+# check for system libpng
+
+
+# Check whether --with-png was given.
+if test "${with_png+set}" = set; then :
+ withval=$with_png;
+else
+ with_png=auto
+fi
+
+
+have_libpng=no
+if test x"$with_png" = xyes -o x"$with_png" = xauto; then
+ libpng_pkg="libpng"
+ have_libpng_pkg=no
+
+ if test x"$LIBPNG_CFLAGS" = x -a x"$LIBPNG_LIBS" = x; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libpng_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$libpng_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ have_libpng_pkg=yes
+fi
+ fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPNG" >&5
+$as_echo_n "checking for LIBPNG... " >&6; }
+
+if test -n "$LIBPNG_CFLAGS"; then
+ pkg_cv_LIBPNG_CFLAGS="$LIBPNG_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libpng_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$libpng_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBPNG_CFLAGS=`$PKG_CONFIG --cflags "$libpng_pkg" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBPNG_LIBS"; then
+ pkg_cv_LIBPNG_LIBS="$LIBPNG_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libpng_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$libpng_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBPNG_LIBS=`$PKG_CONFIG --libs "$libpng_pkg" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBPNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$libpng_pkg" 2>&1`
+ else
+ LIBPNG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$libpng_pkg" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBPNG_PKG_ERRORS" >&5
+
+ :
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ :
+else
+ LIBPNG_CFLAGS=$pkg_cv_LIBPNG_CFLAGS
+ LIBPNG_LIBS=$pkg_cv_LIBPNG_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_libpng="yes (pkg-config)"
+fi
+
+ if test $have_libpng_pkg = yes; then
+ # we have libpng.pc
+ libpng_reqpriv="$libpng_pkg"
+ libpng_libpriv=
+ libpng_libstaticconf=`$PKG_CONFIG --static --libs "$libpng_pkg"`
+ else
+ libpng_reqpriv=
+
+ if test "$have_libpng" != no; then
+ # LIBPNG_CFLAGS and LIBPNG_LIBS are set by the user
+ libpng_libpriv="$LIBPNG_LIBS"
+ libpng_libstaticconf="$LIBPNG_LIBS"
+ have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)"
+ else
+ # fall back to config script.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng-config" >&5
+$as_echo_n "checking for libpng-config... " >&6; }
+ if which libpng-config > /dev/null 2>&1; then
+ LIBPNG_CFLAGS=`libpng-config --cflags`
+ LIBPNG_LIBS=`libpng-config --ldflags`
+ libpng_libpriv=`libpng-config --static --ldflags`
+ libpng_libstaticconf="$libpng_libpriv"
+ have_libpng="yes (libpng-config)"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ fi
+ fi
+fi
+
+if test x"$with_png" = xyes -a "$have_libpng" = no; then
+ as_fn_error $? "libpng support requested but library not found" "$LINENO" 5
+fi
+
+
+# check for system libharfbuzz
+
+
+# Check whether --with-harfbuzz was given.
+if test "${with_harfbuzz+set}" = set; then :
+ withval=$with_harfbuzz;
+else
+ with_harfbuzz=auto
+fi
+
+
+have_harfbuzz=no
+if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then
+ harfbuzz_pkg="harfbuzz >= 0.9.19"
+ have_harfbuzz_pkg=no
+
+ if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$harfbuzz_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$harfbuzz_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ have_harfbuzz_pkg=yes
+fi
+ fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HARFBUZZ" >&5
+$as_echo_n "checking for HARFBUZZ... " >&6; }
+
+if test -n "$HARFBUZZ_CFLAGS"; then
+ pkg_cv_HARFBUZZ_CFLAGS="$HARFBUZZ_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$harfbuzz_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$harfbuzz_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_HARFBUZZ_CFLAGS=`$PKG_CONFIG --cflags "$harfbuzz_pkg" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$HARFBUZZ_LIBS"; then
+ pkg_cv_HARFBUZZ_LIBS="$HARFBUZZ_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$harfbuzz_pkg\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$harfbuzz_pkg") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_HARFBUZZ_LIBS=`$PKG_CONFIG --libs "$harfbuzz_pkg" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$harfbuzz_pkg" 2>&1`
+ else
+ HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$harfbuzz_pkg" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$HARFBUZZ_PKG_ERRORS" >&5
+
+ :
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ :
+else
+ HARFBUZZ_CFLAGS=$pkg_cv_HARFBUZZ_CFLAGS
+ HARFBUZZ_LIBS=$pkg_cv_HARFBUZZ_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_harfbuzz="yes (pkg-config)"
+fi
+
+ if test $have_harfbuzz_pkg = yes; then
+ # we have harfbuzz.pc
+ harfbuzz_reqpriv="$harfbuzz_pkg"
+ harfbuzz_libpriv=
+ harfbuzz_libstaticconf=`$PKG_CONFIG --static --libs "$harfbuzz_pkg"`
+ else
+ harfbuzz_reqpriv=
+
+ if test "$have_harfbuzz" != no; then
+ # HARFBUZZ_CFLAGS and HARFBUZZ_LIBS are set by the user
+ harfbuzz_libpriv="$HARFBUZZ_LIBS"
+ harfbuzz_libstaticconf="$HARFBUZZ_LIBS"
+ have_harfbuzz="yes (HARFBUZZ_CFLAGS and HARFBUZZ_LIBS)"
+ else
+ # since HarfBuzz is quite a new library we don't fall back to a
+ # different test; additionally, it has too many dependencies
+ :
+ fi
+ fi
+fi
+
+if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then
+ as_fn_error $? "harfbuzz support requested but library not found" "$LINENO" 5
+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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CFLAGS and LDFLAGS share ${c} ${a}" >&5
+$as_echo_n "checking whether CFLAGS and LDFLAGS share ${c} ${a}... " >&6; }
+ if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, copy to LDFLAGS" >&5
+$as_echo "no, copy to LDFLAGS" >&6; }
+ LDFLAGS="${LDFLAGS} ${c} ${a}"
+ fi
+ shift 1
+ ;;
+ -m32|-m64|-march=*|-mcpu=*) # options taking no argument
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CFLAGS and LDFLAGS share ${c}" >&5
+$as_echo_n "checking whether CFLAGS and LDFLAGS share ${c}... " >&6; }
+ if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, copy to LDFLAGS" >&5
+$as_echo "no, copy to LDFLAGS" >&6; }
+ 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
+
+
+# Check whether --with-old-mac-fonts was given.
+if test "${with_old_mac_fonts+set}" = set; then :
+ withval=$with_old_mac_fonts;
+fi
+
+if test x$with_old_mac_fonts = xyes; then
+ orig_LDFLAGS="${LDFLAGS}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking CoreServices & ApplicationServices of Mac OS X" >&5
+$as_echo_n "checking CoreServices & ApplicationServices of Mac OS X... " >&6; }
+ ft2_extra_libs="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices"
+ LDFLAGS="$LDFLAGS $ft2_extra_libs"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+#endif
+
+
+int
+main ()
+{
+
+
+ short res = 0;
+
+
+ UseResFile( res );
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ ftmac_c='ftmac.c'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OS_INLINE macro is ANSI compatible" >&5
+$as_echo_n "checking whether OS_INLINE macro is ANSI compatible... " >&6; }
+ orig_CFLAGS="$CFLAGS -DFT_MACINTOSH"
+ CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+#endif
+
+
+int
+main ()
+{
+
+
+ /* OSHostByteOrder() is typed as OS_INLINE */
+ int32_t os_byte_order = OSHostByteOrder();
+
+
+ if ( OSBigEndian != os_byte_order )
+ return 1;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ CFLAGS="$orig_CFLAGS"
+ CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1"
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, ANSI incompatible" >&5
+$as_echo "no, ANSI incompatible" >&6; }
+ CFLAGS="$orig_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking type ResourceIndex" >&5
+$as_echo_n "checking type ResourceIndex... " >&6; }
+ orig_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+
+#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
+
+
+int
+main ()
+{
+
+
+ ResourceIndex i = 0;
+ return i;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ CFLAGS="$orig_CFLAGS"
+ CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=1"
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$orig_CFLAGS"
+ CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ ft2_extra_libs=""
+ LDFLAGS="${orig_LDFLAGS}"
+ CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ case x$host_os in
+ xdarwin*)
+ CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
+ ;;
+ *)
+ ;;
+ esac
+fi
+
+
+# Whether to use FileManager, which is deprecated since Mac OS X 10.4.
+
+
+# Check whether --with-fsspec was given.
+if test "${with_fsspec+set}" = set; then :
+ withval=$with_fsspec;
+fi
+
+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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking FSSpec-based FileManager" >&5
+$as_echo_n "checking FSSpec-based FileManager... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+#endif
+
+
+int
+main ()
+{
+
+
+ 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 );
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ CFLAGS="$CFLAGS -DHAVE_FSSPEC=1"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+# Whether to use FileManager in Carbon since MacOS 9.x.
+
+
+# Check whether --with-fsref was given.
+if test "${with_fsref+set}" = set; then :
+ withval=$with_fsref;
+fi
+
+if test x$with_fsref = xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+*** WARNING
+ FreeType2 built without FSRef API cannot load
+ data-fork fonts on MacOS, except of XXX.dfont.
+ " >&5
+$as_echo "$as_me: WARNING:
+*** WARNING
+ FreeType2 built without FSRef API cannot load
+ data-fork fonts on MacOS, except of XXX.dfont.
+ " >&2;}
+ CFLAGS="$CFLAGS -DHAVE_FSREF=0"
+elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking FSRef-based FileManager" >&5
+$as_echo_n "checking FSRef-based FileManager... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+#endif
+
+
+int
+main ()
+{
+
+
+ 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
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ CFLAGS="$CFLAGS -DHAVE_FSREF=1"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ CFLAGS="$CFLAGS -DHAVE_FSREF=0"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+# Whether to use QuickDraw API in ToolBox, which is deprecated since
+# Mac OS X 10.4.
+
+
+# Check whether --with-quickdraw-toolbox was given.
+if test "${with_quickdraw_toolbox+set}" = set; then :
+ withval=$with_quickdraw_toolbox;
+fi
+
+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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking QuickDraw FontManager functions in ToolBox" >&5
+$as_echo_n "checking QuickDraw FontManager functions in ToolBox... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Fonts.h>
+#endif
+
+
+int
+main ()
+{
+
+
+ Str255 familyName;
+ SInt16 familyID = 0;
+ FMInput* fmIn = NULL;
+ FMOutput* fmOut = NULL;
+
+
+ GetFontName( familyID, familyName );
+ GetFNum( familyName, &familyID );
+ fmOut = FMSwapFont( fmIn );
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+# Whether to use QuickDraw API in Carbon, which is deprecated since
+# Mac OS X 10.4.
+
+
+# Check whether --with-quickdraw-carbon was given.
+if test "${with_quickdraw_carbon+set}" = set; then :
+ withval=$with_quickdraw_carbon;
+fi
+
+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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking QuickDraw FontManager functions in Carbon" >&5
+$as_echo_n "checking QuickDraw FontManager functions in Carbon... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Fonts.h>
+#endif
+
+
+int
+main ()
+{
+
+
+ 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 );
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+# Whether to use AppleTypeService since Mac OS X.
+
+
+# Check whether --with-ats was given.
+if test "${with_ats+set}" = set; then :
+ withval=$with_ats;
+fi
+
+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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking AppleTypeService functions" >&5
+$as_echo_n "checking AppleTypeService functions... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+#endif
+
+
+int
+main ()
+{
+
+
+ FSSpec* pathSpec;
+
+
+ ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
+#if HAVE_FSSPEC
+ ATSFontGetFileSpecification( 0, pathSpec );
+#endif
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ CFLAGS="$CFLAGS -DHAVE_ATS=1"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ CFLAGS="$CFLAGS -DHAVE_ATS=0"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+case "$CFLAGS" in
+ *HAVE_FSSPEC* | *HAVE_FSREF* | *HAVE_QUICKDRAW* | *HAVE_ATS* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+*** WARNING
+ FSSpec/FSRef/QuickDraw/ATS options are explicitly given,
+ thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c.
+ " >&5
+$as_echo "$as_me: WARNING:
+*** WARNING
+ FSSpec/FSRef/QuickDraw/ATS options are explicitly given,
+ thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c.
+ " >&2;}
+ CFLAGS="$CFLAGS "'-I$(TOP_DIR)/builds/mac/'
+ ;;
+ *)
+ ;;
+esac
+
+
+# entries in Requires.private are separated by commas;
+REQUIRES_PRIVATE="$zlib_reqpriv, \
+ $bzip2_reqpriv, \
+ $libpng_reqpriv, \
+ $harfbuzz_reqpriv"
+# beautify
+REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \
+ | sed -e 's/^ *//' \
+ -e 's/ *$//' \
+ -e 's/, */,/g' \
+ -e 's/,,*/,/g' \
+ -e 's/^,*//' \
+ -e 's/,*$//' \
+ -e 's/,/, /g'`
+
+LIBS_PRIVATE="$zlib_libpriv \
+ $bzip2_libpriv \
+ $libpng_libpriv \
+ $harfbuzz_libpriv \
+ $ft2_extra_libs"
+# beautify
+LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \
+ | sed -e 's/^ *//' \
+ -e 's/ *$//' \
+ -e 's/ */ /g'`
+
+LIBSSTATIC_CONFIG="-lfreetype \
+ $zlib_libstaticconf \
+ $bzip2_libstaticconf \
+ $libpng_libstaticconf \
+ $harfbuzz_libstaticconf \
+ $ft2_extra_libs"
+# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later
+# on if necessary; also beautify
+LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \
+ | sed -e 's|-L */usr/lib64/* | |g' \
+ -e 's|-L */usr/lib/* | |g' \
+ -e 's/^ *//' \
+ -e 's/ *$//' \
+ -e 's/ */ /g'`
+
+
+
+
+
+
+
+
+
+
+
+
+# changing LDFLAGS value should only be done after
+# lt_cv_prog_compiler_static_works test
+
+if test "$have_zlib" != no; then
+ CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
+ LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+fi
+
+if test "$have_bzip2" != no; then
+ CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
+ LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+fi
+if test "$have_libpng" != no; then
+ CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
+ LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
+fi
+if test "$have_harfbuzz" != no; then
+ CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ"
+ LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS"
+fi
@@ -12776,7 +13775,7 @@ ac_config_headers="$ac_config_headers ftconfig.h:ftconfig.in"
# 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="$ac_config_files unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config freetype2.pc:freetype2.in"
+ac_config_files="$ac_config_files unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in"
# re-generate the Jamfile to use libtool now
@@ -13190,16 +14189,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -13259,28 +14258,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -13301,8 +14288,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by FreeType $as_me 2.4.9, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by FreeType $as_me 2.5.5, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -13367,11 +14354,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-FreeType config.status 2.4.9
-configured by $0, generated by GNU Autoconf 2.68,
+FreeType config.status 2.5.5
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -13461,7 +14448,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -13550,8 +14537,10 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
@@ -13670,8 +14659,10 @@ CFLAGS \
compiler \
lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
nm_file_list_spec \
lt_prog_compiler_no_builtin_flag \
lt_prog_compiler_pic \
@@ -13707,7 +14698,7 @@ old_striplib \
striplib; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -13737,7 +14728,7 @@ sys_lib_search_path_spec \
sys_lib_dlsearch_path_spec; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -13746,19 +14737,16 @@ sys_lib_dlsearch_path_spec; do
done
ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
PACKAGE='$PACKAGE'
VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
RM='$RM'
ofile='$ofile'
@@ -13777,8 +14765,6 @@ do
"ftconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS ftconfig.h:ftconfig.in" ;;
"unix-cc.mk") CONFIG_FILES="$CONFIG_FILES unix-cc.mk:unix-cc.in" ;;
"unix-def.mk") CONFIG_FILES="$CONFIG_FILES unix-def.mk:unix-def.in" ;;
- "freetype-config") CONFIG_FILES="$CONFIG_FILES freetype-config" ;;
- "freetype2.pc") CONFIG_FILES="$CONFIG_FILES freetype2.pc:freetype2.in" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -14336,55 +15322,50 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"libtool":C)
- # See if we are running on zsh, and set the options which allow our
+ # See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
+ if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
- cfgfile="${ofile}T"
+ cfgfile=${ofile}T
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
$RM "$cfgfile"
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool 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 of the License, or
+# (at your option) any later version.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# The names of the tagged configurations supported by this script.
-available_tags=""
+available_tags=''
# ### BEGIN LIBTOOL CONFIG
@@ -14524,16 +15505,22 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
# Transform the output of nm in a proper C declaration.
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
# Transform the output of nm in a C name address pair.
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
# Specify filename containing input files for \$NM.
nm_file_list_spec=$lt_nm_file_list_spec
-# The root where to search for dependent libraries,and in which our libraries should be installed.
+# The root where to search for dependent libraries,and where our libraries should be installed.
lt_sysroot=$lt_sysroot
# The name of the directory that contains temporary libtool files.
@@ -14720,13 +15707,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute
@@ -14784,7 +15771,7 @@ _LT_EOF
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -14793,7 +15780,7 @@ _LT_EOF
esac
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
# We use sed instead of cat because bash on DJGPP gets confused if
@@ -14803,165 +15790,6 @@ ltmain="$ac_aux_dir/ltmain.sh"
sed '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
- if test x"$xsi_shell" = xyes; then
- sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
-func_dirname ()\
-{\
-\ case ${1} in\
-\ */*) func_dirname_result="${1%/*}${2}" ;;\
-\ * ) func_dirname_result="${3}" ;;\
-\ esac\
-} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_basename ()$/,/^} # func_basename /c\
-func_basename ()\
-{\
-\ func_basename_result="${1##*/}"\
-} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
-func_dirname_and_basename ()\
-{\
-\ case ${1} in\
-\ */*) func_dirname_result="${1%/*}${2}" ;;\
-\ * ) func_dirname_result="${3}" ;;\
-\ esac\
-\ func_basename_result="${1##*/}"\
-} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
-func_stripname ()\
-{\
-\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
-\ # positional parameters, so assign one to ordinary parameter first.\
-\ func_stripname_result=${3}\
-\ func_stripname_result=${func_stripname_result#"${1}"}\
-\ func_stripname_result=${func_stripname_result%"${2}"}\
-} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
-func_split_long_opt ()\
-{\
-\ func_split_long_opt_name=${1%%=*}\
-\ func_split_long_opt_arg=${1#*=}\
-} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
-func_split_short_opt ()\
-{\
-\ func_split_short_opt_arg=${1#??}\
-\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
-} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
-func_lo2o ()\
-{\
-\ case ${1} in\
-\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
-\ *) func_lo2o_result=${1} ;;\
-\ esac\
-} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_xform ()$/,/^} # func_xform /c\
-func_xform ()\
-{\
- func_xform_result=${1%.*}.lo\
-} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_arith ()$/,/^} # func_arith /c\
-func_arith ()\
-{\
- func_arith_result=$(( $* ))\
-} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_len ()$/,/^} # func_len /c\
-func_len ()\
-{\
- func_len_result=${#1}\
-} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-fi
-
-if test x"$lt_shell_append" = xyes; then
- sed -e '/^func_append ()$/,/^} # func_append /c\
-func_append ()\
-{\
- eval "${1}+=\\${2}"\
-} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
-func_append_quoted ()\
-{\
-\ func_quote_for_eval "${2}"\
-\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
-} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- # Save a `func_append' function call where possible by direct use of '+='
- sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-else
- # Save a `func_append' function call even when '+=' is not available
- sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
-$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
-fi
-
-
mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
@@ -15009,4 +15837,21 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}:
+
+Library configuration:
+ external zlib: $have_zlib
+ bzip2: $have_bzip2
+ libpng: $have_libpng
+ harfbuzz: $have_harfbuzz
+" >&5
+$as_echo "$as_me:
+
+Library configuration:
+ external zlib: $have_zlib
+ bzip2: $have_bzip2
+ libpng: $have_libpng
+ harfbuzz: $have_harfbuzz
+" >&6;}
+
# end of configure.raw
diff --git a/builds/unix/configure.ac b/builds/unix/configure.ac
index a066216..f6f7546 100644
--- a/builds/unix/configure.ac
+++ b/builds/unix/configure.ac
@@ -2,7 +2,7 @@
#
# Process this file with autoconf to produce a configure script.
#
-# Copyright 2001-2012 by
+# Copyright 2001-2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -11,13 +11,13 @@
# indicate that you have read the license and understand and accept it
# fully.
-AC_INIT([FreeType], [2.4.9], [freetype@nongnu.org], [freetype])
+AC_INIT([FreeType], [2.5.5], [freetype@nongnu.org], [freetype])
AC_CONFIG_SRCDIR([ftconfig.in])
# Don't forget to update docs/VERSION.DLL!
-version_info='14:1:8'
+version_info='17:4:11'
AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
AC_SUBST([ft_version])
@@ -34,6 +34,10 @@ AC_PROG_CC
AC_PROG_CPP
AC_SUBST(EXEEXT)
+PKG_PROG_PKG_CONFIG([0.24])
+
+LT_INIT(win32-dll)
+
# checks for native programs to generate building tool
@@ -66,32 +70,8 @@ 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])
@@ -127,8 +107,14 @@ AC_CHECK_SIZEOF([long])
AC_MSG_CHECKING([whether 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
+
+ac_clean_files=
+for f in ft2build.h ftoption.h ftstdlib.h; do
+ if test ! -f $f; then
+ ac_clean_files="$ac_clean_files $f"
+ touch $f
+ fi
+done
cat > conftest.c <<\_ACEOF
#include <limits.h>
@@ -147,7 +133,7 @@ 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
+rm -f conftest.* $ac_clean_files
if test x != "x${ac_cpp_ft_sizeof_int}" \
-a x != x"${ac_cpp_ft_sizeof_long}"; then
@@ -180,7 +166,8 @@ case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in
esac
if test x"${ft_use_autoconf_sizeof_types}" = xyes; then
- AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES])
+ AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES], [],
+ [Define if autoconf sizeof types should be used.])
fi
CPPFLAGS="${orig_CPPFLAGS}"
@@ -222,35 +209,297 @@ AC_SUBST([FTSYS_SRC])
AC_CHECK_FUNCS([memcpy memmove])
+# get compiler flags right
+#
+# We try to make the compiler work for C89-strict source. Even if the
+# C compiler is gcc and C89 flags are available, some system headers
+# (e.g., Android Bionic libc) are broken in C89 mode. We have to check
+# whether the compilation finishes successfully.
+#
+# Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW.
+#
+# To avoid zillions of
+#
+# ISO C90 does not support 'long long'
+#
+# warnings, we disable `-pedantic' for gcc version < 4.6.
+#
+if test "x$GCC" = xyes; then
+ XX_CFLAGS="-Wall"
+ case "$host" in
+ *-*-mingw*)
+ XX_ANSIFLAGS="-pedantic"
+ ;;
+ *)
+ GCC_VERSION=`$CC -dumpversion`
+ GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'`
+ GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
+
+ XX_PEDANTIC=-pedantic
+ if test $GCC_MAJOR -lt 4; then
+ XX_PEDANTIC=
+ else
+ if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then
+ XX_PEDANTIC=
+ fi
+ fi
+
+ XX_ANSIFLAGS=""
+ for a in $XX_PEDANTIC -ansi
+ do
+ AC_MSG_CHECKING([gcc compiler flag ${a} to assure ANSI C works correctly])
+ orig_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([
+
+#include <stdio.h>
+
+ ],
+ [
+
+ {
+ puts( "" );
+ return 0;
+ }
+
+ ])],
+ [AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS])
+ XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}"
+ ],
+ [AC_MSG_RESULT([no])])
+ CFLAGS="${orig_CFLAGS}"
+ done
+ ;;
+ esac
+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])
+
+
+# All library tests below try `pkg-config' first. If that fails, a function
+# from the library is tested in the traditional autoconf way (zlib, bzip2),
+# or a config script is called (libpng).
+#
+# The `xxx_reqpriv' variables are for the `Requires.private' field in
+# `freetype2.pc'. The `xxx_libpriv' variables are for the `Libs.private'
+# field in `freetype2.pc' if pkg-config doesn't find a proper .pc file.
+#
+# The `xxx_libstaticconf' variables are for the `freetype-config' script.
+#
+# Note that a call to PKG_CHECK_MODULES(XXX, ...) sets and creates the
+# output variables `XXX_CFLAGS' and `XXX_LIBS'. In case one or both are set
+# for a library by the user, no entry for this library is added to
+# `Requires.private'. Instead, it gets added to `Libs.private'
+
+
# 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'])])
+ [AS_HELP_STRING([--with-zlib=@<:@yes|no|auto@:>@],
+ [use system zlib instead of internal library @<:@default=auto@:>@])],
+ [], [with_zlib=auto])
+
+have_zlib=no
+if test x"$with_zlib" = xyes -o x"$with_zlib" = xauto; then
+ zlib_pkg="zlib"
+ have_zlib_pkg=no
+
+ if test x"$ZLIB_CFLAGS" = x -a x"$ZLIB_LIBS" = x; then
+ PKG_CHECK_EXISTS([$zlib_pkg], [have_zlib_pkg=yes])
+ fi
+ PKG_CHECK_MODULES([ZLIB], [$zlib_pkg],
+ [have_zlib="yes (pkg-config)"], [:])
+
+ if test $have_zlib_pkg = yes; then
+ # we have zlib.pc
+ zlib_reqpriv="$zlib_pkg"
+ zlib_libpriv=
+ zlib_libstaticconf=`$PKG_CONFIG --static --libs "$zlib_pkg"`
+ else
+ zlib_reqpriv=
+
+ if test "$have_zlib" != no; then
+ # ZLIB_CFLAGS and ZLIB_LIBS are set by the user
+ zlib_libpriv="$ZLIB_LIBS"
+ zlib_libstaticconf="$ZLIB_LIBS"
+ have_zlib="yes (ZLIB_CFLAGS and ZLIB_LIBS)"
+ else
+ # fall back to standard autoconf test
+ AC_CHECK_LIB([z],
+ [gzsetparams],
+ [AC_CHECK_HEADER([zlib.h],
+ [have_zlib="yes (autoconf test)"
+ zlib_libpriv="-lz"
+ zlib_libstaticconf="$zlib_libpriv"
+ ZLIB_LIBS="$zlib_libpriv"])])
+ fi
+ fi
fi
-if test x$with_zlib != xno && test -n "$LIBZ"; then
- CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
- LDFLAGS="$LDFLAGS $LIBZ"
- SYSTEM_ZLIB=yes
+
+if test x"$with_zlib" = xyes -a "$have_zlib" = no; then
+ AC_MSG_ERROR([external zlib support requested but library not found])
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'])])
+ [AS_HELP_STRING([--with-bzip2=@<:@yes|no|auto@:>@],
+ [support bzip2 compressed fonts @<:@default=auto@:>@])],
+ [], [with_bzip2=auto])
+
+have_bzip2=no
+if test x"$with_bzip2" = xyes -o x"$with_bzip2" = xauto; then
+ bzip2_pkg="bzip2"
+ have_bzip2_pkg=no
+
+ if test x"$BZIP2_CFLAGS" = x -a x"$BZIP2_LIBS" = x; then
+ PKG_CHECK_EXISTS([$bzip2_pkg], [have_bzip2_pkg=yes])
+ fi
+ PKG_CHECK_MODULES([BZIP2], [$bzip2_pkg],
+ [have_bzip2="yes (pkg-config)"], [:])
+
+ if test $have_bzip2_pkg = yes; then
+ # we have bzip2.pc
+ bzip2_reqpriv="$bzip2_pkg"
+ bzip2_libpriv=
+ bzip2_libstaticconf=`$PKG_CONFIG --static --libs "$bzip2_pkg"`
+ else
+ bzip2_reqpriv=
+
+ if test "$have_bzip2" != no; then
+ # BZIP2_CFLAGS and BZIP2_LIBS are set by the user
+ bzip2_libpriv="$BZIP2_LIBS"
+ bzip2_libstaticconf="$BZIP2_LIBS"
+ have_bzip2="yes (BZIP2_CFLAGS and BZIP2_LIBS)"
+ else
+ # fall back to standard autoconf test
+ AC_CHECK_LIB([bz2],
+ [BZ2_bzDecompress],
+ [AC_CHECK_HEADER([bzlib.h],
+ [have_bzip2="yes (autoconf test)"
+ bzip2_libpriv="-lbz2"
+ bzip2_libstaticconf="$bzip2_libpriv"
+ BZIP2_LIBS="$bzip2_libpriv"])])
+ fi
+ fi
+fi
+
+if test x"$with_bzip2" = xyes -a "$have_bzip2" = no; then
+ AC_MSG_ERROR([bzip2 support requested but library not found])
+fi
+
+
+# check for system libpng
+
+AC_ARG_WITH([png],
+ [AS_HELP_STRING([--with-png=@<:@yes|no|auto@:>@],
+ [support png compressed OpenType embedded bitmaps @<:@default=auto@:>@])],
+ [], [with_png=auto])
+
+have_libpng=no
+if test x"$with_png" = xyes -o x"$with_png" = xauto; then
+ libpng_pkg="libpng"
+ have_libpng_pkg=no
+
+ if test x"$LIBPNG_CFLAGS" = x -a x"$LIBPNG_LIBS" = x; then
+ PKG_CHECK_EXISTS([$libpng_pkg], [have_libpng_pkg=yes])
+ fi
+ PKG_CHECK_MODULES([LIBPNG], [$libpng_pkg],
+ [have_libpng="yes (pkg-config)"], [:])
+
+ if test $have_libpng_pkg = yes; then
+ # we have libpng.pc
+ libpng_reqpriv="$libpng_pkg"
+ libpng_libpriv=
+ libpng_libstaticconf=`$PKG_CONFIG --static --libs "$libpng_pkg"`
+ else
+ libpng_reqpriv=
+
+ if test "$have_libpng" != no; then
+ # LIBPNG_CFLAGS and LIBPNG_LIBS are set by the user
+ libpng_libpriv="$LIBPNG_LIBS"
+ libpng_libstaticconf="$LIBPNG_LIBS"
+ have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)"
+ else
+ # fall back to config script.
+ AC_MSG_CHECKING([for libpng-config])
+ if which libpng-config > /dev/null 2>&1; then
+ LIBPNG_CFLAGS=`libpng-config --cflags`
+ LIBPNG_LIBS=`libpng-config --ldflags`
+ libpng_libpriv=`libpng-config --static --ldflags`
+ libpng_libstaticconf="$libpng_libpriv"
+ have_libpng="yes (libpng-config)"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ fi
fi
-if test x$with_bzip2 != xno && test -n "$LIBBZ2"; then
- CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
- LDFLAGS="$LDFLAGS $LIBBZ2"
+
+if test x"$with_png" = xyes -a "$have_libpng" = no; then
+ AC_MSG_ERROR([libpng support requested but library not found])
+fi
+
+
+# check for system libharfbuzz
+
+AC_ARG_WITH([harfbuzz],
+ [AS_HELP_STRING([--with-harfbuzz=@<:@yes|no|auto@:>@],
+ [improve auto-hinting of OpenType fonts @<:@default=auto@:>@])],
+ [], [with_harfbuzz=auto])
+
+have_harfbuzz=no
+if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then
+ harfbuzz_pkg="harfbuzz >= 0.9.19"
+ have_harfbuzz_pkg=no
+
+ if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then
+ PKG_CHECK_EXISTS([$harfbuzz_pkg], [have_harfbuzz_pkg=yes])
+ fi
+ PKG_CHECK_MODULES([HARFBUZZ], [$harfbuzz_pkg],
+ [have_harfbuzz="yes (pkg-config)"], [:])
+
+ if test $have_harfbuzz_pkg = yes; then
+ # we have harfbuzz.pc
+ harfbuzz_reqpriv="$harfbuzz_pkg"
+ harfbuzz_libpriv=
+ harfbuzz_libstaticconf=`$PKG_CONFIG --static --libs "$harfbuzz_pkg"`
+ else
+ harfbuzz_reqpriv=
+
+ if test "$have_harfbuzz" != no; then
+ # HARFBUZZ_CFLAGS and HARFBUZZ_LIBS are set by the user
+ harfbuzz_libpriv="$HARFBUZZ_LIBS"
+ harfbuzz_libstaticconf="$HARFBUZZ_LIBS"
+ have_harfbuzz="yes (HARFBUZZ_CFLAGS and HARFBUZZ_LIBS)"
+ else
+ # since HarfBuzz is quite a new library we don't fall back to a
+ # different test; additionally, it has too many dependencies
+ :
+ fi
+ fi
+fi
+
+if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then
+ AC_MSG_ERROR([harfbuzz support requested but library not found])
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.
@@ -276,7 +525,7 @@ do
shift 1
;;
-m32|-m64|-march=*|-mcpu=*) # options taking no argument
- AC_MSG_RESULT([whether CFLAGS and LDFLAGS share ${c}])
+ AC_MSG_CHECKING([whether CFLAGS and LDFLAGS share ${c}])
if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
then
AC_MSG_RESULT([yes])
@@ -299,15 +548,14 @@ set ${save_config_args}
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"
+ ft2_extra_libs="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices"
+ LDFLAGS="$LDFLAGS $ft2_extra_libs"
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
@@ -393,7 +641,7 @@ if test x$with_old_mac_fonts = xyes; then
CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0"
])],
[AC_MSG_RESULT([not found])
- FT2_EXTRA_LIBS=""
+ ft2_extra_libs=""
LDFLAGS="${orig_LDFLAGS}"
CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"])
else
@@ -408,7 +656,7 @@ else
fi
-# Whether to use FileManager which is deprecated since Mac OS X 10.4.
+# Whether to use FileManager, which is deprecated since Mac OS X 10.4.
AC_ARG_WITH([fsspec],
AS_HELP_STRING([--with-fsspec],
@@ -517,7 +765,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
fi
-# Whether to use QuickDraw API in ToolBox which is deprecated since
+# Whether to use QuickDraw API in ToolBox, which is deprecated since
# Mac OS X 10.4.
AC_ARG_WITH([quickdraw-toolbox],
@@ -559,7 +807,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then
fi
-# Whether to use QuickDraw API in Carbon which is deprecated since
+# Whether to use QuickDraw API in Carbon, which is deprecated since
# Mac OS X 10.4.
AC_ARG_WITH([quickdraw-carbon],
@@ -613,7 +861,6 @@ 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)]))
@@ -664,22 +911,82 @@ case "$CFLAGS" in
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])
+# entries in Requires.private are separated by commas;
+REQUIRES_PRIVATE="$zlib_reqpriv, \
+ $bzip2_reqpriv, \
+ $libpng_reqpriv, \
+ $harfbuzz_reqpriv"
+# beautify
+REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \
+ | sed -e 's/^ *//' \
+ -e 's/ *$//' \
+ -e 's/, */,/g' \
+ -e 's/,,*/,/g' \
+ -e 's/^,*//' \
+ -e 's/,*$//' \
+ -e 's/,/, /g'`
+
+LIBS_PRIVATE="$zlib_libpriv \
+ $bzip2_libpriv \
+ $libpng_libpriv \
+ $harfbuzz_libpriv \
+ $ft2_extra_libs"
+# beautify
+LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \
+ | sed -e 's/^ *//' \
+ -e 's/ *$//' \
+ -e 's/ */ /g'`
+
+LIBSSTATIC_CONFIG="-lfreetype \
+ $zlib_libstaticconf \
+ $bzip2_libstaticconf \
+ $libpng_libstaticconf \
+ $harfbuzz_libstaticconf \
+ $ft2_extra_libs"
+# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later
+# on if necessary; also beautify
+LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \
+ | sed -e 's|-L */usr/lib64/* | |g' \
+ -e 's|-L */usr/lib/* | |g' \
+ -e 's/^ *//' \
+ -e 's/ *$//' \
+ -e 's/ */ /g'`
-LT_INIT(win32-dll)
+AC_SUBST([ftmac_c])
+AC_SUBST([REQUIRES_PRIVATE])
+AC_SUBST([LIBS_PRIVATE])
+AC_SUBST([LIBSSTATIC_CONFIG])
AC_SUBST([hardcode_libdir_flag_spec])
AC_SUBST([wl])
AC_SUBST([build_libtool_libs])
+# changing LDFLAGS value should only be done after
+# lt_cv_prog_compiler_static_works test
+
+if test "$have_zlib" != no; then
+ CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
+ LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+fi
+
+if test "$have_bzip2" != no; then
+ CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
+ LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+fi
+if test "$have_libpng" != no; then
+ CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
+ LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
+fi
+if test "$have_harfbuzz" != no; then
+ CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ"
+ LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS"
+fi
+
+AC_SUBST([CFLAGS])
+AC_SUBST([LDFLAGS])
+
# configuration file -- stay in 8.3 limit
#
# since #undef doesn't survive in configuration header files we replace
@@ -694,9 +1001,7 @@ AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
# 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])
+ unix-def.mk:unix-def.in])
# re-generate the Jamfile to use libtool now
#
@@ -704,4 +1009,13 @@ AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
AC_OUTPUT
+AC_MSG_NOTICE([
+
+Library configuration:
+ external zlib: $have_zlib
+ bzip2: $have_bzip2
+ libpng: $have_libpng
+ harfbuzz: $have_harfbuzz
+])
+
# end of configure.raw
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 111dbab..72543cf 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -2,7 +2,7 @@
#
# Process this file with autoconf to produce a configure script.
#
-# Copyright 2001-2012 by
+# Copyright 2001-2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.in])
# Don't forget to update docs/VERSION.DLL!
-version_info='14:1:8'
+version_info='17:4:11'
AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
AC_SUBST([ft_version])
@@ -34,6 +34,10 @@ AC_PROG_CC
AC_PROG_CPP
AC_SUBST(EXEEXT)
+PKG_PROG_PKG_CONFIG([0.24])
+
+LT_INIT(win32-dll)
+
# checks for native programs to generate building tool
@@ -66,32 +70,8 @@ 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])
@@ -127,8 +107,14 @@ AC_CHECK_SIZEOF([long])
AC_MSG_CHECKING([whether 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
+
+ac_clean_files=
+for f in ft2build.h ftoption.h ftstdlib.h; do
+ if test ! -f $f; then
+ ac_clean_files="$ac_clean_files $f"
+ touch $f
+ fi
+done
cat > conftest.c <<\_ACEOF
#include <limits.h>
@@ -147,7 +133,7 @@ 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
+rm -f conftest.* $ac_clean_files
if test x != "x${ac_cpp_ft_sizeof_int}" \
-a x != x"${ac_cpp_ft_sizeof_long}"; then
@@ -180,7 +166,8 @@ case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in
esac
if test x"${ft_use_autoconf_sizeof_types}" = xyes; then
- AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES])
+ AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES], [],
+ [Define if autoconf sizeof types should be used.])
fi
CPPFLAGS="${orig_CPPFLAGS}"
@@ -222,35 +209,297 @@ AC_SUBST([FTSYS_SRC])
AC_CHECK_FUNCS([memcpy memmove])
+# get compiler flags right
+#
+# We try to make the compiler work for C89-strict source. Even if the
+# C compiler is gcc and C89 flags are available, some system headers
+# (e.g., Android Bionic libc) are broken in C89 mode. We have to check
+# whether the compilation finishes successfully.
+#
+# Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW.
+#
+# To avoid zillions of
+#
+# ISO C90 does not support 'long long'
+#
+# warnings, we disable `-pedantic' for gcc version < 4.6.
+#
+if test "x$GCC" = xyes; then
+ XX_CFLAGS="-Wall"
+ case "$host" in
+ *-*-mingw*)
+ XX_ANSIFLAGS="-pedantic"
+ ;;
+ *)
+ GCC_VERSION=`$CC -dumpversion`
+ GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'`
+ GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
+
+ XX_PEDANTIC=-pedantic
+ if test $GCC_MAJOR -lt 4; then
+ XX_PEDANTIC=
+ else
+ if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then
+ XX_PEDANTIC=
+ fi
+ fi
+
+ XX_ANSIFLAGS=""
+ for a in $XX_PEDANTIC -ansi
+ do
+ AC_MSG_CHECKING([gcc compiler flag ${a} to assure ANSI C works correctly])
+ orig_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([
+
+#include <stdio.h>
+
+ ],
+ [
+
+ {
+ puts( "" );
+ return 0;
+ }
+
+ ])],
+ [AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS])
+ XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}"
+ ],
+ [AC_MSG_RESULT([no])])
+ CFLAGS="${orig_CFLAGS}"
+ done
+ ;;
+ esac
+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])
+
+
+# All library tests below try `pkg-config' first. If that fails, a function
+# from the library is tested in the traditional autoconf way (zlib, bzip2),
+# or a config script is called (libpng).
+#
+# The `xxx_reqpriv' variables are for the `Requires.private' field in
+# `freetype2.pc'. The `xxx_libpriv' variables are for the `Libs.private'
+# field in `freetype2.pc' if pkg-config doesn't find a proper .pc file.
+#
+# The `xxx_libstaticconf' variables are for the `freetype-config' script.
+#
+# Note that a call to PKG_CHECK_MODULES(XXX, ...) sets and creates the
+# output variables `XXX_CFLAGS' and `XXX_LIBS'. In case one or both are set
+# for a library by the user, no entry for this library is added to
+# `Requires.private'. Instead, it gets added to `Libs.private'
+
+
# 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'])])
+ [AS_HELP_STRING([--with-zlib=@<:@yes|no|auto@:>@],
+ [use system zlib instead of internal library @<:@default=auto@:>@])],
+ [], [with_zlib=auto])
+
+have_zlib=no
+if test x"$with_zlib" = xyes -o x"$with_zlib" = xauto; then
+ zlib_pkg="zlib"
+ have_zlib_pkg=no
+
+ if test x"$ZLIB_CFLAGS" = x -a x"$ZLIB_LIBS" = x; then
+ PKG_CHECK_EXISTS([$zlib_pkg], [have_zlib_pkg=yes])
+ fi
+ PKG_CHECK_MODULES([ZLIB], [$zlib_pkg],
+ [have_zlib="yes (pkg-config)"], [:])
+
+ if test $have_zlib_pkg = yes; then
+ # we have zlib.pc
+ zlib_reqpriv="$zlib_pkg"
+ zlib_libpriv=
+ zlib_libstaticconf=`$PKG_CONFIG --static --libs "$zlib_pkg"`
+ else
+ zlib_reqpriv=
+
+ if test "$have_zlib" != no; then
+ # ZLIB_CFLAGS and ZLIB_LIBS are set by the user
+ zlib_libpriv="$ZLIB_LIBS"
+ zlib_libstaticconf="$ZLIB_LIBS"
+ have_zlib="yes (ZLIB_CFLAGS and ZLIB_LIBS)"
+ else
+ # fall back to standard autoconf test
+ AC_CHECK_LIB([z],
+ [gzsetparams],
+ [AC_CHECK_HEADER([zlib.h],
+ [have_zlib="yes (autoconf test)"
+ zlib_libpriv="-lz"
+ zlib_libstaticconf="$zlib_libpriv"
+ ZLIB_LIBS="$zlib_libpriv"])])
+ fi
+ fi
fi
-if test x$with_zlib != xno && test -n "$LIBZ"; then
- CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
- LDFLAGS="$LDFLAGS $LIBZ"
- SYSTEM_ZLIB=yes
+
+if test x"$with_zlib" = xyes -a "$have_zlib" = no; then
+ AC_MSG_ERROR([external zlib support requested but library not found])
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'])])
+ [AS_HELP_STRING([--with-bzip2=@<:@yes|no|auto@:>@],
+ [support bzip2 compressed fonts @<:@default=auto@:>@])],
+ [], [with_bzip2=auto])
+
+have_bzip2=no
+if test x"$with_bzip2" = xyes -o x"$with_bzip2" = xauto; then
+ bzip2_pkg="bzip2"
+ have_bzip2_pkg=no
+
+ if test x"$BZIP2_CFLAGS" = x -a x"$BZIP2_LIBS" = x; then
+ PKG_CHECK_EXISTS([$bzip2_pkg], [have_bzip2_pkg=yes])
+ fi
+ PKG_CHECK_MODULES([BZIP2], [$bzip2_pkg],
+ [have_bzip2="yes (pkg-config)"], [:])
+
+ if test $have_bzip2_pkg = yes; then
+ # we have bzip2.pc
+ bzip2_reqpriv="$bzip2_pkg"
+ bzip2_libpriv=
+ bzip2_libstaticconf=`$PKG_CONFIG --static --libs "$bzip2_pkg"`
+ else
+ bzip2_reqpriv=
+
+ if test "$have_bzip2" != no; then
+ # BZIP2_CFLAGS and BZIP2_LIBS are set by the user
+ bzip2_libpriv="$BZIP2_LIBS"
+ bzip2_libstaticconf="$BZIP2_LIBS"
+ have_bzip2="yes (BZIP2_CFLAGS and BZIP2_LIBS)"
+ else
+ # fall back to standard autoconf test
+ AC_CHECK_LIB([bz2],
+ [BZ2_bzDecompress],
+ [AC_CHECK_HEADER([bzlib.h],
+ [have_bzip2="yes (autoconf test)"
+ bzip2_libpriv="-lbz2"
+ bzip2_libstaticconf="$bzip2_libpriv"
+ BZIP2_LIBS="$bzip2_libpriv"])])
+ fi
+ fi
+fi
+
+if test x"$with_bzip2" = xyes -a "$have_bzip2" = no; then
+ AC_MSG_ERROR([bzip2 support requested but library not found])
+fi
+
+
+# check for system libpng
+
+AC_ARG_WITH([png],
+ [AS_HELP_STRING([--with-png=@<:@yes|no|auto@:>@],
+ [support png compressed OpenType embedded bitmaps @<:@default=auto@:>@])],
+ [], [with_png=auto])
+
+have_libpng=no
+if test x"$with_png" = xyes -o x"$with_png" = xauto; then
+ libpng_pkg="libpng"
+ have_libpng_pkg=no
+
+ if test x"$LIBPNG_CFLAGS" = x -a x"$LIBPNG_LIBS" = x; then
+ PKG_CHECK_EXISTS([$libpng_pkg], [have_libpng_pkg=yes])
+ fi
+ PKG_CHECK_MODULES([LIBPNG], [$libpng_pkg],
+ [have_libpng="yes (pkg-config)"], [:])
+
+ if test $have_libpng_pkg = yes; then
+ # we have libpng.pc
+ libpng_reqpriv="$libpng_pkg"
+ libpng_libpriv=
+ libpng_libstaticconf=`$PKG_CONFIG --static --libs "$libpng_pkg"`
+ else
+ libpng_reqpriv=
+
+ if test "$have_libpng" != no; then
+ # LIBPNG_CFLAGS and LIBPNG_LIBS are set by the user
+ libpng_libpriv="$LIBPNG_LIBS"
+ libpng_libstaticconf="$LIBPNG_LIBS"
+ have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)"
+ else
+ # fall back to config script.
+ AC_MSG_CHECKING([for libpng-config])
+ if which libpng-config > /dev/null 2>&1; then
+ LIBPNG_CFLAGS=`libpng-config --cflags`
+ LIBPNG_LIBS=`libpng-config --ldflags`
+ libpng_libpriv=`libpng-config --static --ldflags`
+ libpng_libstaticconf="$libpng_libpriv"
+ have_libpng="yes (libpng-config)"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ fi
fi
-if test x$with_bzip2 != xno && test -n "$LIBBZ2"; then
- CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
- LDFLAGS="$LDFLAGS $LIBBZ2"
+
+if test x"$with_png" = xyes -a "$have_libpng" = no; then
+ AC_MSG_ERROR([libpng support requested but library not found])
+fi
+
+
+# check for system libharfbuzz
+
+AC_ARG_WITH([harfbuzz],
+ [AS_HELP_STRING([--with-harfbuzz=@<:@yes|no|auto@:>@],
+ [improve auto-hinting of OpenType fonts @<:@default=auto@:>@])],
+ [], [with_harfbuzz=auto])
+
+have_harfbuzz=no
+if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then
+ harfbuzz_pkg="harfbuzz >= 0.9.19"
+ have_harfbuzz_pkg=no
+
+ if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then
+ PKG_CHECK_EXISTS([$harfbuzz_pkg], [have_harfbuzz_pkg=yes])
+ fi
+ PKG_CHECK_MODULES([HARFBUZZ], [$harfbuzz_pkg],
+ [have_harfbuzz="yes (pkg-config)"], [:])
+
+ if test $have_harfbuzz_pkg = yes; then
+ # we have harfbuzz.pc
+ harfbuzz_reqpriv="$harfbuzz_pkg"
+ harfbuzz_libpriv=
+ harfbuzz_libstaticconf=`$PKG_CONFIG --static --libs "$harfbuzz_pkg"`
+ else
+ harfbuzz_reqpriv=
+
+ if test "$have_harfbuzz" != no; then
+ # HARFBUZZ_CFLAGS and HARFBUZZ_LIBS are set by the user
+ harfbuzz_libpriv="$HARFBUZZ_LIBS"
+ harfbuzz_libstaticconf="$HARFBUZZ_LIBS"
+ have_harfbuzz="yes (HARFBUZZ_CFLAGS and HARFBUZZ_LIBS)"
+ else
+ # since HarfBuzz is quite a new library we don't fall back to a
+ # different test; additionally, it has too many dependencies
+ :
+ fi
+ fi
+fi
+
+if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then
+ AC_MSG_ERROR([harfbuzz support requested but library not found])
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.
@@ -276,7 +525,7 @@ do
shift 1
;;
-m32|-m64|-march=*|-mcpu=*) # options taking no argument
- AC_MSG_RESULT([whether CFLAGS and LDFLAGS share ${c}])
+ AC_MSG_CHECKING([whether CFLAGS and LDFLAGS share ${c}])
if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
then
AC_MSG_RESULT([yes])
@@ -299,15 +548,14 @@ set ${save_config_args}
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"
+ ft2_extra_libs="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices"
+ LDFLAGS="$LDFLAGS $ft2_extra_libs"
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
@@ -393,7 +641,7 @@ if test x$with_old_mac_fonts = xyes; then
CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0"
])],
[AC_MSG_RESULT([not found])
- FT2_EXTRA_LIBS=""
+ ft2_extra_libs=""
LDFLAGS="${orig_LDFLAGS}"
CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"])
else
@@ -408,7 +656,7 @@ else
fi
-# Whether to use FileManager which is deprecated since Mac OS X 10.4.
+# Whether to use FileManager, which is deprecated since Mac OS X 10.4.
AC_ARG_WITH([fsspec],
AS_HELP_STRING([--with-fsspec],
@@ -517,7 +765,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
fi
-# Whether to use QuickDraw API in ToolBox which is deprecated since
+# Whether to use QuickDraw API in ToolBox, which is deprecated since
# Mac OS X 10.4.
AC_ARG_WITH([quickdraw-toolbox],
@@ -559,7 +807,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then
fi
-# Whether to use QuickDraw API in Carbon which is deprecated since
+# Whether to use QuickDraw API in Carbon, which is deprecated since
# Mac OS X 10.4.
AC_ARG_WITH([quickdraw-carbon],
@@ -613,7 +861,6 @@ 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)]))
@@ -664,22 +911,82 @@ case "$CFLAGS" in
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])
+# entries in Requires.private are separated by commas;
+REQUIRES_PRIVATE="$zlib_reqpriv, \
+ $bzip2_reqpriv, \
+ $libpng_reqpriv, \
+ $harfbuzz_reqpriv"
+# beautify
+REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \
+ | sed -e 's/^ *//' \
+ -e 's/ *$//' \
+ -e 's/, */,/g' \
+ -e 's/,,*/,/g' \
+ -e 's/^,*//' \
+ -e 's/,*$//' \
+ -e 's/,/, /g'`
+
+LIBS_PRIVATE="$zlib_libpriv \
+ $bzip2_libpriv \
+ $libpng_libpriv \
+ $harfbuzz_libpriv \
+ $ft2_extra_libs"
+# beautify
+LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \
+ | sed -e 's/^ *//' \
+ -e 's/ *$//' \
+ -e 's/ */ /g'`
+
+LIBSSTATIC_CONFIG="-lfreetype \
+ $zlib_libstaticconf \
+ $bzip2_libstaticconf \
+ $libpng_libstaticconf \
+ $harfbuzz_libstaticconf \
+ $ft2_extra_libs"
+# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later
+# on if necessary; also beautify
+LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \
+ | sed -e 's|-L */usr/lib64/* | |g' \
+ -e 's|-L */usr/lib/* | |g' \
+ -e 's/^ *//' \
+ -e 's/ *$//' \
+ -e 's/ */ /g'`
-LT_INIT(win32-dll)
+AC_SUBST([ftmac_c])
+AC_SUBST([REQUIRES_PRIVATE])
+AC_SUBST([LIBS_PRIVATE])
+AC_SUBST([LIBSSTATIC_CONFIG])
AC_SUBST([hardcode_libdir_flag_spec])
AC_SUBST([wl])
AC_SUBST([build_libtool_libs])
+# changing LDFLAGS value should only be done after
+# lt_cv_prog_compiler_static_works test
+
+if test "$have_zlib" != no; then
+ CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
+ LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+fi
+
+if test "$have_bzip2" != no; then
+ CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
+ LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+fi
+if test "$have_libpng" != no; then
+ CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
+ LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
+fi
+if test "$have_harfbuzz" != no; then
+ CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ"
+ LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS"
+fi
+
+AC_SUBST([CFLAGS])
+AC_SUBST([LDFLAGS])
+
# configuration file -- stay in 8.3 limit
#
# since #undef doesn't survive in configuration header files we replace
@@ -694,9 +1001,7 @@ AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
# 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])
+ unix-def.mk:unix-def.in])
# re-generate the Jamfile to use libtool now
#
@@ -704,4 +1009,13 @@ AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
AC_OUTPUT
+AC_MSG_NOTICE([
+
+Library configuration:
+ external zlib: $have_zlib
+ bzip2: $have_bzip2
+ libpng: $have_libpng
+ harfbuzz: $have_harfbuzz
+])
+
# end of configure.raw
diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk
index b2ae4f4..0506e7d 100644
--- a/builds/unix/detect.mk
+++ b/builds/unix/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002, 2003, 2004, 2006 by
+# Copyright 1996-2000, 2002-2004, 2006, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -76,13 +76,14 @@ ifeq ($(PLATFORM),unix)
have_Makefile := $(wildcard $(OBJ_DIR)/Makefile)
+ CONFIG_SHELL ?= /bin/sh
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)
+ $(CONFIG_SHELL) $(TOP_DIR)/builds/unix/configure $(value CFG)
else
- cd builds/unix; ./configure $(value CFG)
+ cd builds/unix; $(CONFIG_SHELL) ./configure $(value CFG)
endif
endif
diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in
index 815367b..ebc311f 100644
--- a/builds/unix/freetype-config.in
+++ b/builds/unix/freetype-config.in
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 by
+# Copyright 2000-2005, 2008, 2009, 2013, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -9,14 +9,15 @@
# 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@'
+LC_ALL=C
+export LC_ALL
+
+prefix="%prefix%"
+exec_prefix="%exec_prefix%"
+exec_prefix_set="no"
+includedir="%includedir%"
+libdir="%libdir%"
+enable_shared="%build_libtool_libs%"
usage()
{
@@ -37,6 +38,8 @@ Options:
--libtool display library name for linking with libtool
--cflags display flags for compiling with the FreeType
library
+ --static make command line options display flags
+ for static linking
EOF
exit $1
}
@@ -72,7 +75,7 @@ while test $# -gt 0 ; do
echo_exec_prefix=yes
;;
--version)
- echo @ft_version@
+ echo %ft_version%
exit 0
;;
--ftversion)
@@ -87,6 +90,9 @@ while test $# -gt 0 ; do
--libtool)
echo_libtool=yes
;;
+ --static)
+ show_static=yes
+ ;;
*)
usage 1 1>&2
;;
@@ -118,13 +124,13 @@ else
fi
if test "$echo_ft_version" = "yes" ; then
- major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
+ major=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \
| grep FREETYPE_MAJOR \
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
- minor=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
+ minor=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \
| grep FREETYPE_MINOR \
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
- patch=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
+ patch=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \
| grep FREETYPE_PATCH \
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
echo $major.$minor.$patch
@@ -132,20 +138,17 @@ 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
+ echo $cflags
fi
if test "$echo_libs" = "yes" ; then
- rpath=
- if test "$enable_shared" = "yes" ; then
- eval "rpath=\"$hardcode_libdir_flag_spec\""
+ libs="-lfreetype"
+ staticlibs="%LIBSSTATIC_CONFIG%"
+ if test "$show_static" = "yes" ; then
+ libs="$staticlibs"
fi
- libs="-lfreetype @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@"
- if test "${SYSROOT}$libdir" != "/usr/lib" && test "${SYSROOT}$libdir" != "/usr/lib64"; then
+ if test "${SYSROOT}$libdir" != "/usr/lib" &&
+ test "${SYSROOT}$libdir" != "/usr/lib64"; then
echo -L${SYSROOT}$libdir $libs
else
echo $libs
diff --git a/builds/unix/freetype2.in b/builds/unix/freetype2.in
index b731800..a488d96 100644
--- a/builds/unix/freetype2.in
+++ b/builds/unix/freetype2.in
@@ -1,12 +1,14 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
+prefix=%prefix%
+exec_prefix=%exec_prefix%
+libdir=%libdir%
+includedir=%includedir%/freetype2
Name: FreeType 2
+URL: http://freetype.org
Description: A free, high-quality, and portable font engine.
-Version: @ft_version@
+Version: %ft_version%
Requires:
+Requires.private: %REQUIRES_PRIVATE%
Libs: -L${libdir} -lfreetype
-Libs.private: @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@
-Cflags: -I${includedir}/freetype2 -I${includedir}
+Libs.private: %LIBS_PRIVATE%
+Cflags: -I${includedir}
diff --git a/builds/unix/freetype2.m4 b/builds/unix/freetype2.m4
index 3d0ecb3..3a806d9 100644
--- a/builds/unix/freetype2.m4
+++ b/builds/unix/freetype2.m4
@@ -1,7 +1,7 @@
# Configure paths for FreeType2
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
#
-# Copyright 2001, 2003, 2007, 2009 by
+# Copyright 2001, 2003, 2007, 2009, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,7 @@
# generated by Autoconf, under the same distribution terms as the rest of
# that program.
#
-# serial 3
+# serial 4
# AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
# Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
@@ -61,7 +61,7 @@ AC_DEFUN([AC_CHECK_FT2],
fi
if test "x$FT2_CONFIG" = x ; then
- AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no])
+ AC_PATH_TOOL([FT2_CONFIG], [freetype-config], [no])
fi
min_ft_version=m4_if([$1], [], [7.0.1], [$1])
diff --git a/builds/unix/ft2unix.h b/builds/unix/ft2unix.h
deleted file mode 100644
index 6a3b8d9..0000000
--- a/builds/unix/ft2unix.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/***************************************************************************/
-/* */
-/* 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/builds/unix/ftconfig.in b/builds/unix/ftconfig.in
index 9531afd..e66f3ea 100644
--- a/builds/unix/ftconfig.in
+++ b/builds/unix/ftconfig.in
@@ -4,7 +4,7 @@
/* */
/* UNIX-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2004, 2006-2009, 2011 by */
+/* Copyright 1996-2004, 2006-2009, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,9 +27,9 @@
/* Note however that if some specific modifications are needed, we */
/* advise you to place a modified copy in your build directory. */
/* */
- /* The build directory is usually `freetype/builds/<system>', and */
- /* contains system-specific files that are always included first when */
- /* building the library. */
+ /* The build directory is usually `builds/<system>', and contains */
+ /* system-specific files that are always included first when building */
+ /* the library. */
/* */
/*************************************************************************/
@@ -52,7 +52,7 @@ FT_BEGIN_HEADER
/* These macros can be toggled to suit a specific system. The current */
/* ones are defaults used to compile FreeType in an ANSI C environment */
/* (16bit compilers are also supported). Copy this file to your own */
- /* `freetype/builds/<system>' directory, and edit it to port the engine. */
+ /* `builds/<system>' directory, and edit it to port the engine. */
/* */
/*************************************************************************/
@@ -86,7 +86,7 @@ FT_BEGIN_HEADER
#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. */
+ /* is copied from default include/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. */
@@ -175,13 +175,89 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* IntN types */
+ /* <Section> */
+ /* basic_types */
/* */
- /* Used to guarantee the size of some specific integers. */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int16 */
+ /* */
+ /* <Description> */
+ /* A typedef for a 16bit signed integer type. */
+ /* */
+ typedef signed short FT_Int16;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_UInt16 */
+ /* */
+ /* <Description> */
+ /* A typedef for a 16bit unsigned integer type. */
/* */
- typedef signed short FT_Int16;
typedef unsigned short FT_UInt16;
+ /* */
+
+
+ /* this #if 0 ... #endif clause is for documentation purposes */
+#if 0
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int32 */
+ /* */
+ /* <Description> */
+ /* A typedef for a 32bit signed integer type. The size depends on */
+ /* the configuration. */
+ /* */
+ typedef signed XXX FT_Int32;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_UInt32 */
+ /* */
+ /* A typedef for a 32bit unsigned integer type. The size depends on */
+ /* the configuration. */
+ /* */
+ typedef unsigned XXX FT_UInt32;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int64 */
+ /* */
+ /* A typedef for a 64bit signed integer type. The size depends on */
+ /* the configuration. Only defined if there is real 64bit support; */
+ /* otherwise, it gets emulated with a structure (if necessary). */
+ /* */
+ typedef signed XXX FT_Int64;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_UInt64 */
+ /* */
+ /* A typedef for a 64bit unsigned integer type. The size depends on */
+ /* the configuration. Only defined if there is real 64bit support; */
+ /* otherwise, it gets emulated with a structure (if necessary). */
+ /* */
+ typedef unsigned XXX FT_UInt64;
+
+ /* */
+
+#endif
+
#if FT_SIZEOF_INT == 4
typedef signed int FT_Int32;
@@ -217,13 +293,24 @@ FT_BEGIN_HEADER
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
-#define FT_INT64 long
+#define FT_INT64 long
+#define FT_UINT64 unsigned long
-#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+ /*************************************************************************/
+ /* */
+ /* A 64-bit data type may create compilation problems if you compile */
+ /* in strict ANSI mode. To avoid them, we disable other 64-bit data */
+ /* types if __STDC__ is defined. You can however ignore this rule */
+ /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
+ /* */
+#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
/* this compiler provides the __int64 type */
#define FT_LONG64
-#define FT_INT64 __int64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
#elif defined( __BORLANDC__ ) /* Borland C++ */
@@ -232,7 +319,8 @@ FT_BEGIN_HEADER
/* this compiler provides the __int64 type */
#define FT_LONG64
-#define FT_INT64 __int64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
#elif defined( __WATCOMC__ ) /* Watcom C++ */
@@ -241,38 +329,24 @@ FT_BEGIN_HEADER
#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
#define FT_LONG64
-#define FT_INT64 long long int
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned 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 )
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
-#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 /* _MSC_VER */
-#endif /* __STDC__ */
+#endif /* FT_SIZEOF_LONG == 8 */
-#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
+#ifdef FT_LONG64
+ typedef FT_INT64 FT_Int64;
+ typedef FT_UINT64 FT_UInt64;
+#endif
#define FT_BEGIN_STMNT do {
@@ -280,147 +354,6 @@ FT_BEGIN_HEADER
#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
@@ -438,6 +371,9 @@ FT_BEGIN_HEADER
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+#define FT_LOCAL_ARRAY( x ) extern const x
+#define FT_LOCAL_ARRAY_DEF( x ) const x
+
#ifndef FT_BASE
diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c
index 95f8271..7f7b3ac 100644
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* Unix-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2002, 2004-2008, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -235,7 +235,7 @@
if ( !stream )
- return FT_Err_Invalid_Stream_Handle;
+ return FT_THROW( Invalid_Stream_Handle );
/* open the file */
file = open( filepathname, O_RDONLY );
@@ -243,7 +243,7 @@
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
}
/* Here we ensure that a "fork" will _not_ duplicate */
@@ -268,9 +268,9 @@
/* 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). */
+ /* `stream->size' is typedef'd to unsigned long (in `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. */
@@ -317,7 +317,8 @@
}
total_read_count = 0;
- do {
+ do
+ {
ssize_t read_count;
@@ -365,7 +366,7 @@
stream->size = 0;
stream->pos = 0;
- return FT_Err_Cannot_Open_Stream;
+ return FT_THROW( Cannot_Open_Stream );
}
diff --git a/builds/unix/install-sh b/builds/unix/install-sh
index a9244eb..0436737 100755
--- a/builds/unix/install-sh
+++ b/builds/unix/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-01-19.21; # UTC
+scriptversion=2013-10-30.23; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,25 +35,21 @@ scriptversion=2011-01-19.21; # UTC
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
+tab=' '
nl='
'
-IFS=" "" $nl"
+IFS=" $tab$nl"
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
-# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
posix_mkdir=
# Desired mode of installed file.
@@ -137,40 +122,39 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
+ shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
- # Protect names problematic for `test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
@@ -190,7 +174,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
@@ -202,7 +186,7 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
- # It's OK to call `install-sh -d' without argument.
+ # It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
@@ -223,16 +207,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -240,7 +224,7 @@ fi
for src
do
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
@@ -270,40 +254,14 @@ do
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
+ dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
@@ -314,74 +272,74 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
@@ -391,53 +349,51 @@ do
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
esac
- eval "$initialize_posix_glob"
-
oIFS=$IFS
IFS=/
- $posix_glob set -f
+ set -f
set fnord $dstdir
shift
- $posix_glob set +f
+ set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
@@ -472,15 +428,12 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
+ set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
@@ -493,24 +446,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
diff --git a/builds/unix/install.mk b/builds/unix/install.mk
index 2e5ef08..83525ee 100644
--- a/builds/unix/install.mk
+++ b/builds/unix/install.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002, 2003, 2006 by
+# Copyright 1996-2000, 2002, 2003, 2006, 2013, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -24,55 +24,55 @@
# Unix installation and deinstallation targets.
#
-# Note that we no longer install internal headers, and we remove any
-# `internal' subdirectory found in `$(includedir)/freetype2/freetype'.
+# Note that we remove any data in the `freetype' subdirectory found in
+# `$(includedir)/freetype2', which was the previous location of the header
+# files up to version 2.5.0.
#
install: $(PROJECT_LIBRARY)
- $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
- $(DESTDIR)$(libdir)/pkgconfig \
- $(DESTDIR)$(includedir)/freetype2/freetype/config \
- $(DESTDIR)$(includedir)/freetype2/freetype/cache \
- $(DESTDIR)$(bindir) \
- $(DESTDIR)$(datadir)/aclocal
+ $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(libdir)/pkgconfig \
+ $(DESTDIR)$(includedir)/freetype2/config \
+ $(DESTDIR)$(bindir) \
+ $(DESTDIR)$(datadir)/aclocal \
+ $(DESTDIR)$(mandir)/man1
$(LIBTOOL) --mode=install $(INSTALL) \
$(PROJECT_LIBRARY) $(DESTDIR)$(libdir)
- -for P in $(PUBLIC_H) ; do \
- $(INSTALL_DATA) \
- $$P $(DESTDIR)$(includedir)/freetype2/freetype ; \
+ -for P in $(PUBLIC_H) ; do \
+ $(INSTALL_DATA) \
+ $$P $(DESTDIR)$(includedir)/freetype2 ; \
done
- -for P in $(CONFIG_H) ; do \
- $(INSTALL_DATA) \
- $$P $(DESTDIR)$(includedir)/freetype2/freetype/config ; \
+ -for P in $(CONFIG_H) ; do \
+ $(INSTALL_DATA) \
+ $$P $(DESTDIR)$(includedir)/freetype2/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
+ -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/config/*
+ -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/config
+ -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/*
+ -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype
+ $(INSTALL_DATA) $(OBJ_BUILD)/ftconfig.h \
+ $(DESTDIR)$(includedir)/freetype2/config/ftconfig.h
+ $(INSTALL_DATA) $(OBJ_DIR)/ftmodule.h \
+ $(DESTDIR)$(includedir)/freetype2/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
+ $(INSTALL_DATA) $(TOP_DIR)/docs/freetype-config.1 \
+ $(DESTDIR)$(mandir)/man1/freetype-config.1
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
+ -$(DELETE) $(DESTDIR)$(includedir)/freetype2/config/*
+ -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/config
+ -$(DELETE) $(DESTDIR)$(includedir)/freetype2/*
-$(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
+ -$(DELETE) $(DESTDIR)$(mandir)/man1/freetype-config.1
check:
diff --git a/builds/unix/ltmain.sh b/builds/unix/ltmain.sh
index 63ae69d..08f3a26 100644
--- a/builds/unix/ltmain.sh
+++ b/builds/unix/ltmain.sh
@@ -1,9 +1,12 @@
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+## by inline-source v2014-01-03.01
-# libtool (GNU libtool) 2.4.2
+# libtool (GNU libtool) 2.4.2.444.28-053d
+# Provide generalized library-building support services.
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -23,881 +26,2105 @@
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-# --config show all configuration variables
-# --debug enable verbose shell tracing
-# -n, --dry-run display commands without modifying any files
-# --features display basic configuration information and exit
-# --mode=MODE use operation mode MODE
-# --preserve-dup-deps don't remove duplicate dependency libraries
-# --quiet, --silent don't print informational messages
-# --no-quiet, --no-silent
-# print informational messages (default)
-# --no-warn don't display warning messages
-# --tag=TAG use configuration variables from tag TAG
-# -v, --verbose print more informational messages than default
-# --no-verbose don't print the extra informational messages
-# --version print version information
-# -h, --help, --help-all print short, long, or detailed help message
-#
-# MODE must be one of the following:
-#
-# clean remove files from the build directory
-# compile compile a source file into a libtool object
-# execute automatically set library path, then run a program
-# finish complete the installation of libtool libraries
-# install install libraries or executables
-# link create a library or an executable
-# uninstall remove libraries from an installed directory
-#
-# MODE-ARGS vary depending on the MODE. When passed as first option,
-# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-# host-triplet: $host
-# shell: $SHELL
-# compiler: $LTCC
-# compiler flags: $LTCFLAGS
-# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.4.2
-# automake: $automake_version
-# autoconf: $autoconf_version
-#
-# Report bugs to <bug-libtool@gnu.org>.
-# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
-# General help using GNU software: <http://www.gnu.org/gethelp/>.
PROGRAM=libtool
PACKAGE=libtool
-VERSION=2.4.2
-TIMESTAMP=""
-package_revision=1.3337
+VERSION=2.4.2.444.28-053d
+package_revision=2.4.2.444.28
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2014-02-10.13; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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 3 of the License, or
+# (at your option) any later version.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES 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, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
- eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-}
-# NLS nuisances: We save the old values to restore during execute mode.
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
do
- eval "if test \"\${$lt_var+set}\" = set; then
- save_$lt_var=\$$lt_var
- $lt_var=C
- export $lt_var
- lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
- lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ eval "if test set = \"\${$_G_var+set}\"; then
+ save_$_G_var=\$$_G_var
+ $_G_var=C
+ export $_G_var
+ _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
fi"
done
-LC_ALL=C
-LANGUAGE=C
-export LANGUAGE LC_ALL
-$lt_unset CDPATH
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+ _G_progs_list=$1
+ _G_check_func=$2
+ _G_PATH=${3-"$PATH"}
+
+ _G_path_prog_max=0
+ _G_path_prog_found=false
+ _G_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for _G_dir in $_G_PATH; do
+ IFS=$_G_save_IFS
+ test -z "$_G_dir" && _G_dir=.
+ for _G_prog_name in $_G_progs_list; do
+ for _exeext in '' .EXE; do
+ _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+ func_executable_p "$_G_path_prog" || continue
+ case `"$_G_path_prog" --version 2>&1` in
+ *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+ *) $_G_check_func $_G_path_prog
+ func_path_progs_result=$func_check_prog_result
+ ;;
+ esac
+ $_G_path_prog_found && break 3
+ done
+ done
+ done
+ IFS=$_G_save_IFS
+ test -z "$func_path_progs_result" && {
+ echo "no acceptable sed could be found in \$PATH" >&2
+ exit 1
+ }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+ _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for _G_i in 1 2 3 4 5 6 7; do
+ _G_sed_script=$_G_sed_script$nl$_G_sed_script
+ done
+ echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+ _G_sed_script=
+
+ func_check_prog_sed ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo '' >> conftest.nl
+ "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+ rm -f conftest.sed
+ SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+ func_check_prog_grep ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ _G_path_prog_max=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo 'GREP' >> conftest.nl
+ "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+ GREP=$func_path_progs_result
+}
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables. These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
: ${CP="cp -f"}
-test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
: ${MV="mv -f"}
: ${RM="rm -f"}
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
-exit_status=$EXIT_SUCCESS
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" $lt_nl"
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-} # func_dirname may be replaced by extended shell implementation
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
-} # func_basename may be replaced by extended shell implementation
-
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
- func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
-} # func_dirname_and_basename may be replaced by extended shell implementation
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same. If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion. Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+ s/$_G_bs4/&\\
+/g
+ s/^$_G_bs2$_G_dollar/$_G_bs&/
+ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+ s/\n//g"
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
- esac
-} # func_stripname may be replaced by extended shell implementation
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
-# These SED scripts presuppose an absolute path with a trailing slash.
-pathcar='s,^/\([^/]*\).*$,\1,'
-pathcdr='s,^/[^/]*,,'
-removedotparts=':dotsl
- s@/\./@/@g
- t dotsl
- s,/\.$,/,'
-collapseslashes='s@/\{1,\}@/@g'
-finalslash='s,/*$,/,'
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
-# func_normal_abspath PATH
-# Remove doubled-up and trailing slashes, "." path components,
-# and cancel out any ".." path components in PATH after making
-# it an absolute path.
-# value returned in "$func_normal_abspath_result"
-func_normal_abspath ()
-{
- # Start from root dir and reassemble the path.
- func_normal_abspath_result=
- func_normal_abspath_tpath=$1
- func_normal_abspath_altnamespace=
- case $func_normal_abspath_tpath in
- "")
- # Empty path, that just means $cwd.
- func_stripname '' '/' "`pwd`"
- func_normal_abspath_result=$func_stripname_result
- return
- ;;
- # The next three entries are used to spot a run of precisely
- # two leading slashes without using negated character classes;
- # we take advantage of case's first-match behaviour.
- ///*)
- # Unusual form of absolute path, do nothing.
- ;;
- //*)
- # Not necessarily an ordinary path; POSIX reserves leading '//'
- # and for example Cygwin uses it to access remote file shares
- # over CIFS/SMB, so we conserve a leading double slash if found.
- func_normal_abspath_altnamespace=/
- ;;
- /*)
- # Absolute path, do nothing.
- ;;
- *)
- # Relative path, prepend $cwd.
- func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
- ;;
- esac
- # Cancel out all the simple stuff to save iterations. We also want
- # the path to end with a slash for ease of parsing, so make sure
- # there is one (and only one) here.
- func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
- -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
- while :; do
- # Processed it all yet?
- if test "$func_normal_abspath_tpath" = / ; then
- # If we ascended to the root using ".." the result may be empty now.
- if test -z "$func_normal_abspath_result" ; then
- func_normal_abspath_result=/
- fi
- break
- fi
- func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
- -e "$pathcar"`
- func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
- -e "$pathcdr"`
- # Figure out what to do with it
- case $func_normal_abspath_tcomponent in
- "")
- # Trailing empty path component, ignore it.
- ;;
- ..)
- # Parent dir; strip last assembled component from result.
- func_dirname "$func_normal_abspath_result"
- func_normal_abspath_result=$func_dirname_result
- ;;
- *)
- # Actual path component, append it.
- func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
- ;;
- esac
- done
- # Restore leading double-slash if one was found on entry.
- func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
-}
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
-# func_relative_path SRCDIR DSTDIR
-# generates a relative path from SRCDIR to DSTDIR, with a trailing
-# slash if non-empty, suitable for immediately appending a filename
-# without needing to append a separator.
-# value returned in "$func_relative_path_result"
-func_relative_path ()
-{
- func_relative_path_result=
- func_normal_abspath "$1"
- func_relative_path_tlibdir=$func_normal_abspath_result
- func_normal_abspath "$2"
- func_relative_path_tbindir=$func_normal_abspath_result
-
- # Ascend the tree starting from libdir
- while :; do
- # check if we have found a prefix of bindir
- case $func_relative_path_tbindir in
- $func_relative_path_tlibdir)
- # found an exact match
- func_relative_path_tcancelled=
- break
- ;;
- $func_relative_path_tlibdir*)
- # found a matching prefix
- func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
- func_relative_path_tcancelled=$func_stripname_result
- if test -z "$func_relative_path_result"; then
- func_relative_path_result=.
- fi
- break
- ;;
- *)
- func_dirname $func_relative_path_tlibdir
- func_relative_path_tlibdir=${func_dirname_result}
- if test "x$func_relative_path_tlibdir" = x ; then
- # Have to descend all the way to the root!
- func_relative_path_result=../$func_relative_path_result
- func_relative_path_tcancelled=$func_relative_path_tbindir
- break
- fi
- func_relative_path_result=../$func_relative_path_result
- ;;
- esac
- done
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
- # Now calculate path; take care to avoid doubling-up slashes.
- func_stripname '' '/' "$func_relative_path_result"
- func_relative_path_result=$func_stripname_result
- func_stripname '/' '/' "$func_relative_path_tcancelled"
- if test "x$func_stripname_result" != x ; then
- func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
- fi
+# By convention, finish your script with:
+#
+# exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
- # Normalisation. If bindir is libdir, return empty string,
- # else relative path ending with a slash; either way, target
- # file name can be directly appended.
- if test ! -z "$func_relative_path_result"; then
- func_stripname './' '' "$func_relative_path_result/"
- func_relative_path_result=$func_stripname_result
- fi
-}
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath=$0
-# The name of this program:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
-# Make sure we have an absolute path for reexecution:
+# Make sure we have an absolute progpath for reexecution:
case $progpath in
[\\/]*|[A-Za-z]:\\*) ;;
*[\\/]*)
- progdir=$func_dirname_result
+ progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
progdir=`cd "$progdir" && pwd`
- progpath="$progdir/$progname"
+ progpath=$progdir/$progname
;;
*)
- save_IFS="$IFS"
+ _G_IFS=$IFS
IFS=${PATH_SEPARATOR-:}
for progdir in $PATH; do
- IFS="$save_IFS"
+ IFS=$_G_IFS
test -x "$progdir/$progname" && break
done
- IFS="$save_IFS"
+ IFS=$_G_IFS
test -n "$progdir" || progdir=`pwd`
- progpath="$progdir/$progname"
+ progpath=$progdir/$progname
;;
esac
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-# Sed substitution that turns a string into a regex matching for the
-# string literally.
-sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
-# Sed substitution that converts a w32 file name or path
-# which contains forward slashes, into one that contains
-# (escaped) backslashes. A very naive implementation.
-lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
-bs='\\'
-bs2='\\\\'
-bs4='\\\\\\\\'
-dollar='\$'
-sed_double_backslash="\
- s/$bs4/&\\
-/g
- s/^$bs2$dollar/$bs&/
- s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
- s/\n//g"
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
-# Standard options:
opt_dry_run=false
-opt_help=false
opt_quiet=false
opt_verbose=false
-opt_warning=:
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
+# Categories 'all' and 'none' are always available. Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'. Set
+# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
{
- $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+ $debug_cmd
+
+ test -t 1 && {
+ # COLORTERM and USE_ANSI_COLORS environment variables take
+ # precedence, because most terminfo databases neglect to describe
+ # whether color sequences are supported.
+ test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+ if test 1 = "$USE_ANSI_COLORS"; then
+ # Standard ANSI escape sequences
+ tc_reset=''
+ tc_bold=''; tc_standout=''
+ tc_red=''; tc_green=''
+ tc_blue=''; tc_cyan=''
+ else
+ # Otherwise trust the terminfo database after all.
+ test -n "`tput sgr0 2>/dev/null`" && {
+ tc_reset=`tput sgr0`
+ test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+ tc_standout=$tc_bold
+ test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+ test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+ test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+ test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+ test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+ }
+ fi
+ }
+
+ require_term_colors=:
}
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+ # We should try to minimise forks, especially on Windows where they are
+ # unreasonably slow, so skip the feature probes when bash or zsh are
+ # being used:
+ if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+ : ${_G_HAVE_ARITH_OP="yes"}
+ : ${_G_HAVE_XSI_OPS="yes"}
+ # The += operator was introduced in bash 3.1
+ case $BASH_VERSION in
+ [12].* | 3.0 | 3.0*) ;;
+ *)
+ : ${_G_HAVE_PLUSEQ_OP="yes"}
+ ;;
+ esac
+ fi
+
+ # _G_HAVE_PLUSEQ_OP
+ # Can be empty, in which case the shell is probed, "yes" if += is
+ # useable or anything else if it does not work.
+ test -z "$_G_HAVE_PLUSEQ_OP" \
+ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+ && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_append ()
+ {
+ $debug_cmd
+
+ eval "$1+=\$2"
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_append ()
+ {
+ $debug_cmd
+
+ eval "$1=\$$1\$2"
+ }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+ eval 'func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1+=\\ \$func_quote_for_eval_result"
+ }'
+else
+ func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1=\$$1\\ \$func_quote_for_eval_result"
+ }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE. For example:
+#
+# func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
{
- $opt_verbose && func_echo ${1+"$@"}
+ $debug_cmd
- # A bug in bash halts the script if the last line of a function
- # fails when set -e is in force, so we need another command to
- # work around that:
- :
+ eval _G_current_value='`$ECHO $'$1'`'
+ _G_delim=`expr "$2" : '\(.\)'`
+
+ case $_G_delim$_G_current_value$_G_delim in
+ *"$2$_G_delim"*) ;;
+ *) func_append "$@" ;;
+ esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+ test -z "$_G_HAVE_ARITH_OP" \
+ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+ && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+ eval 'func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=$(( $* ))
+ }'
+else
+ func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=`expr "$@"`
+ }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ # If this shell supports suffix pattern removal, then use it to avoid
+ # forking. Hide the definitions single quotes in case the shell chokes
+ # on unsupported syntax...
+ _b='func_basename_result=${1##*/}'
+ _d='case $1 in
+ */*) func_dirname_result=${1%/*}$2 ;;
+ * ) func_dirname_result=$3 ;;
+ esac'
+
+else
+ # ...otherwise fall back to using sed.
+ _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+ _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
+ if test "X$func_dirname_result" = "X$1"; then
+ func_dirname_result=$3
+ else
+ func_append func_dirname_result "$2"
+ fi'
+fi
+
+eval 'func_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+ $debug_cmd
+
+ '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+ '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname: $_G_line"
+ done
+ IFS=$func_echo_IFS
}
-# func_echo_all arg...
+
+# func_echo_all ARG...
+# --------------------
# Invoke $ECHO with all args, space-separated.
func_echo_all ()
{
$ECHO "$*"
}
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
{
- $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+ $debug_cmd
+
+ $require_term_colors
+
+ _G_infix=$1; shift
+ _G_indent=$_G_infix
+ _G_prefix="$progname: $_G_infix: "
+ _G_message=$*
+
+ # Strip color escape sequences before counting printable length
+ for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+ do
+ test -n "$_G_tc" && {
+ _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+ }
+ done
+ _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+
+ func_echo_infix_1_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_infix_1_IFS
+ $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+ _G_prefix=$_G_indent
+ done
+ IFS=$func_echo_infix_1_IFS
}
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
{
- $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+ $debug_cmd
- # bash bug again:
- :
+ $require_term_colors
+
+ func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
}
-# func_fatal_error arg...
+
+# func_fatal_error ARG...
+# -----------------------
# Echo program name prefixed message to standard error, and exit.
func_fatal_error ()
{
- func_error ${1+"$@"}
- exit $EXIT_FAILURE
-}
+ $debug_cmd
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
- func_error ${1+"$@"}
- func_fatal_error "$help"
+ func_error "$*"
+ exit $EXIT_FAILURE
}
-help="Try \`$progname --help' for more information." ## default
-# func_grep expression filename
+# func_grep EXPRESSION FILENAME
+# -----------------------------
# Check whether EXPRESSION matches any line of FILENAME, without output.
func_grep ()
{
+ $debug_cmd
+
$GREP "$1" "$2" >/dev/null 2>&1
}
-# func_mkdir_p directory-path
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+ test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=${#1}
+ }'
+else
+ func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+ }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
# Make sure the entire path to DIRECTORY-PATH is available.
func_mkdir_p ()
{
- my_directory_path="$1"
- my_dir_list=
+ $debug_cmd
+
+ _G_directory_path=$1
+ _G_dir_list=
- if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+ if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
- # Protect directory names starting with `-'
- case $my_directory_path in
- -*) my_directory_path="./$my_directory_path" ;;
+ # Protect directory names starting with '-'
+ case $_G_directory_path in
+ -*) _G_directory_path=./$_G_directory_path ;;
esac
# While some portion of DIR does not yet exist...
- while test ! -d "$my_directory_path"; do
+ while test ! -d "$_G_directory_path"; do
# ...make a list in topmost first order. Use a colon delimited
# list incase some portion of path contains whitespace.
- my_dir_list="$my_directory_path:$my_dir_list"
+ _G_dir_list=$_G_directory_path:$_G_dir_list
# If the last portion added has no slash in it, the list is done
- case $my_directory_path in */*) ;; *) break ;; esac
+ case $_G_directory_path in */*) ;; *) break ;; esac
# ...otherwise throw away the child directory and loop
- my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+ _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
done
- my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+ _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
- save_mkdir_p_IFS="$IFS"; IFS=':'
- for my_dir in $my_dir_list; do
- IFS="$save_mkdir_p_IFS"
- # mkdir can fail with a `File exist' error if two processes
+ func_mkdir_p_IFS=$IFS; IFS=:
+ for _G_dir in $_G_dir_list; do
+ IFS=$func_mkdir_p_IFS
+ # mkdir can fail with a 'File exist' error if two processes
# try to create one of the directories concurrently. Don't
# stop in that case!
- $MKDIR "$my_dir" 2>/dev/null || :
+ $MKDIR "$_G_dir" 2>/dev/null || :
done
- IFS="$save_mkdir_p_IFS"
+ IFS=$func_mkdir_p_IFS
# Bail out if we (or some other process) failed to create a directory.
- test -d "$my_directory_path" || \
- func_fatal_error "Failed to create \`$1'"
+ test -d "$_G_directory_path" || \
+ func_fatal_error "Failed to create '$1'"
fi
}
-# func_mktempdir [string]
+# func_mktempdir [BASENAME]
+# -------------------------
# Make a temporary directory that won't clash with other running
# libtool processes, and avoids race conditions if possible. If
-# given, STRING is the basename for that directory.
+# given, BASENAME is the basename for that directory.
func_mktempdir ()
{
- my_template="${TMPDIR-/tmp}/${1-$progname}"
+ $debug_cmd
- if test "$opt_dry_run" = ":"; then
+ _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+ if test : = "$opt_dry_run"; then
# Return a directory name, but don't create it in dry-run mode
- my_tmpdir="${my_template}-$$"
+ _G_tmpdir=$_G_template-$$
else
# If mktemp works, use that first and foremost
- my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+ _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
- if test ! -d "$my_tmpdir"; then
+ if test ! -d "$_G_tmpdir"; then
# Failing that, at least try and use $RANDOM to avoid a race
- my_tmpdir="${my_template}-${RANDOM-0}$$"
+ _G_tmpdir=$_G_template-${RANDOM-0}$$
- save_mktempdir_umask=`umask`
+ func_mktempdir_umask=`umask`
umask 0077
- $MKDIR "$my_tmpdir"
- umask $save_mktempdir_umask
+ $MKDIR "$_G_tmpdir"
+ umask $func_mktempdir_umask
fi
# If we're not in dry-run mode, bomb out on failure
- test -d "$my_tmpdir" || \
- func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ test -d "$_G_tmpdir" || \
+ func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
fi
- $ECHO "$my_tmpdir"
+ $ECHO "$_G_tmpdir"
}
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
{
- case $1 in
- *[\\\`\"\$]*)
- func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
- *)
- func_quote_for_eval_unquoted_result="$1" ;;
- esac
+ $debug_cmd
- case $func_quote_for_eval_unquoted_result in
- # Double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and and variable
- # expansion for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ # These SED scripts presuppose an absolute path with a trailing slash.
+ _G_pathcar='s|^/\([^/]*\).*$|\1|'
+ _G_pathcdr='s|^/[^/]*||'
+ _G_removedotparts=':dotsl
+ s|/\./|/|g
+ t dotsl
+ s|/\.$|/|'
+ _G_collapseslashes='s|/\{1,\}|/|g'
+ _G_finalslash='s|/*$|/|'
+
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
;;
*)
- func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
esac
+
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test / = "$func_normal_abspath_tpath"; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result"; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
}
-# func_quote_for_expand arg
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+ $debug_cmd
+
+ $opt_quiet || func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+ $debug_cmd
+
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=$func_dirname_result
+ if test -z "$func_relative_path_tlibdir"; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test -n "$func_stripname_result"; then
+ func_append func_relative_path_result "/$func_stripname_result"
+ fi
+
+ # Normalisation. If bindir is libdir, return '.' else relative path.
+ if test -n "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ fi
+
+ test -n "$func_relative_path_result" || func_relative_path_result=.
+
+ :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+# i) func_quote_for_eval_result
+# double-quoted, suitable for a subsequent eval
+# ii) func_quote_for_eval_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified.
+func_quote_for_eval ()
+{
+ $debug_cmd
+
+ func_quote_for_eval_unquoted_result=
+ func_quote_for_eval_result=
+ while test 0 -lt $#; do
+ case $1 in
+ *[\\\`\"\$]*)
+ _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+ *)
+ _G_unquoted_arg=$1 ;;
+ esac
+ if test -n "$func_quote_for_eval_unquoted_result"; then
+ func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+ else
+ func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+ fi
+
+ case $_G_unquoted_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_quoted_arg=\"$_G_unquoted_arg\"
+ ;;
+ *)
+ _G_quoted_arg=$_G_unquoted_arg
+ ;;
+ esac
+
+ if test -n "$func_quote_for_eval_result"; then
+ func_append func_quote_for_eval_result " $_G_quoted_arg"
+ else
+ func_append func_quote_for_eval_result "$_G_quoted_arg"
+ fi
+ shift
+ done
+}
+
+
+# func_quote_for_expand ARG
+# -------------------------
# Aesthetically quote ARG to be evaled later; same as above,
# but do not quote variable references.
func_quote_for_expand ()
{
+ $debug_cmd
+
case $1 in
*[\\\`\"]*)
- my_arg=`$ECHO "$1" | $SED \
- -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ _G_arg=`$ECHO "$1" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
*)
- my_arg="$1" ;;
+ _G_arg=$1 ;;
esac
- case $my_arg in
+ case $_G_arg in
# Double-quote args containing shell metacharacters to delay
# word splitting and command substitution for a subsequent eval.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- my_arg="\"$my_arg\""
+ _G_arg=\"$_G_arg\"
;;
esac
- func_quote_for_expand_result="$my_arg"
+ func_quote_for_expand_result=$_G_arg
}
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_stripname ()
+ {
+ $debug_cmd
+
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary variable first.
+ func_stripname_result=$3
+ func_stripname_result=${func_stripname_result#"$1"}
+ func_stripname_result=${func_stripname_result%"$2"}
+ }'
+else
+ func_stripname ()
+ {
+ $debug_cmd
+
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+ esac
+ }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it.
func_show_eval ()
{
- my_cmd="$1"
- my_fail_exp="${2-:}"
+ $debug_cmd
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
- if ${opt_dry_run-false}; then :; else
- eval "$my_cmd"
- my_status=$?
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
+ func_quote_for_expand "$_G_cmd"
+ eval "func_notquiet $func_quote_for_expand_result"
+
+ $opt_dry_run || {
+ eval "$_G_cmd"
+ _G_status=$?
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
fi
- fi
+ }
}
-# func_show_eval_locale cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it. Use the saved locale for evaluation.
func_show_eval_locale ()
{
- my_cmd="$1"
- my_fail_exp="${2-:}"
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
+ $opt_quiet || {
+ func_quote_for_expand "$_G_cmd"
eval "func_echo $func_quote_for_expand_result"
}
- if ${opt_dry_run-false}; then :; else
- eval "$lt_user_locale
- $my_cmd"
- my_status=$?
- eval "$lt_safe_locale"
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
+ $opt_dry_run || {
+ eval "$_G_user_locale
+ $_G_cmd"
+ _G_status=$?
+ eval "$_G_safe_locale"
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
fi
- fi
+ }
}
+
# func_tr_sh
+# ----------
# Turn $1 into a string suitable for a shell variable name.
# Result is stored in $func_tr_sh_result. All characters
# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
# if $1 begins with a digit, a '_' is prepended as well.
func_tr_sh ()
{
- case $1 in
- [0-9]* | *[!a-zA-Z0-9_]*)
- func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
- ;;
- * )
- func_tr_sh_result=$1
- ;;
- esac
+ $debug_cmd
+
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
}
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
{
- $opt_debug
+ $debug_cmd
- $SED -n '/(C)/!b go
- :more
- /\./!{
- N
- s/\n# / /
- b more
- }
- :go
- /^# '$PROGRAM' (GNU /,/# warranty; / {
- s/^# //
- s/^# *$//
- s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
- p
- }' < "$progpath"
- exit $?
+ $opt_verbose && func_echo "$*"
+
+ :
}
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
{
- $opt_debug
+ $debug_cmd
- $SED -n '/^# Usage:/,/^# *.*--help/ {
- s/^# //
- s/^# *$//
- s/\$progname/'$progname'/
- p
- }' < "$progpath"
- echo
- $ECHO "run \`$progname --help | more' for full usage"
- exit $?
+ $require_term_colors
+
+ func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
}
-# func_help [NOEXIT]
-# Echo long help message to standard output and exit,
-# unless 'noexit' is passed as argument.
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+ $debug_cmd
+
+ # CATEGORY must be in the warning_categories list!
+ case " $warning_categories " in
+ *" $1 "*) ;;
+ *) func_internal_error "invalid warning category '$1'" ;;
+ esac
+
+ _G_category=$1
+ shift
+
+ case " $opt_warning_types " in
+ *" $_G_category "*) $warning_func ${1+"$@"} ;;
+ esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4-p12a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+ $debug_cmd
+
+ printf '%s\n%s\n' "$1" "$2" \
+ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false. Use it like this:
+#
+# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+ $debug_cmd
+
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2014-01-07.03; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+# #!/bin/sh
+# . relative/path/to/funclib.sh
+# . relative/path/to/options-parser
+# scriptversion=1.0
+# func_options ${1+"$@"}
+# eval set dummy "$func_options_result"; shift
+# ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'. Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+ --debug enable verbose shell tracing
+ -W, --warnings=CATEGORY
+ report the warnings falling in CATEGORY [all]
+ -v, --verbose verbosely report processing
+ --version print version information and exit
+ -h, --help print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+ 'all' show all warnings
+ 'none' turn off all the warnings
+ 'error' warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code. A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+ $debug_cmd
+
+ func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not accept hook functions." ;;
+ esac
+
+ eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+ $debug_cmd
+
+ eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+ esac
+
+ eval _G_hook_fns=\$$1_hooks; shift
+
+ for _G_hook in $_G_hook_fns; do
+ eval $_G_hook '"$@"'
+
+ # store returned options list back into positional
+ # parameters for next 'cmd' execution.
+ eval _G_hook_result=\$${_G_hook}_result
+ eval set dummy "$_G_hook_result"; shift
+ done
+
+ func_quote_for_eval ${1+"$@"}
+ func_run_hooks_result=$func_quote_for_eval_result
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'. Like this:
+#
+# my_options_prep ()
+# {
+# $debug_cmd
+#
+# # Extend the existing usage message.
+# usage_message=$usage_message'
+# -s, --silent don'\''t print informational messages
+# '
+#
+# func_quote_for_eval ${1+"$@"}
+# my_options_prep_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_options_prep my_options_prep
+#
+#
+# my_silent_option ()
+# {
+# $debug_cmd
+#
+# # Note that for efficiency, we parse as many options as we can
+# # recognise in a loop before passing the remainder back to the
+# # caller on the first unrecognised argument we encounter.
+# while test $# -gt 0; do
+# opt=$1; shift
+# case $opt in
+# --silent|-s) opt_silent=: ;;
+# # Separate non-argument short options:
+# -s*) func_split_short_opt "$_G_opt"
+# set dummy "$func_split_short_opt_name" \
+# "-$func_split_short_opt_arg" ${1+"$@"}
+# shift
+# ;;
+# *) set dummy "$_G_opt" "$*"; shift; break ;;
+# esac
+# done
+#
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_parse_options my_silent_option
+#
+#
+# my_option_validation ()
+# {
+# $debug_cmd
+#
+# $opt_silent && $opt_verbose && func_fatal_help "\
+# '--silent' and '--verbose' options are mutually exclusive."
+#
+# func_quote_for_eval ${1+"$@"}
+# my_option_validation_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_validate_options my_option_validation
+#
+# You'll alse need to manually amend $usage_message to reflect the extra
+# options you parse. It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+ $debug_cmd
+
+ func_options_prep ${1+"$@"}
+ eval func_parse_options \
+ ${func_options_prep_result+"$func_options_prep_result"}
+ eval func_validate_options \
+ ${func_parse_options_result+"$func_parse_options_result"}
+
+ eval func_run_hooks func_options \
+ ${func_validate_options_result+"$func_validate_options_result"}
+
+ # save modified positional parameters for caller
+ func_options_result=$func_run_hooks_result
+}
+
+
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters. If a hook function modifies that list, and
+# needs to propogate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning.
+func_hookable func_options_prep
+func_options_prep ()
+{
+ $debug_cmd
+
+ # Option defaults:
+ opt_verbose=false
+ opt_warning_types=
+
+ func_run_hooks func_options_prep ${1+"$@"}
+
+ # save modified positional parameters for caller
+ func_options_prep_result=$func_run_hooks_result
+}
+
+
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
+{
+ $debug_cmd
+
+ func_parse_options_result=
+
+ # this just eases exit handling
+ while test $# -gt 0; do
+ # Defer to hook functions for initial option parsing, so they
+ # get priority in the event of reusing an option name.
+ func_run_hooks func_parse_options ${1+"$@"}
+
+ # Adjust func_parse_options positional parameters to match
+ eval set dummy "$func_run_hooks_result"; shift
+
+ # Break out of the loop if we already parsed every option.
+ test $# -gt 0 || break
+
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --debug|-x) debug_cmd='set -x'
+ func_echo "enabling shell trace mode"
+ $debug_cmd
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ set dummy --warnings none ${1+"$@"}
+ shift
+ ;;
+
+ --warnings|--warning|-W)
+ test $# = 0 && func_missing_arg $_G_opt && break
+ case " $warning_categories $1" in
+ *" $1 "*)
+ # trailing space prevents matching last $1 above
+ func_append_uniq opt_warning_types " $1"
+ ;;
+ *all)
+ opt_warning_types=$warning_categories
+ ;;
+ *none)
+ opt_warning_types=none
+ warning_func=:
+ ;;
+ *error)
+ opt_warning_types=$warning_categories
+ warning_func=func_fatal_error
+ ;;
+ *)
+ func_fatal_error \
+ "unsupported warning category: '$1'"
+ ;;
+ esac
+ shift
+ ;;
+
+ --verbose|-v) opt_verbose=: ;;
+ --version) func_version ;;
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+
+ # Separate optargs to long options (plugins may need this):
+ --*=*) func_split_equals "$_G_opt"
+ set dummy "$func_split_equals_lhs" \
+ "$func_split_equals_rhs" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate optargs to short options:
+ -W*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-v*|-x*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
+}
+
+
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
+{
+ $debug_cmd
+
+ # Display all warnings if -W was not given.
+ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
+ func_run_hooks func_validate_options ${1+"$@"}
+
+ # Bail if the options were screwed!
+ $exit_cmd $EXIT_FAILURE
+
+ # save modified positional parameters for caller
+ func_validate_options_result=$func_run_hooks_result
+}
+
+
+
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
+
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ eval \$ECHO \""$fatal_help"\"
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
func_help ()
{
- $opt_debug
-
- $SED -n '/^# Usage:/,/# Report bugs to/ {
- :print
- s/^# //
- s/^# *$//
- s*\$progname*'$progname'*
- s*\$host*'"$host"'*
- s*\$SHELL*'"$SHELL"'*
- s*\$LTCC*'"$LTCC"'*
- s*\$LTCFLAGS*'"$LTCFLAGS"'*
- s*\$LD*'"$LD"'*
- s/\$with_gnu_ld/'"$with_gnu_ld"'/
- s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
- s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
- p
- d
- }
- /^# .* home page:/b print
- /^# General help using/b print
- ' < "$progpath"
- ret=$?
- if test -z "$1"; then
- exit $ret
- fi
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message"
+ exit 0
}
-# func_missing_arg argname
+
+# func_missing_arg ARGNAME
+# ------------------------
# Echo program name prefixed message to standard error and set global
# exit_cmd.
func_missing_arg ()
{
- $opt_debug
+ $debug_cmd
- func_error "missing argument for $1."
+ func_error "Missing argument for '$1'."
exit_cmd=exit
}
-# func_split_short_opt shortopt
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=${1%%=*}
+ func_split_equals_rhs=${1#*=}
+ test "x$func_split_equals_lhs" = "x$1" \
+ && func_split_equals_rhs=
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+ func_split_equals_rhs=
+ test "x$func_split_equals_lhs" = "x$1" \
+ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+ }
+fi #func_split_equals
+
+
+# func_split_short_opt SHORTOPT
+# -----------------------------
# Set func_split_short_opt_name and func_split_short_opt_arg shell
# variables after splitting SHORTOPT after the 2nd character.
-func_split_short_opt ()
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+ func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+ }
+fi #func_split_short_opt
+
+
+# func_usage
+# ----------
+# Echo short help message to standard output and exit.
+func_usage ()
{
- my_sed_short_opt='1s/^\(..\).*$/\1/;q'
- my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+ $debug_cmd
- func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
- func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
-} # func_split_short_opt may be replaced by extended shell implementation
+ func_usage_message
+ $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+ exit 0
+}
-# func_split_long_opt longopt
-# Set func_split_long_opt_name and func_split_long_opt_arg shell
-# variables after splitting LONGOPT at the `=' sign.
-func_split_long_opt ()
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
{
- my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
- my_sed_long_arg='1s/^--[^=]*=//'
+ $debug_cmd
- func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
- func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
-} # func_split_long_opt may be replaced by extended shell implementation
+ eval \$ECHO \""Usage: $usage"\"
+ echo
+ $SED -n 's|^# ||
+ /^Written by/{
+ x;p;x
+ }
+ h
+ /^Written by/q' < "$progpath"
+ echo
+ eval \$ECHO \""$usage_message"\"
+}
-exit_cmd=:
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $debug_cmd
+ printf '%s\n' "$progname $scriptversion"
+ $SED -n '
+ /(C)/!b go
+ :more
+ /\./!{
+ N
+ s|\n# | |
+ b more
+ }
+ :go
+ /^# Written by /,/# warranty; / {
+ s|^# ||
+ s|^# *$||
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+ p
+ }
+ /^# Written by / {
+ s|^# ||
+ p
+ }
+ /^warranty; /q' < "$progpath"
+ exit $?
+}
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
-# Global variables.
-nonopt=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.2.444.28-053d'
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end. This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
{
- eval "${1}=\$${1}\${2}"
-} # func_append may be replaced by extended shell implementation
+ $debug_cmd
-# func_append_quoted var value
-# Quote VALUE and append to the end of shell variable VAR, separated
-# by a space.
-func_append_quoted ()
-{
- func_quote_for_eval "${2}"
- eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
-} # func_append_quoted may be replaced by extended shell implementation
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
-# func_arith arithmetic-term...
-func_arith ()
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
{
- func_arith_result=`expr "${@}"`
-} # func_arith may be replaced by extended shell implementation
+ $debug_cmd
+ $warning_func ${1+"$@"}
+}
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
-} # func_len may be replaced by extended shell implementation
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to '-h'.
+usage_message="Options:
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+ -n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --mode=MODE use operation mode MODE
+ --no-warnings equivalent to '-Wnone'
+ --preserve-dup-deps don't remove duplicate dependency libraries
+ --quiet, --silent don't print informational messages
+ --tag=TAG use configuration variables from tag TAG
+ -v, --verbose print more informational messages than default
+ --version print version information
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
+ -h, --help, --help-all print short, long, or detailed help message
+"
-# func_lo2o object
-func_lo2o ()
-{
- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
-} # func_lo2o may be replaced by extended shell implementation
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message=$long_help_message"
+MODE must be one of the following:
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
-} # func_xform may be replaced by extended shell implementation
+ clean remove files from the build directory
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. When passed as first option,
+'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
+Try '$progname --help --mode=MODE' for a more detailed description of MODE.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+ host-triplet: $host
+ shell: $SHELL
+ compiler: $LTCC
+ compiler flags: $LTCFLAGS
+ linker: $LD (gnu? $with_gnu_ld)
+ version: $progname (GNU libtool) 2.4.2.444.28-053d
+ automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+ autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool@gnu.org>.
+GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+
+
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
+# object suffix.
+
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_lo2o ()
+ {
+ case $1 in
+ *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+ * ) func_lo2o_result=$1 ;;
+ esac
+ }'
+
+ # func_xform LIBOBJ-OR-SOURCE
+ # ---------------------------
+ # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
+ # suffix to a '.lo' libtool-object suffix.
+ eval 'func_xform ()
+ {
+ func_xform_result=${1%.*}.lo
+ }'
+else
+ # ...otherwise fall back to using sed.
+ func_lo2o ()
+ {
+ func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+ }
+
+ func_xform ()
+ {
+ func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+ }
+fi
-# func_fatal_configuration arg...
+# func_fatal_configuration ARG...
+# -------------------------------
# Echo program name prefixed message to standard error, followed by
# a configuration failure hint, and exit.
func_fatal_configuration ()
{
- func_error ${1+"$@"}
- func_error "See the $PACKAGE documentation for more information."
- func_fatal_error "Fatal configuration error."
+ func__fatal_error ${1+"$@"} \
+ "See the $PACKAGE documentation for more information." \
+ "Fatal configuration error."
}
# func_config
+# -----------
# Display the configuration for all the tags in this script.
func_config ()
{
@@ -915,17 +2142,19 @@ func_config ()
exit $?
}
+
# func_features
+# -------------
# Display the features supported by this script.
func_features ()
{
echo "host: $host"
- if test "$build_libtool_libs" = yes; then
+ if test yes = "$build_libtool_libs"; then
echo "enable shared libraries"
else
echo "disable shared libraries"
fi
- if test "$build_old_libs" = yes; then
+ if test yes = "$build_old_libs"; then
echo "enable static libraries"
else
echo "disable static libraries"
@@ -934,298 +2163,327 @@ func_features ()
exit $?
}
-# func_enable_tag tagname
+
+# func_enable_tag TAGNAME
+# -----------------------
# Verify that TAGNAME is valid, and either flag an error and exit, or
# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
# variable here.
func_enable_tag ()
{
- # Global variable:
- tagname="$1"
+ # Global variable:
+ tagname=$1
- re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
- re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
- sed_extractcf="/$re_begincf/,/$re_endcf/p"
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf=/$re_begincf/,/$re_endcf/p
- # Validate tagname.
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- func_fatal_error "invalid tag name: $tagname"
- ;;
- esac
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
- # Don't test for the "default" C tag, as we know it's
- # there but not specially marked.
- case $tagname in
- CC) ;;
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
*)
- if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
- taglist="$taglist $tagname"
-
- # Evaluate the configuration. Be careful to quote the path
- # and the sed script, to avoid splitting on whitespace, but
- # also don't use non-portable quotes within backquotes within
- # quotes we have to do it in 2 steps:
- extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
- eval "$extractedcf"
- else
- func_error "ignoring unknown tag $tagname"
- fi
- ;;
- esac
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
}
+
# func_check_version_match
+# ------------------------
# Ensure that we are using m4 macros, and libtool script from the same
# release of libtool.
func_check_version_match ()
{
- if test "$package_revision" != "$macro_revision"; then
- if test "$VERSION" != "$macro_version"; then
- if test -z "$macro_version"; then
- cat >&2 <<_LT_EOF
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
$progname: definition of this LT_INIT comes from an older release.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
- else
- cat >&2 <<_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
- fi
- else
- cat >&2 <<_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
$progname: but the definition of this LT_INIT comes from revision $macro_revision.
$progname: You should recreate aclocal.m4 with macros from revision $package_revision
$progname: of $PACKAGE $VERSION and run autoconf again.
_LT_EOF
- fi
+ fi
- exit $EXIT_MISMATCH
- fi
+ exit $EXIT_MISMATCH
+ fi
}
-# Shorthand for --mode=foo, only valid as the first argument
-case $1 in
-clean|clea|cle|cl)
- shift; set dummy --mode clean ${1+"$@"}; shift
- ;;
-compile|compil|compi|comp|com|co|c)
- shift; set dummy --mode compile ${1+"$@"}; shift
- ;;
-execute|execut|execu|exec|exe|ex|e)
- shift; set dummy --mode execute ${1+"$@"}; shift
- ;;
-finish|finis|fini|fin|fi|f)
- shift; set dummy --mode finish ${1+"$@"}; shift
- ;;
-install|instal|insta|inst|ins|in|i)
- shift; set dummy --mode install ${1+"$@"}; shift
- ;;
-link|lin|li|l)
- shift; set dummy --mode link ${1+"$@"}; shift
- ;;
-uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
- shift; set dummy --mode uninstall ${1+"$@"}; shift
- ;;
-esac
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+ $debug_mode
+ # Option defaults:
+ opt_config=false
+ opt_dlopen=
+ opt_dry_run=false
+ opt_help=false
+ opt_mode=
+ opt_preserve_dup_deps=false
+ opt_quiet=false
+ nonopt=
+ preserve_args=
-# Option defaults:
-opt_debug=:
-opt_dry_run=false
-opt_config=false
-opt_preserve_dup_deps=false
-opt_features=false
-opt_finish=false
-opt_help=false
-opt_help_all=false
-opt_silent=:
-opt_warning=:
-opt_verbose=:
-opt_silent=false
-opt_verbose=false
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+ # Pass back the list of options.
+ func_quote_for_eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_for_eval_result
+}
+func_add_hook func_options_prep libtool_options_prep
-# Parse options once, thoroughly. This comes as soon as possible in the
-# script to make things like `--version' happen as quickly as we can.
+
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
{
- # this just eases exit handling
- while test $# -gt 0; do
- opt="$1"
- shift
- case $opt in
- --debug|-x) opt_debug='set -x'
- func_echo "enabling shell trace mode"
- $opt_debug
- ;;
- --dry-run|--dryrun|-n)
- opt_dry_run=:
- ;;
- --config)
- opt_config=:
-func_config
- ;;
- --dlopen|-dlopen)
- optarg="$1"
- opt_dlopen="${opt_dlopen+$opt_dlopen
-}$optarg"
- shift
- ;;
- --preserve-dup-deps)
- opt_preserve_dup_deps=:
- ;;
- --features)
- opt_features=:
-func_features
- ;;
- --finish)
- opt_finish=:
-set dummy --mode finish ${1+"$@"}; shift
- ;;
- --help)
- opt_help=:
- ;;
- --help-all)
- opt_help_all=:
-opt_help=': help-all'
- ;;
- --mode)
- test $# = 0 && func_missing_arg $opt && break
- optarg="$1"
- opt_mode="$optarg"
-case $optarg in
- # Valid mode arguments:
- clean|compile|execute|finish|install|link|relink|uninstall) ;;
-
- # Catch anything else as an error
- *) func_error "invalid argument for $opt"
- exit_cmd=exit
- break
- ;;
-esac
- shift
- ;;
- --no-silent|--no-quiet)
- opt_silent=false
-func_append preserve_args " $opt"
- ;;
- --no-warning|--no-warn)
- opt_warning=false
-func_append preserve_args " $opt"
- ;;
- --no-verbose)
- opt_verbose=false
-func_append preserve_args " $opt"
- ;;
- --silent|--quiet)
- opt_silent=:
-func_append preserve_args " $opt"
- opt_verbose=false
- ;;
- --verbose|-v)
- opt_verbose=:
-func_append preserve_args " $opt"
-opt_silent=false
- ;;
- --tag)
- test $# = 0 && func_missing_arg $opt && break
- optarg="$1"
- opt_tag="$optarg"
-func_append preserve_args " $opt $optarg"
-func_enable_tag "$optarg"
- shift
- ;;
-
- -\?|-h) func_usage ;;
- --help) func_help ;;
- --version) func_version ;;
-
- # Separate optargs to long options:
- --*=*)
- func_split_long_opt "$opt"
- set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
- shift
- ;;
-
- # Separate non-argument short options:
- -\?*|-h*|-n*|-v*)
- func_split_short_opt "$opt"
- set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
- shift
- ;;
-
- --) break ;;
- -*) func_fatal_help "unrecognized option \`$opt'" ;;
- *) set dummy "$opt" ${1+"$@"}; shift; break ;;
- esac
- done
+ $debug_cmd
- # Validate options:
+ # Perform our own loop to consume as many options as possible in
+ # each iteration.
+ while test $# -gt 0; do
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+
+ --config) func_config ;;
+
+ --dlopen|-dlopen)
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=: ;;
+
+ --features) func_features ;;
+
+ --finish) set dummy --mode finish ${1+"$@"}; shift ;;
+
+ --help) opt_help=: ;;
+
+ --help-all) opt_help=': help-all' ;;
+
+ --mode) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_mode=$1
+ case $1 in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $_G_opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+ shift
+ ;;
+
+ --no-silent|--no-quiet)
+ opt_quiet=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ opt_warning=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-verbose)
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --silent|--quiet)
+ opt_quiet=:
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --tag) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_tag=$1
+ func_append preserve_args " $_G_opt $1"
+ func_enable_tag "$1"
+ shift
+ ;;
+
+ --verbose|-v) opt_quiet=false
+ opt_verbose=:
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ # An option not handled by this hook function:
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
- # save first non-option argument
- if test "$#" -gt 0; then
- nonopt="$opt"
- shift
- fi
- # preserve --debug
- test "$opt_debug" = : || func_append preserve_args " --debug"
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_parse_options libtool_parse_options
- case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc*)
- # don't eliminate duplications in $postdeps and $predeps
- opt_duplicate_compiler_generated_deps=:
- ;;
- *)
- opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
- ;;
- esac
- $opt_help || {
- # Sanity checks first:
- func_check_version_match
- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- func_fatal_configuration "not configured to build any kind of library"
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+ # save first non-option argument
+ if test 0 -lt $#; then
+ nonopt=$1
+ shift
fi
- # Darwin sucks
- eval std_shrext=\"$shrext_cmds\"
+ # preserve --debug
+ test : = "$debug_cmd" || func_append preserve_args " --debug"
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
- func_error "unrecognized option \`-dlopen'"
- $ECHO "$help" 1>&2
- exit $EXIT_FAILURE
- fi
+ case $host in
+ # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+ # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
- # Change the help message to a mode-specific one.
- generic_help="$help"
- help="Try \`$progname --help --mode=$opt_mode' for more information."
- }
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ test yes != "$build_libtool_libs" \
+ && test yes != "$build_old_libs" \
+ && func_fatal_configuration "not configured to build any kind of library"
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
+ func_error "unrecognized option '-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help=$help
+ help="Try '$progname --help --mode=$opt_mode' for more information."
+ }
- # Bail if the options were screwed
- $exit_cmd $EXIT_FAILURE
+ # Pass back the unparsed argument list
+ func_quote_for_eval ${1+"$@"}
+ libtool_validate_options_result=$func_quote_for_eval_result
}
+func_add_hook func_validate_options libtool_validate_options
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
## ----------- ##
## Main. ##
## ----------- ##
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
+
+# Global variables.
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
# func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
+# True iff FILE is a libtool '.la' library or '.lo' object file.
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_lalib_p ()
@@ -1236,12 +2494,12 @@ func_lalib_p ()
}
# func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
+# True iff FILE is a libtool '.la' library or '.lo' object file.
# This function implements the same check as func_lalib_p without
# resorting to external programs. To this end, it redirects stdin and
# closes it afterwards, without saving the original file descriptor.
# As a safety measure, use it only where a negative result would be
-# fatal anyway. Works if `file' does not exist.
+# fatal anyway. Works if 'file' does not exist.
func_lalib_unsafe_p ()
{
lalib_p=no
@@ -1249,13 +2507,13 @@ func_lalib_unsafe_p ()
for lalib_p_l in 1 2 3 4
do
read lalib_p_line
- case "$lalib_p_line" in
+ case $lalib_p_line in
\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
esac
done
exec 0<&5 5<&-
fi
- test "$lalib_p" = yes
+ test yes = "$lalib_p"
}
# func_ltwrapper_script_p file
@@ -1289,7 +2547,7 @@ func_ltwrapper_scriptname ()
{
func_dirname_and_basename "$1" "" "."
func_stripname '' '.exe' "$func_basename_result"
- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+ func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
}
# func_ltwrapper_p file
@@ -1308,11 +2566,13 @@ func_ltwrapper_p ()
# FAIL_CMD may read-access the current command in variable CMD!
func_execute_cmds ()
{
- $opt_debug
+ $debug_cmd
+
save_ifs=$IFS; IFS='~'
for cmd in $1; do
- IFS=$save_ifs
+ IFS=$sp$nl
eval cmd=\"$cmd\"
+ IFS=$save_ifs
func_show_eval "$cmd" "${2-:}"
done
IFS=$save_ifs
@@ -1324,10 +2584,11 @@ func_execute_cmds ()
# Note that it is not necessary on cygwin/mingw to append a dot to
# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
# behavior happens only for exec(3), not for open(2)! Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
+# 'FILE.' does not work on cygwin managed mounts.
func_source ()
{
- $opt_debug
+ $debug_cmd
+
case $1 in
*/* | *\\*) . "$1" ;;
*) . "./$1" ;;
@@ -1354,10 +2615,10 @@ func_resolve_sysroot ()
# store the result into func_replace_sysroot_result.
func_replace_sysroot ()
{
- case "$lt_sysroot:$1" in
+ case $lt_sysroot:$1 in
?*:"$lt_sysroot"*)
func_stripname "$lt_sysroot" '' "$1"
- func_replace_sysroot_result="=$func_stripname_result"
+ func_replace_sysroot_result='='$func_stripname_result
;;
*)
# Including no sysroot.
@@ -1374,7 +2635,8 @@ func_replace_sysroot ()
# arg is usually of the form 'gcc ...'
func_infer_tag ()
{
- $opt_debug
+ $debug_cmd
+
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
@@ -1393,7 +2655,7 @@ func_infer_tag ()
for z in $available_tags; do
if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
# Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
CC_quoted=
for arg in $CC; do
# Double-quote args containing other shell metacharacters.
@@ -1418,7 +2680,7 @@ func_infer_tag ()
# line option must be used.
if test -z "$tagname"; then
func_echo "unable to infer tagged configuration"
- func_fatal_error "specify a tag with \`--tag'"
+ func_fatal_error "specify a tag with '--tag'"
# else
# func_verbose "using $tagname tagged configuration"
fi
@@ -1434,15 +2696,15 @@ func_infer_tag ()
# but don't create it if we're doing a dry run.
func_write_libtool_object ()
{
- write_libobj=${1}
- if test "$build_libtool_libs" = yes; then
- write_lobj=\'${2}\'
+ write_libobj=$1
+ if test yes = "$build_libtool_libs"; then
+ write_lobj=\'$2\'
else
write_lobj=none
fi
- if test "$build_old_libs" = yes; then
- write_oldobj=\'${3}\'
+ if test yes = "$build_old_libs"; then
+ write_oldobj=\'$3\'
else
write_oldobj=none
fi
@@ -1450,7 +2712,7 @@ func_write_libtool_object ()
$opt_dry_run || {
cat >${write_libobj}T <<EOF
# $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
@@ -1462,7 +2724,7 @@ pic_object=$write_lobj
non_pic_object=$write_oldobj
EOF
- $MV "${write_libobj}T" "${write_libobj}"
+ $MV "${write_libobj}T" "$write_libobj"
}
}
@@ -1482,8 +2744,9 @@ EOF
# be empty on error (or when ARG is empty)
func_convert_core_file_wine_to_w32 ()
{
- $opt_debug
- func_convert_core_file_wine_to_w32_result="$1"
+ $debug_cmd
+
+ func_convert_core_file_wine_to_w32_result=$1
if test -n "$1"; then
# Unfortunately, winepath does not exit with a non-zero error code, so we
# are forced to check the contents of stdout. On the other hand, if the
@@ -1491,9 +2754,9 @@ func_convert_core_file_wine_to_w32 ()
# *an error message* to stdout. So we must check for both error code of
# zero AND non-empty stdout, which explains the odd construction:
func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
- if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+ if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
- $SED -e "$lt_sed_naive_backslashify"`
+ $SED -e "$sed_naive_backslashify"`
else
func_convert_core_file_wine_to_w32_result=
fi
@@ -1514,18 +2777,19 @@ func_convert_core_file_wine_to_w32 ()
# are convertible, then the result may be empty.
func_convert_core_path_wine_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
# unfortunately, winepath doesn't convert paths, only file names
- func_convert_core_path_wine_to_w32_result=""
+ func_convert_core_path_wine_to_w32_result=
if test -n "$1"; then
oldIFS=$IFS
IFS=:
for func_convert_core_path_wine_to_w32_f in $1; do
IFS=$oldIFS
func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
- if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+ if test -n "$func_convert_core_file_wine_to_w32_result"; then
if test -z "$func_convert_core_path_wine_to_w32_result"; then
- func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+ func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
else
func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
fi
@@ -1554,7 +2818,8 @@ func_convert_core_path_wine_to_w32 ()
# environment variable; do not put it in $PATH.
func_cygpath ()
{
- $opt_debug
+ $debug_cmd
+
if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
if test "$?" -ne 0; then
@@ -1563,7 +2828,7 @@ func_cygpath ()
fi
else
func_cygpath_result=
- func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+ func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
fi
}
#end: func_cygpath
@@ -1574,10 +2839,11 @@ func_cygpath ()
# result in func_convert_core_msys_to_w32_result.
func_convert_core_msys_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
# awkward: cmd appends spaces to result
func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+ $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
}
#end: func_convert_core_msys_to_w32
@@ -1588,13 +2854,14 @@ func_convert_core_msys_to_w32 ()
# func_to_host_file_result to ARG1).
func_convert_file_check ()
{
- $opt_debug
- if test -z "$2" && test -n "$1" ; then
+ $debug_cmd
+
+ if test -z "$2" && test -n "$1"; then
func_error "Could not determine host file name corresponding to"
- func_error " \`$1'"
+ func_error " '$1'"
func_error "Continuing, but uninstalled executables may not work."
# Fallback:
- func_to_host_file_result="$1"
+ func_to_host_file_result=$1
fi
}
# end func_convert_file_check
@@ -1606,10 +2873,11 @@ func_convert_file_check ()
# func_to_host_file_result to a simplistic fallback value (see below).
func_convert_path_check ()
{
- $opt_debug
+ $debug_cmd
+
if test -z "$4" && test -n "$3"; then
func_error "Could not determine the host path corresponding to"
- func_error " \`$3'"
+ func_error " '$3'"
func_error "Continuing, but uninstalled executables may not work."
# Fallback. This is a deliberately simplistic "conversion" and
# should not be "improved". See libtool.info.
@@ -1618,7 +2886,7 @@ func_convert_path_check ()
func_to_host_path_result=`echo "$3" |
$SED -e "$lt_replace_pathsep_chars"`
else
- func_to_host_path_result="$3"
+ func_to_host_path_result=$3
fi
fi
}
@@ -1630,9 +2898,10 @@ func_convert_path_check ()
# and appending REPL if ORIG matches BACKPAT.
func_convert_path_front_back_pathsep ()
{
- $opt_debug
+ $debug_cmd
+
case $4 in
- $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+ $1 ) func_to_host_path_result=$3$func_to_host_path_result
;;
esac
case $4 in
@@ -1646,7 +2915,7 @@ func_convert_path_front_back_pathsep ()
##################################################
# $build to $host FILE NAME CONVERSION FUNCTIONS #
##################################################
-# invoked via `$to_host_file_cmd ARG'
+# invoked via '$to_host_file_cmd ARG'
#
# In each case, ARG is the path to be converted from $build to $host format.
# Result will be available in $func_to_host_file_result.
@@ -1657,7 +2926,8 @@ func_convert_path_front_back_pathsep ()
# in func_to_host_file_result.
func_to_host_file ()
{
- $opt_debug
+ $debug_cmd
+
$to_host_file_cmd "$1"
}
# end func_to_host_file
@@ -1669,7 +2939,8 @@ func_to_host_file ()
# in (the comma separated) LAZY, no conversion takes place.
func_to_tool_file ()
{
- $opt_debug
+ $debug_cmd
+
case ,$2, in
*,"$to_tool_file_cmd",*)
func_to_tool_file_result=$1
@@ -1687,7 +2958,7 @@ func_to_tool_file ()
# Copy ARG to func_to_host_file_result.
func_convert_file_noop ()
{
- func_to_host_file_result="$1"
+ func_to_host_file_result=$1
}
# end func_convert_file_noop
@@ -1698,11 +2969,12 @@ func_convert_file_noop ()
# func_to_host_file_result.
func_convert_file_msys_to_w32 ()
{
- $opt_debug
- func_to_host_file_result="$1"
+ $debug_cmd
+
+ func_to_host_file_result=$1
if test -n "$1"; then
func_convert_core_msys_to_w32 "$1"
- func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result=$func_convert_core_msys_to_w32_result
fi
func_convert_file_check "$1" "$func_to_host_file_result"
}
@@ -1714,8 +2986,9 @@ func_convert_file_msys_to_w32 ()
# func_to_host_file_result.
func_convert_file_cygwin_to_w32 ()
{
- $opt_debug
- func_to_host_file_result="$1"
+ $debug_cmd
+
+ func_to_host_file_result=$1
if test -n "$1"; then
# because $build is cygwin, we call "the" cygpath in $PATH; no need to use
# LT_CYGPATH in this case.
@@ -1731,11 +3004,12 @@ func_convert_file_cygwin_to_w32 ()
# and a working winepath. Returns result in func_to_host_file_result.
func_convert_file_nix_to_w32 ()
{
- $opt_debug
- func_to_host_file_result="$1"
+ $debug_cmd
+
+ func_to_host_file_result=$1
if test -n "$1"; then
func_convert_core_file_wine_to_w32 "$1"
- func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
fi
func_convert_file_check "$1" "$func_to_host_file_result"
}
@@ -1747,12 +3021,13 @@ func_convert_file_nix_to_w32 ()
# Returns result in func_to_host_file_result.
func_convert_file_msys_to_cygwin ()
{
- $opt_debug
- func_to_host_file_result="$1"
+ $debug_cmd
+
+ func_to_host_file_result=$1
if test -n "$1"; then
func_convert_core_msys_to_w32 "$1"
func_cygpath -u "$func_convert_core_msys_to_w32_result"
- func_to_host_file_result="$func_cygpath_result"
+ func_to_host_file_result=$func_cygpath_result
fi
func_convert_file_check "$1" "$func_to_host_file_result"
}
@@ -1765,13 +3040,14 @@ func_convert_file_msys_to_cygwin ()
# in func_to_host_file_result.
func_convert_file_nix_to_cygwin ()
{
- $opt_debug
- func_to_host_file_result="$1"
+ $debug_cmd
+
+ func_to_host_file_result=$1
if test -n "$1"; then
# convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
func_convert_core_file_wine_to_w32 "$1"
func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
- func_to_host_file_result="$func_cygpath_result"
+ func_to_host_file_result=$func_cygpath_result
fi
func_convert_file_check "$1" "$func_to_host_file_result"
}
@@ -1781,7 +3057,7 @@ func_convert_file_nix_to_cygwin ()
#############################################
# $build to $host PATH CONVERSION FUNCTIONS #
#############################################
-# invoked via `$to_host_path_cmd ARG'
+# invoked via '$to_host_path_cmd ARG'
#
# In each case, ARG is the path to be converted from $build to $host format.
# The result will be available in $func_to_host_path_result.
@@ -1805,10 +3081,11 @@ func_convert_file_nix_to_cygwin ()
to_host_path_cmd=
func_init_to_host_path_cmd ()
{
- $opt_debug
+ $debug_cmd
+
if test -z "$to_host_path_cmd"; then
func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
- to_host_path_cmd="func_convert_path_${func_stripname_result}"
+ to_host_path_cmd=func_convert_path_$func_stripname_result
fi
}
@@ -1818,7 +3095,8 @@ func_init_to_host_path_cmd ()
# in func_to_host_path_result.
func_to_host_path ()
{
- $opt_debug
+ $debug_cmd
+
func_init_to_host_path_cmd
$to_host_path_cmd "$1"
}
@@ -1829,7 +3107,7 @@ func_to_host_path ()
# Copy ARG to func_to_host_path_result.
func_convert_path_noop ()
{
- func_to_host_path_result="$1"
+ func_to_host_path_result=$1
}
# end func_convert_path_noop
@@ -1840,8 +3118,9 @@ func_convert_path_noop ()
# func_to_host_path_result.
func_convert_path_msys_to_w32 ()
{
- $opt_debug
- func_to_host_path_result="$1"
+ $debug_cmd
+
+ func_to_host_path_result=$1
if test -n "$1"; then
# Remove leading and trailing path separator characters from ARG. MSYS
# behavior is inconsistent here; cygpath turns them into '.;' and ';.';
@@ -1849,7 +3128,7 @@ func_convert_path_msys_to_w32 ()
func_stripname : : "$1"
func_to_host_path_tmp1=$func_stripname_result
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
- func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result=$func_convert_core_msys_to_w32_result
func_convert_path_check : ";" \
"$func_to_host_path_tmp1" "$func_to_host_path_result"
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@@ -1863,8 +3142,9 @@ func_convert_path_msys_to_w32 ()
# func_to_host_file_result.
func_convert_path_cygwin_to_w32 ()
{
- $opt_debug
- func_to_host_path_result="$1"
+ $debug_cmd
+
+ func_to_host_path_result=$1
if test -n "$1"; then
# See func_convert_path_msys_to_w32:
func_stripname : : "$1"
@@ -1883,14 +3163,15 @@ func_convert_path_cygwin_to_w32 ()
# a working winepath. Returns result in func_to_host_file_result.
func_convert_path_nix_to_w32 ()
{
- $opt_debug
- func_to_host_path_result="$1"
+ $debug_cmd
+
+ func_to_host_path_result=$1
if test -n "$1"; then
# See func_convert_path_msys_to_w32:
func_stripname : : "$1"
func_to_host_path_tmp1=$func_stripname_result
func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
- func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
func_convert_path_check : ";" \
"$func_to_host_path_tmp1" "$func_to_host_path_result"
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@@ -1904,15 +3185,16 @@ func_convert_path_nix_to_w32 ()
# Returns result in func_to_host_file_result.
func_convert_path_msys_to_cygwin ()
{
- $opt_debug
- func_to_host_path_result="$1"
+ $debug_cmd
+
+ func_to_host_path_result=$1
if test -n "$1"; then
# See func_convert_path_msys_to_w32:
func_stripname : : "$1"
func_to_host_path_tmp1=$func_stripname_result
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
- func_to_host_path_result="$func_cygpath_result"
+ func_to_host_path_result=$func_cygpath_result
func_convert_path_check : : \
"$func_to_host_path_tmp1" "$func_to_host_path_result"
func_convert_path_front_back_pathsep ":*" "*:" : "$1"
@@ -1927,8 +3209,9 @@ func_convert_path_msys_to_cygwin ()
# func_to_host_file_result.
func_convert_path_nix_to_cygwin ()
{
- $opt_debug
- func_to_host_path_result="$1"
+ $debug_cmd
+
+ func_to_host_path_result=$1
if test -n "$1"; then
# Remove leading and trailing path separator characters from
# ARG. msys behavior is inconsistent here, cygpath turns them
@@ -1937,7 +3220,7 @@ func_convert_path_nix_to_cygwin ()
func_to_host_path_tmp1=$func_stripname_result
func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
- func_to_host_path_result="$func_cygpath_result"
+ func_to_host_path_result=$func_cygpath_result
func_convert_path_check : : \
"$func_to_host_path_tmp1" "$func_to_host_path_result"
func_convert_path_front_back_pathsep ":*" "*:" : "$1"
@@ -1946,13 +3229,31 @@ func_convert_path_nix_to_cygwin ()
# end func_convert_path_nix_to_cygwin
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+ $debug_cmd
+
+ func_dll_def_p_tmp=`$SED -n \
+ -e 's/^[ ]*//' \
+ -e '/^\(;.*\)*$/d' \
+ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
+ -e q \
+ "$1"`
+ test DEF = "$func_dll_def_p_tmp"
+}
+
+
# func_mode_compile arg...
func_mode_compile ()
{
- $opt_debug
+ $debug_cmd
+
# Get the compilation command and the source file.
base_compile=
- srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ srcfile=$nonopt # always keep a non-empty value in "srcfile"
suppress_opt=yes
suppress_output=
arg_mode=normal
@@ -1965,12 +3266,12 @@ func_mode_compile ()
case $arg_mode in
arg )
# do not "continue". Instead, add this to base_compile
- lastarg="$arg"
+ lastarg=$arg
arg_mode=normal
;;
target )
- libobj="$arg"
+ libobj=$arg
arg_mode=normal
continue
;;
@@ -1980,7 +3281,7 @@ func_mode_compile ()
case $arg in
-o)
test -n "$libobj" && \
- func_fatal_error "you cannot specify \`-o' more than once"
+ func_fatal_error "you cannot specify '-o' more than once"
arg_mode=target
continue
;;
@@ -2009,12 +3310,12 @@ func_mode_compile ()
func_stripname '-Wc,' '' "$arg"
args=$func_stripname_result
lastarg=
- save_ifs="$IFS"; IFS=','
+ save_ifs=$IFS; IFS=,
for arg in $args; do
- IFS="$save_ifs"
+ IFS=$save_ifs
func_append_quoted lastarg "$arg"
done
- IFS="$save_ifs"
+ IFS=$save_ifs
func_stripname ' ' '' "$lastarg"
lastarg=$func_stripname_result
@@ -2027,8 +3328,8 @@ func_mode_compile ()
# Accept the current argument as the source file.
# The previous "srcfile" becomes the current argument.
#
- lastarg="$srcfile"
- srcfile="$arg"
+ lastarg=$srcfile
+ srcfile=$arg
;;
esac # case $arg
;;
@@ -2043,13 +3344,13 @@ func_mode_compile ()
func_fatal_error "you must specify an argument for -Xcompile"
;;
target)
- func_fatal_error "you must specify a target with \`-o'"
+ func_fatal_error "you must specify a target with '-o'"
;;
*)
# Get the name of the library object.
test -z "$libobj" && {
func_basename "$srcfile"
- libobj="$func_basename_result"
+ libobj=$func_basename_result
}
;;
esac
@@ -2069,7 +3370,7 @@ func_mode_compile ()
case $libobj in
*.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
*)
- func_fatal_error "cannot determine name of library object from \`$libobj'"
+ func_fatal_error "cannot determine name of library object from '$libobj'"
;;
esac
@@ -2078,8 +3379,8 @@ func_mode_compile ()
for arg in $later; do
case $arg in
-shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
+ test yes = "$build_libtool_libs" \
+ || func_fatal_configuration "cannot build a shared library"
build_old_libs=no
continue
;;
@@ -2105,17 +3406,17 @@ func_mode_compile ()
func_quote_for_eval "$libobj"
test "X$libobj" != "X$func_quote_for_eval_result" \
&& $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
- && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ && func_warning "libobj name '$libobj' may not contain shell special characters."
func_dirname_and_basename "$obj" "/" ""
- objname="$func_basename_result"
- xdir="$func_dirname_result"
- lobj=${xdir}$objdir/$objname
+ objname=$func_basename_result
+ xdir=$func_dirname_result
+ lobj=$xdir$objdir/$objname
test -z "$base_compile" && \
func_fatal_help "you must specify a compilation command"
# Delete any leftover library objects.
- if test "$build_old_libs" = yes; then
+ if test yes = "$build_old_libs"; then
removelist="$obj $lobj $libobj ${libobj}T"
else
removelist="$lobj $libobj ${libobj}T"
@@ -2127,16 +3428,16 @@ func_mode_compile ()
pic_mode=default
;;
esac
- if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
# non-PIC code in shared libraries is not supported
pic_mode=default
fi
# Calculate the filename of the output object if compiler does
# not support -o with -c
- if test "$compiler_c_o" = no; then
- output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
- lockfile="$output_obj.lock"
+ if test no = "$compiler_c_o"; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+ lockfile=$output_obj.lock
else
output_obj=
need_locks=no
@@ -2145,12 +3446,12 @@ func_mode_compile ()
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
- if test "$need_locks" = yes; then
+ if test yes = "$need_locks"; then
until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
func_echo "Waiting for $lockfile to be removed"
sleep 2
done
- elif test "$need_locks" = warn; then
+ elif test warn = "$need_locks"; then
if test -f "$lockfile"; then
$ECHO "\
*** ERROR, $lockfile exists and contains:
@@ -2158,7 +3459,7 @@ func_mode_compile ()
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
+your compiler does not support '-c' and '-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
@@ -2180,11 +3481,11 @@ compiler."
qsrcfile=$func_quote_for_eval_result
# Only build a PIC object if we are building libtool libraries.
- if test "$build_libtool_libs" = yes; then
+ if test yes = "$build_libtool_libs"; then
# Without this assignment, base_compile gets emptied.
fbsd_hideous_sh_bug=$base_compile
- if test "$pic_mode" != no; then
+ if test no != "$pic_mode"; then
command="$base_compile $qsrcfile $pic_flag"
else
# Don't build PIC code
@@ -2201,7 +3502,7 @@ compiler."
func_show_eval_locale "$command" \
'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
- if test "$need_locks" = warn &&
+ if test warn = "$need_locks" &&
test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
$ECHO "\
*** ERROR, $lockfile contains:
@@ -2212,7 +3513,7 @@ $srcfile
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
+your compiler does not support '-c' and '-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
@@ -2228,20 +3529,20 @@ compiler."
fi
# Allow error messages only from the first compilation.
- if test "$suppress_opt" = yes; then
+ if test yes = "$suppress_opt"; then
suppress_output=' >/dev/null 2>&1'
fi
fi
# Only build a position-dependent object if we build old libraries.
- if test "$build_old_libs" = yes; then
- if test "$pic_mode" != yes; then
+ if test yes = "$build_old_libs"; then
+ if test yes != "$pic_mode"; then
# Don't build PIC code
command="$base_compile $qsrcfile$pie_flag"
else
command="$base_compile $qsrcfile $pic_flag"
fi
- if test "$compiler_c_o" = yes; then
+ if test yes = "$compiler_c_o"; then
func_append command " -o $obj"
fi
@@ -2250,7 +3551,7 @@ compiler."
func_show_eval_locale "$command" \
'$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
- if test "$need_locks" = warn &&
+ if test warn = "$need_locks" &&
test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
$ECHO "\
*** ERROR, $lockfile contains:
@@ -2261,7 +3562,7 @@ $srcfile
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
+your compiler does not support '-c' and '-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
@@ -2281,7 +3582,7 @@ compiler."
func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
# Unlock the critical section if it was locked
- if test "$need_locks" != no; then
+ if test no != "$need_locks"; then
removelist=$lockfile
$RM "$lockfile"
fi
@@ -2291,7 +3592,7 @@ compiler."
}
$opt_help || {
- test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+ test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
}
func_mode_help ()
@@ -2311,7 +3612,7 @@ func_mode_help ()
Remove files from the build directory.
RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
to RM.
If FILE is a libtool library, object or program, all the files associated
@@ -2330,16 +3631,16 @@ This mode accepts the following additional options:
-no-suppress do not suppress compiler output for multiple passes
-prefer-pic try to build PIC objects only
-prefer-non-pic try to build non-PIC objects only
- -shared do not build a \`.o' file suitable for static linking
- -static only build a \`.o' file suitable for static linking
+ -shared do not build a '.o' file suitable for static linking
+ -static only build a '.o' file suitable for static linking
-Wc,FLAG pass FLAG directly to the compiler
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
from the given SOURCEFILE.
The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
+SOURCEFILE, then substituting the C source code suffix '.c' with the
+library object suffix, '.lo'."
;;
execute)
@@ -2352,7 +3653,7 @@ This mode accepts the following additional options:
-dlopen FILE add the directory containing FILE to the library path
-This mode sets the library path environment variable according to \`-dlopen'
+This mode sets the library path environment variable according to '-dlopen'
flags.
If any of the ARGS are libtool executable wrappers, then they are translated
@@ -2371,7 +3672,7 @@ Complete the installation of libtool libraries.
Each LIBDIR is a directory that contains libtool libraries.
The commands that this mode executes may require superuser privileges. Use
-the \`--dry-run' option if you just want to see what would be executed."
+the '--dry-run' option if you just want to see what would be executed."
;;
install)
@@ -2381,7 +3682,7 @@ the \`--dry-run' option if you just want to see what would be executed."
Install executables or libraries.
INSTALL-COMMAND is the installation command. The first component should be
-either the \`install' or \`cp' program.
+either the 'install' or 'cp' program.
The following components of INSTALL-COMMAND are treated specially:
@@ -2407,7 +3708,7 @@ The following components of LINK-COMMAND are treated specially:
-avoid-version do not add a version suffix if possible
-bindir BINDIR specify path to binaries directory (for systems where
libraries must be found in the PATH setting at runtime)
- -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
@@ -2441,20 +3742,20 @@ The following components of LINK-COMMAND are treated specially:
-Xlinker FLAG pass linker-specific FLAG directly to the linker
-XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
-All other options (arguments beginning with \`-') are ignored.
+All other options (arguments beginning with '-') are ignored.
-Every other argument is treated as a filename. Files ending in \`.la' are
+Every other argument is treated as a filename. Files ending in '.la' are
treated as uninstalled libtool libraries, other files are standard or library
object files.
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
+If the OUTPUT-FILE ends in '.la', then a libtool library is created,
+only library objects ('.lo' files) may be specified, and '-rpath' is
required, except when creating a convenience library.
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
+If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
+using 'ar' and 'ranlib', or on Windows using 'lib'.
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
is created, otherwise an executable program is created."
;;
@@ -2465,7 +3766,7 @@ is created, otherwise an executable program is created."
Remove libraries from an installation directory.
RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
to RM.
If FILE is a libtool library, all the files associated with it are deleted.
@@ -2473,17 +3774,17 @@ Otherwise, only FILE itself is deleted using RM."
;;
*)
- func_fatal_help "invalid operation mode \`$opt_mode'"
+ func_fatal_help "invalid operation mode '$opt_mode'"
;;
esac
echo
- $ECHO "Try \`$progname --help' for more information about other modes."
+ $ECHO "Try '$progname --help' for more information about other modes."
}
# Now that we've collected a possible --mode arg, show help if necessary
if $opt_help; then
- if test "$opt_help" = :; then
+ if test : = "$opt_help"; then
func_mode_help
else
{
@@ -2491,7 +3792,7 @@ if $opt_help; then
for opt_mode in compile link execute install finish uninstall clean; do
func_mode_help
done
- } | sed -n '1p; 2,$s/^Usage:/ or: /p'
+ } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
{
func_help noexit
for opt_mode in compile link execute install finish uninstall clean; do
@@ -2499,7 +3800,7 @@ if $opt_help; then
func_mode_help
done
} |
- sed '1d
+ $SED '1d
/^When reporting/,/^Report/{
H
d
@@ -2516,16 +3817,17 @@ fi
# func_mode_execute arg...
func_mode_execute ()
{
- $opt_debug
+ $debug_cmd
+
# The first argument is the command name.
- cmd="$nonopt"
+ cmd=$nonopt
test -z "$cmd" && \
func_fatal_help "you must specify a COMMAND"
# Handle -dlopen flags immediately.
for file in $opt_dlopen; do
test -f "$file" \
- || func_fatal_help "\`$file' is not a file"
+ || func_fatal_help "'$file' is not a file"
dir=
case $file in
@@ -2535,7 +3837,7 @@ func_mode_execute ()
# Check to see that this really is a libtool archive.
func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$lib' is not a valid libtool archive"
+ || func_fatal_help "'$lib' is not a valid libtool archive"
# Read the libtool library.
dlname=
@@ -2546,18 +3848,18 @@ func_mode_execute ()
if test -z "$dlname"; then
# Warn if it was a shared library.
test -n "$library_names" && \
- func_warning "\`$file' was not linked with \`-export-dynamic'"
+ func_warning "'$file' was not linked with '-export-dynamic'"
continue
fi
func_dirname "$file" "" "."
- dir="$func_dirname_result"
+ dir=$func_dirname_result
if test -f "$dir/$objdir/$dlname"; then
func_append dir "/$objdir"
else
if test ! -f "$dir/$dlname"; then
- func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
fi
fi
;;
@@ -2565,18 +3867,18 @@ func_mode_execute ()
*.lo)
# Just add the directory containing the .lo file.
func_dirname "$file" "" "."
- dir="$func_dirname_result"
+ dir=$func_dirname_result
;;
*)
- func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
continue
;;
esac
# Get the absolute pathname.
absdir=`cd "$dir" && pwd`
- test -n "$absdir" && dir="$absdir"
+ test -n "$absdir" && dir=$absdir
# Now add the directory to shlibpath_var.
if eval "test -z \"\$$shlibpath_var\""; then
@@ -2588,7 +3890,7 @@ func_mode_execute ()
# This variable tells wrapper scripts just to set shlibpath_var
# rather than running their programs.
- libtool_execute_magic="$magic"
+ libtool_execute_magic=$magic
# Check if any of the arguments is a wrapper script.
args=
@@ -2601,12 +3903,12 @@ func_mode_execute ()
if func_ltwrapper_script_p "$file"; then
func_source "$file"
# Transform arg to wrapped name.
- file="$progdir/$program"
+ file=$progdir/$program
elif func_ltwrapper_executable_p "$file"; then
func_ltwrapper_scriptname "$file"
func_source "$func_ltwrapper_scriptname_result"
# Transform arg to wrapped name.
- file="$progdir/$program"
+ file=$progdir/$program
fi
;;
esac
@@ -2614,7 +3916,15 @@ func_mode_execute ()
func_append_quoted args "$file"
done
- if test "X$opt_dry_run" = Xfalse; then
+ if $opt_dry_run; then
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ else
if test -n "$shlibpath_var"; then
# Export the shlibpath_var.
eval "export $shlibpath_var"
@@ -2631,25 +3941,18 @@ func_mode_execute ()
done
# Now prepare to actually exec the command.
- exec_cmd="\$cmd$args"
- else
- # Display what would be done.
- if test -n "$shlibpath_var"; then
- eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
- echo "export $shlibpath_var"
- fi
- $ECHO "$cmd$args"
- exit $EXIT_SUCCESS
+ exec_cmd=\$cmd$args
fi
}
-test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
# func_mode_finish arg...
func_mode_finish ()
{
- $opt_debug
+ $debug_cmd
+
libs=
libdirs=
admincmds=
@@ -2663,11 +3966,11 @@ func_mode_finish ()
if func_lalib_unsafe_p "$opt"; then
func_append libs " $opt"
else
- func_warning "\`$opt' is not a valid libtool archive"
+ func_warning "'$opt' is not a valid libtool archive"
fi
else
- func_fatal_error "invalid argument \`$opt'"
+ func_fatal_error "invalid argument '$opt'"
fi
done
@@ -2682,12 +3985,12 @@ func_mode_finish ()
# Remove sysroot references
if $opt_dry_run; then
for lib in $libs; do
- echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+ echo "removing references to $lt_sysroot and '=' prefixes from $lib"
done
else
tmpdir=`func_mktempdir`
for lib in $libs; do
- sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
> $tmpdir/tmp-la
mv -f $tmpdir/tmp-la $lib
done
@@ -2712,7 +4015,7 @@ func_mode_finish ()
fi
# Exit here if they wanted silent mode.
- $opt_silent && exit $EXIT_SUCCESS
+ $opt_quiet && exit $EXIT_SUCCESS
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
echo "----------------------------------------------------------------------"
@@ -2723,27 +4026,27 @@ func_mode_finish ()
echo
echo "If you ever happen to want to link against installed libraries"
echo "in a given directory, LIBDIR, you must either use libtool, and"
- echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ echo "specify the full pathname of the library, or use the '-LLIBDIR'"
echo "flag during linking and do at least one of the following:"
if test -n "$shlibpath_var"; then
- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " - add LIBDIR to the '$shlibpath_var' environment variable"
echo " during execution"
fi
if test -n "$runpath_var"; then
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " - add LIBDIR to the '$runpath_var' environment variable"
echo " during linking"
fi
if test -n "$hardcode_libdir_flag_spec"; then
libdir=LIBDIR
eval flag=\"$hardcode_libdir_flag_spec\"
- $ECHO " - use the \`$flag' linker flag"
+ $ECHO " - use the '$flag' linker flag"
fi
if test -n "$admincmds"; then
$ECHO " - have your system administrator run these commands:$admincmds"
fi
if test -f /etc/ld.so.conf; then
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
fi
echo
@@ -2762,18 +4065,20 @@ func_mode_finish ()
exit $EXIT_SUCCESS
}
-test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
# func_mode_install arg...
func_mode_install ()
{
- $opt_debug
+ $debug_cmd
+
# There may be an optional sh(1) argument at the beginning of
# install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
# Allow the use of GNU shtool's install command.
- case $nonopt in *shtool*) :;; *) false;; esac; then
+ case $nonopt in *shtool*) :;; *) false;; esac
+ then
# Aesthetically quote it.
func_quote_for_eval "$nonopt"
install_prog="$func_quote_for_eval_result "
@@ -2800,7 +4105,7 @@ func_mode_install ()
opts=
prev=
install_type=
- isdir=no
+ isdir=false
stripme=
no_mode=:
for arg
@@ -2813,7 +4118,7 @@ func_mode_install ()
fi
case $arg in
- -d) isdir=yes ;;
+ -d) isdir=: ;;
-f)
if $install_cp; then :; else
prev=$arg
@@ -2831,7 +4136,7 @@ func_mode_install ()
*)
# If the previous option needed an argument, then skip it.
if test -n "$prev"; then
- if test "x$prev" = x-m && test -n "$install_override_mode"; then
+ if test X-m = "X$prev" && test -n "$install_override_mode"; then
arg2=$install_override_mode
no_mode=false
fi
@@ -2856,7 +4161,7 @@ func_mode_install ()
func_fatal_help "you must specify an install program"
test -n "$prev" && \
- func_fatal_help "the \`$prev' option requires an argument"
+ func_fatal_help "the '$prev' option requires an argument"
if test -n "$install_override_mode" && $no_mode; then
if $install_cp; then :; else
@@ -2878,19 +4183,19 @@ func_mode_install ()
dest=$func_stripname_result
# Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
+ test -d "$dest" && isdir=:
+ if $isdir; then
+ destdir=$dest
destname=
else
func_dirname_and_basename "$dest" "" "."
- destdir="$func_dirname_result"
- destname="$func_basename_result"
+ destdir=$func_dirname_result
+ destname=$func_basename_result
# Not a directory, so check to see that there is only one file specified.
set dummy $files; shift
test "$#" -gt 1 && \
- func_fatal_help "\`$dest' is not a directory"
+ func_fatal_help "'$dest' is not a directory"
fi
case $destdir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -2899,7 +4204,7 @@ func_mode_install ()
case $file in
*.lo) ;;
*)
- func_fatal_help "\`$destdir' must be an absolute directory name"
+ func_fatal_help "'$destdir' must be an absolute directory name"
;;
esac
done
@@ -2908,7 +4213,7 @@ func_mode_install ()
# This variable tells wrapper scripts just to set variables rather
# than running their programs.
- libtool_install_magic="$magic"
+ libtool_install_magic=$magic
staticlibs=
future_libdirs=
@@ -2928,7 +4233,7 @@ func_mode_install ()
# Check to see that this really is a libtool archive.
func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$file' is not a valid libtool archive"
+ || func_fatal_help "'$file' is not a valid libtool archive"
library_names=
old_library=
@@ -2950,7 +4255,7 @@ func_mode_install ()
fi
func_dirname "$file" "/" ""
- dir="$func_dirname_result"
+ dir=$func_dirname_result
func_append dir "$objdir"
if test -n "$relink_command"; then
@@ -2964,7 +4269,7 @@ func_mode_install ()
# are installed into $libdir/../bin (currently, that works fine)
# but it's something to keep an eye on.
test "$inst_prefix_dir" = "$destdir" && \
- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
@@ -2973,29 +4278,29 @@ func_mode_install ()
relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
fi
- func_warning "relinking \`$file'"
+ func_warning "relinking '$file'"
func_show_eval "$relink_command" \
- 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
fi
# See the names of the shared library.
set dummy $library_names; shift
if test -n "$1"; then
- realname="$1"
+ realname=$1
shift
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
+ srcname=$realname
+ test -n "$relink_command" && srcname=${realname}T
# Install the shared library and build the symlinks.
func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
'exit $?'
- tstripme="$stripme"
+ tstripme=$stripme
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
case $realname in
*.dll.a)
- tstripme=""
+ tstripme=
;;
esac
;;
@@ -3006,7 +4311,7 @@ func_mode_install ()
if test "$#" -gt 0; then
# Delete the old symlinks, and create new ones.
- # Try `ln -sf' first, because the `ln' binary might depend on
+ # Try 'ln -sf' first, because the 'ln' binary might depend on
# the symlink we replace! Solaris /bin/ln does not understand -f,
# so we also need to try rm && ln -s.
for linkname
@@ -3017,14 +4322,14 @@ func_mode_install ()
fi
# Do each command in the postinstall commands.
- lib="$destdir/$realname"
+ lib=$destdir/$realname
func_execute_cmds "$postinstall_cmds" 'exit $?'
fi
# Install the pseudo-library for information purposes.
func_basename "$file"
- name="$func_basename_result"
- instname="$dir/$name"i
+ name=$func_basename_result
+ instname=$dir/${name}i
func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
# Maybe install the static library, too.
@@ -3036,11 +4341,11 @@ func_mode_install ()
# Figure out destination file name, if it wasn't already specified.
if test -n "$destname"; then
- destfile="$destdir/$destname"
+ destfile=$destdir/$destname
else
func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
fi
# Deduce the name of the destination old-style object file.
@@ -3050,11 +4355,11 @@ func_mode_install ()
staticdest=$func_lo2o_result
;;
*.$objext)
- staticdest="$destfile"
+ staticdest=$destfile
destfile=
;;
*)
- func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ func_fatal_help "cannot copy a libtool object to '$destfile'"
;;
esac
@@ -3063,7 +4368,7 @@ func_mode_install ()
func_show_eval "$install_prog $file $destfile" 'exit $?'
# Install the old object if enabled.
- if test "$build_old_libs" = yes; then
+ if test yes = "$build_old_libs"; then
# Deduce the name of the old-style object file.
func_lo2o "$file"
staticobj=$func_lo2o_result
@@ -3075,23 +4380,23 @@ func_mode_install ()
*)
# Figure out destination file name, if it wasn't already specified.
if test -n "$destname"; then
- destfile="$destdir/$destname"
+ destfile=$destdir/$destname
else
func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
fi
# If the file is missing, and there is a .exe on the end, strip it
# because it is most likely a libtool script we actually want to
# install
- stripped_ext=""
+ stripped_ext=
case $file in
*.exe)
if test ! -f "$file"; then
func_stripname '' '.exe' "$file"
file=$func_stripname_result
- stripped_ext=".exe"
+ stripped_ext=.exe
fi
;;
esac
@@ -3119,19 +4424,19 @@ func_mode_install ()
# Check the variables that should have been set.
test -z "$generated_by_libtool_version" && \
- func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+ func_fatal_error "invalid libtool wrapper script '$wrapper'"
- finalize=yes
+ finalize=:
for lib in $notinst_deplibs; do
# Check to see that each library is installed.
libdir=
if test -f "$lib"; then
func_source "$lib"
fi
- libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
if test -n "$libdir" && test ! -f "$libfile"; then
- func_warning "\`$lib' has not been installed in \`$libdir'"
- finalize=no
+ func_warning "'$lib' has not been installed in '$libdir'"
+ finalize=false
fi
done
@@ -3139,29 +4444,29 @@ func_mode_install ()
func_source "$wrapper"
outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
+ if test no = "$fast_install" && test -n "$relink_command"; then
$opt_dry_run || {
- if test "$finalize" = yes; then
+ if $finalize; then
tmpdir=`func_mktempdir`
func_basename "$file$stripped_ext"
- file="$func_basename_result"
- outputname="$tmpdir/$file"
+ file=$func_basename_result
+ outputname=$tmpdir/$file
# Replace the output file specification.
relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
- $opt_silent || {
+ $opt_quiet || {
func_quote_for_expand "$relink_command"
eval "func_echo $func_quote_for_expand_result"
}
if eval "$relink_command"; then :
else
- func_error "error: relink \`$file' with the above command before installing it"
+ func_error "error: relink '$file' with the above command before installing it"
$opt_dry_run || ${RM}r "$tmpdir"
continue
fi
- file="$outputname"
+ file=$outputname
else
- func_warning "cannot relink \`$file'"
+ func_warning "cannot relink '$file'"
fi
}
else
@@ -3198,10 +4503,10 @@ func_mode_install ()
for file in $staticlibs; do
func_basename "$file"
- name="$func_basename_result"
+ name=$func_basename_result
# Set up the ranlib parameters.
- oldlib="$destdir/$name"
+ oldlib=$destdir/$name
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
tool_oldlib=$func_to_tool_file_result
@@ -3216,18 +4521,18 @@ func_mode_install ()
done
test -n "$future_libdirs" && \
- func_warning "remember to run \`$progname --finish$future_libdirs'"
+ func_warning "remember to run '$progname --finish$future_libdirs'"
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
$opt_dry_run && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
else
exit $EXIT_SUCCESS
fi
}
-test "$opt_mode" = install && func_mode_install ${1+"$@"}
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
# func_generate_dlsyms outputname originator pic_p
@@ -3235,16 +4540,17 @@ test "$opt_mode" = install && func_mode_install ${1+"$@"}
# a dlpreopen symbol table.
func_generate_dlsyms ()
{
- $opt_debug
- my_outputname="$1"
- my_originator="$2"
- my_pic_p="${3-no}"
- my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ $debug_cmd
+
+ my_outputname=$1
+ my_originator=$2
+ my_pic_p=${3-false}
+ my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
my_dlsyms=
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
if test -n "$NM" && test -n "$global_symbol_pipe"; then
- my_dlsyms="${my_outputname}S.c"
+ my_dlsyms=${my_outputname}S.c
else
func_error "not configured to extract global symbols from dlpreopened files"
fi
@@ -3255,7 +4561,7 @@ func_generate_dlsyms ()
"") ;;
*.c)
# Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${my_outputname}.nm"
+ nlist=$output_objdir/$my_outputname.nm
func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
@@ -3263,34 +4569,36 @@ func_generate_dlsyms ()
func_verbose "creating $output_objdir/$my_dlsyms"
$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
#ifdef __cplusplus
extern \"C\" {
#endif
-#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
#endif
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
# define LT_DLSYM_CONST const
#endif
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
/* External symbol declarations for the compiler. */\
"
- if test "$dlself" = yes; then
- func_verbose "generating symbol list for \`$output'"
+ if test yes = "$dlself"; then
+ func_verbose "generating symbol list for '$output'"
$opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
@@ -3298,7 +4606,7 @@ extern \"C\" {
progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
for progfile in $progfiles; do
func_to_tool_file "$progfile" func_convert_file_msys_to_w32
- func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+ func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
$opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
done
@@ -3318,10 +4626,10 @@ extern \"C\" {
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$outputname.exp"
+ export_symbols=$output_objdir/$outputname.exp
$opt_dry_run || {
$RM $export_symbols
- eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
case $host in
*cygwin* | *mingw* | *cegcc* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
@@ -3331,7 +4639,7 @@ extern \"C\" {
}
else
$opt_dry_run || {
- eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
eval '$MV "$nlist"T "$nlist"'
case $host in
@@ -3345,22 +4653,22 @@ extern \"C\" {
fi
for dlprefile in $dlprefiles; do
- func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_verbose "extracting global C symbols from '$dlprefile'"
func_basename "$dlprefile"
- name="$func_basename_result"
+ name=$func_basename_result
case $host in
*cygwin* | *mingw* | *cegcc* )
# if an import library, we need to obtain dlname
if func_win32_import_lib_p "$dlprefile"; then
func_tr_sh "$dlprefile"
eval "curr_lafile=\$libfile_$func_tr_sh_result"
- dlprefile_dlbasename=""
+ dlprefile_dlbasename=
if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
# Use subshell, to avoid clobbering current variable values
dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
- if test -n "$dlprefile_dlname" ; then
+ if test -n "$dlprefile_dlname"; then
func_basename "$dlprefile_dlname"
- dlprefile_dlbasename="$func_basename_result"
+ dlprefile_dlbasename=$func_basename_result
else
# no lafile. user explicitly requested -dlpreopen <import library>.
$sharedlib_from_linklib_cmd "$dlprefile"
@@ -3368,7 +4676,7 @@ extern \"C\" {
fi
fi
$opt_dry_run || {
- if test -n "$dlprefile_dlbasename" ; then
+ if test -n "$dlprefile_dlbasename"; then
eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
else
func_warning "Could not compute DLL name from $name"
@@ -3424,6 +4732,11 @@ extern \"C\" {
echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
fi
+ func_show_eval '$RM "${nlist}I"'
+ if test -n "$global_symbol_to_import"; then
+ eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
+ fi
+
echo >> "$output_objdir/$my_dlsyms" "\
/* The mapping between symbol names and symbols. */
@@ -3432,11 +4745,30 @@ typedef struct {
void *address;
} lt_dlsymlist;
extern LT_DLSYM_CONST lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];
+lt_${my_prefix}_LTX_preloaded_symbols[];\
+"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+ LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+ for (; symbol->name; ++symbol)
+ {"
+ $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+ echo >> "$output_objdir/$my_dlsyms" "\
+ }
+}"
+ fi
+ echo >> "$output_objdir/$my_dlsyms" "\
LT_DLSYM_CONST lt_dlsymlist
lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
- { \"$my_originator\", (void *) 0 },"
+{ {\"$my_originator\", (void *) 0},"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {\"@INIT@\", (void *) &lt_syminit},"
+ fi
case $need_lib_prefix in
no)
@@ -3478,9 +4810,7 @@ static const void *lt_preloaded_setup() {
*-*-hpux*)
pic_flag_for_symtable=" $pic_flag" ;;
*)
- if test "X$my_pic_p" != Xno; then
- pic_flag_for_symtable=" $pic_flag"
- fi
+ $my_pic_p && pic_flag_for_symtable=" $pic_flag"
;;
esac
;;
@@ -3497,10 +4827,10 @@ static const void *lt_preloaded_setup() {
func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
# Clean up the generated files.
- func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
# Transform the symbol file into the correct name.
- symfileobj="$output_objdir/${my_outputname}S.$objext"
+ symfileobj=$output_objdir/${my_outputname}S.$objext
case $host in
*cygwin* | *mingw* | *cegcc* )
if test -f "$output_objdir/$my_outputname.def"; then
@@ -3518,7 +4848,7 @@ static const void *lt_preloaded_setup() {
esac
;;
*)
- func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ func_fatal_error "unknown suffix for '$my_dlsyms'"
;;
esac
else
@@ -3532,6 +4862,32 @@ static const void *lt_preloaded_setup() {
fi
}
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
# func_win32_libid arg
# return the library type of file 'arg'
#
@@ -3541,8 +4897,9 @@ static const void *lt_preloaded_setup() {
# Despite the name, also deal with 64 bit binaries.
func_win32_libid ()
{
- $opt_debug
- win32_libid_type="unknown"
+ $debug_cmd
+
+ win32_libid_type=unknown
win32_fileres=`file -L $1 2>/dev/null`
case $win32_fileres in
*ar\ archive\ import\ library*) # definitely import
@@ -3552,16 +4909,29 @@ func_win32_libid ()
# Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
$EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
- func_to_tool_file "$1" func_convert_file_msys_to_w32
- win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
- $SED -n -e '
+ case $nm_interface in
+ "MS dumpbin")
+ if func_cygming_ms_implib_p "$1" ||
+ func_cygming_gnu_implib_p "$1"
+ then
+ win32_nmres=import
+ else
+ win32_nmres=
+ fi
+ ;;
+ *)
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
1,100{
/ I /{
- s,.*,import,
+ s|.*|import|
p
q
}
}'`
+ ;;
+ esac
case $win32_nmres in
import*) win32_libid_type="x86 archive import";;
*) win32_libid_type="x86 archive static";;
@@ -3593,7 +4963,8 @@ func_win32_libid ()
# $sharedlib_from_linklib_result
func_cygming_dll_for_implib ()
{
- $opt_debug
+ $debug_cmd
+
sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
}
@@ -3610,7 +4981,8 @@ func_cygming_dll_for_implib ()
# specified import library.
func_cygming_dll_for_implib_fallback_core ()
{
- $opt_debug
+ $debug_cmd
+
match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
$OBJDUMP -s --section "$1" "$2" 2>/dev/null |
$SED '/^Contents of section '"$match_literal"':/{
@@ -3646,8 +5018,8 @@ func_cygming_dll_for_implib_fallback_core ()
/./p' |
# we now have a list, one entry per line, of the stringified
# contents of the appropriate section of all members of the
- # archive which possess that section. Heuristic: eliminate
- # all those which have a first or second character that is
+ # archive that possess that section. Heuristic: eliminate
+ # all those that have a first or second character that is
# a '.' (that is, objdump's representation of an unprintable
# character.) This should work for all archives with less than
# 0x302f exports -- but will fail for DLLs whose name actually
@@ -3658,30 +5030,6 @@ func_cygming_dll_for_implib_fallback_core ()
$SED -e '/^\./d;/^.\./d;q'
}
-# func_cygming_gnu_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is a GNU/binutils-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_gnu_implib_p ()
-{
- $opt_debug
- func_to_tool_file "$1" func_convert_file_msys_to_w32
- func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
- test -n "$func_cygming_gnu_implib_tmp"
-}
-
-# func_cygming_ms_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is an MS-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_ms_implib_p ()
-{
- $opt_debug
- func_to_tool_file "$1" func_convert_file_msys_to_w32
- func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
- test -n "$func_cygming_ms_implib_tmp"
-}
-
# func_cygming_dll_for_implib_fallback ARG
# Platform-specific function to extract the
# name of the DLL associated with the specified
@@ -3695,16 +5043,17 @@ func_cygming_ms_implib_p ()
# $sharedlib_from_linklib_result
func_cygming_dll_for_implib_fallback ()
{
- $opt_debug
- if func_cygming_gnu_implib_p "$1" ; then
+ $debug_cmd
+
+ if func_cygming_gnu_implib_p "$1"; then
# binutils import library
sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
- elif func_cygming_ms_implib_p "$1" ; then
+ elif func_cygming_ms_implib_p "$1"; then
# ms-generated import library
sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
else
# unknown
- sharedlib_from_linklib_result=""
+ sharedlib_from_linklib_result=
fi
}
@@ -3712,10 +5061,11 @@ func_cygming_dll_for_implib_fallback ()
# func_extract_an_archive dir oldlib
func_extract_an_archive ()
{
- $opt_debug
- f_ex_an_ar_dir="$1"; shift
- f_ex_an_ar_oldlib="$1"
- if test "$lock_old_archive_extraction" = yes; then
+ $debug_cmd
+
+ f_ex_an_ar_dir=$1; shift
+ f_ex_an_ar_oldlib=$1
+ if test yes = "$lock_old_archive_extraction"; then
lockfile=$f_ex_an_ar_oldlib.lock
until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
func_echo "Waiting for $lockfile to be removed"
@@ -3724,7 +5074,7 @@ func_extract_an_archive ()
fi
func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
'stat=$?; rm -f "$lockfile"; exit $stat'
- if test "$lock_old_archive_extraction" = yes; then
+ if test yes = "$lock_old_archive_extraction"; then
$opt_dry_run || rm -f "$lockfile"
fi
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
@@ -3738,22 +5088,23 @@ func_extract_an_archive ()
# func_extract_archives gentop oldlib ...
func_extract_archives ()
{
- $opt_debug
- my_gentop="$1"; shift
+ $debug_cmd
+
+ my_gentop=$1; shift
my_oldlibs=${1+"$@"}
- my_oldobjs=""
- my_xlib=""
- my_xabs=""
- my_xdir=""
+ my_oldobjs=
+ my_xlib=
+ my_xabs=
+ my_xdir=
for my_xlib in $my_oldlibs; do
# Extract the objects.
case $my_xlib in
- [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
func_basename "$my_xlib"
- my_xlib="$func_basename_result"
+ my_xlib=$func_basename_result
my_xlib_u=$my_xlib
while :; do
case " $extracted_archives " in
@@ -3765,7 +5116,7 @@ func_extract_archives ()
esac
done
extracted_archives="$extracted_archives $my_xlib_u"
- my_xdir="$my_gentop/$my_xlib_u"
+ my_xdir=$my_gentop/$my_xlib_u
func_mkdir_p "$my_xdir"
@@ -3778,19 +5129,20 @@ func_extract_archives ()
cd $my_xdir || exit $?
darwin_archive=$my_xabs
darwin_curdir=`pwd`
- darwin_base_archive=`basename "$darwin_archive"`
+ func_basename "$darwin_archive"
+ darwin_base_archive=$func_basename_result
darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
if test -n "$darwin_arches"; then
darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
darwin_arch=
func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
- for darwin_arch in $darwin_arches ; do
- func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
- cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ for darwin_arch in $darwin_arches; do
+ func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+ $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+ cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+ func_extract_an_archive "`pwd`" "$darwin_base_archive"
cd "$darwin_curdir"
- $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
done # $darwin_arches
## Okay now we've a bunch of thin objects, gotta fatten them up :)
darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
@@ -3815,7 +5167,7 @@ func_extract_archives ()
my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
done
- func_extract_archives_result="$my_oldobjs"
+ func_extract_archives_result=$my_oldobjs
}
@@ -3830,7 +5182,7 @@ func_extract_archives ()
#
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
# variable will take. If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
+# will assume that the directory where it is stored is
# the $objdir directory. This is a cygwin/mingw-specific
# behavior.
func_emit_wrapper ()
@@ -3841,7 +5193,7 @@ func_emit_wrapper ()
#! $SHELL
# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
#
# The $output program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
@@ -3898,9 +5250,9 @@ _LTECHO_EOF'
# Very basic option parsing. These options are (a) specific to
# the libtool wrapper, (b) are identical between the wrapper
-# /script/ and the wrapper /executable/ which is used only on
+# /script/ and the wrapper /executable/ that is used only on
# windows platforms, and (c) all begin with the string "--lt-"
-# (application programs are unlikely to have options which match
+# (application programs are unlikely to have options that match
# this pattern).
#
# There are only two supported options: --lt-debug and
@@ -3933,7 +5285,7 @@ func_parse_lt_options ()
# Print the debug banner immediately:
if test -n \"\$lt_option_debug\"; then
- echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+ echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
fi
}
@@ -3944,7 +5296,7 @@ func_lt_dump_args ()
lt_dump_args_N=1;
for lt_arg
do
- \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
done
}
@@ -3958,7 +5310,7 @@ func_exec_program_core ()
*-*-mingw | *-*-os2* | *-cegcc*)
$ECHO "\
if test -n \"\$lt_option_debug\"; then
- \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
func_lt_dump_args \${1+\"\$@\"} 1>&2
fi
exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
@@ -3968,7 +5320,7 @@ func_exec_program_core ()
*)
$ECHO "\
if test -n \"\$lt_option_debug\"; then
- \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
func_lt_dump_args \${1+\"\$@\"} 1>&2
fi
exec \"\$progdir/\$program\" \${1+\"\$@\"}
@@ -4043,13 +5395,13 @@ func_exec_program ()
test -n \"\$absdir\" && thisdir=\"\$absdir\"
"
- if test "$fast_install" = yes; then
+ if test yes = "$fast_install"; then
$ECHO "\
program=lt-'$outputname'$exeext
progdir=\"\$thisdir/$objdir\"
if test ! -f \"\$progdir/\$program\" ||
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
file=\"\$\$-\$program\"
@@ -4101,7 +5453,7 @@ func_exec_program ()
fi
# Export our shlibpath_var if we have one.
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
$ECHO "\
# Add our own library path to $shlibpath_var
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
@@ -4121,7 +5473,7 @@ func_exec_program ()
fi
else
# The program doesn't exist.
- \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
\$ECHO \"This script is just a wrapper for \$program.\" 1>&2
\$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
exit 1
@@ -4140,7 +5492,7 @@ func_emit_cwrapperexe_src ()
cat <<EOF
/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
- Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+ Generated by $PROGRAM (GNU $PACKAGE) $VERSION
The $output program cannot be directly executed until all the libtool
libraries that it depends on are installed.
@@ -4175,47 +5527,45 @@ EOF
#include <fcntl.h>
#include <sys/stat.h>
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
/* declarations of non-ANSI functions */
-#if defined(__MINGW32__)
+#if defined __MINGW32__
# ifdef __STRICT_ANSI__
int _putenv (const char *);
# endif
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
# ifdef __STRICT_ANSI__
char *realpath (const char *, char *);
int putenv (char *);
int setenv (const char *, const char *, int);
# endif
-/* #elif defined (other platforms) ... */
+/* #elif defined other_platform || defined ... */
#endif
/* portability defines, excluding path handling macros */
-#if defined(_MSC_VER)
+#if defined _MSC_VER
# define setmode _setmode
# define stat _stat
# define chmod _chmod
# define getcwd _getcwd
# define putenv _putenv
# define S_IXUSR _S_IEXEC
-# ifndef _INTPTR_T_DEFINED
-# define _INTPTR_T_DEFINED
-# define intptr_t int
-# endif
-#elif defined(__MINGW32__)
+#elif defined __MINGW32__
# define setmode _setmode
# define stat _stat
# define chmod _chmod
# define getcwd _getcwd
# define putenv _putenv
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
# define HAVE_SETENV
# define FOPEN_WB "wb"
-/* #elif defined (other platforms) ... */
+/* #elif defined other platforms ... */
#endif
-#if defined(PATH_MAX)
+#if defined PATH_MAX
# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
+#elif defined MAXPATHLEN
# define LT_PATHMAX MAXPATHLEN
#else
# define LT_PATHMAX 1024
@@ -4234,8 +5584,8 @@ int setenv (const char *, const char *, int);
# define PATH_SEPARATOR ':'
#endif
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
- defined (__OS2__)
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+ defined __OS2__
# define HAVE_DOS_BASED_FILE_SYSTEM
# define FOPEN_WB "wb"
# ifndef DIR_SEPARATOR_2
@@ -4268,10 +5618,10 @@ int setenv (const char *, const char *, int);
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
- if (stale) { free ((void *) stale); stale = 0; } \
+ if (stale) { free (stale); stale = 0; } \
} while (0)
-#if defined(LT_DEBUGWRAPPER)
+#if defined LT_DEBUGWRAPPER
static int lt_debug = 1;
#else
static int lt_debug = 0;
@@ -4304,7 +5654,7 @@ volatile const char * MAGIC_EXE = "$magic_exe";
const char * LIB_PATH_VARNAME = "$shlibpath_var";
EOF
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
func_to_host_path "$temp_rpath"
cat <<EOF
const char * LIB_PATH_VALUE = "$func_to_host_path_result";
@@ -4328,7 +5678,7 @@ const char * EXE_PATH_VALUE = "";
EOF
fi
- if test "$fast_install" = yes; then
+ if test yes = "$fast_install"; then
cat <<EOF
const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
EOF
@@ -4357,12 +5707,12 @@ main (int argc, char *argv[])
char *actual_cwrapper_name;
char *target_name;
char *lt_argv_zero;
- intptr_t rval = 127;
+ int rval = 127;
int i;
program_name = (char *) xstrdup (base_name (argv[0]));
- newargz = XMALLOC (char *, argc + 1);
+ newargz = XMALLOC (char *, (size_t) argc + 1);
/* very simple arg parsing; don't want to rely on getopt
* also, copy all non cwrapper options to newargz, except
@@ -4371,10 +5721,10 @@ main (int argc, char *argv[])
newargc=0;
for (i = 1; i < argc; i++)
{
- if (strcmp (argv[i], dumpscript_opt) == 0)
+ if (STREQ (argv[i], dumpscript_opt))
{
EOF
- case "$host" in
+ case $host in
*mingw* | *cygwin* )
# make stdout use "unix" line endings
echo " setmode(1,_O_BINARY);"
@@ -4385,12 +5735,12 @@ EOF
lt_dump_script (stdout);
return 0;
}
- if (strcmp (argv[i], debug_opt) == 0)
+ if (STREQ (argv[i], debug_opt))
{
lt_debug = 1;
continue;
}
- if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+ if (STREQ (argv[i], ltwrapper_option_prefix))
{
/* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
namespace, but it is not one of the ones we know about and
@@ -4413,7 +5763,7 @@ EOF
EOF
cat <<EOF
/* The GNU banner must be the first non-error debug message */
- lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
EOF
cat <<"EOF"
lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
@@ -4524,7 +5874,7 @@ EOF
cat <<"EOF"
/* execv doesn't actually work on mingw as expected on unix */
newargz = prepare_spawn (newargz);
- rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
if (rval == -1)
{
/* failed to start process */
@@ -4569,7 +5919,7 @@ base_name (const char *name)
{
const char *base;
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
/* Skip over the disk name in MSDOS pathnames. */
if (isalpha ((unsigned char) name[0]) && name[1] == ':')
name += 2;
@@ -4628,7 +5978,7 @@ find_executable (const char *wrapper)
const char *p_next;
/* static buffer for getcwd */
char tmp[LT_PATHMAX + 1];
- int tmp_len;
+ size_t tmp_len;
char *concat_name;
lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
@@ -4638,7 +5988,7 @@ find_executable (const char *wrapper)
return NULL;
/* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
{
concat_name = xstrdup (wrapper);
@@ -4656,7 +6006,7 @@ find_executable (const char *wrapper)
return concat_name;
XFREE (concat_name);
}
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
}
#endif
@@ -4679,7 +6029,7 @@ find_executable (const char *wrapper)
for (q = p; *q; q++)
if (IS_PATH_SEPARATOR (*q))
break;
- p_len = q - p;
+ p_len = (size_t) (q - p);
p_next = (*q == '\0' ? q : q + 1);
if (p_len == 0)
{
@@ -4798,7 +6148,7 @@ strendzap (char *str, const char *pat)
if (patlen <= len)
{
str += len - patlen;
- if (strcmp (str, pat) == 0)
+ if (STREQ (str, pat))
*str = '\0';
}
return str;
@@ -4863,7 +6213,7 @@ lt_setenv (const char *name, const char *value)
char *str = xstrdup (value);
setenv (name, str, 1);
#else
- int len = strlen (name) + 1 + strlen (value) + 1;
+ size_t len = strlen (name) + 1 + strlen (value) + 1;
char *str = XMALLOC (char, len);
sprintf (str, "%s=%s", name, value);
if (putenv (str) != EXIT_SUCCESS)
@@ -4880,8 +6230,8 @@ lt_extend_str (const char *orig_value, const char *add, int to_end)
char *new_value;
if (orig_value && *orig_value)
{
- int orig_value_len = strlen (orig_value);
- int add_len = strlen (add);
+ size_t orig_value_len = strlen (orig_value);
+ size_t add_len = strlen (add);
new_value = XMALLOC (char, add_len + orig_value_len + 1);
if (to_end)
{
@@ -4912,10 +6262,10 @@ lt_update_exe_path (const char *name, const char *value)
{
char *new_value = lt_extend_str (getenv (name), value, 0);
/* some systems can't cope with a ':'-terminated path #' */
- int len = strlen (new_value);
- while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ size_t len = strlen (new_value);
+ while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
{
- new_value[len-1] = '\0';
+ new_value[--len] = '\0';
}
lt_setenv (name, new_value);
XFREE (new_value);
@@ -5082,7 +6432,8 @@ EOF
# True if ARG is an import lib, as indicated by $file_magic_cmd
func_win32_import_lib_p ()
{
- $opt_debug
+ $debug_cmd
+
case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
*import*) : ;;
*) false ;;
@@ -5092,17 +6443,18 @@ func_win32_import_lib_p ()
# func_mode_link arg...
func_mode_link ()
{
- $opt_debug
+ $debug_cmd
+
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
- # which system we are compiling for in order to pass an extra
+ # what system we are compiling for in order to pass an extra
# flag for every libtool invocation.
# allow_undefined=no
# FIXME: Unfortunately, there are problems with the above when trying
- # to make a dll which has undefined symbols, in which case not
+ # to make a dll that has undefined symbols, in which case not
# even a static library is built. For now, we need to specify
# -no-undefined on the libtool link line when we can be certain
# that all symbols are satisfied, otherwise we get a static library.
@@ -5149,7 +6501,7 @@ func_mode_link ()
non_pic_objects=
precious_files_regex=
prefer_static_libs=no
- preload=no
+ preload=false
prev=
prevarg=
release=
@@ -5161,7 +6513,7 @@ func_mode_link ()
vinfo=
vinfo_number=no
weak_libs=
- single_module="${wl}-single_module"
+ single_module=$wl-single_module
func_infer_tag $base_compile
# We need to know -static, to get the right output filenames.
@@ -5169,15 +6521,15 @@ func_mode_link ()
do
case $arg in
-shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
+ test yes != "$build_libtool_libs" \
+ && func_fatal_configuration "cannot build a shared library"
build_old_libs=no
break
;;
-all-static | -static | -static-libtool-libs)
case $arg in
-all-static)
- if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
func_warning "complete static linking is impossible in this configuration"
fi
if test -n "$link_static_flag"; then
@@ -5210,7 +6562,7 @@ func_mode_link ()
# Go through the arguments, transforming them on the way.
while test "$#" -gt 0; do
- arg="$1"
+ arg=$1
shift
func_quote_for_eval "$arg"
qarg=$func_quote_for_eval_unquoted_result
@@ -5227,21 +6579,21 @@ func_mode_link ()
case $prev in
bindir)
- bindir="$arg"
+ bindir=$arg
prev=
continue
;;
dlfiles|dlprefiles)
- if test "$preload" = no; then
+ $preload || {
# Add the symbol object into the linking commands.
func_append compile_command " @SYMFILE@"
func_append finalize_command " @SYMFILE@"
- preload=yes
- fi
+ preload=:
+ }
case $arg in
*.la | *.lo) ;; # We handle these cases below.
force)
- if test "$dlself" = no; then
+ if test no = "$dlself"; then
dlself=needless
export_dynamic=yes
fi
@@ -5249,9 +6601,9 @@ func_mode_link ()
continue
;;
self)
- if test "$prev" = dlprefiles; then
+ if test dlprefiles = "$prev"; then
dlself=yes
- elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
dlself=yes
else
dlself=needless
@@ -5261,7 +6613,7 @@ func_mode_link ()
continue
;;
*)
- if test "$prev" = dlfiles; then
+ if test dlfiles = "$prev"; then
func_append dlfiles " $arg"
else
func_append dlprefiles " $arg"
@@ -5272,14 +6624,14 @@ func_mode_link ()
esac
;;
expsyms)
- export_symbols="$arg"
+ export_symbols=$arg
test -f "$arg" \
- || func_fatal_error "symbol file \`$arg' does not exist"
+ || func_fatal_error "symbol file '$arg' does not exist"
prev=
continue
;;
expsyms_regex)
- export_symbols_regex="$arg"
+ export_symbols_regex=$arg
prev=
continue
;;
@@ -5297,7 +6649,13 @@ func_mode_link ()
continue
;;
inst_prefix)
- inst_prefix_dir="$arg"
+ inst_prefix_dir=$arg
+ prev=
+ continue
+ ;;
+ mllvm)
+ # Clang does not use LLVM to link, so we can simply discard any
+ # '-mllvm $arg' options when doing the link step.
prev=
continue
;;
@@ -5321,21 +6679,21 @@ func_mode_link ()
if test -z "$pic_object" ||
test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
fi
# Extract subdirectory from the argument.
func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
+ xdir=$func_dirname_result
- if test "$pic_object" != none; then
+ if test none != "$pic_object"; then
# Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
+ pic_object=$xdir$pic_object
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
func_append dlfiles " $pic_object"
prev=
continue
@@ -5346,7 +6704,7 @@ func_mode_link ()
fi
# CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
+ if test dlprefiles = "$prev"; then
# Preload the old-style object.
func_append dlprefiles " $pic_object"
prev=
@@ -5354,23 +6712,23 @@ func_mode_link ()
# A PIC object.
func_append libobjs " $pic_object"
- arg="$pic_object"
+ arg=$pic_object
fi
# Non-PIC object.
- if test "$non_pic_object" != none; then
+ if test none != "$non_pic_object"; then
# Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
+ non_pic_object=$xdir$non_pic_object
# A standard non-PIC object
func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
fi
else
# If the PIC object exists, use it instead.
# $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
+ non_pic_object=$pic_object
func_append non_pic_objects " $non_pic_object"
fi
else
@@ -5378,7 +6736,7 @@ func_mode_link ()
if $opt_dry_run; then
# Extract subdirectory from the argument.
func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
+ xdir=$func_dirname_result
func_lo2o "$arg"
pic_object=$xdir$objdir/$func_lo2o_result
@@ -5386,24 +6744,24 @@ func_mode_link ()
func_append libobjs " $pic_object"
func_append non_pic_objects " $non_pic_object"
else
- func_fatal_error "\`$arg' is not a valid libtool object"
+ func_fatal_error "'$arg' is not a valid libtool object"
fi
fi
done
else
- func_fatal_error "link input file \`$arg' does not exist"
+ func_fatal_error "link input file '$arg' does not exist"
fi
arg=$save_arg
prev=
continue
;;
precious_regex)
- precious_files_regex="$arg"
+ precious_files_regex=$arg
prev=
continue
;;
release)
- release="-$arg"
+ release=-$arg
prev=
continue
;;
@@ -5415,7 +6773,7 @@ func_mode_link ()
func_fatal_error "only absolute run-paths are allowed"
;;
esac
- if test "$prev" = rpath; then
+ if test rpath = "$prev"; then
case "$rpath " in
*" $arg "*) ;;
*) func_append rpath " $arg" ;;
@@ -5430,7 +6788,7 @@ func_mode_link ()
continue
;;
shrext)
- shrext_cmds="$arg"
+ shrext_cmds=$arg
prev=
continue
;;
@@ -5470,7 +6828,7 @@ func_mode_link ()
esac
fi # test -n "$prev"
- prevarg="$arg"
+ prevarg=$arg
case $arg in
-all-static)
@@ -5484,7 +6842,7 @@ func_mode_link ()
-allow-undefined)
# FIXME: remove this flag sometime in the future.
- func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ func_fatal_error "'-allow-undefined' must not be used because it is the default"
;;
-avoid-version)
@@ -5516,7 +6874,7 @@ func_mode_link ()
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
func_fatal_error "more than one -exported-symbols argument is not allowed"
fi
- if test "X$arg" = "X-export-symbols"; then
+ if test X-export-symbols = "X$arg"; then
prev=expsyms
else
prev=expsyms_regex
@@ -5550,9 +6908,9 @@ func_mode_link ()
func_stripname "-L" '' "$arg"
if test -z "$func_stripname_result"; then
if test "$#" -gt 0; then
- func_fatal_error "require no space between \`-L' and \`$1'"
+ func_fatal_error "require no space between '-L' and '$1'"
else
- func_fatal_error "need path for \`-L' option"
+ func_fatal_error "need path for '-L' option"
fi
fi
func_resolve_sysroot "$func_stripname_result"
@@ -5563,8 +6921,8 @@ func_mode_link ()
*)
absdir=`cd "$dir" && pwd`
test -z "$absdir" && \
- func_fatal_error "cannot determine absolute directory name of \`$dir'"
- dir="$absdir"
+ func_fatal_error "cannot determine absolute directory name of '$dir'"
+ dir=$absdir
;;
esac
case "$deplibs " in
@@ -5599,7 +6957,7 @@ func_mode_link ()
;;
-l*)
- if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ if test X-lc = "X$arg" || test X-lm = "X$arg"; then
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
# These systems don't actually have a C or math library (as such)
@@ -5607,11 +6965,11 @@ func_mode_link ()
;;
*-*-os2*)
# These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
+ test X-lc = "X$arg" && continue
;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
# Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
+ test X-lc = "X$arg" && continue
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C and math libraries are in the System framework
@@ -5620,16 +6978,16 @@ func_mode_link ()
;;
*-*-sco3.2v5* | *-*-sco5v6*)
# Causes problems with __ctype
- test "X$arg" = "X-lc" && continue
+ test X-lc = "X$arg" && continue
;;
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
# Compiler inserts libc in the correct place for threads to work
- test "X$arg" = "X-lc" && continue
+ test X-lc = "X$arg" && continue
;;
esac
- elif test "X$arg" = "X-lc_r"; then
+ elif test X-lc_r = "X$arg"; then
case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
@@ -5639,6 +6997,11 @@ func_mode_link ()
continue
;;
+ -mllvm)
+ prev=mllvm
+ continue
+ ;;
+
-module)
module=yes
continue
@@ -5668,7 +7031,7 @@ func_mode_link ()
;;
-multi_module)
- single_module="${wl}-multi_module"
+ single_module=$wl-multi_module
continue
;;
@@ -5682,8 +7045,8 @@ func_mode_link ()
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
# The PATH hackery in wrapper scripts is required on Windows
# and Darwin in order for the loader to find any dlls it needs.
- func_warning "\`-no-install' is ignored for $host"
- func_warning "assuming \`-no-fast-install' instead"
+ func_warning "'-no-install' is ignored for $host"
+ func_warning "assuming '-no-fast-install' instead"
fast_install=no
;;
*) no_install=yes ;;
@@ -5788,14 +7151,14 @@ func_mode_link ()
func_stripname '-Wc,' '' "$arg"
args=$func_stripname_result
arg=
- save_ifs="$IFS"; IFS=','
+ save_ifs=$IFS; IFS=,
for flag in $args; do
- IFS="$save_ifs"
+ IFS=$save_ifs
func_quote_for_eval "$flag"
func_append arg " $func_quote_for_eval_result"
func_append compiler_flags " $func_quote_for_eval_result"
done
- IFS="$save_ifs"
+ IFS=$save_ifs
func_stripname ' ' '' "$arg"
arg=$func_stripname_result
;;
@@ -5804,15 +7167,15 @@ func_mode_link ()
func_stripname '-Wl,' '' "$arg"
args=$func_stripname_result
arg=
- save_ifs="$IFS"; IFS=','
+ save_ifs=$IFS; IFS=,
for flag in $args; do
- IFS="$save_ifs"
+ IFS=$save_ifs
func_quote_for_eval "$flag"
func_append arg " $wl$func_quote_for_eval_result"
func_append compiler_flags " $wl$func_quote_for_eval_result"
func_append linker_flags " $func_quote_for_eval_result"
done
- IFS="$save_ifs"
+ IFS=$save_ifs
func_stripname ' ' '' "$arg"
arg=$func_stripname_result
;;
@@ -5835,7 +7198,7 @@ func_mode_link ()
# -msg_* for osf cc
-msg_*)
func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
+ arg=$func_quote_for_eval_result
;;
# Flags to be passed through unchanged, with rationale:
@@ -5850,12 +7213,13 @@ func_mode_link ()
# @file GCC response files
# -tp=* Portland pgcc target processor selection
# --sysroot=* for sysroot support
- # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -stdlib=* select c++ std lib with clang
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-stdlib=*)
func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
+ arg=$func_quote_for_eval_result
func_append compile_command " $arg"
func_append finalize_command " $arg"
func_append compiler_flags " $arg"
@@ -5865,7 +7229,7 @@ func_mode_link ()
# Some other compiler flag.
-* | +*)
func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
+ arg=$func_quote_for_eval_result
;;
*.$objext)
@@ -5886,21 +7250,21 @@ func_mode_link ()
if test -z "$pic_object" ||
test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
fi
# Extract subdirectory from the argument.
func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
+ xdir=$func_dirname_result
- if test "$pic_object" != none; then
+ test none = "$pic_object" || {
# Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
+ pic_object=$xdir$pic_object
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
func_append dlfiles " $pic_object"
prev=
continue
@@ -5911,7 +7275,7 @@ func_mode_link ()
fi
# CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
+ if test dlprefiles = "$prev"; then
# Preload the old-style object.
func_append dlprefiles " $pic_object"
prev=
@@ -5919,23 +7283,23 @@ func_mode_link ()
# A PIC object.
func_append libobjs " $pic_object"
- arg="$pic_object"
- fi
+ arg=$pic_object
+ }
# Non-PIC object.
- if test "$non_pic_object" != none; then
+ if test none != "$non_pic_object"; then
# Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
+ non_pic_object=$xdir$non_pic_object
# A standard non-PIC object
func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
fi
else
# If the PIC object exists, use it instead.
# $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
+ non_pic_object=$pic_object
func_append non_pic_objects " $non_pic_object"
fi
else
@@ -5943,7 +7307,7 @@ func_mode_link ()
if $opt_dry_run; then
# Extract subdirectory from the argument.
func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
+ xdir=$func_dirname_result
func_lo2o "$arg"
pic_object=$xdir$objdir/$func_lo2o_result
@@ -5951,7 +7315,7 @@ func_mode_link ()
func_append libobjs " $pic_object"
func_append non_pic_objects " $non_pic_object"
else
- func_fatal_error "\`$arg' is not a valid libtool object"
+ func_fatal_error "'$arg' is not a valid libtool object"
fi
fi
;;
@@ -5967,11 +7331,11 @@ func_mode_link ()
# A libtool-controlled library.
func_resolve_sysroot "$arg"
- if test "$prev" = dlfiles; then
+ if test dlfiles = "$prev"; then
# This library was specified with -dlopen.
func_append dlfiles " $func_resolve_sysroot_result"
prev=
- elif test "$prev" = dlprefiles; then
+ elif test dlprefiles = "$prev"; then
# The library was specified with -dlpreopen.
func_append dlprefiles " $func_resolve_sysroot_result"
prev=
@@ -5986,7 +7350,7 @@ func_mode_link ()
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
+ arg=$func_quote_for_eval_result
;;
esac # arg
@@ -5998,9 +7362,9 @@ func_mode_link ()
done # argument parsing loop
test -n "$prev" && \
- func_fatal_help "the \`$prevarg' option requires an argument"
+ func_fatal_help "the '$prevarg' option requires an argument"
- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
func_append compile_command " $arg"
func_append finalize_command " $arg"
@@ -6009,12 +7373,12 @@ func_mode_link ()
oldlibs=
# calculate the name of the file, without its directory
func_basename "$output"
- outputname="$func_basename_result"
- libobjs_save="$libobjs"
+ outputname=$func_basename_result
+ libobjs_save=$libobjs
if test -n "$shlibpath_var"; then
# get the directories listed in $shlibpath_var
- eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
+ eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
else
shlib_search_path=
fi
@@ -6022,7 +7386,7 @@ func_mode_link ()
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
func_dirname "$output" "/" ""
- output_objdir="$func_dirname_result$objdir"
+ output_objdir=$func_dirname_result$objdir
func_to_tool_file "$output_objdir/"
tool_output_objdir=$func_to_tool_file_result
# Create the object directory.
@@ -6045,7 +7409,7 @@ func_mode_link ()
# Find all interdependent deplibs by searching for libraries
# that are linked more than once (e.g. -la -lb -la)
for deplib in $deplibs; do
- if $opt_preserve_dup_deps ; then
+ if $opt_preserve_dup_deps; then
case "$libs " in
*" $deplib "*) func_append specialdeplibs " $deplib" ;;
esac
@@ -6053,7 +7417,7 @@ func_mode_link ()
func_append libs " $deplib"
done
- if test "$linkmode" = lib; then
+ if test lib = "$linkmode"; then
libs="$predeps $libs $compiler_lib_search_path $postdeps"
# Compute libraries that are listed more than once in $predeps
@@ -6085,7 +7449,7 @@ func_mode_link ()
case $file in
*.la) ;;
*)
- func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
;;
esac
done
@@ -6093,7 +7457,7 @@ func_mode_link ()
prog)
compile_deplibs=
finalize_deplibs=
- alldeplibs=no
+ alldeplibs=false
newdlfiles=
newdlprefiles=
passes="conv scan dlopen dlpreopen link"
@@ -6105,29 +7469,29 @@ func_mode_link ()
for pass in $passes; do
# The preopen pass in lib mode reverses $deplibs; put it back here
# so that -L comes before libs that need it for instance...
- if test "$linkmode,$pass" = "lib,link"; then
+ if test lib,link = "$linkmode,$pass"; then
## FIXME: Find the place where the list is rebuilt in the wrong
## order, and fix it there properly
tmp_deplibs=
for deplib in $deplibs; do
tmp_deplibs="$deplib $tmp_deplibs"
done
- deplibs="$tmp_deplibs"
+ deplibs=$tmp_deplibs
fi
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan"; then
- libs="$deplibs"
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass"; then
+ libs=$deplibs
deplibs=
fi
- if test "$linkmode" = prog; then
+ if test prog = "$linkmode"; then
case $pass in
- dlopen) libs="$dlfiles" ;;
- dlpreopen) libs="$dlprefiles" ;;
+ dlopen) libs=$dlfiles ;;
+ dlpreopen) libs=$dlprefiles ;;
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
- if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ if test lib,dlpreopen = "$linkmode,$pass"; then
# Collect and forward deplibs of preopened libtool libs
for lib in $dlprefiles; do
# Ignore non-libtool-libs
@@ -6148,26 +7512,26 @@ func_mode_link ()
esac
done
done
- libs="$dlprefiles"
+ libs=$dlprefiles
fi
- if test "$pass" = dlopen; then
+ if test dlopen = "$pass"; then
# Collect dlpreopened libraries
- save_deplibs="$deplibs"
+ save_deplibs=$deplibs
deplibs=
fi
for deplib in $libs; do
lib=
- found=no
+ found=false
case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
- if test "$linkmode,$pass" = "prog,link"; then
+ if test prog,link = "$linkmode,$pass"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
func_append compiler_flags " $deplib"
- if test "$linkmode" = lib ; then
+ if test lib = "$linkmode"; then
case "$new_inherited_linker_flags " in
*" $deplib "*) ;;
* ) func_append new_inherited_linker_flags " $deplib" ;;
@@ -6177,13 +7541,13 @@ func_mode_link ()
continue
;;
-l*)
- if test "$linkmode" != lib && test "$linkmode" != prog; then
- func_warning "\`-l' is ignored for archives/objects"
+ if test lib != "$linkmode" && test prog != "$linkmode"; then
+ func_warning "'-l' is ignored for archives/objects"
continue
fi
func_stripname '-l' '' "$deplib"
name=$func_stripname_result
- if test "$linkmode" = lib; then
+ if test lib = "$linkmode"; then
searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
else
searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
@@ -6191,31 +7555,22 @@ func_mode_link ()
for searchdir in $searchdirs; do
for search_ext in .la $std_shrext .so .a; do
# Search the libtool library
- lib="$searchdir/lib${name}${search_ext}"
+ lib=$searchdir/lib$name$search_ext
if test -f "$lib"; then
- if test "$search_ext" = ".la"; then
- found=yes
+ if test .la = "$search_ext"; then
+ found=:
else
- found=no
+ found=false
fi
break 2
fi
done
done
- if test "$found" != yes; then
- # deplib doesn't seem to be a libtool library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- else # deplib is a libtool library
+ if $found; then
+ # deplib is a libtool library
# If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
# We need to do some special things here, and not later.
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
case " $predeps $postdeps " in
*" $deplib "*)
if func_lalib_p "$lib"; then
@@ -6223,19 +7578,19 @@ func_mode_link ()
old_library=
func_source "$lib"
for l in $old_library $library_names; do
- ll="$l"
+ ll=$l
done
- if test "X$ll" = "X$old_library" ; then # only static version available
- found=no
+ if test "X$ll" = "X$old_library"; then # only static version available
+ found=false
func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
+ ladir=$func_dirname_result
lib=$ladir/$old_library
- if test "$linkmode,$pass" = "prog,link"; then
+ if test prog,link = "$linkmode,$pass"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
fi
continue
fi
@@ -6244,15 +7599,25 @@ func_mode_link ()
*) ;;
esac
fi
+ else
+ # deplib doesn't seem to be a libtool library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
fi
;; # -l
*.ltframework)
- if test "$linkmode,$pass" = "prog,link"; then
+ if test prog,link = "$linkmode,$pass"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
- if test "$linkmode" = lib ; then
+ if test lib = "$linkmode"; then
case "$new_inherited_linker_flags " in
*" $deplib "*) ;;
* ) func_append new_inherited_linker_flags " $deplib" ;;
@@ -6265,18 +7630,18 @@ func_mode_link ()
case $linkmode in
lib)
deplibs="$deplib $deplibs"
- test "$pass" = conv && continue
+ test conv = "$pass" && continue
newdependency_libs="$deplib $newdependency_libs"
func_stripname '-L' '' "$deplib"
func_resolve_sysroot "$func_stripname_result"
func_append newlib_search_path " $func_resolve_sysroot_result"
;;
prog)
- if test "$pass" = conv; then
+ if test conv = "$pass"; then
deplibs="$deplib $deplibs"
continue
fi
- if test "$pass" = scan; then
+ if test scan = "$pass"; then
deplibs="$deplib $deplibs"
else
compile_deplibs="$deplib $compile_deplibs"
@@ -6287,13 +7652,13 @@ func_mode_link ()
func_append newlib_search_path " $func_resolve_sysroot_result"
;;
*)
- func_warning "\`-L' is ignored for archives/objects"
+ func_warning "'-L' is ignored for archives/objects"
;;
esac # linkmode
continue
;; # -L
-R*)
- if test "$pass" = link; then
+ if test link = "$pass"; then
func_stripname '-R' '' "$deplib"
func_resolve_sysroot "$func_stripname_result"
dir=$func_resolve_sysroot_result
@@ -6311,7 +7676,7 @@ func_mode_link ()
lib=$func_resolve_sysroot_result
;;
*.$libext)
- if test "$pass" = conv; then
+ if test conv = "$pass"; then
deplibs="$deplib $deplibs"
continue
fi
@@ -6322,21 +7687,26 @@ func_mode_link ()
case " $dlpreconveniencelibs " in
*" $deplib "*) ;;
*)
- valid_a_lib=no
+ valid_a_lib=false
case $deplibs_check_method in
match_pattern*)
set dummy $deplibs_check_method; shift
match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
| $EGREP "$match_pattern_regex" > /dev/null; then
- valid_a_lib=yes
+ valid_a_lib=:
fi
;;
pass_all)
- valid_a_lib=yes
+ valid_a_lib=:
;;
esac
- if test "$valid_a_lib" != yes; then
+ if $valid_a_lib; then
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ else
echo
$ECHO "*** Warning: Trying to link with static lib archive $deplib."
echo "*** I have the capability to make that library automatically link in when"
@@ -6344,18 +7714,13 @@ func_mode_link ()
echo "*** shared version of the library, which you do not appear to have"
echo "*** because the file extensions .$libext of this argument makes me believe"
echo "*** that it is just a static archive that I should not use here."
- else
- echo
- $ECHO "*** Warning: Linking the shared library $output against the"
- $ECHO "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
fi
;;
esac
continue
;;
prog)
- if test "$pass" != link; then
+ if test link != "$pass"; then
deplibs="$deplib $deplibs"
else
compile_deplibs="$deplib $compile_deplibs"
@@ -6366,10 +7731,10 @@ func_mode_link ()
esac # linkmode
;; # *.$libext
*.lo | *.$objext)
- if test "$pass" = conv; then
+ if test conv = "$pass"; then
deplibs="$deplib $deplibs"
- elif test "$linkmode" = prog; then
- if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ elif test prog = "$linkmode"; then
+ if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
# If there is no dlopen support or we're linking statically,
# we need to preload.
func_append newdlprefiles " $deplib"
@@ -6382,22 +7747,20 @@ func_mode_link ()
continue
;;
%DEPLIBS%)
- alldeplibs=yes
+ alldeplibs=:
continue
;;
esac # case $deplib
- if test "$found" = yes || test -f "$lib"; then :
- else
- func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
- fi
+ $found || test -f "$lib" \
+ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
# Check to see that this really is a libtool archive.
func_lalib_unsafe_p "$lib" \
- || func_fatal_error "\`$lib' is not a valid libtool archive"
+ || func_fatal_error "'$lib' is not a valid libtool archive"
func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
+ ladir=$func_dirname_result
dlname=
dlopen=
@@ -6427,30 +7790,30 @@ func_mode_link ()
done
fi
dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan" ||
- { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass" ||
+ { test prog != "$linkmode" && test lib != "$linkmode"; }; then
test -n "$dlopen" && func_append dlfiles " $dlopen"
test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
fi
- if test "$pass" = conv; then
+ if test conv = "$pass"; then
# Only check for convenience libraries
deplibs="$lib $deplibs"
if test -z "$libdir"; then
if test -z "$old_library"; then
- func_fatal_error "cannot find name of link library for \`$lib'"
+ func_fatal_error "cannot find name of link library for '$lib'"
fi
# It is a libtool convenience library, so add in its objects.
func_append convenience " $ladir/$objdir/$old_library"
func_append old_convenience " $ladir/$objdir/$old_library"
- elif test "$linkmode" != prog && test "$linkmode" != lib; then
- func_fatal_error "\`$lib' is not a convenience library"
+ elif test prog != "$linkmode" && test lib != "$linkmode"; then
+ func_fatal_error "'$lib' is not a convenience library"
fi
tmp_libs=
for deplib in $dependency_libs; do
deplibs="$deplib $deplibs"
- if $opt_preserve_dup_deps ; then
+ if $opt_preserve_dup_deps; then
case "$tmp_libs " in
*" $deplib "*) func_append specialdeplibs " $deplib" ;;
esac
@@ -6464,26 +7827,26 @@ func_mode_link ()
# Get the name of the library we link against.
linklib=
if test -n "$old_library" &&
- { test "$prefer_static_libs" = yes ||
- test "$prefer_static_libs,$installed" = "built,no"; }; then
+ { test yes = "$prefer_static_libs" ||
+ test built,no = "$prefer_static_libs,$installed"; }; then
linklib=$old_library
else
for l in $old_library $library_names; do
- linklib="$l"
+ linklib=$l
done
fi
if test -z "$linklib"; then
- func_fatal_error "cannot find name of link library for \`$lib'"
+ func_fatal_error "cannot find name of link library for '$lib'"
fi
# This library was specified with -dlopen.
- if test "$pass" = dlopen; then
- if test -z "$libdir"; then
- func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
- fi
+ if test dlopen = "$pass"; then
+ test -z "$libdir" \
+ && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
if test -z "$dlname" ||
- test "$dlopen_support" != yes ||
- test "$build_libtool_libs" = no; then
+ test yes != "$dlopen_support" ||
+ test no = "$build_libtool_libs"
+ then
# If there is no dlname, no dlopen support or we're linking
# statically, we need to preload. We also need to preload any
# dependent libraries so libltdl's deplib preloader doesn't
@@ -6497,40 +7860,40 @@ func_mode_link ()
# We need an absolute path.
case $ladir in
- [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
*)
abs_ladir=`cd "$ladir" && pwd`
if test -z "$abs_ladir"; then
- func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "cannot determine absolute directory name of '$ladir'"
func_warning "passing it literally to the linker, although it might fail"
- abs_ladir="$ladir"
+ abs_ladir=$ladir
fi
;;
esac
func_basename "$lib"
- laname="$func_basename_result"
+ laname=$func_basename_result
# Find the relevant object directory and library name.
- if test "X$installed" = Xyes; then
+ if test yes = "$installed"; then
if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- func_warning "library \`$lib' was moved."
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
+ func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
else
- dir="$lt_sysroot$libdir"
- absdir="$lt_sysroot$libdir"
+ dir=$lt_sysroot$libdir
+ absdir=$lt_sysroot$libdir
fi
- test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ test yes = "$hardcode_automatic" && avoidtemprpath=yes
else
if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- dir="$ladir"
- absdir="$abs_ladir"
+ dir=$ladir
+ absdir=$abs_ladir
# Remove this search path later
func_append notinst_path " $abs_ladir"
else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
+ dir=$ladir/$objdir
+ absdir=$abs_ladir/$objdir
# Remove this search path later
func_append notinst_path " $abs_ladir"
fi
@@ -6539,11 +7902,11 @@ func_mode_link ()
name=$func_stripname_result
# This library was specified with -dlpreopen.
- if test "$pass" = dlpreopen; then
- if test -z "$libdir" && test "$linkmode" = prog; then
- func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ if test dlpreopen = "$pass"; then
+ if test -z "$libdir" && test prog = "$linkmode"; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
fi
- case "$host" in
+ case $host in
# special handling for platforms with PE-DLLs.
*cygwin* | *mingw* | *cegcc* )
# Linker will automatically link against shared library if both
@@ -6587,9 +7950,9 @@ func_mode_link ()
if test -z "$libdir"; then
# Link the convenience library
- if test "$linkmode" = lib; then
+ if test lib = "$linkmode"; then
deplibs="$dir/$old_library $deplibs"
- elif test "$linkmode,$pass" = "prog,link"; then
+ elif test prog,link = "$linkmode,$pass"; then
compile_deplibs="$dir/$old_library $compile_deplibs"
finalize_deplibs="$dir/$old_library $finalize_deplibs"
else
@@ -6599,14 +7962,14 @@ func_mode_link ()
fi
- if test "$linkmode" = prog && test "$pass" != link; then
+ if test prog = "$linkmode" && test link != "$pass"; then
func_append newlib_search_path " $ladir"
deplibs="$lib $deplibs"
- linkalldeplibs=no
- if test "$link_all_deplibs" != no || test -z "$library_names" ||
- test "$build_libtool_libs" = no; then
- linkalldeplibs=yes
+ linkalldeplibs=false
+ if test no != "$link_all_deplibs" || test -z "$library_names" ||
+ test no = "$build_libtool_libs"; then
+ linkalldeplibs=:
fi
tmp_libs=
@@ -6618,14 +7981,14 @@ func_mode_link ()
;;
esac
# Need to link against all dependency_libs?
- if test "$linkalldeplibs" = yes; then
+ if $linkalldeplibs; then
deplibs="$deplib $deplibs"
else
# Need to hardcode shared library paths
# or/and link against static libraries
newdependency_libs="$deplib $newdependency_libs"
fi
- if $opt_preserve_dup_deps ; then
+ if $opt_preserve_dup_deps; then
case "$tmp_libs " in
*" $deplib "*) func_append specialdeplibs " $deplib" ;;
esac
@@ -6635,15 +7998,15 @@ func_mode_link ()
continue
fi # $linkmode = prog...
- if test "$linkmode,$pass" = "prog,link"; then
+ if test prog,link = "$linkmode,$pass"; then
if test -n "$library_names" &&
- { { test "$prefer_static_libs" = no ||
- test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ { { test no = "$prefer_static_libs" ||
+ test built,yes = "$prefer_static_libs,$installed"; } ||
test -z "$old_library"; }; then
# We need to hardcode the library path
- if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
# Make sure the rpath contains only unique directories.
- case "$temp_rpath:" in
+ case $temp_rpath: in
*"$absdir:"*) ;;
*) func_append temp_rpath "$absdir:" ;;
esac
@@ -6672,9 +8035,9 @@ func_mode_link ()
esac
fi # $linkmode,$pass = prog,link...
- if test "$alldeplibs" = yes &&
- { test "$deplibs_check_method" = pass_all ||
- { test "$build_libtool_libs" = yes &&
+ if $alldeplibs &&
+ { test pass_all = "$deplibs_check_method" ||
+ { test yes = "$build_libtool_libs" &&
test -n "$library_names"; }; }; then
# We only need to search for static libraries
continue
@@ -6683,11 +8046,11 @@ func_mode_link ()
link_static=no # Whether the deplib will be linked statically
use_static_libs=$prefer_static_libs
- if test "$use_static_libs" = built && test "$installed" = yes; then
+ if test built = "$use_static_libs" && test yes = "$installed"; then
use_static_libs=no
fi
if test -n "$library_names" &&
- { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ { test no = "$use_static_libs" || test -z "$old_library"; }; then
case $host in
*cygwin* | *mingw* | *cegcc*)
# No point in relinking DLLs because paths are not encoded
@@ -6695,7 +8058,7 @@ func_mode_link ()
need_relink=no
;;
*)
- if test "$installed" = no; then
+ if test no = "$installed"; then
func_append notinst_deplibs " $lib"
need_relink=yes
fi
@@ -6705,24 +8068,24 @@ func_mode_link ()
# Warn about portability, can't link against -module's on some
# systems (darwin). Don't bleat about dlopened modules though!
- dlopenmodule=""
+ dlopenmodule=
for dlpremoduletest in $dlprefiles; do
if test "X$dlpremoduletest" = "X$lib"; then
- dlopenmodule="$dlpremoduletest"
+ dlopenmodule=$dlpremoduletest
break
fi
done
- if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
echo
- if test "$linkmode" = prog; then
+ if test prog = "$linkmode"; then
$ECHO "*** Warning: Linking the executable $output against the loadable module"
else
$ECHO "*** Warning: Linking the shared library $output against the loadable module"
fi
$ECHO "*** $linklib is not portable!"
fi
- if test "$linkmode" = lib &&
- test "$hardcode_into_libs" = yes; then
+ if test lib = "$linkmode" &&
+ test yes = "$hardcode_into_libs"; then
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -6750,43 +8113,43 @@ func_mode_link ()
# figure out the soname
set dummy $library_names
shift
- realname="$1"
+ realname=$1
shift
libname=`eval "\\$ECHO \"$libname_spec\""`
# use dlname if we got it. it's perfectly good, no?
if test -n "$dlname"; then
- soname="$dlname"
+ soname=$dlname
elif test -n "$soname_spec"; then
# bleh windows
case $host in
*cygwin* | mingw* | *cegcc*)
func_arith $current - $age
major=$func_arith_result
- versuffix="-$major"
+ versuffix=-$major
;;
esac
eval soname=\"$soname_spec\"
else
- soname="$realname"
+ soname=$realname
fi
# Make a new name for the extract_expsyms_cmds to use
- soroot="$soname"
+ soroot=$soname
func_basename "$soroot"
- soname="$func_basename_result"
+ soname=$func_basename_result
func_stripname 'lib' '.dll' "$soname"
newlib=libimp-$func_stripname_result.a
# If the library has no export list, then create one now
if test -f "$output_objdir/$soname-def"; then :
else
- func_verbose "extracting exported symbol list from \`$soname'"
+ func_verbose "extracting exported symbol list from '$soname'"
func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
fi
# Create $newlib
if test -f "$output_objdir/$newlib"; then :; else
- func_verbose "generating import library for \`$soname'"
+ func_verbose "generating import library for '$soname'"
func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
fi
# make sure the library variables are pointing to the new library
@@ -6794,58 +8157,58 @@ func_mode_link ()
linklib=$newlib
fi # test -n "$old_archive_from_expsyms_cmds"
- if test "$linkmode" = prog || test "$opt_mode" != relink; then
+ if test prog = "$linkmode" || test relink != "$opt_mode"; then
add_shlibpath=
add_dir=
add=
lib_linked=yes
case $hardcode_action in
immediate | unsupported)
- if test "$hardcode_direct" = no; then
- add="$dir/$linklib"
+ if test no = "$hardcode_direct"; then
+ add=$dir/$linklib
case $host in
- *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
- *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+ *-*-sysv4*uw2*) add_dir=-L$dir ;;
*-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
- *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-unixware7*) add_dir=-L$dir ;;
*-*-darwin* )
- # if the lib is a (non-dlopened) module then we can not
+ # if the lib is a (non-dlopened) module then we cannot
# link against it, someone is ignoring the earlier warnings
if /usr/bin/file -L $add 2> /dev/null |
- $GREP ": [^:]* bundle" >/dev/null ; then
+ $GREP ": [^:]* bundle" >/dev/null; then
if test "X$dlopenmodule" != "X$lib"; then
$ECHO "*** Warning: lib $linklib is a module, not a shared library"
- if test -z "$old_library" ; then
+ if test -z "$old_library"; then
echo
echo "*** And there doesn't seem to be a static archive available"
echo "*** The link will probably fail, sorry"
else
- add="$dir/$old_library"
+ add=$dir/$old_library
fi
elif test -n "$old_library"; then
- add="$dir/$old_library"
+ add=$dir/$old_library
fi
fi
esac
- elif test "$hardcode_minus_L" = no; then
+ elif test no = "$hardcode_minus_L"; then
case $host in
- *-*-sunos*) add_shlibpath="$dir" ;;
+ *-*-sunos*) add_shlibpath=$dir ;;
esac
- add_dir="-L$dir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = no; then
- add_shlibpath="$dir"
- add="-l$name"
+ add_dir=-L$dir
+ add=-l$name
+ elif test no = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
else
lib_linked=no
fi
;;
relink)
- if test "$hardcode_direct" = yes &&
- test "$hardcode_direct_absolute" = no; then
- add="$dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$absdir"
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$dir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$absdir
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
@@ -6854,10 +8217,10 @@ func_mode_link ()
;;
esac
fi
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- add_shlibpath="$dir"
- add="-l$name"
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
else
lib_linked=no
fi
@@ -6865,7 +8228,7 @@ func_mode_link ()
*) lib_linked=no ;;
esac
- if test "$lib_linked" != yes; then
+ if test yes != "$lib_linked"; then
func_fatal_configuration "unsupported hardcode properties"
fi
@@ -6875,15 +8238,15 @@ func_mode_link ()
*) func_append compile_shlibpath "$add_shlibpath:" ;;
esac
fi
- if test "$linkmode" = prog; then
+ if test prog = "$linkmode"; then
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
test -n "$add" && compile_deplibs="$add $compile_deplibs"
else
test -n "$add_dir" && deplibs="$add_dir $deplibs"
test -n "$add" && deplibs="$add $deplibs"
- if test "$hardcode_direct" != yes &&
- test "$hardcode_minus_L" != yes &&
- test "$hardcode_shlibpath_var" = yes; then
+ if test yes != "$hardcode_direct" &&
+ test yes != "$hardcode_minus_L" &&
+ test yes = "$hardcode_shlibpath_var"; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
*) func_append finalize_shlibpath "$libdir:" ;;
@@ -6892,33 +8255,33 @@ func_mode_link ()
fi
fi
- if test "$linkmode" = prog || test "$opt_mode" = relink; then
+ if test prog = "$linkmode" || test relink = "$opt_mode"; then
add_shlibpath=
add_dir=
add=
# Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes &&
- test "$hardcode_direct_absolute" = no; then
- add="$libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$libdir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$libdir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$libdir
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
*) func_append finalize_shlibpath "$libdir:" ;;
esac
- add="-l$name"
- elif test "$hardcode_automatic" = yes; then
+ add=-l$name
+ elif test yes = "$hardcode_automatic"; then
if test -n "$inst_prefix_dir" &&
- test -f "$inst_prefix_dir$libdir/$linklib" ; then
- add="$inst_prefix_dir$libdir/$linklib"
+ test -f "$inst_prefix_dir$libdir/$linklib"; then
+ add=$inst_prefix_dir$libdir/$linklib
else
- add="$libdir/$linklib"
+ add=$libdir/$linklib
fi
else
# We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
+ add_dir=-L$libdir
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
@@ -6927,10 +8290,10 @@ func_mode_link ()
;;
esac
fi
- add="-l$name"
+ add=-l$name
fi
- if test "$linkmode" = prog; then
+ if test prog = "$linkmode"; then
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
else
@@ -6938,43 +8301,43 @@ func_mode_link ()
test -n "$add" && deplibs="$add $deplibs"
fi
fi
- elif test "$linkmode" = prog; then
+ elif test prog = "$linkmode"; then
# Here we assume that one of hardcode_direct or hardcode_minus_L
# is not unsupported. This is valid on all known static and
# shared platforms.
- if test "$hardcode_direct" != unsupported; then
- test -n "$old_library" && linklib="$old_library"
+ if test unsupported != "$hardcode_direct"; then
+ test -n "$old_library" && linklib=$old_library
compile_deplibs="$dir/$linklib $compile_deplibs"
finalize_deplibs="$dir/$linklib $finalize_deplibs"
else
compile_deplibs="-l$name -L$dir $compile_deplibs"
finalize_deplibs="-l$name -L$dir $finalize_deplibs"
fi
- elif test "$build_libtool_libs" = yes; then
+ elif test yes = "$build_libtool_libs"; then
# Not a shared library
- if test "$deplibs_check_method" != pass_all; then
+ if test pass_all != "$deplibs_check_method"; then
# We're trying link a shared library against a static one
# but the system doesn't support it.
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
echo
- $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ $ECHO "*** Warning: This system cannot link to static lib archive $lib."
echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
- if test "$module" = yes; then
+ if test yes = "$module"; then
echo "*** But as you try to build a module library, libtool will still create "
echo "*** a static module, that should work as long as the dlopening application"
echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
if test -z "$global_symbol_pipe"; then
echo
echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
echo "*** not find such a program. So, this module is probably useless."
- echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
fi
- if test "$build_old_libs" = no; then
+ if test no = "$build_old_libs"; then
build_libtool_libs=module
build_old_libs=yes
else
@@ -6987,11 +8350,11 @@ func_mode_link ()
fi
fi # link shared/static library?
- if test "$linkmode" = lib; then
+ if test lib = "$linkmode"; then
if test -n "$dependency_libs" &&
- { test "$hardcode_into_libs" != yes ||
- test "$build_old_libs" = yes ||
- test "$link_static" = yes; }; then
+ { test yes != "$hardcode_into_libs" ||
+ test yes = "$build_old_libs" ||
+ test yes = "$link_static"; }; then
# Extract -R from dependency_libs
temp_deplibs=
for libdir in $dependency_libs; do
@@ -7005,12 +8368,12 @@ func_mode_link ()
*) func_append temp_deplibs " $libdir";;
esac
done
- dependency_libs="$temp_deplibs"
+ dependency_libs=$temp_deplibs
fi
func_append newlib_search_path " $absdir"
# Link against this library
- test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
# ... and its dependency_libs
tmp_libs=
for deplib in $dependency_libs; do
@@ -7020,7 +8383,7 @@ func_mode_link ()
func_resolve_sysroot "$func_stripname_result";;
*) func_resolve_sysroot "$deplib" ;;
esac
- if $opt_preserve_dup_deps ; then
+ if $opt_preserve_dup_deps; then
case "$tmp_libs " in
*" $func_resolve_sysroot_result "*)
func_append specialdeplibs " $func_resolve_sysroot_result" ;;
@@ -7029,12 +8392,12 @@ func_mode_link ()
func_append tmp_libs " $func_resolve_sysroot_result"
done
- if test "$link_all_deplibs" != no; then
+ if test no != "$link_all_deplibs"; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
path=
case $deplib in
- -L*) path="$deplib" ;;
+ -L*) path=$deplib ;;
*.la)
func_resolve_sysroot "$deplib"
deplib=$func_resolve_sysroot_result
@@ -7042,12 +8405,12 @@ func_mode_link ()
dir=$func_dirname_result
# We need an absolute path.
case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
- func_warning "cannot determine absolute directory name of \`$dir'"
- absdir="$dir"
+ func_warning "cannot determine absolute directory name of '$dir'"
+ absdir=$dir
fi
;;
esac
@@ -7055,35 +8418,35 @@ func_mode_link ()
case $host in
*-*-darwin*)
depdepl=
- eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
- if test -n "$deplibrary_names" ; then
- for tmp in $deplibrary_names ; do
+ eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names"; then
+ for tmp in $deplibrary_names; do
depdepl=$tmp
done
- if test -f "$absdir/$objdir/$depdepl" ; then
- depdepl="$absdir/$objdir/$depdepl"
- darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -f "$absdir/$objdir/$depdepl"; then
+ depdepl=$absdir/$objdir/$depdepl
+ darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
if test -z "$darwin_install_name"; then
- darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
fi
- func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
- func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+ func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+ func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
path=
fi
fi
;;
*)
- path="-L$absdir/$objdir"
+ path=-L$absdir/$objdir
;;
esac
else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_fatal_error "'$deplib' is not a valid libtool archive"
test "$absdir" != "$libdir" && \
- func_warning "\`$deplib' seems to be moved"
+ func_warning "'$deplib' seems to be moved"
- path="-L$absdir"
+ path=-L$absdir
fi
;;
esac
@@ -7095,23 +8458,23 @@ func_mode_link ()
fi # link_all_deplibs != no
fi # linkmode = lib
done # for deplib in $libs
- if test "$pass" = link; then
- if test "$linkmode" = "prog"; then
+ if test link = "$pass"; then
+ if test prog = "$linkmode"; then
compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
else
compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
fi
fi
- dependency_libs="$newdependency_libs"
- if test "$pass" = dlpreopen; then
+ dependency_libs=$newdependency_libs
+ if test dlpreopen = "$pass"; then
# Link the dlpreopened libraries before other libraries
for deplib in $save_deplibs; do
deplibs="$deplib $deplibs"
done
fi
- if test "$pass" != dlopen; then
- if test "$pass" != conv; then
+ if test dlopen != "$pass"; then
+ test conv = "$pass" || {
# Make sure lib_search_path contains only unique directories.
lib_search_path=
for dir in $newlib_search_path; do
@@ -7121,12 +8484,12 @@ func_mode_link ()
esac
done
newlib_search_path=
- fi
+ }
- if test "$linkmode,$pass" != "prog,link"; then
- vars="deplibs"
- else
+ if test prog,link = "$linkmode,$pass"; then
vars="compile_deplibs finalize_deplibs"
+ else
+ vars=deplibs
fi
for var in $vars dependency_libs; do
# Add libraries to $var in reverse order
@@ -7187,59 +8550,59 @@ func_mode_link ()
# Last step: remove runtime libs from dependency_libs
# (they stay in deplibs)
tmp_libs=
- for i in $dependency_libs ; do
+ for i in $dependency_libs; do
case " $predeps $postdeps $compiler_lib_search_path " in
*" $i "*)
- i=""
+ i=
;;
esac
- if test -n "$i" ; then
+ if test -n "$i"; then
func_append tmp_libs " $i"
fi
done
dependency_libs=$tmp_libs
done # for pass
- if test "$linkmode" = prog; then
- dlfiles="$newdlfiles"
+ if test prog = "$linkmode"; then
+ dlfiles=$newdlfiles
fi
- if test "$linkmode" = prog || test "$linkmode" = lib; then
- dlprefiles="$newdlprefiles"
+ if test prog = "$linkmode" || test lib = "$linkmode"; then
+ dlprefiles=$newdlprefiles
fi
case $linkmode in
oldlib)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for archives"
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for archives"
fi
case " $deplibs" in
*\ -l* | *\ -L*)
- func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ func_warning "'-l' and '-L' are ignored for archives" ;;
esac
test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for archives"
+ func_warning "'-rpath' is ignored for archives"
test -n "$xrpath" && \
- func_warning "\`-R' is ignored for archives"
+ func_warning "'-R' is ignored for archives"
test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for archives"
+ func_warning "'-version-info/-version-number' is ignored for archives"
test -n "$release" && \
- func_warning "\`-release' is ignored for archives"
+ func_warning "'-release' is ignored for archives"
test -n "$export_symbols$export_symbols_regex" && \
- func_warning "\`-export-symbols' is ignored for archives"
+ func_warning "'-export-symbols' is ignored for archives"
# Now set the variables for building old libraries.
build_libtool_libs=no
- oldlibs="$output"
+ oldlibs=$output
func_append objs "$old_deplibs"
;;
lib)
- # Make sure we only generate libraries of the form `libNAME.la'.
+ # Make sure we only generate libraries of the form 'libNAME.la'.
case $outputname in
lib*)
func_stripname 'lib' '.la' "$outputname"
@@ -7248,10 +8611,10 @@ func_mode_link ()
eval libname=\"$libname_spec\"
;;
*)
- test "$module" = no && \
- func_fatal_help "libtool library \`$output' must begin with \`lib'"
+ test no = "$module" \
+ && func_fatal_help "libtool library '$output' must begin with 'lib'"
- if test "$need_lib_prefix" != no; then
+ if test no != "$need_lib_prefix"; then
# Add the "lib" prefix for modules if required
func_stripname '' '.la' "$outputname"
name=$func_stripname_result
@@ -7265,8 +8628,8 @@ func_mode_link ()
esac
if test -n "$objs"; then
- if test "$deplibs_check_method" != pass_all; then
- func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ if test pass_all != "$deplibs_check_method"; then
+ func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
else
echo
$ECHO "*** Warning: Linking the shared library $output against the non-libtool"
@@ -7275,21 +8638,21 @@ func_mode_link ()
fi
fi
- test "$dlself" != no && \
- func_warning "\`-dlopen self' is ignored for libtool libraries"
+ test no = "$dlself" \
+ || func_warning "'-dlopen self' is ignored for libtool libraries"
set dummy $rpath
shift
- test "$#" -gt 1 && \
- func_warning "ignoring multiple \`-rpath's for a libtool library"
+ test 1 -lt "$#" \
+ && func_warning "ignoring multiple '-rpath's for a libtool library"
- install_libdir="$1"
+ install_libdir=$1
oldlibs=
if test -z "$rpath"; then
- if test "$build_libtool_libs" = yes; then
+ if test yes = "$build_libtool_libs"; then
# Building a libtool convenience library.
- # Some compilers have problems with a `.al' extension so
+ # Some compilers have problems with a '.al' extension so
# convenience libraries should have the same extension an
# archive normally would.
oldlibs="$output_objdir/$libname.$libext $oldlibs"
@@ -7298,20 +8661,20 @@ func_mode_link ()
fi
test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+ func_warning "'-version-info/-version-number' is ignored for convenience libraries"
test -n "$release" && \
- func_warning "\`-release' is ignored for convenience libraries"
+ func_warning "'-release' is ignored for convenience libraries"
else
# Parse the version information argument.
- save_ifs="$IFS"; IFS=':'
+ save_ifs=$IFS; IFS=:
set dummy $vinfo 0 0 0
shift
- IFS="$save_ifs"
+ IFS=$save_ifs
test -n "$7" && \
- func_fatal_help "too many parameters to \`-version-info'"
+ func_fatal_help "too many parameters to '-version-info'"
# convert absolute version numbers to libtool ages
# this retains compatibility with .la files and attempts
@@ -7319,42 +8682,42 @@ func_mode_link ()
case $vinfo_number in
yes)
- number_major="$1"
- number_minor="$2"
- number_revision="$3"
+ number_major=$1
+ number_minor=$2
+ number_revision=$3
#
# There are really only two kinds -- those that
# use the current revision as the major version
# and those that subtract age and use age as
# a minor version. But, then there is irix
- # which has an extra 1 added just for fun
+ # that has an extra 1 added just for fun
#
case $version_type in
# correct linux to gnu/linux during the next big refactor
darwin|linux|osf|windows|none)
func_arith $number_major + $number_minor
current=$func_arith_result
- age="$number_minor"
- revision="$number_revision"
+ age=$number_minor
+ revision=$number_revision
;;
freebsd-aout|freebsd-elf|qnx|sunos)
- current="$number_major"
- revision="$number_minor"
- age="0"
+ current=$number_major
+ revision=$number_minor
+ age=0
;;
irix|nonstopux)
func_arith $number_major + $number_minor
current=$func_arith_result
- age="$number_minor"
- revision="$number_minor"
+ age=$number_minor
+ revision=$number_minor
lt_irix_increment=no
;;
esac
;;
no)
- current="$1"
- revision="$2"
- age="$3"
+ current=$1
+ revision=$2
+ age=$3
;;
esac
@@ -7362,30 +8725,30 @@ func_mode_link ()
case $current in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- func_error "CURRENT \`$current' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
+ func_error "CURRENT '$current' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
;;
esac
case $revision in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- func_error "REVISION \`$revision' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
+ func_error "REVISION '$revision' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
;;
esac
case $age in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- func_error "AGE \`$age' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
+ func_error "AGE '$age' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
;;
esac
if test "$age" -gt "$current"; then
- func_error "AGE \`$age' is greater than the current interface number \`$current'"
- func_fatal_error "\`$vinfo' is not valid version information"
+ func_error "AGE '$age' is greater than the current interface number '$current'"
+ func_fatal_error "'$vinfo' is not valid version information"
fi
# Calculate the version variables.
@@ -7400,26 +8763,35 @@ func_mode_link ()
# verstring for coding it into the library header
func_arith $current - $age
major=.$func_arith_result
- versuffix="$major.$age.$revision"
+ versuffix=$major.$age.$revision
# Darwin ld doesn't like 0 for these options...
func_arith $current + 1
minor_current=$func_arith_result
- xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ # On Darwin other compilers
+ case $CC in
+ nagfor*)
+ verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ ;;
+ *)
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+ esac
;;
freebsd-aout)
- major=".$current"
- versuffix=".$current.$revision";
+ major=.$current
+ versuffix=.$current.$revision
;;
freebsd-elf)
- major=".$current"
- versuffix=".$current"
+ major=.$current
+ versuffix=.$current
;;
irix | nonstopux)
- if test "X$lt_irix_increment" = "Xno"; then
+ if test no = "$lt_irix_increment"; then
func_arith $current - $age
else
func_arith $current - $age + 1
@@ -7430,69 +8802,69 @@ func_mode_link ()
nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;;
esac
- verstring="$verstring_prefix$major.$revision"
+ verstring=$verstring_prefix$major.$revision
# Add in all the interfaces that we are compatible with.
loop=$revision
- while test "$loop" -ne 0; do
+ while test 0 -ne "$loop"; do
func_arith $revision - $loop
iface=$func_arith_result
func_arith $loop - 1
loop=$func_arith_result
- verstring="$verstring_prefix$major.$iface:$verstring"
+ verstring=$verstring_prefix$major.$iface:$verstring
done
- # Before this point, $major must not contain `.'.
+ # Before this point, $major must not contain '.'.
major=.$major
- versuffix="$major.$revision"
+ versuffix=$major.$revision
;;
linux) # correct to gnu/linux during the next big refactor
func_arith $current - $age
major=.$func_arith_result
- versuffix="$major.$age.$revision"
+ versuffix=$major.$age.$revision
;;
osf)
func_arith $current - $age
major=.$func_arith_result
- versuffix=".$current.$age.$revision"
- verstring="$current.$age.$revision"
+ versuffix=.$current.$age.$revision
+ verstring=$current.$age.$revision
# Add in all the interfaces that we are compatible with.
loop=$age
- while test "$loop" -ne 0; do
+ while test 0 -ne "$loop"; do
func_arith $current - $loop
iface=$func_arith_result
func_arith $loop - 1
loop=$func_arith_result
- verstring="$verstring:${iface}.0"
+ verstring=$verstring:$iface.0
done
# Make executables depend on our current version.
- func_append verstring ":${current}.0"
+ func_append verstring ":$current.0"
;;
qnx)
- major=".$current"
- versuffix=".$current"
+ major=.$current
+ versuffix=.$current
;;
sunos)
- major=".$current"
- versuffix=".$current.$revision"
+ major=.$current
+ versuffix=.$current.$revision
;;
windows)
# Use '-' rather than '.', since we only want one
- # extension on DOS 8.3 filesystems.
+ # extension on DOS 8.3 file systems.
func_arith $current - $age
major=$func_arith_result
- versuffix="-$major"
+ versuffix=-$major
;;
*)
- func_fatal_configuration "unknown library version type \`$version_type'"
+ func_fatal_configuration "unknown library version type '$version_type'"
;;
esac
@@ -7506,42 +8878,45 @@ func_mode_link ()
verstring=
;;
*)
- verstring="0.0"
+ verstring=0.0
;;
esac
- if test "$need_version" = no; then
+ if test no = "$need_version"; then
versuffix=
else
- versuffix=".0.0"
+ versuffix=.0.0
fi
fi
# Remove version info from name if versioning should be avoided
- if test "$avoid_version" = yes && test "$need_version" = no; then
+ if test yes,no = "$avoid_version,$need_version"; then
major=
versuffix=
- verstring=""
+ verstring=
fi
# Check to see if the archive will have undefined symbols.
- if test "$allow_undefined" = yes; then
- if test "$allow_undefined_flag" = unsupported; then
- func_warning "undefined symbols not allowed in $host shared libraries"
- build_libtool_libs=no
- build_old_libs=yes
+ if test yes = "$allow_undefined"; then
+ if test unsupported = "$allow_undefined_flag"; then
+ if test yes = "$build_old_libs"; then
+ func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+ build_libtool_libs=no
+ else
+ func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+ fi
fi
else
# Don't allow undefined symbols.
- allow_undefined_flag="$no_undefined_flag"
+ allow_undefined_flag=$no_undefined_flag
fi
fi
- func_generate_dlsyms "$libname" "$libname" "yes"
+ func_generate_dlsyms "$libname" "$libname" :
func_append libobjs " $symfileobj"
- test "X$libobjs" = "X " && libobjs=
+ test " " = "$libobjs" && libobjs=
- if test "$opt_mode" != relink; then
+ if test relink != "$opt_mode"; then
# Remove our outputs, but don't remove object files since they
# may have been created when compiling PIC objects.
removelist=
@@ -7550,8 +8925,8 @@ func_mode_link ()
case $p in
*.$objext | *.gcno)
;;
- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
- if test "X$precious_files_regex" != "X"; then
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+ if test -n "$precious_files_regex"; then
if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
then
continue
@@ -7567,11 +8942,11 @@ func_mode_link ()
fi
# Now set the variables for building old libraries.
- if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
func_append oldlibs " $output_objdir/$libname.$libext"
# Transform .lo files to .o files.
- oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
fi
# Eliminate all temporary directories.
@@ -7592,13 +8967,13 @@ func_mode_link ()
*) func_append finalize_rpath " $libdir" ;;
esac
done
- if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
dependency_libs="$temp_xrpath $dependency_libs"
fi
fi
# Make sure dlfiles contains only unique files that won't be dlpreopened
- old_dlfiles="$dlfiles"
+ old_dlfiles=$dlfiles
dlfiles=
for lib in $old_dlfiles; do
case " $dlprefiles $dlfiles " in
@@ -7608,7 +8983,7 @@ func_mode_link ()
done
# Make sure dlprefiles contains only unique files
- old_dlprefiles="$dlprefiles"
+ old_dlprefiles=$dlprefiles
dlprefiles=
for lib in $old_dlprefiles; do
case "$dlprefiles " in
@@ -7617,7 +8992,7 @@ func_mode_link ()
esac
done
- if test "$build_libtool_libs" = yes; then
+ if test yes = "$build_libtool_libs"; then
if test -n "$rpath"; then
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
@@ -7641,7 +9016,7 @@ func_mode_link ()
;;
*)
# Add libc to deplibs on all other systems if necessary.
- if test "$build_libtool_need_lc" = "yes"; then
+ if test yes = "$build_libtool_need_lc"; then
func_append deplibs " -lc"
fi
;;
@@ -7657,9 +9032,9 @@ func_mode_link ()
# I'm not sure if I'm treating the release correctly. I think
# release should show up in the -l (ie -lgmp5) so we don't want to
# add it in twice. Is that correct?
- release=""
- versuffix=""
- major=""
+ release=
+ versuffix=
+ major=
newdeplibs=
droppeddeps=no
case $deplibs_check_method in
@@ -7688,20 +9063,20 @@ EOF
-l*)
func_stripname -l '' "$i"
name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
case " $predeps $postdeps " in
*" $i "*)
func_append newdeplibs " $i"
- i=""
+ i=
;;
esac
fi
- if test -n "$i" ; then
+ if test -n "$i"; then
libname=`eval "\\$ECHO \"$libname_spec\""`
deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
set dummy $deplib_matches; shift
deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
func_append newdeplibs " $i"
else
droppeddeps=yes
@@ -7731,20 +9106,20 @@ EOF
$opt_dry_run || $RM conftest
if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
case " $predeps $postdeps " in
*" $i "*)
func_append newdeplibs " $i"
- i=""
+ i=
;;
esac
fi
- if test -n "$i" ; then
+ if test -n "$i"; then
libname=`eval "\\$ECHO \"$libname_spec\""`
deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
set dummy $deplib_matches; shift
deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
func_append newdeplibs " $i"
else
droppeddeps=yes
@@ -7781,24 +9156,24 @@ EOF
-l*)
func_stripname -l '' "$a_deplib"
name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
case " $predeps $postdeps " in
*" $a_deplib "*)
func_append newdeplibs " $a_deplib"
- a_deplib=""
+ a_deplib=
;;
esac
fi
- if test -n "$a_deplib" ; then
+ if test -n "$a_deplib"; then
libname=`eval "\\$ECHO \"$libname_spec\""`
if test -n "$file_magic_glob"; then
libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
else
libnameglob=$libname
fi
- test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+ test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- if test "$want_nocaseglob" = yes; then
+ if test yes = "$want_nocaseglob"; then
shopt -s nocaseglob
potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
$nocaseglob
@@ -7816,25 +9191,25 @@ EOF
# We might still enter an endless loop, since a link
# loop can be closed while we follow links,
# but so what?
- potlib="$potent_lib"
+ potlib=$potent_lib
while test -h "$potlib" 2>/dev/null; do
- potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
case $potliblink in
- [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
- *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+ [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
+ *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
esac
done
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
$SED -e 10q |
$EGREP "$file_magic_regex" > /dev/null; then
func_append newdeplibs " $a_deplib"
- a_deplib=""
+ a_deplib=
break 2
fi
done
done
fi
- if test -n "$a_deplib" ; then
+ if test -n "$a_deplib"; then
droppeddeps=yes
echo
$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
@@ -7842,7 +9217,7 @@ EOF
echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have"
echo "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
+ if test -z "$potlib"; then
$ECHO "*** with $libname but no candidates were found. (...for file magic test)"
else
$ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -7865,30 +9240,30 @@ EOF
-l*)
func_stripname -l '' "$a_deplib"
name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
case " $predeps $postdeps " in
*" $a_deplib "*)
func_append newdeplibs " $a_deplib"
- a_deplib=""
+ a_deplib=
;;
esac
fi
- if test -n "$a_deplib" ; then
+ if test -n "$a_deplib"; then
libname=`eval "\\$ECHO \"$libname_spec\""`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
for potent_lib in $potential_libs; do
- potlib="$potent_lib" # see symlink-check above in file_magic test
+ potlib=$potent_lib # see symlink-check above in file_magic test
if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
$EGREP "$match_pattern_regex" > /dev/null; then
func_append newdeplibs " $a_deplib"
- a_deplib=""
+ a_deplib=
break 2
fi
done
done
fi
- if test -n "$a_deplib" ; then
+ if test -n "$a_deplib"; then
droppeddeps=yes
echo
$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
@@ -7896,7 +9271,7 @@ EOF
echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have"
echo "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
+ if test -z "$potlib"; then
$ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
else
$ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -7912,18 +9287,18 @@ EOF
done # Gone through all deplibs.
;;
none | unknown | *)
- newdeplibs=""
+ newdeplibs=
tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- for i in $predeps $postdeps ; do
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ for i in $predeps $postdeps; do
# can't use Xsed below, because $i might contain '/'
- tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
done
fi
case $tmp_deplibs in
*[!\ \ ]*)
echo
- if test "X$deplibs_check_method" = "Xnone"; then
+ if test none = "$deplibs_check_method"; then
echo "*** Warning: inter-library dependencies are not supported in this platform."
else
echo "*** Warning: inter-library dependencies are not known to be supported."
@@ -7947,8 +9322,8 @@ EOF
;;
esac
- if test "$droppeddeps" = yes; then
- if test "$module" = yes; then
+ if test yes = "$droppeddeps"; then
+ if test yes = "$module"; then
echo
echo "*** Warning: libtool could not satisfy all declared inter-library"
$ECHO "*** dependencies of module $libname. Therefore, libtool will create"
@@ -7957,12 +9332,12 @@ EOF
if test -z "$global_symbol_pipe"; then
echo
echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
echo "*** not find such a program. So, this module is probably useless."
- echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
fi
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
build_libtool_libs=module
build_old_libs=yes
else
@@ -7973,14 +9348,14 @@ EOF
echo "*** automatically added whenever a program is linked with this library"
echo "*** or is declared to -dlopen it."
- if test "$allow_undefined" = no; then
+ if test no = "$allow_undefined"; then
echo
echo "*** Since this library must not contain undefined symbols,"
echo "*** because either the platform does not support them or"
echo "*** it was explicitly requested with -no-undefined,"
echo "*** libtool will only create a static version of it."
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
build_libtool_libs=module
build_old_libs=yes
else
@@ -8026,7 +9401,7 @@ EOF
*) func_append new_libs " $deplib" ;;
esac
done
- deplibs="$new_libs"
+ deplibs=$new_libs
# All the library-specific variables (install_libdir is set above).
library_names=
@@ -8034,25 +9409,25 @@ EOF
dlname=
# Test again, we may have decided not to build it any more
- if test "$build_libtool_libs" = yes; then
- # Remove ${wl} instances when linking with ld.
+ if test yes = "$build_libtool_libs"; then
+ # Remove $wl instances when linking with ld.
# FIXME: should test the right _cmds variable.
case $archive_cmds in
*\$LD\ *) wl= ;;
esac
- if test "$hardcode_into_libs" = yes; then
+ if test yes = "$hardcode_into_libs"; then
# Hardcode the library paths
hardcode_libdirs=
dep_rpath=
- rpath="$finalize_rpath"
- test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+ rpath=$finalize_rpath
+ test relink = "$opt_mode" || rpath=$compile_rpath$rpath
for libdir in $rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
func_replace_sysroot "$libdir"
libdir=$func_replace_sysroot_result
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
+ hardcode_libdirs=$libdir
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -8077,7 +9452,7 @@ EOF
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
+ libdir=$hardcode_libdirs
eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
@@ -8091,8 +9466,8 @@ EOF
test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
fi
- shlibpath="$finalize_shlibpath"
- test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ shlibpath=$finalize_shlibpath
+ test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
if test -n "$shlibpath"; then
eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
fi
@@ -8102,19 +9477,19 @@ EOF
eval library_names=\"$library_names_spec\"
set dummy $library_names
shift
- realname="$1"
+ realname=$1
shift
if test -n "$soname_spec"; then
eval soname=\"$soname_spec\"
else
- soname="$realname"
+ soname=$realname
fi
if test -z "$dlname"; then
dlname=$soname
fi
- lib="$output_objdir/$realname"
+ lib=$output_objdir/$realname
linknames=
for link
do
@@ -8128,7 +9503,7 @@ EOF
delfiles=
if test -n "$export_symbols" && test -n "$include_expsyms"; then
$opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
- export_symbols="$output_objdir/$libname.uexp"
+ export_symbols=$output_objdir/$libname.uexp
func_append delfiles " $export_symbols"
fi
@@ -8137,31 +9512,31 @@ EOF
cygwin* | mingw* | cegcc*)
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
# exporting using user supplied symfile
- if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ func_dll_def_p "$export_symbols" || {
# and it's NOT already a .def file. Must figure out
# which of the given symbols are data symbols and tag
# them as such. So, trigger use of export_symbols_cmds.
# export_symbols gets reassigned inside the "prepare
# the list of exported symbols" if statement, so the
# include_expsyms logic still works.
- orig_export_symbols="$export_symbols"
+ orig_export_symbols=$export_symbols
export_symbols=
always_export_symbols=yes
- fi
+ }
fi
;;
esac
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
- if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- func_verbose "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
+ if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
$opt_dry_run || $RM $export_symbols
cmds=$export_symbols_cmds
- save_ifs="$IFS"; IFS='~'
+ save_ifs=$IFS; IFS='~'
for cmd1 in $cmds; do
- IFS="$save_ifs"
+ IFS=$save_ifs
# Take the normal branch if the nm_file_list_spec branch
# doesn't work or if tool conversion is not needed.
case $nm_file_list_spec~$to_tool_file_cmd in
@@ -8175,7 +9550,7 @@ EOF
try_normal_branch=no
;;
esac
- if test "$try_normal_branch" = yes \
+ if test yes = "$try_normal_branch" \
&& { test "$len" -lt "$max_cmd_len" \
|| test "$max_cmd_len" -le -1; }
then
@@ -8186,7 +9561,7 @@ EOF
output_la=$func_basename_result
save_libobjs=$libobjs
save_output=$output
- output=${output_objdir}/${output_la}.nm
+ output=$output_objdir/$output_la.nm
func_to_tool_file "$output"
libobjs=$nm_file_list_spec$func_to_tool_file_result
func_append delfiles " $output"
@@ -8209,8 +9584,8 @@ EOF
break
fi
done
- IFS="$save_ifs"
- if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ IFS=$save_ifs
+ if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
fi
@@ -8218,16 +9593,16 @@ EOF
fi
if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
$opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
fi
- if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
# The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
# FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
+ # 's' commands, which not all seds can handle. GNU sed should be fine
# though. Also, the filter scales superlinearly with the number of
# global variables. join(1) would be nice here, but unfortunately
# isn't a blessed tool.
@@ -8246,11 +9621,11 @@ EOF
;;
esac
done
- deplibs="$tmp_deplibs"
+ deplibs=$tmp_deplibs
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec" &&
- test "$compiler_needs_object" = yes &&
+ test yes = "$compiler_needs_object" &&
test -z "$libobjs"; then
# extract the archives, so we have objects to list.
# TODO: could optimize this to just extract one archive.
@@ -8261,7 +9636,7 @@ EOF
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
test "X$libobjs" = "X " && libobjs=
else
- gentop="$output_objdir/${outputname}x"
+ gentop=$output_objdir/${outputname}x
func_append generated " $gentop"
func_extract_archives $gentop $convenience
@@ -8270,18 +9645,18 @@ EOF
fi
fi
- if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
func_append linker_flags " $flag"
fi
# Make a backup of the uninstalled library when relinking
- if test "$opt_mode" = relink; then
+ if test relink = "$opt_mode"; then
$opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
fi
# Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
+ if test yes = "$module" && test -n "$module_cmds"; then
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
eval test_cmds=\"$module_expsym_cmds\"
cmds=$module_expsym_cmds
@@ -8299,7 +9674,7 @@ EOF
fi
fi
- if test "X$skipped_export" != "X:" &&
+ if test : != "$skipped_export" &&
func_len " $test_cmds" &&
len=$func_len_result &&
test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
@@ -8332,8 +9707,8 @@ EOF
last_robj=
k=1
- if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
- output=${output_objdir}/${output_la}.lnkscript
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+ output=$output_objdir/$output_la.lnkscript
func_verbose "creating GNU ld script: $output"
echo 'INPUT (' > $output
for obj in $save_libobjs
@@ -8345,14 +9720,14 @@ EOF
func_append delfiles " $output"
func_to_tool_file "$output"
output=$func_to_tool_file_result
- elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
- output=${output_objdir}/${output_la}.lnk
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ output=$output_objdir/$output_la.lnk
func_verbose "creating linker input file list: $output"
: > $output
set x $save_libobjs
shift
firstobj=
- if test "$compiler_needs_object" = yes; then
+ if test yes = "$compiler_needs_object"; then
firstobj="$1 "
shift
fi
@@ -8367,7 +9742,7 @@ EOF
else
if test -n "$save_libobjs"; then
func_verbose "creating reloadable object files..."
- output=$output_objdir/$output_la-${k}.$objext
+ output=$output_objdir/$output_la-$k.$objext
eval test_cmds=\"$reload_cmds\"
func_len " $test_cmds"
len0=$func_len_result
@@ -8379,13 +9754,13 @@ EOF
func_len " $obj"
func_arith $len + $func_len_result
len=$func_arith_result
- if test "X$objlist" = X ||
+ if test -z "$objlist" ||
test "$len" -lt "$max_cmd_len"; then
func_append objlist " $obj"
else
# The command $test_cmds is almost too long, add a
# command to the queue.
- if test "$k" -eq 1 ; then
+ if test 1 -eq "$k"; then
# The first file doesn't have a previous command to add.
reload_objs=$objlist
eval concat_cmds=\"$reload_cmds\"
@@ -8395,10 +9770,10 @@ EOF
reload_objs="$objlist $last_robj"
eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
fi
- last_robj=$output_objdir/$output_la-${k}.$objext
+ last_robj=$output_objdir/$output_la-$k.$objext
func_arith $k + 1
k=$func_arith_result
- output=$output_objdir/$output_la-${k}.$objext
+ output=$output_objdir/$output_la-$k.$objext
objlist=" $obj"
func_len " $last_robj"
func_arith $len0 + $func_len_result
@@ -8410,9 +9785,9 @@ EOF
# files will link in the last one created.
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
reload_objs="$objlist $last_robj"
- eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+ eval concat_cmds=\"\$concat_cmds$reload_cmds\"
if test -n "$last_robj"; then
- eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
fi
func_append delfiles " $output"
@@ -8420,9 +9795,9 @@ EOF
output=
fi
- if ${skipped_export-false}; then
- func_verbose "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
+ ${skipped_export-false} && {
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
$opt_dry_run || $RM $export_symbols
libobjs=$output
# Append the command to create the export file.
@@ -8431,16 +9806,16 @@ EOF
if test -n "$last_robj"; then
eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
fi
- fi
+ }
test -n "$save_libobjs" &&
func_verbose "creating a temporary reloadable object file: $output"
# Loop through the commands generated above and execute them.
- save_ifs="$IFS"; IFS='~'
+ save_ifs=$IFS; IFS='~'
for cmd in $concat_cmds; do
- IFS="$save_ifs"
- $opt_silent || {
+ IFS=$save_ifs
+ $opt_quiet || {
func_quote_for_expand "$cmd"
eval "func_echo $func_quote_for_expand_result"
}
@@ -8448,7 +9823,7 @@ EOF
lt_exit=$?
# Restore the uninstalled library and exit
- if test "$opt_mode" = relink; then
+ if test relink = "$opt_mode"; then
( cd "$output_objdir" && \
$RM "${realname}T" && \
$MV "${realname}U" "$realname" )
@@ -8457,7 +9832,7 @@ EOF
exit $lt_exit
}
done
- IFS="$save_ifs"
+ IFS=$save_ifs
if test -n "$export_symbols_regex" && ${skipped_export-false}; then
func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
@@ -8465,18 +9840,18 @@ EOF
fi
fi
- if ${skipped_export-false}; then
+ ${skipped_export-false} && {
if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
$opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
fi
if test -n "$orig_export_symbols"; then
# The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
# FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
+ # 's' commands, which not all seds can handle. GNU sed should be fine
# though. Also, the filter scales superlinearly with the number of
# global variables. join(1) would be nice here, but unfortunately
# isn't a blessed tool.
@@ -8485,7 +9860,7 @@ EOF
export_symbols=$output_objdir/$libname.def
$opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
fi
- fi
+ }
libobjs=$output
# Restore the value of output.
@@ -8499,7 +9874,7 @@ EOF
# value of $libobjs for piecewise linking.
# Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
+ if test yes = "$module" && test -n "$module_cmds"; then
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
cmds=$module_expsym_cmds
else
@@ -8521,7 +9896,7 @@ EOF
# Add any objects from preloaded convenience libraries
if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
+ gentop=$output_objdir/${outputname}x
func_append generated " $gentop"
func_extract_archives $gentop $dlprefiles
@@ -8529,11 +9904,12 @@ EOF
test "X$libobjs" = "X " && libobjs=
fi
- save_ifs="$IFS"; IFS='~'
+ save_ifs=$IFS; IFS='~'
for cmd in $cmds; do
- IFS="$save_ifs"
+ IFS=$sp$nl
eval cmd=\"$cmd\"
- $opt_silent || {
+ IFS=$save_ifs
+ $opt_quiet || {
func_quote_for_expand "$cmd"
eval "func_echo $func_quote_for_expand_result"
}
@@ -8541,7 +9917,7 @@ EOF
lt_exit=$?
# Restore the uninstalled library and exit
- if test "$opt_mode" = relink; then
+ if test relink = "$opt_mode"; then
( cd "$output_objdir" && \
$RM "${realname}T" && \
$MV "${realname}U" "$realname" )
@@ -8550,10 +9926,10 @@ EOF
exit $lt_exit
}
done
- IFS="$save_ifs"
+ IFS=$save_ifs
# Restore the uninstalled library and exit
- if test "$opt_mode" = relink; then
+ if test relink = "$opt_mode"; then
$opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
if test -n "$convenience"; then
@@ -8573,39 +9949,39 @@ EOF
done
# If -module or -export-dynamic was specified, set the dlname.
- if test "$module" = yes || test "$export_dynamic" = yes; then
+ if test yes = "$module" || test yes = "$export_dynamic"; then
# On all known operating systems, these are identical.
- dlname="$soname"
+ dlname=$soname
fi
fi
;;
obj)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for objects"
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for objects"
fi
case " $deplibs" in
*\ -l* | *\ -L*)
- func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ func_warning "'-l' and '-L' are ignored for objects" ;;
esac
test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for objects"
+ func_warning "'-rpath' is ignored for objects"
test -n "$xrpath" && \
- func_warning "\`-R' is ignored for objects"
+ func_warning "'-R' is ignored for objects"
test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for objects"
+ func_warning "'-version-info' is ignored for objects"
test -n "$release" && \
- func_warning "\`-release' is ignored for objects"
+ func_warning "'-release' is ignored for objects"
case $output in
*.lo)
test -n "$objs$old_deplibs" && \
- func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+ func_fatal_error "cannot build library object '$output' from non-libtool objects"
libobj=$output
func_lo2o "$libobj"
@@ -8613,7 +9989,7 @@ EOF
;;
*)
libobj=
- obj="$output"
+ obj=$output
;;
esac
@@ -8626,17 +10002,19 @@ EOF
# the extraction.
reload_conv_objs=
gentop=
- # reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec and hope we can get by with
- # turning comma into space..
- wl=
-
+ # if reload_cmds runs $LD directly, get rid of -Wl from
+ # whole_archive_flag_spec and hope we can get by with turning comma
+ # into space.
+ case $reload_cmds in
+ *\$LD[\ \$]*) wl= ;;
+ esac
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
- reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
else
- gentop="$output_objdir/${obj}x"
+ gentop=$output_objdir/${obj}x
func_append generated " $gentop"
func_extract_archives $gentop $convenience
@@ -8645,12 +10023,12 @@ EOF
fi
# If we're not building shared, we need to use non_pic_objs
- test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+ test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
# Create the old-style object.
- reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+ reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
- output="$obj"
+ output=$obj
func_execute_cmds "$reload_cmds" 'exit $?'
# Exit if we aren't doing a library object file.
@@ -8662,7 +10040,7 @@ EOF
exit $EXIT_SUCCESS
fi
- if test "$build_libtool_libs" != yes; then
+ test yes = "$build_libtool_libs" || {
if test -n "$gentop"; then
func_show_eval '${RM}r "$gentop"'
fi
@@ -8672,12 +10050,12 @@ EOF
# $show "echo timestamp > $libobj"
# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
exit $EXIT_SUCCESS
- fi
+ }
- if test -n "$pic_flag" || test "$pic_mode" != default; then
+ if test -n "$pic_flag" || test default != "$pic_mode"; then
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs $reload_conv_objs"
- output="$libobj"
+ output=$libobj
func_execute_cmds "$reload_cmds" 'exit $?'
fi
@@ -8694,16 +10072,14 @@ EOF
output=$func_stripname_result.exe;;
esac
test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for programs"
+ func_warning "'-version-info' is ignored for programs"
test -n "$release" && \
- func_warning "\`-release' is ignored for programs"
+ func_warning "'-release' is ignored for programs"
- test "$preload" = yes \
- && test "$dlopen_support" = unknown \
- && test "$dlopen_self" = unknown \
- && test "$dlopen_self_static" = unknown && \
- func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+ $preload \
+ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
case $host in
*-*-rhapsody* | *-*-darwin1.[012])
@@ -8717,11 +10093,11 @@ EOF
*-*-darwin*)
# Don't allow lazy linking, it breaks C++ global constructors
# But is supposedly fixed on 10.4 or later (yay!).
- if test "$tagname" = CXX ; then
+ if test CXX = "$tagname"; then
case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
10.[0123])
- func_append compile_command " ${wl}-bind_at_load"
- func_append finalize_command " ${wl}-bind_at_load"
+ func_append compile_command " $wl-bind_at_load"
+ func_append finalize_command " $wl-bind_at_load"
;;
esac
fi
@@ -8757,7 +10133,7 @@ EOF
*) func_append new_libs " $deplib" ;;
esac
done
- compile_deplibs="$new_libs"
+ compile_deplibs=$new_libs
func_append compile_command " $compile_deplibs"
@@ -8781,7 +10157,7 @@ EOF
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
+ hardcode_libdirs=$libdir
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -8804,7 +10180,7 @@ EOF
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
::) dllsearchpath=$libdir;;
@@ -8821,10 +10197,10 @@ EOF
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
+ libdir=$hardcode_libdirs
eval rpath=\" $hardcode_libdir_flag_spec\"
fi
- compile_rpath="$rpath"
+ compile_rpath=$rpath
rpath=
hardcode_libdirs=
@@ -8832,7 +10208,7 @@ EOF
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
+ hardcode_libdirs=$libdir
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -8857,45 +10233,43 @@ EOF
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
+ libdir=$hardcode_libdirs
eval rpath=\" $hardcode_libdir_flag_spec\"
fi
- finalize_rpath="$rpath"
+ finalize_rpath=$rpath
- if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ if test -n "$libobjs" && test yes = "$build_old_libs"; then
# Transform all the library objects into standard objects.
compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
fi
- func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+ func_generate_dlsyms "$outputname" "@PROGRAM@" false
# template prelinking step
if test -n "$prelink_cmds"; then
func_execute_cmds "$prelink_cmds" 'exit $?'
fi
- wrappers_required=yes
+ wrappers_required=:
case $host in
*cegcc* | *mingw32ce*)
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
- wrappers_required=no
+ wrappers_required=false
;;
*cygwin* | *mingw* )
- if test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
+ test yes = "$build_libtool_libs" || wrappers_required=false
;;
*)
- if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
- wrappers_required=no
+ if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+ wrappers_required=false
fi
;;
esac
- if test "$wrappers_required" = no; then
+ $wrappers_required || {
# Replace the output file specification.
compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
- link_command="$compile_command$compile_rpath"
+ link_command=$compile_command$compile_rpath
# We have no uninstalled library dependencies, so finalize right now.
exit_status=0
@@ -8908,12 +10282,12 @@ EOF
fi
# Delete the generated files.
- if test -f "$output_objdir/${outputname}S.${objext}"; then
- func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ if test -f "$output_objdir/${outputname}S.$objext"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
fi
exit $exit_status
- fi
+ }
if test -n "$compile_shlibpath$finalize_shlibpath"; then
compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
@@ -8943,9 +10317,9 @@ EOF
fi
fi
- if test "$no_install" = yes; then
+ if test yes = "$no_install"; then
# We don't need to create a wrapper script.
- link_command="$compile_var$compile_command$compile_rpath"
+ link_command=$compile_var$compile_command$compile_rpath
# Replace the output file specification.
link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
# Delete the old output file.
@@ -8962,27 +10336,28 @@ EOF
exit $EXIT_SUCCESS
fi
- if test "$hardcode_action" = relink; then
- # Fast installation is not supported
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
+ case $hardcode_action,$fast_install in
+ relink,*)
+ # Fast installation is not supported
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
- func_warning "this platform does not like uninstalled shared libraries"
- func_warning "\`$output' will be relinked during installation"
- else
- if test "$fast_install" != no; then
- link_command="$finalize_var$compile_command$finalize_rpath"
- if test "$fast_install" = yes; then
- relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
- else
- # fast_install is set to needless
- relink_command=
- fi
- else
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
- fi
- fi
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "'$output' will be relinked during installation"
+ ;;
+ *,yes)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ ;;
+ *,no)
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+ ;;
+ *,needless)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=
+ ;;
+ esac
# Replace the output file specification.
link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
@@ -9039,8 +10414,8 @@ EOF
func_dirname_and_basename "$output" "" "."
output_name=$func_basename_result
output_path=$func_dirname_result
- cwrappersource="$output_path/$objdir/lt-$output_name.c"
- cwrapper="$output_path/$output_name.exe"
+ cwrappersource=$output_path/$objdir/lt-$output_name.c
+ cwrapper=$output_path/$output_name.exe
$RM $cwrappersource $cwrapper
trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
@@ -9061,7 +10436,7 @@ EOF
trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
$opt_dry_run || {
# note: this script will not be executed, so do not chmod.
- if test "x$build" = "x$host" ; then
+ if test "x$build" = "x$host"; then
$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
else
func_emit_wrapper no > $func_ltwrapper_scriptname_result
@@ -9084,25 +10459,27 @@ EOF
# See if we need to build an old-fashioned archive.
for oldlib in $oldlibs; do
- if test "$build_libtool_libs" = convenience; then
- oldobjs="$libobjs_save $symfileobj"
- addlibs="$convenience"
- build_libtool_libs=no
- else
- if test "$build_libtool_libs" = module; then
- oldobjs="$libobjs_save"
+ case $build_libtool_libs in
+ convenience)
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs=$convenience
build_libtool_libs=no
- else
+ ;;
+ module)
+ oldobjs=$libobjs_save
+ addlibs=$old_convenience
+ build_libtool_libs=no
+ ;;
+ *)
oldobjs="$old_deplibs $non_pic_objects"
- if test "$preload" = yes && test -f "$symfileobj"; then
- func_append oldobjs " $symfileobj"
- fi
- fi
- addlibs="$old_convenience"
- fi
+ $preload && test -f "$symfileobj" \
+ && func_append oldobjs " $symfileobj"
+ addlibs=$old_convenience
+ ;;
+ esac
if test -n "$addlibs"; then
- gentop="$output_objdir/${outputname}x"
+ gentop=$output_objdir/${outputname}x
func_append generated " $gentop"
func_extract_archives $gentop $addlibs
@@ -9110,13 +10487,13 @@ EOF
fi
# Do each command in the archive commands.
- if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
cmds=$old_archive_from_new_cmds
else
# Add any objects from preloaded convenience libraries
if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
+ gentop=$output_objdir/${outputname}x
func_append generated " $gentop"
func_extract_archives $gentop $dlprefiles
@@ -9137,7 +10514,7 @@ EOF
:
else
echo "copying selected object files to avoid basename conflicts..."
- gentop="$output_objdir/${outputname}x"
+ gentop=$output_objdir/${outputname}x
func_append generated " $gentop"
func_mkdir_p "$gentop"
save_oldobjs=$oldobjs
@@ -9146,7 +10523,7 @@ EOF
for obj in $save_oldobjs
do
func_basename "$obj"
- objbase="$func_basename_result"
+ objbase=$func_basename_result
case " $oldobjs " in
" ") oldobjs=$obj ;;
*[\ /]"$objbase "*)
@@ -9215,18 +10592,18 @@ EOF
else
# the above command should be used before it gets too long
oldobjs=$objlist
- if test "$obj" = "$last_oldobj" ; then
+ if test "$obj" = "$last_oldobj"; then
RANLIB=$save_RANLIB
fi
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
objlist=
len=$len0
fi
done
RANLIB=$save_RANLIB
oldobjs=$objlist
- if test "X$oldobjs" = "X" ; then
+ if test -z "$oldobjs"; then
eval cmds=\"\$concat_cmds\"
else
eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
@@ -9243,7 +10620,7 @@ EOF
case $output in
*.la)
old_library=
- test "$build_old_libs" = yes && old_library="$libname.$libext"
+ test yes = "$build_old_libs" && old_library=$libname.$libext
func_verbose "creating $output"
# Preserve any variables that may affect compiler behavior
@@ -9258,31 +10635,31 @@ EOF
fi
done
# Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
- if test "$hardcode_automatic" = yes ; then
+ if test yes = "$hardcode_automatic"; then
relink_command=
fi
# Only create the output if not a dry run.
$opt_dry_run || {
for installed in no yes; do
- if test "$installed" = yes; then
+ if test yes = "$installed"; then
if test -z "$install_libdir"; then
break
fi
- output="$output_objdir/$outputname"i
+ output=$output_objdir/${outputname}i
# Replace all uninstalled libtool libraries with the installed ones
newdependency_libs=
for deplib in $dependency_libs; do
case $deplib in
*.la)
func_basename "$deplib"
- name="$func_basename_result"
+ name=$func_basename_result
func_resolve_sysroot "$deplib"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_fatal_error "'$deplib' is not a valid libtool archive"
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
;;
-L*)
@@ -9298,23 +10675,23 @@ EOF
*) func_append newdependency_libs " $deplib" ;;
esac
done
- dependency_libs="$newdependency_libs"
+ dependency_libs=$newdependency_libs
newdlfiles=
for lib in $dlfiles; do
case $lib in
*.la)
func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_fatal_error "'$lib' is not a valid libtool archive"
func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
;;
*) func_append newdlfiles " $lib" ;;
esac
done
- dlfiles="$newdlfiles"
+ dlfiles=$newdlfiles
newdlprefiles=
for lib in $dlprefiles; do
case $lib in
@@ -9324,34 +10701,34 @@ EOF
# didn't already link the preopened objects directly into
# the library:
func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_fatal_error "'$lib' is not a valid libtool archive"
func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
;;
esac
done
- dlprefiles="$newdlprefiles"
+ dlprefiles=$newdlprefiles
else
newdlfiles=
for lib in $dlfiles; do
case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
*) abs=`pwd`"/$lib" ;;
esac
func_append newdlfiles " $abs"
done
- dlfiles="$newdlfiles"
+ dlfiles=$newdlfiles
newdlprefiles=
for lib in $dlprefiles; do
case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
*) abs=`pwd`"/$lib" ;;
esac
func_append newdlprefiles " $abs"
done
- dlprefiles="$newdlprefiles"
+ dlprefiles=$newdlprefiles
fi
$RM $output
# place dlname in correct position for cygwin
@@ -9367,10 +10744,9 @@ EOF
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
# If a -bindir argument was supplied, place the dll there.
- if test "x$bindir" != x ;
- then
+ if test -n "$bindir"; then
func_relative_path "$install_libdir" "$bindir"
- tdlname=$func_relative_path_result$dlname
+ tdlname=$func_relative_path_result/$dlname
else
# Otherwise fall back on heuristic.
tdlname=../bin/$dlname
@@ -9379,7 +10755,7 @@ EOF
esac
$ECHO > $output "\
# $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
@@ -9393,7 +10769,7 @@ library_names='$library_names'
# The name of the static archive.
old_library='$old_library'
-# Linker flags that can not go in dependency_libs.
+# Linker flags that cannot go in dependency_libs.
inherited_linker_flags='$new_inherited_linker_flags'
# Libraries that this one depends upon.
@@ -9419,7 +10795,7 @@ dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in:
libdir='$install_libdir'"
- if test "$installed" = no && test "$need_relink" = yes; then
+ if test no,yes = "$installed,$need_relink"; then
$ECHO >> $output "\
relink_command=\"$relink_command\""
fi
@@ -9434,27 +10810,29 @@ relink_command=\"$relink_command\""
exit $EXIT_SUCCESS
}
-{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
- func_mode_link ${1+"$@"}
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+ func_mode_link ${1+"$@"}
+fi
# func_mode_uninstall arg...
func_mode_uninstall ()
{
- $opt_debug
- RM="$nonopt"
+ $debug_cmd
+
+ RM=$nonopt
files=
- rmforce=
+ rmforce=false
exit_status=0
# This variable tells wrapper scripts just to set variables rather
# than running their programs.
- libtool_install_magic="$magic"
+ libtool_install_magic=$magic
for arg
do
case $arg in
- -f) func_append RM " $arg"; rmforce=yes ;;
+ -f) func_append RM " $arg"; rmforce=: ;;
-*) func_append RM " $arg" ;;
*) func_append files " $arg" ;;
esac
@@ -9467,18 +10845,18 @@ func_mode_uninstall ()
for file in $files; do
func_dirname "$file" "" "."
- dir="$func_dirname_result"
- if test "X$dir" = X.; then
- odir="$objdir"
+ dir=$func_dirname_result
+ if test . = "$dir"; then
+ odir=$objdir
else
- odir="$dir/$objdir"
+ odir=$dir/$objdir
fi
func_basename "$file"
- name="$func_basename_result"
- test "$opt_mode" = uninstall && odir="$dir"
+ name=$func_basename_result
+ test uninstall = "$opt_mode" && odir=$dir
# Remember odir for removal later, being careful to avoid duplicates
- if test "$opt_mode" = clean; then
+ if test clean = "$opt_mode"; then
case " $rmdirs " in
*" $odir "*) ;;
*) func_append rmdirs " $odir" ;;
@@ -9493,11 +10871,11 @@ func_mode_uninstall ()
elif test -d "$file"; then
exit_status=1
continue
- elif test "$rmforce" = yes; then
+ elif $rmforce; then
continue
fi
- rmfiles="$file"
+ rmfiles=$file
case $name in
*.la)
@@ -9511,7 +10889,7 @@ func_mode_uninstall ()
done
test -n "$old_library" && func_append rmfiles " $odir/$old_library"
- case "$opt_mode" in
+ case $opt_mode in
clean)
case " $library_names " in
*" $dlname "*) ;;
@@ -9522,12 +10900,12 @@ func_mode_uninstall ()
uninstall)
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
- func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
fi
if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
- func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
fi
# FIXME: should reinstall the best remaining shared library.
;;
@@ -9543,21 +10921,19 @@ func_mode_uninstall ()
func_source $dir/$name
# Add PIC object to the list of files to remove.
- if test -n "$pic_object" &&
- test "$pic_object" != none; then
+ if test -n "$pic_object" && test none != "$pic_object"; then
func_append rmfiles " $dir/$pic_object"
fi
# Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" &&
- test "$non_pic_object" != none; then
+ if test -n "$non_pic_object" && test none != "$non_pic_object"; then
func_append rmfiles " $dir/$non_pic_object"
fi
fi
;;
*)
- if test "$opt_mode" = clean ; then
+ if test clean = "$opt_mode"; then
noexename=$name
case $file in
*.exe)
@@ -9584,12 +10960,12 @@ func_mode_uninstall ()
# note $name still contains .exe if it was in $file originally
# as does the version of $file that was added into $rmfiles
- func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
+ func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+ if test yes = "$fast_install" && test -n "$relink_command"; then
func_append rmfiles " $odir/lt-$name"
fi
- if test "X$noexename" != "X$name" ; then
- func_append rmfiles " $odir/lt-${noexename}.c"
+ if test "X$noexename" != "X$name"; then
+ func_append rmfiles " $odir/lt-$noexename.c"
fi
fi
fi
@@ -9598,7 +10974,7 @@ func_mode_uninstall ()
func_show_eval "$RM $rmfiles" 'exit_status=1'
done
- # Try to remove the ${objdir}s in the directories where we deleted files
+ # Try to remove the $objdir's in the directories where we deleted files
for dir in $rmdirs; do
if test -d "$dir"; then
func_show_eval "rmdir $dir >/dev/null 2>&1"
@@ -9608,16 +10984,17 @@ func_mode_uninstall ()
exit $exit_status
}
-{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
- func_mode_uninstall ${1+"$@"}
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+ func_mode_uninstall ${1+"$@"}
+fi
test -z "$opt_mode" && {
- help="$generic_help"
+ help=$generic_help
func_fatal_help "you must specify a MODE"
}
test -z "$exec_cmd" && \
- func_fatal_help "invalid operation mode \`$opt_mode'"
+ func_fatal_help "invalid operation mode '$opt_mode'"
if test -n "$exec_cmd"; then
eval exec "$exec_cmd"
@@ -9628,7 +11005,7 @@ exit $exit_status
# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries. Given conflicting
+# where we disable both kinds of libraries. Given conflicting
# choices, we go for a static library, that is the most portable,
# since we can't tell whether shared libraries were disabled because
# the user asked for that or because the platform doesn't support
@@ -9651,5 +11028,3 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
# mode:shell-script
# sh-indentation:2
# End:
-# vi:sw=2
-
diff --git a/builds/unix/pkg.m4 b/builds/unix/pkg.m4
new file mode 100644
index 0000000..f26f84c
--- /dev/null
+++ b/builds/unix/pkg.m4
@@ -0,0 +1,199 @@
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in
index e0a7a3a..4c06a05 100644
--- a/builds/unix/unix-def.in
+++ b/builds/unix/unix-def.in
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002, 2004, 2006, 2008 by
+# Copyright 1996-2000, 2002, 2004, 2006, 2008, 2013, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -12,13 +12,14 @@
# indicate that you have read the license and understand and accept it
# fully.
+SHELL := @SHELL@
TOP_DIR := $(shell cd $(TOP_DIR); pwd)
-DELETE := @RMF@
-DELDIR := @RMDIR@
-CAT := cat
-SEP := /
+DELETE := rm -f
+DELDIR := @RMDIR@
+CAT := cat
+SEP := /
# this is used for `make distclean' and `make install'
OBJ_BUILD ?= $(BUILD_DIR)
@@ -33,15 +34,16 @@ 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) \
+CLEAN += $(OBJ_BUILD)/freetype-config \
+ $(OBJ_BUILD)/freetype2.pc
+
+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 \
+ $(LIBTOOL) \
$(OBJ_BUILD)/Makefile
@@ -54,9 +56,17 @@ bindir := @bindir@
includedir := @includedir@
datarootdir := @datarootdir@
datadir := @datadir@
+mandir := @mandir@
version_info := @version_info@
+# Variables needed for `freetype-config' and `freetype.pc'.
+#
+REQUIRES_PRIVATE := @REQUIRES_PRIVATE@
+LIBS_PRIVATE := @LIBS_PRIVATE@
+LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@
+build_libtool_libs := @build_libtool_libs@
+ft_version := @ft_version@
# The directory where all library files are placed.
#
@@ -82,4 +92,57 @@ SYSTEM_ZLIB := @SYSTEM_ZLIB@
NO_OUTPUT := 2> /dev/null
+# To support calls like
+#
+# configure --includedir='${libdir}'/freetype2/include
+#
+# we generate `freetype-config' and `freetype.pc' at compile time so that
+# those variables are properly expanded.
+
+$(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
+ rm -f $@ $@.tmp
+ sed -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \
+ -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
+ -e 's|%exec_prefix%|$(exec_prefix)|' \
+ -e 's|%ft_version%|$(ft_version)|' \
+ -e 's|%includedir%|$(includedir)|' \
+ -e 's|%libdir%|$(libdir)|' \
+ -e 's|%prefix%|$(prefix)|' \
+ $< \
+ > $@.tmp
+ chmod +x $@.tmp
+ chmod a-w $@.tmp
+ mv $@.tmp $@
+
+# To support directory names with spaces (as might easily happen on Windows
+# platforms), the right solution would be to surround the pkg-variables in
+# `freetype2.pc' with double quotes. However, doing so ironically disables
+# the prefix override mechanism especially written for Windows. This is a
+# bug in pkg-config version 0.28 and earlier.
+#
+# For this reason, we escape spaces with backslashes.
+
+exec_prefix_x := $(subst $(space),\\$(space),$(exec_prefix))
+includedir_x := $(subst $(space),\\$(space),$(includedir))
+libdir_x := $(subst $(space),\\$(space),$(libdir))
+prefix_x := $(subst $(space),\\$(space),$(prefix))
+
+$(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
+ rm -f $@ $@.tmp
+ sed -e 's|%REQUIRES_PRIVATE%|$(REQUIRES_PRIVATE)|' \
+ -e 's|%LIBS_PRIVATE%|$(LIBS_PRIVATE)|' \
+ -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
+ -e 's|%exec_prefix%|$(exec_prefix_x)|' \
+ -e 's|%ft_version%|$(ft_version)|' \
+ -e 's|%includedir%|$(includedir_x)|' \
+ -e 's|%libdir%|$(libdir_x)|' \
+ -e 's|%prefix%|$(prefix_x)|' \
+ $< \
+ > $@.tmp
+ chmod a-w $@.tmp
+ mv $@.tmp $@
+
+all: $(OBJ_BUILD)/freetype-config \
+ $(OBJ_BUILD)/freetype2.pc
+
# EOF
diff --git a/builds/vms/ftconfig.h b/builds/vms/ftconfig.h
index 62fadac..b309651 100644
--- a/builds/vms/ftconfig.h
+++ b/builds/vms/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* VMS-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2004, 2006-2008, 2011 by */
+/* Copyright 1996-2004, 2006-2008, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,18 +27,15 @@
/* Note however that if some specific modifications are needed, we */
/* advise you to place a modified copy in your build directory. */
/* */
- /* The build directory is usually `freetype/builds/<system>', and */
- /* contains system-specific files that are always included first when */
- /* building the library. */
+ /* The build directory is usually `builds/<system>', and contains */
+ /* system-specific files that are always included first when building */
+ /* the library. */
/* */
/*************************************************************************/
-
#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
@@ -46,6 +43,7 @@
FT_BEGIN_HEADER
+
/*************************************************************************/
/* */
/* PLATFORM-SPECIFIC CONFIGURATION MACROS */
@@ -53,7 +51,7 @@ FT_BEGIN_HEADER
/* These macros can be toggled to suit a specific system. The current */
/* ones are defaults used to compile FreeType in an ANSI C environment */
/* (16bit compilers are also supported). Copy this file to your own */
- /* `freetype/builds/<system>' directory, and edit it to port the engine. */
+ /* `builds/<system>' directory, and edit it to port the engine. */
/* */
/*************************************************************************/
@@ -120,19 +118,95 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* IntN types */
+ /* <Section> */
+ /* basic_types */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int16 */
+ /* */
+ /* <Description> */
+ /* A typedef for a 16bit signed integer type. */
+ /* */
+ typedef signed short FT_Int16;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_UInt16 */
/* */
- /* Used to guarantee the size of some specific integers. */
+ /* <Description> */
+ /* A typedef for a 16bit unsigned integer type. */
/* */
- typedef signed short FT_Int16;
typedef unsigned short FT_UInt16;
-#if FT_SIZEOF_INT == 4
+ /* */
+
+
+ /* this #if 0 ... #endif clause is for documentation purposes */
+#if 0
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int32 */
+ /* */
+ /* <Description> */
+ /* A typedef for a 32bit signed integer type. The size depends on */
+ /* the configuration. */
+ /* */
+ typedef signed XXX FT_Int32;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_UInt32 */
+ /* */
+ /* A typedef for a 32bit unsigned integer type. The size depends on */
+ /* the configuration. */
+ /* */
+ typedef unsigned XXX FT_UInt32;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int64 */
+ /* */
+ /* A typedef for a 64bit signed integer type. The size depends on */
+ /* the configuration. Only defined if there is real 64bit support; */
+ /* otherwise, it gets emulated with a structure (if necessary). */
+ /* */
+ typedef signed XXX FT_Int64;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_UInt64 */
+ /* */
+ /* A typedef for a 64bit unsigned integer type. The size depends on */
+ /* the configuration. Only defined if there is real 64bit support; */
+ /* otherwise, it gets emulated with a structure (if necessary). */
+ /* */
+ typedef unsigned XXX FT_UInt64;
+
+ /* */
+
+#endif
+
+#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)
typedef signed int FT_Int32;
typedef unsigned int FT_UInt32;
-#elif FT_SIZEOF_LONG == 4
+#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)
typedef signed long FT_Int32;
typedef unsigned long FT_UInt32;
@@ -141,13 +215,14 @@ FT_BEGIN_HEADER
#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
+#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT)
typedef int FT_Fast;
typedef unsigned int FT_UFast;
-#elif FT_SIZEOF_LONG >= 4
+#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)
typedef long FT_Fast;
typedef unsigned long FT_UFast;
@@ -157,17 +232,28 @@ FT_BEGIN_HEADER
/* determine whether we have a 64-bit int type for platforms without */
/* Autoconf */
-#if FT_SIZEOF_LONG == 8
+#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT)
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
-#define FT_INT64 long
+#define FT_INT64 long
+#define FT_UINT64 unsigned long
-#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+ /*************************************************************************/
+ /* */
+ /* A 64-bit data type may create compilation problems if you compile */
+ /* in strict ANSI mode. To avoid them, we disable other 64-bit data */
+ /* types if __STDC__ is defined. You can however ignore this rule */
+ /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
+ /* */
+#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
/* this compiler provides the __int64 type */
#define FT_LONG64
-#define FT_INT64 __int64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
#elif defined( __BORLANDC__ ) /* Borland C++ */
@@ -176,7 +262,8 @@ FT_BEGIN_HEADER
/* this compiler provides the __int64 type */
#define FT_LONG64
-#define FT_INT64 __int64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
#elif defined( __WATCOMC__ ) /* Watcom C++ */
@@ -185,15 +272,24 @@ FT_BEGIN_HEADER
#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
#define FT_LONG64
-#define FT_INT64 long long int
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
#elif defined( __GNUC__ )
/* GCC provides the `long long' type */
#define FT_LONG64
-#define FT_INT64 long long int
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
+
+#endif /* _MSC_VER */
+
+#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
-#endif /* FT_SIZEOF_LONG == 8 */
+#ifdef FT_LONG64
+ typedef FT_INT64 FT_Int64;
+ typedef FT_UINT64 FT_UInt64;
+#endif
#define FT_BEGIN_STMNT do {
@@ -201,26 +297,6 @@ FT_BEGIN_HEADER
#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
@@ -238,6 +314,9 @@ FT_BEGIN_HEADER
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+#define FT_LOCAL_ARRAY( x ) extern const x
+#define FT_LOCAL_ARRAY_DEF( x ) const x
+
#ifndef FT_BASE
@@ -253,9 +332,9 @@ FT_BEGIN_HEADER
#ifndef FT_BASE_DEF
#ifdef __cplusplus
-#define FT_BASE_DEF( x ) extern "C" x
+#define FT_BASE_DEF( x ) x
#else
-#define FT_BASE_DEF( x ) extern x
+#define FT_BASE_DEF( x ) x
#endif
#endif /* !FT_BASE_DEF */
diff --git a/builds/vms/ftsystem.c b/builds/vms/ftsystem.c
index fb35967..5c2819e 100644
--- a/builds/vms/ftsystem.c
+++ b/builds/vms/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* VMS-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2001, 2002, 2005, 2010 by */
+/* Copyright 1996-2002, 2005, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -212,7 +212,7 @@
if ( !stream )
- return FT_Err_Invalid_Stream_Handle;
+ return FT_THROW( Invalid_Stream_Handle );
/* open the file */
file = open( filepathname, O_RDONLY );
@@ -220,7 +220,7 @@
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
}
if ( fstat( file, &stat_buf ) < 0 )
@@ -274,7 +274,7 @@
stream->size = 0;
stream->pos = 0;
- return FT_Err_Cannot_Open_Stream;
+ return FT_THROW( Cannot_Open_Stream );
}
diff --git a/builds/win32/vc2010/freetype.vcxproj b/builds/win32/vc2010/freetype.vcxproj
deleted file mode 100644
index e88c45f..0000000
--- a/builds/win32/vc2010/freetype.vcxproj
+++ /dev/null
@@ -1,832 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug Multithreaded|Win32">
- <Configuration>Debug Multithreaded</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug Singlethreaded|Win32">
- <Configuration>Debug Singlethreaded</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Multithreaded|Win32">
- <Configuration>Release Multithreaded</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Singlethreaded|Win32">
- <Configuration>Release Singlethreaded</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\objs\win32\vc2010\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\objs\release\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">.\..\..\..\objs\win32\vc2010\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">.\..\..\..\objs\release_mt\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">.\..\..\..\objs\win32\vc2010\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">.\..\..\..\objs\release_st\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\objs\win32\vc2010\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\objs\debug\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">.\..\..\..\objs\win32\vc2010\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">.\..\..\..\objs\debug_st\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">.\..\..\..\objs\win32\vc2010\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">.\..\..\..\objs\debug_mt\</IntDir>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">freetype249_D</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">freetype249MT_D</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">freetype249ST_D</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">freetype249</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">freetype249MT</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">freetype249ST</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <DisableLanguageExtensions>true</DisableLanguageExtensions>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>
- </DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4001</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Lib>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <DisableLanguageExtensions>true</DisableLanguageExtensions>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>
- </DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4001</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Lib>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <DisableLanguageExtensions>true</DisableLanguageExtensions>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>
- </DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4001</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Lib />
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <DisableLanguageExtensions>true</DisableLanguageExtensions>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4001</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Lib>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <DisableLanguageExtensions>true</DisableLanguageExtensions>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4001</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Lib>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessToFile>false</PreprocessToFile>
- <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <DisableLanguageExtensions>true</DisableLanguageExtensions>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4001</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Lib>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Lib>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\..\src\autofit\autofit.c" />
- <ClCompile Include="..\..\..\src\bdf\bdf.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\cff\cff.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftbase.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftbitmap.c" />
- <ClCompile Include="..\..\..\src\cache\ftcache.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\ftdebug.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">false</DisableLanguageExtensions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">false</DisableLanguageExtensions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">false</DisableLanguageExtensions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">false</DisableLanguageExtensions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftfstype.c" />
- <ClCompile Include="..\..\..\src\base\ftgasp.c" />
- <ClCompile Include="..\..\..\src\base\ftglyph.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\gzip\ftgzip.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftinit.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\lzw\ftlzw.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftstroke.c" />
- <ClCompile Include="..\..\..\src\base\ftsystem.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\smooth\smooth.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftbbox.c" />
- <ClCompile Include="..\..\..\src\base\ftmm.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\base\ftpfr.c" />
- <ClCompile Include="..\..\..\src\base\ftsynth.c" />
- <ClCompile Include="..\..\..\src\base\fttype1.c" />
- <ClCompile Include="..\..\..\src\base\ftwinfnt.c" />
- <ClCompile Include="..\..\..\src\base\ftxf86.c" />
- <ClCompile Include="..\..\..\src\base\ftlcdfil.c" />
- <ClCompile Include="..\..\..\src\base\ftgxval.c" />
- <ClCompile Include="..\..\..\src\base\ftotval.c" />
- <ClCompile Include="..\..\..\src\base\ftpatent.c" />
- <ClCompile Include="..\..\..\src\pcf\pcf.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\pfr\pfr.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\psaux\psaux.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\pshinter\pshinter.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\psnames\psmodule.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\raster\raster.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\sfnt\sfnt.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\truetype\truetype.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\type1\type1.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\cid\type1cid.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\type42\type42.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\src\winfonts\winfnt.c">
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\..\include\ft2build.h" />
- <ClInclude Include="..\..\..\include\freetype\config\ftconfig.h" />
- <ClInclude Include="..\..\..\include\freetype\config\ftheader.h" />
- <ClInclude Include="..\..\..\include\freetype\config\ftmodule.h" />
- <ClInclude Include="..\..\..\include\freetype\config\ftoption.h" />
- <ClInclude Include="..\..\..\include\freetype\config\ftstdlib.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/builds/win32/vc2010/index.html b/builds/win32/vc2010/index.html
deleted file mode 100644
index 1d492fb..0000000
--- a/builds/win32/vc2010/index.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<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.9 sources:</p>
-
-<ul>
- <pre>
- freetype249.lib - release build; single threaded
- freetype249_D.lib - debug build; single threaded
- freetype249MT.lib - release build; multi-threaded
- freetype249MT_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/builds/wince/ftdebug.c b/builds/wince/ftdebug.c
index 272415d..24f9658 100644
--- a/builds/wince/ftdebug.c
+++ b/builds/wince/ftdebug.c
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component for WinCE (body). */
/* */
-/* Copyright 1996-2001, 2002, 2005, 2008, 2009 by */
+/* Copyright 1996-2002, 2005, 2008, 2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -71,7 +71,8 @@
FT_BASE_DEF( void )
- FT_Message( const char* fmt, ... )
+ FT_Message( const char* fmt,
+ ... )
{
static char buf[8192];
va_list ap;
@@ -87,7 +88,8 @@
FT_BASE_DEF( void )
- FT_Panic( const char* fmt, ... )
+ FT_Panic( const char* fmt,
+ ... )
{
static char buf[8192];
va_list ap;
@@ -102,6 +104,20 @@
}
+ /* documentation is in ftdebug.h */
+
+ FT_BASE_DEF( int )
+ FT_Throw( FT_Error error,
+ int line,
+ const char* file )
+ {
+ FT_UNUSED( error );
+ FT_UNUSED( line );
+ FT_UNUSED( file );
+
+ return 0;
+ }
+
#ifdef FT_DEBUG_LEVEL_TRACE
@@ -132,8 +148,8 @@
/* 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. */
+ /* See the file <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. */
@@ -168,9 +184,12 @@
while ( *p && *p != ':' )
p++;
+ if ( !*p )
+ break;
+
if ( *p == ':' && p > q )
{
- int n, i, len = p - q;
+ int n, i, len = (int)( p - q );
int level = -1, found = -1;
@@ -196,7 +215,7 @@
p++;
if ( *p )
{
- level = *p++ - '0';
+ level = *p - '0';
if ( level < 0 || level > 7 )
level = -1;
}
diff --git a/builds/wince/vc2005-ce/freetype.vcproj b/builds/wince/vc2005-ce/freetype.vcproj
index fa0e986..5614235 100644
--- a/builds/wince/vc2005-ce/freetype.vcproj
+++ b/builds/wince/vc2005-ce/freetype.vcproj
@@ -21,7 +21,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -41,7 +41,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -61,7 +61,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -81,7 +81,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -101,7 +101,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -121,7 +121,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -141,7 +141,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -161,7 +161,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -181,7 +181,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -201,7 +201,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -221,7 +221,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -241,7 +241,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -261,7 +261,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -281,7 +281,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -301,7 +301,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -321,7 +321,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -341,7 +341,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -361,7 +361,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -381,7 +381,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -401,7 +401,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -421,7 +421,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -441,7 +441,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -461,7 +461,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -481,7 +481,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -501,7 +501,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -521,7 +521,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -541,7 +541,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -561,7 +561,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -581,7 +581,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -601,7 +601,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -621,7 +621,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -641,7 +641,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -661,7 +661,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -681,7 +681,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -701,7 +701,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -721,7 +721,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -741,7 +741,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -758,7 +758,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype249MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype255MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -3822,15 +3822,15 @@
<Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl">
<File RelativePath="..\..\..\include\ft2build.h">
</File>
- <File RelativePath="..\..\..\include\freetype\config\ftconfig.h">
+ <File RelativePath="..\..\..\include\config\ftconfig.h">
</File>
- <File RelativePath="..\..\..\include\freetype\config\ftheader.h">
+ <File RelativePath="..\..\..\include\config\ftheader.h">
</File>
- <File RelativePath="..\..\..\include\freetype\config\ftmodule.h">
+ <File RelativePath="..\..\..\include\config\ftmodule.h">
</File>
- <File RelativePath="..\..\..\include\freetype\config\ftoption.h">
+ <File RelativePath="..\..\..\include\config\ftoption.h">
</File>
- <File RelativePath="..\..\..\include\freetype\config\ftstdlib.h">
+ <File RelativePath="..\..\..\include\config\ftstdlib.h">
</File>
</Filter>
</Files>
diff --git a/builds/wince/vc2005-ce/index.html b/builds/wince/vc2005-ce/index.html
index cffa8cb..e2160f6 100644
--- a/builds/wince/vc2005-ce/index.html
+++ b/builds/wince/vc2005-ce/index.html
@@ -21,14 +21,14 @@ the following targets:
<li>PPC/SP WM6 (Windows Mobile 6)</li>
</ul>
-It compiles the following libraries from the FreeType 2.4.9 sources:</p>
+It compiles the following libraries from the FreeType 2.5.5 sources:</p>
<ul>
<pre>
- freetype249.lib - release build; single threaded
- freetype249_D.lib - debug build; single threaded
- freetype249MT.lib - release build; multi-threaded
- freetype249MT_D.lib - debug build; multi-threaded</pre>
+ freetype255.lib - release build; single threaded
+ freetype255_D.lib - debug build; single threaded
+ freetype255MT.lib - release build; multi-threaded
+ freetype255MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/builds/wince/vc2008-ce/freetype.vcproj b/builds/wince/vc2008-ce/freetype.vcproj
index 1f052c1..e36ccb0 100644
--- a/builds/wince/vc2008-ce/freetype.vcproj
+++ b/builds/wince/vc2008-ce/freetype.vcproj
@@ -88,7 +88,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -177,7 +177,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -266,7 +266,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -355,7 +355,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -444,7 +444,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -533,7 +533,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -621,7 +621,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -709,7 +709,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -797,7 +797,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -885,7 +885,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -973,7 +973,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1061,7 +1061,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1149,7 +1149,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1236,7 +1236,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1323,7 +1323,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1410,7 +1410,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1497,7 +1497,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1584,7 +1584,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1668,7 +1668,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1753,7 +1753,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1838,7 +1838,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1923,7 +1923,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2008,7 +2008,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2093,7 +2093,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2178,7 +2178,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2263,7 +2263,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2348,7 +2348,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2433,7 +2433,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2518,7 +2518,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2603,7 +2603,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2689,7 +2689,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2775,7 +2775,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2861,7 +2861,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2947,7 +2947,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3033,7 +3033,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3119,7 +3119,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3205,7 +3205,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3279,7 +3279,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\wince\vc2008-ce\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\wince\vc2008-ce\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -13469,23 +13469,23 @@
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftconfig.h"
+ RelativePath="..\..\..\include\config\ftconfig.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftheader.h"
+ RelativePath="..\..\..\include\config\ftheader.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftmodule.h"
+ RelativePath="..\..\..\include\config\ftmodule.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftoption.h"
+ RelativePath="..\..\..\include\config\ftoption.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftstdlib.h"
+ RelativePath="..\..\..\include\config\ftstdlib.h"
>
</File>
</Filter>
diff --git a/builds/wince/vc2008-ce/index.html b/builds/wince/vc2008-ce/index.html
index 0c636b6..469baef 100644
--- a/builds/wince/vc2008-ce/index.html
+++ b/builds/wince/vc2008-ce/index.html
@@ -21,14 +21,14 @@ the following targets:
<li>PPC/SP WM6 (Windows Mobile 6)</li>
</ul>
-It compiles the following libraries from the FreeType 2.4.9 sources:</p>
+It compiles the following libraries from the FreeType 2.5.5 sources:</p>
<ul>
<pre>
- freetype249.lib - release build; single threaded
- freetype249_D.lib - debug build; single threaded
- freetype249MT.lib - release build; multi-threaded
- freetype249MT_D.lib - debug build; multi-threaded</pre>
+ freetype255.lib - release build; single threaded
+ freetype255_D.lib - debug build; single threaded
+ freetype255MT.lib - release build; multi-threaded
+ freetype255MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/builds/win32/detect.mk b/builds/windows/detect.mk
index 1906539..9dca261 100644
--- a/builds/win32/detect.mk
+++ b/builds/windows/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2004, 2006, 2007 by
+# Copyright 1996-2000, 2003, 2004, 2006, 2007, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -23,7 +23,7 @@ ifeq ($(PLATFORM),ansi)
#
ifeq ($(OS),Windows_NT)
- PLATFORM := win32
+ PLATFORM := windows
else
@@ -44,7 +44,8 @@ ifeq ($(PLATFORM),ansi)
#
# 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.
+ # underlying DOS 7.x, while the second is set only if windows 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
@@ -53,7 +54,7 @@ ifeq ($(PLATFORM),ansi)
ifdef winbootdir
ifdef windir
- PLATFORM := win32
+ PLATFORM := windows
endif
endif
@@ -62,7 +63,7 @@ ifeq ($(PLATFORM),ansi)
endif # test PLATFORM ansi
-ifeq ($(PLATFORM),win32)
+ifeq ($(PLATFORM),windows)
DELETE := del
CAT := type
@@ -177,7 +178,7 @@ ifeq ($(PLATFORM),win32)
.PHONY: devel-gcc
endif
-endif # test PLATFORM win32
+endif # test PLATFORM windows
# EOF
diff --git a/builds/win32/ftdebug.c b/builds/windows/ftdebug.c
index d1ca15a..dd2c2ad 100644
--- a/builds/win32/ftdebug.c
+++ b/builds/windows/ftdebug.c
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component for Win32 (body). */
/* */
-/* Copyright 1996-2001, 2002, 2005, 2008, 2009 by */
+/* Copyright 1996-2002, 2005, 2008, 2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -47,7 +47,6 @@
#ifdef FT_DEBUG_LEVEL_ERROR
-
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
@@ -55,8 +54,11 @@
#include <windows.h>
+ /* documentation is in ftdebug.h */
+
FT_BASE_DEF( void )
- FT_Message( const char* fmt, ... )
+ FT_Message( const char* fmt,
+ ... )
{
static char buf[8192];
va_list ap;
@@ -71,8 +73,11 @@
}
+ /* documentation is in ftdebug.h */
+
FT_BASE_DEF( void )
- FT_Panic( const char* fmt, ... )
+ FT_Panic( const char* fmt,
+ ... )
{
static char buf[8192];
va_list ap;
@@ -87,6 +92,21 @@
}
+ /* documentation is in ftdebug.h */
+
+ FT_BASE_DEF( int )
+ FT_Throw( FT_Error error,
+ int line,
+ const char* file )
+ {
+ FT_UNUSED( error );
+ FT_UNUSED( line );
+ FT_UNUSED( file );
+
+ return 0;
+ }
+
+
#ifdef FT_DEBUG_LEVEL_TRACE
@@ -117,8 +137,8 @@
/* 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. */
+ /* See the file <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. */
@@ -146,9 +166,12 @@
while ( *p && *p != ':' )
p++;
+ if ( !*p )
+ break;
+
if ( *p == ':' && p > q )
{
- int n, i, len = p - q;
+ int n, i, len = (int)( p - q );
int level = -1, found = -1;
@@ -174,7 +197,7 @@
p++;
if ( *p )
{
- level = *p++ - '0';
+ level = *p - '0';
if ( level < 0 || level > 7 )
level = -1;
}
diff --git a/builds/win32/vc2005/freetype.sln b/builds/windows/vc2005/freetype.sln
index ec3345d..ec3345d 100644
--- a/builds/win32/vc2005/freetype.sln
+++ b/builds/windows/vc2005/freetype.sln
diff --git a/builds/win32/vc2005/freetype.vcproj b/builds/windows/vc2005/freetype.vcproj
index 6f17352..5880b7d 100644
--- a/builds/win32/vc2005/freetype.vcproj
+++ b/builds/windows/vc2005/freetype.vcproj
@@ -16,7 +16,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype249.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype255.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -33,7 +33,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype249MT.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype255MT.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -50,7 +50,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype249ST.lib" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype255ST.lib" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -67,7 +67,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype249_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype255_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -84,7 +84,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype249ST_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype255ST_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -101,7 +101,7 @@
<Tool Name="VCManagedResourceCompilerTool" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />
<Tool Name="VCPreLinkEventTool" />
- <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype249MT_D.lib" SuppressStartupBanner="true" />
+ <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype255MT_D.lib" SuppressStartupBanner="true" />
<Tool Name="VCALinkTool" />
<Tool Name="VCXDCMakeTool" />
<Tool Name="VCBscMakeTool" />
@@ -629,15 +629,15 @@
<Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl">
<File RelativePath="..\..\..\include\ft2build.h">
</File>
- <File RelativePath="..\..\..\include\freetype\config\ftconfig.h">
+ <File RelativePath="..\..\..\include\config\ftconfig.h">
</File>
- <File RelativePath="..\..\..\include\freetype\config\ftheader.h">
+ <File RelativePath="..\..\..\include\config\ftheader.h">
</File>
- <File RelativePath="..\..\..\include\freetype\config\ftmodule.h">
+ <File RelativePath="..\..\..\include\config\ftmodule.h">
</File>
- <File RelativePath="..\..\..\include\freetype\config\ftoption.h">
+ <File RelativePath="..\..\..\include\config\ftoption.h">
</File>
- <File RelativePath="..\..\..\include\freetype\config\ftstdlib.h">
+ <File RelativePath="..\..\..\include\config\ftstdlib.h">
</File>
</Filter>
</Files>
diff --git a/builds/win32/vc2005/index.html b/builds/windows/vc2005/index.html
index bc4291c..4929dcd 100644
--- a/builds/win32/vc2005/index.html
+++ b/builds/windows/vc2005/index.html
@@ -11,14 +11,14 @@
<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.9 sources:</p>
+compiles the following libraries from the FreeType 2.5.5 sources:</p>
<ul>
<pre>
- freetype249.lib - release build; single threaded
- freetype249_D.lib - debug build; single threaded
- freetype249MT.lib - release build; multi-threaded
- freetype249MT_D.lib - debug build; multi-threaded</pre>
+ freetype255.lib - release build; single threaded
+ freetype255_D.lib - debug build; single threaded
+ freetype255MT.lib - release build; multi-threaded
+ freetype255MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/builds/win32/vc2008/freetype.sln b/builds/windows/vc2008/freetype.sln
index 6c522f9..6c522f9 100644
--- a/builds/win32/vc2008/freetype.sln
+++ b/builds/windows/vc2008/freetype.sln
diff --git a/builds/win32/vc2008/freetype.vcproj b/builds/windows/vc2008/freetype.vcproj
index 897c5e5..95d722b 100644
--- a/builds/win32/vc2008/freetype.vcproj
+++ b/builds/windows/vc2008/freetype.vcproj
@@ -70,7 +70,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype249.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -145,7 +145,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype249MT.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -220,7 +220,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype249ST.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -292,7 +292,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype249_D.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -365,7 +365,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -439,7 +439,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\win32\vc2008\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\win32\vc2008\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2154,23 +2154,23 @@
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftconfig.h"
+ RelativePath="..\..\..\include\config\ftconfig.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftheader.h"
+ RelativePath="..\..\..\include\config\ftheader.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftmodule.h"
+ RelativePath="..\..\..\include\config\ftmodule.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftoption.h"
+ RelativePath="..\..\..\include\config\ftoption.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftstdlib.h"
+ RelativePath="..\..\..\include\config\ftstdlib.h"
>
</File>
</Filter>
diff --git a/builds/win32/vc2008/index.html b/builds/windows/vc2008/index.html
index 9ad33ea..7e0d154 100644
--- a/builds/win32/vc2008/index.html
+++ b/builds/windows/vc2008/index.html
@@ -11,14 +11,14 @@
<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.9 sources:</p>
+compiles the following libraries from the FreeType 2.5.5 sources:</p>
<ul>
<pre>
- freetype249.lib - release build; single threaded
- freetype249_D.lib - debug build; single threaded
- freetype249MT.lib - release build; multi-threaded
- freetype249MT_D.lib - debug build; multi-threaded</pre>
+ freetype255.lib - release build; single threaded
+ freetype255_D.lib - debug build; single threaded
+ freetype255MT.lib - release build; multi-threaded
+ freetype255MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/builds/win32/vc2010/freetype.sln b/builds/windows/vc2010/freetype.sln
index 3439f62..3bd176a 100644
--- a/builds/win32/vc2010/freetype.sln
+++ b/builds/windows/vc2010/freetype.sln
@@ -1,30 +1,48 @@

Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
+# Visual Studio Express 2012 for Windows Desktop
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "freetype.vcxproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
Debug Multithreaded|Win32 = Debug Multithreaded|Win32
+ Debug Multithreaded|x64 = Debug Multithreaded|x64
Debug Singlethreaded|Win32 = Debug Singlethreaded|Win32
- Debug|Win32 = Debug|Win32
+ Debug Singlethreaded|x64 = Debug Singlethreaded|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
Release Multithreaded|Win32 = Release Multithreaded|Win32
+ Release Multithreaded|x64 = Release Multithreaded|x64
Release Singlethreaded|Win32 = Release Singlethreaded|Win32
- Release|Win32 = Release|Win32
+ Release Singlethreaded|x64 = Release Singlethreaded|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|Win32.ActiveCfg = Debug Multithreaded|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|Win32.Build.0 = Debug Multithreaded|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|x64.ActiveCfg = Debug Multithreaded|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|x64.Build.0 = Debug Multithreaded|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|Win32.ActiveCfg = Debug Singlethreaded|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|Win32.Build.0 = Debug Singlethreaded|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|x64.ActiveCfg = Debug Singlethreaded|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|x64.Build.0 = Debug Singlethreaded|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|Win32.ActiveCfg = Release Multithreaded|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|Win32.Build.0 = Release Multithreaded|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|x64.ActiveCfg = Release Multithreaded|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|x64.Build.0 = Release Multithreaded|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|Win32.ActiveCfg = Release Singlethreaded|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|Win32.Build.0 = Release Singlethreaded|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|x64.ActiveCfg = Release Singlethreaded|x64
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|x64.Build.0 = Release Singlethreaded|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/builds/windows/vc2010/freetype.user.props b/builds/windows/vc2010/freetype.user.props
new file mode 100644
index 0000000..234dd5d
--- /dev/null
+++ b/builds/windows/vc2010/freetype.user.props
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * freetype.user.props
+ *
+ *
+ * You can specify custom options here without altering the project file.
+ *
+ * Multiple entries within each property are separated by semicolons (;).
+ *
+ * NOTE: If you want to link against zlib, libpng, bzip2 or harfbuzz, you
+ * should alter these values appropriately.
+ -->
+
+<Project ToolsVersion="4.0"
+ xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="Globals">
+
+ <!--
+ * `;'-separated list of symbols to #define
+ -->
+ <UserDefines></UserDefines>
+
+ <!--
+ * path where your custom `ftoption.h' lives;
+ * this is searched BEFORE any other path
+ -->
+ <!-- <UserOptionDirectory>..\..\..\devel</UserOptionDirectory> -->
+ <UserOptionDirectory></UserOptionDirectory>
+
+ <!--
+ * `;'-separated list of paths to additional include directories,
+ * e.g., where to find zlib.h, png.h, etc.;
+ * this is searched AFTER any other path
+ -->
+ <!-- <UserIncludeDirectories>..\..\..\..\zlib-1.2.8;..\..\..\..\libpng-1.6.12</UserIncludeDirectories> -->
+ <UserIncludeDirectories></UserIncludeDirectories>
+
+ <!--
+ * `;'-separated list of paths to additional library directories,
+ * e.g., where to find zlib.lib, libpng.lib, etc.
+ -->
+ <!-- <UserLibraryDirectories>..\..\..\..\zlib-1.2.8;..\..\..\..\libpng-1.6.12</UserLibraryDirectories> -->
+ <UserLibraryDirectories></UserLibraryDirectories>
+
+ <!--
+ * `;'-separated list of additional linker dependencies,
+ * e.g., zlib.lib, libpng.lib, etc.
+ -->
+ <!-- <UserDependencies>zlib.lib;libpng16.lib</UserDependencies> -->
+ <UserDependencies></UserDependencies>
+
+ </PropertyGroup>
+
+ <!--
+ * Example configuration for x64 debug build only
+ -->
+
+ <!--
+ <PropertyGroup Label="DebugProperties"
+ Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <UserDefines>ENABLE_DEBUG_HELPER;ENABLE_DEBUG_LOGGING</UserDefines>
+ <UserOptionDirectory>config\debug</UserOptionDirectory>
+ <UserIncludeDirectories>C:\mydebughelp\include</UserIncludeDirectories>
+ <UserLibraryDirectories>C:\mydebughelp\lib</UserLibraryDirectories>
+ <UserDependencies>dhelper64.lib</UserDependencies>
+ </PropertyGroup>
+ -->
+</Project>
diff --git a/builds/windows/vc2010/freetype.vcxproj b/builds/windows/vc2010/freetype.vcxproj
new file mode 100644
index 0000000..7cafe45
--- /dev/null
+++ b/builds/windows/vc2010/freetype.vcxproj
@@ -0,0 +1,1718 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Multithreaded|Win32">
+ <Configuration>Debug Multithreaded</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Multithreaded|x64">
+ <Configuration>Debug Multithreaded</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Singlethreaded|Win32">
+ <Configuration>Debug Singlethreaded</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Singlethreaded|x64">
+ <Configuration>Debug Singlethreaded</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Multithreaded|Win32">
+ <Configuration>Release Multithreaded</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Multithreaded|x64">
+ <Configuration>Release Multithreaded</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Singlethreaded|Win32">
+ <Configuration>Release Singlethreaded</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Singlethreaded|x64">
+ <Configuration>Release Singlethreaded</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">.\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">freetype255d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">freetype255d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">freetype255MTd</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">freetype255MTd</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">freetype255STd</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">freetype255STd</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">freetype255</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">freetype255</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">freetype255MT</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">freetype255MT</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">freetype255ST</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">freetype255ST</TargetName>
+ </PropertyGroup>
+ <Import Project="$(SolutionDir)\freetype.user.props" Condition="exists('$(SolutionDir)\freetype.user.props')" Label="UserProperties" />
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FloatingPointExceptions>false</FloatingPointExceptions>
+ <CreateHotpatchableImage>false</CreateHotpatchableImage>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>
+ </ProgramDataBaseFileName>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FloatingPointExceptions>false</FloatingPointExceptions>
+ <CreateHotpatchableImage>false</CreateHotpatchableImage>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>
+ </ProgramDataBaseFileName>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
+ <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FloatingPointExceptions>false</FloatingPointExceptions>
+ <CreateHotpatchableImage>false</CreateHotpatchableImage>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>
+ </ProgramDataBaseFileName>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FloatingPointExceptions>false</FloatingPointExceptions>
+ <CreateHotpatchableImage>false</CreateHotpatchableImage>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>
+ </ProgramDataBaseFileName>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
+ <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FloatingPointExceptions>false</FloatingPointExceptions>
+ <CreateHotpatchableImage>false</CreateHotpatchableImage>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>
+ </ProgramDataBaseFileName>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib />
+ <Lib>
+ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <DisableLanguageExtensions>true</DisableLanguageExtensions>
+ <WarningLevel>Level4</WarningLevel>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4001</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FloatingPointExceptions>false</FloatingPointExceptions>
+ <CreateHotpatchableImage>false</CreateHotpatchableImage>
+ <CompileAsManaged>false</CompileAsManaged>
+ <ProgramDataBaseFileName>
+ </ProgramDataBaseFileName>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib />
+ <Lib>
+ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
+ <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\autofit\autofit.c" />
+ <ClCompile Include="..\..\..\src\bdf\bdf.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cff\cff.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\base\ftbase.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\base\ftbitmap.c" />
+ <ClCompile Include="..\..\..\src\cache\ftcache.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\ftdebug.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">false</DisableLanguageExtensions>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">false</DisableLanguageExtensions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">false</DisableLanguageExtensions>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">false</DisableLanguageExtensions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">false</DisableLanguageExtensions>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">false</DisableLanguageExtensions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">false</DisableLanguageExtensions>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">false</DisableLanguageExtensions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions>
+ <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DisableLanguageExtensions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\base\ftfstype.c" />
+ <ClCompile Include="..\..\..\src\base\ftgasp.c" />
+ <ClCompile Include="..\..\..\src\base\ftglyph.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\gzip\ftgzip.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\base\ftinit.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lzw\ftlzw.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\base\ftstroke.c" />
+ <ClCompile Include="..\..\..\src\base\ftsystem.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\smooth\smooth.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\base\ftbbox.c" />
+ <ClCompile Include="..\..\..\src\base\ftmm.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\base\ftpfr.c" />
+ <ClCompile Include="..\..\..\src\base\ftsynth.c" />
+ <ClCompile Include="..\..\..\src\base\fttype1.c" />
+ <ClCompile Include="..\..\..\src\base\ftwinfnt.c" />
+ <ClCompile Include="..\..\..\src\base\ftxf86.c" />
+ <ClCompile Include="..\..\..\src\base\ftlcdfil.c" />
+ <ClCompile Include="..\..\..\src\base\ftgxval.c" />
+ <ClCompile Include="..\..\..\src\base\ftotval.c" />
+ <ClCompile Include="..\..\..\src\base\ftpatent.c" />
+ <ClCompile Include="..\..\..\src\pcf\pcf.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\pfr\pfr.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\psaux\psaux.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\pshinter\pshinter.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\psnames\psmodule.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\raster\raster.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\sfnt\sfnt.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\truetype\truetype.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\type1\type1.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cid\type1cid.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\type42\type42.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\winfonts\winfnt.c">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
+ <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\ft2build.h" />
+ <ClInclude Include="..\..\..\include\config\ftconfig.h" />
+ <ClInclude Include="..\..\..\include\config\ftheader.h" />
+ <ClInclude Include="..\..\..\include\config\ftmodule.h" />
+ <ClInclude Include="..\..\..\include\config\ftoption.h" />
+ <ClInclude Include="..\..\..\include\config\ftstdlib.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/builds/win32/vc2010/freetype.vcxproj.filters b/builds/windows/vc2010/freetype.vcxproj.filters
index a3a9f19..99fc43f 100644
--- a/builds/win32/vc2010/freetype.vcxproj.filters
+++ b/builds/windows/vc2010/freetype.vcxproj.filters
@@ -136,19 +136,19 @@
<ClInclude Include="..\..\..\include\ft2build.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\include\freetype\config\ftconfig.h">
+ <ClInclude Include="..\..\..\include\config\ftconfig.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\include\freetype\config\ftheader.h">
+ <ClInclude Include="..\..\..\include\config\ftheader.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\include\freetype\config\ftmodule.h">
+ <ClInclude Include="..\..\..\include\config\ftmodule.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\include\freetype\config\ftoption.h">
+ <ClInclude Include="..\..\..\include\config\ftoption.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\include\freetype\config\ftstdlib.h">
+ <ClInclude Include="..\..\..\include\config\ftstdlib.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
diff --git a/builds/windows/vc2010/index.html b/builds/windows/vc2010/index.html
new file mode 100644
index 0000000..cb205aa
--- /dev/null
+++ b/builds/windows/vc2010/index.html
@@ -0,0 +1,52 @@
+<html>
+<header>
+<title>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2010 or newer
+</title>
+
+<body>
+<h1>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2010 or newer
+</h1>
+
+<p>This directory contains a project file for Visual C++ (VS.NET&nbsp;2010
+or newer), named <tt>freetype.vcxproj</tt>, and Visual Studio, called
+<tt>freetype.sln</tt>. It compiles the following libraries from the
+FreeType 2.5.5 sources:</p>
+
+<ul>
+ <pre>
+freetype255.lib - release build
+freetype255d.lib - debug build
+freetype255ST.lib - release build; single threaded
+freetype255STd.lib - debug build; single threaded
+freetype255MT.lib - release build; multi-threaded
+freetype255MTd.lib - debug build; multi-threaded</pre>
+</ul>
+
+<p>Both Win32 and x64 builds are supported.</p>
+
+<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 <em>TAR
+file smart CR/LF Conversion</em> 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\vc2010</tt>
+directory.</p>
+
+<p>Customization of the FreeType library is done by editing the
+<tt>ftoptions.h</tt> header file in the top-level <tt>devel</tt> path.
+Alternatively, you may copy the file to another directory and change the
+include directory in <tt>freetype.users.props</tt>.</p>
+
+<p>To configure library dependencies like <em>zlib</em> and <em>libpng</em>,
+edit the <tt>freetype.users.props</tt> file in this directory. It also
+simplifies automated (command-line) builds using <a
+href="http://msdn.microsoft.com/library/dd393574%28v=vs.100%29.aspx">msbuild</a>.</p>
+
+</body>
+</html>
diff --git a/builds/win32/visualc/freetype.dsp b/builds/windows/visualc/freetype.dsp
index 274a763..cf76f7c 100644
--- a/builds/win32/visualc/freetype.dsp
+++ b/builds/windows/visualc/freetype.dsp
@@ -7,23 +7,23 @@
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
!MESSAGE NMAKE /f "freetype.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug Singlethreaded"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!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
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
@@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
@@ -92,7 +92,7 @@ LIB32=link.exe -lib
# 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
+# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\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
@@ -102,8 +102,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"lib\freetype249_D.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249MT_D.lib"
+# ADD BASE LIB32 /nologo /out:"lib\freetype255_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255MT_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
@@ -117,7 +117,7 @@ LIB32=link.exe -lib
# 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 BASE CPP /nologo /Za /W3 /GX /O2 /I "..\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"
@@ -126,8 +126,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"lib\freetype249.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249MT.lib"
+# ADD BASE LIB32 /nologo /out:"lib\freetype255.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255MT.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
@@ -151,8 +151,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype249.lib"
-# ADD LIB32 /out:"..\..\..\objs\freetype249ST.lib"
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype255.lib"
+# ADD LIB32 /out:"..\..\..\objs\freetype255ST.lib"
# SUBTRACT LIB32 /nologo
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
@@ -177,10 +177,10 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype249_D.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249ST_D.lib"
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255ST_D.lib"
-!ENDIF
+!ENDIF
# Begin Target
@@ -377,23 +377,23 @@ SOURCE=..\..\..\include\ft2build.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\include\freetype\config\ftconfig.h
+SOURCE=..\..\..\include\config\ftconfig.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\include\freetype\config\ftheader.h
+SOURCE=..\..\..\include\config\ftheader.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\include\freetype\config\ftmodule.h
+SOURCE=..\..\..\include\config\ftmodule.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\include\freetype\config\ftoption.h
+SOURCE=..\..\..\include\config\ftoption.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\include\freetype\config\ftstdlib.h
+SOURCE=..\..\..\include\config\ftstdlib.h
# End Source File
# End Group
# End Target
diff --git a/builds/win32/visualc/freetype.dsw b/builds/windows/visualc/freetype.dsw
index b149e76..b149e76 100644
--- a/builds/win32/visualc/freetype.dsw
+++ b/builds/windows/visualc/freetype.dsw
diff --git a/builds/win32/visualc/freetype.sln b/builds/windows/visualc/freetype.sln
index 1f64be2..1f64be2 100644
--- a/builds/win32/visualc/freetype.sln
+++ b/builds/windows/visualc/freetype.sln
diff --git a/builds/win32/visualc/freetype.vcproj b/builds/windows/visualc/freetype.vcproj
index f0638da..a71a0e9 100644
--- a/builds/win32/visualc/freetype.vcproj
+++ b/builds/windows/visualc/freetype.vcproj
@@ -69,7 +69,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249.lib"
+ OutputFile="..\..\..\objs\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -144,7 +144,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT.lib"
+ OutputFile="..\..\..\objs\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -219,7 +219,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST.lib"
+ OutputFile="..\..\..\objs\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -291,7 +291,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249_D.lib"
+ OutputFile="..\..\..\objs\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -364,7 +364,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -438,7 +438,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2153,23 +2153,23 @@
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftconfig.h"
+ RelativePath="..\..\..\include\config\ftconfig.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftheader.h"
+ RelativePath="..\..\..\include\config\ftheader.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftmodule.h"
+ RelativePath="..\..\..\include\config\ftmodule.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftoption.h"
+ RelativePath="..\..\..\include\config\ftoption.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftstdlib.h"
+ RelativePath="..\..\..\include\config\ftstdlib.h"
>
</File>
</Filter>
diff --git a/builds/win32/visualc/index.html b/builds/windows/visualc/index.html
index a32c95f..751d7ad 100644
--- a/builds/win32/visualc/index.html
+++ b/builds/windows/visualc/index.html
@@ -11,14 +11,14 @@
<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.9 sources:</p>
+compiles the following libraries from the FreeType 2.5.5 sources:</p>
<ul>
<pre>
- freetype249.lib - release build; single threaded
- freetype249_D.lib - debug build; single threaded
- freetype249MT.lib - release build; multi-threaded
- freetype249MT_D.lib - debug build; multi-threaded</pre>
+ freetype255.lib - release build; single threaded
+ freetype255_D.lib - debug build; single threaded
+ freetype255MT.lib - release build; multi-threaded
+ freetype255MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/builds/win32/visualce/freetype.dsp b/builds/windows/visualce/freetype.dsp
index 274a763..cf76f7c 100644
--- a/builds/win32/visualce/freetype.dsp
+++ b/builds/windows/visualce/freetype.dsp
@@ -7,23 +7,23 @@
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
!MESSAGE NMAKE /f "freetype.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug Singlethreaded"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!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
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
@@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
@@ -92,7 +92,7 @@ LIB32=link.exe -lib
# 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
+# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\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
@@ -102,8 +102,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"lib\freetype249_D.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249MT_D.lib"
+# ADD BASE LIB32 /nologo /out:"lib\freetype255_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255MT_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
@@ -117,7 +117,7 @@ LIB32=link.exe -lib
# 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 BASE CPP /nologo /Za /W3 /GX /O2 /I "..\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"
@@ -126,8 +126,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"lib\freetype249.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249MT.lib"
+# ADD BASE LIB32 /nologo /out:"lib\freetype255.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255MT.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
@@ -151,8 +151,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype249.lib"
-# ADD LIB32 /out:"..\..\..\objs\freetype249ST.lib"
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype255.lib"
+# ADD LIB32 /out:"..\..\..\objs\freetype255ST.lib"
# SUBTRACT LIB32 /nologo
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
@@ -177,10 +177,10 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype249_D.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249ST_D.lib"
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255ST_D.lib"
-!ENDIF
+!ENDIF
# Begin Target
@@ -377,23 +377,23 @@ SOURCE=..\..\..\include\ft2build.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\include\freetype\config\ftconfig.h
+SOURCE=..\..\..\include\config\ftconfig.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\include\freetype\config\ftheader.h
+SOURCE=..\..\..\include\config\ftheader.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\include\freetype\config\ftmodule.h
+SOURCE=..\..\..\include\config\ftmodule.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\include\freetype\config\ftoption.h
+SOURCE=..\..\..\include\config\ftoption.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\include\freetype\config\ftstdlib.h
+SOURCE=..\..\..\include\config\ftstdlib.h
# End Source File
# End Group
# End Target
diff --git a/builds/win32/visualce/freetype.dsw b/builds/windows/visualce/freetype.dsw
index b149e76..b149e76 100644
--- a/builds/win32/visualce/freetype.dsw
+++ b/builds/windows/visualce/freetype.dsw
diff --git a/builds/win32/visualce/freetype.vcproj b/builds/windows/visualce/freetype.vcproj
index 89a416a..e4cddfb 100644
--- a/builds/win32/visualce/freetype.vcproj
+++ b/builds/windows/visualce/freetype.vcproj
@@ -87,7 +87,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249.lib"
+ OutputFile="..\..\..\objs\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -162,7 +162,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT.lib"
+ OutputFile="..\..\..\objs\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -237,7 +237,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST.lib"
+ OutputFile="..\..\..\objs\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -309,7 +309,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249_D.lib"
+ OutputFile="..\..\..\objs\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -382,7 +382,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -456,7 +456,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -534,7 +534,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249.lib"
+ OutputFile="..\..\..\objs\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -619,7 +619,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT.lib"
+ OutputFile="..\..\..\objs\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -704,7 +704,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST.lib"
+ OutputFile="..\..\..\objs\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -785,7 +785,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249_D.lib"
+ OutputFile="..\..\..\objs\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -867,7 +867,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -950,7 +950,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1036,7 +1036,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249.lib"
+ OutputFile="..\..\..\objs\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1121,7 +1121,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT.lib"
+ OutputFile="..\..\..\objs\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1206,7 +1206,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST.lib"
+ OutputFile="..\..\..\objs\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1287,7 +1287,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249_D.lib"
+ OutputFile="..\..\..\objs\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1369,7 +1369,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1452,7 +1452,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1538,7 +1538,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249.lib"
+ OutputFile="..\..\..\objs\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1623,7 +1623,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT.lib"
+ OutputFile="..\..\..\objs\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1708,7 +1708,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST.lib"
+ OutputFile="..\..\..\objs\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -1789,7 +1789,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249_D.lib"
+ OutputFile="..\..\..\objs\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1871,7 +1871,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -1954,7 +1954,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2040,7 +2040,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249.lib"
+ OutputFile="..\..\..\objs\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2125,7 +2125,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT.lib"
+ OutputFile="..\..\..\objs\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2210,7 +2210,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST.lib"
+ OutputFile="..\..\..\objs\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -2291,7 +2291,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249_D.lib"
+ OutputFile="..\..\..\objs\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2373,7 +2373,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2456,7 +2456,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2542,7 +2542,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249.lib"
+ OutputFile="..\..\..\objs\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2627,7 +2627,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT.lib"
+ OutputFile="..\..\..\objs\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2712,7 +2712,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST.lib"
+ OutputFile="..\..\..\objs\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -2793,7 +2793,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249_D.lib"
+ OutputFile="..\..\..\objs\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2875,7 +2875,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -2958,7 +2958,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3044,7 +3044,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249.lib"
+ OutputFile="..\..\..\objs\freetype255.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3129,7 +3129,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT.lib"
+ OutputFile="..\..\..\objs\freetype255MT.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3214,7 +3214,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST.lib"
+ OutputFile="..\..\..\objs\freetype255ST.lib"
/>
<Tool
Name="VCALinkTool"
@@ -3295,7 +3295,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249_D.lib"
+ OutputFile="..\..\..\objs\freetype255_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3377,7 +3377,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249ST_D.lib"
+ OutputFile="..\..\..\objs\freetype255ST_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -3460,7 +3460,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\..\objs\freetype249MT_D.lib"
+ OutputFile="..\..\..\objs\freetype255MT_D.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -13859,23 +13859,23 @@
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftconfig.h"
+ RelativePath="..\..\..\include\config\ftconfig.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftheader.h"
+ RelativePath="..\..\..\include\config\ftheader.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftmodule.h"
+ RelativePath="..\..\..\include\config\ftmodule.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftoption.h"
+ RelativePath="..\..\..\include\config\ftoption.h"
>
</File>
<File
- RelativePath="..\..\..\include\freetype\config\ftstdlib.h"
+ RelativePath="..\..\..\include\config\ftstdlib.h"
>
</File>
</Filter>
diff --git a/builds/win32/visualce/index.html b/builds/windows/visualce/index.html
index eec6d61..68d15fd 100644
--- a/builds/win32/visualce/index.html
+++ b/builds/windows/visualce/index.html
@@ -21,14 +21,14 @@ the following targets:
<li>PPC/SP WM6 (Windows Mobile 6)</li>
</ul>
-It compiles the following libraries from the FreeType 2.4.9 sources:</p>
+It compiles the following libraries from the FreeType 2.5.5 sources:</p>
<ul>
<pre>
- freetype249.lib - release build; single threaded
- freetype249_D.lib - debug build; single threaded
- freetype249MT.lib - release build; multi-threaded
- freetype249MT_D.lib - debug build; multi-threaded</pre>
+ freetype255.lib - release build; single threaded
+ freetype255_D.lib - debug build; single threaded
+ freetype255MT.lib - release build; multi-threaded
+ freetype255MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
diff --git a/builds/win32/w32-bcc.mk b/builds/windows/w32-bcc.mk
index a9f48fc..87d8ea3 100644
--- a/builds/win32/w32-bcc.mk
+++ b/builds/windows/w32-bcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2005 by
+# Copyright 1996-2000, 2003, 2005, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -18,7 +18,7 @@ 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/windows/win32-def.mk
include $(TOP_DIR)/builds/compiler/bcc.mk
# include linking instructions
diff --git a/builds/win32/w32-bccd.mk b/builds/windows/w32-bccd.mk
index 51b15d9..dd21edd 100644
--- a/builds/win32/w32-bccd.mk
+++ b/builds/windows/w32-bccd.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2006 by
+# Copyright 1996-2000, 2003, 2006, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,7 @@
DEVEL_DIR := $(TOP_DIR)/devel
-include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/windows/win32-def.mk
include $(TOP_DIR)/builds/compiler/bcc-dev.mk
diff --git a/builds/win32/w32-dev.mk b/builds/windows/w32-dev.mk
index 00cacb0..3561229 100644
--- a/builds/win32/w32-dev.mk
+++ b/builds/windows/w32-dev.mk
@@ -5,7 +5,7 @@
#
-# Copyright 1996-2000, 2003, 2006 by
+# Copyright 1996-2000, 2003, 2006, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -21,7 +21,7 @@
DEVEL_DIR := $(TOP_DIR)/devel
-include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/windows/win32-def.mk
include $(TOP_DIR)/builds/compiler/gcc-dev.mk
diff --git a/builds/win32/w32-gcc.mk b/builds/windows/w32-gcc.mk
index 580afc5..3bbdd3c 100644
--- a/builds/win32/w32-gcc.mk
+++ b/builds/windows/w32-gcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2005 by
+# Copyright 1996-2000, 2003, 2005, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -19,7 +19,7 @@ EXPORTS_OPTIONS = $(EXPORTS_LIST)
APINAMES_OPTIONS := -dfreetype.dll -w
# include Win32-specific definitions
-include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/windows/win32-def.mk
# include gcc-specific definitions
include $(TOP_DIR)/builds/compiler/gcc.mk
diff --git a/builds/win32/w32-icc.mk b/builds/windows/w32-icc.mk
index 8819a1f..44d26bd 100644
--- a/builds/win32/w32-icc.mk
+++ b/builds/windows/w32-icc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2005 by
+# Copyright 1996-2000, 2005, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -18,7 +18,7 @@ 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/windows/win32-def.mk
include $(TOP_DIR)/builds/compiler/visualage.mk
# include linking instructions
diff --git a/builds/win32/w32-intl.mk b/builds/windows/w32-intl.mk
index ae62e1b..0f3e22b 100644
--- a/builds/win32/w32-intl.mk
+++ b/builds/windows/w32-intl.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2005 by
+# Copyright 1996-2000, 2003, 2005, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -18,7 +18,7 @@ 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/windows/win32-def.mk
include $(TOP_DIR)/builds/compiler/intelc.mk
# include linking instructions
diff --git a/builds/win32/w32-lcc.mk b/builds/windows/w32-lcc.mk
index a147c4c..8bd5b56 100644
--- a/builds/win32/w32-lcc.mk
+++ b/builds/windows/w32-lcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -14,7 +14,7 @@
SEP := /
-include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/windows/win32-def.mk
include $(TOP_DIR)/builds/compiler/win-lcc.mk
# include linking instructions
diff --git a/builds/win32/w32-mingw32.mk b/builds/windows/w32-mingw32.mk
index 04e9e21..b35dbb0 100644
--- a/builds/win32/w32-mingw32.mk
+++ b/builds/windows/w32-mingw32.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2005 by
+# Copyright 1996-2000, 2003, 2005, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -19,7 +19,7 @@ EXPORTS_OPTIONS = $(EXPORTS_LIST)
APINAMES_OPTIONS := -dfreetype.dll -w
# include Win32-specific definitions
-include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/windows/win32-def.mk
LIBRARY := lib$(PROJECT)
diff --git a/builds/win32/w32-vcc.mk b/builds/windows/w32-vcc.mk
index 7fb8794..95f7685 100644
--- a/builds/win32/w32-vcc.mk
+++ b/builds/windows/w32-vcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2005 by
+# Copyright 1996-2000, 2003, 2005, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -18,7 +18,7 @@ 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/windows/win32-def.mk
include $(TOP_DIR)/builds/compiler/visualc.mk
# include linking instructions
diff --git a/builds/win32/w32-wat.mk b/builds/windows/w32-wat.mk
index 820b817..e1ddf66 100644
--- a/builds/win32/w32-wat.mk
+++ b/builds/windows/w32-wat.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2005 by
+# Copyright 1996-2000, 2003, 2005, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -18,7 +18,7 @@ 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/windows/win32-def.mk
include $(TOP_DIR)/builds/compiler/watcom.mk
# include linking instructions
diff --git a/builds/win32/win32-def.mk b/builds/windows/win32-def.mk
index e6ae31c..61af5df 100644
--- a/builds/win32/win32-def.mk
+++ b/builds/windows/win32-def.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2003, 2005, 2006 by
+# Copyright 1996-2000, 2003, 2005, 2006, 2013, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -16,8 +16,8 @@
DELETE := del
CAT := type
SEP := $(strip \ )
-BUILD_DIR := $(TOP_DIR)/builds/win32
-PLATFORM := win32
+BUILD_DIR := $(TOP_DIR)/builds/windows
+PLATFORM := windows
# The executable file extension (for tools). NOTE: WE INCLUDE THE DOT HERE !!
#
diff --git a/configure b/configure
index 55a24fd..4d8a945 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by
+# Copyright 2002-2006, 2008-2010, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,19 +15,29 @@
rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk
+# respect GNUMAKE environment variable for backwards compatibility
if test "x$GNUMAKE" = x; then
- GNUMAKE=make
+ if test "x$MAKE" = x; then
+ if test "x`make -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then
+ MAKE=gmake
+ else
+ MAKE=make
+ fi
+ fi
+else
+ MAKE=$GNUMAKE
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
+if test "x`$MAKE -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then
+ echo "GNU make (>= 3.80) or makepp (>= 1.19) is required to build FreeType2." >&2
+ echo "Please try" >&2
+ echo >&2
+ echo " MAKE=<GNU make command name> $0" >&2
+ echo >&2
+ echo "or" >&2
+ echo >&2
+ echo " MAKE=\"makepp --norc-substitution\" $0" >&2
+ exit 1
fi
# Get `dirname' functionality. This is taken and adapted from autoconf's
@@ -120,6 +130,6 @@ case $# in
esac
done ;;
esac
-CFG=$CFG $GNUMAKE setup unix
+CFG=$CFG $MAKE setup unix
# eof
diff --git a/devel/ft2build.h b/devel/ft2build.h
index c1d38c3..6cc34b7 100644
--- a/devel/ft2build.h
+++ b/devel/ft2build.h
@@ -2,10 +2,9 @@
/* */
/* ft2build.h */
/* */
-/* FreeType 2 build and setup macros. */
-/* (Generic version) */
+/* FreeType 2 build and setup macros (development version). */
/* */
-/* Copyright 1996-2001, 2003, 2006 by */
+/* Copyright 1996-2001, 2003, 2006, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,24 +17,24 @@
/*
- * 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.
+ * This is a development version of <ft2build.h> to build the library in
+ * debug mode. Its only difference to the default version is that it
+ * includes a local `ftoption.h' header file with different settings for
+ * many configuration macros.
+ *
+ * To use it, simply ensure that the directory containing this file is
+ * scanned by the compiler before the default FreeType header directory.
*
- * 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 __FT2BUILD_H__
+#define __FT2BUILD_H__
-#define FT_CONFIG_OPTIONS_H <ftoption.h>
+#define FT_CONFIG_OPTIONS_H <ftoption.h>
-#include <freetype/config/ftheader.h>
+#include <config/ftheader.h>
-#endif /* __FT2_BUILD_DEVEL_H__ */
+#endif /* __FT2BUILD_H__ */
/* END */
diff --git a/devel/ftoption.h b/devel/ftoption.h
index 4da0221..10027bb 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2011 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -38,9 +38,9 @@ FT_BEGIN_HEADER
/* library from a single source directory. */
/* */
/* - You can put a copy of this file in your build directory, more */
- /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */
- /* is the name of a directory that is included _before_ the FreeType */
- /* include path during compilation. */
+ /* precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the */
+ /* name of a directory that is included _before_ the FreeType include */
+ /* path during compilation. */
/* */
/* The default FreeType Makefiles and Jamfiles use the build */
/* directory `builds/<system>' by default, but you can easily change */
@@ -51,7 +51,7 @@ FT_BEGIN_HEADER
/* locate this file during the build. For example, */
/* */
/* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */
- /* #include <freetype/config/ftheader.h> */
+ /* #include <config/ftheader.h> */
/* */
/* will use `$BUILD/myftoptions.h' instead of this file for macro */
/* definitions. */
@@ -59,9 +59,9 @@ FT_BEGIN_HEADER
/* Note also that you can similarly pre-define the macro */
/* FT_CONFIG_MODULES_H used to locate the file listing of the modules */
/* that are statically linked to the library at compile time. By */
- /* default, this file is <freetype/config/ftmodule.h>. */
+ /* default, this file is <config/ftmodule.h>. */
/* */
- /* We highly recommend using the third method whenever possible. */
+ /* We highly recommend using the third method whenever possible. */
/* */
/*************************************************************************/
@@ -205,6 +205,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* PNG bitmap support. */
+ /* */
+ /* FreeType now handles loading color bitmap glyphs in the PNG format. */
+ /* This requires help from the external libpng library. Uncompressed */
+ /* color bitmaps do not need any external libraries and will be */
+ /* supported regardless of this configuration. */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+#define FT_CONFIG_OPTION_USE_PNG
+
+
+ /*************************************************************************/
+ /* */
+ /* HarfBuzz support. */
+ /* */
+ /* FreeType uses the HarfBuzz library to improve auto-hinting of */
+ /* OpenType fonts. If available, many glyphs not directly addressable */
+ /* by a font's character map will be hinted also. */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+#define FT_CONFIG_OPTION_USE_HARFBUZZ
+
+
+ /*************************************************************************/
+ /* */
/* Define to disable the use of file stream functions and types, FILE, */
/* fopen() etc. Enables the use of smaller system libraries on embedded */
/* systems that have multiple system libraries, some with or without */
@@ -514,7 +541,7 @@ FT_BEGIN_HEADER
/* does not contain any glyph name though. */
/* */
/* Accessing SFNT names is done through the functions declared in */
- /* `freetype/ftsnames.h'. */
+ /* `ftsnames.h'. */
/* */
#define TT_CONFIG_OPTION_SFNT_NAMES
@@ -560,6 +587,28 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */
+ /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */
+ /* replaces the native TrueType hinting mechanism when anything but */
+ /* FT_RENDER_MODE_MONO is requested. */
+ /* */
+ /* Enabling this causes the TrueType driver to ignore instructions under */
+ /* certain conditions. This is done in accordance with the guide here, */
+ /* with some minor differences: */
+ /* */
+ /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
+ /* */
+ /* By undefining this, you only compile the code necessary to hint */
+ /* TrueType glyphs with native TT hinting. */
+ /* */
+ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
+ /* defined. */
+ /* */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+
+ /*************************************************************************/
+ /* */
/* 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. The patents related to */
@@ -669,7 +718,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */
+ /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */
/* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */
/* required. */
/* */
@@ -716,6 +765,49 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/**** ****/
+ /**** C F F D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */
+ /* possible to set up the default values of the four control points that */
+ /* define the stem darkening behaviour of the (new) CFF engine. For */
+ /* more details please read the documentation of the */
+ /* `darkening-parameters' property of the cff driver module (file */
+ /* `ftcffdrv.h'), which allows the control at run-time. */
+ /* */
+ /* Do *not* undefine these macros! */
+ /* */
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0
+
+
+ /*************************************************************************/
+ /* */
+ /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */
+ /* engine gets compiled into FreeType. If defined, it is possible to */
+ /* switch between the two engines using the `hinting-engine' property of */
+ /* the cff driver module. */
+ /* */
+#define CFF_CONFIG_OPTION_OLD_ENGINE
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
/**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/
/**** ****/
/*************************************************************************/
@@ -752,37 +844,10 @@ FT_BEGIN_HEADER
/*
- * Define this variable if you want to keep the layout of internal
- * structures that was used prior to FreeType 2.2. This also compiles in
- * a few obsolete functions to avoid linking problems on typical Unix
- * distributions.
- *
- * For embedded systems or building a new distribution from scratch, it
- * 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
-
-
- /*
- * 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.
+ * This macro is obsolete. Support has been removed in FreeType
+ * version 2.5.
*/
-
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-#define FT_MAX_CHARMAP_CACHEABLE 15
-#endif
+/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
/*
@@ -796,6 +861,35 @@ FT_BEGIN_HEADER
#define TT_USE_BYTECODE_INTERPRETER
#endif
+
+ /*
+ * Check CFF darkening parameters. The checks are the same as in function
+ * `cff_property_set' in file `cffdrivr.c'.
+ */
+#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \
+ \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \
+ \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \
+ \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500
+#error "Invalid CFF darkening parameters!"
+#endif
+
FT_END_HEADER
diff --git a/docs/CHANGES b/docs/CHANGES
index ae57932..bbc3110 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -1,4 +1,534 @@
+CHANGES BETWEEN 2.5.4 and 2.5.5
+
+ I. IMPORTANT BUG FIXES
+
+ - Handling of uncompressed PCF files works again (bug introduced
+ in version 2.5.4).
+
+
+======================================================================
+
+CHANGES BETWEEN 2.5.3 and 2.5.4
+
+ I. IMPORTANT BUG FIXES
+
+ - A variant of vulnerability CVE-2014-2240 was identified
+ (cf. http://savannah.nongnu.org/bugs/?43661) and fixed in the
+ new CFF driver. All users should upgrade.
+
+ - The new auto-hinter code using HarfBuzz crashed for some invalid
+ fonts.
+
+ - Many fixes to better protect against malformed input.
+
+
+ II. IMPORTANT CHANGES
+
+ - Full auto-hinter support of the Devanagari script.
+
+ - Experimental auto-hinter support of the Telugu script.
+
+ - CFF stem darkening behaviour can now be controlled at build time
+ using the eight macros
+
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} .
+
+ - Some fields in the `FT_Bitmap' structure have been changed from
+ signed to unsigned type, which better reflects the actual usage.
+ It is also an additional means to protect against malformed
+ input.
+
+ This change doesn't break the ABI; however, it might cause
+ compiler warnings.
+
+
+ III. MISCELLANEOUS
+
+ - Improvements to the auto-hinter's algorithm to recognize stems
+ and local extrema.
+
+ - Function `FT_Get_SubGlyph_Info' always returned an error even in
+ case of success.
+
+ - Version 2.5.1 introduced major bugs in the cjk part of the
+ auto-hinter, which are now fixed.
+
+ - The `FT_Sfnt_Tag' enumeration values have been changed to
+ uppercase, e.g. `FT_SFNT_HEAD'. The lowercase variants are
+ deprecated. This is for orthogonality with all other
+ enumeration (and enumeration-like) values in FreeType.
+
+ - `cmake' now supports builds of FreeType as an OS X framework and
+ for iOS.
+
+ - Improved project files for vc2010, introducing a property file.
+
+ - The documentation generator for the API reference has been
+ updated to produce better HTML code (with proper CSS). At the
+ same time, the documentation got a better structure.
+
+ - The FT_LOAD_BITMAP_CROP flag is obsolete; it is not used by any
+ driver.
+
+ - The TrueType DELTAP[123] bytecode instructions now work in
+ subpixel hinting mode as described in the ClearType whitepaper
+ (i.e., for touched points in the non-subpixel direction).
+
+ - Many small improvements to the internal arithmetic routines.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.5.2 and 2.5.3
+
+ I. IMPORTANT BUG FIXES
+
+ - A vulnerability (CVE-2014-2240) was identified and fixed in the
+ new CFF driver (cf. http://savannah.nongnu.org/bugs/?41697).
+ All users should upgrade.
+
+ - More bug fixes related to correct positioning of composite
+ glyphs.
+
+ - Many fixes to better protect against malformed input.
+
+
+ II. IMPORTANT CHANGES
+
+ - FreeType can now use the HarfBuzz library to greatly improve the
+ auto-hinting of fonts that use OpenType features: Many glyphs
+ that are part of such features but don't have cmap entries are
+ now handled properly, for example small caps or superscripts.
+ Define the configuration macro FT_CONFIG_OPTION_USE_HARFBUZZ to
+ activate HarfBuzz support.
+
+ You need HarfBuzz version 0.9.19 or newer.
+
+ Note that HarfBuzz depends on FreeType; this currently causes a
+ chicken-and-egg problem that can be solved as follows in case
+ HarfBuzz is not yet installed on your system.
+
+ 1. Compile and install FreeType without the configuration
+ macro FT_CONFIG_OPTION_USE_HARFBUZZ.
+
+ 2. Compile and install HarfBuzz.
+
+ 3. Define macro FT_CONFIG_OPTION_USE_HARFBUZZ, then compile
+ and install FreeType again.
+
+ With FreeType's `configure' script the procedure boils down to
+ configure, build, and install Freetype, then configure, compile,
+ and install HarfBuzz, then configure, compile, and install
+ FreeType again (after executing `make distclean').
+
+ - All libraries FreeType depends on are now checked using the
+ `pkg-config' configuration files first, followed by alternative
+ methods.
+
+ - The new value `auto' for the various `--with-XXX' library
+ options (for example `--with-harfbuzz=auto') makes the
+ `configure' script automatically link to the libraries it finds.
+ This is now the default.
+
+ - In case FreeType's `configure' script can't find a library, you
+ can pass environment variables to circumvent pkg-config, and
+ those variables have been harmonized as a consequence of the
+ changes mentioned above:
+
+ LIBZ -> removed; use LIBZ_CFLAGS and LIBZ_LIBS
+ LIBBZ2 -> removed; use BZIP2_CFLAGS and BZIP2_LIBS
+ LIBPNG_LDFLAGS -> LIBPNG_LIBS
+
+ `./configure --help' shows all available environment variables.
+
+ - The `freetype-config' script now understands option `--static'
+ to emit static linking information.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.5.1 and 2.5.2
+
+ I. IMPORTANT BUG FIXES
+
+ - Improving the display of some broken TrueType fonts introduced a
+ bug that made FreeType crash on some popular (but not fully
+ conformant) fonts like `ahronbd.ttf'.
+
+ - Another round of improvements to correct positioning and hinting
+ of composite glyphs in TrueType fonts.
+
+
+ II. MISCELLANEOUS
+
+ - Version 2.5.1 introduced a bug in handling embedded bitmap
+ strikes of TrueType fonts, causing garbage display under some
+ circumstances.
+
+ - The `ftgrid' demo program couldn't be compiled in
+ non-development builds.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.5 and 2.5.1
+
+ I. IMPORTANT BUG FIXES
+
+ - For some WinFNT files, the last glyph wasn't displayed but
+ incorrectly marked as invalid.
+
+ - The vertical size of glyphs was incorrectly set after a call to
+ `FT_GlyphSlot_Embolden', resulting in clipped glyphs.
+
+ - Many fields of the `PCLT' table in SFNT based fonts (if accessed
+ with `FT_Get_Sfnt_Table') were computed incorrectly.
+
+ - In TrueType fonts, hinting of composite glyphs could sometimes
+ deliver incorrect positions of components or even distorted
+ shapes.
+
+
+ II. IMPORTANT CHANGES
+
+ - WOFF font format support has been added.
+
+ - The auto-hinter now supports Hebrew. Greek and Cyrillic support
+ has been improved.
+
+ - Support for the forthcoming `OS/2' SFNT table version 5, as can
+ be found e.g. in the `Sitka' font family for Windows 8.1.
+
+ - The header file layout has been changed. After installation,
+ all files are now located in `<prefix>/include/freetype2'.
+
+ Applications that use (a) `freetype-config' or FreeType's
+ `pkg-config' file to get the include directory for the compiler,
+ and (b) the documented way for header inclusion like
+
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+ ...
+
+ don't need any change to the source code.
+
+
+ III. MISCELLANEOUS
+
+ - The stem darkening feature of the new CFF engine can now be
+ fine-tuned with the new `darkening-parameters' property.
+
+ - `ftgrid' has been updated to toggle various engines with the `H'
+ key, similar to `ftview' and `ftdiff'.
+
+ - The functionality of `ttdebug' has been greatly enhanced.
+
+ . It now displays twilight, storage, and control value data; key
+ `T' shows the twilight point table, key `S' the storage data,
+ and key `C' the control value table.
+
+ . Some keys have been reassigned from lowercase to their
+ uppercase equivalents; for example `q' to quit the program is
+ now `Q'.
+
+ . Key `f' finishes the current function.
+
+ . Key `R' restarts the debugger.
+
+ . Keys `b' and `p' set a breakpoint.
+
+ . Key `B' provides a function call backtrace.
+
+ - Better support of ARMv7 and x86_64 processors.
+
+ - Apple's `sbix' color bitmap format is now supported.
+
+ - Improved auto-hinter rendering for many TrueType fonts,
+ especially in the range 20-40ppem.
+
+ - A new face flag `FT_FACE_FLAG_COLOR' has been added (to be
+ accessed with the macro `FT_HAS_COLOR').
+
+ - `FT_Gzip_Uncompress' (modeled after zlib's `uncompress'
+ function) has been added; this is a by-product of the newly
+ added WOFF support.
+
+ - Support for a build with `cmake' has been contributed by John
+ Cary <cary@txcorp.com>.
+
+ - Support for x64 builds with Visual C++ has been contributed by
+ Kenneth Miller <kennethadammiller@yahoo.com>
+
+ - Manual pages for most demo programs have been added.
+
+ - The GETINFO bytecode instruction for TrueType fonts was buggy if
+ used to retrieve subpixel hinting information. It was necessary
+ to set selector bit 6 to get results for selector bits 7-10,
+ which is wrong.
+
+ - Improved computation of emulated vertical metrics for TrueType
+ fonts.
+
+ - Fixed horizontal start-up position of vertical phantom points in
+ TrueType bytecode.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.4.12 and 2.5
+
+ I. IMPORTANT BUG FIXES
+
+ - The cache manager function `FTC_Manager_Reset' didn't flush the
+ cache.
+
+
+ II. IMPORTANT CHANGES
+
+ - Behdad Esfahbod (on behalf of Google) contributed support for
+ color embedded bitmaps (eg. color emoji).
+
+ A new load flag, FT_LOAD_COLOR, makes FreeType load color
+ embedded-bitmaps, following this draft specification
+
+ https://color-emoji.googlecode.com/git/specification/v1.html
+
+ which defines two new SFNT tables, `CBDT' and `CBLC' (named and
+ modeled after `EBDT' and `EBLC', respectively). The color
+ bitmaps are stored in the new FT_PIXEL_MODE_BGRA format to
+ represent BGRA pre-multiplied sRGB images. If PNG support is
+ available, PNG color images as defined in the same proposed
+ specification are supported also.
+
+ Note that color bitmaps are converted to grayscale if client
+ didn't ask for color.
+
+ - As announced in the previous release, the old FreeType CFF
+ engine is now disabled by default. It can be conditionally
+ compiled by defining the configuration macro
+ CFF_CONFIG_OPTION_OLD_ENGINE.
+
+ - As announced in the previous release, all code related to macro
+ FT_CONFIG_OPTION_OLD_INTERNALS has been removed, thus becoming
+ obsolete.
+
+
+ III. MISCELLANEOUS
+
+ - The property API (`FT_Property_Get' and `FT_Property_Set') is
+ now declared as stable.
+
+ The exception, however, are the experimental auto-hinter
+ properties `glyph-to-script-map' and `fallback-script' which are
+ subject to change in a forthcoming release.
+
+ - `ftview' has been updated to support color embedded bitmaps; it
+ can be toggled on and off with key `c'. The small cache toggle
+ is now key `K'.
+
+ - It is now possible to control the version of the TrueType
+ hinting engine using the new `interpreter-version' property of
+ the `truetype' module: Versions 35 and 38 (the default) are
+ supported, which roughly corresponds to disable and enable
+ subpixel hinting support, respectively.
+
+ In both `ftview' and `ftdiff', switching between the two
+ versions can be done with key `H'. In the `ftbench' demo
+ program, command line option `-H' has been extended to activate
+ the non-default interpreter version.
+
+ - The `ttdebug' program has been further improved. In particular,
+ it accepts a new command line option `-H' to select the hinting
+ engine.
+
+ - `ftdump's verbose option has been renamed to `-V'. For all demo
+ programs, `-v' now shows version information.
+
+ - Another round of TrueType subpixel hinting fixes.
+
+ - The `apinames' tool can now create an import file for NetWare.
+
+ - 64bit compilation of the new CFF engine was buggy.
+
+ - Some fixes to improve robustness in memory-tight situations.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.4.11 and 2.4.12
+
+ - We have another CFF parsing and hinting engine! Written by Dave
+ Arnold <darnold@adobe.com>, this work has been contributed by
+ Adobe in collaboration with Google. It is vastly superior to
+ the old CFF engine, and it will replace it in the next release.
+ Right now, it is still off by default, and you have to
+ explicitly select it using the new `hinting-engine' property of
+ the cff driver:
+
+ ...
+ #include FT_MODULE_H
+ #include FT_CFF_DRIVER_H
+
+ FT_Library library;
+ int engine = FT_CFF_HINTING_ADOBE;
+
+
+ ...
+ FT_Property_Set( library, "cff", "hinting-engine", &engine );
+
+ The code has a (mature) beta status; we encourage all users to
+ test it and report any problems.
+
+ In case you want to activate the new CFF engine unconditionally,
+ apply this patch:
+
+--- snip ---
+diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
+index ebcf189..3f2ce6b 100644
+--- a/src/cff/cffobjs.c
++++ b/src/cff/cffobjs.c
+@@ -1056,7 +1056,7 @@
+
+
+ /* set default property values */
+- driver->hinting_engine = FT_CFF_HINTING_FREETYPE;
++ driver->hinting_engine = FT_CFF_HINTING_ADOBE;
+ driver->no_stem_darkening = FALSE;
+
+ return FT_Err_Ok;
+--- snip ---
+
+ - The macro FT_CONFIG_OPTION_OLD_INTERNALS is no longer set by
+ default. In the next release, we will completely remove the
+ associated code. Please update your programs in case you are
+ still using this macro.
+
+
+ II. MISCELLANEOUS
+
+ - The (top-level) `configure' script now respects the MAKE
+ environment variable to specify a `make' binary. For backwards
+ compatibility, GNUMAKE still overrides MAKE, though.
+
+ - The `ftview' and `ftdiff' demo programs have been redesigned,
+ showing more options permanently on the screen, among other
+ minor improvements.
+
+ - Using the `H' key, it is now possible to select the CFF engine
+ in both `ftview' and `ftdiff'.
+
+ - The new command line option `-H' for `ftbench' selects the Adobe
+ CFF engine.
+
+ - It is now possible to directly select the LCD rendering mode
+ with the keys `A'-`F' in `ftview'. The key mapping for cycling
+ through LCD modes has been changed from `K' and `L' to `k' and
+ `l', and toggling custom LCD filtering is no longer mapped to
+ key `F' but to key `L'.
+
+ - In `ftdiff', key `x' toggles between layout modes: Either use
+ the advance width (this is new and now the default) or the
+ bounding box information to determine line breaks.
+
+ - For all demo tools, the new command line option `-v' shows the
+ version.
+
+ - For the demo tools with a GUI, the new command line options `-w'
+ and `-h' select the width and the height of the output window,
+ respectively.
+
+ - The `ttdebug' program was broken and has been reactivated. Note
+ that this program is not compiled by default.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.4.10 and 2.4.11
+
+ I. IMPORTANT BUG FIXES
+
+ - Some vulnerabilities in the BDF implementation have been fixed.
+ Users of this font format should upgrade.
+
+
+ II. IMPORTANT CHANGES
+
+ - Subpixel hinting support has been contributed by Infinality,
+ based on Greg Hitchcock's whitepaper at
+
+ http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
+
+ Originally, it was a separate patch available from
+
+ http://www.infinality.net/blog/
+
+ and which has been integrated.
+
+ Note that ClearType support is not completely implemented! In
+ particular, full support for the options `compatible_widths',
+ `symmetrical_smoothing, and `bgr' (via the GETINFO bytecode
+ instruction) is missing.
+
+ Activation of subpixel hinting support can be controlled with
+ the `TT_CONFIG_OPTION_SUBPIXEL_HINTING' configuration option; it
+ is switched off by default. This feature is still experimental;
+ we welcome test reports!
+
+ - Support for OpenType collections (OTC) has been added.
+
+ - Pure CFF fonts within an SFNT wrapper are now supported.
+
+
+ III. MISCELLANEOUS
+
+ - Minor rendering improvements to the auto-hinter.
+
+ - `FT_GlyphSlot_Oblique' now uses a shear angle of 12°.
+
+ - Experimental support to handle `property modules', for example
+ to control the behaviour of the auto-hinter. The API consists
+ of two new functions, `FT_Property_Set' and `FT_Property_Get'.
+
+ The code is still subject to change and should not be used for
+ production.
+
+ - The `ftdiff' demo program now supports UTF-8 encoded input files
+ for option `-f'.
+
+ - Using keys `r' and `R', you can now adjust the stroker radius in
+ the `ftview' demo program.
+
+ - Other, minor fixes and improvements.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.4.9 and 2.4.10
+
+ I. IMPORTANT BUG FIXES
+
+ - Incremental glyph loading as needed by ghostscript was broken.
+
+
+ II. MISCELLANEOUS
+
+ - A new function `FT_Outline_EmboldenXY', contributed by Alexei
+ Podtelezhnikov.
+
+ - In the `ftview' demo program, key `e' has been replaced with `x'
+ and `y' to embolden in the horizontal and vertical direction,
+ respectively.
+
+ - The glyph spacing computation in `FT_GlyphSlot_Embolden' (and
+ similar code in `ftview') has been improved.
+
+ - Minor improvements to the TrueType bytecode interpreter and
+ glyph loader, the auto-hinter, and the B/W rasterizer.
+
+
+======================================================================
+
CHANGES BETWEEN 2.4.8 and 2.4.9
I. IMPORTANT BUG FIXES
@@ -22,7 +552,7 @@ CHANGES BETWEEN 2.4.8 and 2.4.9
- The demo programs no longer recognize and handle default
suffixes; you now have to always specify the complete font name.
- - Better rendering and LCD mode cycling added to ftview.
+ - Better rendering and LCD mode cycling added to `ftview'.
======================================================================
@@ -209,7 +739,7 @@ CHANGES BETWEEN 2.4.1 and 2.4.2
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.
+ counter.
======================================================================
@@ -2401,7 +2931,7 @@ CHANGES BETWEEN 2.0.3 and 2.0.2
number. see <freetype/fterrors.h> for details.
- A new public header file has been introduced, named
- FT_TRIGONOMETRY_H (include/freetype/fttrig.h), providing
+ FT_TRIGONOMETRY_H (include/freetype/fttrigon.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
@@ -3629,7 +4159,7 @@ Extensions support:
------------------------------------------------------------------------
-Copyright 2000-2012 by
+Copyright 2000-2013 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/docs/CMAKE b/docs/CMAKE
new file mode 100644
index 0000000..31237ae
--- /dev/null
+++ b/docs/CMAKE
@@ -0,0 +1,2 @@
+Support for a cmake build has been contributed. See the remarks in the
+top-level `CMakeLists.txt' file for more.
diff --git a/docs/CUSTOMIZE b/docs/CUSTOMIZE
index 7d7d474..dfadb46 100644
--- a/docs/CUSTOMIZE
+++ b/docs/CUSTOMIZE
@@ -8,10 +8,9 @@ How to customize the compilation of the library
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.
+ The file found in `include/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
@@ -31,10 +30,14 @@ II. Modules list
make uses `modules.cfg' to generate `ftmodule.h' (in the object
directory).
+ If you build FreeType in a directory separate from the source files,
+ put your customized `modules.cfg' in that directory; that way you
+ can keep the source files `clean'.
+
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
+ `include/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.
@@ -77,11 +80,12 @@ IV. Overriding default configuration and module headers
[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.
-
+ Just put your custom `ftoption.h' file into the objects directory
+ (normally `<topdir>/objs' if you build in the source tree, or the
+ directory where you invoke configure if you build in a separate
+ directory), 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
@@ -91,19 +95,16 @@ IV. Overriding default configuration and module headers
#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:
+ are compiled. Their default values being <config/ftoption.h> and
+ <config/ftmodule.h>, you can do something like:
custom/
- freetype/
- config/
- ftoption.h => custom options header
- ftmodule.h => custom modules list
+ 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'.
@@ -121,7 +122,7 @@ IV. Overriding default configuration and module headers
#define FT_CONFIG_OPTIONS_H <custom/my-ftoption.h>
#define FT_CONFIG_MODULES_H <custom/my-ftmodule.h>
- #include <freetype/config/ftheader.h>
+ #include <config/ftheader.h>
#endif /* __FT2_BUILD_MY_PLATFORM_H__ */
@@ -137,7 +138,7 @@ IV. Overriding default configuration and module headers
----------------------------------------------------------------------
-Copyright 2003, 2005, 2006 by
+Copyright 2003, 2005, 2006, 2012, 2013 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/docs/DEBUG b/docs/DEBUG
index 3d6acd3..d8c79d1 100644
--- a/docs/DEBUG
+++ b/docs/DEBUG
@@ -4,63 +4,63 @@ 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
+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
+ #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,
+ #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
+ 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
+ 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 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.
+ 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:
+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
+ 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
+ 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" ));
@@ -68,128 +68,130 @@ its code:
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
+ 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 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
+ 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.
+ 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 `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
+ 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
+ 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.
+ 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
+ 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
+ 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" ));
+ FT_TRACE2(( "your %s is not %s\n", "foo", "bar" ));
III. Environment variables
--------------------------
-The following environment variables control debugging output and
+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:
+ 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 ...
+ 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
+ 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' 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)
+ 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.
+ 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 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
+ 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.
+ 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
+ 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.
+ 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
+ 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
+Copyright 2002-2005, 2009, 2013 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/docs/INSTALL b/docs/INSTALL
index fc699a8..456b76d 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -43,7 +43,12 @@ I. Normal installation and upgrades
directory, where <system> stands for your OS or environment.
- 5. From you own IDE, or own Makefiles
+ 5. Using cmake
+
+ See the top-level `CMakeLists.txt' file for more information.
+
+
+ 6. 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
@@ -70,7 +75,7 @@ II. Custom builds of the library
----------------------------------------------------------------------
-Copyright 2000-2008, 2010-2011
+Copyright 2000-2008, 2010-2011, 2013
by David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/docs/INSTALL.ANY b/docs/INSTALL.ANY
index 80f161c..8aa394f 100644
--- a/docs/INSTALL.ANY
+++ b/docs/INSTALL.ANY
@@ -33,25 +33,25 @@ I. Standard procedure
src/base/ftbase.c
- src/base/ftbbox.c -- recommended, see <freetype/ftbbox.h>
- src/base/ftglyph.c -- recommended, see <freetype/ftglyph.h>
+ src/base/ftbbox.c -- recommended, see <ftbbox.h>
+ src/base/ftglyph.c -- recommended, see <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/ftbdf.c -- optional, see <ftbdf.h>
+ src/base/ftbitmap.c -- optional, see <ftbitmap.h>
+ src/base/ftcid.c -- optional, see <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/ftgasp.c -- optional, see <ftgasp.h>
+ src/base/ftgxval.c -- optional, see <ftgxval.h>
+ src/base/ftlcdfil.c -- optional, see <ftlcdfil.h>
+ src/base/ftmm.c -- optional, see <ftmm.h>
+ src/base/ftotval.c -- optional, see <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/ftpfr.c -- optional, see <ftpfr.h>
+ src/base/ftstroke.c -- optional, see <ftstroke.h>
+ src/base/ftsynth.c -- optional, see <ftsynth.h>
+ src/base/fttype1.c -- optional, see <t1tables.h>
+ src/base/ftwinfnt.c -- optional, see <ftwinfnt.h>
+ src/base/ftxf86.c -- optional, see <ftxf86.h>
src/base/ftmac.c -- only on the Macintosh
@@ -143,7 +143,7 @@ II. Support for flat-directory compilation
----------------------------------------------------------------------
-Copyright 2003, 2005, 2006, 2009, 2010 by
+Copyright 2003, 2005, 2006, 2009, 2010, 2013 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/docs/INSTALL.CROSS b/docs/INSTALL.CROSS
index 3def12c..d372adc 100644
--- a/docs/INSTALL.CROSS
+++ b/docs/INSTALL.CROSS
@@ -1,26 +1,27 @@
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.
+on FreeBSD/i386. Before reading this document, please consult the
+file `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
+ 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
+ Currently, using a non-GNU cross compiler is untested. 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
+ 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.
+ (`apinames') that is executed during the build procedure. Non-GNU
+ self compilers are acceptable, but such a setup is untested.
2. Configuration
@@ -28,10 +29,10 @@ INSTALL.UNIX for required tools and the basic self-building procedure.
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
+ To configure a cross-build, the options `--host=<system>' and
+ `--build=<system>' must be passed to the `configure' script.
+ For example, if your build system is FreeBSD/i386 and the target
+ system is Linux/MIPS, say
./configure \
--build=i386-unknown-freebsd \
@@ -44,11 +45,11 @@ INSTALL.UNIX for required tools and the basic self-building procedure.
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
+ env CC=mips-ip22-linux-gcc ./configure # BAD
or
- env CC=/usr/local/mips-ip22-linux/bin/gcc ./configure
+ env CC=/usr/local/mips-ip22-linux/bin/gcc ./configure # BAD
doesn't work either; such a configuration confuses the
`configure' script while trying to find the cross and native C
@@ -58,22 +59,63 @@ INSTALL.UNIX for required tools and the basic self-building procedure.
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.
+ 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.
+ from the self-building system. For example, a configuration
+ with `--prefix=/usr/local' installs binaries into the
+ system-wide `/usr/local' directory, which then can't be executed
+ due to the incorrect architecture. This causes confusion in
+ configuration of all applications that 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 FreeType 2 library is used as a
+ part of the target system, the prefix to install should reflect
+ the file system structure of the target system.
+
+
+ 2.3. Library dependencies
+
+ FreeType normally depends on external libraries like `libpng' or
+ `libharfbuzz'. The easiest case is to deactivate all such
+ dependencies using the `--without-XXX' configuration options.
+ However, if you want to use those libraries, you should ensure
+ that they are available both on the target system and as
+ (cross-compiled) libraries on the build system.
+
+ FreeType uses `pkg-config' to find most of the libraries; the
+ other libraries it links to are expected in the standard system
+ directories. Since the default pkg-config's meta-information
+ files (like `harfbuzz.pc') of the build platform don't work, use
+ one of the two possible solutions below.
+
+ o Use pkg-config's meta-information files that are adjusted to
+ cross-compile and cross-link with the target platform's
+ libraries. Make sure those files are found before the build
+ system's default files. Example:
+
+ ./configure \
+ --build=i386-unknown-freebsd \
+ --host=mips-ip22-linuxelf \
+ PKG_CONFIG_LIBDIR="/usr/local/mips-ip22-linux/lib/pkgconfig" \
+ [other options]
+
+ See the manpage of `pkg-config' for more details.
+
+ o Set variables like LIBPNG_LIBS as additional options to the
+ `configure' script, overriding the values `pkg-config' would
+ provide. `configure --help' shows the available environment
+ variables. Example:
+
+ ./configure \
+ --build=i386-unknown-freebsd \
+ --host=mips-ip22-linuxelf \
+ LIBPNG_CFLAGS="-I/usr/local/mips-ip22-linux/include" \
+ LIBPNG_LIBS="-L/usr/local/mips-ip22-linux/lib -lpng12" \
+ [other options]
3. Building command
@@ -121,7 +163,7 @@ INSTALL.UNIX for required tools and the basic self-building procedure.
----------------------------------------------------------------------
-Copyright 2006, 2008 by suzuki toshiya
+Copyright 2006, 2008, 2012, 2014 by suzuki toshiya
David Turner, Robert Wilhelm, and Werner Lemberg.
diff --git a/docs/INSTALL.GNU b/docs/INSTALL.GNU
index 72df50a..3b9e0a2 100644
--- a/docs/INSTALL.GNU
+++ b/docs/INSTALL.GNU
@@ -1,7 +1,7 @@
-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.
+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 MinGW/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
@@ -52,10 +52,10 @@ in the file INSTALL.UNIX instead.
The following settings are used:
- platform win32
+ platform windows
compiler gcc
- configuration directory .\builds\win32
- configuration rules .\builds\win32\w32-gcc.mk
+ configuration directory .\builds\windows
+ configuration rules .\builds\windows\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
@@ -138,15 +138,17 @@ in the file INSTALL.UNIX instead.
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
+ The above instructions build a _statically_ linked library of the
+ font engine in the `objs' directory. On Windows, you can build a
+ DLL either with MinGW (within an MSYS shell, following the
+ instructions in `INSTALL.UNIX'), or you use one of the Visual C++
+ project files; see the subdirectories of `builds/windows'. For
+ everything else, you are on your own, and you might follow the
instructions in `INSTALL.ANY' to create your own Makefiles.
----------------------------------------------------------------------
-Copyright 2003, 2004, 2005, 2006, 2008 by
+Copyright 2003-2006, 2008, 2013, 2014 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/docs/INSTALL.UNIX b/docs/INSTALL.UNIX
index 5dc0764..251c749 100644
--- a/docs/INSTALL.UNIX
+++ b/docs/INSTALL.UNIX
@@ -23,7 +23,7 @@ or MSys on Win32:
fail.
It is also fine to have GNU Make under another name (e.g. 'gmake')
- if you use the GNUMAKE variable as described below.
+ if you use the MAKE variable as described below.
As a special exception, 'makepp' can also be used to build
FreeType 2. See the file docs/MAKEPP for details.
@@ -61,11 +61,11 @@ or MSys on Win32:
./configure --prefix=/usr
- When using a different command to invoke GNU Make, use the GNUMAKE
+ When using a different command to invoke GNU Make, use the MAKE
variable. For example, if `gmake' is the command to use on your
system, do something like:
- GNUMAKE=gmake ./configure [options]
+ MAKE=gmake ./configure [options]
gmake
gmake install (as root)
@@ -81,9 +81,28 @@ or MSys on Win32:
make
make install
+
+ 3.1 Interdependency with HarfBuzz
+ .................................
+
+ Note that there is a chicken-and-egg problem currently since the
+ HarfBuzz library (used by the auto-hinter to improve support of
+ OpenType fonts) depends on FreeType, which can be solved as
+ follows in case HarfBuzz is not yet installed on your system.
+
+ 1. Call FreeType's `configure' script with option
+ `--without-harfbuzz', then compile and install FreeType.
+
+ 2. Compile and install HarfBuzz.
+
+ 3. Call FreeType's `configure' script without option
+ `--without-harfbuzz' (after executing `make distclean'), then
+ compile and install FreeType again.
+
+
----------------------------------------------------------------------
-Copyright 2003, 2004, 2005, 2006, 2007 by
+Copyright 2003-2007, 2013, 2014 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/docs/LICENSE.TXT b/docs/LICENSE.TXT
index 62945c8..99dc342 100644
--- a/docs/LICENSE.TXT
+++ b/docs/LICENSE.TXT
@@ -30,5 +30,8 @@ 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.
+The MD5 checksum support (only used for debugging in development builds)
+is in the public domain.
+
--- end of LICENSE.TXT ---
diff --git a/docs/VERSION.DLL b/docs/VERSION.DLL
index 1dfc8c1..dd49261 100644
--- a/docs/VERSION.DLL
+++ b/docs/VERSION.DLL
@@ -1,5 +1,5 @@
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
+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.
@@ -10,16 +10,16 @@ FreeType on Unix.
1. Version and Release numbers
------------------------------
-For each new public release of FreeType 2, there are generally *three*
+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 official FreeType 2 release number, like 2.3.1 or 2.4.10.
- * The libtool (and Unix) specific version number, like 9.2.3. This is
- what `freetype-config --version' returns.
+ * The libtool (and Unix) specific version number, like 13.0.7. 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 library is installed as `/usr/lib/libfreetype.so.6.7.1'.
The platform-specific number is, unsurprisingly, platform-specific and
varies with the operating system you are using (several variants of
@@ -38,21 +38,29 @@ macros defined in FT_FREETYPE_H:
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.
+The release number is also available at *runtime* through the
+`FT_Library_Version' API.
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:
+The following table gives, for all releases since 2.3.0, the
+corresponding libtool number, as well as the shared object number found
+on _most_ systems, but not all of them:
- release libtool so
+ release libtool so
-------------------------------
+ 2.5.5 17.4.11 6.11.4
+ 2.5.4 17.3.11 6.11.3
+ 2.5.3 17.2.11 6.11.2
+ 2.5.2 17.1.11 6.11.1
+ 2.5.1 17.0.11 6.11.0
+ 2.5.0 16.2.10 6.10.2
+ 2.4.12 16.1.10 6.10.1
+ 2.4.11 16.0.10 6.10.0
+ 2.4.10 15.0.9 6.9.0
2.4.9 14.1.8 6.8.1
2.4.8 14.0.8 6.8.0
2.4.7 13.2.7 6.7.2
@@ -76,34 +84,6 @@ systems, but not all of them:
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
@@ -135,7 +115,7 @@ other release numbers.
------------------------------------------------------------------------
-Copyright 2002-2012 by
+Copyright 2002-2014 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/docs/formats.txt b/docs/formats.txt
index 827c894..aed885c 100644
--- a/docs/formats.txt
+++ b/docs/formats.txt
@@ -153,7 +153,7 @@ MAC --- PS TYPE_1 --- type1 T1_SPEC.pdf
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.
+ 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:
diff --git a/docs/freetype-config.1 b/docs/freetype-config.1
new file mode 100644
index 0000000..7b4a118
--- /dev/null
+++ b/docs/freetype-config.1
@@ -0,0 +1,108 @@
+.TH FREETYPE-CONFIG 1 "December 2014" "FreeType 2.5.5"
+.
+.
+.SH NAME
+.
+freetype-config \- Get information about a libfreetype installation
+.
+.
+.SH SYNOPSIS
+.
+.B freetype-config
+.RI [ options ]
+.
+.
+.SH DESCRIPTION
+.
+.B freetype-config
+returns information needed for compiling and linking programs with the
+FreeType library, such as linker flags and compilation parameters.
+.
+Alternatively, it can be used to query information about the
+FreeType library version installed on the system, such as the
+installation (directory path) prefix or the FreeType version number.
+.
+.PP
+This program is part of the FreeType package.
+.
+.
+.SH OPTIONS
+.
+There are two types of options: output/display selection options, and
+path override options.
+.
+.
+.SS Output selection options
+.
+Only one of the output selection options should be given at each program
+invocation.
+.
+.TP
+.B \-\-prefix
+Return the prefix value of the installed FreeType library (the default
+prefix will be `/usr' in most cases for distribution-installed
+packages).
+.
+.TP
+.B \-\-exec-prefix
+Return the executable prefix value of the installed FreeType library
+(will often be the same as the prefix value).
+.
+.TP
+.B \-\-ftversion
+Return the FreeType version number.
+.
+.TP
+.B \-\-version
+Return the `libtool version' of the FreeType library.
+.
+.TP
+.B \-\-libtool
+Return the library name for linking with libtool.
+.
+.TP
+.B \-\-libs
+Return compiler flags for linking with the installed FreeType library.
+.
+.TP
+.B \-\-cflags
+Return compiler flags for compiling against the installed FreeType library.
+.
+.TP
+.B \-\-static
+Make command line options display flags for static linking.
+.
+.
+.SS Path override options
+.
+These affect any selected output option, except the libtool version
+returned by `--version'.
+.
+.TP
+.BI \-\-prefix= PREFIX
+Override `--prefix' value with
+.IR PREFIX .
+.
+.TP
+.BI \-\-exec-prefix= EPREFIX
+Override `--exec-prefix' value with
+.IR EPREFIX .
+.
+.
+.SH BUGS
+In case the libraries FreeType links to are located in non-standard
+directories, the output from option
+.B \-\-libs
+might be incomplete.
+It is thus recommended to use the
+.BR pkg-config (1)
+interface instead, which is able to correctly resolve all dependencies.
+.
+.
+.SH AUTHOR
+.
+This manual page was contributed by Nis Martensen <nis.martensen@web.de>,
+with further refinements from the FreeType team.
+.
+.
+.\" eof
diff --git a/docs/reference/ft2-auto_hinter.html b/docs/reference/ft2-auto_hinter.html
new file mode 100644
index 0000000..71dede4
--- /dev/null
+++ b/docs/reference/ft2-auto_hinter.html
@@ -0,0 +1,370 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>FreeType-2.5.5 API Reference</title>
+<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
+ body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+ color: #000000;
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
+
+ h1 { text-align: center; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
+
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
+
+ span.keyword { font-family: monospace;
+ text-align: left;
+ white-space: pre;
+ color: darkblue; }
+
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
+
+</style>
+</head>
+<body>
+
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
+
+<h1>The auto-hinter</h1>
+<h2>Synopsis</h2>
+<table class="synopsis">
+<tr><td><a href="#glyph-to-script-map">glyph-to-script-map</a></td><td><a href="#default-script">default-script</a></td></tr>
+<tr><td><a href="#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td><a href="#increase-x-height">increase-x-height</a></td></tr>
+<tr><td><a href="#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td><a href="#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td></tr>
+<tr><td><a href="#fallback-script">fallback-script</a></td><td></td></tr>
+</table>
+
+
+<p>While FreeType's auto-hinter doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. The following lists the available properties together with the necessary macros and structures.</p>
+<p>Note that the auto-hinter's module name is &lsquo;autofitter&rsquo; for historical reasons.</p>
+
+<div class="section">
+<h3 id="glyph-to-script-map">glyph-to-script-map</h3>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>The auto-hinter provides various script modules to hint glyphs. Examples of supported scripts are Latin or CJK. Before a glyph is auto-hinted, the Unicode character map of the font gets examined, and the script is then determined based on Unicode character ranges, see below.</p>
+<p>OpenType fonts, however, often provide much more glyphs than character codes (small caps, superscripts, ligatures, swashes, etc.), to be controlled by so-called &lsquo;features&rsquo;. Handling OpenType features can be quite complicated and thus needs a separate library on top of FreeType.</p>
+<p>The mapping between glyph indices and scripts (in the auto-hinter sense, see the <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a> values) is stored as an array with &lsquo;num_glyphs&rsquo; elements, as found in the font's <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure. The &lsquo;glyph-to-script-map&rsquo; property returns a pointer to this array, which can be modified as needed. Note that the modification should happen before the first glyph gets processed by the auto-hinter so that the global analysis of the font shapes actually uses the modified mapping.</p>
+<p>The following example code demonstrates how to access it (omitting the error handling).</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Face face;
+ FT_Prop_GlyphToScriptMap prop;
+
+
+ FT_Init_FreeType( &amp;library );
+ FT_New_Face( library, "foo.ttf", 0, &amp;face );
+
+ prop.face = face;
+
+ FT_Property_Get( library, "autofitter",
+ "glyph-to-script-map", &amp;prop );
+
+ // adjust `prop.map' as needed right here
+
+ FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
+</pre>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</h3>
+<p>Defined in FT_AUTOHINTER_H (ftautoh.h).</p>
+<pre>
+#define <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_NONE">FT_AUTOHINTER_SCRIPT_NONE</a> 0
+#define <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_LATIN">FT_AUTOHINTER_SCRIPT_LATIN</a> 1
+#define <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_CJK">FT_AUTOHINTER_SCRIPT_CJK</a> 2
+#define <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_INDIC">FT_AUTOHINTER_SCRIPT_INDIC</a> 3
+</pre>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>A list of constants used for the <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a> property to specify the script submodule the auto-hinter should use for hinting a particular glyph.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_NONE">FT_AUTOHINTER_SCRIPT_NONE</td><td class="desc">
+<p>Don't auto-hint this glyph.</p>
+</td></tr>
+<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_LATIN">FT_AUTOHINTER_SCRIPT_LATIN</td><td class="desc">
+<p>Apply the latin auto-hinter. For the auto-hinter, &lsquo;latin&rsquo; is a very broad term, including Cyrillic and Greek also since characters from those scripts share the same design constraints.</p>
+<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
+<pre class="colored">
+ U+0020 - U+007F // Basic Latin (no control characters)
+ U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
+ U+0100 - U+017F // Latin Extended-A
+ U+0180 - U+024F // Latin Extended-B
+ U+0250 - U+02AF // IPA Extensions
+ U+02B0 - U+02FF // Spacing Modifier Letters
+ U+0300 - U+036F // Combining Diacritical Marks
+ U+0370 - U+03FF // Greek and Coptic
+ U+0400 - U+04FF // Cyrillic
+ U+0500 - U+052F // Cyrillic Supplement
+ U+1D00 - U+1D7F // Phonetic Extensions
+ U+1D80 - U+1DBF // Phonetic Extensions Supplement
+ U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
+ U+1E00 - U+1EFF // Latin Extended Additional
+ U+1F00 - U+1FFF // Greek Extended
+ U+2000 - U+206F // General Punctuation
+ U+2070 - U+209F // Superscripts and Subscripts
+ U+20A0 - U+20CF // Currency Symbols
+ U+2150 - U+218F // Number Forms
+ U+2460 - U+24FF // Enclosed Alphanumerics
+ U+2C60 - U+2C7F // Latin Extended-C
+ U+2DE0 - U+2DFF // Cyrillic Extended-A
+ U+2E00 - U+2E7F // Supplemental Punctuation
+ U+A640 - U+A69F // Cyrillic Extended-B
+ U+A720 - U+A7FF // Latin Extended-D
+ U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
+ U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
+ U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
+</pre>
+<p></p>
+</td></tr>
+<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_CJK">FT_AUTOHINTER_SCRIPT_CJK</td><td class="desc">
+<p>Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old Vietnamese, and some other scripts.</p>
+<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
+<pre class="colored">
+ U+1100 - U+11FF // Hangul Jamo
+ U+2E80 - U+2EFF // CJK Radicals Supplement
+ U+2F00 - U+2FDF // Kangxi Radicals
+ U+2FF0 - U+2FFF // Ideographic Description Characters
+ U+3000 - U+303F // CJK Symbols and Punctuation
+ U+3040 - U+309F // Hiragana
+ U+30A0 - U+30FF // Katakana
+ U+3100 - U+312F // Bopomofo
+ U+3130 - U+318F // Hangul Compatibility Jamo
+ U+3190 - U+319F // Kanbun
+ U+31A0 - U+31BF // Bopomofo Extended
+ U+31C0 - U+31EF // CJK Strokes
+ U+31F0 - U+31FF // Katakana Phonetic Extensions
+ U+3200 - U+32FF // Enclosed CJK Letters and Months
+ U+3300 - U+33FF // CJK Compatibility
+ U+3400 - U+4DBF // CJK Unified Ideographs Extension A
+ U+4DC0 - U+4DFF // Yijing Hexagram Symbols
+ U+4E00 - U+9FFF // CJK Unified Ideographs
+ U+A960 - U+A97F // Hangul Jamo Extended-A
+ U+AC00 - U+D7AF // Hangul Syllables
+ U+D7B0 - U+D7FF // Hangul Jamo Extended-B
+ U+F900 - U+FAFF // CJK Compatibility Ideographs
+ U+FE10 - U+FE1F // Vertical forms
+ U+FE30 - U+FE4F // CJK Compatibility Forms
+ U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
+ U+1B000 - U+1B0FF // Kana Supplement
+ U+1D300 - U+1D35F // Tai Xuan Hing Symbols
+ U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
+ U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
+ U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
+ U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
+ U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
+</pre>
+<p></p>
+</td></tr>
+<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_INDIC">FT_AUTOHINTER_SCRIPT_INDIC</td><td class="desc">
+<p>Apply the indic auto-hinter, covering all major scripts from the Indian sub-continent and some other related scripts like Thai, Lao, or Tibetan.</p>
+<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
+<pre class="colored">
+ U+0900 - U+0DFF // Indic Range
+ U+0F00 - U+0FFF // Tibetan
+ U+1900 - U+194F // Limbu
+ U+1B80 - U+1BBF // Sundanese
+ U+1C80 - U+1CDF // Meetei Mayak
+ U+A800 - U+A82F // Syloti Nagri
+ U+11800 - U+118DF // Sharada
+</pre>
+<p>Note that currently Indic support is rudimentary only, missing blue zone support.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</h3>
+<p>Defined in FT_AUTOHINTER_H (ftautoh.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_GlyphToScriptMap_
+ {
+ <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face;
+ <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* map;
+
+ } <b>FT_Prop_GlyphToScriptMap</b>;
+</pre>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>The data exchange structure for the <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a> property.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="fallback-script">fallback-script</h3>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>If no auto-hinter script module can be assigned to a glyph, a fallback script gets assigned to it (see also the <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a> property). By default, this is <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_CJK</a>. Using the &lsquo;fallback-script&rsquo; property, this fallback value can be changed.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "autofitter",
+ "fallback-script", &amp;fallback_script );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the fallback script value gets triggered either by setting or reading a face-specific property like <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the fallback script will affect this face.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="default-script">default-script</h3>
+
+<p><b>Experimental</b> <b>only</b></p>
+<p>If Freetype gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make the HarfBuzz library access OpenType features for getting better glyph coverages, this property sets the (auto-fitter) script to be used for the default (OpenType) script data of a font's GSUB table. Features for the default script are intended for all scripts not explicitly handled in GSUB; an example is a &lsquo;dlig&rsquo; feature, containing the combination of the characters &lsquo;T&rsquo;, &lsquo;E&rsquo;, and &lsquo;L&rsquo; to form a &lsquo;TEL&rsquo; ligature.</p>
+<p>By default, this is <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a>. Using the &lsquo;default-script&rsquo; property, this default value can be changed.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "autofitter",
+ "default-script", &amp;default_script );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the default script value gets triggered either by setting or reading a face-specific property like <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the default script will affect this face.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="increase-x-height">increase-x-height</h3>
+
+<p>For ppem values in the range 6&nbsp;&lt;= ppem &lt;= &lsquo;increase-x-height&rsquo;, round up the font's x&nbsp;height much more often than normally. If the value is set to&nbsp;0, which is the default, this feature is switched off. Use this property to improve the legibility of small font sizes if necessary.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Face face;
+ FT_Prop_IncreaseXHeight prop;
+
+
+ FT_Init_FreeType( &amp;library );
+ FT_New_Face( library, "foo.ttf", 0, &amp;face );
+ FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
+
+ prop.face = face;
+ prop.limit = 14;
+
+ FT_Property_Set( library, "autofitter",
+ "increase-x-height", &amp;prop );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>Set this value right after calling <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, but before loading any glyph (using the auto-hinter).</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</h3>
+<p>Defined in FT_AUTOHINTER_H (ftautoh.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_IncreaseXHeight_
+ {
+ <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face;
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> limit;
+
+ } <b>FT_Prop_IncreaseXHeight</b>;
+</pre>
+
+<p>The data exchange structure for the <a href="ft2-auto_hinter.html#increase-x-height">increase-x-height</a> property.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+</body>
+</html>
diff --git a/docs/reference/ft2-base_interface.html b/docs/reference/ft2-base_interface.html
index 8c918ea..4547b6f 100644
--- a/docs/reference/ft2-base_interface.html
+++ b/docs/reference/ft2-base_interface.html
@@ -3,518 +3,393 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Base Interface
-</h1></center>
+<h1>Base Interface</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Library">FT_Library</a></td><td></td><td><a href="#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td></td><td><a href="#FT_Load_Char">FT_Load_Char</a></td></tr>
-<tr><td></td><td><a href="#FT_Face">FT_Face</a></td><td></td><td><a href="#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td><td></td><td><a href="#FT_LOAD_XXX">FT_LOAD_XXX</a></td></tr>
-<tr><td></td><td><a href="#FT_Size">FT_Size</a></td><td></td><td><a href="#FT_Size_Internal">FT_Size_Internal</a></td><td></td><td><a href="#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td></tr>
-<tr><td></td><td><a href="#FT_GlyphSlot">FT_GlyphSlot</a></td><td></td><td><a href="#FT_Size_Metrics">FT_Size_Metrics</a></td><td></td><td><a href="#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td></tr>
-<tr><td></td><td><a href="#FT_CharMap">FT_CharMap</a></td><td></td><td><a href="#FT_SizeRec">FT_SizeRec</a></td><td></td><td><a href="#FT_Set_Transform">FT_Set_Transform</a></td></tr>
-<tr><td></td><td><a href="#FT_Encoding">FT_Encoding</a></td><td></td><td><a href="#FT_SubGlyph">FT_SubGlyph</a></td><td></td><td><a href="#FT_Render_Mode">FT_Render_Mode</a></td></tr>
-<tr><td></td><td><a href="#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td></td><td><a href="#FT_Slot_Internal">FT_Slot_Internal</a></td><td></td><td><a href="#ft_render_mode_xxx">ft_render_mode_xxx</a></td></tr>
-<tr><td></td><td><a href="#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td></td><td><a href="#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td></td><td><a href="#FT_Render_Glyph">FT_Render_Glyph</a></td></tr>
-<tr><td></td><td><a href="#FT_Module">FT_Module</a></td><td></td><td><a href="#FT_Init_FreeType">FT_Init_FreeType</a></td><td></td><td><a href="#FT_Kerning_Mode">FT_Kerning_Mode</a></td></tr>
-<tr><td></td><td><a href="#FT_Driver">FT_Driver</a></td><td></td><td><a href="#FT_Done_FreeType">FT_Done_FreeType</a></td><td></td><td><a href="#ft_kerning_default">ft_kerning_default</a></td></tr>
-<tr><td></td><td><a href="#FT_Renderer">FT_Renderer</a></td><td></td><td><a href="#FT_OPEN_XXX">FT_OPEN_XXX</a></td><td></td><td><a href="#ft_kerning_unfitted">ft_kerning_unfitted</a></td></tr>
-<tr><td></td><td><a href="#FT_ENC_TAG">FT_ENC_TAG</a></td><td></td><td><a href="#FT_Parameter">FT_Parameter</a></td><td></td><td><a href="#ft_kerning_unscaled">ft_kerning_unscaled</a></td></tr>
-<tr><td></td><td><a href="#ft_encoding_xxx">ft_encoding_xxx</a></td><td></td><td><a href="#FT_Open_Args">FT_Open_Args</a></td><td></td><td><a href="#FT_Get_Kerning">FT_Get_Kerning</a></td></tr>
-<tr><td></td><td><a href="#FT_CharMapRec">FT_CharMapRec</a></td><td></td><td><a href="#FT_New_Face">FT_New_Face</a></td><td></td><td><a href="#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td></tr>
-<tr><td></td><td><a href="#FT_Face_Internal">FT_Face_Internal</a></td><td></td><td><a href="#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td></td><td><a href="#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td></tr>
-<tr><td></td><td><a href="#FT_FaceRec">FT_FaceRec</a></td><td></td><td><a href="#FT_Open_Face">FT_Open_Face</a></td><td></td><td><a href="#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td></tr>
-<tr><td></td><td><a href="#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td><td></td><td><a href="#FT_Attach_File">FT_Attach_File</a></td><td></td><td><a href="#FT_Select_Charmap">FT_Select_Charmap</a></td></tr>
-<tr><td></td><td><a href="#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td></td><td><a href="#FT_Attach_Stream">FT_Attach_Stream</a></td><td></td><td><a href="#FT_Set_Charmap">FT_Set_Charmap</a></td></tr>
-<tr><td></td><td><a href="#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td></td><td><a href="#FT_Reference_Face">FT_Reference_Face</a></td><td></td><td><a href="#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td></tr>
-<tr><td></td><td><a href="#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td></td><td><a href="#FT_Done_Face">FT_Done_Face</a></td><td></td><td><a href="#FT_Get_Char_Index">FT_Get_Char_Index</a></td></tr>
-<tr><td></td><td><a href="#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td></td><td><a href="#FT_Select_Size">FT_Select_Size</a></td><td></td><td><a href="#FT_Get_First_Char">FT_Get_First_Char</a></td></tr>
-<tr><td></td><td><a href="#FT_IS_SFNT">FT_IS_SFNT</a></td><td></td><td><a href="#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td></td><td><a href="#FT_Get_Next_Char">FT_Get_Next_Char</a></td></tr>
-<tr><td></td><td><a href="#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td></td><td><a href="#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td></td><td><a href="#FT_Get_Name_Index">FT_Get_Name_Index</a></td></tr>
-<tr><td></td><td><a href="#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td></td><td><a href="#FT_Size_Request">FT_Size_Request</a></td><td></td><td><a href="#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
-<tr><td></td><td><a href="#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td><td></td><td><a href="#FT_Request_Size">FT_Request_Size</a></td><td></td><td><a href="#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td></tr>
-<tr><td></td><td><a href="#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td></td><td><a href="#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td></td><td><a href="#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td></tr>
-<tr><td></td><td><a href="#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td></td><td><a href="#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td></td><td><a href="#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td></tr>
-<tr><td></td><td><a href="#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td></td><td><a href="#FT_Load_Glyph">FT_Load_Glyph</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
-<p>This section describes the public high-level API of FreeType&nbsp;2.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Library">FT_Library</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
+<table class="synopsis">
+<tr><td><a href="#FT_Library">FT_Library</a></td><td><a href="#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="#FT_LOAD_COLOR">FT_LOAD_COLOR</a></td></tr>
+<tr><td><a href="#FT_Face">FT_Face</a></td><td><a href="#FT_SubGlyph">FT_SubGlyph</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Size">FT_Size</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_VERTICAL_LAYOUT">FT_LOAD_VERTICAL_LAYOUT</a></td></tr>
+<tr><td><a href="#FT_GlyphSlot">FT_GlyphSlot</a></td><td><a href="#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="#FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</a></td></tr>
+<tr><td><a href="#FT_CharMap">FT_CharMap</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</a></td></tr>
+<tr><td><a href="#FT_Encoding">FT_Encoding</a></td><td><a href="#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="#FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</a></td></tr>
+<tr><td><a href="#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="#FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</a></td></tr>
+<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_FaceRec">FT_FaceRec</a></td><td><a href="#FT_New_Face">FT_New_Face</a></td><td><a href="#FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Done_Face">FT_Done_Face</a></td><td><a href="#FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a></td><td><a href="#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="#FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="#FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="#FT_Open_Face">FT_Open_Face</a></td><td><a href="#FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="#FT_Open_Args">FT_Open_Args</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</a></td><td><a href="#FT_Parameter">FT_Parameter</a></td><td><a href="#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a></td><td><a href="#FT_Attach_File">FT_Attach_File</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</a></td><td><a href="#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="#FT_Render_Glyph">FT_Render_Glyph</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a></td><td>&nbsp;</td><td><a href="#FT_Render_Mode">FT_Render_Mode</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a></td><td><a href="#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="#FT_Get_Kerning">FT_Get_Kerning</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</a></td><td><a href="#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="#FT_Kerning_Mode">FT_Kerning_Mode</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="#FT_Request_Size">FT_Request_Size</a></td><td><a href="#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="#FT_Select_Size">FT_Select_Size</a></td><td><a href="#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</a></td><td><a href="#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a></td><td><a href="#FT_Size_Request">FT_Size_Request</a></td><td><a href="#FT_CharMapRec">FT_CharMapRec</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="#FT_Select_Charmap">FT_Select_Charmap</a></td></tr>
+<tr><td><a href="#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="#FT_Set_Charmap">FT_Set_Charmap</a></td></tr>
+<tr><td><a href="#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td></tr>
+<tr><td><a href="#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="#FT_Get_First_Char">FT_Get_First_Char</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td></tr>
+<tr><td><a href="#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td></tr>
+<tr><td><a href="#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="#FT_Load_Char">FT_Load_Char</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td>&nbsp;</td><td><a href="#FT_Face_Internal">FT_Face_Internal</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_OPEN_MEMORY">FT_OPEN_MEMORY</a></td><td><a href="#FT_Size_Internal">FT_Size_Internal</a></td></tr>
+<tr><td><a href="#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="#FT_OPEN_STREAM">FT_OPEN_STREAM</a></td><td><a href="#FT_Slot_Internal">FT_Slot_Internal</a></td></tr>
+<tr><td><a href="#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="#FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="#FT_OPEN_DRIVER">FT_OPEN_DRIVER</a></td><td><a href="#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td></tr>
+<tr><td><a href="#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="#FT_OPEN_PARAMS">FT_OPEN_PARAMS</a></td><td><a href="#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td></tr>
+<tr><td><a href="#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td>&nbsp;</td><td><a href="#FT_OPEN_XXX">FT_OPEN_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</a></td><td><a href="#FT_LOAD_XXX">FT_LOAD_XXX</a></td></tr>
+<tr><td><a href="#FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</a></td><td><a href="#FT_LOAD_RENDER">FT_LOAD_RENDER</a></td><td><a href="#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td></tr>
+<tr><td><a href="#FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</a></td><td><a href="#FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</a></td><td><a href="#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td></tr>
+<tr><td><a href="#FT_SizeRec">FT_SizeRec</a></td><td><a href="#FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="#FT_LOAD_NO_HINTING">FT_LOAD_NO_HINTING</a></td><td><a href="#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_LOAD_NO_BITMAP">FT_LOAD_NO_BITMAP</a></td><td></td></tr>
+<tr><td><a href="#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="#FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</a></td><td></td></tr>
+</table>
+
+
+<p>This section describes the most important public high-level API functions of FreeType&nbsp;2.</p>
+
+<div class="section">
+<h3 id="FT_Library">FT_Library</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_LibraryRec_ *<b>FT_Library</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a FreeType library instance. Each &lsquo;library&rsquo; is completely independent from the others; it is the &lsquo;root&rsquo; of a set of objects like fonts, faces, sizes, etc.</p>
<p>It also embeds a memory manager (see <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>), as well as a scan-line converter object (see <a href="ft2-raster.html#FT_Raster">FT_Raster</a>).</p>
-<p>For multi-threading applications each thread should have its own FT_Library object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>Library objects are normally created by <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a>, and destroyed with <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Face">FT_Face</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>In multi-threaded applications, make sure that the same FT_Library object or any of its children doesn't get accessed in parallel.</p>
+
+<h4>note</h4>
+<p>Library objects are normally created by <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a>, and destroyed with <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a>. If you need reference-counting (cf. <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>), use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> and <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a>.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Face">FT_Face</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_FaceRec_* <b>FT_Face</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a given typographic face object. A face object models a given typeface, in a given style.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Each face object also owns a single <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> object, as well as one or more <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects.</p>
<p>Use <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to create a new face object from a given filepathname or a custom input stream.</p>
<p>Use <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> to destroy it (along with its slot and sizes).</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>also</b></em></td></tr><tr><td>
+
+<h4>also</h4>
<p>See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the publicly accessible fields of a given face object.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Size">FT_Size</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Size">FT_Size</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SizeRec_* <b>FT_Size</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to an object used to model a face scaled to a given character size.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>Each <a href="ft2-base_interface.html#FT_Face">FT_Face</a> has an <i>active</i> <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object that is used by functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to determine the scaling transformation which is used to load and hint glyphs and metrics.</p>
+
+<h4>note</h4>
+<p>Each <a href="ft2-base_interface.html#FT_Face">FT_Face</a> has an <i>active</i> <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object that is used by functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to determine the scaling transformation that in turn is used to load and hint glyphs and metrics.</p>
<p>You can use <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a>, <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> or even <a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a> to change the content (i.e., the scaling values) of the active <a href="ft2-base_interface.html#FT_Size">FT_Size</a>.</p>
<p>You can use <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> to create additional size objects for a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a>, but they won't be used by other functions until you activate it through <a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a>. Only one size can be activated at any given time per face.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>also</b></em></td></tr><tr><td>
+
+<h4>also</h4>
<p>See <a href="ft2-base_interface.html#FT_SizeRec">FT_SizeRec</a> for the publicly accessible fields of a given size object.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GlyphSlot">FT_GlyphSlot</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_GlyphSlot">FT_GlyphSlot</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphSlotRec_* <b>FT_GlyphSlot</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a given &lsquo;glyph slot&rsquo;. A slot is a container where it is possible to load any of the glyphs contained in its parent face.</p>
<p>In other words, each time you call <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>, the slot's content is erased by the new glyph data, i.e., the glyph's metrics, its image (bitmap or outline), and other control information.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>also</b></em></td></tr><tr><td>
+
+<h4>also</h4>
<p>See <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> for the publicly accessible glyph fields.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CharMap">FT_CharMap</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_CharMap">FT_CharMap</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_CharMapRec_* <b>FT_CharMap</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a given character map. A charmap is used to translate character codes in a given encoding into glyph indexes for its parent's face. Some font formats may provide several charmaps per font.</p>
<p>Each face object owns zero or more charmaps, but only one of them can be &lsquo;active&rsquo; and used by <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>.</p>
<p>The list of available charmaps in a face is available through the &lsquo;face-&gt;num_charmaps&rsquo; and &lsquo;face-&gt;charmaps&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
<p>The currently active charmap is available as &lsquo;face-&gt;charmap&rsquo;. You should call <a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a> to change it.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>When a new face is created (either through <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>), the library looks for a Unicode charmap within the list and automatically activates it.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>also</b></em></td></tr><tr><td>
+
+<h4>also</h4>
<p>See <a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a> for the publicly accessible fields of a given character map.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Encoding">FT_Encoding</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Encoding">FT_Encoding</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Encoding_
{
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_NONE</a>, 0, 0, 0, 0 ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_NONE">FT_ENCODING_NONE</a>, 0, 0, 0, 0 ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a>, 's', 'y', 'm', 'b' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a>, 'u', 'n', 'i', 'c' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_MS_SYMBOL">FT_ENCODING_MS_SYMBOL</a>, 's', 'y', 'm', 'b' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_UNICODE">FT_ENCODING_UNICODE</a>, 'u', 'n', 'i', 'c' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a>, 's', 'j', 'i', 's' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a>, 'g', 'b', ' ', ' ' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a>, 'b', 'i', 'g', '5' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a>, 'w', 'a', 'n', 's' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a>, 'j', 'o', 'h', 'a' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>, 's', 'j', 'i', 's' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_GB2312">FT_ENCODING_GB2312</a>, 'g', 'b', ' ', ' ' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>, 'b', 'i', 'g', '5' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>, 'w', 'a', 'n', 's' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>, 'j', 'o', 'h', 'a' ),
/* for backwards compatibility */
- <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SJIS</a> = <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a>,
- <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_GB2312</a> = <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a>,
- <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_BIG5</a> = <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a>,
- <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_WANSUNG</a> = <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a>,
- <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_JOHAB</a> = <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a>,
+ <a href="ft2-base_interface.html#FT_ENCODING_MS_SJIS">FT_ENCODING_MS_SJIS</a> = <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>,
+ <a href="ft2-base_interface.html#FT_ENCODING_MS_GB2312">FT_ENCODING_MS_GB2312</a> = <a href="ft2-base_interface.html#FT_ENCODING_GB2312">FT_ENCODING_GB2312</a>,
+ <a href="ft2-base_interface.html#FT_ENCODING_MS_BIG5">FT_ENCODING_MS_BIG5</a> = <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>,
+ <a href="ft2-base_interface.html#FT_ENCODING_MS_WANSUNG">FT_ENCODING_MS_WANSUNG</a> = <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>,
+ <a href="ft2-base_interface.html#FT_ENCODING_MS_JOHAB">FT_ENCODING_MS_JOHAB</a> = <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>,
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_STANDARD</a>, 'A', 'D', 'O', 'B' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_EXPERT</a>, 'A', 'D', 'B', 'E' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_CUSTOM</a>, 'A', 'D', 'B', 'C' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_LATIN_1</a>, 'l', 'a', 't', '1' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_STANDARD">FT_ENCODING_ADOBE_STANDARD</a>, 'A', 'D', 'O', 'B' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_EXPERT">FT_ENCODING_ADOBE_EXPERT</a>, 'A', 'D', 'B', 'E' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_CUSTOM">FT_ENCODING_ADOBE_CUSTOM</a>, 'A', 'D', 'B', 'C' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_LATIN_1">FT_ENCODING_ADOBE_LATIN_1</a>, 'l', 'a', 't', '1' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_OLD_LATIN_2</a>, 'l', 'a', 't', '2' ),
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_OLD_LATIN_2">FT_ENCODING_OLD_LATIN_2</a>, 'l', 'a', 't', '2' ),
- <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_APPLE_ROMAN</a>, 'a', 'r', 'm', 'n' )
+ <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_APPLE_ROMAN">FT_ENCODING_APPLE_ROMAN</a>, 'a', 'r', 'm', 'n' )
} <b>FT_Encoding</b>;
-</pre></table><br>
-<table align=center width="87%"><tr><td>
+
+ /* these constants are deprecated; use the corresponding `<b>FT_Encoding</b>' */
+ /* values instead */
+#define ft_encoding_none <a href="ft2-base_interface.html#FT_ENCODING_NONE">FT_ENCODING_NONE</a>
+#define ft_encoding_unicode <a href="ft2-base_interface.html#FT_ENCODING_UNICODE">FT_ENCODING_UNICODE</a>
+#define ft_encoding_symbol <a href="ft2-base_interface.html#FT_ENCODING_MS_SYMBOL">FT_ENCODING_MS_SYMBOL</a>
+#define ft_encoding_latin_1 <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_LATIN_1">FT_ENCODING_ADOBE_LATIN_1</a>
+#define ft_encoding_latin_2 <a href="ft2-base_interface.html#FT_ENCODING_OLD_LATIN_2">FT_ENCODING_OLD_LATIN_2</a>
+#define ft_encoding_sjis <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>
+#define ft_encoding_gb2312 <a href="ft2-base_interface.html#FT_ENCODING_GB2312">FT_ENCODING_GB2312</a>
+#define ft_encoding_big5 <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>
+#define ft_encoding_wansung <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>
+#define ft_encoding_johab <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>
+
+#define ft_encoding_adobe_standard <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_STANDARD">FT_ENCODING_ADOBE_STANDARD</a>
+#define ft_encoding_adobe_expert <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_EXPERT">FT_ENCODING_ADOBE_EXPERT</a>
+#define ft_encoding_adobe_custom <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_CUSTOM">FT_ENCODING_ADOBE_CUSTOM</a>
+#define ft_encoding_apple_roman <a href="ft2-base_interface.html#FT_ENCODING_APPLE_ROMAN">FT_ENCODING_APPLE_ROMAN</a>
+</pre>
+
<p>An enumeration used to specify character sets supported by charmaps. Used in the <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a> API function.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Despite the name, this enumeration lists specific character repertories (i.e., charsets), and not text encoding methods (e.g., UTF-8, UTF-16, etc.).</p>
<p>Other encodings might be defined in the future.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_ENCODING_NONE</b></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_ENCODING_NONE">FT_ENCODING_NONE</td><td class="desc">
<p>The encoding value&nbsp;0 is reserved.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_UNICODE</b></td><td>
+<tr><td class="val" id="FT_ENCODING_UNICODE">FT_ENCODING_UNICODE</td><td class="desc">
<p>Corresponds to the Unicode character set. This value covers all versions of the Unicode repertoire, including ASCII and Latin-1. Most fonts include a Unicode charmap, but not all of them.</p>
<p>For example, if you want to access Unicode value U+1F028 (and the font contains it), use value 0x1F028 as the input value for <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a>.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_MS_SYMBOL</b></td><td>
-<p>Corresponds to the Microsoft Symbol encoding, used to encode mathematical symbols in the 32..255 character code range. For more information, see &lsquo;http://www.ceviz.net/symbol.htm&rsquo;.</p>
+<tr><td class="val" id="FT_ENCODING_MS_SYMBOL">FT_ENCODING_MS_SYMBOL</td><td class="desc">
+<p>Corresponds to the Microsoft Symbol encoding, used to encode mathematical symbols in the 32..255 character code range. For more information, see &lsquo;<a href="http://www.kostis.net/charsets/symbol.htm">http://www.kostis.net/charsets/symbol.htm</a>&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_SJIS</b></td><td>
-<p>Corresponds to Japanese SJIS encoding. More info at at &lsquo;http://langsupport.japanreference.com/encoding.shtml&rsquo;. See note on multi-byte encodings below.</p>
+<tr><td class="val" id="FT_ENCODING_SJIS">FT_ENCODING_SJIS</td><td class="desc">
+<p>Corresponds to Japanese SJIS encoding. More info at at &lsquo;<a href="http://en.wikipedia.org/wiki/Shift_JIS">http://en.wikipedia.org/wiki/Shift_JIS</a>&rsquo;. See note on multi-byte encodings below.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_GB2312</b></td><td>
+<tr><td class="val" id="FT_ENCODING_GB2312">FT_ENCODING_GB2312</td><td class="desc">
<p>Corresponds to an encoding system for Simplified Chinese as used used in mainland China.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_BIG5</b></td><td>
+<tr><td class="val" id="FT_ENCODING_BIG5">FT_ENCODING_BIG5</td><td class="desc">
<p>Corresponds to an encoding system for Traditional Chinese as used in Taiwan and Hong Kong.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_WANSUNG</b></td><td>
-<p>Corresponds to the Korean encoding system known as Wansung. For more information see &lsquo;http://www.microsoft.com/typography/unicode/949.txt&rsquo;.</p>
+<tr><td class="val" id="FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</td><td class="desc">
+<p>Corresponds to the Korean encoding system known as Wansung. For more information see &lsquo;<a href="http://msdn.microsoft.com/en-US/goglobal/cc305154">http://msdn.microsoft.com/en-US/goglobal/cc305154</a>&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_JOHAB</b></td><td>
+<tr><td class="val" id="FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</td><td class="desc">
<p>The Korean standard character set (KS&nbsp;C 5601-1992), which corresponds to MS Windows code page 1361. This character set includes all possible Hangeul character combinations.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_ENCODING_ADOBE_LATIN_1</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_ENCODING_ADOBE_LATIN_1">FT_ENCODING_ADOBE_LATIN_1</td><td class="desc">
<p>Corresponds to a Latin-1 encoding as defined in a Type&nbsp;1 PostScript font. It is limited to 256 character codes.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_ENCODING_ADOBE_STANDARD</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_ENCODING_ADOBE_STANDARD">FT_ENCODING_ADOBE_STANDARD</td><td class="desc">
<p>Corresponds to the Adobe Standard encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_ENCODING_ADOBE_EXPERT</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_ENCODING_ADOBE_EXPERT">FT_ENCODING_ADOBE_EXPERT</td><td class="desc">
<p>Corresponds to the Adobe Expert encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_ENCODING_ADOBE_CUSTOM</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_ENCODING_ADOBE_CUSTOM">FT_ENCODING_ADOBE_CUSTOM</td><td class="desc">
<p>Corresponds to a custom encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_ENCODING_APPLE_ROMAN</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_ENCODING_APPLE_ROMAN">FT_ENCODING_APPLE_ROMAN</td><td class="desc">
<p>Corresponds to the 8-bit Apple roman encoding. Many TrueType and OpenType fonts contain a charmap for this encoding, since older versions of Mac OS are able to use it.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_ENCODING_OLD_LATIN_2</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_ENCODING_OLD_LATIN_2">FT_ENCODING_OLD_LATIN_2</td><td class="desc">
<p>This value is deprecated and was never used nor reported by FreeType. Don't use or test for it.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_MS_SJIS</b></td><td>
+<tr><td class="val" id="FT_ENCODING_MS_SJIS">FT_ENCODING_MS_SJIS</td><td class="desc">
<p>Same as FT_ENCODING_SJIS. Deprecated.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_MS_GB2312</b></td><td>
+<tr><td class="val" id="FT_ENCODING_MS_GB2312">FT_ENCODING_MS_GB2312</td><td class="desc">
<p>Same as FT_ENCODING_GB2312. Deprecated.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_MS_BIG5</b></td><td>
+<tr><td class="val" id="FT_ENCODING_MS_BIG5">FT_ENCODING_MS_BIG5</td><td class="desc">
<p>Same as FT_ENCODING_BIG5. Deprecated.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_MS_WANSUNG</b></td><td>
+<tr><td class="val" id="FT_ENCODING_MS_WANSUNG">FT_ENCODING_MS_WANSUNG</td><td class="desc">
<p>Same as FT_ENCODING_WANSUNG. Deprecated.</p>
</td></tr>
-<tr valign=top><td><b>FT_ENCODING_MS_JOHAB</b></td><td>
+<tr><td class="val" id="FT_ENCODING_MS_JOHAB">FT_ENCODING_MS_JOHAB</td><td class="desc">
<p>Same as FT_ENCODING_JOHAB. Deprecated.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>By default, FreeType automatically synthesizes a Unicode charmap for PostScript fonts, using their glyph names dictionaries. However, it also reports the encodings defined explicitly in the font file, for the cases when they are needed, with the Adobe values as well.</p>
<p>FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap is neither Unicode nor ISO-8859-1 (otherwise it is set to FT_ENCODING_UNICODE). Use <a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a> to find out which encoding is really present. If, for example, the &lsquo;cs_registry&rsquo; field is &lsquo;KOI8&rsquo; and the &lsquo;cs_encoding&rsquo; field is &lsquo;R&rsquo;, the font is encoded in KOI8-R.</p>
<p>FT_ENCODING_NONE is always set (with a single exception) by the winfonts driver. Use <a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a> and examine the &lsquo;charset&rsquo; field of the <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a> structure to find out which encoding is really present. For example, <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a> (204) means Windows code page 1251 (for Russian).</p>
<p>FT_ENCODING_NONE is set if &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> and &lsquo;encoding_id&rsquo; is not <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a> (otherwise it is set to FT_ENCODING_APPLE_ROMAN).</p>
-<p>If &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a>, use the function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a> to query the Mac language ID which may be needed to be able to distinguish Apple encoding variants. See</p>
-<p>http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT</p>
+<p>If &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a>, use the function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a> to query the Mac language ID that may be needed to be able to distinguish Apple encoding variants. See</p>
+<p><a href="http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt">http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt</a></p>
<p>to get an idea how to do that. Basically, if the language ID is&nbsp;0, don't use it, otherwise subtract 1 from the language ID. Then examine &lsquo;encoding_id&rsquo;. If, for example, &lsquo;encoding_id&rsquo; is <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a> and the language ID (minus&nbsp;1) is &lsquo;TT_MAC_LANGID_GREEK&rsquo;, it is the Greek encoding, not Roman. <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARABIC</a> with &lsquo;TT_MAC_LANGID_FARSI&rsquo; means the Farsi variant the Arabic encoding.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Glyph_Metrics">FT_Glyph_Metrics</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Glyph_Metrics_
- {
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> width;
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> height;
-
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> horiBearingX;
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> horiBearingY;
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> horiAdvance;
-
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> vertBearingX;
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> vertBearingY;
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> vertAdvance;
-
- } <b>FT_Glyph_Metrics</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A structure used to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> has been used while loading the glyph, values are expressed in font units instead.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>width</b></td><td>
-<p>The glyph's width.</p>
-</td></tr>
-<tr valign=top><td><b>height</b></td><td>
-<p>The glyph's height.</p>
-</td></tr>
-<tr valign=top><td><b>horiBearingX</b></td><td>
-<p>Left side bearing for horizontal layout.</p>
-</td></tr>
-<tr valign=top><td><b>horiBearingY</b></td><td>
-<p>Top side bearing for horizontal layout.</p>
-</td></tr>
-<tr valign=top><td><b>horiAdvance</b></td><td>
-<p>Advance width for horizontal layout.</p>
-</td></tr>
-<tr valign=top><td><b>vertBearingX</b></td><td>
-<p>Left side bearing for vertical layout.</p>
-</td></tr>
-<tr valign=top><td><b>vertBearingY</b></td><td>
-<p>Top side bearing for vertical layout. Larger positive values mean further below the vertical glyph origin.</p>
-</td></tr>
-<tr valign=top><td><b>vertAdvance</b></td><td>
-<p>Advance height for vertical layout. Positive values mean the glyph has a positive advance downward.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>If not disabled with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a>, the values represent dimensions of the hinted glyph (in case hinting is applicable).</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Bitmap_Size">FT_Bitmap_Size</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Bitmap_Size_
- {
- <a href="ft2-basic_types.html#FT_Short">FT_Short</a> height;
- <a href="ft2-basic_types.html#FT_Short">FT_Short</a> width;
-
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> size;
-
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> x_ppem;
- <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> y_ppem;
- } <b>FT_Bitmap_Size</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This structure models the metrics of a bitmap strike (i.e., a set of glyphs for a given point size and resolution) in a bitmap font. It is used for the &lsquo;available_sizes&rsquo; field of <a href="ft2-base_interface.html#FT_Face">FT_Face</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>height</b></td><td>
-<p>The vertical distance, in pixels, between two consecutive baselines. It is always positive.</p>
-</td></tr>
-<tr valign=top><td><b>width</b></td><td>
-<p>The average width, in pixels, of all glyphs in the strike.</p>
-</td></tr>
-<tr valign=top><td><b>size</b></td><td>
-<p>The nominal size of the strike in 26.6 fractional points. This field is not very useful.</p>
-</td></tr>
-<tr valign=top><td><b>x_ppem</b></td><td>
-<p>The horizontal ppem (nominal width) in 26.6 fractional pixels.</p>
-</td></tr>
-<tr valign=top><td><b>y_ppem</b></td><td>
-<p>The vertical ppem (nominal height) in 26.6 fractional pixels.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>Windows FNT: The nominal size given in a FNT font is not reliable. Thus when the driver finds it incorrect, it sets &lsquo;size&rsquo; to some calculated values and sets &lsquo;x_ppem&rsquo; and &lsquo;y_ppem&rsquo; to the pixel width and height given in the font, respectively.</p>
-<p>TrueType embedded bitmaps: &lsquo;size&rsquo;, &lsquo;width&rsquo;, and &lsquo;height&rsquo; values are not contained in the bitmap strike itself. They are computed from the global font parameters.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Module">FT_Module</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ModuleRec_* <b>FT_Module</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A handle to a given FreeType module object. Each module can be a font driver, a renderer, or anything else that provides services to the formers.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Driver">FT_Driver</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_DriverRec_* <b>FT_Driver</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A handle to a given FreeType font driver object. Each font driver is a special module capable of creating faces from font files.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Renderer">FT_Renderer</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RendererRec_* <b>FT_Renderer</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A handle to a given FreeType renderer. A renderer is a special module in charge of converting a glyph image to a bitmap, when necessary. Each renderer supports a given glyph image format, and one or more target surface depths.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ENC_TAG">FT_ENC_TAG</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_ENC_TAG">FT_ENC_TAG</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
#ifndef <b>FT_ENC_TAG</b>
#define <b>FT_ENC_TAG</b>( value, a, b, c, d ) \
value = ( ( (<a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>)(a) &lt;&lt; 24 ) | \
@@ -523,127 +398,24 @@ Defined in FT_FREETYPE_H (freetype/freetype.h).
(<a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>)(d) )
#endif /* <b>FT_ENC_TAG</b> */
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This macro converts four-letter tags into an unsigned long. It is used to define &lsquo;encoding&rsquo; identifiers (see <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a>).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this:</p>
<pre class="colored">
#define FT_ENC_TAG( value, a, b, c, d ) value
</pre>
<p>to get a simple enumeration without assigning special numbers.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="ft_encoding_xxx">ft_encoding_xxx</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define ft_encoding_none <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_NONE</a>
-#define ft_encoding_unicode <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a>
-#define ft_encoding_symbol <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a>
-#define ft_encoding_latin_1 <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_LATIN_1</a>
-#define ft_encoding_latin_2 <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_OLD_LATIN_2</a>
-#define ft_encoding_sjis <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a>
-#define ft_encoding_gb2312 <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a>
-#define ft_encoding_big5 <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a>
-#define ft_encoding_wansung <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a>
-#define ft_encoding_johab <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a>
-
-#define ft_encoding_adobe_standard <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_STANDARD</a>
-#define ft_encoding_adobe_expert <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_EXPERT</a>
-#define ft_encoding_adobe_custom <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_CUSTOM</a>
-#define ft_encoding_apple_roman <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_APPLE_ROMAN</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>These constants are deprecated; use the corresponding <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a> values instead.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CharMapRec">FT_CharMapRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_CharMapRec_
- {
- <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face;
- <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a> encoding;
- <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> platform_id;
- <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> encoding_id;
-
- } <b>FT_CharMapRec</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>The base charmap structure.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>A handle to the parent face object.</p>
-</td></tr>
-<tr valign=top><td><b>encoding</b></td><td>
-<p>An <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a> tag identifying the charmap. Use this with <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a>.</p>
-</td></tr>
-<tr valign=top><td><b>platform_id</b></td><td>
-<p>An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and should be emulated for other formats.</p>
-</td></tr>
-<tr valign=top><td><b>encoding_id</b></td><td>
-<p>A platform specific encoding number. This also comes from the TrueType specification and should be emulated similarly.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Face_Internal">FT_Face_Internal</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Face_InternalRec_* <b>FT_Face_Internal</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An opaque handle to an &lsquo;FT_Face_InternalRec&rsquo; structure, used to model private data of a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object.</p>
-<p>This structure might change between releases of FreeType&nbsp;2 and is not generally available to client applications.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_FaceRec">FT_FaceRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_FaceRec">FT_FaceRec</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_FaceRec_
{
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> num_faces;
@@ -687,7 +459,7 @@ Defined in FT_FREETYPE_H (freetype/freetype.h).
/*@private begin */
- <a href="ft2-base_interface.html#FT_Driver">FT_Driver</a> driver;
+ <a href="ft2-module_management.html#FT_Driver">FT_Driver</a> driver;
<a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory;
<a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> stream;
@@ -701,492 +473,292 @@ Defined in FT_FREETYPE_H (freetype/freetype.h).
/*@private end */
} <b>FT_FaceRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>FreeType root face class structure. A face object models a typeface in a font file.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>num_faces</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="num_faces">num_faces</td><td class="desc">
<p>The number of faces in the font file. Some font formats can have multiple faces in a font file.</p>
</td></tr>
-<tr valign=top><td><b>face_index</b></td><td>
+<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>The index of the face in the font file. It is set to&nbsp;0 if there is only one face in the font file.</p>
</td></tr>
-<tr valign=top><td><b>face_flags</b></td><td>
+<tr><td class="val" id="face_flags">face_flags</td><td class="desc">
<p>A set of bit flags that give important information about the face; see <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a> for the details.</p>
</td></tr>
-<tr valign=top><td><b>style_flags</b></td><td>
+<tr><td class="val" id="style_flags">style_flags</td><td class="desc">
<p>A set of bit flags indicating the style of the face; see <a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a> for the details.</p>
</td></tr>
-<tr valign=top><td><b>num_glyphs</b></td><td>
+<tr><td class="val" id="num_glyphs">num_glyphs</td><td class="desc">
<p>The number of glyphs in the face. If the face is scalable and has sbits (see &lsquo;num_fixed_sizes&rsquo;), it is set to the number of outline glyphs.</p>
<p>For CID-keyed fonts, this value gives the highest CID used in the font.</p>
</td></tr>
-<tr valign=top><td><b>family_name</b></td><td>
-<p>The face's family name. This is an ASCII string, usually in English, which describes the typeface's family (like &lsquo;Times New Roman&rsquo;, &lsquo;Bodoni&rsquo;, &lsquo;Garamond&rsquo;, etc). This is a least common denominator used to list fonts. Some formats (TrueType &amp; OpenType) provide localized and Unicode versions of this string. Applications should use the format specific interface to access them. Can be NULL (e.g., in fonts embedded in a PDF file).</p>
+<tr><td class="val" id="family_name">family_name</td><td class="desc">
+<p>The face's family name. This is an ASCII string, usually in English, that describes the typeface's family (like &lsquo;Times New Roman&rsquo;, &lsquo;Bodoni&rsquo;, &lsquo;Garamond&rsquo;, etc). This is a least common denominator used to list fonts. Some formats (TrueType &amp; OpenType) provide localized and Unicode versions of this string. Applications should use the format specific interface to access them. Can be NULL (e.g., in fonts embedded in a PDF file).</p>
</td></tr>
-<tr valign=top><td><b>style_name</b></td><td>
-<p>The face's style name. This is an ASCII string, usually in English, which describes the typeface's style (like &lsquo;Italic&rsquo;, &lsquo;Bold&rsquo;, &lsquo;Condensed&rsquo;, etc). Not all font formats provide a style name, so this field is optional, and can be set to NULL. As for &lsquo;family_name&rsquo;, some formats provide localized and Unicode versions of this string. Applications should use the format specific interface to access them.</p>
+<tr><td class="val" id="style_name">style_name</td><td class="desc">
+<p>The face's style name. This is an ASCII string, usually in English, that describes the typeface's style (like &lsquo;Italic&rsquo;, &lsquo;Bold&rsquo;, &lsquo;Condensed&rsquo;, etc). Not all font formats provide a style name, so this field is optional, and can be set to NULL. As for &lsquo;family_name&rsquo;, some formats provide localized and Unicode versions of this string. Applications should use the format specific interface to access them.</p>
</td></tr>
-<tr valign=top><td><b>num_fixed_sizes</b></td><td>
+<tr><td class="val" id="num_fixed_sizes">num_fixed_sizes</td><td class="desc">
<p>The number of bitmap strikes in the face. Even if the face is scalable, there might still be bitmap strikes, which are called &lsquo;sbits&rsquo; in that case.</p>
</td></tr>
-<tr valign=top><td><b>available_sizes</b></td><td>
+<tr><td class="val" id="available_sizes">available_sizes</td><td class="desc">
<p>An array of <a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a> for all bitmap strikes in the face. It is set to NULL if there is no bitmap strike.</p>
</td></tr>
-<tr valign=top><td><b>num_charmaps</b></td><td>
+<tr><td class="val" id="num_charmaps">num_charmaps</td><td class="desc">
<p>The number of charmaps in the face.</p>
</td></tr>
-<tr valign=top><td><b>charmaps</b></td><td>
+<tr><td class="val" id="charmaps">charmaps</td><td class="desc">
<p>An array of the charmaps of the face.</p>
</td></tr>
-<tr valign=top><td><b>generic</b></td><td>
+<tr><td class="val" id="generic">generic</td><td class="desc">
<p>A field reserved for client uses. See the <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a> type description.</p>
</td></tr>
-<tr valign=top><td><b>bbox</b></td><td>
-<p>The font bounding box. Coordinates are expressed in font units (see &lsquo;units_per_EM&rsquo;). The box is large enough to contain any glyph from the font. Thus, &lsquo;bbox.yMax&rsquo; can be seen as the &lsquo;maximal ascender&rsquo;, and &lsquo;bbox.yMin&rsquo; as the &lsquo;minimal descender&rsquo;. Only relevant for scalable formats.</p>
+<tr><td class="val" id="bbox">bbox</td><td class="desc">
+<p>The font bounding box. Coordinates are expressed in font units (see &lsquo;units_per_EM&rsquo;). The box is large enough to contain any glyph from the font. Thus, &lsquo;bbox.yMax&rsquo; can be seen as the &lsquo;maximum ascender&rsquo;, and &lsquo;bbox.yMin&rsquo; as the &lsquo;minimum descender&rsquo;. Only relevant for scalable formats.</p>
<p>Note that the bounding box might be off by (at least) one pixel for hinted fonts. See <a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a> for further discussion.</p>
</td></tr>
-<tr valign=top><td><b>units_per_EM</b></td><td>
+<tr><td class="val" id="units_per_EM">units_per_EM</td><td class="desc">
<p>The number of font units per EM square for this face. This is typically 2048 for TrueType fonts, and 1000 for Type&nbsp;1 fonts. Only relevant for scalable formats.</p>
</td></tr>
-<tr valign=top><td><b>ascender</b></td><td>
+<tr><td class="val" id="ascender">ascender</td><td class="desc">
<p>The typographic ascender of the face, expressed in font units. For font formats not having this information, it is set to &lsquo;bbox.yMax&rsquo;. Only relevant for scalable formats.</p>
</td></tr>
-<tr valign=top><td><b>descender</b></td><td>
+<tr><td class="val" id="descender">descender</td><td class="desc">
<p>The typographic descender of the face, expressed in font units. For font formats not having this information, it is set to &lsquo;bbox.yMin&rsquo;. Note that this field is usually negative. Only relevant for scalable formats.</p>
</td></tr>
-<tr valign=top><td><b>height</b></td><td>
-<p>The height is the vertical distance between two consecutive baselines, expressed in font units. It is always positive. Only relevant for scalable formats.</p>
+<tr><td class="val" id="height">height</td><td class="desc">
+<p>This value is the vertical distance between two consecutive baselines, expressed in font units. It is always positive. Only relevant for scalable formats.</p>
+<p>If you want the global glyph height, use &lsquo;ascender - descender&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>max_advance_width</b></td><td>
-<p>The maximal advance width, in font units, for all glyphs in this face. This can be used to make word wrapping computations faster. Only relevant for scalable formats.</p>
+<tr><td class="val" id="max_advance_width">max_advance_width</td><td class="desc">
+<p>The maximum advance width, in font units, for all glyphs in this face. This can be used to make word wrapping computations faster. Only relevant for scalable formats.</p>
</td></tr>
-<tr valign=top><td><b>max_advance_height</b></td><td>
-<p>The maximal advance height, in font units, for all glyphs in this face. This is only relevant for vertical layouts, and is set to &lsquo;height&rsquo; for fonts that do not provide vertical metrics. Only relevant for scalable formats.</p>
+<tr><td class="val" id="max_advance_height">max_advance_height</td><td class="desc">
+<p>The maximum advance height, in font units, for all glyphs in this face. This is only relevant for vertical layouts, and is set to &lsquo;height&rsquo; for fonts that do not provide vertical metrics. Only relevant for scalable formats.</p>
</td></tr>
-<tr valign=top><td><b>underline_position</b></td><td>
+<tr><td class="val" id="underline_position">underline_position</td><td class="desc">
<p>The position, in font units, of the underline line for this face. It is the center of the underlining stem. Only relevant for scalable formats.</p>
</td></tr>
-<tr valign=top><td><b>underline_thickness</b></td><td>
+<tr><td class="val" id="underline_thickness">underline_thickness</td><td class="desc">
<p>The thickness, in font units, of the underline for this face. Only relevant for scalable formats.</p>
</td></tr>
-<tr valign=top><td><b>glyph</b></td><td>
+<tr><td class="val" id="glyph">glyph</td><td class="desc">
<p>The face's associated glyph slot(s).</p>
</td></tr>
-<tr valign=top><td><b>size</b></td><td>
+<tr><td class="val" id="size">size</td><td class="desc">
<p>The current active size for this face.</p>
</td></tr>
-<tr valign=top><td><b>charmap</b></td><td>
+<tr><td class="val" id="charmap">charmap</td><td class="desc">
<p>The current active charmap for this face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Fields may be changed after a call to <a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a> or <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a> ( 1L &lt;&lt; 0 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a> ( 1L &lt;&lt; 1 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_WIDTH</a> ( 1L &lt;&lt; 2 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a> ( 1L &lt;&lt; 3 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a> ( 1L &lt;&lt; 4 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a> ( 1L &lt;&lt; 5 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a> ( 1L &lt;&lt; 6 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FAST_GLYPHS</a> ( 1L &lt;&lt; 7 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_MULTIPLE_MASTERS</a> ( 1L &lt;&lt; 8 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_GLYPH_NAMES</a> ( 1L &lt;&lt; 9 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_EXTERNAL_STREAM</a> ( 1L &lt;&lt; 10 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a> ( 1L &lt;&lt; 11 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a> ( 1L &lt;&lt; 12 )
-#define <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a> ( 1L &lt;&lt; 13 )
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of bit flags used in the &lsquo;face_flags&rsquo; field of the <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> structure. They inform client applications of properties of the corresponding face.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_FACE_FLAG_SCALABLE</b></td><td>
-<p>Indicates that the face contains outline glyphs. This doesn't prevent bitmap strikes, i.e., a face can have both this and and <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a> set.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_FACE_FLAG_FIXED_SIZES</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Indicates that the face contains bitmap strikes. See also the &lsquo;num_fixed_sizes&rsquo; and &lsquo;available_sizes&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_FACE_FLAG_FIXED_WIDTH</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Indicates that the face contains fixed-width characters (like Courier, Lucido, MonoType, etc.).</p>
-</td></tr>
-<tr valign=top><td><b>FT_FACE_FLAG_SFNT</b></td><td>
-<p>Indicates that the face uses the &lsquo;sfnt&rsquo; storage scheme. For now, this means TrueType and OpenType.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_FACE_FLAG_HORIZONTAL</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Indicates that the face contains horizontal glyph metrics. This should be set for all common formats.</p>
-</td></tr>
-<tr valign=top><td><b>FT_FACE_FLAG_VERTICAL</b></td><td>
-<p>Indicates that the face contains vertical glyph metrics. This is only available in some formats, not all of them.</p>
-</td></tr>
-<tr valign=top><td><b>FT_FACE_FLAG_KERNING</b></td><td>
-<p>Indicates that the face contains kerning information. If set, the kerning distance can be retrieved through the function <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>. Otherwise the function always return the vector (0,0). Note that FreeType doesn't handle kerning data from the &lsquo;GPOS&rsquo; table (as present in some OpenType fonts).</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_FACE_FLAG_FAST_GLYPHS</b></td></tr>
-<tr valign=top><td></td><td>
-<p>THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_FACE_FLAG_MULTIPLE_MASTERS</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Indicates that the font contains multiple masters and is capable of interpolating between them. See the multiple-masters specific API for details.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_FACE_FLAG_GLYPH_NAMES</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Indicates that the font contains glyph names that can be retrieved through <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a>. Note that some TrueType fonts contain broken glyph name tables. Use the function <a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a> when needed.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_FACE_FLAG_EXTERNAL_STREAM</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Used internally by FreeType to indicate that a face's stream was provided by the client application and should not be destroyed when <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> is called. Don't read or test this flag.</p>
-</td></tr>
-<tr valign=top><td><b>FT_FACE_FLAG_HINTER</b></td><td>
-<p>Set if the font driver has a hinting machine of its own. For example, with TrueType fonts, it makes sense to use data from the SFNT &lsquo;gasp&rsquo; table only if the native TrueType hinting engine (with the bytecode interpreter) is available and active.</p>
-</td></tr>
-<tr valign=top><td><b>FT_FACE_FLAG_CID_KEYED</b></td><td>
-<p>Set if the font is CID-keyed. In that case, the font is not accessed by glyph indices but by CID values. For subsetted CID-keyed fonts this has the consequence that not all index values are a valid argument to FT_Load_Glyph. Only the CID values for which corresponding glyphs in the subsetted font exist make FT_Load_Glyph return successfully; in all other cases you get an &lsquo;FT_Err_Invalid_Argument&rsquo; error.</p>
-<p>Note that CID-keyed fonts which are in an SFNT wrapper don't have this flag set since the glyphs are accessed in the normal way (using contiguous indices); the &lsquo;CID-ness&rsquo; isn't visible to the application.</p>
-</td></tr>
-<tr valign=top><td><b>FT_FACE_FLAG_TRICKY</b></td><td>
-<p>Set if the font is &lsquo;tricky&rsquo;, this is, it always needs the font format's native hinting engine to get a reasonable result. A typical example is the Chinese font &lsquo;mingli.ttf&rsquo; which uses TrueType bytecode instructions to move and scale all of its subglyphs.</p>
-<p>It is not possible to autohint such fonts using <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>; it will also ignore <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a>. You have to set both <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a> to really disable hinting; however, you probably never want this except for demonstration purposes.</p>
-<p>Currently, there are about a dozen TrueType fonts in the list of tricky fonts; they are hard-coded in file &lsquo;ttobjs.c&rsquo;.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
#define <b>FT_HAS_HORIZONTAL</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a> )
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</a> )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro that returns true whenever a face object contains horizontal metrics (this is true for all font formats though).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>also</b></em></td></tr><tr><td>
-<p><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a> can be used to check for vertical metrics.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-#define <b>FT_HAS_VERTICAL</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a> )
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A macro that returns true whenever a face object contains vertical metrics.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_HAS_KERNING">FT_HAS_KERNING</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>also</h4>
+<p><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a> can be used to check for vertical metrics.</p>
-#define <b>FT_HAS_KERNING</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a> )
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A macro that returns true whenever a face object contains kerning data that can be accessed with <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_IS_SCALABLE">FT_IS_SCALABLE</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_HAS_VERTICAL">FT_HAS_VERTICAL</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <b>FT_HAS_VERTICAL</b>( face ) \
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</a> )
+</pre>
-#define <b>FT_IS_SCALABLE</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a> )
+<p>A macro that returns true whenever a face object contains real vertical metrics (and not only synthesized ones).</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A macro that returns true whenever a face object contains a scalable font face (true for TrueType, Type&nbsp;1, Type&nbsp;42, CID, OpenType/CFF, and PFR font formats.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_IS_SFNT">FT_IS_SFNT</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_IS_SFNT</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a> )
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A macro that returns true whenever a face object contains a font whose format is based on the SFNT storage scheme. This usually means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded bitmap fonts.</p>
-<p>If this macro is true, all functions defined in <a href="ft2-header_file_macros.html#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a> and <a href="ft2-header_file_macros.html#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a> are available.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_HAS_KERNING">FT_HAS_KERNING</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <b>FT_HAS_KERNING</b>( face ) \
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</a> )
+</pre>
-#define <b>FT_IS_FIXED_WIDTH</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_WIDTH</a> )
+<p>A macro that returns true whenever a face object contains kerning data that can be accessed with <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A macro that returns true whenever a face object contains a font face that contains fixed-width (or &lsquo;monospace&rsquo;, &lsquo;fixed-pitch&rsquo;, etc.) glyphs.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
#define <b>FT_HAS_FIXED_SIZES</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a> )
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</a> )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro that returns true whenever a face object contains some embedded bitmaps. See the &lsquo;available_sizes&rsquo; field of the <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <b>FT_HAS_FAST_GLYPHS</b>( face ) 0
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Deprecated.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
#define <b>FT_HAS_GLYPH_NAMES</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_GLYPH_NAMES</a> )
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</a> )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro that returns true whenever a face object contains some glyph names that can be accessed through <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
#define <b>FT_HAS_MULTIPLE_MASTERS</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_MULTIPLE_MASTERS</a> )
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a> )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro that returns true whenever a face object contains some multiple masters. The functions provided by <a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a> are then available to choose the exact design you want.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_HAS_COLOR">FT_HAS_COLOR</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <b>FT_HAS_COLOR</b>( face ) \
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a> )
+</pre>
+
+<p>A macro that returns true whenever a face object contains tables for color glyphs.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_IS_SFNT">FT_IS_SFNT</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <b>FT_IS_SFNT</b>( face ) \
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</a> )
+</pre>
+
+<p>A macro that returns true whenever a face object contains a font whose format is based on the SFNT storage scheme. This usually means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded bitmap fonts.</p>
+<p>If this macro is true, all functions defined in <a href="ft2-header_file_macros.html#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a> and <a href="ft2-header_file_macros.html#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a> are available.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_IS_SCALABLE">FT_IS_SCALABLE</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <b>FT_IS_SCALABLE</b>( face ) \
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a> )
+</pre>
+
+<p>A macro that returns true whenever a face object contains a scalable font face (true for TrueType, Type&nbsp;1, Type&nbsp;42, CID, OpenType/CFF, and PFR font formats.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <b>FT_IS_FIXED_WIDTH</b>( face ) \
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</a> )
+</pre>
+
+<p>A macro that returns true whenever a face object contains a font face that contains fixed-width (or &lsquo;monospace&rsquo;, &lsquo;fixed-pitch&rsquo;, etc.) glyphs.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_IS_CID_KEYED">FT_IS_CID_KEYED</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
#define <b>FT_IS_CID_KEYED</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a> )
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a> )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro that returns true whenever a face object contains a CID-keyed font. See the discussion of <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a> for more details.</p>
<p>If this macro is true, all functions defined in <a href="ft2-header_file_macros.html#FT_CID_H">FT_CID_H</a> are available.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_IS_TRICKY">FT_IS_TRICKY</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_IS_TRICKY">FT_IS_TRICKY</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
#define <b>FT_IS_TRICKY</b>( face ) \
- ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a> )
+ ( face-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a> )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro that returns true whenever a face represents a &lsquo;tricky&rsquo; font. See the discussion of <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a> for more details.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_ITALIC</a> ( 1 &lt;&lt; 0 )
-#define <a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_BOLD</a> ( 1 &lt;&lt; 1 )
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of bit-flags used to indicate the style of a given face. These are used in the &lsquo;style_flags&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_STYLE_FLAG_ITALIC</b></td><td>
-<p>Indicates that a given face style is italic or oblique.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_SizeRec">FT_SizeRec</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SizeRec_
+ {
+ <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face; /* parent face object */
+ <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a> generic; /* generic pointer for client uses */
+ <a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a> metrics; /* size metrics */
+ <a href="ft2-base_interface.html#FT_Size_Internal">FT_Size_Internal</a> internal;
+
+ } <b>FT_SizeRec</b>;
+</pre>
+
+<p>FreeType root size class structure. A size object models a face object at a given size.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>Handle to the parent face object.</p>
</td></tr>
-<tr valign=top><td><b>FT_STYLE_FLAG_BOLD</b></td><td>
-<p>Indicates that a given face is bold.</p>
+<tr><td class="val" id="generic">generic</td><td class="desc">
+<p>A typeless pointer, unused by the FreeType library or any of its drivers. It can be used by client applications to link their own data to each size object.</p>
+</td></tr>
+<tr><td class="val" id="metrics">metrics</td><td class="desc">
+<p>Metrics for this size object. This field is read-only.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The style information as provided by FreeType is very basic. More details are beyond the scope and should be done on a higher level (for example, by analyzing various fields of the &lsquo;OS/2&rsquo; table in SFNT based fonts).</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Size_Internal">FT_Size_Internal</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Size_InternalRec_* <b>FT_Size_Internal</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An opaque handle to an &lsquo;FT_Size_InternalRec&rsquo; structure, used to model private data of a given <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Size_Metrics">FT_Size_Metrics</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Size_Metrics">FT_Size_Metrics</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Size_Metrics_
{
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> x_ppem; /* horizontal pixels per EM */
@@ -1201,141 +773,51 @@ Defined in FT_FREETYPE_H (freetype/freetype.h).
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> max_advance; /* max horizontal advance, in 26.6 pixels */
} <b>FT_Size_Metrics</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>The size metrics structure gives the metrics of a size object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>x_ppem</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="x_ppem">x_ppem</td><td class="desc">
<p>The width of the scaled EM square in pixels, hence the term &lsquo;ppem&rsquo; (pixels per EM). It is also referred to as &lsquo;nominal width&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>y_ppem</b></td><td>
+<tr><td class="val" id="y_ppem">y_ppem</td><td class="desc">
<p>The height of the scaled EM square in pixels, hence the term &lsquo;ppem&rsquo; (pixels per EM). It is also referred to as &lsquo;nominal height&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>x_scale</b></td><td>
+<tr><td class="val" id="x_scale">x_scale</td><td class="desc">
<p>A 16.16 fractional scaling value used to convert horizontal metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
</td></tr>
-<tr valign=top><td><b>y_scale</b></td><td>
+<tr><td class="val" id="y_scale">y_scale</td><td class="desc">
<p>A 16.16 fractional scaling value used to convert vertical metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
</td></tr>
-<tr valign=top><td><b>ascender</b></td><td>
+<tr><td class="val" id="ascender">ascender</td><td class="desc">
<p>The ascender in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
-<tr valign=top><td><b>descender</b></td><td>
+<tr><td class="val" id="descender">descender</td><td class="desc">
<p>The descender in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
-<tr valign=top><td><b>height</b></td><td>
+<tr><td class="val" id="height">height</td><td class="desc">
<p>The height in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
-<tr valign=top><td><b>max_advance</b></td><td>
-<p>The maximal advance width in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
+<tr><td class="val" id="max_advance">max_advance</td><td class="desc">
+<p>The maximum advance width in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The scaling values, if relevant, are determined first during a size changing operation. The remaining fields are then set by the driver. For scalable formats, they are usually set to scaled values of the corresponding fields in <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
<p>Note that due to glyph hinting, these values might not be exact for certain fonts. Thus they must be treated as unreliable with an error margin of at least one pixel!</p>
<p>Indeed, the only way to get the exact metrics is to render <i>all</i> glyphs. As this would be a definite performance hit, it is up to client applications to perform such computations.</p>
<p>The FT_Size_Metrics structure is valid for bitmap fonts also.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_SizeRec">FT_SizeRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SizeRec_
- {
- <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face; /* parent face object */
- <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a> generic; /* generic pointer for client uses */
- <a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a> metrics; /* size metrics */
- <a href="ft2-base_interface.html#FT_Size_Internal">FT_Size_Internal</a> internal;
-
- } <b>FT_SizeRec</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>FreeType root size class structure. A size object models a face object at a given size.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>Handle to the parent face object.</p>
-</td></tr>
-<tr valign=top><td><b>generic</b></td><td>
-<p>A typeless pointer, which is unused by the FreeType library or any of its drivers. It can be used by client applications to link their own data to each size object.</p>
-</td></tr>
-<tr valign=top><td><b>metrics</b></td><td>
-<p>Metrics for this size object. This field is read-only.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_SubGlyph">FT_SubGlyph</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SubGlyphRec_* <b>FT_SubGlyph</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>The subglyph structure is an internal object used to describe subglyphs (for example, in the case of composites).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The subglyph implementation is not part of the high-level API, hence the forward structure declaration.</p>
-<p>You can however retrieve subglyph information with <a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Slot_Internal">FT_Slot_Internal</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Slot_InternalRec_* <b>FT_Slot_Internal</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An opaque handle to an &lsquo;FT_Slot_InternalRec&rsquo; structure, used to model private data of a given <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> object.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GlyphSlotRec">FT_GlyphSlotRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_GlyphSlotRec">FT_GlyphSlotRec</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphSlotRec_
{
<a href="ft2-base_interface.html#FT_Library">FT_Library</a> library;
@@ -1371,85 +853,83 @@ Defined in FT_FREETYPE_H (freetype/freetype.h).
<a href="ft2-base_interface.html#FT_Slot_Internal">FT_Slot_Internal</a> internal;
} <b>FT_GlyphSlotRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>FreeType root glyph slot class structure. A glyph slot is a container where individual glyphs can be loaded, be they in outline or bitmap format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the FreeType library instance this slot belongs to.</p>
</td></tr>
-<tr valign=top><td><b>face</b></td><td>
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the parent face object.</p>
</td></tr>
-<tr valign=top><td><b>next</b></td><td>
+<tr><td class="val" id="next">next</td><td class="desc">
<p>In some cases (like some font tools), several glyph slots per face object can be a good thing. As this is rare, the glyph slots are listed through a direct, single-linked list using its &lsquo;next&rsquo; field.</p>
</td></tr>
-<tr valign=top><td><b>generic</b></td><td>
-<p>A typeless pointer which is unused by the FreeType library or any of its drivers. It can be used by client applications to link their own data to each glyph slot object.</p>
+<tr><td class="val" id="generic">generic</td><td class="desc">
+<p>A typeless pointer unused by the FreeType library or any of its drivers. It can be used by client applications to link their own data to each glyph slot object.</p>
</td></tr>
-<tr valign=top><td><b>metrics</b></td><td>
+<tr><td class="val" id="metrics">metrics</td><td class="desc">
<p>The metrics of the last loaded glyph in the slot. The returned values depend on the last load flags (see the <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> API function) and can be expressed either in 26.6 fractional pixels or font units.</p>
<p>Note that even when the glyph image is transformed, the metrics are not.</p>
</td></tr>
-<tr valign=top><td><b>linearHoriAdvance</b></td><td>
+<tr><td class="val" id="linearHoriAdvance">linearHoriAdvance</td><td class="desc">
<p>The advance width of the unhinted glyph. Its value is expressed in 16.16 fractional pixels, unless <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a> is set when loading the glyph. This field can be important to perform correct WYSIWYG layout. Only relevant for outline glyphs.</p>
</td></tr>
-<tr valign=top><td><b>linearVertAdvance</b></td><td>
+<tr><td class="val" id="linearVertAdvance">linearVertAdvance</td><td class="desc">
<p>The advance height of the unhinted glyph. Its value is expressed in 16.16 fractional pixels, unless <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a> is set when loading the glyph. This field can be important to perform correct WYSIWYG layout. Only relevant for outline glyphs.</p>
</td></tr>
-<tr valign=top><td><b>advance</b></td><td>
-<p>This shorthand is, depending on <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a>, the transformed advance width for the glyph (in 26.6 fractional pixel format). As specified with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a>, it uses either the &lsquo;horiAdvance&rsquo; or the &lsquo;vertAdvance&rsquo; value of &lsquo;metrics&rsquo; field.</p>
+<tr><td class="val" id="advance">advance</td><td class="desc">
+<p>This shorthand is, depending on <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a>, the transformed (hinted) advance width for the glyph, in 26.6 fractional pixel format. As specified with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a>, it uses either the &lsquo;horiAdvance&rsquo; or the &lsquo;vertAdvance&rsquo; value of &lsquo;metrics&rsquo; field.</p>
</td></tr>
-<tr valign=top><td><b>format</b></td><td>
+<tr><td class="val" id="format">format</td><td class="desc">
<p>This field indicates the format of the image contained in the glyph slot. Typically <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>, <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>, or <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>, but others are possible.</p>
</td></tr>
-<tr valign=top><td><b>bitmap</b></td><td>
+<tr><td class="val" id="bitmap">bitmap</td><td class="desc">
<p>This field is used as a bitmap descriptor when the slot format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>. Note that the address and content of the bitmap buffer can change between calls of <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> and a few other functions.</p>
</td></tr>
-<tr valign=top><td><b>bitmap_left</b></td><td>
-<p>This is the bitmap's left bearing expressed in integer pixels. Of course, this is only valid if the format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>.</p>
+<tr><td class="val" id="bitmap_left">bitmap_left</td><td class="desc">
+<p>The bitmap's left bearing expressed in integer pixels. Only valid if the format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>, this is, if the glyph slot contains a bitmap.</p>
</td></tr>
-<tr valign=top><td><b>bitmap_top</b></td><td>
-<p>This is the bitmap's top bearing expressed in integer pixels. Remember that this is the distance from the baseline to the top-most glyph scanline, upwards y&nbsp;coordinates being <b>positive</b>.</p>
+<tr><td class="val" id="bitmap_top">bitmap_top</td><td class="desc">
+<p>The bitmap's top bearing expressed in integer pixels. Remember that this is the distance from the baseline to the top-most glyph scanline, upwards y&nbsp;coordinates being <b>positive</b>.</p>
</td></tr>
-<tr valign=top><td><b>outline</b></td><td>
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The outline descriptor for the current glyph image if its format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>. Once a glyph is loaded, &lsquo;outline&rsquo; can be transformed, distorted, embolded, etc. However, it must not be freed.</p>
</td></tr>
-<tr valign=top><td><b>num_subglyphs</b></td><td>
-<p>The number of subglyphs in a composite glyph. This field is only valid for the composite glyph format that should normally only be loaded with the <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a> flag. For now this is internal to FreeType.</p>
+<tr><td class="val" id="num_subglyphs">num_subglyphs</td><td class="desc">
+<p>The number of subglyphs in a composite glyph. This field is only valid for the composite glyph format that should normally only be loaded with the <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a> flag.</p>
</td></tr>
-<tr valign=top><td><b>subglyphs</b></td><td>
+<tr><td class="val" id="subglyphs">subglyphs</td><td class="desc">
<p>An array of subglyph descriptors for composite glyphs. There are &lsquo;num_subglyphs&rsquo; elements in there. Currently internal to FreeType.</p>
</td></tr>
-<tr valign=top><td><b>control_data</b></td><td>
+<tr><td class="val" id="control_data">control_data</td><td class="desc">
<p>Certain font drivers can also return the control data for a given glyph image (e.g. TrueType bytecode, Type&nbsp;1 charstrings, etc.). This field is a pointer to such data.</p>
</td></tr>
-<tr valign=top><td><b>control_len</b></td><td>
+<tr><td class="val" id="control_len">control_len</td><td class="desc">
<p>This is the length in bytes of the control data.</p>
</td></tr>
-<tr valign=top><td><b>other</b></td><td>
+<tr><td class="val" id="other">other</td><td class="desc">
<p>Really wicked formats can use this pointer to present their own glyph image to client applications. Note that the application needs to know about the image format.</p>
</td></tr>
-<tr valign=top><td><b>lsb_delta</b></td><td>
+<tr><td class="val" id="lsb_delta">lsb_delta</td><td class="desc">
<p>The difference between hinted and unhinted left side bearing while autohinting is active. Zero otherwise.</p>
</td></tr>
-<tr valign=top><td><b>rsb_delta</b></td><td>
+<tr><td class="val" id="rsb_delta">rsb_delta</td><td class="desc">
<p>The difference between hinted and unhinted right side bearing while autohinting is active. Zero otherwise.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> is called with default flags (see <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a>) the glyph image is loaded in the glyph slot in its native format (e.g., an outline glyph for TrueType and Type&nbsp;1 formats).</p>
<p>This image can later be converted into a bitmap by calling <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. This function finds the current renderer for the native image's format, then invokes it.</p>
<p>The renderer is in charge of transforming the native image through the slot's face transformation fields, then converting it into a bitmap that is returned in &lsquo;slot-&gt;bitmap&rsquo;.</p>
<p>Note that &lsquo;slot-&gt;bitmap_left&rsquo; and &lsquo;slot-&gt;bitmap_top&rsquo; are also used to specify the position of the bitmap relative to the current pen position (e.g., coordinates (0,0) on the baseline). Of course, &lsquo;slot-&gt;format&rsquo; is also changed to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>Here a small pseudo code fragment which shows how to use &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo;:</p>
+
+<h4>note</h4>
+<p>Here a small pseudo code fragment that shows how to use &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo;:</p>
<pre class="colored">
FT_Pos origin_x = 0;
FT_Pos prev_rsb_delta = 0;
@@ -1473,683 +953,738 @@ Defined in FT_FREETYPE_H (freetype/freetype.h).
origin_x += face-&gt;glyph-&gt;advance.x;
endfor
</pre>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Init_FreeType">FT_Init_FreeType</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Init_FreeType</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> *alibrary );
+<div class="section">
+<h3 id="FT_Glyph_Metrics">FT_Glyph_Metrics</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Glyph_Metrics_
+ {
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> width;
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> height;
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Initialize a new FreeType library object. The set of modules that are registered by this function is determined at build time.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>alibrary</b></td><td>
-<p>A handle to a new library object.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>In case you want to provide your own memory allocating routines, use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> instead, followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> (or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>).</p>
-<p>For multi-threading applications each thread should have its own FT_Library object.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Done_FreeType">FT_Done_FreeType</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> horiBearingX;
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> horiBearingY;
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> horiAdvance;
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Done_FreeType</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> vertBearingX;
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> vertBearingY;
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> vertAdvance;
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Destroy a given FreeType library object and all of its children, including resources, drivers, faces, sizes, etc.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
-<p>A handle to the target library object.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_OPEN_XXX">FT_OPEN_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a> 0x1
-#define <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a> 0x2
-#define <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a> 0x4
-#define <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a> 0x8
-#define <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a> 0x10
-
-#define <a href="ft2-base_interface.html#FT_OPEN_XXX">ft_open_memory</a> <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a> /* deprecated */
-#define <a href="ft2-base_interface.html#FT_OPEN_XXX">ft_open_stream</a> <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a> /* deprecated */
-#define <a href="ft2-base_interface.html#FT_OPEN_XXX">ft_open_pathname</a> <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a> /* deprecated */
-#define <a href="ft2-base_interface.html#FT_OPEN_XXX">ft_open_driver</a> <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a> /* deprecated */
-#define <a href="ft2-base_interface.html#FT_OPEN_XXX">ft_open_params</a> <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a> /* deprecated */
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of bit-field constants used within the &lsquo;flags&rsquo; field of the <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a> structure.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_OPEN_MEMORY</b></td><td>
-<p>This is a memory-based stream.</p>
-</td></tr>
-<tr valign=top><td><b>FT_OPEN_STREAM</b></td><td>
-<p>Copy the stream from the &lsquo;stream&rsquo; field.</p>
-</td></tr>
-<tr valign=top><td><b>FT_OPEN_PATHNAME</b></td><td>
-<p>Create a new input stream from a C&nbsp;path name.</p>
+ } <b>FT_Glyph_Metrics</b>;
+</pre>
+
+<p>A structure used to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> has been used while loading the glyph, values are expressed in font units instead.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="width">width</td><td class="desc">
+<p>The glyph's width.</p>
</td></tr>
-<tr valign=top><td><b>FT_OPEN_DRIVER</b></td><td>
-<p>Use the &lsquo;driver&rsquo; field.</p>
+<tr><td class="val" id="height">height</td><td class="desc">
+<p>The glyph's height.</p>
</td></tr>
-<tr valign=top><td><b>FT_OPEN_PARAMS</b></td><td>
-<p>Use the &lsquo;num_params&rsquo; and &lsquo;params&rsquo; fields.</p>
+<tr><td class="val" id="horiBearingX">horiBearingX</td><td class="desc">
+<p>Left side bearing for horizontal layout.</p>
</td></tr>
-<tr valign=top><td><b>ft_open_memory</b></td><td>
-<p>Deprecated; use <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a> instead.</p>
+<tr><td class="val" id="horiBearingY">horiBearingY</td><td class="desc">
+<p>Top side bearing for horizontal layout.</p>
</td></tr>
-<tr valign=top><td><b>ft_open_stream</b></td><td>
-<p>Deprecated; use <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a> instead.</p>
+<tr><td class="val" id="horiAdvance">horiAdvance</td><td class="desc">
+<p>Advance width for horizontal layout.</p>
</td></tr>
-<tr valign=top><td><b>ft_open_pathname</b></td><td>
-<p>Deprecated; use <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a> instead.</p>
+<tr><td class="val" id="vertBearingX">vertBearingX</td><td class="desc">
+<p>Left side bearing for vertical layout.</p>
</td></tr>
-<tr valign=top><td><b>ft_open_driver</b></td><td>
-<p>Deprecated; use <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a> instead.</p>
+<tr><td class="val" id="vertBearingY">vertBearingY</td><td class="desc">
+<p>Top side bearing for vertical layout. Larger positive values mean further below the vertical glyph origin.</p>
</td></tr>
-<tr valign=top><td><b>ft_open_params</b></td><td>
-<p>Deprecated; use <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a> instead.</p>
+<tr><td class="val" id="vertAdvance">vertAdvance</td><td class="desc">
+<p>Advance height for vertical layout. Positive values mean the glyph has a positive advance downward.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The &lsquo;FT_OPEN_MEMORY&rsquo;, &lsquo;FT_OPEN_STREAM&rsquo;, and &lsquo;FT_OPEN_PATHNAME&rsquo; flags are mutually exclusive.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Parameter">FT_Parameter</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Parameter_
- {
- <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> tag;
- <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a> data;
+<h4>note</h4>
+<p>If not disabled with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a>, the values represent dimensions of the hinted glyph (in case hinting is applicable).</p>
+<p>Stroking a glyph with an outside border does not increase &lsquo;horiAdvance&rsquo; or &lsquo;vertAdvance&rsquo;; you have to manually adjust these values to account for the added width and height.</p>
- } <b>FT_Parameter</b>;
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A simple structure used to pass more or less generic parameters to <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>tag</b></td><td>
-<p>A four-byte identification tag.</p>
-</td></tr>
-<tr valign=top><td><b>data</b></td><td>
-<p>A pointer to the parameter data.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The ID and function of parameters are driver-specific. See the various FT_PARAM_TAG_XXX flags for more information.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Open_Args">FT_Open_Args</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_SubGlyph">FT_SubGlyph</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SubGlyphRec_* <b>FT_SubGlyph</b>;
+</pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Open_Args_
+<p>The subglyph structure is an internal object used to describe subglyphs (for example, in the case of composites).</p>
+
+<h4>note</h4>
+<p>The subglyph implementation is not part of the high-level API, hence the forward structure declaration.</p>
+<p>You can however retrieve subglyph information with <a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Bitmap_Size">FT_Bitmap_Size</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Bitmap_Size_
{
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> flags;
- <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* memory_base;
- <a href="ft2-basic_types.html#FT_Long">FT_Long</a> memory_size;
- <a href="ft2-basic_types.html#FT_String">FT_String</a>* pathname;
- <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> stream;
- <a href="ft2-base_interface.html#FT_Module">FT_Module</a> driver;
- <a href="ft2-basic_types.html#FT_Int">FT_Int</a> num_params;
- <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a>* params;
+ <a href="ft2-basic_types.html#FT_Short">FT_Short</a> height;
+ <a href="ft2-basic_types.html#FT_Short">FT_Short</a> width;
- } <b>FT_Open_Args</b>;
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> size;
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A structure used to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>flags</b></td><td>
-<p>A set of bit flags indicating how to use the structure.</p>
-</td></tr>
-<tr valign=top><td><b>memory_base</b></td><td>
-<p>The first byte of the file in memory.</p>
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> x_ppem;
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> y_ppem;
+
+ } <b>FT_Bitmap_Size</b>;
+</pre>
+
+<p>This structure models the metrics of a bitmap strike (i.e., a set of glyphs for a given point size and resolution) in a bitmap font. It is used for the &lsquo;available_sizes&rsquo; field of <a href="ft2-base_interface.html#FT_Face">FT_Face</a>.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="height">height</td><td class="desc">
+<p>The vertical distance, in pixels, between two consecutive baselines. It is always positive.</p>
</td></tr>
-<tr valign=top><td><b>memory_size</b></td><td>
-<p>The size in bytes of the file in memory.</p>
+<tr><td class="val" id="width">width</td><td class="desc">
+<p>The average width, in pixels, of all glyphs in the strike.</p>
</td></tr>
-<tr valign=top><td><b>pathname</b></td><td>
-<p>A pointer to an 8-bit file pathname.</p>
+<tr><td class="val" id="size">size</td><td class="desc">
+<p>The nominal size of the strike in 26.6 fractional points. This field is not very useful.</p>
</td></tr>
-<tr valign=top><td><b>stream</b></td><td>
-<p>A handle to a source stream object.</p>
+<tr><td class="val" id="x_ppem">x_ppem</td><td class="desc">
+<p>The horizontal ppem (nominal width) in 26.6 fractional pixels.</p>
</td></tr>
-<tr valign=top><td><b>driver</b></td><td>
-<p>This field is exclusively used by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>; it simply specifies the font driver to use to open the face. If set to&nbsp;0, FreeType tries to load the face with each one of the drivers in its list.</p>
+<tr><td class="val" id="y_ppem">y_ppem</td><td class="desc">
+<p>The vertical ppem (nominal height) in 26.6 fractional pixels.</p>
</td></tr>
-<tr valign=top><td><b>num_params</b></td><td>
-<p>The number of extra parameters.</p>
+</table>
+
+<h4>note</h4>
+<p>Windows FNT: The nominal size given in a FNT font is not reliable. Thus when the driver finds it incorrect, it sets &lsquo;size&rsquo; to some calculated values and sets &lsquo;x_ppem&rsquo; and &lsquo;y_ppem&rsquo; to the pixel width and height given in the font, respectively.</p>
+<p>TrueType embedded bitmaps: &lsquo;size&rsquo;, &lsquo;width&rsquo;, and &lsquo;height&rsquo; values are not contained in the bitmap strike itself. They are computed from the global font parameters.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Init_FreeType">FT_Init_FreeType</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Init_FreeType</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> *alibrary );
+</pre>
+
+<p>Initialize a new FreeType library object. The set of modules that are registered by this function is determined at build time.</p>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="alibrary">alibrary</td><td class="desc">
+<p>A handle to a new library object.</p>
</td></tr>
-<tr valign=top><td><b>params</b></td><td>
-<p>Extra parameters passed to the font driver when opening a new face.</p>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>In case you want to provide your own memory allocating routines, use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> instead, followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> (or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>).</p>
+<p>For multi-threading applications each thread should have its own FT_Library object.</p>
+<p>If you need reference-counting (cf. <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>), use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> and <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Done_FreeType">FT_Done_FreeType</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Done_FreeType</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
+</pre>
+
+<p>Destroy a given FreeType library object and all of its children, including resources, drivers, faces, sizes, etc.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle to the target library object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The stream type is determined by the contents of &lsquo;flags&rsquo; which are tested in the following order by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>:</p>
-<p>If the &lsquo;FT_OPEN_MEMORY&rsquo; bit is set, assume that this is a memory file of &lsquo;memory_size&rsquo; bytes, located at &lsquo;memory_address&rsquo;. The data are are not copied, and the client is responsible for releasing and destroying them <i>after</i> the corresponding call to <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
-<p>Otherwise, if the &lsquo;FT_OPEN_STREAM&rsquo; bit is set, assume that a custom input stream &lsquo;stream&rsquo; is used.</p>
-<p>Otherwise, if the &lsquo;FT_OPEN_PATHNAME&rsquo; bit is set, assume that this is a normal file and use &lsquo;pathname&rsquo; to open it.</p>
-<p>If the &lsquo;FT_OPEN_DRIVER&rsquo; bit is set, <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> only tries to open the file with the driver whose handler is in &lsquo;driver&rsquo;.</p>
-<p>If the &lsquo;FT_OPEN_PARAMS&rsquo; bit is set, the parameters given by &lsquo;num_params&rsquo; and &lsquo;params&rsquo; is used. They are ignored otherwise.</p>
-<p>Ideally, both the &lsquo;pathname&rsquo; and &lsquo;params&rsquo; fields should be tagged as &lsquo;const&rsquo;; this is missing for API backwards compatibility. In other words, applications should treat them as read-only.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_New_Face">FT_New_Face</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_New_Face">FT_New_Face</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_New_Face</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> <span class="keyword">char</span>* filepathname,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> face_index,
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This function calls <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font by its pathname.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>pathname</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="pathname">pathname</td><td class="desc">
<p>A path to the font file.</p>
</td></tr>
-<tr valign=top><td><b>face_index</b></td><td>
+<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>The index of the face within the font. The first face has index&nbsp;0.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aface</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object. If &lsquo;face_index&rsquo; is greater than or equal to zero, it must be non-NULL. See <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> for more details.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>Use <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> to destroy the created <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object (along with its slot and sizes).</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Done_Face">FT_Done_Face</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Done_Face</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+</pre>
+
+<p>Discard a given face object, as well as all of its child slots and sizes.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to a target face object.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>See the discussion of reference counters in the description of <a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Reference_Face">FT_Reference_Face</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Reference_Face</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+</pre>
+
+<p>A counter gets initialized to&nbsp;1 at the time an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure is created. This function increments the counter. <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> then only destroys a face if the counter is&nbsp;1, otherwise it simply decrements the counter.</p>
+<p>This function helps in managing life-cycles of structures that reference <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to a target face object.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_New_Memory_Face">FT_New_Memory_Face</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>since</h4>
+<p>2.4.2</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_New_Memory_Face">FT_New_Memory_Face</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_New_Memory_Face</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* file_base,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> file_size,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> face_index,
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This function calls <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font which has been loaded into memory.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+<p>This function calls <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font that has been loaded into memory.</p>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>file_base</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="file_base">file_base</td><td class="desc">
<p>A pointer to the beginning of the font data.</p>
</td></tr>
-<tr valign=top><td><b>file_size</b></td><td>
+<tr><td class="val" id="file_size">file_size</td><td class="desc">
<p>The size of the memory chunk used by the font data.</p>
</td></tr>
-<tr valign=top><td><b>face_index</b></td><td>
+<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>The index of the face within the font. The first face has index&nbsp;0.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aface</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object. If &lsquo;face_index&rsquo; is greater than or equal to zero, it must be non-NULL. See <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> for more details.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>You must not deallocate the memory before calling <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Open_Face">FT_Open_Face</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Open_Face">FT_Open_Face</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Open_Face</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a>* args,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> face_index,
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Create a face object from a given resource described by <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>args</b></td><td>
-<p>A pointer to an &lsquo;FT_Open_Args&rsquo; structure which must be filled by the caller.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="args">args</td><td class="desc">
+<p>A pointer to an &lsquo;FT_Open_Args&rsquo; structure that must be filled by the caller.</p>
</td></tr>
-<tr valign=top><td><b>face_index</b></td><td>
+<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>The index of the face within the font. The first face has index&nbsp;0.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aface</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object. If &lsquo;face_index&rsquo; is greater than or equal to zero, it must be non-NULL. See note below.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>Unlike FreeType 1.x, this function automatically creates a glyph slot for the face object which can be accessed directly through &lsquo;face-&gt;glyph&rsquo;.</p>
-<p>FT_Open_Face can be used to quickly check whether the font format of a given font resource is supported by FreeType. If the &lsquo;face_index&rsquo; field is negative, the function's return value is&nbsp;0 if the font format is recognized, or non-zero otherwise; the function returns a more or less empty face handle in &lsquo;*aface&rsquo; (if &lsquo;aface&rsquo; isn't NULL). The only useful field in this special case is &lsquo;face-&gt;num_faces&rsquo; which gives the number of faces within the font file. After examination, the returned <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure should be deallocated with a call to <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
+
+<h4>note</h4>
+<p>Unlike FreeType 1.x, this function automatically creates a glyph slot for the face object that can be accessed directly through &lsquo;face-&gt;glyph&rsquo;.</p>
+<p>FT_Open_Face can be used to quickly check whether the font format of a given font resource is supported by FreeType. If the &lsquo;face_index&rsquo; field is negative, the function's return value is&nbsp;0 if the font format is recognized, or non-zero otherwise; the function returns a more or less empty face handle in &lsquo;*aface&rsquo; (if &lsquo;aface&rsquo; isn't NULL). The only useful field in this special case is &lsquo;face-&gt;num_faces&rsquo; that gives the number of faces within the font file. After examination, the returned <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure should be deallocated with a call to <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
<p>Each new face object created with this function also owns a default <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object, accessible as &lsquo;face-&gt;size&rsquo;.</p>
<p>One <a href="ft2-base_interface.html#FT_Library">FT_Library</a> instance can have multiple face objects, this is, <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and its siblings can be called multiple times using the same &lsquo;library&rsquo; argument.</p>
<p>See the discussion of reference counters in the description of <a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Attach_File">FT_Attach_File</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Open_Args">FT_Open_Args</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Open_Args_
+ {
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> flags;
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* memory_base;
+ <a href="ft2-basic_types.html#FT_Long">FT_Long</a> memory_size;
+ <a href="ft2-basic_types.html#FT_String">FT_String</a>* pathname;
+ <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> stream;
+ <a href="ft2-module_management.html#FT_Module">FT_Module</a> driver;
+ <a href="ft2-basic_types.html#FT_Int">FT_Int</a> num_params;
+ <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a>* params;
+
+ } <b>FT_Open_Args</b>;
+</pre>
+
+<p>A structure used to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="flags">flags</td><td class="desc">
+<p>A set of bit flags indicating how to use the structure.</p>
+</td></tr>
+<tr><td class="val" id="memory_base">memory_base</td><td class="desc">
+<p>The first byte of the file in memory.</p>
+</td></tr>
+<tr><td class="val" id="memory_size">memory_size</td><td class="desc">
+<p>The size in bytes of the file in memory.</p>
+</td></tr>
+<tr><td class="val" id="pathname">pathname</td><td class="desc">
+<p>A pointer to an 8-bit file pathname.</p>
+</td></tr>
+<tr><td class="val" id="stream">stream</td><td class="desc">
+<p>A handle to a source stream object.</p>
+</td></tr>
+<tr><td class="val" id="driver">driver</td><td class="desc">
+<p>This field is exclusively used by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>; it simply specifies the font driver to use to open the face. If set to&nbsp;0, FreeType tries to load the face with each one of the drivers in its list.</p>
+</td></tr>
+<tr><td class="val" id="num_params">num_params</td><td class="desc">
+<p>The number of extra parameters.</p>
+</td></tr>
+<tr><td class="val" id="params">params</td><td class="desc">
+<p>Extra parameters passed to the font driver when opening a new face.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>The stream type is determined by the contents of &lsquo;flags&rsquo; that are tested in the following order by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>:</p>
+<p>If the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a> bit is set, assume that this is a memory file of &lsquo;memory_size&rsquo; bytes, located at &lsquo;memory_address&rsquo;. The data are are not copied, and the client is responsible for releasing and destroying them <i>after</i> the corresponding call to <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
+<p>Otherwise, if the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a> bit is set, assume that a custom input stream &lsquo;stream&rsquo; is used.</p>
+<p>Otherwise, if the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a> bit is set, assume that this is a normal file and use &lsquo;pathname&rsquo; to open it.</p>
+<p>If the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a> bit is set, <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> only tries to open the file with the driver whose handler is in &lsquo;driver&rsquo;.</p>
+<p>If the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a> bit is set, the parameters given by &lsquo;num_params&rsquo; and &lsquo;params&rsquo; is used. They are ignored otherwise.</p>
+<p>Ideally, both the &lsquo;pathname&rsquo; and &lsquo;params&rsquo; fields should be tagged as &lsquo;const&rsquo;; this is missing for API backwards compatibility. In other words, applications should treat them as read-only.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Parameter">FT_Parameter</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Parameter_
+ {
+ <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> tag;
+ <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a> data;
+
+ } <b>FT_Parameter</b>;
+</pre>
+
+<p>A simple structure used to pass more or less generic parameters to <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="tag">tag</td><td class="desc">
+<p>A four-byte identification tag.</p>
+</td></tr>
+<tr><td class="val" id="data">data</td><td class="desc">
+<p>A pointer to the parameter data.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>The ID and function of parameters are driver-specific. See the various FT_PARAM_TAG_XXX flags for more information.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Attach_File">FT_Attach_File</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Attach_File</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<span class="keyword">const</span> <span class="keyword">char</span>* filepathname );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This function calls <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a> to attach a file.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>The target face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>filepathname</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="filepathname">filepathname</td><td class="desc">
<p>The pathname.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Attach_Stream">FT_Attach_Stream</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Attach_Stream">FT_Attach_Stream</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Attach_Stream</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a>* parameters );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>&lsquo;Attach&rsquo; data to a face object. Normally, this is used to read additional information for the face object. For example, you can attach an AFM file that comes with a Type&nbsp;1 font to get the kerning values and other metrics.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>The target face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>parameters</b></td><td>
-<p>A pointer to <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a> which must be filled by the caller.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="parameters">parameters</td><td class="desc">
+<p>A pointer to <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a> that must be filled by the caller.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The meaning of the &lsquo;attach&rsquo; (i.e., what really happens when the new file is read) is not fixed by FreeType itself. It really depends on the font format (and thus the font driver).</p>
<p>Client applications are expected to know what they are doing when invoking this function. Most drivers simply do not implement file attachments.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Reference_Face">FT_Reference_Face</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Set_Char_Size">FT_Set_Char_Size</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Reference_Face</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+ <b>FT_Set_Char_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a> char_width,
+ <a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a> char_height,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> horz_resolution,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> vert_resolution );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A counter gets initialized to&nbsp;1 at the time an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure is created. This function increments the counter. <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> then only destroys a face if the counter is&nbsp;1, otherwise it simply decrements the counter.</p>
-<p>This function helps in managing life-cycles of structures which reference <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+<p>This function calls <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in points).</p>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a target face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="char_width">char_width</td><td class="desc">
+<p>The nominal width, in 26.6 fractional points.</p>
+</td></tr>
+<tr><td class="val" id="char_height">char_height</td><td class="desc">
+<p>The nominal height, in 26.6 fractional points.</p>
+</td></tr>
+<tr><td class="val" id="horz_resolution">horz_resolution</td><td class="desc">
+<p>The horizontal resolution in dpi.</p>
+</td></tr>
+<tr><td class="val" id="vert_resolution">vert_resolution</td><td class="desc">
+<p>The vertical resolution in dpi.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
-<p>2.4.2</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Done_Face">FT_Done_Face</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>note</h4>
+<p>If either the character width or height is zero, it is set equal to the other value.</p>
+<p>If either the horizontal or vertical resolution is zero, it is set equal to the other value.</p>
+<p>A character width or height smaller than 1pt is set to 1pt; if both resolution values are zero, they are set to 72dpi.</p>
+<p>Don't use this function if you are using the FreeType cache API.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Done_Face</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+ <b>FT_Set_Pixel_Sizes</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> pixel_width,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> pixel_height );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Discard a given face object, as well as all of its child slots and sizes.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+<p>This function calls <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in pixels).</p>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the target face object.</p>
+</td></tr>
+</table>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="pixel_width">pixel_width</td><td class="desc">
+<p>The nominal width, in pixels.</p>
+</td></tr>
+<tr><td class="val" id="pixel_height">pixel_height</td><td class="desc">
+<p>The nominal height, in pixels.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>You should not rely on the resulting glyphs matching, or being constrained, to this pixel size. Refer to <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to understand how requested sizes relate to actual sizes.</p>
+<p>Don't use this function if you are using the FreeType cache API.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Request_Size">FT_Request_Size</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Request_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a> req );
+</pre>
+
+<p>Resize the scale of the active <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object in a face.</p>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a target face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="req">req</td><td class="desc">
+<p>A pointer to a <a href="ft2-base_interface.html#FT_Size_RequestRec">FT_Size_RequestRec</a>.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>See the discussion of reference counters in the description of <a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Select_Size">FT_Select_Size</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>note</h4>
+<p>Although drivers may select the bitmap strike matching the request, you should not rely on this if you intend to select a particular bitmap strike. Use <a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a> instead in that case.</p>
+<p>The relation between the requested size and the resulting glyph size is dependent entirely on how the size is defined in the source face. The font designer chooses the final size of each glyph relative to this size. For more information refer to &lsquo;<a href="http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html">http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html</a>&rsquo;</p>
+<p>Don't use this function if you are using the FreeType cache API.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Select_Size">FT_Select_Size</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Select_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> strike_index );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Select a bitmap strike.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a target face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>strike_index</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="strike_index">strike_index</td><td class="desc">
<p>The index of the bitmap strike in the &lsquo;available_sizes&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> structure.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Size_Request_Type">FT_Size_Request_Type</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Size_Request_Type">FT_Size_Request_Type</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Size_Request_Type_
{
- <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_NOMINAL</a>,
- <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a>,
- <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_BBOX</a>,
- <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_CELL</a>,
- <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_SCALES</a>,
+ <a href="ft2-base_interface.html#FT_SIZE_REQUEST_TYPE_NOMINAL">FT_SIZE_REQUEST_TYPE_NOMINAL</a>,
+ <a href="ft2-base_interface.html#FT_SIZE_REQUEST_TYPE_REAL_DIM">FT_SIZE_REQUEST_TYPE_REAL_DIM</a>,
+ <a href="ft2-base_interface.html#FT_SIZE_REQUEST_TYPE_BBOX">FT_SIZE_REQUEST_TYPE_BBOX</a>,
+ <a href="ft2-base_interface.html#FT_SIZE_REQUEST_TYPE_CELL">FT_SIZE_REQUEST_TYPE_CELL</a>,
+ <a href="ft2-base_interface.html#FT_SIZE_REQUEST_TYPE_SCALES">FT_SIZE_REQUEST_TYPE_SCALES</a>,
FT_SIZE_REQUEST_TYPE_MAX
} <b>FT_Size_Request_Type</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>An enumeration type that lists the supported size request types.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td colspan=0><b>FT_SIZE_REQUEST_TYPE_NOMINAL</b></td></tr>
-<tr valign=top><td></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_NOMINAL">FT_SIZE_REQUEST_TYPE_NOMINAL</td><td class="desc">
<p>The nominal size. The &lsquo;units_per_EM&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> is used to determine both scaling values.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_SIZE_REQUEST_TYPE_REAL_DIM</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_REAL_DIM">FT_SIZE_REQUEST_TYPE_REAL_DIM</td><td class="desc">
<p>The real dimension. The sum of the the &lsquo;ascender&rsquo; and (minus of) the &lsquo;descender&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> are used to determine both scaling values.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_SIZE_REQUEST_TYPE_BBOX</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_BBOX">FT_SIZE_REQUEST_TYPE_BBOX</td><td class="desc">
<p>The font bounding box. The width and height of the &lsquo;bbox&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> are used to determine the horizontal and vertical scaling value, respectively.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_SIZE_REQUEST_TYPE_CELL</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_CELL">FT_SIZE_REQUEST_TYPE_CELL</td><td class="desc">
<p>The &lsquo;max_advance_width&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> is used to determine the horizontal scaling value; the vertical scaling value is determined the same way as <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a> does. Finally, both scaling values are set to the smaller one. This type is useful if you want to specify the font size for, say, a window of a given dimension and 80x24 cells.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_SIZE_REQUEST_TYPE_SCALES</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_SCALES">FT_SIZE_REQUEST_TYPE_SCALES</td><td class="desc">
<p>Specify the scaling values directly.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The above descriptions only apply to scalable formats. For bitmap formats, the behaviour is up to the driver.</p>
<p>See the note section of <a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a> if you wonder how size requesting relates to scaling values.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Size_RequestRec">FT_Size_RequestRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Size_RequestRec">FT_Size_RequestRec</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Size_RequestRec_
{
<a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a> type;
@@ -2159,1450 +1694,1246 @@ Defined in FT_FREETYPE_H (freetype/freetype.h).
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> vertResolution;
} <b>FT_Size_RequestRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model a size request.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>type</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="type">type</td><td class="desc">
<p>See <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a>.</p>
</td></tr>
-<tr valign=top><td><b>width</b></td><td>
+<tr><td class="val" id="width">width</td><td class="desc">
<p>The desired width.</p>
</td></tr>
-<tr valign=top><td><b>height</b></td><td>
+<tr><td class="val" id="height">height</td><td class="desc">
<p>The desired height.</p>
</td></tr>
-<tr valign=top><td><b>horiResolution</b></td><td>
+<tr><td class="val" id="horiResolution">horiResolution</td><td class="desc">
<p>The horizontal resolution. If set to zero, &lsquo;width&rsquo; is treated as a 26.6 fractional pixel value.</p>
</td></tr>
-<tr valign=top><td><b>vertResolution</b></td><td>
+<tr><td class="val" id="vertResolution">vertResolution</td><td class="desc">
<p>The vertical resolution. If set to zero, &lsquo;height&rsquo; is treated as a 26.6 fractional pixel value.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If &lsquo;width&rsquo; is zero, then the horizontal scaling value is set equal to the vertical scaling value, and vice versa.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Size_Request">FT_Size_Request</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Size_Request">FT_Size_Request</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Size_RequestRec_ *<b>FT_Size_Request</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a size request structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Request_Size">FT_Request_Size</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Request_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
- <a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a> req );
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Resize the scale of the active <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object in a face.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>A handle to a target face object.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>req</b></td><td>
-<p>A pointer to a <a href="ft2-base_interface.html#FT_Size_RequestRec">FT_Size_RequestRec</a>.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>Although drivers may select the bitmap strike matching the request, you should not rely on this if you intend to select a particular bitmap strike. Use <a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a> instead in that case.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Set_Char_Size">FT_Set_Char_Size</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Set_Transform">FT_Set_Transform</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <span class="keyword">void</span> )
+ <b>FT_Set_Transform</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>* matrix,
+ <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* delta );
+</pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Set_Char_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
- <a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a> char_width,
- <a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a> char_height,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> horz_resolution,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> vert_resolution );
+<p>A function used to set the transformation that is applied to glyph images when they are loaded into a glyph slot through <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This function calls <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in points).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>A handle to a target face object.</p>
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>char_width</b></td><td>
-<p>The nominal width, in 26.6 fractional points.</p>
-</td></tr>
-<tr valign=top><td><b>char_height</b></td><td>
-<p>The nominal height, in 26.6 fractional points.</p>
-</td></tr>
-<tr valign=top><td><b>horz_resolution</b></td><td>
-<p>The horizontal resolution in dpi.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="matrix">matrix</td><td class="desc">
+<p>A pointer to the transformation's 2x2 matrix. Use&nbsp;0 for the identity matrix.</p>
</td></tr>
-<tr valign=top><td><b>vert_resolution</b></td><td>
-<p>The vertical resolution in dpi.</p>
+<tr><td class="val" id="delta">delta</td><td class="desc">
+<p>A pointer to the translation vector. Use&nbsp;0 for the null vector.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>If either the character width or height is zero, it is set equal to the other value.</p>
-<p>If either the horizontal or vertical resolution is zero, it is set equal to the other value.</p>
-<p>A character width or height smaller than 1pt is set to 1pt; if both resolution values are zero, they are set to 72dpi.</p>
-<p>Don't use this function if you are using the FreeType cache API.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Set_Pixel_Sizes</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> pixel_width,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> pixel_height );
+<h4>note</h4>
+<p>The transformation is only applied to scalable image formats after the glyph has been loaded. It means that hinting is unaltered by the transformation and is performed on the character size given in the last call to <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> or <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a>.</p>
+<p>Note that this also transforms the &lsquo;face.glyph.advance&rsquo; field, but <b>not</b> the values in &lsquo;face.glyph.metrics&rsquo;.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This function calls <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in pixels).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>A handle to the target face object.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>pixel_width</b></td><td>
-<p>The nominal width, in pixels.</p>
-</td></tr>
-<tr valign=top><td><b>pixel_height</b></td><td>
-<p>The nominal height, in pixels.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Load_Glyph">FT_Load_Glyph</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Load_Glyph">FT_Load_Glyph</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Load_Glyph</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> glyph_index,
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to load a single glyph into the glyph slot of a face object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the target face object where the glyph is loaded.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>glyph_index</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
<p>The index of the glyph in the font file. For CID-keyed fonts (either in PS or in CFF format) this argument specifies the CID value.</p>
</td></tr>
-<tr valign=top><td><b>load_flags</b></td><td>
+<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>A flag indicating what to load for this glyph. The <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a> constants can be used to control the glyph loading process (e.g., whether the outline should be scaled, whether to load bitmaps or not, whether to hint the outline, etc).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The loaded glyph may be transformed. See <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a> for the details.</p>
-<p>For subsetted CID-keyed fonts, &lsquo;FT_Err_Invalid_Argument&rsquo; is returned for invalid CID values (this is, for CID values which don't have a corresponding glyph in the font). See the discussion of the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a> flag for more details.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Load_Char">FT_Load_Char</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>For subsetted CID-keyed fonts, &lsquo;FT_Err_Invalid_Argument&rsquo; is returned for invalid CID values (this is, for CID values that don't have a corresponding glyph in the font). See the discussion of the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a> flag for more details.</p>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Load_Char</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
- <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> char_code,
- <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags );
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A function used to load a single glyph into the glyph slot of a face object, according to its character code.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>A handle to a target face object where the glyph is loaded.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>char_code</b></td><td>
-<p>The glyph's character code, according to the current charmap used in the face.</p>
+<div class="section">
+<h3 id="FT_Get_Char_Index">FT_Get_Char_Index</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
+ <b>FT_Get_Char_Index</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> charcode );
+</pre>
+
+<p>Return the glyph index of a given character code. This function uses a charmap object to do the mapping.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face object.</p>
</td></tr>
-<tr valign=top><td><b>load_flags</b></td><td>
-<p>A flag indicating what to load for this glyph. The <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a> constants can be used to control the glyph loading process (e.g., whether the outline should be scaled, whether to load bitmaps or not, whether to hint the outline, etc).</p>
+<tr><td class="val" id="charcode">charcode</td><td class="desc">
+<p>The character code.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>This function simply calls <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> and <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_LOAD_XXX">FT_LOAD_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a> 0x0
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> ( 1L &lt;&lt; 0 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> ( 1L &lt;&lt; 1 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> ( 1L &lt;&lt; 2 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a> ( 1L &lt;&lt; 3 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a> ( 1L &lt;&lt; 4 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a> ( 1L &lt;&lt; 5 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_CROP_BITMAP</a> ( 1L &lt;&lt; 6 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_PEDANTIC</a> ( 1L &lt;&lt; 7 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a> ( 1L &lt;&lt; 9 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a> ( 1L &lt;&lt; 10 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a> ( 1L &lt;&lt; 11 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a> ( 1L &lt;&lt; 12 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a> ( 1L &lt;&lt; 13 )
-#define <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a> ( 1L &lt;&lt; 15 )
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of bit-field constants used with <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to indicate what kind of operations to perform during glyph loading.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_LOAD_DEFAULT</b></td><td>
-<p>Corresponding to&nbsp;0, this value is used as the default glyph load operation. In this case, the following happens:</p>
-<p>1. FreeType looks for a bitmap for the glyph corresponding to the face's current size. If one is found, the function returns. The bitmap data can be accessed from the glyph slot (see note below).</p>
-<p>2. If no embedded bitmap is searched or found, FreeType looks for a scalable outline. If one is found, it is loaded from the font file, scaled to device pixels, then &lsquo;hinted&rsquo; to the pixel grid in order to optimize it. The outline data can be accessed from the glyph slot (see note below).</p>
-<p>Note that by default, the glyph loader doesn't render outlines into bitmaps. The following flags are used to modify this default behaviour to more specific and useful cases.</p>
-</td></tr>
-<tr valign=top><td><b>FT_LOAD_NO_SCALE</b></td><td>
-<p>Don't scale the outline glyph loaded, but keep it in font units.</p>
-<p>This flag implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a>, and unsets <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a>.</p>
-</td></tr>
-<tr valign=top><td><b>FT_LOAD_NO_HINTING</b></td><td>
-<p>Disable hinting. This generally generates &lsquo;blurrier&rsquo; bitmap glyph when the glyph is rendered in any of the anti-aliased modes. See also the note below.</p>
-<p>This flag is implied by <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>.</p>
-</td></tr>
-<tr valign=top><td><b>FT_LOAD_RENDER</b></td><td>
-<p>Call <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a> after the glyph is loaded. By default, the glyph is rendered in <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a> mode. This can be overridden by <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> or <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a>.</p>
-<p>This flag is unset by <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>.</p>
-</td></tr>
-<tr valign=top><td><b>FT_LOAD_NO_BITMAP</b></td><td>
-<p>Ignore bitmap strikes when loading. Bitmap-only fonts ignore this flag.</p>
-<p><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> always sets this flag.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_LOAD_VERTICAL_LAYOUT</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Load the glyph for vertical text layout. <i>Don't</i> use it as it is problematic currently.</p>
-</td></tr>
-<tr valign=top><td><b>FT_LOAD_FORCE_AUTOHINT</b></td><td>
-<p>Indicates that the auto-hinter is preferred over the font's native hinter. See also the note below.</p>
-</td></tr>
-<tr valign=top><td><b>FT_LOAD_CROP_BITMAP</b></td><td>
-<p>Indicates that the font driver should crop the loaded bitmap glyph (i.e., remove all space around its black bits). Not all drivers implement this.</p>
-</td></tr>
-<tr valign=top><td><b>FT_LOAD_PEDANTIC</b></td><td>
-<p>Indicates that the font driver should perform pedantic verifications during glyph loading. This is mostly used to detect broken glyphs in fonts. By default, FreeType tries to handle broken fonts also.</p>
-<p>In particular, errors from the TrueType bytecode engine are not passed to the application if this flag is not set; this might result in partially hinted or distorted glyphs in case a glyph's bytecode is buggy.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Ignored. Deprecated.</p>
-</td></tr>
-<tr valign=top><td><b>FT_LOAD_NO_RECURSE</b></td><td>
-<p>This flag is only used internally. It merely indicates that the font driver should not load composite glyphs recursively. Instead, it should set the &lsquo;num_subglyph&rsquo; and &lsquo;subglyphs&rsquo; values of the glyph slot accordingly, and set &lsquo;glyph-&gt;format&rsquo; to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>.</p>
-<p>The description of sub-glyphs is not available to client applications for now.</p>
-<p>This flag implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a>.</p>
+
+<h4>return</h4>
+<p>The glyph index. 0&nbsp;means &lsquo;undefined character code&rsquo;.</p>
+
+<h4>note</h4>
+<p>If you use FreeType to manipulate the contents of font files directly, be aware that the glyph index returned by this function doesn't always correspond to the internal indices used within the file. This is done to ensure that value&nbsp;0 always corresponds to the &lsquo;missing glyph&rsquo;. If the first glyph is not named &lsquo;.notdef&rsquo;, then for Type&nbsp;1 and Type&nbsp;42 fonts, &lsquo;.notdef&rsquo; will be moved into the glyph ID&nbsp;0 position, and whatever was there will be moved to the position &lsquo;.notdef&rsquo; had. For Type&nbsp;1 fonts, if there is no &lsquo;.notdef&rsquo; glyph at all, then one will be created at index&nbsp;0 and whatever was there will be moved to the last index -- Type&nbsp;42 fonts are considered invalid under this condition.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_First_Char">FT_Get_First_Char</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> )
+ <b>FT_Get_First_Char</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *agindex );
+</pre>
+
+<p>This function is used to return the first character code in the current charmap of a given face. It also returns the corresponding glyph index.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face object.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_LOAD_IGNORE_TRANSFORM</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Indicates that the transform matrix set by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a> should be ignored.</p>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="agindex">agindex</td><td class="desc">
+<p>Glyph index of first character code. 0&nbsp;if charmap is empty.</p>
</td></tr>
-<tr valign=top><td><b>FT_LOAD_MONOCHROME</b></td><td>
-<p>This flag is used with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> to indicate that you want to render an outline glyph to a 1-bit monochrome bitmap glyph, with 8&nbsp;pixels packed into each byte of the bitmap data.</p>
-<p>Note that this has no effect on the hinting algorithm used. You should rather use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> so that the monochrome-optimized hinting algorithm is used.</p>
+</table>
+
+<h4>return</h4>
+<p>The charmap's first character code.</p>
+
+<h4>note</h4>
+<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a> to be able to parse all character codes available in a given charmap. The code should look like this:</p>
+<pre class="colored">
+ FT_ULong charcode;
+ FT_UInt gindex;
+
+
+ charcode = FT_Get_First_Char( face, &amp;gindex );
+ while ( gindex != 0 )
+ {
+ ... do something with (charcode,gindex) pair ...
+
+ charcode = FT_Get_Next_Char( face, charcode, &amp;gindex );
+ }
+</pre>
+<p>Note that &lsquo;*agindex&rsquo; is set to&nbsp;0 if the charmap is empty. The result itself can be&nbsp;0 in two cases: if the charmap is empty or if the value&nbsp;0 is the first valid character code.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Next_Char">FT_Get_Next_Char</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> )
+ <b>FT_Get_Next_Char</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> char_code,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *agindex );
+</pre>
+
+<p>This function is used to return the next character code in the current charmap of a given face following the value &lsquo;char_code&rsquo;, as well as the corresponding glyph index.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face object.</p>
</td></tr>
-<tr valign=top><td><b>FT_LOAD_LINEAR_DESIGN</b></td><td>
-<p>Indicates that the &lsquo;linearHoriAdvance&rsquo; and &lsquo;linearVertAdvance&rsquo; fields of <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> should be kept in font units. See <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> for details.</p>
+<tr><td class="val" id="char_code">char_code</td><td class="desc">
+<p>The starting character code.</p>
</td></tr>
-<tr valign=top><td><b>FT_LOAD_NO_AUTOHINT</b></td><td>
-<p>Disable auto-hinter. See also the note below.</p>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="agindex">agindex</td><td class="desc">
+<p>Glyph index of next character code. 0&nbsp;if charmap is empty.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>By default, hinting is enabled and the font's native hinter (see <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a>) is preferred over the auto-hinter. You can disable hinting by setting <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> or change the precedence by setting <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>. You can also set <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a> in case you don't want the auto-hinter to be used at all.</p>
-<p>See the description of <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a> for a special exception (affecting only a handful of Asian fonts).</p>
-<p>Besides deciding which hinter to use, you can also decide which hinting algorithm to use. See <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> for details.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-#define FT_LOAD_TARGET_( x ) ( (<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>)( (x) &amp; 15 ) &lt;&lt; 16 )
+<h4>return</h4>
+<p>The charmap's next character code.</p>
-#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a> )
-#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LIGHT</a> )
-#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a> )
-#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a> )
-#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD_V</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a> )
+<h4>note</h4>
+<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a> to walk over all character codes available in a given charmap. See the note for this function for a simple code example.</p>
+<p>Note that &lsquo;*agindex&rsquo; is set to&nbsp;0 when there are no more codes in the charmap.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of values that are used to select a specific hinting algorithm to use by the hinter. You should OR one of these values to your &lsquo;load_flags&rsquo; when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
-<p>Note that font's native hinters may ignore the hinting algorithm you have specified (e.g., the TrueType bytecode interpreter). You can set <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a> to ensure that the auto-hinter is used.</p>
-<p>Also note that <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a> is an exception, in that it always implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_LOAD_TARGET_NORMAL</b></td><td>
-<p>This corresponds to the default hinting algorithm, optimized for standard gray-level rendering. For monochrome output, use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> instead.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Name_Index">FT_Get_Name_Index</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
+ <b>FT_Get_Name_Index</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_String">FT_String</a>* glyph_name );
+</pre>
+
+<p>Return the glyph index of a given glyph name. This function uses driver specific objects to do the translation.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face object.</p>
</td></tr>
-<tr valign=top><td><b>FT_LOAD_TARGET_LIGHT</b></td><td>
-<p>A lighter hinting algorithm for non-monochrome modes. Many generated glyphs are more fuzzy but better resemble its original shape. A bit like rendering on Mac OS&nbsp;X.</p>
-<p>As a special exception, this target implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>.</p>
+<tr><td class="val" id="glyph_name">glyph_name</td><td class="desc">
+<p>The glyph name.</p>
</td></tr>
-<tr valign=top><td><b>FT_LOAD_TARGET_MONO</b></td><td>
-<p>Strong hinting algorithm that should only be used for monochrome output. The result is probably unpleasant if the glyph is rendered in non-monochrome modes.</p>
+</table>
+
+<h4>return</h4>
+<p>The glyph index. 0&nbsp;means &lsquo;undefined character code&rsquo;.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Load_Char">FT_Load_Char</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Load_Char</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
+ <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> char_code,
+ <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags );
+</pre>
+
+<p>A function used to load a single glyph into the glyph slot of a face object, according to its character code.</p>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to a target face object where the glyph is loaded.</p>
</td></tr>
-<tr valign=top><td><b>FT_LOAD_TARGET_LCD</b></td><td>
-<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> optimized for horizontally decimated LCD displays.</p>
+</table>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="char_code">char_code</td><td class="desc">
+<p>The glyph's character code, according to the current charmap used in the face.</p>
</td></tr>
-<tr valign=top><td><b>FT_LOAD_TARGET_LCD_V</b></td><td>
-<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> optimized for vertically decimated LCD displays.</p>
+<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
+<p>A flag indicating what to load for this glyph. The <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a> constants can be used to control the glyph loading process (e.g., whether the outline should be scaled, whether to load bitmaps or not, whether to hint the outline, etc).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>You should use only <i>one</i> of the FT_LOAD_TARGET_XXX values in your &lsquo;load_flags&rsquo;. They can't be ORed.</p>
-<p>If <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> is also set, the glyph is rendered in the corresponding mode (i.e., the mode which matches the used algorithm best) unless <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a> is set.</p>
-<p>You can use a hinting algorithm that doesn't correspond to the same rendering mode. As an example, it is possible to use the &lsquo;light&rsquo; hinting algorithm and have the results rendered in horizontal LCD pixel mode, with code like</p>
-<pre class="colored">
- FT_Load_Glyph( face, glyph_index,
- load_flags | FT_LOAD_TARGET_LIGHT );
- FT_Render_Glyph( face-&gt;glyph, FT_RENDER_MODE_LCD );
-</pre>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>note</h4>
+<p>This function simply calls <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> and <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
#define <b>FT_LOAD_TARGET_MODE</b>( x ) ( (<a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a>)( ( (x) &gt;&gt; 16 ) &amp; 15 ) )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> corresponding to a given <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> value.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Set_Transform">FT_Set_Transform</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <span class="keyword">void</span> )
- <b>FT_Set_Transform</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
- <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>* matrix,
- <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* delta );
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A function used to set the transformation that is applied to glyph images when they are loaded into a glyph slot through <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>A handle to the source face object.</p>
+<div class="section">
+<h3 id="FT_Render_Glyph">FT_Render_Glyph</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Render_Glyph</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> slot,
+ <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> render_mode );
+</pre>
+
+<p>Convert a given glyph image to a bitmap. It does so by inspecting the glyph image format, finding the relevant renderer, and invoking it.</p>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="slot">slot</td><td class="desc">
+<p>A handle to the glyph slot containing the image to convert.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>matrix</b></td><td>
-<p>A pointer to the transformation's 2x2 matrix. Use&nbsp;0 for the identity matrix.</p>
-</td></tr>
-<tr valign=top><td><b>delta</b></td><td>
-<p>A pointer to the translation vector. Use&nbsp;0 for the null vector.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="render_mode">render_mode</td><td class="desc">
+<p>This is the render mode used to render the glyph image into a bitmap. See <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> for a list of possible values.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The transformation is only applied to scalable image formats after the glyph has been loaded. It means that hinting is unaltered by the transformation and is performed on the character size given in the last call to <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> or <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a>.</p>
-<p>Note that this also transforms the &lsquo;face.glyph.advance&rsquo; field, but <b>not</b> the values in &lsquo;face.glyph.metrics&rsquo;.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Render_Mode">FT_Render_Mode</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>To get meaningful results, font scaling values must be set with functions like <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> before calling FT_Render_Glyph.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Render_Mode">FT_Render_Mode</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Render_Mode_
{
- <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a> = 0,
- <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LIGHT</a>,
- <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a>,
- <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a>,
- <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a>,
+ <a href="ft2-base_interface.html#FT_RENDER_MODE_NORMAL">FT_RENDER_MODE_NORMAL</a> = 0,
+ <a href="ft2-base_interface.html#FT_RENDER_MODE_LIGHT">FT_RENDER_MODE_LIGHT</a>,
+ <a href="ft2-base_interface.html#FT_RENDER_MODE_MONO">FT_RENDER_MODE_MONO</a>,
+ <a href="ft2-base_interface.html#FT_RENDER_MODE_LCD">FT_RENDER_MODE_LCD</a>,
+ <a href="ft2-base_interface.html#FT_RENDER_MODE_LCD_V">FT_RENDER_MODE_LCD_V</a>,
FT_RENDER_MODE_MAX
} <b>FT_Render_Mode</b>;
-</pre></table><br>
-<table align=center width="87%"><tr><td>
+
+ /* these constants are deprecated; use the corresponding */
+ /* `<b>FT_Render_Mode</b>' values instead */
+#define ft_render_mode_normal <a href="ft2-base_interface.html#FT_RENDER_MODE_NORMAL">FT_RENDER_MODE_NORMAL</a>
+#define ft_render_mode_mono <a href="ft2-base_interface.html#FT_RENDER_MODE_MONO">FT_RENDER_MODE_MONO</a>
+</pre>
+
<p>An enumeration type that lists the render modes supported by FreeType&nbsp;2. Each mode corresponds to a specific type of scanline conversion performed on the outline.</p>
<p>For bitmap fonts and embedded bitmaps the &lsquo;bitmap-&gt;pixel_mode&rsquo; field in the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure gives the format of the returned bitmap.</p>
<p>All modes except <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a> use 256 levels of opacity.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_RENDER_MODE_NORMAL</b></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_RENDER_MODE_NORMAL">FT_RENDER_MODE_NORMAL</td><td class="desc">
<p>This is the default render mode; it corresponds to 8-bit anti-aliased bitmaps.</p>
</td></tr>
-<tr valign=top><td><b>FT_RENDER_MODE_LIGHT</b></td><td>
+<tr><td class="val" id="FT_RENDER_MODE_LIGHT">FT_RENDER_MODE_LIGHT</td><td class="desc">
<p>This is equivalent to <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a>. It is only defined as a separate value because render modes are also used indirectly to define hinting algorithm selectors. See <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> for details.</p>
</td></tr>
-<tr valign=top><td><b>FT_RENDER_MODE_MONO</b></td><td>
+<tr><td class="val" id="FT_RENDER_MODE_MONO">FT_RENDER_MODE_MONO</td><td class="desc">
<p>This mode corresponds to 1-bit bitmaps (with 2&nbsp;levels of opacity).</p>
</td></tr>
-<tr valign=top><td><b>FT_RENDER_MODE_LCD</b></td><td>
+<tr><td class="val" id="FT_RENDER_MODE_LCD">FT_RENDER_MODE_LCD</td><td class="desc">
<p>This mode corresponds to horizontal RGB and BGR sub-pixel displays like LCD screens. It produces 8-bit bitmaps that are 3&nbsp;times the width of the original glyph outline in pixels, and which use the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a> mode.</p>
</td></tr>
-<tr valign=top><td><b>FT_RENDER_MODE_LCD_V</b></td><td>
+<tr><td class="val" id="FT_RENDER_MODE_LCD_V">FT_RENDER_MODE_LCD_V</td><td class="desc">
<p>This mode corresponds to vertical RGB and BGR sub-pixel displays (like PDA screens, rotated LCD displays, etc.). It produces 8-bit bitmaps that are 3&nbsp;times the height of the original glyph outline in pixels and use the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a> mode.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be filtered to reduce color-fringes by using <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> (not active in the default builds). It is up to the caller to either call <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> (if available) or do the filtering itself.</p>
<p>The selected render mode only affects vector glyphs of a font. Embedded bitmaps often have a different pixel mode like <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a>. You can use <a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a> to transform them into 8-bit pixmaps.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="ft_render_mode_xxx">ft_render_mode_xxx</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-base_interface.html#ft_render_mode_xxx">ft_render_mode_normal</a> <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a>
-#define <a href="ft2-base_interface.html#ft_render_mode_xxx">ft_render_mode_mono</a> <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>These constants are deprecated. Use the corresponding <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> values instead.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>ft_render_mode_normal</b></td><td>
-<p>see <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a></p>
-</td></tr>
-<tr valign=top><td><b>ft_render_mode_mono</b></td><td>
-<p>see <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a></p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Render_Glyph">FT_Render_Glyph</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Render_Glyph</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> slot,
- <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> render_mode );
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Convert a given glyph image to a bitmap. It does so by inspecting the glyph image format, finding the relevant renderer, and invoking it.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>slot</b></td><td>
-<p>A handle to the glyph slot containing the image to convert.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>render_mode</b></td><td>
-<p>This is the render mode used to render the glyph image into a bitmap. See <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> for a list of possible values.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Kerning_Mode">FT_Kerning_Mode</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Kerning_Mode_
- {
- <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_DEFAULT</a> = 0,
- <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNFITTED</a>,
- <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a>
-
- } <b>FT_Kerning_Mode</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An enumeration used to specify which kerning values to return in <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_KERNING_DEFAULT</b></td><td>
-<p>Return scaled and grid-fitted kerning distances (value is&nbsp;0).</p>
-</td></tr>
-<tr valign=top><td><b>FT_KERNING_UNFITTED</b></td><td>
-<p>Return scaled but un-grid-fitted kerning distances.</p>
-</td></tr>
-<tr valign=top><td><b>FT_KERNING_UNSCALED</b></td><td>
-<p>Return the kerning vector in original font units.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="ft_kerning_default">ft_kerning_default</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <b>ft_kerning_default</b> <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_DEFAULT</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This constant is deprecated. Please use <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_DEFAULT</a> instead.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="ft_kerning_unfitted">ft_kerning_unfitted</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <b>ft_kerning_unfitted</b> <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNFITTED</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This constant is deprecated. Please use <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNFITTED</a> instead.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="ft_kerning_unscaled">ft_kerning_unscaled</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <b>ft_kerning_unscaled</b> <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This constant is deprecated. Please use <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a> instead.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Kerning">FT_Get_Kerning</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Get_Kerning">FT_Get_Kerning</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_Kerning</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> left_glyph,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> right_glyph,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> kern_mode,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a> *akerning );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the kerning vector between two glyphs of a same face.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a source face object.</p>
</td></tr>
-<tr valign=top><td><b>left_glyph</b></td><td>
+<tr><td class="val" id="left_glyph">left_glyph</td><td class="desc">
<p>The index of the left glyph in the kern pair.</p>
</td></tr>
-<tr valign=top><td><b>right_glyph</b></td><td>
+<tr><td class="val" id="right_glyph">right_glyph</td><td class="desc">
<p>The index of the right glyph in the kern pair.</p>
</td></tr>
-<tr valign=top><td><b>kern_mode</b></td><td>
+<tr><td class="val" id="kern_mode">kern_mode</td><td class="desc">
<p>See <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_Kerning_Mode</a> for more information. Determines the scale and dimension of the returned kerning vector.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>akerning</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="akerning">akerning</td><td class="desc">
<p>The kerning vector. This is either in font units or in pixels (26.6 format) for scalable formats, and in pixels for fixed-sizes formats.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Only horizontal layouts (left-to-right &amp; right-to-left) are supported by this method. Other layouts, or more sophisticated kernings, are out of the scope of this API function -- they can be implemented through format-specific interfaces.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Kerning_Mode">FT_Kerning_Mode</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Kerning_Mode_
+ {
+ <a href="ft2-base_interface.html#FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</a> = 0,
+ <a href="ft2-base_interface.html#FT_KERNING_UNFITTED">FT_KERNING_UNFITTED</a>,
+ <a href="ft2-base_interface.html#FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</a>
+
+ } <b>FT_Kerning_Mode</b>;
+
+
+ /* these constants are deprecated; use the corresponding */
+ /* `<b>FT_Kerning_Mode</b>' values instead */
+#define ft_kerning_default <a href="ft2-base_interface.html#FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</a>
+#define ft_kerning_unfitted <a href="ft2-base_interface.html#FT_KERNING_UNFITTED">FT_KERNING_UNFITTED</a>
+#define ft_kerning_unscaled <a href="ft2-base_interface.html#FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</a>
+</pre>
+
+<p>An enumeration used to specify which kerning values to return in <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</td><td class="desc">
+<p>Return scaled and grid-fitted kerning distances (value is&nbsp;0).</p>
+</td></tr>
+<tr><td class="val" id="FT_KERNING_UNFITTED">FT_KERNING_UNFITTED</td><td class="desc">
+<p>Return scaled but un-grid-fitted kerning distances.</p>
+</td></tr>
+<tr><td class="val" id="FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</td><td class="desc">
+<p>Return the kerning vector in original font units.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Track_Kerning">FT_Get_Track_Kerning</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_Track_Kerning</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> point_size,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> degree,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>* akerning );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the track kerning for a given face object at a given size.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a source face object.</p>
</td></tr>
-<tr valign=top><td><b>point_size</b></td><td>
+<tr><td class="val" id="point_size">point_size</td><td class="desc">
<p>The point size in 16.16 fractional points.</p>
</td></tr>
-<tr valign=top><td><b>degree</b></td><td>
+<tr><td class="val" id="degree">degree</td><td class="desc">
<p>The degree of tightness. Increasingly negative values represent tighter track kerning, while increasingly positive values represent looser track kerning. Value zero means no track kerning.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>akerning</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="akerning">akerning</td><td class="desc">
<p>The kerning in 16.16 fractional points, to be uniformly applied between all glyphs.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Currently, only the Type&nbsp;1 font driver supports track kerning, using data from AFM files (if attached with <a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a> or <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>).</p>
<p>Only very few AFM files come with track kerning data; please refer to the Adobe's AFM specification for more details.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Glyph_Name">FT_Get_Glyph_Name</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_Glyph_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> glyph_index,
<a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a> buffer,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> buffer_max );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the ASCII name of a given glyph in a face. This only works for those faces where <a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a>(face) returns&nbsp;1.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a source face object.</p>
</td></tr>
-<tr valign=top><td><b>glyph_index</b></td><td>
+<tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
<p>The glyph index.</p>
</td></tr>
-<tr valign=top><td><b>buffer_max</b></td><td>
-<p>The maximal number of bytes available in the buffer.</p>
+<tr><td class="val" id="buffer_max">buffer_max</td><td class="desc">
+<p>The maximum number of bytes available in the buffer.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>buffer</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="buffer">buffer</td><td class="desc">
<p>A pointer to a target buffer where the name is copied to.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>An error is returned if the face doesn't provide glyph names or if the glyph index is invalid. In all cases of failure, the first byte of &lsquo;buffer&rsquo; is set to&nbsp;0 to indicate an empty name.</p>
<p>The glyph name is truncated to fit within the buffer if it is too long. The returned string is always zero-terminated.</p>
<p>Be aware that FreeType reorders glyph indices internally so that glyph index&nbsp;0 always corresponds to the &lsquo;missing glyph&rsquo; (called &lsquo;.notdef&rsquo;).</p>
-<p>This function is not compiled within the library if the config macro &lsquo;FT_CONFIG_OPTION_NO_GLYPH_NAMES&rsquo; is defined in &lsquo;include/freetype/config/ftoptions.h&rsquo;.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>This function always returns an error if the config macro &lsquo;FT_CONFIG_OPTION_NO_GLYPH_NAMES&rsquo; is not defined in &lsquo;ftoptions.h&rsquo;.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Get_Postscript_Name">FT_Get_Postscript_Name</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">const</span> <span class="keyword">char</span>* )
<b>FT_Get_Postscript_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the ASCII PostScript name of a given face, if available. This only works with PostScript and TrueType fonts.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>A pointer to the face's PostScript name. NULL if unavailable.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The returned pointer is owned by the face and is destroyed with it.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Select_Charmap">FT_Select_Charmap</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_CharMapRec">FT_CharMapRec</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_CharMapRec_
+ {
+ <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face;
+ <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a> encoding;
+ <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> platform_id;
+ <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> encoding_id;
+
+ } <b>FT_CharMapRec</b>;
+</pre>
+
+<p>The base charmap structure.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the parent face object.</p>
+</td></tr>
+<tr><td class="val" id="encoding">encoding</td><td class="desc">
+<p>An <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a> tag identifying the charmap. Use this with <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a>.</p>
+</td></tr>
+<tr><td class="val" id="platform_id">platform_id</td><td class="desc">
+<p>An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and should be emulated for other formats.</p>
+</td></tr>
+<tr><td class="val" id="encoding_id">encoding_id</td><td class="desc">
+<p>A platform specific encoding number. This also comes from the TrueType specification and should be emulated similarly.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Select_Charmap">FT_Select_Charmap</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Select_Charmap</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a> encoding );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Select a given charmap by its encoding tag (as listed in &lsquo;freetype.h&rsquo;).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>encoding</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="encoding">encoding</td><td class="desc">
<p>A handle to the selected encoding.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function returns an error if no charmap in the face corresponds to the encoding queried here.</p>
-<p>Because many fonts contain more than a single cmap for Unicode encoding, this function has some special code to select the one which covers Unicode best (&lsquo;best&rsquo; in the sense that a UCS-4 cmap is preferred to a UCS-2 cmap). It is thus preferable to <a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a> in this case.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Set_Charmap">FT_Set_Charmap</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>Because many fonts contain more than a single cmap for Unicode encoding, this function has some special code to select the one that covers Unicode best (&lsquo;best&rsquo; in the sense that a UCS-4 cmap is preferred to a UCS-2 cmap). It is thus preferable to <a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a> in this case.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Set_Charmap">FT_Set_Charmap</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Set_Charmap</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a> charmap );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Select a given charmap for character code to glyph index mapping.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>charmap</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="charmap">charmap</td><td class="desc">
<p>A handle to the selected charmap.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function returns an error if the charmap is not part of the face (i.e., if it is not listed in the &lsquo;face-&gt;charmaps&rsquo; table).</p>
<p>It also fails if a type&nbsp;14 charmap is selected.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Charmap_Index">FT_Get_Charmap_Index</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
<b>FT_Get_Charmap_Index</b>( <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a> charmap );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve index of a given charmap.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>charmap</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="charmap">charmap</td><td class="desc">
<p>A handle to a charmap.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The index into the array of character maps within the face to which &lsquo;charmap&rsquo; belongs. If an error occurs, -1 is returned.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Char_Index">FT_Get_Char_Index</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
- <b>FT_Get_Char_Index</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
- <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> charcode );
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return the glyph index of a given character code. This function uses a charmap object to do the mapping.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+<div class="section">
+<h3 id="FT_Get_FSType_Flags">FT_Get_FSType_Flags</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> )
+ <b>FT_Get_FSType_Flags</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+</pre>
+
+<p>Return the fsType flags for a font.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
-<tr valign=top><td><b>charcode</b></td><td>
-<p>The character code.</p>
-</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>The glyph index. 0&nbsp;means &lsquo;undefined character code&rsquo;.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>If you use FreeType to manipulate the contents of font files directly, be aware that the glyph index returned by this function doesn't always correspond to the internal indices used within the file. This is done to ensure that value&nbsp;0 always corresponds to the &lsquo;missing glyph&rsquo;.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_First_Char">FT_Get_First_Char</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> )
- <b>FT_Get_First_Char</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *agindex );
+<h4>return</h4>
+<p>The fsType flags, <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a>.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This function is used to return the first character code in the current charmap of a given face. It also returns the corresponding glyph index.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>A handle to the source face object.</p>
+<h4>note</h4>
+<p>Use this function rather than directly reading the &lsquo;fs_type&rsquo; field in the <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> structure, which is only guaranteed to return the correct results for Type&nbsp;1 fonts.</p>
+
+<h4>since</h4>
+<p>2.3.8</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Get_SubGlyph_Info</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> glyph,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> sub_index,
+ <a href="ft2-basic_types.html#FT_Int">FT_Int</a> *p_index,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *p_flags,
+ <a href="ft2-basic_types.html#FT_Int">FT_Int</a> *p_arg1,
+ <a href="ft2-basic_types.html#FT_Int">FT_Int</a> *p_arg2,
+ <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a> *p_transform );
+</pre>
+
+<p>Retrieve a description of a given subglyph. Only use it if &lsquo;glyph-&gt;format&rsquo; is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>; an error is returned otherwise.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="glyph">glyph</td><td class="desc">
+<p>The source glyph slot.</p>
+</td></tr>
+<tr><td class="val" id="sub_index">sub_index</td><td class="desc">
+<p>The index of the subglyph. Must be less than &lsquo;glyph-&gt;num_subglyphs&rsquo;.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>agindex</b></td><td>
-<p>Glyph index of first character code. 0&nbsp;if charmap is empty.</p>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="p_index">p_index</td><td class="desc">
+<p>The glyph index of the subglyph.</p>
+</td></tr>
+<tr><td class="val" id="p_flags">p_flags</td><td class="desc">
+<p>The subglyph flags, see <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a>.</p>
+</td></tr>
+<tr><td class="val" id="p_arg1">p_arg1</td><td class="desc">
+<p>The subglyph's first argument (if any).</p>
+</td></tr>
+<tr><td class="val" id="p_arg2">p_arg2</td><td class="desc">
+<p>The subglyph's second argument (if any).</p>
+</td></tr>
+<tr><td class="val" id="p_transform">p_transform</td><td class="desc">
+<p>The subglyph transformation (if any).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>The charmap's first character code.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a> to be able to parse all character codes available in a given charmap. The code should look like this:</p>
-<pre class="colored">
- FT_ULong charcode;
- FT_UInt gindex;
-
-
- charcode = FT_Get_First_Char( face, &amp;gindex );
- while ( gindex != 0 )
- {
- ... do something with (charcode,gindex) pair ...
-
- charcode = FT_Get_Next_Char( face, charcode, &amp;gindex );
- }
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>The values of &lsquo;*p_arg1&rsquo;, &lsquo;*p_arg2&rsquo;, and &lsquo;*p_transform&rsquo; must be interpreted depending on the flags returned in &lsquo;*p_flags&rsquo;. See the TrueType specification for details.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Face_Internal">FT_Face_Internal</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Face_InternalRec_* <b>FT_Face_Internal</b>;
</pre>
-<p>Note that &lsquo;*agindex&rsquo; is set to&nbsp;0 if the charmap is empty. The result itself can be&nbsp;0 in two cases: if the charmap is empty or if the value&nbsp;0 is the first valid character code.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Next_Char">FT_Get_Next_Char</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> )
- <b>FT_Get_Next_Char</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
- <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> char_code,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *agindex );
+<p>An opaque handle to an &lsquo;FT_Face_InternalRec&rsquo; structure, used to model private data of a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object.</p>
+<p>This structure might change between releases of FreeType&nbsp;2 and is not generally available to client applications.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This function is used to return the next character code in the current charmap of a given face following the value &lsquo;char_code&rsquo;, as well as the corresponding glyph index.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>A handle to the source face object.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Size_Internal">FT_Size_Internal</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Size_InternalRec_* <b>FT_Size_Internal</b>;
+</pre>
+
+<p>An opaque handle to an &lsquo;FT_Size_InternalRec&rsquo; structure, used to model private data of a given <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Slot_Internal">FT_Slot_Internal</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Slot_InternalRec_* <b>FT_Slot_Internal</b>;
+</pre>
+
+<p>An opaque handle to an &lsquo;FT_Slot_InternalRec&rsquo; structure, used to model private data of a given <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> object.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a> ( 1L &lt;&lt; 0 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</a> ( 1L &lt;&lt; 1 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</a> ( 1L &lt;&lt; 2 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</a> ( 1L &lt;&lt; 3 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</a> ( 1L &lt;&lt; 4 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</a> ( 1L &lt;&lt; 5 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</a> ( 1L &lt;&lt; 6 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_FAST_GLYPHS">FT_FACE_FLAG_FAST_GLYPHS</a> ( 1L &lt;&lt; 7 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a> ( 1L &lt;&lt; 8 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</a> ( 1L &lt;&lt; 9 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</a> ( 1L &lt;&lt; 10 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</a> ( 1L &lt;&lt; 11 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a> ( 1L &lt;&lt; 12 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a> ( 1L &lt;&lt; 13 )
+#define <a href="ft2-base_interface.html#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a> ( 1L &lt;&lt; 14 )
+</pre>
+
+<p>A list of bit flags used in the &lsquo;face_flags&rsquo; field of the <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> structure. They inform client applications of properties of the corresponding face.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</td><td class="desc">
+<p>Indicates that the face contains outline glyphs. This doesn't prevent bitmap strikes, i.e., a face can have both this and and <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a> set.</p>
</td></tr>
-<tr valign=top><td><b>char_code</b></td><td>
-<p>The starting character code.</p>
+<tr><td class="val" id="FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</td><td class="desc">
+<p>Indicates that the face contains bitmap strikes. See also the &lsquo;num_fixed_sizes&rsquo; and &lsquo;available_sizes&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</td><td class="desc">
+<p>Indicates that the face contains fixed-width characters (like Courier, Lucido, MonoType, etc.).</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</td><td class="desc">
+<p>Indicates that the face uses the &lsquo;sfnt&rsquo; storage scheme. For now, this means TrueType and OpenType.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</td><td class="desc">
+<p>Indicates that the face contains horizontal glyph metrics. This should be set for all common formats.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</td><td class="desc">
+<p>Indicates that the face contains vertical glyph metrics. This is only available in some formats, not all of them.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</td><td class="desc">
+<p>Indicates that the face contains kerning information. If set, the kerning distance can be retrieved through the function <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>. Otherwise the function always return the vector (0,0). Note that FreeType doesn't handle kerning data from the &lsquo;GPOS&rsquo; table (as present in some OpenType fonts).</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_FAST_GLYPHS">FT_FACE_FLAG_FAST_GLYPHS</td><td class="desc">
+<p>THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</td><td class="desc">
+<p>Indicates that the font contains multiple masters and is capable of interpolating between them. See the multiple-masters specific API for details.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</td><td class="desc">
+<p>Indicates that the font contains glyph names that can be retrieved through <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a>. Note that some TrueType fonts contain broken glyph name tables. Use the function <a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a> when needed.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</td><td class="desc">
+<p>Used internally by FreeType to indicate that a face's stream was provided by the client application and should not be destroyed when <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> is called. Don't read or test this flag.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</td><td class="desc">
+<p>Set if the font driver has a hinting machine of its own. For example, with TrueType fonts, it makes sense to use data from the SFNT &lsquo;gasp&rsquo; table only if the native TrueType hinting engine (with the bytecode interpreter) is available and active.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</td><td class="desc">
+<p>Set if the font is CID-keyed. In that case, the font is not accessed by glyph indices but by CID values. For subsetted CID-keyed fonts this has the consequence that not all index values are a valid argument to FT_Load_Glyph. Only the CID values for which corresponding glyphs in the subsetted font exist make FT_Load_Glyph return successfully; in all other cases you get an &lsquo;FT_Err_Invalid_Argument&rsquo; error.</p>
+<p>Note that CID-keyed fonts that are in an SFNT wrapper don't have this flag set since the glyphs are accessed in the normal way (using contiguous indices); the &lsquo;CID-ness&rsquo; isn't visible to the application.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</td><td class="desc">
+<p>Set if the font is &lsquo;tricky&rsquo;, this is, it always needs the font format's native hinting engine to get a reasonable result. A typical example is the Chinese font &lsquo;mingli.ttf&rsquo; that uses TrueType bytecode instructions to move and scale all of its subglyphs.</p>
+<p>It is not possible to autohint such fonts using <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>; it will also ignore <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a>. You have to set both <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a> to really disable hinting; however, you probably never want this except for demonstration purposes.</p>
+<p>Currently, there are about a dozen TrueType fonts in the list of tricky fonts; they are hard-coded in file &lsquo;ttobjs.c&rsquo;.</p>
+</td></tr>
+<tr><td class="val" id="FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</td><td class="desc">
+<p>Set if the font has color glyph tables. To access color glyphs use <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>agindex</b></td><td>
-<p>Glyph index of next character code. 0&nbsp;if charmap is empty.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <a href="ft2-base_interface.html#FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</a> ( 1 &lt;&lt; 0 )
+#define <a href="ft2-base_interface.html#FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</a> ( 1 &lt;&lt; 1 )
+</pre>
+
+<p>A list of bit-flags used to indicate the style of a given face. These are used in the &lsquo;style_flags&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</td><td class="desc">
+<p>Indicates that a given face style is italic or oblique.</p>
+</td></tr>
+<tr><td class="val" id="FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</td><td class="desc">
+<p>Indicates that a given face is bold.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>The charmap's next character code.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a> to walk over all character codes available in a given charmap. See the note for this function for a simple code example.</p>
-<p>Note that &lsquo;*agindex&rsquo; is set to&nbsp;0 when there are no more codes in the charmap.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Name_Index">FT_Get_Name_Index</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
- <b>FT_Get_Name_Index</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
- <a href="ft2-basic_types.html#FT_String">FT_String</a>* glyph_name );
+<h4>note</h4>
+<p>The style information as provided by FreeType is very basic. More details are beyond the scope and should be done on a higher level (for example, by analyzing various fields of the &lsquo;OS/2&rsquo; table in SFNT based fonts).</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return the glyph index of a given glyph name. This function uses driver specific objects to do the translation.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>A handle to the source face object.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_OPEN_XXX">FT_OPEN_XXX</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <a href="ft2-base_interface.html#FT_OPEN_MEMORY">FT_OPEN_MEMORY</a> 0x1
+#define <a href="ft2-base_interface.html#FT_OPEN_STREAM">FT_OPEN_STREAM</a> 0x2
+#define <a href="ft2-base_interface.html#FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</a> 0x4
+#define <a href="ft2-base_interface.html#FT_OPEN_DRIVER">FT_OPEN_DRIVER</a> 0x8
+#define <a href="ft2-base_interface.html#FT_OPEN_PARAMS">FT_OPEN_PARAMS</a> 0x10
+
+
+ /* these constants are deprecated; use the corresponding `<b>FT_OPEN_XXX</b>' */
+ /* values instead */
+#define ft_open_memory <a href="ft2-base_interface.html#FT_OPEN_MEMORY">FT_OPEN_MEMORY</a>
+#define ft_open_stream <a href="ft2-base_interface.html#FT_OPEN_STREAM">FT_OPEN_STREAM</a>
+#define ft_open_pathname <a href="ft2-base_interface.html#FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</a>
+#define ft_open_driver <a href="ft2-base_interface.html#FT_OPEN_DRIVER">FT_OPEN_DRIVER</a>
+#define ft_open_params <a href="ft2-base_interface.html#FT_OPEN_PARAMS">FT_OPEN_PARAMS</a>
+</pre>
+
+<p>A list of bit-field constants used within the &lsquo;flags&rsquo; field of the <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a> structure.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_OPEN_MEMORY">FT_OPEN_MEMORY</td><td class="desc">
+<p>This is a memory-based stream.</p>
</td></tr>
-<tr valign=top><td><b>glyph_name</b></td><td>
-<p>The glyph name.</p>
+<tr><td class="val" id="FT_OPEN_STREAM">FT_OPEN_STREAM</td><td class="desc">
+<p>Copy the stream from the &lsquo;stream&rsquo; field.</p>
+</td></tr>
+<tr><td class="val" id="FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</td><td class="desc">
+<p>Create a new input stream from a C&nbsp;path name.</p>
+</td></tr>
+<tr><td class="val" id="FT_OPEN_DRIVER">FT_OPEN_DRIVER</td><td class="desc">
+<p>Use the &lsquo;driver&rsquo; field.</p>
+</td></tr>
+<tr><td class="val" id="FT_OPEN_PARAMS">FT_OPEN_PARAMS</td><td class="desc">
+<p>Use the &lsquo;num_params&rsquo; and &lsquo;params&rsquo; fields.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>The glyph index. 0&nbsp;means &lsquo;undefined character code&rsquo;.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a> 1
-#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a> 2
-#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a> 4
-#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_SCALE</a> 8
-#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XY_SCALE</a> 0x40
-#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_2X2</a> 0x80
-#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a> 0x200
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of constants used to describe subglyphs. Please refer to the TrueType specification for the meaning of the various flags.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td colspan=0><b>FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</b></td></tr>
-<tr valign=top><td></td><td>
-<p></p>
+
+<h4>note</h4>
+<p>The &lsquo;FT_OPEN_MEMORY&rsquo;, &lsquo;FT_OPEN_STREAM&rsquo;, and &lsquo;FT_OPEN_PATHNAME&rsquo; flags are mutually exclusive.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_LOAD_XXX">FT_LOAD_XXX</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <a href="ft2-base_interface.html#FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</a> 0x0
+#define <a href="ft2-base_interface.html#FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</a> ( 1L &lt;&lt; 0 )
+#define <a href="ft2-base_interface.html#FT_LOAD_NO_HINTING">FT_LOAD_NO_HINTING</a> ( 1L &lt;&lt; 1 )
+#define <a href="ft2-base_interface.html#FT_LOAD_RENDER">FT_LOAD_RENDER</a> ( 1L &lt;&lt; 2 )
+#define <a href="ft2-base_interface.html#FT_LOAD_NO_BITMAP">FT_LOAD_NO_BITMAP</a> ( 1L &lt;&lt; 3 )
+#define <a href="ft2-base_interface.html#FT_LOAD_VERTICAL_LAYOUT">FT_LOAD_VERTICAL_LAYOUT</a> ( 1L &lt;&lt; 4 )
+#define <a href="ft2-base_interface.html#FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</a> ( 1L &lt;&lt; 5 )
+#define <a href="ft2-base_interface.html#FT_LOAD_CROP_BITMAP">FT_LOAD_CROP_BITMAP</a> ( 1L &lt;&lt; 6 )
+#define <a href="ft2-base_interface.html#FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</a> ( 1L &lt;&lt; 7 )
+#define <a href="ft2-base_interface.html#FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a> ( 1L &lt;&lt; 9 )
+#define <a href="ft2-base_interface.html#FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</a> ( 1L &lt;&lt; 10 )
+#define <a href="ft2-base_interface.html#FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</a> ( 1L &lt;&lt; 11 )
+#define <a href="ft2-base_interface.html#FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</a> ( 1L &lt;&lt; 12 )
+#define <a href="ft2-base_interface.html#FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</a> ( 1L &lt;&lt; 13 )
+#define <a href="ft2-base_interface.html#FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</a> ( 1L &lt;&lt; 15 )
+ /* Bits 16..19 are used by `FT_LOAD_TARGET_' */
+#define <a href="ft2-base_interface.html#FT_LOAD_COLOR">FT_LOAD_COLOR</a> ( 1L &lt;&lt; 20 )
+</pre>
+
+<p>A list of bit-field constants used with <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to indicate what kind of operations to perform during glyph loading.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</td><td class="desc">
+<p>Corresponding to&nbsp;0, this value is used as the default glyph load operation. In this case, the following happens:</p>
+<p>1. FreeType looks for a bitmap for the glyph corresponding to the face's current size. If one is found, the function returns. The bitmap data can be accessed from the glyph slot (see note below).</p>
+<p>2. If no embedded bitmap is searched or found, FreeType looks for a scalable outline. If one is found, it is loaded from the font file, scaled to device pixels, then &lsquo;hinted&rsquo; to the pixel grid in order to optimize it. The outline data can be accessed from the glyph slot (see note below).</p>
+<p>Note that by default, the glyph loader doesn't render outlines into bitmaps. The following flags are used to modify this default behaviour to more specific and useful cases.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</b></td></tr>
-<tr valign=top><td></td><td>
-<p></p>
+<tr><td class="val" id="FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</td><td class="desc">
+<p>Don't scale the loaded outline glyph but keep it in font units.</p>
+<p>This flag implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a>, and unsets <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a>.</p>
+<p>If the font is &lsquo;tricky&rsquo; (see <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a> for more), using FT_LOAD_NO_SCALE usually yields meaningless outlines because the subglyphs must be scaled and positioned with hinting instructions. This can be solved by loading the font without FT_LOAD_NO_SCALE and setting the character size to &lsquo;font-&gt;units_per_EM&rsquo;.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</b></td></tr>
-<tr valign=top><td></td><td>
-<p></p>
+<tr><td class="val" id="FT_LOAD_NO_HINTING">FT_LOAD_NO_HINTING</td><td class="desc">
+<p>Disable hinting. This generally generates &lsquo;blurrier&rsquo; bitmap glyphs when the glyph are rendered in any of the anti-aliased modes. See also the note below.</p>
+<p>This flag is implied by <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>.</p>
</td></tr>
-<tr valign=top><td><b>FT_SUBGLYPH_FLAG_SCALE</b></td><td>
-<p></p>
+<tr><td class="val" id="FT_LOAD_RENDER">FT_LOAD_RENDER</td><td class="desc">
+<p>Call <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a> after the glyph is loaded. By default, the glyph is rendered in <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a> mode. This can be overridden by <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> or <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a>.</p>
+<p>This flag is unset by <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_SUBGLYPH_FLAG_XY_SCALE</b></td></tr>
-<tr valign=top><td></td><td>
-<p></p>
+<tr><td class="val" id="FT_LOAD_NO_BITMAP">FT_LOAD_NO_BITMAP</td><td class="desc">
+<p>Ignore bitmap strikes when loading. Bitmap-only fonts ignore this flag.</p>
+<p><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> always sets this flag.</p>
</td></tr>
-<tr valign=top><td><b>FT_SUBGLYPH_FLAG_2X2</b></td><td>
-<p></p>
+<tr><td class="val" id="FT_LOAD_VERTICAL_LAYOUT">FT_LOAD_VERTICAL_LAYOUT</td><td class="desc">
+<p>Load the glyph for vertical text layout. In particular, the &lsquo;advance&rsquo; value in the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure is set to the &lsquo;vertAdvance&rsquo; value of the &lsquo;metrics&rsquo; field.</p>
+<p>In case <a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a> doesn't return true, you shouldn't use this flag currently. Reason is that in this case vertical metrics get synthesized, and those values are not always consistent across various font formats.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_SUBGLYPH_FLAG_USE_MY_METRICS</b></td></tr>
-<tr valign=top><td></td><td>
-<p></p>
+<tr><td class="val" id="FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</td><td class="desc">
+<p>Indicates that the auto-hinter is preferred over the font's native hinter. See also the note below.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</td><td class="desc">
+<p>Indicates that the font driver should perform pedantic verifications during glyph loading. This is mostly used to detect broken glyphs in fonts. By default, FreeType tries to handle broken fonts also.</p>
+<p>In particular, errors from the TrueType bytecode engine are not passed to the application if this flag is not set; this might result in partially hinted or distorted glyphs in case a glyph's bytecode is buggy.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</td><td class="desc">
+<p>Indicate that the font driver should not load composite glyphs recursively. Instead, it should set the &lsquo;num_subglyph&rsquo; and &lsquo;subglyphs&rsquo; values of the glyph slot accordingly, and set &lsquo;glyph-&gt;format&rsquo; to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>. The description of subglyphs can then be accessed with <a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a>.</p>
+<p>This flag implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a>.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</td><td class="desc">
+<p>Indicates that the transform matrix set by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a> should be ignored.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</td><td class="desc">
+<p>This flag is used with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> to indicate that you want to render an outline glyph to a 1-bit monochrome bitmap glyph, with 8&nbsp;pixels packed into each byte of the bitmap data.</p>
+<p>Note that this has no effect on the hinting algorithm used. You should rather use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> so that the monochrome-optimized hinting algorithm is used.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</td><td class="desc">
+<p>Indicates that the &lsquo;linearHoriAdvance&rsquo; and &lsquo;linearVertAdvance&rsquo; fields of <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> should be kept in font units. See <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> for details.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</td><td class="desc">
+<p>Disable auto-hinter. See also the note below.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_COLOR">FT_LOAD_COLOR</td><td class="desc">
+<p>This flag is used to request loading of color embedded-bitmap images. The resulting color bitmaps, if available, will have the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a> format. When the flag is not used and color bitmaps are found, they will be converted to 256-level gray bitmaps transparently. Those bitmaps will be in the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a> format.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_CROP_BITMAP">FT_LOAD_CROP_BITMAP</td><td class="desc">
+<p>Ignored. Deprecated.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</td><td class="desc">
+<p>Ignored. Deprecated.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>note</h4>
+<p>By default, hinting is enabled and the font's native hinter (see <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a>) is preferred over the auto-hinter. You can disable hinting by setting <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> or change the precedence by setting <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>. You can also set <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a> in case you don't want the auto-hinter to be used at all.</p>
+<p>See the description of <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a> for a special exception (affecting only a handful of Asian fonts).</p>
+<p>Besides deciding which hinter to use, you can also decide which hinting algorithm to use. See <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> for details.</p>
+<p>Note that the auto-hinter needs a valid Unicode cmap (either a native one or synthesized by FreeType) for producing correct results. If a font provides an incorrect mapping (for example, assigning the character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a mathematical integral sign), the auto-hinter might produce useless results.</p>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Get_SubGlyph_Info</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> glyph,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> sub_index,
- <a href="ft2-basic_types.html#FT_Int">FT_Int</a> *p_index,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *p_flags,
- <a href="ft2-basic_types.html#FT_Int">FT_Int</a> *p_arg1,
- <a href="ft2-basic_types.html#FT_Int">FT_Int</a> *p_arg2,
- <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a> *p_transform );
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Retrieve a description of a given subglyph. Only use it if &lsquo;glyph-&gt;format&rsquo; is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>; an error is returned otherwise.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>glyph</b></td><td>
-<p>The source glyph slot.</p>
+<div class="section">
+<h3 id="FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define FT_LOAD_TARGET_( x ) ( (<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>)( (x) &amp; 15 ) &lt;&lt; 16 )
+
+#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_NORMAL">FT_RENDER_MODE_NORMAL</a> )
+#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_LIGHT">FT_RENDER_MODE_LIGHT</a> )
+#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_MONO">FT_RENDER_MODE_MONO</a> )
+#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_LCD">FT_RENDER_MODE_LCD</a> )
+#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</a> FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_LCD_V">FT_RENDER_MODE_LCD_V</a> )
+</pre>
+
+<p>A list of values that are used to select a specific hinting algorithm to use by the hinter. You should OR one of these values to your &lsquo;load_flags&rsquo; when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
+<p>Note that font's native hinters may ignore the hinting algorithm you have specified (e.g., the TrueType bytecode interpreter). You can set <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a> to ensure that the auto-hinter is used.</p>
+<p>Also note that <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a> is an exception, in that it always implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</td><td class="desc">
+<p>This corresponds to the default hinting algorithm, optimized for standard gray-level rendering. For monochrome output, use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> instead.</p>
</td></tr>
-<tr valign=top><td><b>sub_index</b></td><td>
-<p>The index of the subglyph. Must be less than &lsquo;glyph-&gt;num_subglyphs&rsquo;.</p>
+<tr><td class="val" id="FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</td><td class="desc">
+<p>A lighter hinting algorithm for non-monochrome modes. Many generated glyphs are more fuzzy but better resemble its original shape. A bit like rendering on Mac OS&nbsp;X.</p>
+<p>As a special exception, this target implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</td><td class="desc">
+<p>Strong hinting algorithm that should only be used for monochrome output. The result is probably unpleasant if the glyph is rendered in non-monochrome modes.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</td><td class="desc">
+<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> optimized for horizontally decimated LCD displays.</p>
+</td></tr>
+<tr><td class="val" id="FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</td><td class="desc">
+<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> optimized for vertically decimated LCD displays.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
+
+<h4>note</h4>
+<p>You should use only <i>one</i> of the FT_LOAD_TARGET_XXX values in your &lsquo;load_flags&rsquo;. They can't be ORed.</p>
+<p>If <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> is also set, the glyph is rendered in the corresponding mode (i.e., the mode that matches the used algorithm best). An exeption is FT_LOAD_TARGET_MONO since it implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a>.</p>
+<p>You can use a hinting algorithm that doesn't correspond to the same rendering mode. As an example, it is possible to use the &lsquo;light&rsquo; hinting algorithm and have the results rendered in horizontal LCD pixel mode, with code like</p>
+<pre class="colored">
+ FT_Load_Glyph( face, glyph_index,
+ load_flags | FT_LOAD_TARGET_LIGHT );
+
+ FT_Render_Glyph( face-&gt;glyph, FT_RENDER_MODE_LCD );
+</pre>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a> 1
+#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a> 2
+#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a> 4
+#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_SCALE">FT_SUBGLYPH_FLAG_SCALE</a> 8
+#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XY_SCALE">FT_SUBGLYPH_FLAG_XY_SCALE</a> 0x40
+#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_2X2">FT_SUBGLYPH_FLAG_2X2</a> 0x80
+#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_USE_MY_METRICS">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a> 0x200
+</pre>
+
+<p>A list of constants used to describe subglyphs. Please refer to the TrueType specification for the meaning of the various flags.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</td><td class="desc">
<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>p_index</b></td><td>
-<p>The glyph index of the subglyph.</p>
</td></tr>
-<tr valign=top><td><b>p_flags</b></td><td>
-<p>The subglyph flags, see <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a>.</p>
+<tr><td class="val" id="FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</td><td class="desc">
+<p></p>
</td></tr>
-<tr valign=top><td><b>p_arg1</b></td><td>
-<p>The subglyph's first argument (if any).</p>
+<tr><td class="val" id="FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</td><td class="desc">
+<p></p>
</td></tr>
-<tr valign=top><td><b>p_arg2</b></td><td>
-<p>The subglyph's second argument (if any).</p>
+<tr><td class="val" id="FT_SUBGLYPH_FLAG_SCALE">FT_SUBGLYPH_FLAG_SCALE</td><td class="desc">
+<p></p>
</td></tr>
-<tr valign=top><td><b>p_transform</b></td><td>
-<p>The subglyph transformation (if any).</p>
+<tr><td class="val" id="FT_SUBGLYPH_FLAG_XY_SCALE">FT_SUBGLYPH_FLAG_XY_SCALE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="FT_SUBGLYPH_FLAG_2X2">FT_SUBGLYPH_FLAG_2X2</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="FT_SUBGLYPH_FLAG_USE_MY_METRICS">FT_SUBGLYPH_FLAG_USE_MY_METRICS</td><td class="desc">
+<p></p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The values of &lsquo;*p_arg1&rsquo;, &lsquo;*p_arg2&rsquo;, and &lsquo;*p_transform&rsquo; must be interpreted depending on the flags returned in &lsquo;*p_flags&rsquo;. See the TrueType specification for details.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_INSTALLABLE_EMBEDDING</a> 0x0000
-#define <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a> 0x0002
-#define <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a> 0x0004
-#define <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_EDITABLE_EMBEDDING</a> 0x0008
-#define <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_NO_SUBSETTING</a> 0x0100
-#define <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a> 0x0200
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_FSTYPE_XXX">FT_FSTYPE_XXX</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <a href="ft2-base_interface.html#FT_FSTYPE_INSTALLABLE_EMBEDDING">FT_FSTYPE_INSTALLABLE_EMBEDDING</a> 0x0000
+#define <a href="ft2-base_interface.html#FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a> 0x0002
+#define <a href="ft2-base_interface.html#FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a> 0x0004
+#define <a href="ft2-base_interface.html#FT_FSTYPE_EDITABLE_EMBEDDING">FT_FSTYPE_EDITABLE_EMBEDDING</a> 0x0008
+#define <a href="ft2-base_interface.html#FT_FSTYPE_NO_SUBSETTING">FT_FSTYPE_NO_SUBSETTING</a> 0x0100
+#define <a href="ft2-base_interface.html#FT_FSTYPE_BITMAP_EMBEDDING_ONLY">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a> 0x0200
+</pre>
+
<p>A list of bit flags used in the &lsquo;fsType&rsquo; field of the OS/2 table in a TrueType or OpenType font and the &lsquo;FSType&rsquo; entry in a PostScript font. These bit flags are returned by <a href="ft2-base_interface.html#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a>; they inform client applications of embedding and subsetting restrictions associated with a font.</p>
-<p>See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for more details.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td colspan=0><b>FT_FSTYPE_INSTALLABLE_EMBEDDING</b></td></tr>
-<tr valign=top><td></td><td>
+<p>See <a href="http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf">http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf</a> for more details.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_FSTYPE_INSTALLABLE_EMBEDDING">FT_FSTYPE_INSTALLABLE_EMBEDDING</td><td class="desc">
<p>Fonts with no fsType bit set may be embedded and permanently installed on the remote system by an application.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</td><td class="desc">
<p>Fonts that have only this bit set must not be modified, embedded or exchanged in any manner without first obtaining permission of the font software copyright owner.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</td><td class="desc">
<p>If this bit is set, the font may be embedded and temporarily loaded on the remote system. Documents containing Preview &amp; Print fonts must be opened &lsquo;read-only&rsquo;; no edits can be applied to the document.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_FSTYPE_EDITABLE_EMBEDDING</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_FSTYPE_EDITABLE_EMBEDDING">FT_FSTYPE_EDITABLE_EMBEDDING</td><td class="desc">
<p>If this bit is set, the font may be embedded but must only be installed temporarily on other systems. In contrast to Preview &amp; Print fonts, documents containing editable fonts may be opened for reading, editing is permitted, and changes may be saved.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_FSTYPE_NO_SUBSETTING</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_FSTYPE_NO_SUBSETTING">FT_FSTYPE_NO_SUBSETTING</td><td class="desc">
<p>If this bit is set, the font may not be subsetted prior to embedding.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_FSTYPE_BITMAP_EMBEDDING_ONLY</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_FSTYPE_BITMAP_EMBEDDING_ONLY">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</td><td class="desc">
<p>If this bit is set, only bitmaps contained in the font may be embedded; no outline data may be embedded. If there are no bitmaps available in the font, then the font is unembeddable.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>While the fsType flags can indicate that a font may be embedded, a license with the font vendor may be separately required to use the font in this way.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> )
- <b>FT_Get_FSType_Flags</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return the fsType flags for a font.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
-<p>A handle to the source face object.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>The fsType flags, <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a>.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>Use this function rather than directly reading the &lsquo;fs_type&rsquo; field in the <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> structure which is only guaranteed to return the correct results for Type&nbsp;1 fonts.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
-<p>2.3.8</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+<div class="section">
+<h3 id="FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <b>FT_HAS_FAST_GLYPHS</b>( face ) 0
+</pre>
+
+<p>Deprecated.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-basic_types.html b/docs/reference/ft2-basic_types.html
index 510d04b..e39573d 100644
--- a/docs/reference/ft2-basic_types.html
+++ b/docs/reference/ft2-basic_types.html
@@ -3,1171 +3,867 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Basic Data Types
-</h1></center>
+<h1>Basic Data Types</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Byte">FT_Byte</a></td><td></td><td><a href="#FT_Offset">FT_Offset</a></td><td></td><td><a href="#FT_UnitVector">FT_UnitVector</a></td></tr>
-<tr><td></td><td><a href="#FT_Bytes">FT_Bytes</a></td><td></td><td><a href="#FT_PtrDist">FT_PtrDist</a></td><td></td><td><a href="#FT_F26Dot6">FT_F26Dot6</a></td></tr>
-<tr><td></td><td><a href="#FT_Char">FT_Char</a></td><td></td><td><a href="#FT_String">FT_String</a></td><td></td><td><a href="#FT_Pixel_Mode">FT_Pixel_Mode</a></td></tr>
-<tr><td></td><td><a href="#FT_Int">FT_Int</a></td><td></td><td><a href="#FT_Tag">FT_Tag</a></td><td></td><td><a href="#ft_pixel_mode_xxx">ft_pixel_mode_xxx</a></td></tr>
-<tr><td></td><td><a href="#FT_UInt">FT_UInt</a></td><td></td><td><a href="#FT_Error">FT_Error</a></td><td></td><td><a href="#FT_Palette_Mode">FT_Palette_Mode</a></td></tr>
-<tr><td></td><td><a href="#FT_Int16">FT_Int16</a></td><td></td><td><a href="#FT_Fixed">FT_Fixed</a></td><td></td><td><a href="#FT_Bitmap">FT_Bitmap</a></td></tr>
-<tr><td></td><td><a href="#FT_UInt16">FT_UInt16</a></td><td></td><td><a href="#FT_Pointer">FT_Pointer</a></td><td></td><td><a href="#FT_IMAGE_TAG">FT_IMAGE_TAG</a></td></tr>
-<tr><td></td><td><a href="#FT_Int32">FT_Int32</a></td><td></td><td><a href="#FT_Pos">FT_Pos</a></td><td></td><td><a href="#FT_Glyph_Format">FT_Glyph_Format</a></td></tr>
-<tr><td></td><td><a href="#FT_UInt32">FT_UInt32</a></td><td></td><td><a href="#FT_Vector">FT_Vector</a></td><td></td><td><a href="#ft_glyph_format_xxx">ft_glyph_format_xxx</a></td></tr>
-<tr><td></td><td><a href="#FT_Short">FT_Short</a></td><td></td><td><a href="#FT_BBox">FT_BBox</a></td><td></td><td><a href="#FT_Data">FT_Data</a></td></tr>
-<tr><td></td><td><a href="#FT_UShort">FT_UShort</a></td><td></td><td><a href="#FT_Matrix">FT_Matrix</a></td><td></td><td><a href="#FT_Generic_Finalizer">FT_Generic_Finalizer</a></td></tr>
-<tr><td></td><td><a href="#FT_Long">FT_Long</a></td><td></td><td><a href="#FT_FWord">FT_FWord</a></td><td></td><td><a href="#FT_Generic">FT_Generic</a></td></tr>
-<tr><td></td><td><a href="#FT_ULong">FT_ULong</a></td><td></td><td><a href="#FT_UFWord">FT_UFWord</a></td><td></td><td><a href="#FT_MAKE_TAG">FT_MAKE_TAG</a></td></tr>
-<tr><td></td><td><a href="#FT_Bool">FT_Bool</a></td><td></td><td><a href="#FT_F2Dot14">FT_F2Dot14</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_Byte">FT_Byte</a></td><td><a href="#FT_Bool">FT_Bool</a></td><td><a href="#FT_UnitVector">FT_UnitVector</a></td></tr>
+<tr><td><a href="#FT_Bytes">FT_Bytes</a></td><td><a href="#FT_Offset">FT_Offset</a></td><td><a href="#FT_F26Dot6">FT_F26Dot6</a></td></tr>
+<tr><td><a href="#FT_Char">FT_Char</a></td><td><a href="#FT_PtrDist">FT_PtrDist</a></td><td><a href="#FT_Data">FT_Data</a></td></tr>
+<tr><td><a href="#FT_Int">FT_Int</a></td><td><a href="#FT_String">FT_String</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_UInt">FT_UInt</a></td><td><a href="#FT_Tag">FT_Tag</a></td><td><a href="#FT_MAKE_TAG">FT_MAKE_TAG</a></td></tr>
+<tr><td><a href="#FT_Int16">FT_Int16</a></td><td><a href="#FT_Error">FT_Error</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_UInt16">FT_UInt16</a></td><td><a href="#FT_Fixed">FT_Fixed</a></td><td><a href="#FT_Generic">FT_Generic</a></td></tr>
+<tr><td><a href="#FT_Int32">FT_Int32</a></td><td><a href="#FT_Pointer">FT_Pointer</a></td><td><a href="#FT_Generic_Finalizer">FT_Generic_Finalizer</a></td></tr>
+<tr><td><a href="#FT_UInt32">FT_UInt32</a></td><td><a href="#FT_Pos">FT_Pos</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Int64">FT_Int64</a></td><td><a href="#FT_Vector">FT_Vector</a></td><td><a href="#FT_Bitmap">FT_Bitmap</a></td></tr>
+<tr><td><a href="#FT_UInt64">FT_UInt64</a></td><td><a href="#FT_BBox">FT_BBox</a></td><td><a href="#FT_Pixel_Mode">FT_Pixel_Mode</a></td></tr>
+<tr><td><a href="#FT_Short">FT_Short</a></td><td><a href="#FT_Matrix">FT_Matrix</a></td><td><a href="#FT_Palette_Mode">FT_Palette_Mode</a></td></tr>
+<tr><td><a href="#FT_UShort">FT_UShort</a></td><td><a href="#FT_FWord">FT_FWord</a></td><td><a href="#FT_Glyph_Format">FT_Glyph_Format</a></td></tr>
+<tr><td><a href="#FT_Long">FT_Long</a></td><td><a href="#FT_UFWord">FT_UFWord</a></td><td><a href="#FT_IMAGE_TAG">FT_IMAGE_TAG</a></td></tr>
+<tr><td><a href="#FT_ULong">FT_ULong</a></td><td><a href="#FT_F2Dot14">FT_F2Dot14</a></td><td></td></tr>
+</table>
+
+
<p>This section contains the basic data types defined by FreeType&nbsp;2, ranging from simple scalar types to bitmap descriptors. More font-specific structures are defined in a different section.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Byte">FT_Byte</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Byte">FT_Byte</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <b>FT_Byte</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A simple typedef for the <i>unsigned</i> char type.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Bytes">FT_Bytes</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Bytes">FT_Bytes</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* <b>FT_Bytes</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for constant memory areas.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Char">FT_Char</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Char">FT_Char</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">char</span> <b>FT_Char</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A simple typedef for the <i>signed</i> char type.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Int">FT_Int</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Int">FT_Int</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">int</span> <b>FT_Int</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for the int type.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_UInt">FT_UInt</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_UInt">FT_UInt</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <b>FT_UInt</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for the unsigned int type.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Int16">FT_Int16</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Int16">FT_Int16</h3>
+<p>Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_Int16</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for a 16bit signed integer type.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_UInt16">FT_UInt16</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_UInt16">FT_UInt16</h3>
+<p>Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <b>FT_UInt16</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for a 16bit unsigned integer type.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Int32">FT_Int32</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Int32">FT_Int32</h3>
+<p>Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> XXX <b>FT_Int32</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for a 32bit signed integer type. The size depends on the configuration.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_UInt32">FT_UInt32</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">unsigned</span> XXX <b>FT_UInt32</b>;
-</pre></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Short">FT_Short</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_UInt32">FT_UInt32</h3>
+<p>Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">unsigned</span> XXX <b>FT_UInt32</b>;
+</pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Int64">FT_Int64</h3>
+<p>Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">signed</span> XXX <b>FT_Int64</b>;
+</pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_UInt64">FT_UInt64</h3>
+<p>Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">unsigned</span> XXX <b>FT_UInt64</b>;
+</pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Short">FT_Short</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_Short</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for signed short.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_UShort">FT_UShort</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_UShort">FT_UShort</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <b>FT_UShort</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for unsigned short.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Long">FT_Long</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Long">FT_Long</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_Long</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for signed long.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ULong">FT_ULong</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_ULong">FT_ULong</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <b>FT_ULong</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for unsigned long.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Bool">FT_Bool</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Bool">FT_Bool</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <b>FT_Bool</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef of unsigned char, used for simple booleans. As usual, values 1 and&nbsp;0 represent true and false, respectively.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Offset">FT_Offset</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Offset">FT_Offset</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> size_t <b>FT_Offset</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This is equivalent to the ANSI&nbsp;C &lsquo;size_t&rsquo; type, i.e., the largest <i>unsigned</i> integer type used to express a file size or position, or a memory block size.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_PtrDist">FT_PtrDist</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PtrDist">FT_PtrDist</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> ft_ptrdiff_t <b>FT_PtrDist</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This is equivalent to the ANSI&nbsp;C &lsquo;ptrdiff_t&rsquo; type, i.e., the largest <i>signed</i> integer type used to express the distance between two pointers.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_String">FT_String</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_String">FT_String</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">char</span> <b>FT_String</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A simple typedef for the char type, usually used for strings.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Tag">FT_Tag</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Tag">FT_Tag</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a> <b>FT_Tag</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A typedef for 32-bit tags (as used in the SFNT format).</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Error">FT_Error</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Error">FT_Error</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">int</span> <b>FT_Error</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>The FreeType error code type. A value of&nbsp;0 is always interpreted as a successful operation.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Fixed">FT_Fixed</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Fixed">FT_Fixed</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_Fixed</b>;
+</pre>
+
+<p>This type is used to store 16.16 fixed-point values, like scaling values or matrix coefficients.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This type is used to store 16.16 fixed float values, like scaling values or matrix coefficients.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Pointer">FT_Pointer</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Pointer">FT_Pointer</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">void</span>* <b>FT_Pointer</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A simple typedef for a typeless pointer.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Pos">FT_Pos</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Pos">FT_Pos</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_Pos</b>;
+</pre>
+
+<p>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-point pixel coordinates.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>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.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Vector">FT_Vector</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Vector">FT_Vector</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Vector_
{
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> x;
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> y;
} <b>FT_Vector</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A simple structure used to store a 2D vector; coordinates are of the FT_Pos type.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>x</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="x">x</td><td class="desc">
<p>The horizontal coordinate.</p>
</td></tr>
-<tr valign=top><td><b>y</b></td><td>
+<tr><td class="val" id="y">y</td><td class="desc">
<p>The vertical coordinate.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_BBox">FT_BBox</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_BBox">FT_BBox</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_BBox_
{
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> xMin, yMin;
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> xMax, yMax;
} <b>FT_BBox</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to hold an outline's bounding box, i.e., the coordinates of its extrema in the horizontal and vertical directions.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>xMin</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="xMin">xMin</td><td class="desc">
<p>The horizontal minimum (left-most).</p>
</td></tr>
-<tr valign=top><td><b>yMin</b></td><td>
+<tr><td class="val" id="yMin">yMin</td><td class="desc">
<p>The vertical minimum (bottom-most).</p>
</td></tr>
-<tr valign=top><td><b>xMax</b></td><td>
+<tr><td class="val" id="xMax">xMax</td><td class="desc">
<p>The horizontal maximum (right-most).</p>
</td></tr>
-<tr valign=top><td><b>yMax</b></td><td>
+<tr><td class="val" id="yMax">yMax</td><td class="desc">
<p>The vertical maximum (top-most).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>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.</p>
<p>If &lsquo;yMin&rsquo; is negative, this value gives the glyph's descender. Otherwise, the glyph doesn't descend below the baseline. Similarly, if &lsquo;ymax&rsquo; is positive, this value gives the glyph's ascender.</p>
<p>&lsquo;xMin&rsquo; gives the horizontal distance from the glyph's origin to the left edge of the glyph's bounding box. If &lsquo;xMin&rsquo; is negative, the glyph extends to the left of the origin.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Matrix">FT_Matrix</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Matrix">FT_Matrix</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Matrix_
{
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> xx, xy;
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> yx, yy;
} <b>FT_Matrix</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A simple structure used to store a 2x2 matrix. Coefficients are in 16.16 fixed float format. The computation performed is:</p>
+<p>A simple structure used to store a 2x2 matrix. Coefficients are in 16.16 fixed-point format. The computation performed is:</p>
<pre class="colored">
x' = x*xx + y*xy
y' = x*yx + y*yy
</pre>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>xx</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="xx">xx</td><td class="desc">
<p>Matrix coefficient.</p>
</td></tr>
-<tr valign=top><td><b>xy</b></td><td>
+<tr><td class="val" id="xy">xy</td><td class="desc">
<p>Matrix coefficient.</p>
</td></tr>
-<tr valign=top><td><b>yx</b></td><td>
+<tr><td class="val" id="yx">yx</td><td class="desc">
<p>Matrix coefficient.</p>
</td></tr>
-<tr valign=top><td><b>yy</b></td><td>
+<tr><td class="val" id="yy">yy</td><td class="desc">
<p>Matrix coefficient.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_FWord">FT_FWord</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_FWord">FT_FWord</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_FWord</b>; /* distance in FUnits */
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A signed 16-bit integer used to store a distance in original font units.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_UFWord">FT_UFWord</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_UFWord">FT_UFWord</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <b>FT_UFWord</b>; /* <span class="keyword">unsigned</span> distance */
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>An unsigned 16-bit integer used to store a distance in original font units.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_F2Dot14">FT_F2Dot14</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_F2Dot14">FT_F2Dot14</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_F2Dot14</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A signed 2.14 fixed float type used for unit vectors.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_UnitVector">FT_UnitVector</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>A signed 2.14 fixed-point type used for unit vectors.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_UnitVector">FT_UnitVector</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_UnitVector_
{
<a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a> x;
<a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a> y;
} <b>FT_UnitVector</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A simple structure used to store a 2D vector unit vector. Uses FT_F2Dot14 types.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>x</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="x">x</td><td class="desc">
<p>Horizontal coordinate.</p>
</td></tr>
-<tr valign=top><td><b>y</b></td><td>
+<tr><td class="val" id="y">y</td><td class="desc">
<p>Vertical coordinate.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_F26Dot6">FT_F26Dot6</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_F26Dot6">FT_F26Dot6</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_F26Dot6</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A signed 26.6 fixed float type used for vectorial pixel coordinates.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Pixel_Mode">FT_Pixel_Mode</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>A signed 26.6 fixed-point type used for vectorial pixel coordinates.</p>
- <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Pixel_Mode_
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Data">FT_Data</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Data_
{
- <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_NONE</a> = 0,
- <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a>,
- <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a>,
- <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a>,
- <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY4</a>,
- <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a>,
- <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a>,
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* pointer;
+ <a href="ft2-basic_types.html#FT_Int">FT_Int</a> length;
- FT_PIXEL_MODE_MAX /* do not remove */
+ } <b>FT_Data</b>;
+</pre>
- } <b>FT_Pixel_Mode</b>;
+<p>Read-only binary data represented as a pointer and a length.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An enumeration type used to describe the format of pixels in a given bitmap. Note that additional formats may be added in the future.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_PIXEL_MODE_NONE</b></td><td>
-<p>Value&nbsp;0 is reserved.</p>
-</td></tr>
-<tr valign=top><td><b>FT_PIXEL_MODE_MONO</b></td><td>
-<p>A monochrome bitmap, using 1&nbsp;bit per pixel. Note that pixels are stored in most-significant order (MSB), which means that the left-most pixel in a byte has value 128.</p>
-</td></tr>
-<tr valign=top><td><b>FT_PIXEL_MODE_GRAY</b></td><td>
-<p>An 8-bit bitmap, generally used to represent anti-aliased glyph images. Each pixel is stored in one byte. Note that the number of &lsquo;gray&rsquo; levels is stored in the &lsquo;num_grays&rsquo; field of the <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> structure (it generally is 256).</p>
-</td></tr>
-<tr valign=top><td><b>FT_PIXEL_MODE_GRAY2</b></td><td>
-<p>A 2-bit per pixel bitmap, used to represent embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.</p>
-</td></tr>
-<tr valign=top><td><b>FT_PIXEL_MODE_GRAY4</b></td><td>
-<p>A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.</p>
-</td></tr>
-<tr valign=top><td><b>FT_PIXEL_MODE_LCD</b></td><td>
-<p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on LCD displays; the bitmap is three times wider than the original glyph image. See also <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a>.</p>
-</td></tr>
-<tr valign=top><td><b>FT_PIXEL_MODE_LCD_V</b></td><td>
-<p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on rotated LCD displays; the bitmap is three times taller than the original glyph image. See also <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a>.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="ft_pixel_mode_xxx">ft_pixel_mode_xxx</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_none</a> <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_NONE</a>
-#define <a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_mono</a> <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a>
-#define <a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_grays</a> <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a>
-#define <a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_pal2</a> <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a>
-#define <a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_pal4</a> <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY4</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of deprecated constants. Use the corresponding <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a> values instead.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>ft_pixel_mode_none</b></td><td>
-<p>See <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_NONE</a>.</p>
-</td></tr>
-<tr valign=top><td><b>ft_pixel_mode_mono</b></td><td>
-<p>See <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a>.</p>
-</td></tr>
-<tr valign=top><td><b>ft_pixel_mode_grays</b></td><td>
-<p>See <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a>.</p>
-</td></tr>
-<tr valign=top><td><b>ft_pixel_mode_pal2</b></td><td>
-<p>See <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a>.</p>
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="pointer">pointer</td><td class="desc">
+<p>The data.</p>
</td></tr>
-<tr valign=top><td><b>ft_pixel_mode_pal4</b></td><td>
-<p>See <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY4</a>.</p>
+<tr><td class="val" id="length">length</td><td class="desc">
+<p>The length of the data in bytes.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Palette_Mode">FT_Palette_Mode</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Palette_Mode_
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_MAKE_TAG">FT_MAKE_TAG</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
+#define <b>FT_MAKE_TAG</b>( _x1, _x2, _x3, _x4 ) \
+ (<a href="ft2-basic_types.html#FT_Tag">FT_Tag</a>) \
+ ( ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x1 &lt;&lt; 24 ) | \
+ ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x2 &lt;&lt; 16 ) | \
+ ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x3 &lt;&lt; 8 ) | \
+ (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x4 )
+</pre>
+
+<p>This macro converts four-letter tags that are used to label TrueType tables into an unsigned long, to be used within FreeType.</p>
+
+<h4>note</h4>
+<p>The produced values <b>must</b> be 32-bit integers. Don't redefine this macro.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Generic">FT_Generic</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Generic_
{
- <a href="ft2-basic_types.html#FT_Palette_Mode">ft_palette_mode_rgb</a> = 0,
- <a href="ft2-basic_types.html#FT_Palette_Mode">ft_palette_mode_rgba</a>,
-
- ft_palette_mode_max /* do not remove */
-
- } <b>FT_Palette_Mode</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>THIS TYPE IS DEPRECATED. DO NOT USE IT!</p>
-<p>An enumeration type to describe the format of a bitmap palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>ft_palette_mode_rgb</b></td><td>
-<p>The palette is an array of 3-byte RGB records.</p>
+ <span class="keyword">void</span>* data;
+ <a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a> finalizer;
+
+ } <b>FT_Generic</b>;
+</pre>
+
+<p>Client applications often need to associate their own data to a variety of FreeType core objects. For example, a text layout API might want to associate a glyph cache to a given size object.</p>
+<p>Some FreeType object contains a &lsquo;generic&rsquo; field, of type FT_Generic, which usage is left to client applications and font servers.</p>
+<p>It can be used to store a pointer to client-specific data, as well as the address of a &lsquo;finalizer&rsquo; function, which will be called by FreeType when the object is destroyed (for example, the previous client example would put the address of the glyph cache destructor in the &lsquo;finalizer&rsquo; field).</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="data">data</td><td class="desc">
+<p>A typeless pointer to any client-specified data. This field is completely ignored by the FreeType library.</p>
</td></tr>
-<tr valign=top><td><b>ft_palette_mode_rgba</b></td><td>
-<p>The palette is an array of 4-byte RGBA records.</p>
+<tr><td class="val" id="finalizer">finalizer</td><td class="desc">
+<p>A pointer to a &lsquo;generic finalizer&rsquo; function, which will be called when the object is destroyed. If this field is set to NULL, no code will be called.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by FreeType, these types are not handled by the library itself.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Bitmap">FT_Bitmap</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Generic_Finalizer">FT_Generic_Finalizer</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Generic_Finalizer</b>)(<span class="keyword">void</span>* object);
+</pre>
+
+<p>Describe a function used to destroy the &lsquo;client&rsquo; data of any FreeType object. See the description of the <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a> type for details of usage.</p>
+
+<h4>input</h4>
+<p>The address of the FreeType object that is under finalization. Its client data is accessed through its &lsquo;generic&rsquo; field.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Bitmap">FT_Bitmap</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Bitmap_
{
- <span class="keyword">int</span> rows;
- <span class="keyword">int</span> width;
+ <span class="keyword">unsigned</span> <span class="keyword">int</span> rows;
+ <span class="keyword">unsigned</span> <span class="keyword">int</span> width;
<span class="keyword">int</span> pitch;
<span class="keyword">unsigned</span> <span class="keyword">char</span>* buffer;
- <span class="keyword">short</span> num_grays;
- <span class="keyword">char</span> pixel_mode;
- <span class="keyword">char</span> palette_mode;
+ <span class="keyword">unsigned</span> <span class="keyword">short</span> num_grays;
+ <span class="keyword">unsigned</span> <span class="keyword">char</span> pixel_mode;
+ <span class="keyword">unsigned</span> <span class="keyword">char</span> palette_mode;
<span class="keyword">void</span>* palette;
} <b>FT_Bitmap</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to describe a bitmap or pixmap to the raster. Note that we now manage pixmaps of various depths through the &lsquo;pixel_mode&rsquo; field.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>rows</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="rows">rows</td><td class="desc">
<p>The number of bitmap rows.</p>
</td></tr>
-<tr valign=top><td><b>width</b></td><td>
+<tr><td class="val" id="width">width</td><td class="desc">
<p>The number of pixels in bitmap row.</p>
</td></tr>
-<tr valign=top><td><b>pitch</b></td><td>
+<tr><td class="val" id="pitch">pitch</td><td class="desc">
<p>The pitch's absolute value is the number of bytes taken by one bitmap row, including padding. However, the pitch is positive when the bitmap has a &lsquo;down&rsquo; flow, and negative when it has an &lsquo;up&rsquo; flow. In all cases, the pitch is an offset to add to a bitmap pointer in order to go down one row.</p>
<p>Note that &lsquo;padding&rsquo; means the alignment of a bitmap to a byte border, and FreeType functions normally align to the smallest possible integer value.</p>
<p>For the B/W rasterizer, &lsquo;pitch&rsquo; is always an even number.</p>
<p>To change the pitch of a bitmap (say, to make it a multiple of 4), use <a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a>. Alternatively, you might use callback functions to directly render to the application's surface; see the file &lsquo;example2.cpp&rsquo; in the tutorial for a demonstration.</p>
</td></tr>
-<tr valign=top><td><b>buffer</b></td><td>
+<tr><td class="val" id="buffer">buffer</td><td class="desc">
<p>A typeless pointer to the bitmap buffer. This value should be aligned on 32-bit boundaries in most cases.</p>
</td></tr>
-<tr valign=top><td><b>num_grays</b></td><td>
+<tr><td class="val" id="num_grays">num_grays</td><td class="desc">
<p>This field is only used with <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a>; it gives the number of gray levels used in the bitmap.</p>
</td></tr>
-<tr valign=top><td><b>pixel_mode</b></td><td>
+<tr><td class="val" id="pixel_mode">pixel_mode</td><td class="desc">
<p>The pixel mode, i.e., how pixel bits are stored. See <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a> for possible values.</p>
</td></tr>
-<tr valign=top><td><b>palette_mode</b></td><td>
+<tr><td class="val" id="palette_mode">palette_mode</td><td class="desc">
<p>This field is intended for paletted pixel modes; it indicates how the palette is stored. Not used currently.</p>
</td></tr>
-<tr valign=top><td><b>palette</b></td><td>
+<tr><td class="val" id="palette">palette</td><td class="desc">
<p>A typeless pointer to the bitmap palette; this field is intended for paletted pixel modes. Not used currently.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>For now, the only pixel modes supported by FreeType are mono and grays. However, drivers might be added in the future to support more &lsquo;colorful&rsquo; options.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_IMAGE_TAG">FT_IMAGE_TAG</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-#ifndef <b>FT_IMAGE_TAG</b>
-#define <b>FT_IMAGE_TAG</b>( value, _x1, _x2, _x3, _x4 ) \
- value = ( ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x1 &lt;&lt; 24 ) | \
- ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x2 &lt;&lt; 16 ) | \
- ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x3 &lt;&lt; 8 ) | \
- (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x4 )
-#endif /* <b>FT_IMAGE_TAG</b> */
+<h4>note</h4>
+<p>For now, the only pixel modes supported by FreeType are mono and grays. However, drivers might be added in the future to support more &lsquo;colorful&rsquo; options.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This macro converts four-letter tags to an unsigned long type.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this:</p>
-<pre class="colored">
- #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value
-</pre>
-<p>to get a simple enumeration without assigning special numbers.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Glyph_Format">FT_Glyph_Format</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
- <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Glyph_Format_
+<div class="section">
+<h3 id="FT_Pixel_Mode">FT_Pixel_Mode</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Pixel_Mode_
{
- <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a>, 0, 0, 0, 0 ),
+ <a href="ft2-basic_types.html#FT_PIXEL_MODE_NONE">FT_PIXEL_MODE_NONE</a> = 0,
+ <a href="ft2-basic_types.html#FT_PIXEL_MODE_MONO">FT_PIXEL_MODE_MONO</a>,
+ <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY">FT_PIXEL_MODE_GRAY</a>,
+ <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY2">FT_PIXEL_MODE_GRAY2</a>,
+ <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY4">FT_PIXEL_MODE_GRAY4</a>,
+ <a href="ft2-basic_types.html#FT_PIXEL_MODE_LCD">FT_PIXEL_MODE_LCD</a>,
+ <a href="ft2-basic_types.html#FT_PIXEL_MODE_LCD_V">FT_PIXEL_MODE_LCD_V</a>,
+ <a href="ft2-basic_types.html#FT_PIXEL_MODE_BGRA">FT_PIXEL_MODE_BGRA</a>,
- <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>, 'c', 'o', 'm', 'p' ),
- <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>, 'b', 'i', 't', 's' ),
- <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>, 'o', 'u', 't', 'l' ),
- <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a>, 'p', 'l', 'o', 't' )
+ FT_PIXEL_MODE_MAX /* do not remove */
- } <b>FT_Glyph_Format</b>;
+ } <b>FT_Pixel_Mode</b>;
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An enumeration type used to describe the format of a given glyph image. Note that this version of FreeType only supports two image formats, even though future font drivers will be able to register their own format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_GLYPH_FORMAT_NONE</b></td><td>
-<p>The value&nbsp;0 is reserved.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_GLYPH_FORMAT_COMPOSITE</b></td></tr>
-<tr valign=top><td></td><td>
-<p>The glyph image is a composite of several other images. This format is <i>only</i> used with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a>, and is used to report compound glyphs (like accented characters).</p>
-</td></tr>
-<tr valign=top><td><b>FT_GLYPH_FORMAT_BITMAP</b></td><td>
-<p>The glyph image is a bitmap, and can be described as an <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>. You generally need to access the &lsquo;bitmap&rsquo; field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
+
+ /* these constants are deprecated; use the corresponding `<b>FT_Pixel_Mode</b>' */
+ /* values instead. */
+#define ft_pixel_mode_none <a href="ft2-basic_types.html#FT_PIXEL_MODE_NONE">FT_PIXEL_MODE_NONE</a>
+#define ft_pixel_mode_mono <a href="ft2-basic_types.html#FT_PIXEL_MODE_MONO">FT_PIXEL_MODE_MONO</a>
+#define ft_pixel_mode_grays <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY">FT_PIXEL_MODE_GRAY</a>
+#define ft_pixel_mode_pal2 <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY2">FT_PIXEL_MODE_GRAY2</a>
+#define ft_pixel_mode_pal4 <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY4">FT_PIXEL_MODE_GRAY4</a>
+</pre>
+
+<p>An enumeration type used to describe the format of pixels in a given bitmap. Note that additional formats may be added in the future.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_PIXEL_MODE_NONE">FT_PIXEL_MODE_NONE</td><td class="desc">
+<p>Value&nbsp;0 is reserved.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_GLYPH_FORMAT_OUTLINE</b></td></tr>
-<tr valign=top><td></td><td>
-<p>The glyph image is a vectorial outline made of line segments and Bézier arcs; it can be described as an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>; you generally want to access the &lsquo;outline&rsquo; field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
+<tr><td class="val" id="FT_PIXEL_MODE_MONO">FT_PIXEL_MODE_MONO</td><td class="desc">
+<p>A monochrome bitmap, using 1&nbsp;bit per pixel. Note that pixels are stored in most-significant order (MSB), which means that the left-most pixel in a byte has value 128.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_GLYPH_FORMAT_PLOTTER</b></td></tr>
-<tr valign=top><td></td><td>
-<p>The glyph image is a vectorial path with no inside and outside contours. Some Type&nbsp;1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>, but FreeType isn't currently capable of rendering them correctly.</p>
+<tr><td class="val" id="FT_PIXEL_MODE_GRAY">FT_PIXEL_MODE_GRAY</td><td class="desc">
+<p>An 8-bit bitmap, generally used to represent anti-aliased glyph images. Each pixel is stored in one byte. Note that the number of &lsquo;gray&rsquo; levels is stored in the &lsquo;num_grays&rsquo; field of the <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> structure (it generally is 256).</p>
</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="ft_glyph_format_xxx">ft_glyph_format_xxx</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_none</a> <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a>
-#define <a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_composite</a> <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>
-#define <a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_bitmap</a> <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>
-#define <a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_outline</a> <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>
-#define <a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_plotter</a> <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of deprecated constants. Use the corresponding <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a> values instead.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>ft_glyph_format_none</b></td><td>
-<p>See <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a>.</p>
+<tr><td class="val" id="FT_PIXEL_MODE_GRAY2">FT_PIXEL_MODE_GRAY2</td><td class="desc">
+<p>A 2-bit per pixel bitmap, used to represent embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>ft_glyph_format_composite</b></td></tr>
-<tr valign=top><td></td><td>
-<p>See <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>.</p>
+<tr><td class="val" id="FT_PIXEL_MODE_GRAY4">FT_PIXEL_MODE_GRAY4</td><td class="desc">
+<p>A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.</p>
</td></tr>
-<tr valign=top><td><b>ft_glyph_format_bitmap</b></td><td>
-<p>See <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>.</p>
+<tr><td class="val" id="FT_PIXEL_MODE_LCD">FT_PIXEL_MODE_LCD</td><td class="desc">
+<p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on LCD displays; the bitmap is three times wider than the original glyph image. See also <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a>.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>ft_glyph_format_outline</b></td></tr>
-<tr valign=top><td></td><td>
-<p>See <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>.</p>
+<tr><td class="val" id="FT_PIXEL_MODE_LCD_V">FT_PIXEL_MODE_LCD_V</td><td class="desc">
+<p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on rotated LCD displays; the bitmap is three times taller than the original glyph image. See also <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a>.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>ft_glyph_format_plotter</b></td></tr>
-<tr valign=top><td></td><td>
-<p>See <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a>.</p>
+<tr><td class="val" id="FT_PIXEL_MODE_BGRA">FT_PIXEL_MODE_BGRA</td><td class="desc">
+<p>An image with four 8-bit channels per pixel, representing a color image (such as emoticons) with alpha channel. For each pixel, the format is BGRA, which means, the blue channel comes first in memory. The color channels are pre-multiplied and in the sRGB colorspace. For example, full red at half-translucent opacity will be represented as &lsquo;00,00,80,80&rsquo;, not &lsquo;00,00,FF,80&rsquo;. See also <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Data">FT_Data</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Data_
- {
- <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* pointer;
- <a href="ft2-basic_types.html#FT_Int">FT_Int</a> length;
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
- } <b>FT_Data</b>;
+<div class="section">
+<h3 id="FT_Glyph_Format">FT_Glyph_Format</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Glyph_Format_
+ {
+ <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_NONE">FT_GLYPH_FORMAT_NONE</a>, 0, 0, 0, 0 ),
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Read-only binary data represented as a pointer and a length.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>pointer</b></td><td>
-<p>The data.</p>
-</td></tr>
-<tr valign=top><td><b>length</b></td><td>
-<p>The length of the data in bytes.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Generic_Finalizer">FT_Generic_Finalizer</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+ <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_COMPOSITE">FT_GLYPH_FORMAT_COMPOSITE</a>, 'c', 'o', 'm', 'p' ),
+ <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_BITMAP">FT_GLYPH_FORMAT_BITMAP</a>, 'b', 'i', 't', 's' ),
+ <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_OUTLINE">FT_GLYPH_FORMAT_OUTLINE</a>, 'o', 'u', 't', 'l' ),
+ <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_PLOTTER">FT_GLYPH_FORMAT_PLOTTER</a>, 'p', 'l', 'o', 't' )
- <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Generic_Finalizer</b>)(<span class="keyword">void</span>* object);
+ } <b>FT_Glyph_Format</b>;
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Describe a function used to destroy the &lsquo;client&rsquo; data of any FreeType object. See the description of the <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a> type for details of usage.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p>The address of the FreeType object which is under finalization. Its client data is accessed through its &lsquo;generic&rsquo; field.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Generic">FT_Generic</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Generic_
- {
- <span class="keyword">void</span>* data;
- <a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a> finalizer;
+ /* these constants are deprecated; use the corresponding */
+ /* `<b>FT_Glyph_Format</b>' values instead. */
+#define ft_glyph_format_none <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_NONE">FT_GLYPH_FORMAT_NONE</a>
+#define ft_glyph_format_composite <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_COMPOSITE">FT_GLYPH_FORMAT_COMPOSITE</a>
+#define ft_glyph_format_bitmap <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_BITMAP">FT_GLYPH_FORMAT_BITMAP</a>
+#define ft_glyph_format_outline <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_OUTLINE">FT_GLYPH_FORMAT_OUTLINE</a>
+#define ft_glyph_format_plotter <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_PLOTTER">FT_GLYPH_FORMAT_PLOTTER</a>
+</pre>
- } <b>FT_Generic</b>;
+<p>An enumeration type used to describe the format of a given glyph image. Note that this version of FreeType only supports two image formats, even though future font drivers will be able to register their own format.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Client applications often need to associate their own data to a variety of FreeType core objects. For example, a text layout API might want to associate a glyph cache to a given size object.</p>
-<p>Some FreeType object contains a &lsquo;generic&rsquo; field, of type FT_Generic, which usage is left to client applications and font servers.</p>
-<p>It can be used to store a pointer to client-specific data, as well as the address of a &lsquo;finalizer&rsquo; function, which will be called by FreeType when the object is destroyed (for example, the previous client example would put the address of the glyph cache destructor in the &lsquo;finalizer&rsquo; field).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>data</b></td><td>
-<p>A typeless pointer to any client-specified data. This field is completely ignored by the FreeType library.</p>
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_GLYPH_FORMAT_NONE">FT_GLYPH_FORMAT_NONE</td><td class="desc">
+<p>The value&nbsp;0 is reserved.</p>
</td></tr>
-<tr valign=top><td><b>finalizer</b></td><td>
-<p>A pointer to a &lsquo;generic finalizer&rsquo; function, which will be called when the object is destroyed. If this field is set to NULL, no code will be called.</p>
+<tr><td class="val" id="FT_GLYPH_FORMAT_COMPOSITE">FT_GLYPH_FORMAT_COMPOSITE</td><td class="desc">
+<p>The glyph image is a composite of several other images. This format is <i>only</i> used with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a>, and is used to report compound glyphs (like accented characters).</p>
+</td></tr>
+<tr><td class="val" id="FT_GLYPH_FORMAT_BITMAP">FT_GLYPH_FORMAT_BITMAP</td><td class="desc">
+<p>The glyph image is a bitmap, and can be described as an <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>. You generally need to access the &lsquo;bitmap&rsquo; field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
+</td></tr>
+<tr><td class="val" id="FT_GLYPH_FORMAT_OUTLINE">FT_GLYPH_FORMAT_OUTLINE</td><td class="desc">
+<p>The glyph image is a vectorial outline made of line segments and Bézier arcs; it can be described as an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>; you generally want to access the &lsquo;outline&rsquo; field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
+</td></tr>
+<tr><td class="val" id="FT_GLYPH_FORMAT_PLOTTER">FT_GLYPH_FORMAT_PLOTTER</td><td class="desc">
+<p>The glyph image is a vectorial path with no inside and outside contours. Some Type&nbsp;1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>, but FreeType isn't currently capable of rendering them correctly.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_MAKE_TAG">FT_MAKE_TAG</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-#define <b>FT_MAKE_TAG</b>( _x1, _x2, _x3, _x4 ) \
- (<a href="ft2-basic_types.html#FT_Tag">FT_Tag</a>) \
- ( ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x1 &lt;&lt; 24 ) | \
- ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x2 &lt;&lt; 16 ) | \
- ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x3 &lt;&lt; 8 ) | \
- (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x4 )
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This macro converts four-letter tags which are used to label TrueType tables into an unsigned long to be used within FreeType.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The produced values <b>must</b> be 32-bit integers. Don't redefine this macro.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+<div class="section">
+<h3 id="FT_IMAGE_TAG">FT_IMAGE_TAG</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+#ifndef <b>FT_IMAGE_TAG</b>
+#define <b>FT_IMAGE_TAG</b>( value, _x1, _x2, _x3, _x4 ) \
+ value = ( ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x1 &lt;&lt; 24 ) | \
+ ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x2 &lt;&lt; 16 ) | \
+ ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x3 &lt;&lt; 8 ) | \
+ (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x4 )
+#endif /* <b>FT_IMAGE_TAG</b> */
+</pre>
+
+<p>This macro converts four-letter tags to an unsigned long type.</p>
+
+<h4>note</h4>
+<p>Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this:</p>
+<pre class="colored">
+ #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value
+</pre>
+<p>to get a simple enumeration without assigning special numbers.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-bdf_fonts.html b/docs/reference/ft2-bdf_fonts.html
index 0f41254..daf2307 100644
--- a/docs/reference/ft2-bdf_fonts.html
+++ b/docs/reference/ft2-bdf_fonts.html
@@ -3,126 +3,169 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-BDF and PCF Files
-</h1></center>
+<h1>BDF and PCF Files</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_PropertyType">FT_PropertyType</a></td><td></td><td><a href="#BDF_PropertyRec">BDF_PropertyRec</a></td><td></td><td><a href="#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td></tr>
-<tr><td></td><td><a href="#BDF_Property">BDF_Property</a></td><td></td><td><a href="#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td></td><td></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#BDF_PropertyType">BDF_PropertyType</a></td><td><a href="#BDF_PropertyRec">BDF_PropertyRec</a></td><td><a href="#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td></tr>
+<tr><td><a href="#BDF_Property">BDF_Property</a></td><td><a href="#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>This section contains the declaration of functions specific to BDF and PCF fonts.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_PropertyType">FT_PropertyType</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BDF_H (freetype/ftbdf.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="BDF_PropertyType">BDF_PropertyType</h3>
+<p>Defined in FT_BDF_H (ftbdf.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> BDF_PropertyType_
{
- <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_NONE</a> = 0,
- <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_ATOM</a> = 1,
- <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a> = 2,
- <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a> = 3
+ <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_NONE">BDF_PROPERTY_TYPE_NONE</a> = 0,
+ <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_ATOM">BDF_PROPERTY_TYPE_ATOM</a> = 1,
+ <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_INTEGER">BDF_PROPERTY_TYPE_INTEGER</a> = 2,
+ <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_CARDINAL">BDF_PROPERTY_TYPE_CARDINAL</a> = 3
- } BDF_PropertyType;
+ } <b>BDF_PropertyType</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A list of BDF property types.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>BDF_PROPERTY_TYPE_NONE</b></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="BDF_PROPERTY_TYPE_NONE">BDF_PROPERTY_TYPE_NONE</td><td class="desc">
<p>Value&nbsp;0 is used to indicate a missing property.</p>
</td></tr>
-<tr valign=top><td><b>BDF_PROPERTY_TYPE_ATOM</b></td><td>
+<tr><td class="val" id="BDF_PROPERTY_TYPE_ATOM">BDF_PROPERTY_TYPE_ATOM</td><td class="desc">
<p>Property is a string atom.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>BDF_PROPERTY_TYPE_INTEGER</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="BDF_PROPERTY_TYPE_INTEGER">BDF_PROPERTY_TYPE_INTEGER</td><td class="desc">
<p>Property is a 32-bit signed integer.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>BDF_PROPERTY_TYPE_CARDINAL</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="BDF_PROPERTY_TYPE_CARDINAL">BDF_PROPERTY_TYPE_CARDINAL</td><td class="desc">
<p>Property is a 32-bit unsigned integer.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="BDF_Property">BDF_Property</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BDF_H (freetype/ftbdf.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="BDF_Property">BDF_Property</h3>
+<p>Defined in FT_BDF_H (ftbdf.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> BDF_PropertyRec_* <b>BDF_Property</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a <a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a> structure to model a given BDF/PCF property.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="BDF_PropertyRec">BDF_PropertyRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BDF_H (freetype/ftbdf.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="BDF_PropertyRec">BDF_PropertyRec</h3>
+<p>Defined in FT_BDF_H (ftbdf.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> BDF_PropertyRec_
{
- BDF_PropertyType type;
+ <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PropertyType</a> type;
<span class="keyword">union</span> {
<span class="keyword">const</span> <span class="keyword">char</span>* atom;
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> integer;
@@ -131,130 +174,107 @@ Defined in FT_BDF_H (freetype/ftbdf.h).
} u;
} <b>BDF_PropertyRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This structure models a given BDF/PCF property.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>type</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="type">type</td><td class="desc">
<p>The property type.</p>
</td></tr>
-<tr valign=top><td><b>u.atom</b></td><td>
-<p>The atom string, if type is <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_ATOM</a>.</p>
+<tr><td class="val" id="u.atom">u.atom</td><td class="desc">
+<p>The atom string, if type is <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_ATOM</a>. May be NULL, indicating an empty string.</p>
</td></tr>
-<tr valign=top><td><b>u.integer</b></td><td>
-<p>A signed integer, if type is <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a>.</p>
+<tr><td class="val" id="u.integer">u.integer</td><td class="desc">
+<p>A signed integer, if type is <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a>.</p>
</td></tr>
-<tr valign=top><td><b>u.cardinal</b></td><td>
-<p>An unsigned integer, if type is <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a>.</p>
+<tr><td class="val" id="u.cardinal">u.cardinal</td><td class="desc">
+<p>An unsigned integer, if type is <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BDF_H (freetype/ftbdf.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</h3>
+<p>Defined in FT_BDF_H (ftbdf.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_BDF_Charset_ID</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<span class="keyword">const</span> <span class="keyword">char</span>* *acharset_encoding,
<span class="keyword">const</span> <span class="keyword">char</span>* *acharset_registry );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve a BDF font character set identity, according to the BDF specification.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>acharset_encoding</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="acharset_encoding">acharset_encoding</td><td class="desc">
<p>Charset encoding, as a C&nbsp;string, owned by the face.</p>
</td></tr>
-<tr valign=top><td><b>acharset_registry</b></td><td>
+<tr><td class="val" id="acharset_registry">acharset_registry</td><td class="desc">
<p>Charset registry, as a C&nbsp;string, owned by the face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function only works with BDF faces, returning an error otherwise.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_BDF_Property">FT_Get_BDF_Property</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BDF_H (freetype/ftbdf.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_BDF_Property">FT_Get_BDF_Property</h3>
+<p>Defined in FT_BDF_H (ftbdf.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_BDF_Property</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<span class="keyword">const</span> <span class="keyword">char</span>* prop_name,
<a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a> *aproperty );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve a BDF property from a BDF or PCF font file.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
-<tr valign=top><td><b>name</b></td><td>
+<tr><td class="val" id="name">name</td><td class="desc">
<p>The property name.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aproperty</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aproperty">aproperty</td><td class="desc">
<p>The property.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function works with BDF <i>and</i> PCF fonts. It returns an error otherwise. It also returns an error if the property is not in the font.</p>
<p>A &lsquo;property&rsquo; is a either key-value pair within the STARTPROPERTIES ... ENDPROPERTIES block of a BDF font or a key-value pair from the &lsquo;info-&gt;props&rsquo; array within a &lsquo;FontRec&rsquo; structure of a PCF font.</p>
-<p>Integer properties are always stored as &lsquo;signed&rsquo; within PCF fonts; consequently, <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a> is a possible return value for BDF fonts only.</p>
-<p>In case of error, &lsquo;aproperty-&gt;type&rsquo; is always set to <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_NONE</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+<p>Integer properties are always stored as &lsquo;signed&rsquo; within PCF fonts; consequently, <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a> is a possible return value for BDF fonts only.</p>
+<p>In case of error, &lsquo;aproperty-&gt;type&rsquo; is always set to <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_NONE</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-bitmap_handling.html b/docs/reference/ft2-bitmap_handling.html
index db5c763..a0eec74 100644
--- a/docs/reference/ft2-bitmap_handling.html
+++ b/docs/reference/ft2-bitmap_handling.html
@@ -3,300 +3,313 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Bitmap Handling
-</h1></center>
+<h1>Bitmap Handling</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Bitmap_New">FT_Bitmap_New</a></td><td></td><td><a href="#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td></td><td><a href="#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td></tr>
-<tr><td></td><td><a href="#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td></td><td><a href="#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td></td><td><a href="#FT_Bitmap_Done">FT_Bitmap_Done</a></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
-<p>This section contains functions for converting FT_Bitmap objects.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Bitmap_New">FT_Bitmap_New</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BITMAP_H (freetype/ftbitmap.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<table class="synopsis">
+<tr><td><a href="#FT_Bitmap_New">FT_Bitmap_New</a></td><td><a href="#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td><a href="#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td></tr>
+<tr><td><a href="#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td><a href="#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td><a href="#FT_Bitmap_Done">FT_Bitmap_Done</a></td></tr>
+</table>
+
+<p>This section contains functions for handling <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> objects. Note that none of the functions changes the bitmap's &lsquo;flow&rsquo; (as indicated by the sign of the &lsquo;pitch&rsquo; field in &lsquo;FT_Bitmap&rsquo;).</p>
+
+<div class="section">
+<h3 id="FT_Bitmap_New">FT_Bitmap_New</h3>
+<p>Defined in FT_BITMAP_H (ftbitmap.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Bitmap_New</b>( <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *abitmap );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Initialize a pointer to an <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> structure.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>abitmap</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="abitmap">abitmap</td><td class="desc">
<p>A pointer to the bitmap structure.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Bitmap_Copy">FT_Bitmap_Copy</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BITMAP_H (freetype/ftbitmap.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Bitmap_Copy">FT_Bitmap_Copy</h3>
+<p>Defined in FT_BITMAP_H (ftbitmap.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Bitmap_Copy</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *source,
<a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *target);
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Copy a bitmap into another one.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a library object.</p>
</td></tr>
-<tr valign=top><td><b>source</b></td><td>
+<tr><td class="val" id="source">source</td><td class="desc">
<p>A handle to the source bitmap.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>target</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="target">target</td><td class="desc">
<p>A handle to the target bitmap.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BITMAP_H (freetype/ftbitmap.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Bitmap_Embolden">FT_Bitmap_Embolden</h3>
+<p>Defined in FT_BITMAP_H (ftbitmap.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Bitmap_Embolden</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>* bitmap,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> xStrength,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> yStrength );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Embolden a bitmap. The new bitmap will be about &lsquo;xStrength&rsquo; pixels wider and &lsquo;yStrength&rsquo; pixels higher. The left and bottom borders are kept unchanged.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a library object.</p>
</td></tr>
-<tr valign=top><td><b>xStrength</b></td><td>
+<tr><td class="val" id="xStrength">xStrength</td><td class="desc">
<p>How strong the glyph is emboldened horizontally. Expressed in 26.6 pixel format.</p>
</td></tr>
-<tr valign=top><td><b>yStrength</b></td><td>
+<tr><td class="val" id="yStrength">yStrength</td><td class="desc">
<p>How strong the glyph is emboldened vertically. Expressed in 26.6 pixel format.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>bitmap</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="bitmap">bitmap</td><td class="desc">
<p>A handle to the target bitmap.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The current implementation restricts &lsquo;xStrength&rsquo; to be less than or equal to&nbsp;8 if bitmap is of pixel_mode <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a>.</p>
<p>If you want to embolden the bitmap owned by a <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a>, you should call <a href="ft2-bitmap_handling.html#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a> on the slot first.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Bitmap_Convert">FT_Bitmap_Convert</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BITMAP_H (freetype/ftbitmap.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>Bitmaps in <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a> and <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a>@ format are converted to <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a> format (i.e., 8bpp).</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Bitmap_Convert">FT_Bitmap_Convert</h3>
+<p>Defined in FT_BITMAP_H (ftbitmap.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Bitmap_Convert</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *source,
<a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *target,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> alignment );
+</pre>
+
+<p>Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp to a bitmap object with depth 8bpp, making the number of used bytes line (a.k.a. the &lsquo;pitch&rsquo;) a multiple of &lsquo;alignment&rsquo;.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a bitmap object with depth 8bpp, making the number of used bytes per line (a.k.a. the &lsquo;pitch&rsquo;) a multiple of &lsquo;alignment&rsquo;.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a library object.</p>
</td></tr>
-<tr valign=top><td><b>source</b></td><td>
+<tr><td class="val" id="source">source</td><td class="desc">
<p>The source bitmap.</p>
</td></tr>
-<tr valign=top><td><b>alignment</b></td><td>
+<tr><td class="val" id="alignment">alignment</td><td class="desc">
<p>The pitch of the bitmap is a multiple of this parameter. Common values are 1, 2, or 4.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>target</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="target">target</td><td class="desc">
<p>The target bitmap.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>It is possible to call <a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a> multiple times without calling <a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a> (the memory is simply reallocated).</p>
<p>Use <a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a> to finally remove the bitmap object.</p>
<p>The &lsquo;library&rsquo; argument is taken to have access to FreeType's memory handling functions.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BITMAP_H (freetype/ftbitmap.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</h3>
+<p>Defined in FT_BITMAP_H (ftbitmap.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_GlyphSlot_Own_Bitmap</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> slot );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Make sure that a glyph slot owns &lsquo;slot-&gt;bitmap&rsquo;.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>slot</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="slot">slot</td><td class="desc">
<p>The glyph slot.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function is to be used in combination with <a href="ft2-bitmap_handling.html#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Bitmap_Done">FT_Bitmap_Done</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BITMAP_H (freetype/ftbitmap.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Bitmap_Done">FT_Bitmap_Done</h3>
+<p>Defined in FT_BITMAP_H (ftbitmap.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Bitmap_Done</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *bitmap );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Destroy a bitmap object created with <a href="ft2-bitmap_handling.html#FT_Bitmap_New">FT_Bitmap_New</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a library object.</p>
</td></tr>
-<tr valign=top><td><b>bitmap</b></td><td>
+<tr><td class="val" id="bitmap">bitmap</td><td class="desc">
<p>The bitmap object to be freed.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The &lsquo;library&rsquo; argument is taken to have access to FreeType's memory handling functions.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-bzip2.html b/docs/reference/ft2-bzip2.html
index 7f87a23..dc33973 100644
--- a/docs/reference/ft2-bzip2.html
+++ b/docs/reference/ft2-bzip2.html
@@ -3,92 +3,147 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-BZIP2 Streams
-</h1></center>
+<h1>BZIP2 Streams</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></td><td></td><td></td><td></td><td></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></td><td></td><td></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>This section contains the declaration of Bzip2-specific functions.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BZIP2_H (freetype/ftbzip2.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</h3>
+<p>Defined in FT_BZIP2_H (ftbzip2.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stream_OpenBzip2</b>( <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> stream,
<a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> source );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Open a new stream to parse bzip2-compressed font files. This is mainly used to support the compressed &lsquo;*.pcf.bz2&rsquo; fonts that come with XFree86.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stream</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stream">stream</td><td class="desc">
<p>The target embedding stream.</p>
</td></tr>
-<tr valign=top><td><b>source</b></td><td>
+<tr><td class="val" id="source">source</td><td class="desc">
<p>The source stream.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The source stream must be opened <i>before</i> calling this function.</p>
<p>Calling the internal function &lsquo;FT_Stream_Close&rsquo; on the new stream will <b>not</b> call &lsquo;FT_Stream_Close&rsquo; on the source stream. None of the stream objects will be released to the heap.</p>
<p>The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream.</p>
<p>In certain builds of the library, bzip2 compression recognition is automatically handled when calling <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>. 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.</p>
<p>This function may return &lsquo;FT_Err_Unimplemented_Feature&rsquo; if your build of FreeType was not compiled with bzip2 support.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-cache_subsystem.html b/docs/reference/ft2-cache_subsystem.html
index cb7ad05..18650de 100644
--- a/docs/reference/ft2-cache_subsystem.html
+++ b/docs/reference/ft2-cache_subsystem.html
@@ -3,62 +3,128 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Cache Sub-System
-</h1></center>
+<h1>Cache Sub-System</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FTC_Manager">FTC_Manager</a></td><td></td><td><a href="#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
-<tr><td></td><td><a href="#FTC_FaceID">FTC_FaceID</a></td><td></td><td><a href="#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
-<tr><td></td><td><a href="#FTC_Face_Requester">FTC_Face_Requester</a></td><td></td><td><a href="#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
-<tr><td></td><td><a href="#FTC_Node">FTC_Node</a></td><td></td><td><a href="#FTC_ImageType">FTC_ImageType</a></td></tr>
-<tr><td></td><td><a href="#FTC_Manager_New">FTC_Manager_New</a></td><td></td><td><a href="#FTC_ImageCache">FTC_ImageCache</a></td></tr>
-<tr><td></td><td><a href="#FTC_Manager_Reset">FTC_Manager_Reset</a></td><td></td><td><a href="#FTC_ImageCache_New">FTC_ImageCache_New</a></td></tr>
-<tr><td></td><td><a href="#FTC_Manager_Done">FTC_Manager_Done</a></td><td></td><td><a href="#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td></tr>
-<tr><td></td><td><a href="#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td><td></td><td><a href="#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
-<tr><td></td><td><a href="#FTC_ScalerRec">FTC_ScalerRec</a></td><td></td><td><a href="#FTC_SBit">FTC_SBit</a></td></tr>
-<tr><td></td><td><a href="#FTC_Scaler">FTC_Scaler</a></td><td></td><td><a href="#FTC_SBitRec">FTC_SBitRec</a></td></tr>
-<tr><td></td><td><a href="#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td><td></td><td><a href="#FTC_SBitCache">FTC_SBitCache</a></td></tr>
-<tr><td></td><td><a href="#FTC_Node_Unref">FTC_Node_Unref</a></td><td></td><td><a href="#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
-<tr><td></td><td><a href="#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td><td></td><td><a href="#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
-<tr><td></td><td><a href="#FTC_CMapCache">FTC_CMapCache</a></td><td></td><td><a href="#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FTC_Manager">FTC_Manager</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FTC_FaceID">FTC_FaceID</a></td><td><a href="#FTC_SBit">FTC_SBit</a></td></tr>
+<tr><td><a href="#FTC_Face_Requester">FTC_Face_Requester</a></td><td><a href="#FTC_SBitCache">FTC_SBitCache</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
+<tr><td><a href="#FTC_Manager_New">FTC_Manager_New</a></td><td><a href="#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
+<tr><td><a href="#FTC_Manager_Reset">FTC_Manager_Reset</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FTC_Manager_Done">FTC_Manager_Done</a></td><td><a href="#FTC_CMapCache">FTC_CMapCache</a></td></tr>
+<tr><td><a href="#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td><td><a href="#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
+<tr><td><a href="#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td><td><a href="#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
+<tr><td><a href="#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td><td>&nbsp;</td></tr>
+<tr><td>&nbsp;</td><td><a href="#FTC_ScalerRec">FTC_ScalerRec</a></td></tr>
+<tr><td><a href="#FTC_Node">FTC_Node</a></td><td><a href="#FTC_Scaler">FTC_Scaler</a></td></tr>
+<tr><td><a href="#FTC_Node_Unref">FTC_Node_Unref</a></td><td><a href="#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FTC_ImageType">FTC_ImageType</a></td></tr>
+<tr><td><a href="#FTC_ImageCache">FTC_ImageCache</a></td><td><a href="#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
+<tr><td><a href="#FTC_ImageCache_New">FTC_ImageCache_New</a></td><td><a href="#FTC_SBitRec">FTC_SBitRec</a></td></tr>
+<tr><td><a href="#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td><td><a href="#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
+</table>
+
+
<p>This section describes the FreeType&nbsp;2 cache sub-system, which is used to limit the number of concurrently opened <a href="ft2-base_interface.html#FT_Face">FT_Face</a> and <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects, as well as caching information like character maps and glyph images while limiting their maximum memory usage.</p>
<p>Note that all types and functions begin with the &lsquo;FTC_&rsquo; prefix.</p>
<p>The cache is highly portable and thus doesn't know anything about the fonts installed on your system, or how to access them. This implies the following scheme:</p>
@@ -72,135 +138,88 @@ Cache Sub-System
<p>If you want to use the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> caching, call <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>, then later use <a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a> to retrieve the corresponding <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> objects from the cache.</p>
<p>If you need lots of small bitmaps, it is much more memory efficient to call <a href="ft2-cache_subsystem.html#FTC_SBitCache_New">FTC_SBitCache_New</a> followed by <a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a>. This returns <a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a> structures, which are used to store small bitmaps directly. (A small bitmap is one whose metrics and dimensions all fit into 8-bit integers).</p>
<p>We hope to also provide a kerning cache in the near future.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Manager">FTC_Manager</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FTC_Manager">FTC_Manager</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ManagerRec_* <b>FTC_Manager</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This object corresponds to one instance of the cache-subsystem. It is used to cache one or more <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects, along with corresponding <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects.</p>
<p>The manager intentionally limits the total number of opened <a href="ft2-base_interface.html#FT_Face">FT_Face</a> and <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects to control memory usage. See the &lsquo;max_faces&rsquo; and &lsquo;max_sizes&rsquo; parameters of <a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a>.</p>
<p>The manager is also used to cache &lsquo;nodes&rsquo; of various types while limiting their total memory usage.</p>
<p>All limitations are enforced by keeping lists of managed objects in most-recently-used order, and flushing old nodes to make room for new ones.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_FaceID">FTC_FaceID</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_FaceID">FTC_FaceID</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
<span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a> <b>FTC_FaceID</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>An opaque pointer type that is used to identity face objects. The contents of such objects is application-dependent.</p>
<p>These pointers are typically used to point to a user-defined structure containing a font file path, and face index.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Never use NULL as a valid <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>.</p>
-<p>Face IDs are passed by the client to the cache manager, which calls, when needed, the <a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a> to translate them into new <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects.</p>
+<p>Face IDs are passed by the client to the cache manager that calls, when needed, the <a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a> to translate them into new <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects.</p>
<p>If the content of a given face ID changes at runtime, or if the value becomes invalid (e.g., when uninstalling a font), you should immediately call <a href="ft2-cache_subsystem.html#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a> before any other cache function.</p>
<p>Failure to do so will result in incorrect behaviour or even memory leaks and crashes.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Face_Requester">FTC_Face_Requester</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_Face_Requester">FTC_Face_Requester</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
<span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
(*<b>FTC_Face_Requester</b>)( <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> face_id,
<a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
- <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a> request_data,
+ <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a> req_data,
<a href="ft2-base_interface.html#FT_Face">FT_Face</a>* aface );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A callback function provided by client applications. It is used by the cache manager to translate a given <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> into a new valid <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object, on demand.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face_id</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face_id">face_id</td><td class="desc">
<p>The face ID to resolve.</p>
</td></tr>
-<tr valign=top><td><b>library</b></td><td>
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a FreeType library object.</p>
</td></tr>
-<tr valign=top><td><b>req_data</b></td><td>
+<tr><td class="val" id="req_data">req_data</td><td class="desc">
<p>Application-provided request data (see note below).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aface</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A new <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The third parameter &lsquo;req_data&rsquo; is the same as the one passed by the client when <a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a> is called.</p>
<p>The face requester should not perform funny things on the returned face object, like creating a new <a href="ft2-base_interface.html#FT_Size">FT_Size</a> for it, or setting a transformation through <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>!</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Node">FTC_Node</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_NodeRec_* <b>FTC_Node</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An opaque handle to a cache node object. Each cache node is reference-counted. A node with a count of&nbsp;0 might be flushed out of a full cache whenever a lookup request is performed.</p>
-<p>If you look up nodes, you have the ability to &lsquo;acquire&rsquo; them, i.e., to increment their reference count. This will prevent the node from being flushed out of the cache until you explicitly &lsquo;release&rsquo; it (see <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a>).</p>
-<p>See also <a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a> and <a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Manager_New">FTC_Manager_New</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FTC_Manager_New">FTC_Manager_New</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FTC_Manager_New</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> max_faces,
@@ -209,463 +228,574 @@ Defined in FT_CACHE_H (freetype/ftcache.h).
<a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a> requester,
<a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a> req_data,
<a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> *amanager );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Create a new cache manager.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>The parent FreeType library handle to use.</p>
</td></tr>
-<tr valign=top><td><b>max_faces</b></td><td>
+<tr><td class="val" id="max_faces">max_faces</td><td class="desc">
<p>Maximum number of opened <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects managed by this cache instance. Use&nbsp;0 for defaults.</p>
</td></tr>
-<tr valign=top><td><b>max_sizes</b></td><td>
+<tr><td class="val" id="max_sizes">max_sizes</td><td class="desc">
<p>Maximum number of opened <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects managed by this cache instance. Use&nbsp;0 for defaults.</p>
</td></tr>
-<tr valign=top><td><b>max_bytes</b></td><td>
+<tr><td class="val" id="max_bytes">max_bytes</td><td class="desc">
<p>Maximum number of bytes to use for cached data nodes. Use&nbsp;0 for defaults. Note that this value does not account for managed <a href="ft2-base_interface.html#FT_Face">FT_Face</a> and <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects.</p>
</td></tr>
-<tr valign=top><td><b>requester</b></td><td>
+<tr><td class="val" id="requester">requester</td><td class="desc">
<p>An application-provided callback used to translate face IDs into real <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects.</p>
</td></tr>
-<tr valign=top><td><b>req_data</b></td><td>
+<tr><td class="val" id="req_data">req_data</td><td class="desc">
<p>A generic pointer that is passed to the requester each time it is called (see <a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a>).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>amanager</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="amanager">amanager</td><td class="desc">
<p>A handle to a new manager object. 0&nbsp;in case of failure.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Manager_Reset">FTC_Manager_Reset</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_Manager_Reset">FTC_Manager_Reset</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FTC_Manager_Reset</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Empty a given cache manager. This simply gets rid of all the currently cached <a href="ft2-base_interface.html#FT_Face">FT_Face</a> and <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects within the manager.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>manager</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the manager.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Manager_Done">FTC_Manager_Done</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_Manager_Done">FTC_Manager_Done</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FTC_Manager_Done</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Destroy a given manager after emptying it.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>manager</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the target cache manager object.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_Manager_LookupFace">FTC_Manager_LookupFace</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FTC_Manager_LookupFace</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager,
<a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> face_id,
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object that corresponds to a given face ID through a cache manager.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>manager</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the cache manager.</p>
</td></tr>
-<tr valign=top><td><b>face_id</b></td><td>
+<tr><td class="val" id="face_id">face_id</td><td class="desc">
<p>The ID of the face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aface</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to the face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The returned <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object is always owned by the manager. You should never try to discard it yourself.</p>
-<p>The <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object doesn't necessarily have a current size object (i.e., face-&gt;size can be 0). If you need a specific &lsquo;font size&rsquo;, use <a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a> instead.</p>
+<p>The <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object doesn't necessarily have a current size object (i.e., face-&gt;size can be&nbsp;0). If you need a specific &lsquo;font size&rsquo;, use <a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a> instead.</p>
<p>Never change the face's transformation matrix (i.e., never call the <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a> function) on a returned face! If you need to transform glyphs, do it yourself after glyph loading.</p>
<p>When you perform a lookup, out-of-memory errors are detected <i>within</i> the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.</p>
<p>If a lookup fails with &lsquo;FT_Err_Out_Of_Memory&rsquo; the cache has already been completely flushed, and still no memory was available for the operation.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_ScalerRec">FTC_ScalerRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ScalerRec_
- {
- <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> face_id;
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> width;
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> height;
- <a href="ft2-basic_types.html#FT_Int">FT_Int</a> pixel;
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> x_res;
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> y_res;
-
- } <b>FTC_ScalerRec</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A structure used to describe a given character size in either pixels or points to the cache manager. See <a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face_id</b></td><td>
-<p>The source face ID.</p>
-</td></tr>
-<tr valign=top><td><b>width</b></td><td>
-<p>The character width.</p>
-</td></tr>
-<tr valign=top><td><b>height</b></td><td>
-<p>The character height.</p>
-</td></tr>
-<tr valign=top><td><b>pixel</b></td><td>
-<p>A Boolean. If 1, the &lsquo;width&rsquo; and &lsquo;height&rsquo; fields are interpreted as integer pixel character sizes. Otherwise, they are expressed as 1/64th of points.</p>
-</td></tr>
-<tr valign=top><td><b>x_res</b></td><td>
-<p>Only used when &lsquo;pixel&rsquo; is value&nbsp;0 to indicate the horizontal resolution in dpi.</p>
-</td></tr>
-<tr valign=top><td><b>y_res</b></td><td>
-<p>Only used when &lsquo;pixel&rsquo; is value&nbsp;0 to indicate the vertical resolution in dpi.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>This type is mainly used to retrieve <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects through the cache manager.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Scaler">FTC_Scaler</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ScalerRec_* <b>FTC_Scaler</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A handle to an <a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FTC_Manager_LookupSize">FTC_Manager_LookupSize</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FTC_Manager_LookupSize</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager,
<a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a> scaler,
<a href="ft2-base_interface.html#FT_Size">FT_Size</a> *asize );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object that corresponds to a given <a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a> pointer through a cache manager.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>manager</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the cache manager.</p>
</td></tr>
-<tr valign=top><td><b>scaler</b></td><td>
+<tr><td class="val" id="scaler">scaler</td><td class="desc">
<p>A scaler handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>asize</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="asize">asize</td><td class="desc">
<p>A handle to the size object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The returned <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object is always owned by the manager. You should never try to discard it by yourself.</p>
<p>You can access the parent <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object simply as &lsquo;size-&gt;face&rsquo; if you need it. Note that this object is also owned by the manager.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>When you perform a lookup, out-of-memory errors are detected <i>within</i> the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.</p>
<p>If a lookup fails with &lsquo;FT_Err_Out_Of_Memory&rsquo; the cache has already been completely flushed, and still no memory is available for the operation.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Node_Unref">FTC_Node_Unref</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ FT_EXPORT( <span class="keyword">void</span> )
+ <b>FTC_Manager_RemoveFaceID</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager,
+ <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> face_id );
+</pre>
+
+<p>A special function used to indicate to the cache manager that a given <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> is no longer valid, either because its content changed, or because it was deallocated or uninstalled.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="manager">manager</td><td class="desc">
+<p>The cache manager handle.</p>
+</td></tr>
+<tr><td class="val" id="face_id">face_id</td><td class="desc">
+<p>The <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> to be removed.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>This function flushes all nodes from the cache corresponding to this &lsquo;face_id&rsquo;, with the exception of nodes with a non-null reference count.</p>
+<p>Such nodes are however modified internally so as to never appear in later lookups with the same &lsquo;face_id&rsquo; value, and to be immediately destroyed when released by all their users.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_Node">FTC_Node</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_NodeRec_* <b>FTC_Node</b>;
+</pre>
+
+<p>An opaque handle to a cache node object. Each cache node is reference-counted. A node with a count of&nbsp;0 might be flushed out of a full cache whenever a lookup request is performed.</p>
+<p>If you look up nodes, you have the ability to &lsquo;acquire&rsquo; them, i.e., to increment their reference count. This will prevent the node from being flushed out of the cache until you explicitly &lsquo;release&rsquo; it (see <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a>).</p>
+<p>See also <a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a> and <a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_Node_Unref">FTC_Node_Unref</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FTC_Node_Unref</b>( <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a> node,
<a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Decrement a cache node's internal reference count. When the count reaches 0, it is not destroyed but becomes eligible for subsequent cache flushes.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>node</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="node">node</td><td class="desc">
<p>The cache node handle.</p>
</td></tr>
-<tr valign=top><td><b>manager</b></td><td>
+<tr><td class="val" id="manager">manager</td><td class="desc">
<p>The cache manager handle.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <span class="keyword">void</span> )
- <b>FTC_Manager_RemoveFaceID</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager,
- <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> face_id );
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A special function used to indicate to the cache manager that a given <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> is no longer valid, either because its content changed, or because it was deallocated or uninstalled.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>manager</b></td><td>
-<p>The cache manager handle.</p>
+<div class="section">
+<h3 id="FTC_ImageCache">FTC_ImageCache</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageCacheRec_* <b>FTC_ImageCache</b>;
+</pre>
+
+<p>A handle to a glyph image cache object. They are designed to hold many distinct glyph images while not exceeding a certain memory threshold.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_ImageCache_New">FTC_ImageCache_New</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FTC_ImageCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager,
+ <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a> *acache );
+</pre>
+
+<p>Create a new glyph image cache.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="manager">manager</td><td class="desc">
+<p>The parent manager for the image cache.</p>
</td></tr>
-<tr valign=top><td><b>face_id</b></td><td>
-<p>The <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> to be removed.</p>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="acache">acache</td><td class="desc">
+<p>A handle to the new glyph image cache object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>This function flushes all nodes from the cache corresponding to this &lsquo;face_id&rsquo;, with the exception of nodes with a non-null reference count.</p>
-<p>Such nodes are however modified internally so as to never appear in later lookups with the same &lsquo;face_id&rsquo; value, and to be immediately destroyed when released by all their users.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_CMapCache">FTC_CMapCache</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FTC_ImageCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a> cache,
+ <a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a> type,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
+ <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> *aglyph,
+ <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a> *anode );
+</pre>
+
+<p>Retrieve a given glyph image from a glyph image cache.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="cache">cache</td><td class="desc">
+<p>A handle to the source glyph image cache.</p>
+</td></tr>
+<tr><td class="val" id="type">type</td><td class="desc">
+<p>A pointer to a glyph image type descriptor.</p>
+</td></tr>
+<tr><td class="val" id="gindex">gindex</td><td class="desc">
+<p>The glyph index to retrieve.</p>
+</td></tr>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aglyph">aglyph</td><td class="desc">
+<p>The corresponding <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object. 0&nbsp;in case of failure.</p>
+</td></tr>
+<tr><td class="val" id="anode">anode</td><td class="desc">
+<p>Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with <a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a> and modify the new one.</p>
+<p>If &lsquo;anode&rsquo; is <i>not</i> NULL, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>) will always be kept in the cache until you call <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a> to &lsquo;release&rsquo; it.</p>
+<p>If &lsquo;anode&rsquo; is NULL, the cache node is left unchanged, which means that the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_SBit">FTC_SBit</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitRec_* <b>FTC_SBit</b>;
+</pre>
+
+<p>A handle to a small bitmap descriptor. See the <a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a> structure for details.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_SBitCache">FTC_SBitCache</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitCacheRec_* <b>FTC_SBitCache</b>;
+</pre>
+
+<p>A handle to a small bitmap cache. These are special cache objects used to store small glyph bitmaps (and anti-aliased pixmaps) in a much more efficient way than the traditional glyph image cache implemented by <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_SBitCache_New">FTC_SBitCache_New</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FTC_SBitCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager,
+ <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a> *acache );
+</pre>
+
+<p>Create a new cache to store small glyph bitmaps.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="manager">manager</td><td class="desc">
+<p>A handle to the source cache manager.</p>
+</td></tr>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="acache">acache</td><td class="desc">
+<p>A handle to the new sbit cache. NULL in case of error.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FTC_SBitCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a> cache,
+ <a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a> type,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
+ <a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a> *sbit,
+ <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a> *anode );
+</pre>
+
+<p>Look up a given small glyph bitmap in a given sbit cache and &lsquo;lock&rsquo; it to prevent its flushing from the cache until needed.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="cache">cache</td><td class="desc">
+<p>A handle to the source sbit cache.</p>
+</td></tr>
+<tr><td class="val" id="type">type</td><td class="desc">
+<p>A pointer to the glyph image type descriptor.</p>
+</td></tr>
+<tr><td class="val" id="gindex">gindex</td><td class="desc">
+<p>The glyph index.</p>
+</td></tr>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="sbit">sbit</td><td class="desc">
+<p>A handle to a small bitmap descriptor.</p>
+</td></tr>
+<tr><td class="val" id="anode">anode</td><td class="desc">
+<p>Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.</p>
+<p>The descriptor's &lsquo;buffer&rsquo; field is set to&nbsp;0 to indicate a missing glyph bitmap.</p>
+<p>If &lsquo;anode&rsquo; is <i>not</i> NULL, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a> to &lsquo;release&rsquo; it.</p>
+<p>If &lsquo;anode&rsquo; is NULL, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_CMapCache">FTC_CMapCache</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_CMapCacheRec_* <b>FTC_CMapCache</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>An opaque handle used to model a charmap cache. This cache is to hold character codes -&gt; glyph indices mappings.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_CMapCache_New">FTC_CMapCache_New</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_CMapCache_New">FTC_CMapCache_New</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FTC_CMapCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager,
<a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a> *acache );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Create a new charmap cache.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>manager</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the cache manager.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>acache</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="acache">acache</td><td class="desc">
<p>A new cache handle. NULL in case of error.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Like all other caches, this one will be destroyed with the cache manager.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
<b>FTC_CMapCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a> cache,
<a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> face_id,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> cmap_index,
<a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a> char_code );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Translate a character code into a glyph index, using the charmap cache.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>cache</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="cache">cache</td><td class="desc">
<p>A charmap cache handle.</p>
</td></tr>
-<tr valign=top><td><b>face_id</b></td><td>
+<tr><td class="val" id="face_id">face_id</td><td class="desc">
<p>The source face ID.</p>
</td></tr>
-<tr valign=top><td><b>cmap_index</b></td><td>
+<tr><td class="val" id="cmap_index">cmap_index</td><td class="desc">
<p>The index of the charmap in the source face. Any negative value means to use the cache <a href="ft2-base_interface.html#FT_Face">FT_Face</a>'s default charmap.</p>
</td></tr>
-<tr valign=top><td><b>char_code</b></td><td>
+<tr><td class="val" id="char_code">char_code</td><td class="desc">
<p>The character code (in the corresponding charmap).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>Glyph index. 0&nbsp;means &lsquo;no glyph&rsquo;.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_ImageTypeRec">FTC_ImageTypeRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_ScalerRec">FTC_ScalerRec</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ScalerRec_
+ {
+ <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> face_id;
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> width;
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> height;
+ <a href="ft2-basic_types.html#FT_Int">FT_Int</a> pixel;
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> x_res;
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> y_res;
+
+ } <b>FTC_ScalerRec</b>;
+</pre>
+
+<p>A structure used to describe a given character size in either pixels or points to the cache manager. See <a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a>.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="face_id">face_id</td><td class="desc">
+<p>The source face ID.</p>
+</td></tr>
+<tr><td class="val" id="width">width</td><td class="desc">
+<p>The character width.</p>
+</td></tr>
+<tr><td class="val" id="height">height</td><td class="desc">
+<p>The character height.</p>
+</td></tr>
+<tr><td class="val" id="pixel">pixel</td><td class="desc">
+<p>A Boolean. If 1, the &lsquo;width&rsquo; and &lsquo;height&rsquo; fields are interpreted as integer pixel character sizes. Otherwise, they are expressed as 1/64th of points.</p>
+</td></tr>
+<tr><td class="val" id="x_res">x_res</td><td class="desc">
+<p>Only used when &lsquo;pixel&rsquo; is value&nbsp;0 to indicate the horizontal resolution in dpi.</p>
+</td></tr>
+<tr><td class="val" id="y_res">y_res</td><td class="desc">
+<p>Only used when &lsquo;pixel&rsquo; is value&nbsp;0 to indicate the vertical resolution in dpi.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>This type is mainly used to retrieve <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects through the cache manager.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_Scaler">FTC_Scaler</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ScalerRec_* <b>FTC_Scaler</b>;
+</pre>
+
+<p>A handle to an <a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a> structure.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_ImageTypeRec">FTC_ImageTypeRec</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageTypeRec_
{
<a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> face_id;
@@ -674,176 +804,45 @@ Defined in FT_CACHE_H (freetype/ftcache.h).
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> flags;
} <b>FTC_ImageTypeRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model the type of images in a glyph cache.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face_id</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="face_id">face_id</td><td class="desc">
<p>The face ID.</p>
</td></tr>
-<tr valign=top><td><b>width</b></td><td>
+<tr><td class="val" id="width">width</td><td class="desc">
<p>The width in pixels.</p>
</td></tr>
-<tr valign=top><td><b>height</b></td><td>
+<tr><td class="val" id="height">height</td><td class="desc">
<p>The height in pixels.</p>
</td></tr>
-<tr valign=top><td><b>flags</b></td><td>
+<tr><td class="val" id="flags">flags</td><td class="desc">
<p>The load flags, as in <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_ImageType">FTC_ImageType</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FTC_ImageType">FTC_ImageType</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageTypeRec_* <b>FTC_ImageType</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to an <a href="ft2-cache_subsystem.html#FTC_ImageTypeRec">FTC_ImageTypeRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_ImageCache">FTC_ImageCache</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageCacheRec_* <b>FTC_ImageCache</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A handle to an glyph image cache object. They are designed to hold many distinct glyph images while not exceeding a certain memory threshold.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_ImageCache_New">FTC_ImageCache_New</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FTC_ImageCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager,
- <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a> *acache );
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Create a new glyph image cache.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>manager</b></td><td>
-<p>The parent manager for the image cache.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>acache</b></td><td>
-<p>A handle to the new glyph image cache object.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FTC_ImageCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a> cache,
- <a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a> type,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
- <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> *aglyph,
- <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a> *anode );
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Retrieve a given glyph image from a glyph image cache.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>cache</b></td><td>
-<p>A handle to the source glyph image cache.</p>
-</td></tr>
-<tr valign=top><td><b>type</b></td><td>
-<p>A pointer to a glyph image type descriptor.</p>
-</td></tr>
-<tr valign=top><td><b>gindex</b></td><td>
-<p>The glyph index to retrieve.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aglyph</b></td><td>
-<p>The corresponding <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object. 0&nbsp;in case of failure.</p>
-</td></tr>
-<tr valign=top><td><b>anode</b></td><td>
-<p>Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with <a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a> and modify the new one.</p>
-<p>If &lsquo;anode&rsquo; is <i>not</i> NULL, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>) will always be kept in the cache until you call <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a> to &lsquo;release&rsquo; it.</p>
-<p>If &lsquo;anode&rsquo; is NULL, the cache node is left unchanged, which means that the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FTC_ImageCache_LookupScaler</b>( <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a> cache,
<a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a> scaler,
@@ -851,80 +850,52 @@ Defined in FT_CACHE_H (freetype/ftcache.h).
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
<a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> *aglyph,
<a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a> *anode );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A variant of <a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a> that uses an <a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a> to specify the face ID and its size.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>cache</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="cache">cache</td><td class="desc">
<p>A handle to the source glyph image cache.</p>
</td></tr>
-<tr valign=top><td><b>scaler</b></td><td>
+<tr><td class="val" id="scaler">scaler</td><td class="desc">
<p>A pointer to a scaler descriptor.</p>
</td></tr>
-<tr valign=top><td><b>load_flags</b></td><td>
+<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>The corresponding load flags.</p>
</td></tr>
-<tr valign=top><td><b>gindex</b></td><td>
+<tr><td class="val" id="gindex">gindex</td><td class="desc">
<p>The glyph index to retrieve.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aglyph</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aglyph">aglyph</td><td class="desc">
<p>The corresponding <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object. 0&nbsp;in case of failure.</p>
</td></tr>
-<tr valign=top><td><b>anode</b></td><td>
+<tr><td class="val" id="anode">anode</td><td class="desc">
<p>Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with <a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a> and modify the new one.</p>
<p>If &lsquo;anode&rsquo; is <i>not</i> NULL, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>) will always be kept in the cache until you call <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a> to &lsquo;release&rsquo; it.</p>
<p>If &lsquo;anode&rsquo; is NULL, the cache node is left unchanged, which means that the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
<p>Calls to <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> and friends have no effect on cached glyphs; you should always use the FreeType cache API instead.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_SBit">FTC_SBit</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitRec_* <b>FTC_SBit</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A handle to a small bitmap descriptor. See the <a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a> structure for details.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_SBitRec">FTC_SBitRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FTC_SBitRec">FTC_SBitRec</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitRec_
{
<a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> width;
@@ -941,176 +912,51 @@ Defined in FT_CACHE_H (freetype/ftcache.h).
<a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* buffer;
} <b>FTC_SBitRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A very compact structure used to describe a small glyph bitmap.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>width</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="width">width</td><td class="desc">
<p>The bitmap width in pixels.</p>
</td></tr>
-<tr valign=top><td><b>height</b></td><td>
+<tr><td class="val" id="height">height</td><td class="desc">
<p>The bitmap height in pixels.</p>
</td></tr>
-<tr valign=top><td><b>left</b></td><td>
+<tr><td class="val" id="left">left</td><td class="desc">
<p>The horizontal distance from the pen position to the left bitmap border (a.k.a. &lsquo;left side bearing&rsquo;, or &lsquo;lsb&rsquo;).</p>
</td></tr>
-<tr valign=top><td><b>top</b></td><td>
+<tr><td class="val" id="top">top</td><td class="desc">
<p>The vertical distance from the pen position (on the baseline) to the upper bitmap border (a.k.a. &lsquo;top side bearing&rsquo;). The distance is positive for upwards y&nbsp;coordinates.</p>
</td></tr>
-<tr valign=top><td><b>format</b></td><td>
+<tr><td class="val" id="format">format</td><td class="desc">
<p>The format of the glyph bitmap (monochrome or gray).</p>
</td></tr>
-<tr valign=top><td><b>max_grays</b></td><td>
+<tr><td class="val" id="max_grays">max_grays</td><td class="desc">
<p>Maximum gray level value (in the range 1 to&nbsp;255).</p>
</td></tr>
-<tr valign=top><td><b>pitch</b></td><td>
+<tr><td class="val" id="pitch">pitch</td><td class="desc">
<p>The number of bytes per bitmap line. May be positive or negative.</p>
</td></tr>
-<tr valign=top><td><b>xadvance</b></td><td>
+<tr><td class="val" id="xadvance">xadvance</td><td class="desc">
<p>The horizontal advance width in pixels.</p>
</td></tr>
-<tr valign=top><td><b>yadvance</b></td><td>
+<tr><td class="val" id="yadvance">yadvance</td><td class="desc">
<p>The vertical advance height in pixels.</p>
</td></tr>
-<tr valign=top><td><b>buffer</b></td><td>
+<tr><td class="val" id="buffer">buffer</td><td class="desc">
<p>A pointer to the bitmap pixels.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_SBitCache">FTC_SBitCache</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitCacheRec_* <b>FTC_SBitCache</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A handle to a small bitmap cache. These are special cache objects used to store small glyph bitmaps (and anti-aliased pixmaps) in a much more efficient way than the traditional glyph image cache implemented by <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_SBitCache_New">FTC_SBitCache_New</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FTC_SBitCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager,
- <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a> *acache );
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Create a new cache to store small glyph bitmaps.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>manager</b></td><td>
-<p>A handle to the source cache manager.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>acache</b></td><td>
-<p>A handle to the new sbit cache. NULL in case of error.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FTC_SBitCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a> cache,
- <a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a> type,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
- <a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a> *sbit,
- <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a> *anode );
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Look up a given small glyph bitmap in a given sbit cache and &lsquo;lock&rsquo; it to prevent its flushing from the cache until needed.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>cache</b></td><td>
-<p>A handle to the source sbit cache.</p>
-</td></tr>
-<tr valign=top><td><b>type</b></td><td>
-<p>A pointer to the glyph image type descriptor.</p>
-</td></tr>
-<tr valign=top><td><b>gindex</b></td><td>
-<p>The glyph index.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>sbit</b></td><td>
-<p>A handle to a small bitmap descriptor.</p>
-</td></tr>
-<tr valign=top><td><b>anode</b></td><td>
-<p>Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.</p>
-<p>The descriptor's &lsquo;buffer&rsquo; field is set to&nbsp;0 to indicate a missing glyph bitmap.</p>
-<p>If &lsquo;anode&rsquo; is <i>not</i> NULL, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a> to &lsquo;release&rsquo; it.</p>
-<p>If &lsquo;anode&rsquo; is NULL, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CACHE_H (freetype/ftcache.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</h3>
+<p>Defined in FT_CACHE_H (ftcache.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FTC_SBitCache_LookupScaler</b>( <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a> cache,
<a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a> scaler,
@@ -1118,53 +964,47 @@ Defined in FT_CACHE_H (freetype/ftcache.h).
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
<a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a> *sbit,
<a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a> *anode );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A variant of <a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a> that uses an <a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a> to specify the face ID and its size.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>cache</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="cache">cache</td><td class="desc">
<p>A handle to the source sbit cache.</p>
</td></tr>
-<tr valign=top><td><b>scaler</b></td><td>
+<tr><td class="val" id="scaler">scaler</td><td class="desc">
<p>A pointer to the scaler descriptor.</p>
</td></tr>
-<tr valign=top><td><b>load_flags</b></td><td>
+<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>The corresponding load flags.</p>
</td></tr>
-<tr valign=top><td><b>gindex</b></td><td>
+<tr><td class="val" id="gindex">gindex</td><td class="desc">
<p>The glyph index.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>sbit</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="sbit">sbit</td><td class="desc">
<p>A handle to a small bitmap descriptor.</p>
</td></tr>
-<tr valign=top><td><b>anode</b></td><td>
+<tr><td class="val" id="anode">anode</td><td class="desc">
<p>Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.</p>
<p>The descriptor's &lsquo;buffer&rsquo; field is set to&nbsp;0 to indicate a missing glyph bitmap.</p>
<p>If &lsquo;anode&rsquo; is <i>not</i> NULL, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a> to &lsquo;release&rsquo; it.</p>
<p>If &lsquo;anode&rsquo; is NULL, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-cff_driver.html b/docs/reference/ft2-cff_driver.html
new file mode 100644
index 0000000..f1de566
--- /dev/null
+++ b/docs/reference/ft2-cff_driver.html
@@ -0,0 +1,225 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>FreeType-2.5.5 API Reference</title>
+<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
+ body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+ color: #000000;
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
+
+ h1 { text-align: center; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
+
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
+
+ span.keyword { font-family: monospace;
+ text-align: left;
+ white-space: pre;
+ color: darkblue; }
+
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
+
+</style>
+</head>
+<body>
+
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
+
+<h1>The CFF driver</h1>
+<h2>Synopsis</h2>
+<table class="synopsis">
+<tr><td><a href="#hinting-engine">hinting-engine</a></td><td><a href="#darkening-parameters">darkening-parameters</a></td><td><a href="#FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</a></td></tr>
+<tr><td><a href="#no-stem-darkening">no-stem-darkening</a></td><td>&nbsp;</td><td></td></tr>
+</table>
+
+
+<p>While FreeType's CFF driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. The list below gives the available properties together with the necessary macros and structures.</p>
+<p>The CFF driver's module name is &lsquo;cff&rsquo;.</p>
+<p><b>Hinting</b> <b>and</b> <b>antialiasing</b> <b>principles</b> <b>of</b> <b>the</b> <b>new</b> <b>engine</b></p>
+<p>The rasterizer is positioning horizontal features (e.g., ascender height &amp; x-height, or crossbars) on the pixel grid and minimizing the amount of antialiasing applied to them, while placing vertical features (vertical stems) on the pixel grid without hinting, thus representing the stem position and weight accurately. Sometimes the vertical stems may be only partially black. In this context, &lsquo;antialiasing&rsquo; means that stems are not positioned exactly on pixel borders, causing a fuzzy appearance.</p>
+<p>There are two principles behind this approach.</p>
+<p>1) No hinting in the horizontal direction: Unlike &lsquo;superhinted&rsquo; TrueType, which changes glyph widths to accommodate regular inter-glyph spacing, Adobe's approach is &lsquo;faithful to the design&rsquo; in representing both the glyph width and the inter-glyph spacing designed for the font. This makes the screen display as close as it can be to the result one would get with infinite resolution, while preserving what is considered the key characteristics of each glyph. Note that the distances between unhinted and grid-fitted positions at small sizes are comparable to kerning values and thus would be noticeable (and distracting) while reading if hinting were applied.</p>
+<p>One of the reasons to not hint horizontally is antialiasing for LCD screens: The pixel geometry of modern displays supplies three vertical sub-pixels as the eye moves horizontally across each visible pixel. On devices where we can be certain this characteristic is present a rasterizer can take advantage of the sub-pixels to add increments of weight. In Western writing systems this turns out to be the more critical direction anyway; the weights and spacing of vertical stems (see above) are central to Armenian, Cyrillic, Greek, and Latin type designs. Even when the rasterizer uses greyscale antialiasing instead of color (a necessary compromise when one doesn't know the screen characteristics), the unhinted vertical features preserve the design's weight and spacing much better than aliased type would.</p>
+<p>2) Aligment in the vertical direction: Weights and spacing along the y&nbsp;axis are less critical; what is much more important is the visual alignment of related features (like cap-height and x-height). The sense of alignment for these is enhanced by the sharpness of grid-fit edges, while the cruder vertical resolution (full pixels instead of 1/3 pixels) is less of a problem.</p>
+<p>On the technical side, horizontal alignment zones for ascender, x-height, and other important height values (traditionally called &lsquo;blue zones&rsquo;) as defined in the font are positioned independently, each being rounded to the nearest pixel edge, taking care of overshoot suppression at small sizes, stem darkening, and scaling.</p>
+<p>Hstems (this is, hint values defined in the font to help align horizontal features) that fall within a blue zone are said to be &lsquo;captured&rsquo; and are aligned to that zone. Uncaptured stems are moved in one of four ways, top edge up or down, bottom edge up or down. Unless there are conflicting hstems, the smallest movement is taken to minimize distortion.</p>
+
+<div class="section">
+<h3 id="hinting-engine">hinting-engine</h3>
+
+<p>Thanks to Adobe, which contributed a new hinting (and parsing) engine, an application can select between &lsquo;freetype&rsquo; and &lsquo;adobe&rsquo; if compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration macro isn't defined, &lsquo;hinting-engine&rsquo; does nothing.</p>
+<p>The default engine is &lsquo;freetype&rsquo; if CFF_CONFIG_OPTION_OLD_ENGINE is defined, and &lsquo;adobe&rsquo; otherwise.</p>
+<p>The following example code demonstrates how to select Adobe's hinting engine (omitting the error handling).</p>
+<pre class="colored">
+ FT_Library library;
+ FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "cff",
+ "hinting-engine", &amp;hinting_engine );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="no-stem-darkening">no-stem-darkening</h3>
+
+<p>By default, the Adobe CFF engine darkens stems at smaller sizes, regardless of hinting, to enhance contrast. This feature requires a rendering system with proper gamma correction. Setting this property, stem darkening gets switched off.</p>
+<p>Note that stem darkening is never applied if <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> is set.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Bool no_stem_darkening = TRUE;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "cff",
+ "no-stem-darkening", &amp;no_stem_darkening );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="darkening-parameters">darkening-parameters</h3>
+
+<p>By default, the Adobe CFF engine darkens stems as follows (if the &lsquo;no-stem-darkening&rsquo; property isn't set):</p>
+<pre class="colored">
+ stem width &lt;= 0.5px: darkening amount = 0.4px
+ stem width = 1px: darkening amount = 0.275px
+ stem width = 1.667px: darkening amount = 0.275px
+ stem width &gt;= 2.333px: darkening amount = 0px
+</pre>
+<p>and piecewise linear in-between. At configuration time, these four control points can be set with the macro &lsquo;CFF_CONFIG_OPTION_DARKENING_PARAMETERS&rsquo;. At runtime, the control points can be changed using the &lsquo;darkening-parameters&rsquo; property, as the following example demonstrates.</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Int darken_params[8] = { 500, 300, // x1, y1
+ 1000, 200, // x2, y2
+ 1500, 100, // x3, y3
+ 2000, 0 }; // x4, y4
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "cff",
+ "darkening-parameters", darken_params );
+</pre>
+<p>The x&nbsp;values give the stem width, and the y&nbsp;values the darkening amount. The unit is 1000th of pixels. All coordinate values must be positive; the x&nbsp;values must be monotonically increasing; the y&nbsp;values must be monotonically decreasing and smaller than or equal to 500 (corresponding to half a pixel); the slope of each linear piece must be shallower than -1 (e.g., -.4).</p>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</h3>
+<p>Defined in FT_CFF_DRIVER_H (ftcffdrv.h).</p>
+<pre>
+#define <a href="ft2-cff_driver.html#FT_CFF_HINTING_FREETYPE">FT_CFF_HINTING_FREETYPE</a> 0
+#define <a href="ft2-cff_driver.html#FT_CFF_HINTING_ADOBE">FT_CFF_HINTING_ADOBE</a> 1
+</pre>
+
+<p>A list of constants used for the <a href="ft2-cff_driver.html#hinting-engine">hinting-engine</a> property to select the hinting engine for CFF fonts.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_CFF_HINTING_FREETYPE">FT_CFF_HINTING_FREETYPE</td><td class="desc">
+<p>Use the old FreeType hinting engine.</p>
+</td></tr>
+<tr><td class="val" id="FT_CFF_HINTING_ADOBE">FT_CFF_HINTING_ADOBE</td><td class="desc">
+<p>Use the hinting engine contributed by Adobe.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+</body>
+</html>
diff --git a/docs/reference/ft2-cid_fonts.html b/docs/reference/ft2-cid_fonts.html
index cc533b5..cb0b506 100644
--- a/docs/reference/ft2-cid_fonts.html
+++ b/docs/reference/ft2-cid_fonts.html
@@ -3,202 +3,238 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-CID Fonts
-</h1></center>
+<h1>CID Fonts</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></td></tr>
-<tr><td></td><td><a href="#FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></td></tr>
-<tr><td></td><td><a href="#FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></td></tr>
+<tr><td><a href="#FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></td></tr>
+<tr><td><a href="#FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>This section contains the declaration of CID-keyed font specific functions.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CID_H (freetype/ftcid.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</h3>
+<p>Defined in FT_CID_H (ftcid.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_CID_Registry_Ordering_Supplement</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<span class="keyword">const</span> <span class="keyword">char</span>* *registry,
<span class="keyword">const</span> <span class="keyword">char</span>* *ordering,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> *supplement);
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the Registry/Ordering/Supplement triple (also known as the "R/O/S") from a CID-keyed font.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>registry</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="registry">registry</td><td class="desc">
<p>The registry, as a C&nbsp;string, owned by the face.</p>
</td></tr>
-<tr valign=top><td><b>ordering</b></td><td>
+<tr><td class="val" id="ordering">ordering</td><td class="desc">
<p>The ordering, as a C&nbsp;string, owned by the face.</p>
</td></tr>
-<tr valign=top><td><b>supplement</b></td><td>
+<tr><td class="val" id="supplement">supplement</td><td class="desc">
<p>The supplement.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function only works with CID faces, returning an error otherwise.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.6</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CID_H (freetype/ftcid.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</h3>
+<p>Defined in FT_CID_H (ftcid.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_CID_Is_Internally_CID_Keyed</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> *is_cid );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the type of the input face, CID keyed or not. In constrast to the <a href="ft2-base_interface.html#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a> macro this function returns successfully also for CID-keyed fonts in an SNFT wrapper.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>is_cid</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="is_cid">is_cid</td><td class="desc">
<p>The type of the face as an <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function only works with CID faces and OpenType fonts, returning an error otherwise.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.9</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_CID_H (freetype/ftcid.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</h3>
+<p>Defined in FT_CID_H (ftcid.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_CID_From_Glyph_Index</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> glyph_index,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *cid );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the CID of the input glyph index.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
-<tr valign=top><td><b>glyph_index</b></td><td>
+<tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
<p>The input glyph index.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>cid</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="cid">cid</td><td class="desc">
<p>The CID as an <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function only works with CID faces and OpenType fonts, returning an error otherwise.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.9</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-computations.html b/docs/reference/ft2-computations.html
index 82a2a27..a7771ef 100644
--- a/docs/reference/ft2-computations.html
+++ b/docs/reference/ft2-computations.html
@@ -3,830 +3,698 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Computations
-</h1></center>
+<h1>Computations</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_MulDiv">FT_MulDiv</a></td><td></td><td><a href="#FT_Matrix_Invert">FT_Matrix_Invert</a></td><td></td><td><a href="#FT_Tan">FT_Tan</a></td></tr>
-<tr><td></td><td><a href="#FT_MulFix">FT_MulFix</a></td><td></td><td><a href="#FT_Angle">FT_Angle</a></td><td></td><td><a href="#FT_Atan2">FT_Atan2</a></td></tr>
-<tr><td></td><td><a href="#FT_DivFix">FT_DivFix</a></td><td></td><td><a href="#FT_ANGLE_PI">FT_ANGLE_PI</a></td><td></td><td><a href="#FT_Angle_Diff">FT_Angle_Diff</a></td></tr>
-<tr><td></td><td><a href="#FT_RoundFix">FT_RoundFix</a></td><td></td><td><a href="#FT_ANGLE_2PI">FT_ANGLE_2PI</a></td><td></td><td><a href="#FT_Vector_Unit">FT_Vector_Unit</a></td></tr>
-<tr><td></td><td><a href="#FT_CeilFix">FT_CeilFix</a></td><td></td><td><a href="#FT_ANGLE_PI2">FT_ANGLE_PI2</a></td><td></td><td><a href="#FT_Vector_Rotate">FT_Vector_Rotate</a></td></tr>
-<tr><td></td><td><a href="#FT_FloorFix">FT_FloorFix</a></td><td></td><td><a href="#FT_ANGLE_PI4">FT_ANGLE_PI4</a></td><td></td><td><a href="#FT_Vector_Length">FT_Vector_Length</a></td></tr>
-<tr><td></td><td><a href="#FT_Vector_Transform">FT_Vector_Transform</a></td><td></td><td><a href="#FT_Sin">FT_Sin</a></td><td></td><td><a href="#FT_Vector_Polarize">FT_Vector_Polarize</a></td></tr>
-<tr><td></td><td><a href="#FT_Matrix_Multiply">FT_Matrix_Multiply</a></td><td></td><td><a href="#FT_Cos">FT_Cos</a></td><td></td><td><a href="#FT_Vector_From_Polar">FT_Vector_From_Polar</a></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_MulDiv">FT_MulDiv</a></td><td>&nbsp;</td><td><a href="#FT_Atan2">FT_Atan2</a></td></tr>
+<tr><td><a href="#FT_MulFix">FT_MulFix</a></td><td><a href="#FT_Angle">FT_Angle</a></td><td><a href="#FT_Angle_Diff">FT_Angle_Diff</a></td></tr>
+<tr><td><a href="#FT_DivFix">FT_DivFix</a></td><td><a href="#FT_ANGLE_PI">FT_ANGLE_PI</a></td><td><a href="#FT_Vector_Unit">FT_Vector_Unit</a></td></tr>
+<tr><td><a href="#FT_RoundFix">FT_RoundFix</a></td><td><a href="#FT_ANGLE_2PI">FT_ANGLE_2PI</a></td><td><a href="#FT_Vector_Rotate">FT_Vector_Rotate</a></td></tr>
+<tr><td><a href="#FT_CeilFix">FT_CeilFix</a></td><td><a href="#FT_ANGLE_PI2">FT_ANGLE_PI2</a></td><td><a href="#FT_Vector_Length">FT_Vector_Length</a></td></tr>
+<tr><td><a href="#FT_FloorFix">FT_FloorFix</a></td><td><a href="#FT_ANGLE_PI4">FT_ANGLE_PI4</a></td><td><a href="#FT_Vector_Polarize">FT_Vector_Polarize</a></td></tr>
+<tr><td><a href="#FT_Vector_Transform">FT_Vector_Transform</a></td><td><a href="#FT_Sin">FT_Sin</a></td><td><a href="#FT_Vector_From_Polar">FT_Vector_From_Polar</a></td></tr>
+<tr><td><a href="#FT_Matrix_Multiply">FT_Matrix_Multiply</a></td><td><a href="#FT_Cos">FT_Cos</a></td><td></td></tr>
+<tr><td><a href="#FT_Matrix_Invert">FT_Matrix_Invert</a></td><td><a href="#FT_Tan">FT_Tan</a></td><td></td></tr>
+</table>
+
+
<p>This section contains various functions used to perform computations on 16.16 fixed-float numbers or 2d vectors.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_MulDiv">FT_MulDiv</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_MulDiv">FT_MulDiv</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> )
<b>FT_MulDiv</b>( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> a,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> b,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> c );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A very simple function used to perform the computation &lsquo;(a*b)/c&rsquo; with maximal accuracy (it uses a 64-bit intermediate integer whenever necessary).</p>
+<p>A very simple function used to perform the computation &lsquo;(a*b)/c&rsquo; with maximum accuracy (it uses a 64-bit intermediate integer whenever necessary).</p>
<p>This function isn't necessarily as fast as some processor specific operations, but is at least completely portable.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>a</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="a">a</td><td class="desc">
<p>The first multiplier.</p>
</td></tr>
-<tr valign=top><td><b>b</b></td><td>
+<tr><td class="val" id="b">b</td><td class="desc">
<p>The second multiplier.</p>
</td></tr>
-<tr valign=top><td><b>c</b></td><td>
+<tr><td class="val" id="c">c</td><td class="desc">
<p>The divisor.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The result of &lsquo;(a*b)/c&rsquo;. This function never traps when trying to divide by zero; it simply returns &lsquo;MaxInt&rsquo; or &lsquo;MinInt&rsquo; depending on the signs of &lsquo;a&rsquo; and &lsquo;b&rsquo;.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_MulFix">FT_MulFix</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_MulFix">FT_MulFix</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> )
<b>FT_MulFix</b>( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> a,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> b );
+</pre>
+
+<p>A very simple function used to perform the computation &lsquo;(a*b)/0x10000&rsquo; with maximum accuracy. Most of the time this is used to multiply a given value by a 16.16 fixed-point factor.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A very simple function used to perform the computation &lsquo;(a*b)/0x10000&rsquo; with maximal accuracy. Most of the time this is used to multiply a given value by a 16.16 fixed float factor.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>a</b></td><td>
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="a">a</td><td class="desc">
<p>The first multiplier.</p>
</td></tr>
-<tr valign=top><td><b>b</b></td><td>
+<tr><td class="val" id="b">b</td><td class="desc">
<p>The second multiplier. Use a 16.16 factor here whenever possible (see note below).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The result of &lsquo;(a*b)/0x10000&rsquo;.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function has been optimized for the case where the absolute value of &lsquo;a&rsquo; is less than 2048, and &lsquo;b&rsquo; is a 16.16 scaling factor. As this happens mainly when scaling from notional units to fractional pixels in FreeType, it resulted in noticeable speed improvements between versions 2.x and 1.x.</p>
<p>As a conclusion, always try to place a 16.16 factor as the <i>second</i> argument of this function; this can make a great difference.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_DivFix">FT_DivFix</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_DivFix">FT_DivFix</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> )
<b>FT_DivFix</b>( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> a,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> b );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A very simple function used to perform the computation &lsquo;(a*0x10000)/b&rsquo; with maximal accuracy. Most of the time, this is used to divide a given value by a 16.16 fixed float factor.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>a</b></td><td>
-<p>The first multiplier.</p>
+<p>A very simple function used to perform the computation &lsquo;(a*0x10000)/b&rsquo; with maximum accuracy. Most of the time, this is used to divide a given value by a 16.16 fixed-point factor.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="a">a</td><td class="desc">
+<p>The numerator.</p>
</td></tr>
-<tr valign=top><td><b>b</b></td><td>
-<p>The second multiplier. Use a 16.16 factor here whenever possible (see note below).</p>
+<tr><td class="val" id="b">b</td><td class="desc">
+<p>The denominator. Use a 16.16 factor here.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The result of &lsquo;(a*0x10000)/b&rsquo;.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The optimization for FT_DivFix() is simple: If (a&nbsp;&lt;&lt;&nbsp;16) fits in 32&nbsp;bits, then the division is computed directly. Otherwise, we use a specialized version of <a href="ft2-computations.html#FT_MulDiv">FT_MulDiv</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_RoundFix">FT_RoundFix</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_RoundFix">FT_RoundFix</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
<b>FT_RoundFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> a );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A very simple function used to round a 16.16 fixed number.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>a</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="a">a</td><td class="desc">
<p>The number to be rounded.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The result of &lsquo;(a + 0x8000) &amp; -0x10000&rsquo;.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CeilFix">FT_CeilFix</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_CeilFix">FT_CeilFix</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
<b>FT_CeilFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> a );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A very simple function used to compute the ceiling function of a 16.16 fixed number.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>a</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="a">a</td><td class="desc">
<p>The number for which the ceiling function is to be computed.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The result of &lsquo;(a + 0x10000 - 1) &amp; -0x10000&rsquo;.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_FloorFix">FT_FloorFix</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_FloorFix">FT_FloorFix</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
<b>FT_FloorFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> a );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A very simple function used to compute the floor function of a 16.16 fixed number.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>a</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="a">a</td><td class="desc">
<p>The number for which the floor function is to be computed.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The result of &lsquo;a &amp; -0x10000&rsquo;.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Vector_Transform">FT_Vector_Transform</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Vector_Transform">FT_Vector_Transform</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Vector_Transform</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* vec,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>* matrix );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Transform a single vector through a 2x2 matrix.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>vector</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="vector">vector</td><td class="desc">
<p>The target vector to transform.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>matrix</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="matrix">matrix</td><td class="desc">
<p>A pointer to the source 2x2 matrix.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The result is undefined if either &lsquo;vector&rsquo; or &lsquo;matrix&rsquo; is invalid.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Matrix_Multiply">FT_Matrix_Multiply</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Matrix_Multiply">FT_Matrix_Multiply</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Matrix_Multiply</b>( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>* a,
<a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>* b );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Perform the matrix operation &lsquo;b = a*b&rsquo;.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>a</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="a">a</td><td class="desc">
<p>A pointer to matrix &lsquo;a&rsquo;.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>b</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="b">b</td><td class="desc">
<p>A pointer to matrix &lsquo;b&rsquo;.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The result is undefined if either &lsquo;a&rsquo; or &lsquo;b&rsquo; is zero.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Matrix_Invert">FT_Matrix_Invert</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Matrix_Invert">FT_Matrix_Invert</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Matrix_Invert</b>( <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>* matrix );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Invert a 2x2 matrix. Return an error if it can't be inverted.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>matrix</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="matrix">matrix</td><td class="desc">
<p>A pointer to the target matrix. Remains untouched in case of error.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Angle">FT_Angle</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Angle">FT_Angle</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
<span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> <b>FT_Angle</b>;
+</pre>
+
+<p>This type is used to model angle values in FreeType. Note that the angle is a 16.16 fixed-point value expressed in degrees.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This type is used to model angle values in FreeType. Note that the angle is a 16.16 fixed float value expressed in degrees.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ANGLE_PI">FT_ANGLE_PI</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_ANGLE_PI">FT_ANGLE_PI</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
#define <b>FT_ANGLE_PI</b> ( 180L &lt;&lt; 16 )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>The angle pi expressed in <a href="ft2-computations.html#FT_Angle">FT_Angle</a> units.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ANGLE_2PI">FT_ANGLE_2PI</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_ANGLE_2PI">FT_ANGLE_2PI</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
#define <b>FT_ANGLE_2PI</b> ( <a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a> * 2 )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>The angle 2*pi expressed in <a href="ft2-computations.html#FT_Angle">FT_Angle</a> units.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ANGLE_PI2">FT_ANGLE_PI2</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_ANGLE_PI2">FT_ANGLE_PI2</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
#define <b>FT_ANGLE_PI2</b> ( <a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a> / 2 )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>The angle pi/2 expressed in <a href="ft2-computations.html#FT_Angle">FT_Angle</a> units.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ANGLE_PI4">FT_ANGLE_PI4</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_ANGLE_PI4">FT_ANGLE_PI4</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
#define <b>FT_ANGLE_PI4</b> ( <a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a> / 4 )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>The angle pi/4 expressed in <a href="ft2-computations.html#FT_Angle">FT_Angle</a> units.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Sin">FT_Sin</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Sin">FT_Sin</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
<b>FT_Sin</b>( <a href="ft2-computations.html#FT_Angle">FT_Angle</a> angle );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return the sinus of a given angle in fixed point format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>angle</b></td><td>
+<p>Return the sinus of a given angle in fixed-point format.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The input angle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The sinus value.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If you need both the sinus and cosinus for a given angle, use the function <a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Cos">FT_Cos</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Cos">FT_Cos</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
<b>FT_Cos</b>( <a href="ft2-computations.html#FT_Angle">FT_Angle</a> angle );
+</pre>
+
+<p>Return the cosinus of a given angle in fixed-point format.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return the cosinus of a given angle in fixed point format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>angle</b></td><td>
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The input angle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The cosinus value.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If you need both the sinus and cosinus for a given angle, use the function <a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Tan">FT_Tan</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Tan">FT_Tan</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
<b>FT_Tan</b>( <a href="ft2-computations.html#FT_Angle">FT_Angle</a> angle );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return the tangent of a given angle in fixed point format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>angle</b></td><td>
+<p>Return the tangent of a given angle in fixed-point format.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The input angle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The tangent value.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Atan2">FT_Atan2</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Atan2">FT_Atan2</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-computations.html#FT_Angle">FT_Angle</a> )
<b>FT_Atan2</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> x,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> y );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the arc-tangent corresponding to a given vector (x,y) in the 2d plane.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>x</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="x">x</td><td class="desc">
<p>The horizontal vector coordinate.</p>
</td></tr>
-<tr valign=top><td><b>y</b></td><td>
+<tr><td class="val" id="y">y</td><td class="desc">
<p>The vertical vector coordinate.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The arc-tangent value (i.e. angle).</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Angle_Diff">FT_Angle_Diff</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Angle_Diff">FT_Angle_Diff</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-computations.html#FT_Angle">FT_Angle</a> )
<b>FT_Angle_Diff</b>( <a href="ft2-computations.html#FT_Angle">FT_Angle</a> angle1,
<a href="ft2-computations.html#FT_Angle">FT_Angle</a> angle2 );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the difference between two angles. The result is always constrained to the ]-PI..PI] interval.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>angle1</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="angle1">angle1</td><td class="desc">
<p>First angle.</p>
</td></tr>
-<tr valign=top><td><b>angle2</b></td><td>
+<tr><td class="val" id="angle2">angle2</td><td class="desc">
<p>Second angle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>Constrained value of &lsquo;value2-value1&rsquo;.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Vector_Unit">FT_Vector_Unit</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Vector_Unit">FT_Vector_Unit</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Vector_Unit</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* vec,
<a href="ft2-computations.html#FT_Angle">FT_Angle</a> angle );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the unit vector corresponding to a given angle. After the call, the value of &lsquo;vec.x&rsquo; will be &lsquo;sin(angle)&rsquo;, and the value of &lsquo;vec.y&rsquo; will be &lsquo;cos(angle)&rsquo;.</p>
<p>This function is useful to retrieve both the sinus and cosinus of a given angle quickly.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>vec</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="vec">vec</td><td class="desc">
<p>The address of target vector.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>angle</b></td><td>
-<p>The address of angle.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="angle">angle</td><td class="desc">
+<p>The input angle.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Vector_Rotate">FT_Vector_Rotate</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Vector_Rotate">FT_Vector_Rotate</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Vector_Rotate</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* vec,
<a href="ft2-computations.html#FT_Angle">FT_Angle</a> angle );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Rotate a vector by a given angle.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>vec</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="vec">vec</td><td class="desc">
<p>The address of target vector.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>angle</b></td><td>
-<p>The address of angle.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="angle">angle</td><td class="desc">
+<p>The input angle.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Vector_Length">FT_Vector_Length</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Vector_Length">FT_Vector_Length</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
<b>FT_Vector_Length</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* vec );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the length of a given vector.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>vec</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="vec">vec</td><td class="desc">
<p>The address of target vector.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The vector length, expressed in the same units that the original vector coordinates.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Vector_Polarize">FT_Vector_Polarize</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Vector_Polarize">FT_Vector_Polarize</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Vector_Polarize</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* vec,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *length,
<a href="ft2-computations.html#FT_Angle">FT_Angle</a> *angle );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Compute both the length and angle of a given vector.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>vec</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="vec">vec</td><td class="desc">
<p>The address of source vector.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>length</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="length">length</td><td class="desc">
<p>The vector length.</p>
</td></tr>
-<tr valign=top><td><b>angle</b></td><td>
+<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The vector angle.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Vector_From_Polar">FT_Vector_From_Polar</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Vector_From_Polar">FT_Vector_From_Polar</h3>
+<p>Defined in FT_TRIGONOMETRY_H (fttrigon.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Vector_From_Polar</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* vec,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> length,
<a href="ft2-computations.html#FT_Angle">FT_Angle</a> angle );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Compute vector coordinates from a length and angle.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>vec</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="vec">vec</td><td class="desc">
<p>The address of source vector.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>length</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="length">length</td><td class="desc">
<p>The vector length.</p>
</td></tr>
-<tr valign=top><td><b>angle</b></td><td>
+<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The vector angle.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-font_formats.html b/docs/reference/ft2-font_formats.html
index 661480e..508cee2 100644
--- a/docs/reference/ft2-font_formats.html
+++ b/docs/reference/ft2-font_formats.html
@@ -3,82 +3,137 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Font Formats
-</h1></center>
+<h1>Font Formats</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Get_X11_Font_Format">FT_Get_X11_Font_Format</a></td><td></td><td></td><td></td><td></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_Get_X11_Font_Format">FT_Get_X11_Font_Format</a></td><td></td><td></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>The single function in this section can be used to get the font format. Note that this information is not needed normally; however, there are special cases (like in PDF devices) where it is important to differentiate, in spite of FreeType's uniform API.</p>
<p>This function is in the X11/xf86 namespace for historical reasons and in no way depends on that windowing system.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_X11_Font_Format">FT_Get_X11_Font_Format</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_XFREE86_H (freetype/ftxf86.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Get_X11_Font_Format">FT_Get_X11_Font_Format</h3>
+<p>Defined in FT_XFREE86_H (ftxf86.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">const</span> <span class="keyword">char</span>* )
<b>FT_Get_X11_Font_Format</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+</pre>
+
+<p>Return a string describing the format of a given face, using values that can be used as an X11 FONT_PROPERTY. Possible values are &lsquo;TrueType&rsquo;, &lsquo;Type&nbsp;1&rsquo;, &lsquo;BDF&rsquo;, &lsquo;PCF&rsquo;, &lsquo;Type&nbsp;42&rsquo;, &lsquo;CID&nbsp;Type&nbsp;1&rsquo;, &lsquo;CFF&rsquo;, &lsquo;PFR&rsquo;, and &lsquo;Windows&nbsp;FNT&rsquo;.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return a string describing the format of a given face, using values which can be used as an X11 FONT_PROPERTY. Possible values are &lsquo;TrueType&rsquo;, &lsquo;Type&nbsp;1&rsquo;, &lsquo;BDF&rsquo;, &lsquo;PCF&rsquo;, &lsquo;Type&nbsp;42&rsquo;, &lsquo;CID&nbsp;Type&nbsp;1&rsquo;, &lsquo;CFF&rsquo;, &lsquo;PFR&rsquo;, and &lsquo;Windows&nbsp;FNT&rsquo;.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>Input face handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>Font format string. NULL in case of error.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-gasp_table.html b/docs/reference/ft2-gasp_table.html
index 8199778..3b56119 100644
--- a/docs/reference/ft2-gasp_table.html
+++ b/docs/reference/ft2-gasp_table.html
@@ -3,140 +3,185 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Gasp Table
-</h1></center>
+<h1>Gasp Table</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_GASP_XXX">FT_GASP_XXX</a></td><td></td><td><a href="#FT_Get_Gasp">FT_Get_Gasp</a></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="#FT_Get_Gasp">FT_Get_Gasp</a></td><td></td><td></td><td></td><td></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>The function <a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a> can be used to query a TrueType or OpenType font for specific entries in its &lsquo;gasp&rsquo; table, if any. This is mainly useful when implementing native TrueType hinting with the bytecode interpreter to duplicate the Windows text rendering results.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GASP_XXX">FT_GASP_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GASP_H (freetype/ftgasp.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a> -1
-#define <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRIDFIT</a> 0x01
-#define <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRAY</a> 0x02
-#define <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_SMOOTHING</a> 0x08
-#define <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_GRIDFIT</a> 0x10
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
+
+<div class="section">
+<h3 id="FT_GASP_XXX">FT_GASP_XXX</h3>
+<p>Defined in FT_GASP_H (ftgasp.h).</p>
+<pre>
+#define <a href="ft2-gasp_table.html#FT_GASP_NO_TABLE">FT_GASP_NO_TABLE</a> -1
+#define <a href="ft2-gasp_table.html#FT_GASP_DO_GRIDFIT">FT_GASP_DO_GRIDFIT</a> 0x01
+#define <a href="ft2-gasp_table.html#FT_GASP_DO_GRAY">FT_GASP_DO_GRAY</a> 0x02
+#define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_SMOOTHING">FT_GASP_SYMMETRIC_SMOOTHING</a> 0x08
+#define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</a> 0x10
+</pre>
+
<p>A list of values and/or bit-flags returned by the <a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a> function.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_GASP_NO_TABLE</b></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_GASP_NO_TABLE">FT_GASP_NO_TABLE</td><td class="desc">
<p>This special value means that there is no GASP table in this face. It is up to the client to decide what to do.</p>
</td></tr>
-<tr valign=top><td><b>FT_GASP_DO_GRIDFIT</b></td><td>
+<tr><td class="val" id="FT_GASP_DO_GRIDFIT">FT_GASP_DO_GRIDFIT</td><td class="desc">
<p>Grid-fitting and hinting should be performed at the specified ppem. This <b>really</b> means TrueType bytecode interpretation. If this bit is not set, no hinting gets applied.</p>
</td></tr>
-<tr valign=top><td><b>FT_GASP_DO_GRAY</b></td><td>
+<tr><td class="val" id="FT_GASP_DO_GRAY">FT_GASP_DO_GRAY</td><td class="desc">
<p>Anti-aliased rendering should be performed at the specified ppem. If not set, do monochrome rendering.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_GASP_SYMMETRIC_SMOOTHING</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_GASP_SYMMETRIC_SMOOTHING">FT_GASP_SYMMETRIC_SMOOTHING</td><td class="desc">
<p>If set, smoothing along multiple axes must be used with ClearType.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_GASP_SYMMETRIC_GRIDFIT</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</td><td class="desc">
<p>Grid-fitting must be used with ClearType's symmetric smoothing.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The bit-flags &lsquo;FT_GASP_DO_GRIDFIT&rsquo; and &lsquo;FT_GASP_DO_GRAY&rsquo; are to be used for standard font rasterization only. Independently of that, &lsquo;FT_GASP_SYMMETRIC_SMOOTHING&rsquo; and &lsquo;FT_GASP_SYMMETRIC_GRIDFIT&rsquo; are to be used if ClearType is enabled (and &lsquo;FT_GASP_DO_GRIDFIT&rsquo; and &lsquo;FT_GASP_DO_GRAY&rsquo; are consequently ignored).</p>
<p>&lsquo;ClearType&rsquo; is Microsoft's implementation of LCD rendering, partly protected by patents.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.0</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Gasp">FT_Get_Gasp</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GASP_H (freetype/ftgasp.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Gasp">FT_Get_Gasp</h3>
+<p>Defined in FT_GASP_H (ftgasp.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
<b>FT_Get_Gasp</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> ppem );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Read the &lsquo;gasp&rsquo; table from a TrueType or OpenType font file and return the entry corresponding to a given character pixel size.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>The source face handle.</p>
</td></tr>
-<tr valign=top><td><b>ppem</b></td><td>
+<tr><td class="val" id="ppem">ppem</td><td class="desc">
<p>The vertical character pixel size.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>Bit flags (see <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a>), or <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a> if there is no &lsquo;gasp&rsquo; table in the face.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.0</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-glyph_management.html b/docs/reference/ft2-glyph_management.html
index f9ba910..017db1f 100644
--- a/docs/reference/ft2-glyph_management.html
+++ b/docs/reference/ft2-glyph_management.html
@@ -3,84 +3,137 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Glyph Management
-</h1></center>
+<h1>Glyph Management</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Glyph">FT_Glyph</a></td><td></td><td><a href="#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></td><td></td><td><a href="#ft_glyph_bbox_xxx">ft_glyph_bbox_xxx</a></td></tr>
-<tr><td></td><td><a href="#FT_GlyphRec">FT_GlyphRec</a></td><td></td><td><a href="#FT_Get_Glyph">FT_Get_Glyph</a></td><td></td><td><a href="#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></td></tr>
-<tr><td></td><td><a href="#FT_BitmapGlyph">FT_BitmapGlyph</a></td><td></td><td><a href="#FT_Glyph_Copy">FT_Glyph_Copy</a></td><td></td><td><a href="#FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></td></tr>
-<tr><td></td><td><a href="#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></td><td></td><td><a href="#FT_Glyph_Transform">FT_Glyph_Transform</a></td><td></td><td><a href="#FT_Done_Glyph">FT_Done_Glyph</a></td></tr>
-<tr><td></td><td><a href="#FT_OutlineGlyph">FT_OutlineGlyph</a></td><td></td><td><a href="#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_Glyph">FT_Glyph</a></td><td><a href="#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></td><td><a href="#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></td></tr>
+<tr><td><a href="#FT_GlyphRec">FT_GlyphRec</a></td><td><a href="#FT_Get_Glyph">FT_Get_Glyph</a></td><td><a href="#FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></td></tr>
+<tr><td><a href="#FT_BitmapGlyph">FT_BitmapGlyph</a></td><td><a href="#FT_Glyph_Copy">FT_Glyph_Copy</a></td><td><a href="#FT_Done_Glyph">FT_Done_Glyph</a></td></tr>
+<tr><td><a href="#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></td><td><a href="#FT_Glyph_Transform">FT_Glyph_Transform</a></td><td></td></tr>
+<tr><td><a href="#FT_OutlineGlyph">FT_OutlineGlyph</a></td><td><a href="#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></td><td></td></tr>
+</table>
+
+
<p>This section contains definitions used to manage glyph data through generic FT_Glyph objects. Each of them can contain a bitmap, a vector outline, or even images in other formats.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Glyph">FT_Glyph</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Glyph">FT_Glyph</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphRec_* <b>FT_Glyph</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Handle to an object used to model generic glyph images. It is a pointer to the <a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a> structure and can contain a glyph bitmap or pointer.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Glyph objects are not owned by the library. You must thus release them manually (through <a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a>) <i>before</i> calling <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GlyphRec">FT_GlyphRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_GlyphRec">FT_GlyphRec</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphRec_
{
<a href="ft2-base_interface.html#FT_Library">FT_Library</a> library;
@@ -89,60 +142,45 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a> advance;
} <b>FT_GlyphRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>The root glyph structure contains a given glyph image plus its advance width in 16.16 fixed float format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+<p>The root glyph structure contains a given glyph image plus its advance width in 16.16 fixed-point format.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the FreeType library object.</p>
</td></tr>
-<tr valign=top><td><b>clazz</b></td><td>
+<tr><td class="val" id="clazz">clazz</td><td class="desc">
<p>A pointer to the glyph's class. Private.</p>
</td></tr>
-<tr valign=top><td><b>format</b></td><td>
+<tr><td class="val" id="format">format</td><td class="desc">
<p>The format of the glyph's image.</p>
</td></tr>
-<tr valign=top><td><b>advance</b></td><td>
+<tr><td class="val" id="advance">advance</td><td class="desc">
<p>A 16.16 vector that gives the glyph's advance width.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_BitmapGlyph">FT_BitmapGlyph</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_BitmapGlyph">FT_BitmapGlyph</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_BitmapGlyphRec_* <b>FT_BitmapGlyph</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to an object used to model a bitmap glyph image. This is a sub-class of <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>, and a pointer to <a href="ft2-glyph_management.html#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_BitmapGlyphRec">FT_BitmapGlyphRec</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_BitmapGlyphRec_
{
<a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a> root;
@@ -151,356 +189,259 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
<a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> bitmap;
} <b>FT_BitmapGlyphRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used for bitmap glyph images. This really is a &lsquo;sub-class&rsquo; of <a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>root</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="root">root</td><td class="desc">
<p>The root <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> fields.</p>
</td></tr>
-<tr valign=top><td><b>left</b></td><td>
+<tr><td class="val" id="left">left</td><td class="desc">
<p>The left-side bearing, i.e., the horizontal distance from the current pen position to the left border of the glyph bitmap.</p>
</td></tr>
-<tr valign=top><td><b>top</b></td><td>
+<tr><td class="val" id="top">top</td><td class="desc">
<p>The top-side bearing, i.e., the vertical distance from the current pen position to the top border of the glyph bitmap. This distance is positive for upwards&nbsp;y!</p>
</td></tr>
-<tr valign=top><td><b>bitmap</b></td><td>
+<tr><td class="val" id="bitmap">bitmap</td><td class="desc">
<p>A descriptor for the bitmap.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>You can typecast an <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> to <a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a> if you have &lsquo;glyph-&gt;format == FT_GLYPH_FORMAT_BITMAP&rsquo;. This lets you access the bitmap's contents easily.</p>
<p>The corresponding pixel buffer is always owned by <a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a> and is thus created and destroyed with it.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_OutlineGlyph">FT_OutlineGlyph</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_OutlineGlyph">FT_OutlineGlyph</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_OutlineGlyphRec_* <b>FT_OutlineGlyph</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to an object used to model an outline glyph image. This is a sub-class of <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>, and a pointer to <a href="ft2-glyph_management.html#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_OutlineGlyphRec">FT_OutlineGlyphRec</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_OutlineGlyphRec_
{
<a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a> root;
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> outline;
} <b>FT_OutlineGlyphRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used for outline (vectorial) glyph images. This really is a &lsquo;sub-class&rsquo; of <a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>root</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="root">root</td><td class="desc">
<p>The root <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> fields.</p>
</td></tr>
-<tr valign=top><td><b>outline</b></td><td>
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A descriptor for the outline.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>You can typecast an <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> to <a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a> if you have &lsquo;glyph-&gt;format == FT_GLYPH_FORMAT_OUTLINE&rsquo;. This lets you access the outline's content easily.</p>
<p>As the outline is extracted from a glyph slot, its coordinates are expressed normally in 26.6 pixels, unless the flag <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> was used in <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>() or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>().</p>
<p>The outline's tables are always owned by the object and are destroyed with it.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Glyph">FT_Get_Glyph</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Glyph">FT_Get_Glyph</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_Glyph</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> slot,
<a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> *aglyph );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to extract a glyph image from a slot. Note that the created <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object must be released with <a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>slot</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="slot">slot</td><td class="desc">
<p>A handle to the source glyph slot.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aglyph</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aglyph">aglyph</td><td class="desc">
<p>A handle to the glyph object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Glyph_Copy">FT_Glyph_Copy</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Glyph_Copy">FT_Glyph_Copy</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Glyph_Copy</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> source,
<a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> *target );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to copy a glyph image. Note that the created <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object must be released with <a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>source</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="source">source</td><td class="desc">
<p>A handle to the source glyph object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>target</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="target">target</td><td class="desc">
<p>A handle to the target glyph object. 0&nbsp;in case of error.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Glyph_Transform">FT_Glyph_Transform</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Glyph_Transform">FT_Glyph_Transform</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Glyph_Transform</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> glyph,
<a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>* matrix,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* delta );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Transform a glyph image if its format is scalable.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>glyph</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="glyph">glyph</td><td class="desc">
<p>A handle to the target glyph object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>matrix</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="matrix">matrix</td><td class="desc">
<p>A pointer to a 2x2 matrix to apply.</p>
</td></tr>
-<tr valign=top><td><b>delta</b></td><td>
+<tr><td class="val" id="delta">delta</td><td class="desc">
<p>A pointer to a 2d vector to apply. Coordinates are expressed in 1/64th of a pixel.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code (if not 0, the glyph format is not scalable).</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The 2x2 transformation matrix is also applied to the glyph's advance vector.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Glyph_BBox_Mode_
{
- <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a> = 0,
- <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a> = 0,
- <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a> = 1,
- <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a> = 2,
- <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a> = 3
+ <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_UNSCALED">FT_GLYPH_BBOX_UNSCALED</a> = 0,
+ <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_SUBPIXELS">FT_GLYPH_BBOX_SUBPIXELS</a> = 0,
+ <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_GRIDFIT">FT_GLYPH_BBOX_GRIDFIT</a> = 1,
+ <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_TRUNCATE">FT_GLYPH_BBOX_TRUNCATE</a> = 2,
+ <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_PIXELS">FT_GLYPH_BBOX_PIXELS</a> = 3
} <b>FT_Glyph_BBox_Mode</b>;
-</pre></table><br>
-<table align=center width="87%"><tr><td>
+
+ /* these constants are deprecated; use the corresponding */
+ /* `<b>FT_Glyph_BBox_Mode</b>' values instead */
+#define ft_glyph_bbox_unscaled <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_UNSCALED">FT_GLYPH_BBOX_UNSCALED</a>
+#define ft_glyph_bbox_subpixels <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_SUBPIXELS">FT_GLYPH_BBOX_SUBPIXELS</a>
+#define ft_glyph_bbox_gridfit <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_GRIDFIT">FT_GLYPH_BBOX_GRIDFIT</a>
+#define ft_glyph_bbox_truncate <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_TRUNCATE">FT_GLYPH_BBOX_TRUNCATE</a>
+#define ft_glyph_bbox_pixels <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_PIXELS">FT_GLYPH_BBOX_PIXELS</a>
+</pre>
+
<p>The mode how the values of <a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a> are returned.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_GLYPH_BBOX_UNSCALED</b></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_GLYPH_BBOX_UNSCALED">FT_GLYPH_BBOX_UNSCALED</td><td class="desc">
<p>Return unscaled font units.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_GLYPH_BBOX_SUBPIXELS</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_GLYPH_BBOX_SUBPIXELS">FT_GLYPH_BBOX_SUBPIXELS</td><td class="desc">
<p>Return unfitted 26.6 coordinates.</p>
</td></tr>
-<tr valign=top><td><b>FT_GLYPH_BBOX_GRIDFIT</b></td><td>
+<tr><td class="val" id="FT_GLYPH_BBOX_GRIDFIT">FT_GLYPH_BBOX_GRIDFIT</td><td class="desc">
<p>Return grid-fitted 26.6 coordinates.</p>
</td></tr>
-<tr valign=top><td><b>FT_GLYPH_BBOX_TRUNCATE</b></td><td>
+<tr><td class="val" id="FT_GLYPH_BBOX_TRUNCATE">FT_GLYPH_BBOX_TRUNCATE</td><td class="desc">
<p>Return coordinates in integer pixels.</p>
</td></tr>
-<tr valign=top><td><b>FT_GLYPH_BBOX_PIXELS</b></td><td>
+<tr><td class="val" id="FT_GLYPH_BBOX_PIXELS">FT_GLYPH_BBOX_PIXELS</td><td class="desc">
<p>Return grid-fitted pixel coordinates.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="ft_glyph_bbox_xxx">ft_glyph_bbox_xxx</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_unscaled</a> <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a>
-#define <a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_subpixels</a> <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a>
-#define <a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_gridfit</a> <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a>
-#define <a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_truncate</a> <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a>
-#define <a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_pixels</a> <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>These constants are deprecated. Use the corresponding <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a> values instead.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>ft_glyph_bbox_unscaled</b></td><td>
-<p>See <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a>.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>ft_glyph_bbox_subpixels</b></td></tr>
-<tr valign=top><td></td><td>
-<p>See <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a>.</p>
-</td></tr>
-<tr valign=top><td><b>ft_glyph_bbox_gridfit</b></td><td>
-<p>See <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a>.</p>
-</td></tr>
-<tr valign=top><td><b>ft_glyph_bbox_truncate</b></td><td>
-<p>See <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a>.</p>
-</td></tr>
-<tr valign=top><td><b>ft_glyph_bbox_pixels</b></td><td>
-<p>See <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a>.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Glyph_Get_CBox</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> glyph,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> bbox_mode,
<a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *acbox );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return a glyph's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bézier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline which contains Bézier outside arcs).</p>
-<p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component which is dedicated to this single task.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>glyph</b></td><td>
+<p>Return a glyph's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bézier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bézier outside arcs).</p>
+<p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component, which is dedicated to this single task.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="glyph">glyph</td><td class="desc">
<p>A handle to the source glyph object.</p>
</td></tr>
-<tr valign=top><td><b>mode</b></td><td>
-<p>The mode which indicates how to interpret the returned bounding box values.</p>
+<tr><td class="val" id="mode">mode</td><td class="desc">
+<p>The mode that indicates how to interpret the returned bounding box values.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>acbox</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="acbox">acbox</td><td class="desc">
<p>The glyph coordinate bounding box. Coordinates are expressed in 1/64th of pixels if it is grid-fitted.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Coordinates are relative to the glyph origin, using the y&nbsp;upwards convention.</p>
<p>If the glyph has been loaded with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>, &lsquo;bbox_mode&rsquo; must be set to <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a> to get unscaled font units in 26.6 pixel format. The value <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a> is another name for this constant.</p>
-<p>If the font is tricky and the glyph has been loaded with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>, 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.</p>
+<p>If the font is tricky and the glyph has been loaded with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>, 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.</p>
<p>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:</p>
<pre class="colored">
width = bbox.xMax - bbox.xMin;
@@ -515,56 +456,47 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
</pre>
<p>To get the bbox in pixel coordinates, set &lsquo;bbox_mode&rsquo; to <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a>.</p>
<p>To get the bbox in grid-fitted pixel coordinates, set &lsquo;bbox_mode&rsquo; to <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Glyph_To_Bitmap</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>* the_glyph,
<a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> render_mode,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* origin,
<a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> destroy );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Convert a given glyph object to a bitmap glyph object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>the_glyph</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="the_glyph">the_glyph</td><td class="desc">
<p>A pointer to a handle to the target glyph.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>render_mode</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="render_mode">render_mode</td><td class="desc">
<p>An enumeration that describes how the data is rendered.</p>
</td></tr>
-<tr valign=top><td><b>origin</b></td><td>
+<tr><td class="val" id="origin">origin</td><td class="desc">
<p>A pointer to a vector used to translate the glyph image before rendering. Can be&nbsp;0 (if no translation). The origin is expressed in 26.6 pixels.</p>
</td></tr>
-<tr valign=top><td><b>destroy</b></td><td>
+<tr><td class="val" id="destroy">destroy</td><td class="desc">
<p>A boolean that indicates that the original glyph image should be destroyed by this function. It is never destroyed in case of error.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function does nothing if the glyph format isn't scalable.</p>
<p>The glyph image is translated with the &lsquo;origin&rsquo; vector before rendering.</p>
<p>The first parameter is a pointer to an <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> handle, that will be <i>replaced</i> by this function (with newly allocated data). Typically, you would use (omitting error handling):</p>
@@ -634,40 +566,29 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
for ( idx = 0; i &lt; MAX_GLYPHS; i++ )
FT_Done_Glyph( glyphs[idx] );
</pre>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Done_Glyph">FT_Done_Glyph</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Done_Glyph">FT_Done_Glyph</h3>
+<p>Defined in FT_GLYPH_H (ftglyph.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Done_Glyph</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> glyph );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Destroy a given glyph.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>glyph</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="glyph">glyph</td><td class="desc">
<p>A handle to the target glyph object.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-glyph_stroker.html b/docs/reference/ft2-glyph_stroker.html
index 441ea6d..d5daa46 100644
--- a/docs/reference/ft2-glyph_stroker.html
+++ b/docs/reference/ft2-glyph_stroker.html
@@ -3,936 +3,817 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Glyph Stroker
-</h1></center>
+<h1>Glyph Stroker</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Stroker">FT_Stroker</a></td><td></td><td><a href="#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td></tr>
-<tr><td></td><td><a href="#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td><td></td><td><a href="#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td></tr>
-<tr><td></td><td><a href="#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td><td></td><td><a href="#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td></tr>
-<tr><td></td><td><a href="#FT_StrokerBorder">FT_StrokerBorder</a></td><td></td><td><a href="#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td></td><td><a href="#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td></td><td><a href="#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td></tr>
-<tr><td></td><td><a href="#FT_Stroker_New">FT_Stroker_New</a></td><td></td><td><a href="#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td></tr>
-<tr><td></td><td><a href="#FT_Stroker_Set">FT_Stroker_Set</a></td><td></td><td><a href="#FT_Stroker_Export">FT_Stroker_Export</a></td></tr>
-<tr><td></td><td><a href="#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td><td></td><td><a href="#FT_Stroker_Done">FT_Stroker_Done</a></td></tr>
-<tr><td></td><td><a href="#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td><td></td><td><a href="#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td></tr>
-<tr><td></td><td><a href="#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td><td></td><td><a href="#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_Stroker">FT_Stroker</a></td><td><a href="#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Stroker_Done">FT_Stroker_Done</a></td></tr>
+<tr><td><a href="#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td><td><a href="#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td></tr>
+<tr><td><a href="#FT_StrokerBorder">FT_StrokerBorder</a></td><td><a href="#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td></tr>
+<tr><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td><a href="#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td></tr>
+<tr><td><a href="#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td><a href="#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td></tr>
+<tr><td><a href="#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td><td><a href="#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td></tr>
+<tr><td><a href="#FT_Stroker_New">FT_Stroker_New</a></td><td><a href="#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td></tr>
+<tr><td><a href="#FT_Stroker_Set">FT_Stroker_Set</a></td><td><a href="#FT_Stroker_Export">FT_Stroker_Export</a></td></tr>
+<tr><td><a href="#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td><td></td></tr>
+</table>
+
+
<p>This component generates stroked outlines of a given vectorial glyph. It also allows you to retrieve the &lsquo;outside&rsquo; and/or the &lsquo;inside&rsquo; borders of the stroke.</p>
<p>This can be useful to generate &lsquo;bordered&rsquo; glyph, i.e., glyphs displayed with a coloured (and anti-aliased) border around their shape.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker">FT_Stroker</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Stroker">FT_Stroker</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_StrokerRec_* <b>FT_Stroker</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Opaque handler to a path stroker object.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>Opaque handle to a path stroker object.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_LineJoin">FT_Stroker_LineJoin</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Stroker_LineJoin_
{
- <a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_ROUND</a> = 0,
- <a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_BEVEL</a> = 1,
- <a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a> = 2,
- <a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER</a> = <a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a>,
- <a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_FIXED</a> = 3
+ <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_ROUND">FT_STROKER_LINEJOIN_ROUND</a> = 0,
+ <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_BEVEL">FT_STROKER_LINEJOIN_BEVEL</a> = 1,
+ <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_MITER_VARIABLE">FT_STROKER_LINEJOIN_MITER_VARIABLE</a> = 2,
+ <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_MITER">FT_STROKER_LINEJOIN_MITER</a> = <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_MITER_VARIABLE">FT_STROKER_LINEJOIN_MITER_VARIABLE</a>,
+ <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_MITER_FIXED">FT_STROKER_LINEJOIN_MITER_FIXED</a> = 3
} <b>FT_Stroker_LineJoin</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>These values determine how two joining lines are rendered in a stroker.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td colspan=0><b>FT_STROKER_LINEJOIN_ROUND</b></td></tr>
-<tr valign=top><td></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_STROKER_LINEJOIN_ROUND">FT_STROKER_LINEJOIN_ROUND</td><td class="desc">
<p>Used to render rounded line joins. Circular arcs are used to join two lines smoothly.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_STROKER_LINEJOIN_BEVEL</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_STROKER_LINEJOIN_BEVEL">FT_STROKER_LINEJOIN_BEVEL</td><td class="desc">
<p>Used to render beveled line joins. The outer corner of the joined lines is filled by enclosing the triangular region of the corner with a straight line between the outer corners of each stroke.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_STROKER_LINEJOIN_MITER_FIXED</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_STROKER_LINEJOIN_MITER_FIXED">FT_STROKER_LINEJOIN_MITER_FIXED</td><td class="desc">
<p>Used to render mitered line joins, with fixed bevels if the miter limit is exceeded. The outer edges of the strokes for the two segments are extended until they meet at an angle. If the segments meet at too sharp an angle (such that the miter would extend from the intersection of the segments a distance greater than the product of the miter limit value and the border radius), then a bevel join (see above) is used instead. This prevents long spikes being created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter line join as used in PostScript and PDF.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_STROKER_LINEJOIN_MITER_VARIABLE</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_STROKER_LINEJOIN_MITER_VARIABLE">FT_STROKER_LINEJOIN_MITER_VARIABLE</td><td class="desc">
<p></p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_STROKER_LINEJOIN_MITER</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_STROKER_LINEJOIN_MITER">FT_STROKER_LINEJOIN_MITER</td><td class="desc">
<p>Used to render mitered line joins, with variable bevels if the miter limit is exceeded. The intersection of the strokes is clipped at a line perpendicular to the bisector of the angle between the strokes, at the distance from the intersection of the segments equal to the product of the miter limit value and the border radius. This prevents long spikes being created. FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for backwards compatibility.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_LineCap">FT_Stroker_LineCap</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_LineCap">FT_Stroker_LineCap</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Stroker_LineCap_
{
- <a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_BUTT</a> = 0,
- <a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_ROUND</a>,
- <a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_SQUARE</a>
+ <a href="ft2-glyph_stroker.html#FT_STROKER_LINECAP_BUTT">FT_STROKER_LINECAP_BUTT</a> = 0,
+ <a href="ft2-glyph_stroker.html#FT_STROKER_LINECAP_ROUND">FT_STROKER_LINECAP_ROUND</a>,
+ <a href="ft2-glyph_stroker.html#FT_STROKER_LINECAP_SQUARE">FT_STROKER_LINECAP_SQUARE</a>
} <b>FT_Stroker_LineCap</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>These values determine how the end of opened sub-paths are rendered in a stroke.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td colspan=0><b>FT_STROKER_LINECAP_BUTT</b></td></tr>
-<tr valign=top><td></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_STROKER_LINECAP_BUTT">FT_STROKER_LINECAP_BUTT</td><td class="desc">
<p>The end of lines is rendered as a full stop on the last point itself.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_STROKER_LINECAP_ROUND</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_STROKER_LINECAP_ROUND">FT_STROKER_LINECAP_ROUND</td><td class="desc">
<p>The end of lines is rendered as a half-circle around the last point.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_STROKER_LINECAP_SQUARE</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_STROKER_LINECAP_SQUARE">FT_STROKER_LINECAP_SQUARE</td><td class="desc">
<p>The end of lines is rendered as a square around the last point.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_StrokerBorder">FT_StrokerBorder</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_StrokerBorder">FT_StrokerBorder</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_StrokerBorder_
{
- <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a> = 0,
- <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a>
+ <a href="ft2-glyph_stroker.html#FT_STROKER_BORDER_LEFT">FT_STROKER_BORDER_LEFT</a> = 0,
+ <a href="ft2-glyph_stroker.html#FT_STROKER_BORDER_RIGHT">FT_STROKER_BORDER_RIGHT</a>
} <b>FT_StrokerBorder</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>These values are used to select a given stroke border in <a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_STROKER_BORDER_LEFT</b></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_STROKER_BORDER_LEFT">FT_STROKER_BORDER_LEFT</td><td class="desc">
<p>Select the left border, relative to the drawing direction.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_STROKER_BORDER_RIGHT</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_STROKER_BORDER_RIGHT">FT_STROKER_BORDER_RIGHT</td><td class="desc">
<p>Select the right border, relative to the drawing direction.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Applications are generally interested in the &lsquo;inside&rsquo; and &lsquo;outside&rsquo; borders. However, there is no direct mapping between these and the &lsquo;left&rsquo; and &lsquo;right&rsquo; ones, since this really depends on the glyph's drawing orientation, which varies between font formats.</p>
<p>You can however use <a href="ft2-glyph_stroker.html#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a> and <a href="ft2-glyph_stroker.html#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a> to get these.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> )
<b>FT_Outline_GetInsideBorder</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> value corresponding to the &lsquo;inside&rsquo; borders of a given outline.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The source outline handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The border index. <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a> for empty or invalid outlines.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> )
<b>FT_Outline_GetOutsideBorder</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> value corresponding to the &lsquo;outside&rsquo; borders of a given outline.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The source outline handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The border index. <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a> for empty or invalid outlines.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_New">FT_Stroker_New</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Glyph_Stroke">FT_Glyph_Stroke</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Glyph_Stroke</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> *pglyph,
+ <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
+ <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> destroy );
+</pre>
+
+<p>Stroke a given outline glyph object with a given stroker.</p>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="pglyph">pglyph</td><td class="desc">
+<p>Source glyph handle on input, new glyph handle on output.</p>
+</td></tr>
+</table>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
+<p>A stroker handle.</p>
+</td></tr>
+<tr><td class="val" id="destroy">destroy</td><td class="desc">
+<p>A Boolean. If&nbsp;1, the source glyph object is destroyed on success.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>The source glyph is untouched in case of error.</p>
+<p>Adding stroke may yield a significantly wider and taller glyph depending on how large of a radius was used to stroke the glyph. You may need to manually adjust horizontal and vertical advance amounts to account for this added size.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Glyph_StrokeBorder</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> *pglyph,
+ <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
+ <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> inside,
+ <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> destroy );
+</pre>
+
+<p>Stroke a given outline glyph object with a given stroker, but only return either its inside or outside border.</p>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="pglyph">pglyph</td><td class="desc">
+<p>Source glyph handle on input, new glyph handle on output.</p>
+</td></tr>
+</table>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
+<p>A stroker handle.</p>
+</td></tr>
+<tr><td class="val" id="inside">inside</td><td class="desc">
+<p>A Boolean. If&nbsp;1, return the inside border, otherwise the outside border.</p>
+</td></tr>
+<tr><td class="val" id="destroy">destroy</td><td class="desc">
+<p>A Boolean. If&nbsp;1, the source glyph object is destroyed on success.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>The source glyph is untouched in case of error.</p>
+<p>Adding stroke may yield a significantly wider and taller glyph depending on how large of a radius was used to stroke the glyph. You may need to manually adjust horizontal and vertical advance amounts to account for this added size.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_New">FT_Stroker_New</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stroker_New</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> *astroker );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Create a new stroker object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>FreeType library handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>astroker</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="astroker">astroker</td><td class="desc">
<p>A new stroker object handle. NULL in case of error.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_Set">FT_Stroker_Set</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_Set">FT_Stroker_Set</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Stroker_Set</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> radius,
<a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_Stroker_LineCap</a> line_cap,
<a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a> line_join,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> miter_limit );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Reset a stroker object's attributes.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
-<tr valign=top><td><b>radius</b></td><td>
+<tr><td class="val" id="radius">radius</td><td class="desc">
<p>The border radius.</p>
</td></tr>
-<tr valign=top><td><b>line_cap</b></td><td>
+<tr><td class="val" id="line_cap">line_cap</td><td class="desc">
<p>The line cap style.</p>
</td></tr>
-<tr valign=top><td><b>line_join</b></td><td>
+<tr><td class="val" id="line_join">line_join</td><td class="desc">
<p>The line join style.</p>
</td></tr>
-<tr valign=top><td><b>miter_limit</b></td><td>
-<p>The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, expressed as 16.16 fixed point value.</p>
+<tr><td class="val" id="miter_limit">miter_limit</td><td class="desc">
+<p>The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, expressed as 16.16 fixed-point value.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The radius is expressed in the same units as the outline coordinates.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_Rewind">FT_Stroker_Rewind</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>This function calls <a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a> automatically.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Stroker_Rewind">FT_Stroker_Rewind</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Stroker_Rewind</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Reset a stroker object without changing its attributes. You should call this function before beginning a new series of calls to <a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a> or <a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stroker_ParseOutline</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> opened );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A convenience function used to parse a whole outline with the stroker. The resulting outline(s) can be retrieved later by functions like <a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
-<tr valign=top><td><b>outline</b></td><td>
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The source outline.</p>
</td></tr>
-<tr valign=top><td><b>opened</b></td><td>
+<tr><td class="val" id="opened">opened</td><td class="desc">
<p>A boolean. If&nbsp;1, the outline is treated as an open path instead of a closed one.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If &lsquo;opened&rsquo; is&nbsp;0 (the default), the outline is treated as a closed path, and the stroker generates two distinct &lsquo;border&rsquo; outlines.</p>
<p>If &lsquo;opened&rsquo; is&nbsp;1, the outline is processed as an open path, and the stroker generates a single &lsquo;stroke&rsquo; outline.</p>
<p>This function calls <a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a> automatically.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_Done">FT_Stroker_Done</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
+ FT_EXPORT( <span class="keyword">void</span> )
+ <b>FT_Stroker_Done</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker );
+</pre>
+
+<p>Destroy a stroker object.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
+<p>A stroker handle. Can be NULL.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stroker_BeginSubPath</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
<a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> open );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Start a new sub-path in the stroker.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
-<tr valign=top><td><b>to</b></td><td>
+<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the start vector.</p>
</td></tr>
-<tr valign=top><td><b>open</b></td><td>
+<tr><td class="val" id="open">open</td><td class="desc">
<p>A boolean. If&nbsp;1, the sub-path is treated as an open one.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function is useful when you need to stroke a path that is not stored as an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> object.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stroker_EndSubPath</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Close the current sub-path in the stroker.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>You should call this function after <a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a>. If the subpath was not &lsquo;opened&rsquo;, this function &lsquo;draws&rsquo; a single line segment to the start position when needed.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_LineTo">FT_Stroker_LineTo</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_LineTo">FT_Stroker_LineTo</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stroker_LineTo</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>&lsquo;Draw&rsquo; a single line segment in the stroker's current sub-path, from the last position.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
-<tr valign=top><td><b>to</b></td><td>
+<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the destination point.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>You should call this function between <a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_ConicTo">FT_Stroker_ConicTo</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stroker_ConicTo</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>&lsquo;Draw&rsquo; a single quadratic Bézier in the stroker's current sub-path, from the last position.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
-<tr valign=top><td><b>control</b></td><td>
+<tr><td class="val" id="control">control</td><td class="desc">
<p>A pointer to a Bézier control point.</p>
</td></tr>
-<tr valign=top><td><b>to</b></td><td>
+<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the destination point.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>You should call this function between <a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_CubicTo">FT_Stroker_CubicTo</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stroker_CubicTo</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control1,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control2,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>&lsquo;Draw&rsquo; a single cubic Bézier in the stroker's current sub-path, from the last position.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
-<tr valign=top><td><b>control1</b></td><td>
+<tr><td class="val" id="control1">control1</td><td class="desc">
<p>A pointer to the first Bézier control point.</p>
</td></tr>
-<tr valign=top><td><b>control2</b></td><td>
+<tr><td class="val" id="control2">control2</td><td class="desc">
<p>A pointer to second Bézier control point.</p>
</td></tr>
-<tr valign=top><td><b>to</b></td><td>
+<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the destination point.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>You should call this function between <a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stroker_GetBorderCounts</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> border,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *anum_points,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *anum_contours );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Call this function once you have finished parsing your paths with the stroker. It returns the number of points and contours necessary to export one of the &lsquo;border&rsquo; or &lsquo;stroke&rsquo; outlines generated by the stroker.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
-<tr valign=top><td><b>border</b></td><td>
+<tr><td class="val" id="border">border</td><td class="desc">
<p>The border index.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>anum_points</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="anum_points">anum_points</td><td class="desc">
<p>The number of points.</p>
</td></tr>
-<tr valign=top><td><b>anum_contours</b></td><td>
+<tr><td class="val" id="anum_contours">anum_contours</td><td class="desc">
<p>The number of contours.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>When an outline, or a sub-path, is &lsquo;closed&rsquo;, the stroker generates two independent &lsquo;border&rsquo; outlines, named &lsquo;left&rsquo; and &lsquo;right&rsquo;.</p>
<p>When the outline, or a sub-path, is &lsquo;opened&rsquo;, the stroker merges the &lsquo;border&rsquo; outlines with caps. The &lsquo;left&rsquo; border receives all points, while the &lsquo;right&rsquo; border becomes empty.</p>
<p>Use the function <a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a> instead if you want to retrieve the counts associated to both borders.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Stroker_ExportBorder</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> border,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Call this function after <a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a> to export the corresponding border to your own <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> structure.</p>
<p>Note that this function appends the border points and contours to your outline, but does not try to resize its arrays.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
-<tr valign=top><td><b>border</b></td><td>
+<tr><td class="val" id="border">border</td><td class="desc">
<p>The border index.</p>
</td></tr>
-<tr valign=top><td><b>outline</b></td><td>
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The target outline handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Always call this function after <a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a> to get sure that there is enough room in your <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> object to receive all new data.</p>
-<p>When an outline, or a sub-path, is &lsquo;closed&rsquo;, the stroker generates two independent &lsquo;border&rsquo; outlines, named &lsquo;left&rsquo; and &lsquo;right&rsquo;</p>
+<p>When an outline, or a sub-path, is &lsquo;closed&rsquo;, the stroker generates two independent &lsquo;border&rsquo; outlines, named &lsquo;left&rsquo; and &lsquo;right&rsquo;.</p>
<p>When the outline, or a sub-path, is &lsquo;opened&rsquo;, the stroker merges the &lsquo;border&rsquo; outlines with caps. The &lsquo;left&rsquo; border receives all points, while the &lsquo;right&rsquo; border becomes empty.</p>
<p>Use the function <a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a> instead if you want to retrieve all borders at once.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_GetCounts">FT_Stroker_GetCounts</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stroker_GetCounts</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *anum_points,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *anum_contours );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Call this function once you have finished parsing your paths with the stroker. It returns the number of points and contours necessary to export all points/borders from the stroked outline/path.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>anum_points</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="anum_points">anum_points</td><td class="desc">
<p>The number of points.</p>
</td></tr>
-<tr valign=top><td><b>anum_contours</b></td><td>
+<tr><td class="val" id="anum_contours">anum_contours</td><td class="desc">
<p>The number of contours.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_Export">FT_Stroker_Export</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stroker_Export">FT_Stroker_Export</h3>
+<p>Defined in FT_STROKER_H (ftstroke.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Stroker_Export</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Call this function after <a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a> to export all borders to your own <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> structure.</p>
<p>Note that this function appends the border points and contours to your outline, but does not try to resize its arrays.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
-<tr valign=top><td><b>outline</b></td><td>
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The target outline handle.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stroker_Done">FT_Stroker_Done</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- FT_EXPORT( <span class="keyword">void</span> )
- <b>FT_Stroker_Done</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker );
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Destroy a stroker object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
-<p>A stroker handle. Can be NULL.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Glyph_Stroke">FT_Glyph_Stroke</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Glyph_Stroke</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> *pglyph,
- <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
- <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> destroy );
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Stroke a given outline glyph object with a given stroker.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>pglyph</b></td><td>
-<p>Source glyph handle on input, new glyph handle on output.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
-<p>A stroker handle.</p>
-</td></tr>
-<tr valign=top><td><b>destroy</b></td><td>
-<p>A Boolean. If&nbsp;1, the source glyph object is destroyed on success.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The source glyph is untouched in case of error.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_STROKER_H (freetype/ftstroke.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Glyph_StrokeBorder</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> *pglyph,
- <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
- <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> inside,
- <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> destroy );
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Stroke a given outline glyph object with a given stroker, but only return either its inside or outside border.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>pglyph</b></td><td>
-<p>Source glyph handle on input, new glyph handle on output.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stroker</b></td><td>
-<p>A stroker handle.</p>
-</td></tr>
-<tr valign=top><td><b>inside</b></td><td>
-<p>A Boolean. If&nbsp;1, return the inside border, otherwise the outside border.</p>
-</td></tr>
-<tr valign=top><td><b>destroy</b></td><td>
-<p>A Boolean. If&nbsp;1, the source glyph object is destroyed on success.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The source glyph is untouched in case of error.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-glyph_variants.html b/docs/reference/ft2-glyph_variants.html
index 04b5f97..a19db11 100644
--- a/docs/reference/ft2-glyph_variants.html
+++ b/docs/reference/ft2-glyph_variants.html
@@ -3,265 +3,290 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Glyph Variants
-</h1></center>
+<h1>Glyph Variants</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td></td><td><a href="#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td></tr>
-<tr><td></td><td><a href="#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td></td><td><a href="#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td></tr>
-<tr><td></td><td><a href="#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td></td><td></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td></tr>
+<tr><td><a href="#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td><a href="#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td></tr>
+<tr><td><a href="#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>Many CJK characters have variant forms. They are a sort of grey area somewhere between being totally irrelevant and semantically distinct; for this reason, the Unicode consortium decided to introduce Ideographic Variation Sequences (IVS), consisting of a Unicode base character and one of 240 variant selectors (U+E0100-U+E01EF), instead of further extending the already huge code range for CJK characters.</p>
-<p>An IVS is registered and unique; for further details please refer to Unicode Technical Report #37, the Ideographic Variation Database. To date (October 2007), the character with the most variants is U+908A, having 8&nbsp;such IVS.</p>
+<p>An IVS is registered and unique; for further details please refer to Unicode Technical Standard #37, the Ideographic Variation Database:</p>
+<p><a href="http://www.unicode.org/reports/tr37/">http://www.unicode.org/reports/tr37/</a></p>
+<p>To date (November 2014), the character with the most variants is U+9089, having 32 such IVS.</p>
<p>Adobe and MS decided to support IVS with a new cmap subtable (format&nbsp;14). It is an odd subtable because it is not a mapping of input code points to glyphs, but contains lists of all variants supported by the font.</p>
<p>A variant may be either &lsquo;default&rsquo; or &lsquo;non-default&rsquo;. A default variant is the one you will get for that code point if you look it up in the standard Unicode cmap. A non-default variant is a different glyph.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
<b>FT_Face_GetCharVariantIndex</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> charcode,
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> variantSelector );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the glyph index of a given character code as modified by the variation selector.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
-<tr valign=top><td><b>charcode</b></td><td>
+<tr><td class="val" id="charcode">charcode</td><td class="desc">
<p>The character code point in Unicode.</p>
</td></tr>
-<tr valign=top><td><b>variantSelector</b></td><td>
+<tr><td class="val" id="variantSelector">variantSelector</td><td class="desc">
<p>The Unicode code point of the variation selector.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The glyph index. 0&nbsp;means either &lsquo;undefined character code&rsquo;, or &lsquo;undefined selector code&rsquo;, or &lsquo;no variation selector cmap subtable&rsquo;, or &lsquo;current CharMap is not Unicode&rsquo;.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If you use FreeType to manipulate the contents of font files directly, be aware that the glyph index returned by this function doesn't always correspond to the internal indices used within the file. This is done to ensure that value&nbsp;0 always corresponds to the &lsquo;missing glyph&rsquo;.</p>
<p>This function is only meaningful if a) the font has a variation selector cmap sub table, and b) the current charmap has a Unicode encoding.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.6</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
<b>FT_Face_GetCharVariantIsDefault</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> charcode,
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> variantSelector );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Check whether this variant of this Unicode character is the one to be found in the &lsquo;cmap&rsquo;.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
-<tr valign=top><td><b>charcode</b></td><td>
+<tr><td class="val" id="charcode">charcode</td><td class="desc">
<p>The character codepoint in Unicode.</p>
</td></tr>
-<tr valign=top><td><b>variantSelector</b></td><td>
+<tr><td class="val" id="variantSelector">variantSelector</td><td class="desc">
<p>The Unicode codepoint of the variation selector.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>1&nbsp;if found in the standard (Unicode) cmap, 0&nbsp;if found in the variation selector cmap, or -1 if it is not a variant.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function is only meaningful if the font has a variation selector cmap subtable.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.6</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>* )
<b>FT_Face_GetVariantSelectors</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return a zero-terminated list of Unicode variant selectors found in the font.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>A pointer to an array of selector code points, or NULL if there is no valid variant selector cmap subtable.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.6</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>* )
<b>FT_Face_GetVariantsOfChar</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> charcode );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return a zero-terminated list of Unicode variant selectors found for the specified character code.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
-<tr valign=top><td><b>charcode</b></td><td>
+<tr><td class="val" id="charcode">charcode</td><td class="desc">
<p>The character codepoint in Unicode.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>A pointer to an array of variant selector code points which are active for the given character, or NULL if the corresponding list is empty.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>return</h4>
+<p>A pointer to an array of variant selector code points that are active for the given character, or NULL if the corresponding list is empty.</p>
+
+<h4>note</h4>
<p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.6</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>* )
<b>FT_Face_GetCharsOfVariant</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> variantSelector );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return a zero-terminated list of Unicode character codes found for the specified variant selector.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
-<tr valign=top><td><b>variantSelector</b></td><td>
+<tr><td class="val" id="variantSelector">variantSelector</td><td class="desc">
<p>The variant selector code point in Unicode.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>A list of all the code points which are specified by this selector (both default and non-default codes are returned) or NULL if there is no valid cmap or the variant selector is invalid.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>return</h4>
+<p>A list of all the code points that are specified by this selector (both default and non-default codes are returned) or NULL if there is no valid cmap or the variant selector is invalid.</p>
+
+<h4>note</h4>
<p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.6</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-gx_validation.html b/docs/reference/ft2-gx_validation.html
index f9a239a..ff2eef6 100644
--- a/docs/reference/ft2-gx_validation.html
+++ b/docs/reference/ft2-gx_validation.html
@@ -3,354 +3,360 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-TrueTypeGX/AAT Validation
-</h1></center>
+<h1>TrueTypeGX/AAT Validation</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></td><td></td><td><a href="#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></td><td></td><td><a href="#FT_ClassicKern_Free">FT_ClassicKern_Free</a></td></tr>
-<tr><td></td><td><a href="#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></td><td></td><td><a href="#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></td><td></td><td></td></tr>
-<tr><td></td><td><a href="#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></td><td></td><td><a href="#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
-<p>This section contains the declaration of functions to validate some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop, lcar).</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<table class="synopsis">
+<tr><td><a href="#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></td><td><a href="#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></td><td><a href="#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></td></tr>
+<tr><td><a href="#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></td><td><a href="#FT_ClassicKern_Free">FT_ClassicKern_Free</a></td><td><a href="#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></td></tr>
+<tr><td>&nbsp;</td><td>&nbsp;</td><td><a href="#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></td></tr>
+</table>
-#define <b>FT_VALIDATE_GX_LENGTH</b> (FT_VALIDATE_GX_LAST_INDEX + 1)
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>The number of tables checked in this module. Use it as a parameter for the &lsquo;table-length&rsquo; argument of function <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_feat</a> FT_VALIDATE_GX_BITFIELD( feat )
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_mort</a> FT_VALIDATE_GX_BITFIELD( mort )
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_morx</a> FT_VALIDATE_GX_BITFIELD( morx )
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_bsln</a> FT_VALIDATE_GX_BITFIELD( bsln )
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_just</a> FT_VALIDATE_GX_BITFIELD( just )
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_kern</a> FT_VALIDATE_GX_BITFIELD( kern )
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_opbd</a> FT_VALIDATE_GX_BITFIELD( opbd )
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_trak</a> FT_VALIDATE_GX_BITFIELD( trak )
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_prop</a> FT_VALIDATE_GX_BITFIELD( prop )
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_lcar</a> FT_VALIDATE_GX_BITFIELD( lcar )
-
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GX</a> ( <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_feat</a> | \
- <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_mort</a> | \
- <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_morx</a> | \
- <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_bsln</a> | \
- <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_just</a> | \
- <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_kern</a> | \
- <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_opbd</a> | \
- <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_trak</a> | \
- <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_prop</a> | \
- <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_lcar</a> )
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of bit-field constants used with <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a> to indicate which TrueTypeGX/AAT Type tables should be validated.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_VALIDATE_feat</b></td><td>
-<p>Validate &lsquo;feat&rsquo; table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_mort</b></td><td>
-<p>Validate &lsquo;mort&rsquo; table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_morx</b></td><td>
-<p>Validate &lsquo;morx&rsquo; table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_bsln</b></td><td>
-<p>Validate &lsquo;bsln&rsquo; table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_just</b></td><td>
-<p>Validate &lsquo;just&rsquo; table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_kern</b></td><td>
-<p>Validate &lsquo;kern&rsquo; table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_opbd</b></td><td>
-<p>Validate &lsquo;opbd&rsquo; table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_trak</b></td><td>
-<p>Validate &lsquo;trak&rsquo; table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_prop</b></td><td>
-<p>Validate &lsquo;prop&rsquo; table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_lcar</b></td><td>
-<p>Validate &lsquo;lcar&rsquo; table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_GX</b></td><td>
-<p>Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop and lcar).</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>This section contains the declaration of functions to validate some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop, lcar).</p>
+<div class="section">
+<h3 id="FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</h3>
+<p>Defined in FT_GX_VALIDATE_H (ftgxval.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_TrueTypeGX_Validate</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> validation_flags,
<a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a> tables[<a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a>],
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> table_length );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Validate various TrueTypeGX tables to assure that all offsets and indices are valid. The idea is that a higher-level library which actually does the text layout can access those tables without error checking (which can be quite time consuming).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+<p>Validate various TrueTypeGX tables to assure that all offsets and indices are valid. The idea is that a higher-level library that actually does the text layout can access those tables without error checking (which can be quite time consuming).</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
-<tr valign=top><td><b>validation_flags</b></td><td>
-<p>A bit field which specifies the tables to be validated. See <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a> for possible values.</p>
+<tr><td class="val" id="validation_flags">validation_flags</td><td class="desc">
+<p>A bit field that specifies the tables to be validated. See <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a> for possible values.</p>
</td></tr>
-<tr valign=top><td><b>table_length</b></td><td>
+<tr><td class="val" id="table_length">table_length</td><td class="desc">
<p>The size of the &lsquo;tables&rsquo; array. Normally, <a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a> should be passed.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>tables</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="tables">tables</td><td class="desc">
<p>The array where all validated sfnt tables are stored. The array itself must be allocated by a client.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function only works with TrueTypeGX fonts, returning an error otherwise.</p>
<p>After use, the application should deallocate the buffers pointed to by each &lsquo;tables&rsquo; element, by calling <a href="ft2-gx_validation.html#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a>. A NULL value indicates that the table either doesn't exist in the font, the application hasn't asked for validation, or the validator doesn't have the ability to validate the sfnt table.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</h3>
+<p>Defined in FT_GX_VALIDATE_H (ftgxval.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_TrueTypeGX_Free</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a> table );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Free the buffer allocated by TrueTypeGX validator.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
-<tr valign=top><td><b>table</b></td><td>
+<tr><td class="val" id="table">table</td><td class="desc">
<p>The pointer to the buffer allocated by <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function must be used to free the buffer allocated by <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a> only.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_MS</a> ( FT_VALIDATE_GX_START &lt;&lt; 0 )
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_APPLE</a> ( FT_VALIDATE_GX_START &lt;&lt; 1 )
-
-#define <a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERN</a> ( <a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_MS</a> | <a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_APPLE</a> )
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of bit-field constants used with <a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a> to indicate the classic kern dialect or dialects. If the selected type doesn't fit, <a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a> regards the table as invalid.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_VALIDATE_MS</b></td><td>
-<p>Handle the &lsquo;kern&rsquo; table as a classic Microsoft kern table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_APPLE</b></td><td>
-<p>Handle the &lsquo;kern&rsquo; table as a classic Apple kern table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_CKERN</b></td><td>
-<p>Handle the &lsquo;kern&rsquo; as either classic Apple or Microsoft kern table.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_ClassicKern_Validate">FT_ClassicKern_Validate</h3>
+<p>Defined in FT_GX_VALIDATE_H (ftgxval.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_ClassicKern_Validate</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> validation_flags,
<a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a> *ckern_table );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Validate classic (16-bit format) kern table to assure that the offsets and indices are valid. The idea is that a higher-level library which actually does the text layout can access those tables without error checking (which can be quite time consuming).</p>
+<p>Validate classic (16-bit format) kern table to assure that the offsets and indices are valid. The idea is that a higher-level library that actually does the text layout can access those tables without error checking (which can be quite time consuming).</p>
<p>The &lsquo;kern&rsquo; table validator in <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a> deals with both the new 32-bit format and the classic 16-bit format, while FT_ClassicKern_Validate only supports the classic 16-bit format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
-<tr valign=top><td><b>validation_flags</b></td><td>
-<p>A bit field which specifies the dialect to be validated. See <a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a> for possible values.</p>
+<tr><td class="val" id="validation_flags">validation_flags</td><td class="desc">
+<p>A bit field that specifies the dialect to be validated. See <a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a> for possible values.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>ckern_table</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="ckern_table">ckern_table</td><td class="desc">
<p>A pointer to the kern table.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>After use, the application should deallocate the buffers pointed to by &lsquo;ckern_table&rsquo;, by calling <a href="ft2-gx_validation.html#FT_ClassicKern_Free">FT_ClassicKern_Free</a>. A NULL value indicates that the table doesn't exist in the font.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ClassicKern_Free">FT_ClassicKern_Free</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_ClassicKern_Free">FT_ClassicKern_Free</h3>
+<p>Defined in FT_GX_VALIDATE_H (ftgxval.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_ClassicKern_Free</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a> table );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Free the buffer allocated by classic Kern validator.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
-<tr valign=top><td><b>table</b></td><td>
+<tr><td class="val" id="table">table</td><td class="desc">
<p>The pointer to the buffer that is allocated by <a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function must be used to free the buffer allocated by <a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a> only.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</h3>
+<p>Defined in FT_GX_VALIDATE_H (ftgxval.h).</p>
+<pre>
+#define <b>FT_VALIDATE_GX_LENGTH</b> (FT_VALIDATE_GX_LAST_INDEX + 1)
+</pre>
+
+<p>The number of tables checked in this module. Use it as a parameter for the &lsquo;table-length&rsquo; argument of function <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</h3>
+<p>Defined in FT_GX_VALIDATE_H (ftgxval.h).</p>
+<pre>
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_feat">FT_VALIDATE_feat</a> FT_VALIDATE_GX_BITFIELD( feat )
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_mort">FT_VALIDATE_mort</a> FT_VALIDATE_GX_BITFIELD( mort )
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_morx">FT_VALIDATE_morx</a> FT_VALIDATE_GX_BITFIELD( morx )
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_bsln">FT_VALIDATE_bsln</a> FT_VALIDATE_GX_BITFIELD( bsln )
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_just">FT_VALIDATE_just</a> FT_VALIDATE_GX_BITFIELD( just )
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_kern">FT_VALIDATE_kern</a> FT_VALIDATE_GX_BITFIELD( kern )
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_opbd">FT_VALIDATE_opbd</a> FT_VALIDATE_GX_BITFIELD( opbd )
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_trak">FT_VALIDATE_trak</a> FT_VALIDATE_GX_BITFIELD( trak )
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_prop">FT_VALIDATE_prop</a> FT_VALIDATE_GX_BITFIELD( prop )
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_lcar">FT_VALIDATE_lcar</a> FT_VALIDATE_GX_BITFIELD( lcar )
+
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_GX">FT_VALIDATE_GX</a> ( <a href="ft2-gx_validation.html#FT_VALIDATE_feat">FT_VALIDATE_feat</a> | \
+ <a href="ft2-gx_validation.html#FT_VALIDATE_mort">FT_VALIDATE_mort</a> | \
+ <a href="ft2-gx_validation.html#FT_VALIDATE_morx">FT_VALIDATE_morx</a> | \
+ <a href="ft2-gx_validation.html#FT_VALIDATE_bsln">FT_VALIDATE_bsln</a> | \
+ <a href="ft2-gx_validation.html#FT_VALIDATE_just">FT_VALIDATE_just</a> | \
+ <a href="ft2-gx_validation.html#FT_VALIDATE_kern">FT_VALIDATE_kern</a> | \
+ <a href="ft2-gx_validation.html#FT_VALIDATE_opbd">FT_VALIDATE_opbd</a> | \
+ <a href="ft2-gx_validation.html#FT_VALIDATE_trak">FT_VALIDATE_trak</a> | \
+ <a href="ft2-gx_validation.html#FT_VALIDATE_prop">FT_VALIDATE_prop</a> | \
+ <a href="ft2-gx_validation.html#FT_VALIDATE_lcar">FT_VALIDATE_lcar</a> )
+</pre>
+
+<p>A list of bit-field constants used with <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a> to indicate which TrueTypeGX/AAT Type tables should be validated.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_VALIDATE_feat">FT_VALIDATE_feat</td><td class="desc">
+<p>Validate &lsquo;feat&rsquo; table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_mort">FT_VALIDATE_mort</td><td class="desc">
+<p>Validate &lsquo;mort&rsquo; table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_morx">FT_VALIDATE_morx</td><td class="desc">
+<p>Validate &lsquo;morx&rsquo; table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_bsln">FT_VALIDATE_bsln</td><td class="desc">
+<p>Validate &lsquo;bsln&rsquo; table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_just">FT_VALIDATE_just</td><td class="desc">
+<p>Validate &lsquo;just&rsquo; table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_kern">FT_VALIDATE_kern</td><td class="desc">
+<p>Validate &lsquo;kern&rsquo; table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_opbd">FT_VALIDATE_opbd</td><td class="desc">
+<p>Validate &lsquo;opbd&rsquo; table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_trak">FT_VALIDATE_trak</td><td class="desc">
+<p>Validate &lsquo;trak&rsquo; table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_prop">FT_VALIDATE_prop</td><td class="desc">
+<p>Validate &lsquo;prop&rsquo; table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_lcar">FT_VALIDATE_lcar</td><td class="desc">
+<p>Validate &lsquo;lcar&rsquo; table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_GX">FT_VALIDATE_GX</td><td class="desc">
+<p>Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop and lcar).</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</h3>
+<p>Defined in FT_GX_VALIDATE_H (ftgxval.h).</p>
+<pre>
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_MS">FT_VALIDATE_MS</a> ( FT_VALIDATE_GX_START &lt;&lt; 0 )
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_APPLE">FT_VALIDATE_APPLE</a> ( FT_VALIDATE_GX_START &lt;&lt; 1 )
+
+#define <a href="ft2-gx_validation.html#FT_VALIDATE_CKERN">FT_VALIDATE_CKERN</a> ( <a href="ft2-gx_validation.html#FT_VALIDATE_MS">FT_VALIDATE_MS</a> | <a href="ft2-gx_validation.html#FT_VALIDATE_APPLE">FT_VALIDATE_APPLE</a> )
+</pre>
+
+<p>A list of bit-field constants used with <a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a> to indicate the classic kern dialect or dialects. If the selected type doesn't fit, <a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a> regards the table as invalid.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_VALIDATE_MS">FT_VALIDATE_MS</td><td class="desc">
+<p>Handle the &lsquo;kern&rsquo; table as a classic Microsoft kern table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_APPLE">FT_VALIDATE_APPLE</td><td class="desc">
+<p>Handle the &lsquo;kern&rsquo; table as a classic Apple kern table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_CKERN">FT_VALIDATE_CKERN</td><td class="desc">
+<p>Handle the &lsquo;kern&rsquo; as either classic Apple or Microsoft kern table.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-gzip.html b/docs/reference/ft2-gzip.html
index 698dc74..c7e5a84 100644
--- a/docs/reference/ft2-gzip.html
+++ b/docs/reference/ft2-gzip.html
@@ -3,92 +3,197 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-GZIP Streams
-</h1></center>
+<h1>GZIP Streams</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></td><td></td><td></td><td></td><td></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></td><td><a href="#FT_Gzip_Uncompress">FT_Gzip_Uncompress</a></td><td></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>This section contains the declaration of Gzip-specific functions.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_GZIP_H (freetype/ftgzip.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Stream_OpenGzip">FT_Stream_OpenGzip</h3>
+<p>Defined in FT_GZIP_H (ftgzip.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stream_OpenGzip</b>( <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> stream,
<a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> source );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Open a new stream to parse gzip-compressed font files. This is mainly used to support the compressed &lsquo;*.pcf.gz&rsquo; fonts that come with XFree86.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stream</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stream">stream</td><td class="desc">
<p>The target embedding stream.</p>
</td></tr>
-<tr valign=top><td><b>source</b></td><td>
+<tr><td class="val" id="source">source</td><td class="desc">
<p>The source stream.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The source stream must be opened <i>before</i> calling this function.</p>
<p>Calling the internal function &lsquo;FT_Stream_Close&rsquo; on the new stream will <b>not</b> call &lsquo;FT_Stream_Close&rsquo; on the source stream. None of the stream objects will be released to the heap.</p>
<p>The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream.</p>
<p>In certain builds of the library, gzip compression recognition is automatically handled when calling <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a gzipped stream from it and re-open the face with it.</p>
<p>This function may return &lsquo;FT_Err_Unimplemented_Feature&rsquo; if your build of FreeType was not compiled with zlib support.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Gzip_Uncompress">FT_Gzip_Uncompress</h3>
+<p>Defined in FT_GZIP_H (ftgzip.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Gzip_Uncompress</b>( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
+ <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* output,
+ <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>* output_len,
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* input,
+ <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> input_len );
+</pre>
+
+<p>Decompress a zipped input buffer into an output buffer. This function is modeled after zlib's &lsquo;uncompress&rsquo; function.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="memory">memory</td><td class="desc">
+<p>A FreeType memory handle.</p>
+</td></tr>
+<tr><td class="val" id="input">input</td><td class="desc">
+<p>The input buffer.</p>
+</td></tr>
+<tr><td class="val" id="input_len">input_len</td><td class="desc">
+<p>The length of the input buffer.</p>
+</td></tr>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="output">output</td><td class="desc">
+<p>The output buffer.</p>
+</td></tr>
+</table>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="output_len">output_len</td><td class="desc">
+<p>Before calling the function, this is the the total size of the output buffer, which must be large enough to hold the entire uncompressed data (so the size of the uncompressed data must be known in advance). After calling the function, &lsquo;output_len&rsquo; is the size of the used data in &lsquo;output&rsquo;.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>This function may return &lsquo;FT_Err_Unimplemented_Feature&rsquo; if your build of FreeType was not compiled with zlib support.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-header_file_macros.html b/docs/reference/ft2-header_file_macros.html
index b94ef5e..35954db 100644
--- a/docs/reference/ft2-header_file_macros.html
+++ b/docs/reference/ft2-header_file_macros.html
@@ -3,72 +3,136 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Header File Macros
-</h1></center>
+<h1>Header File Macros</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td></td><td><a href="#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
-<tr><td></td><td><a href="#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td></td><td><a href="#FT_GLYPH_H">FT_GLYPH_H</a></td></tr>
-<tr><td></td><td><a href="#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td></td><td><a href="#FT_BITMAP_H">FT_BITMAP_H</a></td></tr>
-<tr><td></td><td><a href="#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td></td><td><a href="#FT_BBOX_H">FT_BBOX_H</a></td></tr>
-<tr><td></td><td><a href="#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td></td><td><a href="#FT_CACHE_H">FT_CACHE_H</a></td></tr>
-<tr><td></td><td><a href="#FT_ERRORS_H">FT_ERRORS_H</a></td><td></td><td><a href="#FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a></td></tr>
-<tr><td></td><td><a href="#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td></td><td><a href="#FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a></td></tr>
-<tr><td></td><td><a href="#FT_SYSTEM_H">FT_SYSTEM_H</a></td><td></td><td><a href="#FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</a></td></tr>
-<tr><td></td><td><a href="#FT_IMAGE_H">FT_IMAGE_H</a></td><td></td><td><a href="#FT_MAC_H">FT_MAC_H</a></td></tr>
-<tr><td></td><td><a href="#FT_TYPES_H">FT_TYPES_H</a></td><td></td><td><a href="#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td></tr>
-<tr><td></td><td><a href="#FT_LIST_H">FT_LIST_H</a></td><td></td><td><a href="#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td></tr>
-<tr><td></td><td><a href="#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td></td><td><a href="#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td></tr>
-<tr><td></td><td><a href="#FT_SIZES_H">FT_SIZES_H</a></td><td></td><td><a href="#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td></tr>
-<tr><td></td><td><a href="#FT_MODULE_H">FT_MODULE_H</a></td><td></td><td><a href="#FT_PFR_H">FT_PFR_H</a></td></tr>
-<tr><td></td><td><a href="#FT_RENDER_H">FT_RENDER_H</a></td><td></td><td><a href="#FT_STROKER_H">FT_STROKER_H</a></td></tr>
-<tr><td></td><td><a href="#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td><td></td><td><a href="#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
-<tr><td></td><td><a href="#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td><td></td><td><a href="#FT_XFREE86_H">FT_XFREE86_H</a></td></tr>
-<tr><td></td><td><a href="#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td><td></td><td><a href="#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
-<tr><td></td><td><a href="#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td><td></td><td><a href="#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td></tr>
-<tr><td></td><td><a href="#FT_BDF_H">FT_BDF_H</a></td><td></td><td><a href="#FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></td></tr>
-<tr><td></td><td><a href="#FT_CID_H">FT_CID_H</a></td><td></td><td><a href="#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td></tr>
-<tr><td></td><td><a href="#FT_GZIP_H">FT_GZIP_H</a></td><td></td><td><a href="#FT_GASP_H">FT_GASP_H</a></td></tr>
-<tr><td></td><td><a href="#FT_LZW_H">FT_LZW_H</a></td><td></td><td><a href="#FT_ADVANCES_H">FT_ADVANCES_H</a></td></tr>
-<tr><td></td><td><a href="#FT_BZIP2_H">FT_BZIP2_H</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="#FT_LZW_H">FT_LZW_H</a></td></tr>
+<tr><td><a href="#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="#FT_BZIP2_H">FT_BZIP2_H</a></td></tr>
+<tr><td><a href="#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
+<tr><td><a href="#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="#FT_GLYPH_H">FT_GLYPH_H</a></td></tr>
+<tr><td><a href="#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="#FT_BITMAP_H">FT_BITMAP_H</a></td></tr>
+<tr><td><a href="#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="#FT_BBOX_H">FT_BBOX_H</a></td></tr>
+<tr><td><a href="#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="#FT_CACHE_H">FT_CACHE_H</a></td></tr>
+<tr><td><a href="#FT_SYSTEM_H">FT_SYSTEM_H</a></td><td><a href="#FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a></td></tr>
+<tr><td><a href="#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="#FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a></td></tr>
+<tr><td><a href="#FT_TYPES_H">FT_TYPES_H</a></td><td><a href="#FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</a></td></tr>
+<tr><td><a href="#FT_LIST_H">FT_LIST_H</a></td><td><a href="#FT_MAC_H">FT_MAC_H</a></td></tr>
+<tr><td><a href="#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td></tr>
+<tr><td><a href="#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td></tr>
+<tr><td><a href="#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td></tr>
+<tr><td><a href="#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td></tr>
+<tr><td><a href="#FT_AUTOHINTER_H">FT_AUTOHINTER_H</a></td><td><a href="#FT_PFR_H">FT_PFR_H</a></td></tr>
+<tr><td><a href="#FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</a></td><td><a href="#FT_STROKER_H">FT_STROKER_H</a></td></tr>
+<tr><td><a href="#FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</a></td><td><a href="#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
+<tr><td><a href="#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td><td><a href="#FT_XFREE86_H">FT_XFREE86_H</a></td></tr>
+<tr><td><a href="#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td><td><a href="#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
+<tr><td><a href="#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td><td><a href="#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td></tr>
+<tr><td><a href="#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td><td><a href="#FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></td></tr>
+<tr><td><a href="#FT_BDF_H">FT_BDF_H</a></td><td><a href="#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td></tr>
+<tr><td><a href="#FT_CID_H">FT_CID_H</a></td><td><a href="#FT_GASP_H">FT_GASP_H</a></td></tr>
+<tr><td><a href="#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="#FT_ADVANCES_H">FT_ADVANCES_H</a></td></tr>
+</table>
+
+
<p>The following macros are defined to the name of specific FreeType&nbsp;2 header files. They can be used directly in #include statements as in:</p>
<pre class="colored">
#include FT_FREETYPE_H
@@ -77,777 +141,575 @@ Header File Macros
</pre>
<p>There are several reasons why we are now using macros to name public header files. The first one is that such macros are not limited to the infamous 8.3&nbsp;naming rule required by DOS (and &lsquo;FT_MULTIPLE_MASTERS_H&rsquo; is a lot more meaningful than &lsquo;ftmm.h&rsquo;).</p>
<p>The second reason is that it allows for more flexibility in the way FreeType&nbsp;2 is installed on a given system.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</h3>
+<pre>
#ifndef <b>FT_CONFIG_CONFIG_H</b>
-#define <b>FT_CONFIG_CONFIG_H</b> &lt;freetype/config/ftconfig.h&gt;
+#define <b>FT_CONFIG_CONFIG_H</b> &lt;config/ftconfig.h&gt;
#endif
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing FreeType&nbsp;2 configuration data.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</h3>
+<pre>
#ifndef <b>FT_CONFIG_STANDARD_LIBRARY_H</b>
-#define <b>FT_CONFIG_STANDARD_LIBRARY_H</b> &lt;freetype/config/ftstdlib.h&gt;
+#define <b>FT_CONFIG_STANDARD_LIBRARY_H</b> &lt;config/ftstdlib.h&gt;
#endif
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing FreeType&nbsp;2 interface to the standard C library functions.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</h3>
+<pre>
#ifndef <b>FT_CONFIG_OPTIONS_H</b>
-#define <b>FT_CONFIG_OPTIONS_H</b> &lt;freetype/config/ftoption.h&gt;
+#define <b>FT_CONFIG_OPTIONS_H</b> &lt;config/ftoption.h&gt;
#endif
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing FreeType&nbsp;2 project-specific configuration options.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</h3>
+<pre>
#ifndef <b>FT_CONFIG_MODULES_H</b>
-#define <b>FT_CONFIG_MODULES_H</b> &lt;freetype/config/ftmodule.h&gt;
+#define <b>FT_CONFIG_MODULES_H</b> &lt;config/ftmodule.h&gt;
#endif
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the list of FreeType&nbsp;2 modules that are statically linked to new library instances in <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_FREETYPE_H">FT_FREETYPE_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_FREETYPE_H</b> &lt;freetype/freetype.h&gt;
+<div class="section">
+<h3 id="FT_FREETYPE_H">FT_FREETYPE_H</h3>
+<pre>
+#define <b>FT_FREETYPE_H</b> &lt;freetype.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the base FreeType&nbsp;2 API.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ERRORS_H">FT_ERRORS_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_ERRORS_H</b> &lt;freetype/fterrors.h&gt;
+<div class="section">
+<h3 id="FT_ERRORS_H">FT_ERRORS_H</h3>
+<pre>
+#define <b>FT_ERRORS_H</b> &lt;fterrors.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the list of FreeType&nbsp;2 error codes (and messages).</p>
<p>It is included by <a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_MODULE_ERRORS_H</b> &lt;freetype/ftmoderr.h&gt;
+<div class="section">
+<h3 id="FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</h3>
+<pre>
+#define <b>FT_MODULE_ERRORS_H</b> &lt;ftmoderr.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the list of FreeType&nbsp;2 module error offsets (and messages).</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_SYSTEM_H">FT_SYSTEM_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_SYSTEM_H</b> &lt;freetype/ftsystem.h&gt;
+<div class="section">
+<h3 id="FT_SYSTEM_H">FT_SYSTEM_H</h3>
+<pre>
+#define <b>FT_SYSTEM_H</b> &lt;ftsystem.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 interface to low-level operations (i.e., memory management and stream i/o).</p>
<p>It is included by <a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_IMAGE_H">FT_IMAGE_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_IMAGE_H</b> &lt;freetype/ftimage.h&gt;
+<div class="section">
+<h3 id="FT_IMAGE_H">FT_IMAGE_H</h3>
+<pre>
+#define <b>FT_IMAGE_H</b> &lt;ftimage.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing type definitions related to glyph images (i.e., bitmaps, outlines, scan-converter parameters).</p>
<p>It is included by <a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_TYPES_H">FT_TYPES_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_TYPES_H</b> &lt;freetype/fttypes.h&gt;
+<div class="section">
+<h3 id="FT_TYPES_H">FT_TYPES_H</h3>
+<pre>
+#define <b>FT_TYPES_H</b> &lt;fttypes.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the basic data types defined by FreeType&nbsp;2.</p>
<p>It is included by <a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_LIST_H">FT_LIST_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_LIST_H</b> &lt;freetype/ftlist.h&gt;
+<div class="section">
+<h3 id="FT_LIST_H">FT_LIST_H</h3>
+<pre>
+#define <b>FT_LIST_H</b> &lt;ftlist.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the list management API of FreeType&nbsp;2.</p>
<p>(Most applications will never need to include this file.)</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_OUTLINE_H">FT_OUTLINE_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_OUTLINE_H</b> &lt;freetype/ftoutln.h&gt;
+<div class="section">
+<h3 id="FT_OUTLINE_H">FT_OUTLINE_H</h3>
+<pre>
+#define <b>FT_OUTLINE_H</b> &lt;ftoutln.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the scalable outline management API of FreeType&nbsp;2.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_SIZES_H">FT_SIZES_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_SIZES_H</b> &lt;freetype/ftsizes.h&gt;
+<div class="section">
+<h3 id="FT_SIZES_H">FT_SIZES_H</h3>
+<pre>
+#define <b>FT_SIZES_H</b> &lt;ftsizes.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the API which manages multiple <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects per face.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_MODULE_H">FT_MODULE_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_MODULE_H</b> &lt;freetype/ftmodapi.h&gt;
+<div class="section">
+<h3 id="FT_MODULE_H">FT_MODULE_H</h3>
+<pre>
+#define <b>FT_MODULE_H</b> &lt;ftmodapi.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the module management API of FreeType&nbsp;2.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_RENDER_H">FT_RENDER_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_RENDER_H</b> &lt;freetype/ftrender.h&gt;
+<div class="section">
+<h3 id="FT_RENDER_H">FT_RENDER_H</h3>
+<pre>
+#define <b>FT_RENDER_H</b> &lt;ftrender.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the renderer module management API of FreeType&nbsp;2.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_AUTOHINTER_H">FT_AUTOHINTER_H</h3>
+<pre>
+#define <b>FT_AUTOHINTER_H</b> &lt;ftautoh.h&gt;
+</pre>
+
+<p>A macro used in #include statements to name the file containing structures and macros related to the auto-hinting module.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</h3>
+<pre>
+#define <b>FT_CFF_DRIVER_H</b> &lt;ftcffdrv.h&gt;
+</pre>
+
+<p>A macro used in #include statements to name the file containing structures and macros related to the CFF driver module.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_TYPE1_TABLES_H</b> &lt;freetype/t1tables.h&gt;
+<div class="section">
+<h3 id="FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</h3>
+<pre>
+#define <b>FT_TRUETYPE_DRIVER_H</b> &lt;ftttdrv.h&gt;
+</pre>
+
+<p>A macro used in #include statements to name the file containing structures and macros related to the TrueType driver module.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</h3>
+<pre>
+#define <b>FT_TYPE1_TABLES_H</b> &lt;t1tables.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the types and API specific to the Type&nbsp;1 format.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_TRUETYPE_IDS_H</b> &lt;freetype/ttnameid.h&gt;
+<div class="section">
+<h3 id="FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</h3>
+<pre>
+#define <b>FT_TRUETYPE_IDS_H</b> &lt;ttnameid.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the enumeration values which identify name strings, languages, encodings, etc. This file really contains a <i>large</i> set of constant macro definitions, taken from the TrueType and OpenType specifications.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_TRUETYPE_TABLES_H</b> &lt;freetype/tttables.h&gt;
+<div class="section">
+<h3 id="FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</h3>
+<pre>
+#define <b>FT_TRUETYPE_TABLES_H</b> &lt;tttables.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the types and API specific to the TrueType (as well as OpenType) format.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_TRUETYPE_TAGS_H</b> &lt;freetype/tttags.h&gt;
+<div class="section">
+<h3 id="FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</h3>
+<pre>
+#define <b>FT_TRUETYPE_TAGS_H</b> &lt;tttags.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the definitions of TrueType four-byte &lsquo;tags&rsquo; which identify blocks in SFNT-based font formats (i.e., TrueType and OpenType).</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_BDF_H">FT_BDF_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_BDF_H</b> &lt;freetype/ftbdf.h&gt;
+<div class="section">
+<h3 id="FT_BDF_H">FT_BDF_H</h3>
+<pre>
+#define <b>FT_BDF_H</b> &lt;ftbdf.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the definitions of an API which accesses BDF-specific strings from a face.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CID_H">FT_CID_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_CID_H</b> &lt;freetype/ftcid.h&gt;
+<div class="section">
+<h3 id="FT_CID_H">FT_CID_H</h3>
+<pre>
+#define <b>FT_CID_H</b> &lt;ftcid.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the definitions of an API which access CID font information from a face.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GZIP_H">FT_GZIP_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_GZIP_H</b> &lt;freetype/ftgzip.h&gt;
+<div class="section">
+<h3 id="FT_GZIP_H">FT_GZIP_H</h3>
+<pre>
+#define <b>FT_GZIP_H</b> &lt;ftgzip.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the definitions of an API which supports gzip-compressed files.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_LZW_H">FT_LZW_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_LZW_H</b> &lt;freetype/ftlzw.h&gt;
+<div class="section">
+<h3 id="FT_LZW_H">FT_LZW_H</h3>
+<pre>
+#define <b>FT_LZW_H</b> &lt;ftlzw.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the definitions of an API which supports LZW-compressed files.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_BZIP2_H">FT_BZIP2_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_BZIP2_H</b> &lt;freetype/ftbzip2.h&gt;
+<div class="section">
+<h3 id="FT_BZIP2_H">FT_BZIP2_H</h3>
+<pre>
+#define <b>FT_BZIP2_H</b> &lt;ftbzip2.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the definitions of an API which supports bzip2-compressed files.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_WINFONTS_H">FT_WINFONTS_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_WINFONTS_H</b> &lt;freetype/ftwinfnt.h&gt;
+<div class="section">
+<h3 id="FT_WINFONTS_H">FT_WINFONTS_H</h3>
+<pre>
+#define <b>FT_WINFONTS_H</b> &lt;ftwinfnt.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the definitions of an API which supports Windows FNT files.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GLYPH_H">FT_GLYPH_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_GLYPH_H</b> &lt;freetype/ftglyph.h&gt;
+<div class="section">
+<h3 id="FT_GLYPH_H">FT_GLYPH_H</h3>
+<pre>
+#define <b>FT_GLYPH_H</b> &lt;ftglyph.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the API of the optional glyph management component.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_BITMAP_H">FT_BITMAP_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_BITMAP_H</b> &lt;freetype/ftbitmap.h&gt;
+<div class="section">
+<h3 id="FT_BITMAP_H">FT_BITMAP_H</h3>
+<pre>
+#define <b>FT_BITMAP_H</b> &lt;ftbitmap.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the API of the optional bitmap conversion component.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_BBOX_H">FT_BBOX_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_BBOX_H</b> &lt;freetype/ftbbox.h&gt;
+<div class="section">
+<h3 id="FT_BBOX_H">FT_BBOX_H</h3>
+<pre>
+#define <b>FT_BBOX_H</b> &lt;ftbbox.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the API of the optional exact bounding box computation routines.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CACHE_H">FT_CACHE_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_CACHE_H</b> &lt;freetype/ftcache.h&gt;
+<div class="section">
+<h3 id="FT_CACHE_H">FT_CACHE_H</h3>
+<pre>
+#define <b>FT_CACHE_H</b> &lt;ftcache.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the API of the optional FreeType&nbsp;2 cache sub-system.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</h3>
+<pre>
#define <b>FT_CACHE_IMAGE_H</b> <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a>
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the &lsquo;glyph image&rsquo; API of the FreeType&nbsp;2 cache sub-system.</p>
<p>It is used to define a cache for <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> elements. You can also use the API defined in <a href="ft2-header_file_macros.html#FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a> if you only need to store small glyph bitmaps, as it will use less memory.</p>
<p>This macro is deprecated. Simply include <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a> to have all glyph image-related cache declarations.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</h3>
+<pre>
#define <b>FT_CACHE_SMALL_BITMAPS_H</b> <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a>
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the &lsquo;small bitmaps&rsquo; API of the FreeType&nbsp;2 cache sub-system.</p>
<p>It is used to define a cache for small glyph bitmaps in a relatively memory-efficient way. You can also use the API defined in <a href="ft2-header_file_macros.html#FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a> if you want to cache arbitrary glyph images, including scalable outlines.</p>
<p>This macro is deprecated. Simply include <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a> to have all small bitmaps-related cache declarations.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</h3>
+<pre>
#define <b>FT_CACHE_CHARMAP_H</b> <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a>
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the &lsquo;charmap&rsquo; API of the FreeType&nbsp;2 cache sub-system.</p>
<p>This macro is deprecated. Simply include <a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a> to have all charmap-based cache declarations.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_MAC_H">FT_MAC_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_MAC_H</b> &lt;freetype/ftmac.h&gt;
+<div class="section">
+<h3 id="FT_MAC_H">FT_MAC_H</h3>
+<pre>
+#define <b>FT_MAC_H</b> &lt;ftmac.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the Macintosh-specific FreeType&nbsp;2 API. The latter is used to access fonts embedded in resource forks.</p>
<p>This header file must be explicitly included by client applications compiled on the Mac (note that the base API still works though).</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_MULTIPLE_MASTERS_H</b> &lt;freetype/ftmm.h&gt;
+<div class="section">
+<h3 id="FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</h3>
+<pre>
+#define <b>FT_MULTIPLE_MASTERS_H</b> &lt;ftmm.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the optional multiple-masters management API of FreeType&nbsp;2.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_SFNT_NAMES_H</b> &lt;freetype/ftsnames.h&gt;
+<div class="section">
+<h3 id="FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</h3>
+<pre>
+#define <b>FT_SFNT_NAMES_H</b> &lt;ftsnames.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the optional FreeType&nbsp;2 API which accesses embedded &lsquo;name&rsquo; strings in SFNT-based font formats (i.e., TrueType and OpenType).</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_OPENTYPE_VALIDATE_H</b> &lt;freetype/ftotval.h&gt;
+<div class="section">
+<h3 id="FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</h3>
+<pre>
+#define <b>FT_OPENTYPE_VALIDATE_H</b> &lt;ftotval.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the optional FreeType&nbsp;2 API which validates OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF).</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_GX_VALIDATE_H</b> &lt;freetype/ftgxval.h&gt;
+<div class="section">
+<h3 id="FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</h3>
+<pre>
+#define <b>FT_GX_VALIDATE_H</b> &lt;ftgxval.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the optional FreeType&nbsp;2 API which validates TrueTypeGX/AAT tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop).</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_PFR_H">FT_PFR_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_PFR_H</b> &lt;freetype/ftpfr.h&gt;
+<div class="section">
+<h3 id="FT_PFR_H">FT_PFR_H</h3>
+<pre>
+#define <b>FT_PFR_H</b> &lt;ftpfr.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which accesses PFR-specific data.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_STROKER_H">FT_STROKER_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_STROKER_H</b> &lt;freetype/ftstroke.h&gt;
+<div class="section">
+<h3 id="FT_STROKER_H">FT_STROKER_H</h3>
+<pre>
+#define <b>FT_STROKER_H</b> &lt;ftstroke.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which provides functions to stroke outline paths.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_SYNTHESIS_H</b> &lt;freetype/ftsynth.h&gt;
+<div class="section">
+<h3 id="FT_SYNTHESIS_H">FT_SYNTHESIS_H</h3>
+<pre>
+#define <b>FT_SYNTHESIS_H</b> &lt;ftsynth.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which performs artificial obliquing and emboldening.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_XFREE86_H">FT_XFREE86_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_XFREE86_H</b> &lt;freetype/ftxf86.h&gt;
+<div class="section">
+<h3 id="FT_XFREE86_H">FT_XFREE86_H</h3>
+<pre>
+#define <b>FT_XFREE86_H</b> &lt;ftxf86.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which provides functions specific to the XFree86 and X.Org X11 servers.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_TRIGONOMETRY_H</b> &lt;freetype/fttrigon.h&gt;
+<div class="section">
+<h3 id="FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</h3>
+<pre>
+#define <b>FT_TRIGONOMETRY_H</b> &lt;fttrigon.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which performs trigonometric computations (e.g., cosines and arc tangents).</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_LCD_FILTER_H</b> &lt;freetype/ftlcdfil.h&gt;
+<div class="section">
+<h3 id="FT_LCD_FILTER_H">FT_LCD_FILTER_H</h3>
+<pre>
+#define <b>FT_LCD_FILTER_H</b> &lt;ftlcdfil.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which performs color filtering for subpixel rendering.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_UNPATENTED_HINTING_H</b> &lt;freetype/ttunpat.h&gt;
+<div class="section">
+<h3 id="FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</h3>
+<pre>
+#define <b>FT_UNPATENTED_HINTING_H</b> &lt;ttunpat.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which performs color filtering for subpixel rendering.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_INCREMENTAL_H</b> &lt;freetype/ftincrem.h&gt;
+<div class="section">
+<h3 id="FT_INCREMENTAL_H">FT_INCREMENTAL_H</h3>
+<pre>
+#define <b>FT_INCREMENTAL_H</b> &lt;ftincrem.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which performs color filtering for subpixel rendering.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GASP_H">FT_GASP_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_GASP_H</b> &lt;freetype/ftgasp.h&gt;
+<div class="section">
+<h3 id="FT_GASP_H">FT_GASP_H</h3>
+<pre>
+#define <b>FT_GASP_H</b> &lt;ftgasp.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which returns entries from the TrueType GASP table.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ADVANCES_H">FT_ADVANCES_H</a></h4>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-#define <b>FT_ADVANCES_H</b> &lt;freetype/ftadvanc.h&gt;
+<div class="section">
+<h3 id="FT_ADVANCES_H">FT_ADVANCES_H</h3>
+<pre>
+#define <b>FT_ADVANCES_H</b> &lt;ftadvanc.h&gt;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which returns individual and ranged glyph advances.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-header_inclusion.html b/docs/reference/ft2-header_inclusion.html
new file mode 100644
index 0000000..4171dec
--- /dev/null
+++ b/docs/reference/ft2-header_inclusion.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>FreeType-2.5.5 API Reference</title>
+<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
+ body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+ color: #000000;
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
+
+ h1 { text-align: center; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
+
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
+
+ span.keyword { font-family: monospace;
+ text-align: left;
+ white-space: pre;
+ color: darkblue; }
+
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
+
+</style>
+</head>
+<body>
+
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
+
+<h1>FreeType's header inclusion scheme</h1>
+
+<p>To be as flexible as possible (and for historical reasons), FreeType uses a very special inclusion scheme to load header files, for example</p>
+<pre class="colored">
+ #include &lt;ft2build.h&gt;
+
+ #include FT_FREETYPE_H
+ #include FT_OUTLINE_H
+</pre>
+<p>A compiler and its preprocessor only needs an include path to find the file &lsquo;ft2build.h&rsquo;; the exact locations and names of the other FreeType header files are hidden by preprocessor macro names, loaded by &lsquo;ft2build.h&rsquo;. The API documentation always gives the header macro name needed for a particular function.</p>
+
+</body>
+</html>
diff --git a/docs/reference/ft2-incremental.html b/docs/reference/ft2-incremental.html
index cb14e16..26225c2 100644
--- a/docs/reference/ft2-incremental.html
+++ b/docs/reference/ft2-incremental.html
@@ -3,87 +3,140 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Incremental Loading
-</h1></center>
+<h1>Incremental Loading</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Incremental">FT_Incremental</a></td><td></td><td><a href="#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></td></tr>
-<tr><td></td><td><a href="#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td></td><td><a href="#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td></tr>
-<tr><td></td><td><a href="#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td></td><td><a href="#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td></tr>
-<tr><td></td><td><a href="#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td></td><td><a href="#FT_Incremental_Interface">FT_Incremental_Interface</a></td></tr>
-<tr><td></td><td><a href="#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td></td><td><a href="#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
-<p>This section contains various functions used to perform so-called &lsquo;incremental&rsquo; glyph loading. This is a mode where all glyphs loaded from a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> are provided by the client application,</p>
+<table class="synopsis">
+<tr><td><a href="#FT_Incremental">FT_Incremental</a></td><td><a href="#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></td></tr>
+<tr><td><a href="#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td><a href="#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td></tr>
+<tr><td><a href="#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td><a href="#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td></tr>
+<tr><td><a href="#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td><a href="#FT_Incremental_Interface">FT_Incremental_Interface</a></td></tr>
+<tr><td><a href="#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td><a href="#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td></tr>
+</table>
+
+
+<p>This section contains various functions used to perform so-called &lsquo;incremental&rsquo; glyph loading. This is a mode where all glyphs loaded from a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> are provided by the client application.</p>
<p>Apart from that, all other tables are loaded normally from the font file. This mode is useful when FreeType is used within another engine, e.g., a PostScript Imaging Processor.</p>
<p>To enable this mode, you must use <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>, passing an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> with the <a href="ft2-incremental.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a> tag and an <a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a> value. See the comments for <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a> for an example.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Incremental">FT_Incremental</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Incremental">FT_Incremental</h3>
+<p>Defined in FT_INCREMENTAL_H (ftincrem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_IncrementalRec_* <b>FT_Incremental</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>An opaque type describing a user-provided object used to implement &lsquo;incremental&rsquo; glyph loading within FreeType. This is used to support embedded fonts in certain environments (e.g., PostScript interpreters), where the glyph data isn't in the font file, or must be overridden by different values.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>It is up to client applications to create and implement <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> objects, as long as they provide implementations for the methods <a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a>, <a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a> and <a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a>.</p>
<p>See the description of <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a> to understand how to use incremental objects with FreeType.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</h3>
+<p>Defined in FT_INCREMENTAL_H (ftincrem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Incremental_MetricsRec_
{
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> bearing_x;
@@ -92,193 +145,152 @@ Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> advance_v; /* since 2.3.12 */
} <b>FT_Incremental_MetricsRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A small structure used to contain the basic glyph metrics returned by the <a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a> method.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>bearing_x</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="bearing_x">bearing_x</td><td class="desc">
<p>Left bearing, in font units.</p>
</td></tr>
-<tr valign=top><td><b>bearing_y</b></td><td>
+<tr><td class="val" id="bearing_y">bearing_y</td><td class="desc">
<p>Top bearing, in font units.</p>
</td></tr>
-<tr valign=top><td><b>advance</b></td><td>
+<tr><td class="val" id="advance">advance</td><td class="desc">
<p>Horizontal component of glyph advance, in font units.</p>
</td></tr>
-<tr valign=top><td><b>advance_v</b></td><td>
+<tr><td class="val" id="advance_v">advance_v</td><td class="desc">
<p>Vertical component of glyph advance, in font units.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>These correspond to horizontal or vertical metrics depending on the value of the &lsquo;vertical&rsquo; argument to the function <a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Incremental_Metrics">FT_Incremental_Metrics</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Incremental_Metrics">FT_Incremental_Metrics</h3>
+<p>Defined in FT_INCREMENTAL_H (ftincrem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Incremental_MetricsRec_* <b>FT_Incremental_Metrics</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to an <a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</h3>
+<p>Defined in FT_INCREMENTAL_H (ftincrem.h).</p>
+<pre>
<span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
(*<b>FT_Incremental_GetGlyphDataFunc</b>)( <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> incremental,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> glyph_index,
<a href="ft2-basic_types.html#FT_Data">FT_Data</a>* adata );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function called by FreeType to access a given glyph's data bytes during <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a> if incremental loading is enabled.</p>
<p>Note that the format of the glyph's data bytes depends on the font file format. For TrueType, it must correspond to the raw bytes within the &lsquo;glyf&rsquo; table. For PostScript formats, it must correspond to the <b>unencrypted</b> charstring bytes, without any &lsquo;lenIV&rsquo; header. It is undefined for any other format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>incremental</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="incremental">incremental</td><td class="desc">
<p>Handle to an opaque <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> handle provided by the client application.</p>
</td></tr>
-<tr valign=top><td><b>glyph_index</b></td><td>
+<tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
<p>Index of relevant glyph.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>adata</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="adata">adata</td><td class="desc">
<p>A structure describing the returned glyph data bytes (which will be accessed as a read-only byte block).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If this function returns successfully the method <a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a> will be called later to release the data bytes.</p>
<p>Nested calls to <a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a> can happen for compound glyphs.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</h3>
+<p>Defined in FT_INCREMENTAL_H (ftincrem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">void</span>
(*<b>FT_Incremental_FreeGlyphDataFunc</b>)( <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> incremental,
<a href="ft2-basic_types.html#FT_Data">FT_Data</a>* data );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to release the glyph data bytes returned by a successful call to <a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>incremental</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="incremental">incremental</td><td class="desc">
<p>A handle to an opaque <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> handle provided by the client application.</p>
</td></tr>
-<tr valign=top><td><b>data</b></td><td>
+<tr><td class="val" id="data">data</td><td class="desc">
<p>A structure describing the glyph data bytes (which will be accessed as a read-only byte block).</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</h3>
+<p>Defined in FT_INCREMENTAL_H (ftincrem.h).</p>
+<pre>
<span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
(*<b>FT_Incremental_GetGlyphMetricsFunc</b>)
( <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> incremental,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> glyph_index,
<a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> vertical,
<a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a> *ametrics );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to retrieve the basic metrics of a given glyph index before accessing its data. This is necessary because, in certain formats like TrueType, the metrics are stored in a different place from the glyph images proper.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>incremental</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="incremental">incremental</td><td class="desc">
<p>A handle to an opaque <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> handle provided by the client application.</p>
</td></tr>
-<tr valign=top><td><b>glyph_index</b></td><td>
+<tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
<p>Index of relevant glyph.</p>
</td></tr>
-<tr valign=top><td><b>vertical</b></td><td>
+<tr><td class="val" id="vertical">vertical</td><td class="desc">
<p>If true, return vertical metrics.</p>
</td></tr>
-<tr valign=top><td><b>ametrics</b></td><td>
+<tr><td class="val" id="ametrics">ametrics</td><td class="desc">
<p>This parameter is used for both input and output. The original glyph metrics, if any, in font units. If metrics are not available all the values must be set to zero.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>ametrics</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="ametrics">ametrics</td><td class="desc">
<p>The replacement glyph metrics in font units.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</h3>
+<p>Defined in FT_INCREMENTAL_H (ftincrem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Incremental_FuncsRec_
{
<a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a> get_glyph_data;
@@ -286,47 +298,38 @@ Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
<a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a> get_glyph_metrics;
} <b>FT_Incremental_FuncsRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A table of functions for accessing fonts that load data incrementally. Used in <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>get_glyph_data</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="get_glyph_data">get_glyph_data</td><td class="desc">
<p>The function to get glyph data. Must not be null.</p>
</td></tr>
-<tr valign=top><td><b>free_glyph_data</b></td><td>
+<tr><td class="val" id="free_glyph_data">free_glyph_data</td><td class="desc">
<p>The function to release glyph data. Must not be null.</p>
</td></tr>
-<tr valign=top><td><b>get_glyph_metrics</b></td><td>
+<tr><td class="val" id="get_glyph_metrics">get_glyph_metrics</td><td class="desc">
<p>The function to get glyph metrics. May be null if the font does not provide overriding glyph metrics.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</h3>
+<p>Defined in FT_INCREMENTAL_H (ftincrem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Incremental_InterfaceRec_
{
<span class="keyword">const</span> <a href="ft2-incremental.html#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a>* funcs;
<a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> object;
} <b>FT_Incremental_InterfaceRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure to be used with <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to indicate that the user wants to support incremental glyph loading. You should use it with <a href="ft2-incremental.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a> as in the following example:</p>
<pre class="colored">
FT_Incremental_InterfaceRec inc_int;
@@ -352,50 +355,33 @@ Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
error = FT_Open_Face( library, &amp;open_args, index, &amp;face );
...
</pre>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Incremental_Interface">FT_Incremental_Interface</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Incremental_Interface">FT_Incremental_Interface</h3>
+<p>Defined in FT_INCREMENTAL_H (ftincrem.h).</p>
+<pre>
<span class="keyword">typedef</span> <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a>* <b>FT_Incremental_Interface</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A pointer to an <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</h3>
+<p>Defined in FT_INCREMENTAL_H (ftincrem.h).</p>
+<pre>
#define <b>FT_PARAM_TAG_INCREMENTAL</b> <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'n', 'c', 'r' )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to indicate an incremental loading object to be used by FreeType.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-index.html b/docs/reference/ft2-index.html
index fb674a2..2e16e94 100644
--- a/docs/reference/ft2-index.html
+++ b/docs/reference/ft2-index.html
@@ -3,292 +3,379 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<table align=center border=0 cellpadding=0 cellspacing=0>
-<tr><td><a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_ATOM</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LcdFilter</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a></td><td><a href="ft2-header_file_macros.html#FT_LIST_H">FT_LIST_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a></td><td><a href="ft2-base_interface.html#FT_Library">FT_Library</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Set">FT_Stroker_Set</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_NONE</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_Property">BDF_Property</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_2X2</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a></td><td><a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceDict">CID_FaceDict</a></td><td><a href="ft2-list_processing.html#FT_List">FT_List</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a></td><td><a href="ft2-list_processing.html#FT_List_Add">FT_List_Add</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceInfo">CID_FaceInfo</a></td><td><a href="ft2-list_processing.html#FT_List_Destructor">FT_List_Destructor</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_SCALE</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a></td><td><a href="ft2-list_processing.html#FT_List_Finalize">FT_List_Finalize</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_Info">CID_Info</a></td><td><a href="ft2-list_processing.html#FT_List_Find">FT_List_Find</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MAJOR</a></td><td><a href="ft2-list_processing.html#FT_List_Insert">FT_List_Insert</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XY_SCALE</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MINOR</a></td><td><a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a></td><td><a href="ft2-base_interface.html#FT_SubGlyph">FT_SubGlyph</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_PATCH</a></td><td><a href="ft2-list_processing.html#FT_List_Iterator">FT_List_Iterator</a></td><td><a href="ft2-header_file_macros.html#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_XXX</a></td><td><a href="ft2-list_processing.html#FT_List_Remove">FT_List_Remove</a></td><td><a href="ft2-header_file_macros.html#FT_SYSTEM_H">FT_SYSTEM_H</a></td></tr>
-<tr><td><a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a></td><td><a href="ft2-list_processing.html#FT_List_Up">FT_List_Up</a></td><td><a href="ft2-basic_types.html#FT_Tag">FT_Tag</a></td></tr>
-<tr><td><a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td><td><a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a></td><td><a href="ft2-computations.html#FT_Tan">FT_Tan</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_ADVANCES_H">FT_ADVANCES_H</a></td><td><a href="ft2-list_processing.html#FT_ListNodeRec">FT_ListNodeRec</a></td><td><a href="ft2-header_file_macros.html#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_NONE</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_CROP_BITMAP</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a></td></tr>
-<tr><td><a href="ft2-system_interface.html#FT_Alloc_Func">FT_Alloc_Func</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_2PI">FT_ANGLE_2PI</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_PI2">FT_ANGLE_PI2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_PI4">FT_ANGLE_PI4</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Angle">FT_Angle</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Angle_Diff">FT_Angle_Diff</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Atan2">FT_Atan2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a></td><td><a href="ft2-header_file_macros.html#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a></td><td><a href="ft2-header_file_macros.html#FT_TYPES_H">FT_TYPES_H</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a></td><td><a href="ft2-basic_types.html#FT_UFWord">FT_UFWord</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BBOX_H">FT_BBOX_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a></td><td><a href="ft2-basic_types.html#FT_UInt">FT_UInt</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_BBox">FT_BBox</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_PEDANTIC</a></td><td><a href="ft2-basic_types.html#FT_UInt16">FT_UInt16</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BDF_H">FT_BDF_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a></td><td><a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BITMAP_H">FT_BITMAP_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a></td><td><a href="ft2-basic_types.html#FT_ULong">FT_ULong</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD_V</a></td><td><a href="ft2-header_file_macros.html#FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a></td><td><a href="ft2-basic_types.html#FT_UnitVector">FT_UnitVector</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td><td><a href="ft2-basic_types.html#FT_UShort">FT_UShort</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_APPLE</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_BASE</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_New">FT_Bitmap_New</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_bsln</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERN</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></td><td><a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_feat</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Bool">FT_Bool</a></td><td><a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GDEF</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Byte">FT_Byte</a></td><td><a href="ft2-truetype_tables.html#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GPOS</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a></td><td><a href="ft2-basic_types.html#FT_Long">FT_Long</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GSUB</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BZIP2_H">FT_BZIP2_H</a></td><td><a href="ft2-header_file_macros.html#FT_LZW_H">FT_LZW_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GX</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</a></td><td><a href="ft2-header_file_macros.html#FT_MAC_H">FT_MAC_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a></td><td><a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a></td><td><a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_JSTF</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a></td><td><a href="ft2-computations.html#FT_Matrix_Invert">FT_Matrix_Invert</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_just</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_CeilFix">FT_CeilFix</a></td><td><a href="ft2-computations.html#FT_Matrix_Multiply">FT_Matrix_Multiply</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_kern</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Char">FT_Char</a></td><td><a href="ft2-system_interface.html#FT_Memory">FT_Memory</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_lcar</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a></td><td><a href="ft2-system_interface.html#FT_MemoryRec">FT_MemoryRec</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_MATH</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_MS</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CID_H">FT_CID_H</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_mort</a></td></tr>
-<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Free">FT_ClassicKern_Free</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_morx</a></td></tr>
-<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OT</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="ft2-base_interface.html#FT_Module">FT_Module</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_opbd</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="ft2-module_management.html#FT_Module_Constructor">FT_Module_Constructor</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_prop</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="ft2-module_management.html#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_trak</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Cos">FT_Cos</a></td><td><a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Axis">FT_Var_Axis</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Data">FT_Data</a></td><td><a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Named_Style">FT_Var_Named_Style</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_DivFix">FT_DivFix</a></td><td><a href="ft2-computations.html#FT_MulDiv">FT_MulDiv</a></td><td><a href="ft2-basic_types.html#FT_Vector">FT_Vector</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a></td><td><a href="ft2-computations.html#FT_MulFix">FT_MulFix</a></td><td><a href="ft2-computations.html#FT_Vector_From_Polar">FT_Vector_From_Polar</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="ft2-computations.html#FT_Vector_Length">FT_Vector_Length</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a></td><td><a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a></td><td><a href="ft2-computations.html#FT_Vector_Polarize">FT_Vector_Polarize</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td><a href="ft2-computations.html#FT_Vector_Rotate">FT_Vector_Rotate</a></td></tr>
-<tr><td><a href="ft2-sizes_management.html#FT_Done_Size">FT_Done_Size</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></td><td><a href="ft2-computations.html#FT_Vector_Transform">FT_Vector_Transform</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Driver">FT_Driver</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td><td><a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a></td><td><a href="ft2-header_file_macros.html#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_CUSTOM</a></td><td><a href="ft2-base_interface.html#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_Header">FT_WinFNT_Header</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_EXPERT</a></td><td><a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_LATIN_1</a></td><td><a href="ft2-basic_types.html#FT_Offset">FT_Offset</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1250</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_STANDARD</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_APPLE_ROMAN</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1252</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1253</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1254</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1255</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_BIG5</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_XXX</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1256</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_GB2312</a></td><td><a href="ft2-header_file_macros.html#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1257</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_JOHAB</a></td><td><a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1258</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SJIS</a></td><td><a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1361</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Free">FT_OpenType_Free</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP874</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_WANSUNG</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP932</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_NONE</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_LEFT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP936</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_OLD_LATIN_2</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_RIGHT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP949</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_NONE</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP950</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_DEFAULT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_MAC</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_OEM</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_EVEN_ODD_FILL</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_SYMBOL</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Error">FT_Error</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_FLAGS</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a></td><td><a href="ft2-header_file_macros.html#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="ft2-header_file_macros.html#FT_XFREE86_H">FT_XFREE86_H</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_HIGH_PRECISION</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_INCLUDE_STUBS</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FAST_GLYPHS</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_NONE</a></td><td><a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_OWNER</a></td><td><a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_REVERSE_FILL</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SINGLE_PASS</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SMART_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_New">FTC_ImageCache_New</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Check">FT_Outline_Check</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Copy">FT_Outline_Copy</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a></td><td><a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Done">FTC_Manager_Done</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Decompose">FT_Outline_Decompose</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Done">FT_Outline_Done</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Face">FT_Face</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td></tr>
-<tr><td><a href="ft2-version.html#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Reset">FTC_Manager_Reset</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Face_Internal">FT_Face_Internal</a></td><td><a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
-<tr><td><a href="ft2-version.html#FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></td><td><a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a></td><td><a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a></td><td><a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_FloorFix">FT_FloorFix</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td><a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Transform">FT_Outline_Transform</a></td><td><a href="ft2-base_interface.html#ft_encoding_xxx">ft_encoding_xxx</a></td></tr>
-<tr><td><a href="ft2-system_interface.html#FT_Free_Func">FT_Free_Func</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a></td><td><a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_gridfit</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a></td><td><a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_pixels</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_EDITABLE_EMBEDDING</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></td><td><a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_subpixels</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_INSTALLABLE_EMBEDDING</a></td><td><a href="ft2-sfnt_names.html#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td><td><a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_truncate</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_NO_SUBSETTING</a></td><td><a href="ft2-sfnt_names.html#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td><td><a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_unscaled</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a></td><td><a href="ft2-incremental.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td><td><a href="ft2-glyph_management.html#ft_glyph_bbox_xxx">ft_glyph_bbox_xxx</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a></td><td><a href="ft2-truetype_tables.html#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td><td><a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_bitmap</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td><td><a href="ft2-basic_types.html#FT_Palette_Mode">FT_Palette_Mode</a></td><td><a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_composite</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_FWord">FT_FWord</a></td><td><a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a></td><td><a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_none</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRAY</a></td><td><a href="ft2-header_file_macros.html#FT_PFR_H">FT_PFR_H</a></td><td><a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_outline</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRIDFIT</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a></td><td><a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_plotter</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GASP_H">FT_GASP_H</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a></td><td><a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_xxx</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY4</a></td><td><a href="ft2-base_interface.html#ft_kerning_default">ft_kerning_default</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_GRIDFIT</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a></td><td><a href="ft2-base_interface.html#ft_kerning_unfitted">ft_kerning_unfitted</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_SMOOTHING</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a></td><td><a href="ft2-base_interface.html#ft_kerning_unscaled">ft_kerning_unscaled</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">ft_open_driver</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Generic">FT_Generic</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_NONE</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">ft_open_memory</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">ft_open_params</a></td></tr>
-<tr><td><a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a></td><td><a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">ft_open_pathname</a></td></tr>
-<tr><td><a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a></td><td><a href="ft2-basic_types.html#FT_Pos">FT_Pos</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">ft_open_stream</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td><a href="ft2-bdf_fonts.html#FT_PropertyType">FT_PropertyType</a></td><td><a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_even_odd_fill</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td><td><a href="ft2-basic_types.html#FT_PtrDist">FT_PtrDist</a></td><td><a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_flags</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a></td><td><a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_high_precision</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_CLIP</a></td><td><a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_ignore_dropouts</a></td></tr>
-<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DEFAULT</a></td><td><a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_none</a></td></tr>
-<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a></td><td><a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_owner</a></td></tr>
-<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></td><td><a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_reverse_fill</a></td></tr>
-<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td><td><a href="ft2-raster.html#FT_Raster">FT_Raster</a></td><td><a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_single_pass</a></td></tr>
-<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td><td><a href="ft2-raster.html#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></td><td><a href="ft2-basic_types.html#FT_Palette_Mode">ft_palette_mode_rgb</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a></td><td><a href="ft2-raster.html#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></td><td><a href="ft2-basic_types.html#FT_Palette_Mode">ft_palette_mode_rgba</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td><td><a href="ft2-raster.html#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></td><td><a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_grays</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a></td><td><a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a></td><td><a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_mono</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Get_Glyph">FT_Get_Glyph</a></td><td><a href="ft2-raster.html#FT_Raster_NewFunc">FT_Raster_NewFunc</a></td><td><a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_none</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td><td><a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a></td><td><a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_pal2</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a></td><td><a href="ft2-raster.html#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></td><td><a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_pal4</a></td></tr>
-<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="ft2-raster.html#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></td><td><a href="ft2-basic_types.html#ft_pixel_mode_xxx">ft_pixel_mode_xxx</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Get_Module">FT_Get_Module</a></td><td><a href="ft2-raster.html#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></td><td><a href="ft2-base_interface.html#ft_render_mode_xxx">ft_render_mode_mono</a></td></tr>
-<tr><td><a href="ft2-multiple_masters.html#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="ft2-header_file_macros.html#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="ft2-base_interface.html#ft_render_mode_xxx">ft_render_mode_normal</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a></td><td><a href="ft2-base_interface.html#ft_render_mode_xxx">ft_render_mode_xxx</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_Dict_Keys</a></td></tr>
-<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LIGHT</a></td><td><a href="ft2-type1_tables.html#PS_FontInfo">PS_FontInfo</a></td></tr>
-<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a></td></tr>
-<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a></td><td><a href="ft2-type1_tables.html#PS_Private">PS_Private</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td><td><a href="ft2-system_interface.html#FT_Realloc_Func">FT_Realloc_Func</a></td><td><a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></td><td><a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_Blend_Flags</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></td><td><a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_EncodingType</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></td><td><a href="ft2-module_management.html#FT_Remove_Module">FT_Remove_Module</a></td><td><a href="ft2-type1_tables.html#T1_FontInfo">T1_FontInfo</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Get_Renderer">FT_Get_Renderer</a></td><td><a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a></td><td><a href="ft2-type1_tables.html#T1_Private">T1_Private</a></td></tr>
-<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_CUSTOM</a></td></tr>
-<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td><a href="ft2-base_interface.html#FT_Renderer">FT_Renderer</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_EXPERT</a></td></tr>
-<tr><td><a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="ft2-module_management.html#FT_Renderer_Class">FT_Renderer_Class</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_LATIN_1</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td><td><a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_STANDARD</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td><td><a href="ft2-computations.html#FT_RoundFix">FT_RoundFix</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-truetype_engine.html#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></td><td><a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_DEFAULT</a></td></tr>
-<tr><td><a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td><a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_ISO_10646</a></td></tr>
-<tr><td><a href="ft2-font_formats.html#FT_Get_X11_Font_Format">FT_Get_X11_Font_Format</a></td><td><a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_1_1</a></td></tr>
-<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></td><td><a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_2_0</a></td></tr>
-<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td><a href="ft2-module_management.html#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_32</a></td></tr>
-<tr><td><a href="ft2-mac_specific.html#FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_VARIANT_SELECTOR</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a></td><td><a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="ft2-truetype_tables.html#TT_Header">TT_Header</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a></td><td><a href="ft2-module_management.html#FT_Set_Renderer">FT_Set_Renderer</a></td><td><a href="ft2-truetype_tables.html#TT_HoriHeader">TT_HoriHeader</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a></td><td><a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_10646</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_7BIT_ASCII</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_8859_1</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a></td><td><a href="ft2-header_file_macros.html#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARABIC</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARMENIAN</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a></td><td><a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_BENGALI</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GLYPH_H">FT_GLYPH_H</a></td><td><a href="ft2-basic_types.html#FT_Short">FT_Short</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_BURMESE</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_BBOX</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_DEVANAGARI</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_CELL</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GEEZ</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_NOMINAL</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GEORGIAN</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GREEK</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_SCALES</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GUJARATI</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="ft2-header_file_macros.html#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GURMUKHI</a></td></tr>
-<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td><td><a href="ft2-computations.html#FT_Sin">FT_Sin</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_HEBREW</a></td></tr>
-<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td><td><a href="ft2-base_interface.html#FT_Size">FT_Size</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_JAPANESE</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_Size_Internal">FT_Size_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KANNADA</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Transform">FT_Glyph_Transform</a></td><td><a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KHMER</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a></td><td><a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KOREAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_LAOTIAN</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MALAYALAM</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="ft2-base_interface.html#FT_SizeRec">FT_SizeRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MALDIVIAN</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td><td><a href="ft2-base_interface.html#FT_Slot_Internal">FT_Slot_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MONGOLIAN</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="ft2-raster.html#FT_Span">FT_Span</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ORIYA</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td><td><a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_RSYMBOL</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_RUSSIAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="ft2-header_file_macros.html#FT_STROKER_H">FT_STROKER_H</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SIMPLIFIED_CHINESE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_BUTT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SINDHI</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SINHALESE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_SQUARE</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SLAVIC</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_BEVEL</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TAMIL</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TELUGU</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_FIXED</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_THAI</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TIBETAN</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TRADITIONAL_CHINESE</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_BOLD</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_UNINTERP</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_ITALIC</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_VIETNAMESE</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></td><td><a href="ft2-system_interface.html#FT_Stream">FT_Stream</a></td><td><a href="ft2-truetype_tables.html#TT_MaxProfile">TT_MaxProfile</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a></td><td><a href="ft2-system_interface.html#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_BIG_5</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td><td><a href="ft2-system_interface.html#FT_Stream_IoFunc">FT_Stream_IoFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_GB2312</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td><a href="ft2-bzip2.html#FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_JOHAB</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td><a href="ft2-gzip.html#FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SJIS</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="ft2-lzw.html#FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SYMBOL_CS</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int">FT_Int</a></td><td><a href="ft2-system_interface.html#FT_StreamDesc">FT_StreamDesc</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UCS_4</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int16">FT_Int16</a></td><td><a href="ft2-system_interface.html#FT_StreamRec">FT_StreamRec</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int32">FT_Int32</a></td><td><a href="ft2-basic_types.html#FT_String">FT_String</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_WANSUNG</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td><td><a href="ft2-truetype_tables.html#TT_PCLT">TT_PCLT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Done">FT_Stroker_Done</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_CUSTOM</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNFITTED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_Kerning_Mode</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td><td><a href="ft2-truetype_tables.html#TT_Postscript">TT_Postscript</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td><td><a href="ft2-truetype_tables.html#TT_VertHeader">TT_VertHeader</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LIGHT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td><td></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_New">FT_Stroker_New</a></td><td></td></tr>
+<table class="index">
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_ATOM</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td><td><a href="ft2-header_file_macros.html#FT_SYSTEM_H">FT_SYSTEM_H</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a></td><td><a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a></td><td><a href="ft2-basic_types.html#FT_Tag">FT_Tag</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a></td><td><a href="ft2-list_processing.html#FT_List">FT_List</a></td><td><a href="ft2-computations.html#FT_Tan">FT_Tan</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_NONE</a></td><td><a href="ft2-list_processing.html#FT_List_Add">FT_List_Add</a></td><td><a href="ft2-header_file_macros.html#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_Property">BDF_Property</a></td><td><a href="ft2-list_processing.html#FT_List_Destructor">FT_List_Destructor</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a></td><td><a href="ft2-list_processing.html#FT_List_Finalize">FT_List_Finalize</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_NONE</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PropertyType</a></td><td><a href="ft2-list_processing.html#FT_List_Find">FT_List_Find</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceDict">CID_FaceDict</a></td><td><a href="ft2-list_processing.html#FT_List_Insert">FT_List_Insert</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a></td><td><a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceInfo">CID_FaceInfo</a></td><td><a href="ft2-list_processing.html#FT_List_Iterator">FT_List_Iterator</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a></td><td><a href="ft2-list_processing.html#FT_List_Remove">FT_List_Remove</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FontDict">CID_FontDict</a></td><td><a href="ft2-list_processing.html#FT_List_Up">FT_List_Up</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_Info">CID_Info</a></td><td><a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></td></tr>
+<tr><td><a href="ft2-cff_driver.html#darkening-parameters">darkening-parameters</a></td><td><a href="ft2-list_processing.html#FT_ListNodeRec">FT_ListNodeRec</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#default-script">default-script</a></td><td><a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a></td><td><a href="ft2-header_file_macros.html#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MAJOR</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a></td><td><a href="ft2-header_file_macros.html#FT_TYPES_H">FT_TYPES_H</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MINOR</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_CROP_BITMAP</a></td><td><a href="ft2-basic_types.html#FT_UFWord">FT_UFWord</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_PATCH</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a></td><td><a href="ft2-basic_types.html#FT_UInt">FT_UInt</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_XXX</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a></td><td><a href="ft2-basic_types.html#FT_UInt16">FT_UInt16</a></td></tr>
+<tr><td><a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a></td><td><a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a></td></tr>
+<tr><td><a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a></td><td><a href="ft2-basic_types.html#FT_UInt64">FT_UInt64</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_ADVANCES_H">FT_ADVANCES_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="ft2-basic_types.html#FT_ULong">FT_ULong</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a></td><td><a href="ft2-header_file_macros.html#FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a></td><td><a href="ft2-basic_types.html#FT_UnitVector">FT_UnitVector</a></td></tr>
+<tr><td><a href="ft2-system_interface.html#FT_Alloc_Func">FT_Alloc_Func</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a></td><td><a href="ft2-basic_types.html#FT_UShort">FT_UShort</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_2PI">FT_ANGLE_2PI</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_APPLE</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_BASE</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_PI2">FT_ANGLE_PI2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_bsln</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_PI4">FT_ANGLE_PI4</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_PEDANTIC</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERN</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Angle">FT_Angle</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Angle_Diff">FT_Angle_Diff</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_feat</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Atan2">FT_Atan2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD_V</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GDEF</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GPOS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GSUB</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_AUTOHINTER_H">FT_AUTOHINTER_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GX</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_CJK</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_INDIC</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_JSTF</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_NONE</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_just</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td><a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_kern</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BBOX_H">FT_BBOX_H</a></td><td><a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_lcar</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_BBox">FT_BBox</a></td><td><a href="ft2-truetype_tables.html#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_MATH</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BDF_H">FT_BDF_H</a></td><td><a href="ft2-basic_types.html#FT_Long">FT_Long</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_MS</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BITMAP_H">FT_BITMAP_H</a></td><td><a href="ft2-header_file_macros.html#FT_LZW_H">FT_LZW_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_mort</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a></td><td><a href="ft2-header_file_macros.html#FT_MAC_H">FT_MAC_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_morx</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td><a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OT</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td><a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a></td><td><a href="ft2-computations.html#FT_Matrix_Invert">FT_Matrix_Invert</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_opbd</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td><a href="ft2-computations.html#FT_Matrix_Multiply">FT_Matrix_Multiply</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_prop</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_New">FT_Bitmap_New</a></td><td><a href="ft2-system_interface.html#FT_Memory">FT_Memory</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_trak</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="ft2-system_interface.html#FT_MemoryRec">FT_MemoryRec</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Axis">FT_Var_Axis</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Named_Style">FT_Var_Named_Style</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a></td><td><a href="ft2-basic_types.html#FT_Vector">FT_Vector</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Bool">FT_Bool</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="ft2-computations.html#FT_Vector_From_Polar">FT_Vector_From_Polar</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Byte">FT_Byte</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="ft2-computations.html#FT_Vector_Length">FT_Vector_Length</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a></td><td><a href="ft2-module_management.html#FT_Module">FT_Module</a></td><td><a href="ft2-computations.html#FT_Vector_Polarize">FT_Vector_Polarize</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BZIP2_H">FT_BZIP2_H</a></td><td><a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a></td><td><a href="ft2-computations.html#FT_Vector_Rotate">FT_Vector_Rotate</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</a></td><td><a href="ft2-module_management.html#FT_Module_Constructor">FT_Module_Constructor</a></td><td><a href="ft2-computations.html#FT_Vector_Transform">FT_Vector_Transform</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a></td><td><a href="ft2-module_management.html#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a></td><td><a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="ft2-header_file_macros.html#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a></td><td><a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_Header">FT_WinFNT_Header</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_CeilFix">FT_CeilFix</a></td><td><a href="ft2-computations.html#FT_MulDiv">FT_MulDiv</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</a></td><td><a href="ft2-computations.html#FT_MulFix">FT_MulFix</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1250</a></td></tr>
+<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_ADOBE</a></td><td><a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a></td></tr>
+<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_FREETYPE</a></td><td><a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1252</a></td></tr>
+<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1253</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Char">FT_Char</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1254</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1255</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a></td><td><a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1256</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CID_H">FT_CID_H</a></td><td><a href="ft2-base_interface.html#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1257</a></td></tr>
+<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Free">FT_ClassicKern_Free</a></td><td><a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1258</a></td></tr>
+<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></td><td><a href="ft2-basic_types.html#FT_Offset">FT_Offset</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1361</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP874</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP932</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP936</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP949</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Cos">FT_Cos</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP950</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Data">FT_Data</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_XXX</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_DEFAULT</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_DivFix">FT_DivFix</a></td><td><a href="ft2-header_file_macros.html#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_MAC</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a></td><td><a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_OEM</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_SYMBOL</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Free">FT_OpenType_Free</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a></td><td><a href="ft2-header_file_macros.html#FT_XFREE86_H">FT_XFREE86_H</a></td></tr>
+<tr><td><a href="ft2-sizes_management.html#FT_Done_Size">FT_Done_Size</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_LEFT</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Driver">FT_Driver</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_RIGHT</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_NONE</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_CUSTOM</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a></td><td><a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_EXPERT</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a></td><td><a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_LATIN_1</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_STANDARD</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_EVEN_ODD_FILL</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_APPLE_ROMAN</a></td><td><a href="ft2-header_file_macros.html#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_HIGH_PRECISION</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_New">FTC_ImageCache_New</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_BIG5</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_NONE</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_GB2312</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_OWNER</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Done">FTC_Manager_Done</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_JOHAB</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_REVERSE_FILL</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SINGLE_PASS</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_NONE</a></td><td><a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Reset">FTC_Manager_Reset</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_OLD_LATIN_2</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Check">FT_Outline_Check</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Copy">FT_Outline_Copy</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Decompose">FT_Outline_Decompose</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Done">FT_Outline_Done</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Error">FT_Error</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a></td><td><a href="ft2-outline_processing.html#FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a></td><td><a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td><a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_COLOR</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td><td><a href="ft2-auto_hinter.html#fallback-script">fallback-script</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td><td><a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FAST_GLYPHS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td><td><a href="ft2-cff_driver.html#hinting-engine">hinting-engine</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td><a href="ft2-auto_hinter.html#increase-x-height">increase-x-height</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td><a href="ft2-tt_driver.html#interpreter-version">interpreter-version</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td><td><a href="ft2-cff_driver.html#no-stem-darkening">no-stem-darkening</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a></td><td><a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_FUZZ</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SCALE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SHIFT</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_VALUE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Transform">FT_Outline_Transform</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING_KEY</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_ENTRY</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_TYPE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td><td><a href="ft2-sfnt_names.html#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_BLUE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Face">FT_Face</a></td><td><a href="ft2-sfnt_names.html#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_NAME</a></td></tr>
+<tr><td><a href="ft2-version.html#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></td><td><a href="ft2-incremental.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_OTHER_BLUE</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td><td><a href="ft2-truetype_tables.html#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_BBOX</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_MATRIX</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td><a href="ft2-header_file_macros.html#FT_PFR_H">FT_PFR_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_NAME</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_TYPE</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FORCE_BOLD</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Face_Internal">FT_Face_Internal</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FS_TYPE</a></td></tr>
+<tr><td><a href="ft2-version.html#FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY4</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FULL_NAME</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_IS_FIXED_PITCH</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ITALIC_ANGLE</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_FloorFix">FT_FloorFix</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LANGUAGE_GROUP</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_NONE</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LEN_IV</a></td></tr>
+<tr><td><a href="ft2-system_interface.html#FT_Free_Func">FT_Free_Func</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_MIN_FEATURE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a></td><td><a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NOTICE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_EDITABLE_EMBEDDING</a></td><td><a href="ft2-basic_types.html#FT_Pos">FT_Pos</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_BLUE_VALUES</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_INSTALLABLE_EMBEDDING</a></td><td><a href="ft2-auto_hinter.html#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_CHAR_STRINGS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_NO_SUBSETTING</a></td><td><a href="ft2-auto_hinter.html#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_BLUES</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a></td><td><a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a></td><td><a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td><td><a href="ft2-basic_types.html#FT_PtrDist">FT_PtrDist</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_H</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_FWord">FT_FWord</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_V</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRAY</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_CLIP</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_SUBRS</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRIDFIT</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DEFAULT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_OTHER_BLUE</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GASP_H">FT_GASP_H</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PAINT_TYPE</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PASSWORD</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_GRIDFIT</a></td><td><a href="ft2-raster.html#FT_Raster">FT_Raster</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_RND_STEM_UP</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_SMOOTHING</a></td><td><a href="ft2-raster.html#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_HW</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="ft2-raster.html#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_VW</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Generic">FT_Generic</a></td><td><a href="ft2-raster.html#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_H</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a></td><td><a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_V</a></td></tr>
+<tr><td><a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a></td><td><a href="ft2-raster.html#FT_Raster_NewFunc">FT_Raster_NewFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_SUBR</a></td></tr>
+<tr><td><a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a></td><td><a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_POSITION</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td><a href="ft2-raster.html#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_THICKNESS</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td><td><a href="ft2-raster.html#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNIQUE_ID</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="ft2-raster.html#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_VERSION</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td><td><a href="ft2-header_file_macros.html#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_WEIGHT</a></td></tr>
+<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_Dict_Keys</a></td></tr>
+<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_FontInfo">PS_FontInfo</a></td></tr>
+<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LIGHT</a></td><td><a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a></td></tr>
+<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_Private">PS_Private</a></td></tr>
+<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a></td><td><a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a></td><td><a href="ft2-system_interface.html#FT_Realloc_Func">FT_Realloc_Func</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SCALE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td><td><a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SHIFT</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a></td><td><a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_VALUES</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Get_Glyph">FT_Get_Glyph</a></td><td><a href="ft2-module_management.html#FT_Remove_Module">FT_Remove_Module</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_BLUES</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td><td><a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FORCE_BOLD</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="ft2-module_management.html#FT_Renderer">FT_Renderer</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_ITALIC_ANGLE</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Get_Module">FT_Get_Module</a></td><td><a href="ft2-module_management.html#FT_Renderer_Class">FT_Renderer_Class</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_HEIGHT</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="ft2-computations.html#FT_RoundFix">FT_RoundFix</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_WIDTH</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_HEIGHTS</a></td></tr>
+<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td><td><a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_WIDTHS</a></td></tr>
+<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td><a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_POSITION</a></td></tr>
+<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td><a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_THICKNESS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td><td><a href="ft2-module_management.html#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_Blend_Flags</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ARRAY</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_EXPERT</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></td><td><a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ISOLATIN1</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Get_Renderer">FT_Get_Renderer</a></td><td><a href="ft2-module_management.html#FT_Set_Renderer">FT_Set_Renderer</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_NONE</a></td></tr>
+<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td><td><a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_STANDARD</a></td></tr>
+<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_EncodingType</a></td></tr>
+<tr><td><a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_FontInfo">T1_FontInfo</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HEAD</a></td><td><a href="ft2-type1_tables.html#T1_Private">T1_Private</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HHEA</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_CUSTOM</a></td></tr>
+<tr><td><a href="ft2-truetype_engine.html#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_MAXP</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_EXPERT</a></td></tr>
+<tr><td><a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td><a href="ft2-header_file_macros.html#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_LATIN_1</a></td></tr>
+<tr><td><a href="ft2-font_formats.html#FT_Get_X11_Font_Format">FT_Get_X11_Font_Format</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_OS2</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_STANDARD</a></td></tr>
+<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_PCLT</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_POST</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_DEFAULT</a></td></tr>
+<tr><td><a href="ft2-mac_specific.html#FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_VHEA</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_ISO_10646</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_1_1</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_2_0</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a></td><td><a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_32</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a></td><td><a href="ft2-basic_types.html#FT_Short">FT_Short</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_VARIANT_SELECTOR</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_BBOX</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_CELL</a></td><td><a href="ft2-truetype_tables.html#TT_Header">TT_Header</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_NOMINAL</a></td><td><a href="ft2-truetype_tables.html#TT_HoriHeader">TT_HoriHeader</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_35</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_SCALES</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_38</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a></td><td><a href="ft2-header_file_macros.html#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GLYPH_H">FT_GLYPH_H</a></td><td><a href="ft2-computations.html#FT_Sin">FT_Sin</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_10646</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a></td><td><a href="ft2-base_interface.html#FT_Size">FT_Size</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_7BIT_ASCII</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></td><td><a href="ft2-base_interface.html#FT_Size_Internal">FT_Size_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_8859_1</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a></td><td><a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a></td><td><a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARABIC</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARMENIAN</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="ft2-base_interface.html#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_BENGALI</a></td></tr>
+<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td><td><a href="ft2-base_interface.html#FT_SizeRec">FT_SizeRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_BURMESE</a></td></tr>
+<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td><td><a href="ft2-base_interface.html#FT_Slot_Internal">FT_Slot_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_DEVANAGARI</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></td><td><a href="ft2-raster.html#FT_Span">FT_Span</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GEEZ</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Transform">FT_Glyph_Transform</a></td><td><a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GEORGIAN</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GREEK</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GUJARATI</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td><td><a href="ft2-header_file_macros.html#FT_STROKER_H">FT_STROKER_H</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GURMUKHI</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_BUTT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_HEBREW</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_JAPANESE</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_SQUARE</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KANNADA</a></td></tr>
+<tr><td><a href="ft2-gzip.html#FT_Gzip_Uncompress">FT_Gzip_Uncompress</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_BEVEL</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KHMER</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KOREAN</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_FIXED</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_LAOTIAN</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MALAYALAM</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MALDIVIAN</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_BOLD</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MONGOLIAN</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_ITALIC</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ORIYA</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="ft2-system_interface.html#FT_Stream">FT_Stream</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_RSYMBOL</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></td><td><a href="ft2-system_interface.html#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_RUSSIAN</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="ft2-system_interface.html#FT_Stream_IoFunc">FT_Stream_IoFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SIMPLIFIED_CHINESE</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a></td><td><a href="ft2-bzip2.html#FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SINDHI</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td><td><a href="ft2-gzip.html#FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SINHALESE</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a></td><td><a href="ft2-lzw.html#FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SLAVIC</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td><a href="ft2-system_interface.html#FT_StreamDesc">FT_StreamDesc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TAMIL</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td><td><a href="ft2-system_interface.html#FT_StreamRec">FT_StreamRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TELUGU</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td><a href="ft2-basic_types.html#FT_String">FT_String</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_THAI</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TIBETAN</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TRADITIONAL_CHINESE</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_UNINTERP</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_VIETNAMESE</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Done">FT_Stroker_Done</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_MaxProfile">TT_MaxProfile</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int">FT_Int</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_BIG_5</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int16">FT_Int16</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_GB2312</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int32">FT_Int32</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_JOHAB</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int64">FT_Int64</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SJIS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SYMBOL_CS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UCS_4</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_New">FT_Stroker_New</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_WANSUNG</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td><td><a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNFITTED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Set">FT_Stroker_Set</a></td><td><a href="ft2-truetype_tables.html#TT_PCLT">TT_PCLT</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_Kerning_Mode</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_2X2</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a></td></tr>
+<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_DEFAULT</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_CUSTOM</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a></td></tr>
+<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a></td></tr>
+<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LIGHT</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_SCALE</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a></td></tr>
+<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
+<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LcdFilter</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td><td><a href="ft2-truetype_tables.html#TT_Postscript">TT_Postscript</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_LIST_H">FT_LIST_H</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XY_SCALE</a></td><td><a href="ft2-truetype_tables.html#TT_VertHeader">TT_VertHeader</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Library">FT_Library</a></td><td><a href="ft2-base_interface.html#FT_SubGlyph">FT_SubGlyph</a></td><td></td></tr>
+<tr><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td><a href="ft2-header_file_macros.html#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td><td></td></tr>
</table>
<hr>
-<table><tr><td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+<table class="index-toc-link"><tr><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<center><font size=-2>generated on Thu Mar 8 21:09:06 2012</font></center></body>
+<div class="timestamp">generated on Tue Dec 30 21:42:54 2014</div></body>
</html>
diff --git a/docs/reference/ft2-lcd_filtering.html b/docs/reference/ft2-lcd_filtering.html
index 3e88ceb..768fbf0 100644
--- a/docs/reference/ft2-lcd_filtering.html
+++ b/docs/reference/ft2-lcd_filtering.html
@@ -3,190 +3,243 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-LCD Filtering
-</h1></center>
+<h1>LCD Filtering</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_LcdFilter">FT_LcdFilter</a></td><td></td><td><a href="#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td></tr>
-<tr><td></td><td><a href="#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td></td><td></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_LcdFilter">FT_LcdFilter</a></td><td><a href="#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td></tr>
+<tr><td><a href="#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td></td></tr>
+</table>
-<table align=center width="87%"><tr><td>
-<p>The <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> API can be used to specify a low-pass filter which is then applied to LCD-optimized bitmaps generated through <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. This is useful to reduce color fringes which would occur with unfiltered rendering.</p>
-<p>Note that no filter is active by default, and that this function is <b>not</b> implemented in default builds of the library. You need to #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your &lsquo;ftoption.h&rsquo; file in order to activate it.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_LcdFilter">FT_LcdFilter</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>The <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> API can be used to specify a low-pass filter, which is then applied to LCD-optimized bitmaps generated through <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. This is useful to reduce color fringes that would occur with unfiltered rendering.</p>
+<p>Note that no filter is active by default, and that this function is <b>not</b> implemented in default builds of the library. You need to #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your &lsquo;ftoption.h&rsquo; file in order to activate it.</p>
+<p>FreeType generates alpha coverage maps, which are linear by nature. For instance, the value 0x80 in bitmap representation means that (within numerical precision) 0x80/0xFF fraction of that pixel is covered by the glyph's outline. The blending function for placing text over a background is</p>
+<pre class="colored">
+ dst = alpha * src + (1 - alpha) * dst ,
+</pre>
+<p>which is known as OVER. However, when calculating the output of the OVER operator, the source colors should first be transformed to a linear color space, then alpha blended in that space, and transformed back to the output color space.</p>
+<p>When linear light blending is used, the default FIR5 filtering weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as they have been designed for black on white rendering while lacking gamma correction. To preserve color neutrality, weights for a FIR5 filter should be chosen according to two free parameters &lsquo;a&rsquo; and &lsquo;c&rsquo;, and the FIR weights should be</p>
+<pre class="colored">
+ [a - c, a + c, 2 * a, a + c, a - c] .
+</pre>
+<p>This formula generates equal weights for all the color primaries across the filter kernel, which makes it colorless. One suggested set of weights is</p>
+<pre class="colored">
+ [0x10, 0x50, 0x60, 0x50, 0x10] ,
+</pre>
+<p>where &lsquo;a&rsquo; has value 0x30 and &lsquo;b&rsquo; value 0x20. The weights in filter may have a sum larger than 0x100, which increases coloration slightly but also improves contrast.</p>
+
+<div class="section">
+<h3 id="FT_LcdFilter">FT_LcdFilter</h3>
+<p>Defined in FT_LCD_FILTER_H (ftlcdfil.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_LcdFilter_
{
- <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a> = 0,
- <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_DEFAULT</a> = 1,
- <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LIGHT</a> = 2,
- <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY</a> = 16,
+ <a href="ft2-lcd_filtering.html#FT_LCD_FILTER_NONE">FT_LCD_FILTER_NONE</a> = 0,
+ <a href="ft2-lcd_filtering.html#FT_LCD_FILTER_DEFAULT">FT_LCD_FILTER_DEFAULT</a> = 1,
+ <a href="ft2-lcd_filtering.html#FT_LCD_FILTER_LIGHT">FT_LCD_FILTER_LIGHT</a> = 2,
+ <a href="ft2-lcd_filtering.html#FT_LCD_FILTER_LEGACY">FT_LCD_FILTER_LEGACY</a> = 16,
FT_LCD_FILTER_MAX /* do not remove */
} <b>FT_LcdFilter</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A list of values to identify various types of LCD filters.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_LCD_FILTER_NONE</b></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_LCD_FILTER_NONE">FT_LCD_FILTER_NONE</td><td class="desc">
<p>Do not perform filtering. When used with subpixel rendering, this results in sometimes severe color fringes.</p>
</td></tr>
-<tr valign=top><td><b>FT_LCD_FILTER_DEFAULT</b></td><td>
+<tr><td class="val" id="FT_LCD_FILTER_DEFAULT">FT_LCD_FILTER_DEFAULT</td><td class="desc">
<p>The default filter reduces color fringes considerably, at the cost of a slight blurriness in the output.</p>
</td></tr>
-<tr valign=top><td><b>FT_LCD_FILTER_LIGHT</b></td><td>
+<tr><td class="val" id="FT_LCD_FILTER_LIGHT">FT_LCD_FILTER_LIGHT</td><td class="desc">
<p>The light filter is a variant that produces less blurriness at the cost of slightly more color fringes than the default one. It might be better, depending on taste, your monitor, or your personal vision.</p>
</td></tr>
-<tr valign=top><td><b>FT_LCD_FILTER_LEGACY</b></td><td>
+<tr><td class="val" id="FT_LCD_FILTER_LEGACY">FT_LCD_FILTER_LEGACY</td><td class="desc">
<p>This filter corresponds to the original libXft color filter. It provides high contrast output but can exhibit really bad color fringes if glyphs are not extremely well hinted to the pixel grid. In other words, it only works well if the TrueType bytecode interpreter is enabled <b>and</b> high-quality hinted fonts are used.</p>
<p>This filter is only provided for comparison purposes, and might be disabled or stay unsupported in the future.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.0</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</h3>
+<p>Defined in FT_LCD_FILTER_H (ftlcdfil.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Library_SetLcdFilter</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LcdFilter</a> filter );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This function is used to apply color filtering to LCD decimated bitmaps, like the ones used when calling <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a> with <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a> or <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the target library instance.</p>
</td></tr>
-<tr valign=top><td><b>filter</b></td><td>
+<tr><td class="val" id="filter">filter</td><td class="desc">
<p>The filter type.</p>
<p>You can use <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a> here to disable this feature, or <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_DEFAULT</a> to use a default filter that should work well on most LCD screens.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This feature is always disabled by default. Clients must make an explicit call to this function with a &lsquo;filter&rsquo; value other than <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a> in order to enable it.</p>
<p>Due to <b>PATENTS</b> covering subpixel rendering, this function doesn't do anything except returning &lsquo;FT_Err_Unimplemented_Feature&rsquo; if the configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined in your build of the library, which should correspond to all default builds of FreeType.</p>
<p>The filter affects glyph bitmaps rendered through <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>, <a href="ft2-outline_processing.html#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a>, <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>, and <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>.</p>
<p>It does <i>not</i> affect the output of <a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a> and <a href="ft2-outline_processing.html#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a>.</p>
<p>If this feature is activated, the dimensions of LCD glyph bitmaps are either larger or taller than the dimensions of the corresponding outline with regards to the pixel grid. For example, for <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a>, the filter adds up to 3&nbsp;pixels to the left, and up to 3&nbsp;pixels to the right.</p>
<p>The bitmap offset values are adjusted correctly, so clients shouldn't need to modify their layout and glyph positioning code when enabling the filter.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.0</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</h3>
+<p>Defined in FT_LCD_FILTER_H (ftlcdfil.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Library_SetLcdFilterWeights</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">unsigned</span> <span class="keyword">char</span> *weights );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Use this function to override the filter weights selected by <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a>. 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.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the target library instance.</p>
</td></tr>
-<tr valign=top><td><b>weights</b></td><td>
+<tr><td class="val" id="weights">weights</td><td class="desc">
<p>A pointer to an array; the function copies the first five bytes and uses them to specify the filter weights.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Due to <b>PATENTS</b> covering subpixel rendering, this function doesn't do anything except returning &lsquo;FT_Err_Unimplemented_Feature&rsquo; if the configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined in your build of the library, which should correspond to all default builds of FreeType.</p>
<p>This function must be called after <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> to have any effect.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.4.0</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-list_processing.html b/docs/reference/ft2-list_processing.html
index 6b4dc31..2617e50 100644
--- a/docs/reference/ft2-list_processing.html
+++ b/docs/reference/ft2-list_processing.html
@@ -3,135 +3,173 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-List Processing
-</h1></center>
+<h1>List Processing</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_List">FT_List</a></td><td></td><td><a href="#FT_List_Add">FT_List_Add</a></td><td></td><td><a href="#FT_List_Iterate">FT_List_Iterate</a></td></tr>
-<tr><td></td><td><a href="#FT_ListNode">FT_ListNode</a></td><td></td><td><a href="#FT_List_Insert">FT_List_Insert</a></td><td></td><td><a href="#FT_List_Destructor">FT_List_Destructor</a></td></tr>
-<tr><td></td><td><a href="#FT_ListRec">FT_ListRec</a></td><td></td><td><a href="#FT_List_Remove">FT_List_Remove</a></td><td></td><td><a href="#FT_List_Finalize">FT_List_Finalize</a></td></tr>
-<tr><td></td><td><a href="#FT_ListNodeRec">FT_ListNodeRec</a></td><td></td><td><a href="#FT_List_Up">FT_List_Up</a></td><td></td><td></td></tr>
-<tr><td></td><td><a href="#FT_List_Find">FT_List_Find</a></td><td></td><td><a href="#FT_List_Iterator">FT_List_Iterator</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_List">FT_List</a></td><td><a href="#FT_List_Add">FT_List_Add</a></td><td><a href="#FT_List_Iterate">FT_List_Iterate</a></td></tr>
+<tr><td><a href="#FT_ListNode">FT_ListNode</a></td><td><a href="#FT_List_Insert">FT_List_Insert</a></td><td><a href="#FT_List_Iterator">FT_List_Iterator</a></td></tr>
+<tr><td><a href="#FT_ListRec">FT_ListRec</a></td><td><a href="#FT_List_Find">FT_List_Find</a></td><td><a href="#FT_List_Finalize">FT_List_Finalize</a></td></tr>
+<tr><td><a href="#FT_ListNodeRec">FT_ListNodeRec</a></td><td><a href="#FT_List_Remove">FT_List_Remove</a></td><td><a href="#FT_List_Destructor">FT_List_Destructor</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_List_Up">FT_List_Up</a></td><td></td></tr>
+</table>
+
+
<p>This section contains various definitions related to list processing using doubly-linked nodes.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_List">FT_List</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_List">FT_List</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ListRec_* <b>FT_List</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a list record (see <a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a>).</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ListNode">FT_ListNode</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_ListNode">FT_ListNode</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ListNodeRec_* <b>FT_ListNode</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Many elements and objects in FreeType are listed through an <a href="ft2-list_processing.html#FT_List">FT_List</a> record (see <a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a>). As its name suggests, an FT_ListNode is a handle to a single list element.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ListRec">FT_ListRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_ListRec">FT_ListRec</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ListRec_
{
<a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> head;
<a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> tail;
} <b>FT_ListRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to hold a simple doubly-linked list. These are used in many parts of FreeType.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>head</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="head">head</td><td class="desc">
<p>The head (first element) of doubly-linked list.</p>
</td></tr>
-<tr valign=top><td><b>tail</b></td><td>
+<tr><td class="val" id="tail">tail</td><td class="desc">
<p>The tail (last element) of doubly-linked list.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ListNodeRec">FT_ListNodeRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPES_H (freetype/fttypes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_ListNodeRec">FT_ListNodeRec</h3>
+<p>Defined in FT_TYPES_H (fttypes.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ListNodeRec_
{
<a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> prev;
@@ -139,348 +177,270 @@ Defined in FT_TYPES_H (freetype/fttypes.h).
<span class="keyword">void</span>* data;
} <b>FT_ListNodeRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to hold a single list element.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>prev</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="prev">prev</td><td class="desc">
<p>The previous element in the list. NULL if first.</p>
</td></tr>
-<tr valign=top><td><b>next</b></td><td>
+<tr><td class="val" id="next">next</td><td class="desc">
<p>The next element in the list. NULL if last.</p>
</td></tr>
-<tr valign=top><td><b>data</b></td><td>
+<tr><td class="val" id="data">data</td><td class="desc">
<p>A typeless pointer to the listed object.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_List_Find">FT_List_Find</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LIST_H (freetype/ftlist.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- FT_EXPORT( <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> )
- <b>FT_List_Find</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a> list,
- <span class="keyword">void</span>* data );
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Find the list node for a given listed object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>list</b></td><td>
-<p>A pointer to the parent list.</p>
-</td></tr>
-<tr valign=top><td><b>data</b></td><td>
-<p>The address of the listed object.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>List node. NULL if it wasn't found.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_List_Add">FT_List_Add</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LIST_H (freetype/ftlist.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_List_Add">FT_List_Add</h3>
+<p>Defined in FT_LIST_H (ftlist.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_List_Add</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a> list,
<a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> node );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Append an element to the end of a list.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>list</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="list">list</td><td class="desc">
<p>A pointer to the parent list.</p>
</td></tr>
-<tr valign=top><td><b>node</b></td><td>
+<tr><td class="val" id="node">node</td><td class="desc">
<p>The node to append.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_List_Insert">FT_List_Insert</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LIST_H (freetype/ftlist.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_List_Insert">FT_List_Insert</h3>
+<p>Defined in FT_LIST_H (ftlist.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_List_Insert</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a> list,
<a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> node );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Insert an element at the head of a list.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>list</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="list">list</td><td class="desc">
<p>A pointer to parent list.</p>
</td></tr>
-<tr valign=top><td><b>node</b></td><td>
+<tr><td class="val" id="node">node</td><td class="desc">
<p>The node to insert.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_List_Remove">FT_List_Remove</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LIST_H (freetype/ftlist.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_List_Find">FT_List_Find</h3>
+<p>Defined in FT_LIST_H (ftlist.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> )
+ <b>FT_List_Find</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a> list,
+ <span class="keyword">void</span>* data );
+</pre>
+
+<p>Find the list node for a given listed object.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="list">list</td><td class="desc">
+<p>A pointer to the parent list.</p>
+</td></tr>
+<tr><td class="val" id="data">data</td><td class="desc">
+<p>The address of the listed object.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>List node. NULL if it wasn't found.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_List_Remove">FT_List_Remove</h3>
+<p>Defined in FT_LIST_H (ftlist.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_List_Remove</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a> list,
<a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> node );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Remove a node from a list. This function doesn't check whether the node is in the list!</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>node</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="node">node</td><td class="desc">
<p>The node to remove.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>list</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="list">list</td><td class="desc">
<p>A pointer to the parent list.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_List_Up">FT_List_Up</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LIST_H (freetype/ftlist.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_List_Up">FT_List_Up</h3>
+<p>Defined in FT_LIST_H (ftlist.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_List_Up</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a> list,
<a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> node );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Move a node to the head/top of a list. Used to maintain LRU lists.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>list</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="list">list</td><td class="desc">
<p>A pointer to the parent list.</p>
</td></tr>
-<tr valign=top><td><b>node</b></td><td>
+<tr><td class="val" id="node">node</td><td class="desc">
<p>The node to move.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_List_Iterator">FT_List_Iterator</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LIST_H (freetype/ftlist.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
- (*<b>FT_List_Iterator</b>)( <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> node,
- <span class="keyword">void</span>* user );
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An FT_List iterator function which is called during a list parse by <a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>node</b></td><td>
-<p>The current iteration list node.</p>
-</td></tr>
-<tr valign=top><td><b>user</b></td><td>
-<p>A typeless pointer passed to <a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a>. Can be used to point to the iteration's state.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_List_Iterate">FT_List_Iterate</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LIST_H (freetype/ftlist.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_List_Iterate">FT_List_Iterate</h3>
+<p>Defined in FT_LIST_H (ftlist.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_List_Iterate</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a> list,
<a href="ft2-list_processing.html#FT_List_Iterator">FT_List_Iterator</a> iterator,
<span class="keyword">void</span>* user );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Parse a list and calls a given iterator function on each element. Note that parsing is stopped as soon as one of the iterator calls returns a non-zero value.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>list</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="list">list</td><td class="desc">
<p>A handle to the list.</p>
</td></tr>
-<tr valign=top><td><b>iterator</b></td><td>
+<tr><td class="val" id="iterator">iterator</td><td class="desc">
<p>An iterator function, called on each node of the list.</p>
</td></tr>
-<tr valign=top><td><b>user</b></td><td>
-<p>A user-supplied field which is passed as the second argument to the iterator.</p>
+<tr><td class="val" id="user">user</td><td class="desc">
+<p>A user-supplied field that is passed as the second argument to the iterator.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The result (a FreeType error code) of the last iterator call.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_List_Destructor">FT_List_Destructor</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LIST_H (freetype/ftlist.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">void</span>
- (*<b>FT_List_Destructor</b>)( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
- <span class="keyword">void</span>* data,
- <span class="keyword">void</span>* user );
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An <a href="ft2-list_processing.html#FT_List">FT_List</a> iterator function which is called during a list finalization by <a href="ft2-list_processing.html#FT_List_Finalize">FT_List_Finalize</a> to destroy all elements in a given list.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>system</b></td><td>
-<p>The current system object.</p>
-</td></tr>
-<tr valign=top><td><b>data</b></td><td>
-<p>The current object to destroy.</p>
+<div class="section">
+<h3 id="FT_List_Iterator">FT_List_Iterator</h3>
+<p>Defined in FT_LIST_H (ftlist.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
+ (*<b>FT_List_Iterator</b>)( <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> node,
+ <span class="keyword">void</span>* user );
+</pre>
+
+<p>An FT_List iterator function that is called during a list parse by <a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a>.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="node">node</td><td class="desc">
+<p>The current iteration list node.</p>
</td></tr>
-<tr valign=top><td><b>user</b></td><td>
-<p>A typeless pointer passed to <a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a>. It can be used to point to the iteration's state.</p>
+<tr><td class="val" id="user">user</td><td class="desc">
+<p>A typeless pointer passed to <a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a>. Can be used to point to the iteration's state.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_List_Finalize">FT_List_Finalize</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LIST_H (freetype/ftlist.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_List_Finalize">FT_List_Finalize</h3>
+<p>Defined in FT_LIST_H (ftlist.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_List_Finalize</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a> list,
<a href="ft2-list_processing.html#FT_List_Destructor">FT_List_Destructor</a> destroy,
<a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
<span class="keyword">void</span>* user );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Destroy all elements in the list as well as the list itself.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>list</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="list">list</td><td class="desc">
<p>A handle to the list.</p>
</td></tr>
-<tr valign=top><td><b>destroy</b></td><td>
-<p>A list destructor that will be applied to each element of the list.</p>
+<tr><td class="val" id="destroy">destroy</td><td class="desc">
+<p>A list destructor that will be applied to each element of the list. Set this to NULL if not needed.</p>
</td></tr>
-<tr valign=top><td><b>memory</b></td><td>
-<p>The current memory object which handles deallocation.</p>
+<tr><td class="val" id="memory">memory</td><td class="desc">
+<p>The current memory object that handles deallocation.</p>
</td></tr>
-<tr valign=top><td><b>user</b></td><td>
-<p>A user-supplied field which is passed as the last argument to the destructor.</p>
+<tr><td class="val" id="user">user</td><td class="desc">
+<p>A user-supplied field that is passed as the last argument to the destructor.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function expects that all nodes added by <a href="ft2-list_processing.html#FT_List_Add">FT_List_Add</a> or <a href="ft2-list_processing.html#FT_List_Insert">FT_List_Insert</a> have been dynamically allocated.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_List_Destructor">FT_List_Destructor</h3>
+<p>Defined in FT_LIST_H (ftlist.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">void</span>
+ (*<b>FT_List_Destructor</b>)( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
+ <span class="keyword">void</span>* data,
+ <span class="keyword">void</span>* user );
+</pre>
+
+<p>An <a href="ft2-list_processing.html#FT_List">FT_List</a> iterator function that is called during a list finalization by <a href="ft2-list_processing.html#FT_List_Finalize">FT_List_Finalize</a> to destroy all elements in a given list.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="system">system</td><td class="desc">
+<p>The current system object.</p>
+</td></tr>
+<tr><td class="val" id="data">data</td><td class="desc">
+<p>The current object to destroy.</p>
+</td></tr>
+<tr><td class="val" id="user">user</td><td class="desc">
+<p>A typeless pointer passed to <a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a>. It can be used to point to the iteration's state.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-lzw.html b/docs/reference/ft2-lzw.html
index 4300364..5f500e6 100644
--- a/docs/reference/ft2-lzw.html
+++ b/docs/reference/ft2-lzw.html
@@ -3,92 +3,147 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-LZW Streams
-</h1></center>
+<h1>LZW Streams</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></td><td></td><td></td><td></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>This section contains the declaration of LZW-specific functions.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_LZW_H (freetype/ftlzw.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Stream_OpenLZW">FT_Stream_OpenLZW</h3>
+<p>Defined in FT_LZW_H (ftlzw.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Stream_OpenLZW</b>( <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> stream,
<a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> source );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Open a new stream to parse LZW-compressed font files. This is mainly used to support the compressed &lsquo;*.pcf.Z&rsquo; fonts that come with XFree86.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stream</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stream">stream</td><td class="desc">
<p>The target embedding stream.</p>
</td></tr>
-<tr valign=top><td><b>source</b></td><td>
+<tr><td class="val" id="source">source</td><td class="desc">
<p>The source stream.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The source stream must be opened <i>before</i> calling this function.</p>
<p>Calling the internal function &lsquo;FT_Stream_Close&rsquo; on the new stream will <b>not</b> call &lsquo;FT_Stream_Close&rsquo; on the source stream. None of the stream objects will be released to the heap.</p>
<p>The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream</p>
<p>In certain builds of the library, LZW compression recognition is automatically handled when calling <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a LZW stream from it and re-open the face with it.</p>
<p>This function may return &lsquo;FT_Err_Unimplemented_Feature&rsquo; if your build of FreeType was not compiled with LZW support.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-mac_specific.html b/docs/reference/ft2-mac_specific.html
index 2b862ad..ca66af6 100644
--- a/docs/reference/ft2-mac_specific.html
+++ b/docs/reference/ft2-mac_specific.html
@@ -3,366 +3,372 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Mac Specific Interface
-</h1></center>
+<h1>Mac Specific Interface</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td></td><td><a href="#FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></td></tr>
-<tr><td></td><td><a href="#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td></td><td><a href="#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td></tr>
-<tr><td></td><td><a href="#FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></td><td></td><td><a href="#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td><a href="#FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></td></tr>
+<tr><td><a href="#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td><a href="#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td></tr>
+<tr><td><a href="#FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></td><td><a href="#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>The following definitions are only available if FreeType is compiled on a Macintosh.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MAC_H (freetype/ftmac.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_New_Face_From_FOND">FT_New_Face_From_FOND</h3>
+<p>Defined in FT_MAC_H (ftmac.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_New_Face_From_FOND</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
Handle fond,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> face_index,
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface )
FT_DEPRECATED_ATTRIBUTE;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Create a new face object from a FOND resource.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>fond</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="fond">fond</td><td class="desc">
<p>A FOND resource.</p>
</td></tr>
-<tr valign=top><td><b>face_index</b></td><td>
+<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>Only supported for the -1 &lsquo;sanity check&rsquo; special case.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aface</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>notes</b></em></td></tr><tr><td>
+
+<h4>notes</h4>
<p>This function can be used to create <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects from fonts that are installed in the system as follows.</p>
<pre class="colored">
fond = GetResource( 'FOND', fontName );
error = FT_New_Face_From_FOND( library, fond, 0, &amp;face );
</pre>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MAC_H (freetype/ftmac.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</h3>
+<p>Defined in FT_MAC_H (ftmac.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_GetFile_From_Mac_Name</b>( <span class="keyword">const</span> <span class="keyword">char</span>* fontName,
FSSpec* pathSpec,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a>* face_index )
FT_DEPRECATED_ATTRIBUTE;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return an FSSpec for the disk file containing the named font.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>fontName</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="fontName">fontName</td><td class="desc">
<p>Mac OS name of the font (e.g., Times New Roman Bold).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>pathSpec</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="pathSpec">pathSpec</td><td class="desc">
<p>FSSpec to the file. For passing to <a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a>.</p>
</td></tr>
-<tr valign=top><td><b>face_index</b></td><td>
+<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>Index of the face. For passing to <a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MAC_H (freetype/ftmac.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</h3>
+<p>Defined in FT_MAC_H (ftmac.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_GetFile_From_Mac_ATS_Name</b>( <span class="keyword">const</span> <span class="keyword">char</span>* fontName,
FSSpec* pathSpec,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a>* face_index )
FT_DEPRECATED_ATTRIBUTE;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return an FSSpec for the disk file containing the named font.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>fontName</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="fontName">fontName</td><td class="desc">
<p>Mac OS name of the font in ATS framework.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>pathSpec</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="pathSpec">pathSpec</td><td class="desc">
<p>FSSpec to the file. For passing to <a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a>.</p>
</td></tr>
-<tr valign=top><td><b>face_index</b></td><td>
+<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>Index of the face. For passing to <a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MAC_H (freetype/ftmac.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</h3>
+<p>Defined in FT_MAC_H (ftmac.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_GetFilePath_From_Mac_ATS_Name</b>( <span class="keyword">const</span> <span class="keyword">char</span>* fontName,
UInt8* path,
UInt32 maxPathSize,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a>* face_index )
FT_DEPRECATED_ATTRIBUTE;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return a pathname of the disk file and face index for given font name which is handled by ATS framework.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>fontName</b></td><td>
+<p>Return a pathname of the disk file and face index for given font name that is handled by ATS framework.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="fontName">fontName</td><td class="desc">
<p>Mac OS name of the font in ATS framework.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>path</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="path">path</td><td class="desc">
<p>Buffer to store pathname of the file. For passing to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a>. The client must allocate this buffer before calling this function.</p>
</td></tr>
-<tr valign=top><td><b>maxPathSize</b></td><td>
+<tr><td class="val" id="maxPathSize">maxPathSize</td><td class="desc">
<p>Lengths of the buffer &lsquo;path&rsquo; that client allocated.</p>
</td></tr>
-<tr valign=top><td><b>face_index</b></td><td>
+<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>Index of the face. For passing to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MAC_H (freetype/ftmac.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</h3>
+<p>Defined in FT_MAC_H (ftmac.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_New_Face_From_FSSpec</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> FSSpec *spec,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> face_index,
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface )
FT_DEPRECATED_ATTRIBUTE;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Create a new face object from a given resource and typeface index using an FSSpec to the font file.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>spec</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="spec">spec</td><td class="desc">
<p>FSSpec to the font file.</p>
</td></tr>
-<tr valign=top><td><b>face_index</b></td><td>
+<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>The index of the face within the resource. The first face has index&nbsp;0.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aface</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p><a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a> is identical to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> except it accepts an FSSpec instead of a path.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MAC_H (freetype/ftmac.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</h3>
+<p>Defined in FT_MAC_H (ftmac.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_New_Face_From_FSRef</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> FSRef *ref,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> face_index,
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface )
FT_DEPRECATED_ATTRIBUTE;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Create a new face object from a given resource and typeface index using an FSRef to the font file.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>spec</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="spec">spec</td><td class="desc">
<p>FSRef to the font file.</p>
</td></tr>
-<tr valign=top><td><b>face_index</b></td><td>
+<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>The index of the face within the resource. The first face has index&nbsp;0.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aface</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p><a href="ft2-mac_specific.html#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a> is identical to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> except it accepts an FSRef instead of a path.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-module_management.html b/docs/reference/ft2-module_management.html
index da119b6..a836715 100644
--- a/docs/reference/ft2-module_management.html
+++ b/docs/reference/ft2-module_management.html
@@ -3,150 +3,224 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Module Management
-</h1></center>
+<h1>Module Management</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Module_Constructor">FT_Module_Constructor</a></td><td></td><td><a href="#FT_Get_Module">FT_Get_Module</a></td><td></td><td><a href="#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td></tr>
-<tr><td></td><td><a href="#FT_Module_Destructor">FT_Module_Destructor</a></td><td></td><td><a href="#FT_Remove_Module">FT_Remove_Module</a></td><td></td><td><a href="#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td></tr>
-<tr><td></td><td><a href="#FT_Module_Requester">FT_Module_Requester</a></td><td></td><td><a href="#FT_Reference_Library">FT_Reference_Library</a></td><td></td><td><a href="#FT_Renderer_Class">FT_Renderer_Class</a></td></tr>
-<tr><td></td><td><a href="#FT_Module_Class">FT_Module_Class</a></td><td></td><td><a href="#FT_New_Library">FT_New_Library</a></td><td></td><td><a href="#FT_Get_Renderer">FT_Get_Renderer</a></td></tr>
-<tr><td></td><td><a href="#FT_Add_Module">FT_Add_Module</a></td><td></td><td><a href="#FT_Done_Library">FT_Done_Library</a></td><td></td><td><a href="#FT_Set_Renderer">FT_Set_Renderer</a></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
-<p>The definitions below are used to manage modules within FreeType. Modules can be added, upgraded, and removed at runtime.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Module_Constructor">FT_Module_Constructor</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<table class="synopsis">
+<tr><td><a href="#FT_Module">FT_Module</a></td><td><a href="#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="#FT_Renderer">FT_Renderer</a></td></tr>
+<tr><td><a href="#FT_Module_Constructor">FT_Module_Constructor</a></td><td>&nbsp;</td><td><a href="#FT_Renderer_Class">FT_Renderer_Class</a></td></tr>
+<tr><td><a href="#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="#FT_Property_Set">FT_Property_Set</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="#FT_Property_Get">FT_Property_Get</a></td><td><a href="#FT_Get_Renderer">FT_Get_Renderer</a></td></tr>
+<tr><td><a href="#FT_Module_Class">FT_Module_Class</a></td><td>&nbsp;</td><td><a href="#FT_Set_Renderer">FT_Set_Renderer</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_New_Library">FT_New_Library</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Add_Module">FT_Add_Module</a></td><td><a href="#FT_Done_Library">FT_Done_Library</a></td><td><a href="#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td></tr>
+<tr><td><a href="#FT_Get_Module">FT_Get_Module</a></td><td><a href="#FT_Reference_Library">FT_Reference_Library</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Remove_Module">FT_Remove_Module</a></td><td>&nbsp;</td><td><a href="#FT_Driver">FT_Driver</a></td></tr>
+</table>
+
+<p>The definitions below are used to manage modules within FreeType. Modules can be added, upgraded, and removed at runtime. Additionally, some module properties can be controlled also.</p>
+<p>Here is a list of possible values of the &lsquo;module_name&rsquo; field in the <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a> structure.</p>
+<pre class="colored">
+ autofitter
+ bdf
+ cff
+ gxvalid
+ otvalid
+ pcf
+ pfr
+ psaux
+ pshinter
+ psnames
+ raster1, raster5
+ sfnt
+ smooth, smooth-lcd, smooth-lcdv
+ truetype
+ type1
+ type42
+ t1cid
+ winfonts
+</pre>
+<p>Note that the FreeType Cache sub-system is not a FreeType module.</p>
+
+<div class="section">
+<h3 id="FT_Module">FT_Module</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ModuleRec_* <b>FT_Module</b>;
+</pre>
+
+<p>A handle to a given FreeType module object. Each module can be a font driver, a renderer, or anything else that provides services to the formers.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Module_Constructor">FT_Module_Constructor</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
<span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
- (*<b>FT_Module_Constructor</b>)( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module );
+ (*<b>FT_Module_Constructor</b>)( <a href="ft2-module_management.html#FT_Module">FT_Module</a> module );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to initialize (not create) a new module object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>module</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="module">module</td><td class="desc">
<p>The module to initialize.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Module_Destructor">FT_Module_Destructor</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Module_Destructor">FT_Module_Destructor</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">void</span>
- (*<b>FT_Module_Destructor</b>)( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module );
+ (*<b>FT_Module_Destructor</b>)( <a href="ft2-module_management.html#FT_Module">FT_Module</a> module );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to finalize (not destroy) a given module object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>module</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="module">module</td><td class="desc">
<p>The module to finalize.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Module_Requester">FT_Module_Requester</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Module_Requester">FT_Module_Requester</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
<span class="keyword">typedef</span> FT_Module_Interface
- (*<b>FT_Module_Requester</b>)( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module,
+ (*<b>FT_Module_Requester</b>)( <a href="ft2-module_management.html#FT_Module">FT_Module</a> module,
<span class="keyword">const</span> <span class="keyword">char</span>* name );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to query a given module for a specific interface.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>module</b></td><td>
-<p>The module to finalize.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="module">module</td><td class="desc">
+<p>The module to be searched.</p>
</td></tr>
-<tr valign=top><td><b>name</b></td><td>
+<tr><td class="val" id="name">name</td><td class="desc">
<p>The name of the interface in the module.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Module_Class">FT_Module_Class</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Module_Class">FT_Module_Class</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Module_Class_
{
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> module_flags;
@@ -162,364 +236,376 @@ Defined in FT_MODULE_H (freetype/ftmodapi.h).
<a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a> get_interface;
} <b>FT_Module_Class</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>The module class descriptor.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>module_flags</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="module_flags">module_flags</td><td class="desc">
<p>Bit flags describing the module.</p>
</td></tr>
-<tr valign=top><td><b>module_size</b></td><td>
+<tr><td class="val" id="module_size">module_size</td><td class="desc">
<p>The size of one module object/instance in bytes.</p>
</td></tr>
-<tr valign=top><td><b>module_name</b></td><td>
+<tr><td class="val" id="module_name">module_name</td><td class="desc">
<p>The name of the module.</p>
</td></tr>
-<tr valign=top><td><b>module_version</b></td><td>
+<tr><td class="val" id="module_version">module_version</td><td class="desc">
<p>The version, as a 16.16 fixed number (major.minor).</p>
</td></tr>
-<tr valign=top><td><b>module_requires</b></td><td>
+<tr><td class="val" id="module_requires">module_requires</td><td class="desc">
<p>The version of FreeType this module requires, as a 16.16 fixed number (major.minor). Starts at version 2.0, i.e., 0x20000.</p>
</td></tr>
-<tr valign=top><td><b>module_init</b></td><td>
+<tr><td class="val" id="module_init">module_init</td><td class="desc">
<p>The initializing function.</p>
</td></tr>
-<tr valign=top><td><b>module_done</b></td><td>
+<tr><td class="val" id="module_done">module_done</td><td class="desc">
<p>The finalizing function.</p>
</td></tr>
-<tr valign=top><td><b>get_interface</b></td><td>
+<tr><td class="val" id="get_interface">get_interface</td><td class="desc">
<p>The interface requesting function.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Add_Module">FT_Add_Module</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Add_Module">FT_Add_Module</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Add_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a>* clazz );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Add a new module to a given library instance.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>clazz</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="clazz">clazz</td><td class="desc">
<p>A pointer to class descriptor for the module.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>An error will be returned if a module already exists by that name, or if the module requires a version of FreeType that is too great.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Module">FT_Get_Module</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- FT_EXPORT( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> )
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Module">FT_Get_Module</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-module_management.html#FT_Module">FT_Module</a> )
<b>FT_Get_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> <span class="keyword">char</span>* module_name );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Find a module by its name.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object.</p>
</td></tr>
-<tr valign=top><td><b>module_name</b></td><td>
+<tr><td class="val" id="module_name">module_name</td><td class="desc">
<p>The module's name (as an ASCII string).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>A module handle. 0&nbsp;if none was found.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>FreeType's internal modules aren't documented very well, and you should look up the source code for details.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Remove_Module">FT_Remove_Module</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Remove_Module">FT_Remove_Module</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Remove_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
- <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module );
+ <a href="ft2-module_management.html#FT_Module">FT_Module</a> module );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Remove a given module from a library instance.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a library object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>module</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="module">module</td><td class="desc">
<p>A handle to a module object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The module object is destroyed by the function in case of success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Reference_Library">FT_Reference_Library</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Add_Default_Modules">FT_Add_Default_Modules</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
+ FT_EXPORT( <span class="keyword">void</span> )
+ <b>FT_Add_Default_Modules</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
+</pre>
+
+<p>Add the set of default drivers to a given library object. This is only useful when you create a library object with <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> (usually to plug a custom memory manager).</p>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle to a new library object.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Property_Set">FT_Property_Set</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Reference_Library</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
+ <b>FT_Property_Set</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>* module_name,
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>* property_name,
+ <span class="keyword">const</span> <span class="keyword">void</span>* value );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A counter gets initialized to&nbsp;1 at the time an <a href="ft2-base_interface.html#FT_Library">FT_Library</a> structure is created. This function increments the counter. <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a> then only destroys a library if the counter is&nbsp;1, otherwise it simply decrements the counter.</p>
-<p>This function helps in managing life-cycles of structures which reference <a href="ft2-base_interface.html#FT_Library">FT_Library</a> objects.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
-<p>A handle to a target library object.</p>
+<p>Set a property for a given module.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle to the library the module is part of.</p>
+</td></tr>
+<tr><td class="val" id="module_name">module_name</td><td class="desc">
+<p>The module name.</p>
+</td></tr>
+<tr><td class="val" id="property_name">property_name</td><td class="desc">
+<p>The property name. Properties are described in the &lsquo;Synopsis&rsquo; subsection of the module's documentation.</p>
+<p>Note that only a few modules have properties.</p>
+</td></tr>
+<tr><td class="val" id="value">value</td><td class="desc">
+<p>A generic pointer to a variable or structure that gives the new value of the property. The exact definition of &lsquo;value&rsquo; is dependent on the property; see the &lsquo;Synopsis&rsquo; subsection of the module's documentation.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
-<p>2.4.2</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_New_Library">FT_New_Library</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>note</h4>
+<p>If &lsquo;module_name&rsquo; isn't a valid module name, or &lsquo;property_name&rsquo; doesn't specify a valid property, or if &lsquo;value&rsquo; doesn't represent a valid value for the given property, an error is returned.</p>
+<p>The following example sets property &lsquo;bar&rsquo; (a simple integer) in module &lsquo;foo&rsquo; to value&nbsp;1.</p>
+<pre class="colored">
+ FT_UInt bar;
+
+
+ bar = 1;
+ FT_Property_Set( library, "foo", "bar", &amp;bar );
+</pre>
+<p>Note that the FreeType Cache sub-system doesn't recognize module property changes. To avoid glyph lookup confusion within the cache you should call <a href="ft2-cache_subsystem.html#FTC_Manager_Reset">FTC_Manager_Reset</a> to completely flush the cache if a module property gets changed after <a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a> has been called.</p>
+<p>It is not possible to set properties of the FreeType Cache sub-system itself with FT_Property_Set; use ?FTC_Property_Set? instead.</p>
+
+<h4>since</h4>
+<p>2.4.11</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Property_Get">FT_Property_Get</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Property_Get</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>* module_name,
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>* property_name,
+ <span class="keyword">void</span>* value );
+</pre>
+
+<p>Get a module's property value.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle to the library the module is part of.</p>
+</td></tr>
+<tr><td class="val" id="module_name">module_name</td><td class="desc">
+<p>The module name.</p>
+</td></tr>
+<tr><td class="val" id="property_name">property_name</td><td class="desc">
+<p>The property name. Properties are described in the &lsquo;Synopsis&rsquo; subsection of the module's documentation.</p>
+</td></tr>
+</table>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="value">value</td><td class="desc">
+<p>A generic pointer to a variable or structure that gives the value of the property. The exact definition of &lsquo;value&rsquo; is dependent on the property; see the &lsquo;Synopsis&rsquo; subsection of the module's documentation.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>If &lsquo;module_name&rsquo; isn't a valid module name, or &lsquo;property_name&rsquo; doesn't specify a valid property, or if &lsquo;value&rsquo; doesn't represent a valid value for the given property, an error is returned.</p>
+<p>The following example gets property &lsquo;baz&rsquo; (a range) in module &lsquo;foo&rsquo;.</p>
+<pre class="colored">
+ typedef range_
+ {
+ FT_Int32 min;
+ FT_Int32 max;
+
+ } range;
+
+ range baz;
+
+
+ FT_Property_Get( library, "foo", "baz", &amp;baz );
+</pre>
+<p>It is not possible to retrieve properties of the FreeType Cache sub-system with FT_Property_Get; use ?FTC_Property_Get? instead.</p>
+
+<h4>since</h4>
+<p>2.4.11</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_New_Library">FT_New_Library</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_New_Library</b>( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
<a href="ft2-base_interface.html#FT_Library">FT_Library</a> *alibrary );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This function is used to create a new FreeType library instance from a given memory object. It is thus possible to use libraries with distinct memory allocators within the same program.</p>
<p>Normally, you would call this function (followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>) instead of <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a> to initialize the FreeType library.</p>
<p>Don't use <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a> but <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a> to destroy a library instance.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>memory</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A handle to the original memory object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>alibrary</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="alibrary">alibrary</td><td class="desc">
<p>A pointer to handle of a new library object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>See the discussion of reference counters in the description of <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Done_Library">FT_Done_Library</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Done_Library">FT_Done_Library</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Done_Library</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Discard a given library object. This closes all drivers and discards all resource objects.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the target library.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>See the discussion of reference counters in the description of <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <span class="keyword">void</span> )
- <b>FT_Set_Debug_Hook</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
- <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> hook_index,
- FT_DebugHook_Func debug_hook );
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Set a debug hook function for debugging the interpreter of a font format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
-<p>A handle to the library object.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>hook_index</b></td><td>
-<p>The index of the debug hook. You should use the values defined in &lsquo;ftobjs.h&rsquo;, e.g., &lsquo;FT_DEBUG_HOOK_TRUETYPE&rsquo;.</p>
-</td></tr>
-<tr valign=top><td><b>debug_hook</b></td><td>
-<p>The function used to debug the interpreter.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>Currently, four debug hook slots are available, but only two (for the TrueType and the Type&nbsp;1 interpreter) are defined.</p>
-<p>Since the internal headers of FreeType are no longer installed, the symbol &lsquo;FT_DEBUG_HOOK_TRUETYPE&rsquo; isn't available publicly. This is a bug and will be fixed in a forthcoming release.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Add_Default_Modules">FT_Add_Default_Modules</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Reference_Library">FT_Reference_Library</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Reference_Library</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
+</pre>
- FT_EXPORT( <span class="keyword">void</span> )
- <b>FT_Add_Default_Modules</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
+<p>A counter gets initialized to&nbsp;1 at the time an <a href="ft2-base_interface.html#FT_Library">FT_Library</a> structure is created. This function increments the counter. <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a> then only destroys a library if the counter is&nbsp;1, otherwise it simply decrements the counter.</p>
+<p>This function helps in managing life-cycles of structures that reference <a href="ft2-base_interface.html#FT_Library">FT_Library</a> objects.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Add the set of default drivers to a given library object. This is only useful when you create a library object with <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> (usually to plug a custom memory manager).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
-<p>A handle to a new library object.</p>
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle to a target library object.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Renderer_Class">FT_Renderer_Class</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_RENDER_H (freetype/ftrender.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>since</h4>
+<p>2.4.2</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Renderer">FT_Renderer</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RendererRec_* <b>FT_Renderer</b>;
+</pre>
+
+<p>A handle to a given FreeType renderer. A renderer is a special module in charge of converting a glyph image to a bitmap, when necessary. Each renderer supports a given glyph image format, and one or more target surface depths.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Renderer_Class">FT_Renderer_Class</h3>
+<p>Defined in FT_RENDER_H (ftrender.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Renderer_Class_
{
<a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a> root;
@@ -534,134 +620,160 @@ Defined in FT_RENDER_H (freetype/ftrender.h).
<a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a>* raster_class;
} <b>FT_Renderer_Class</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>The renderer module class descriptor.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>root</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="root">root</td><td class="desc">
<p>The root <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a> fields.</p>
</td></tr>
-<tr valign=top><td><b>glyph_format</b></td><td>
+<tr><td class="val" id="glyph_format">glyph_format</td><td class="desc">
<p>The glyph image format this renderer handles.</p>
</td></tr>
-<tr valign=top><td><b>render_glyph</b></td><td>
+<tr><td class="val" id="render_glyph">render_glyph</td><td class="desc">
<p>A method used to render the image that is in a given glyph slot into a bitmap.</p>
</td></tr>
-<tr valign=top><td><b>transform_glyph</b></td><td>
+<tr><td class="val" id="transform_glyph">transform_glyph</td><td class="desc">
<p>A method used to transform the image that is in a given glyph slot.</p>
</td></tr>
-<tr valign=top><td><b>get_glyph_cbox</b></td><td>
+<tr><td class="val" id="get_glyph_cbox">get_glyph_cbox</td><td class="desc">
<p>A method used to access the glyph's cbox.</p>
</td></tr>
-<tr valign=top><td><b>set_mode</b></td><td>
+<tr><td class="val" id="set_mode">set_mode</td><td class="desc">
<p>A method used to pass additional parameters.</p>
</td></tr>
-<tr valign=top><td><b>raster_class</b></td><td>
+<tr><td class="val" id="raster_class">raster_class</td><td class="desc">
<p>For <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a> renderers only. This is a pointer to its raster's class.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Renderer">FT_Get_Renderer</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_RENDER_H (freetype/ftrender.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- FT_EXPORT( <a href="ft2-base_interface.html#FT_Renderer">FT_Renderer</a> )
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Renderer">FT_Get_Renderer</h3>
+<p>Defined in FT_RENDER_H (ftrender.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-module_management.html#FT_Renderer">FT_Renderer</a> )
<b>FT_Get_Renderer</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a> format );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the current renderer for a given glyph format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object.</p>
</td></tr>
-<tr valign=top><td><b>format</b></td><td>
+<tr><td class="val" id="format">format</td><td class="desc">
<p>The glyph format.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>A renderer handle. 0&nbsp;if none found.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>An error will be returned if a module already exists by that name, or if the module requires a version of FreeType that is too great.</p>
<p>To add a new renderer, simply use <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>. To retrieve a renderer by its name, use <a href="ft2-module_management.html#FT_Get_Module">FT_Get_Module</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Set_Renderer">FT_Set_Renderer</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_RENDER_H (freetype/ftrender.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Set_Renderer">FT_Set_Renderer</h3>
+<p>Defined in FT_RENDER_H (ftrender.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Set_Renderer</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
- <a href="ft2-base_interface.html#FT_Renderer">FT_Renderer</a> renderer,
+ <a href="ft2-module_management.html#FT_Renderer">FT_Renderer</a> renderer,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> num_params,
<a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a>* parameters );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Set the current renderer to use, and set additional mode.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>renderer</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="renderer">renderer</td><td class="desc">
<p>A handle to the renderer object.</p>
</td></tr>
-<tr valign=top><td><b>num_params</b></td><td>
+<tr><td class="val" id="num_params">num_params</td><td class="desc">
<p>The number of additional parameters.</p>
</td></tr>
-<tr valign=top><td><b>parameters</b></td><td>
+<tr><td class="val" id="parameters">parameters</td><td class="desc">
<p>Additional parameters.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>In case of success, the renderer will be used to convert glyph images in the renderer's known format into bitmaps.</p>
<p>This doesn't change the current renderer for other formats.</p>
<p>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 &lsquo;ftraster.c&rsquo; and is undefined by default) accepts a single tag &lsquo;pal5&rsquo; to set its gray palette as a character string with 5&nbsp;elements. Consequently, the third and fourth argument are zero normally.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Set_Debug_Hook">FT_Set_Debug_Hook</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
+ FT_EXPORT( <span class="keyword">void</span> )
+ <b>FT_Set_Debug_Hook</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
+ <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> hook_index,
+ FT_DebugHook_Func debug_hook );
+</pre>
+
+<p>Set a debug hook function for debugging the interpreter of a font format.</p>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle to the library object.</p>
+</td></tr>
+</table>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="hook_index">hook_index</td><td class="desc">
+<p>The index of the debug hook. You should use the values defined in &lsquo;ftobjs.h&rsquo;, e.g., &lsquo;FT_DEBUG_HOOK_TRUETYPE&rsquo;.</p>
+</td></tr>
+<tr><td class="val" id="debug_hook">debug_hook</td><td class="desc">
+<p>The function used to debug the interpreter.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>Currently, four debug hook slots are available, but only two (for the TrueType and the Type&nbsp;1 interpreter) are defined.</p>
+<p>Since the internal headers of FreeType are no longer installed, the symbol &lsquo;FT_DEBUG_HOOK_TRUETYPE&rsquo; isn't available publicly. This is a bug and will be fixed in a forthcoming release.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Driver">FT_Driver</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_DriverRec_* <b>FT_Driver</b>;
+</pre>
+
+<p>A handle to a given FreeType font driver object. Each font driver is a special module capable of creating faces from font files.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-multiple_masters.html b/docs/reference/ft2-multiple_masters.html
index 3f3ad2e..ba5115b 100644
--- a/docs/reference/ft2-multiple_masters.html
+++ b/docs/reference/ft2-multiple_masters.html
@@ -3,64 +3,124 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Multiple Masters
-</h1></center>
+<h1>Multiple Masters</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_MM_Axis">FT_MM_Axis</a></td><td></td><td><a href="#FT_Get_MM_Var">FT_Get_MM_Var</a></td></tr>
-<tr><td></td><td><a href="#FT_Multi_Master">FT_Multi_Master</a></td><td></td><td><a href="#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td></tr>
-<tr><td></td><td><a href="#FT_Var_Axis">FT_Var_Axis</a></td><td></td><td><a href="#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td></tr>
-<tr><td></td><td><a href="#FT_Var_Named_Style">FT_Var_Named_Style</a></td><td></td><td><a href="#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td></tr>
-<tr><td></td><td><a href="#FT_MM_Var">FT_MM_Var</a></td><td></td><td><a href="#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td></tr>
-<tr><td></td><td><a href="#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="#FT_Get_MM_Var">FT_Get_MM_Var</a></td></tr>
+<tr><td><a href="#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Var_Axis">FT_Var_Axis</a></td><td><a href="#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Var_Named_Style">FT_Var_Named_Style</a></td><td><a href="#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td></tr>
+<tr><td><a href="#FT_MM_Var">FT_MM_Var</a></td><td><a href="#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td></td></tr>
+</table>
+
+
<p>The following types and functions are used to manage Multiple Master fonts, i.e., the selection of specific design instances by setting design axis coordinates.</p>
<p>George Williams has extended this interface to make it work with both Type&nbsp;1 Multiple Masters fonts and GX distortable (var) fonts. Some of these routines only work with MM fonts, others will work with both types. They are similar enough that a consistent interface makes sense.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_MM_Axis">FT_MM_Axis</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_MM_Axis">FT_MM_Axis</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_MM_Axis_
{
<a href="ft2-basic_types.html#FT_String">FT_String</a>* name;
@@ -68,39 +128,31 @@ Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> maximum;
} <b>FT_MM_Axis</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A simple structure used to model a given axis in design space for Multiple Masters fonts.</p>
<p>This structure can't be used for GX var fonts.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>name</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="name">name</td><td class="desc">
<p>The axis's name.</p>
</td></tr>
-<tr valign=top><td><b>minimum</b></td><td>
+<tr><td class="val" id="minimum">minimum</td><td class="desc">
<p>The axis's minimum design coordinate.</p>
</td></tr>
-<tr valign=top><td><b>maximum</b></td><td>
+<tr><td class="val" id="maximum">maximum</td><td class="desc">
<p>The axis's maximum design coordinate.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Multi_Master">FT_Multi_Master</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Multi_Master">FT_Multi_Master</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Multi_Master_
{
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> num_axis;
@@ -108,39 +160,31 @@ Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
<a href="ft2-multiple_masters.html#FT_MM_Axis">FT_MM_Axis</a> axis[T1_MAX_MM_AXIS];
} <b>FT_Multi_Master</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model the axes and space of a Multiple Masters font.</p>
<p>This structure can't be used for GX var fonts.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>num_axis</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="num_axis">num_axis</td><td class="desc">
<p>Number of axes. Cannot exceed&nbsp;4.</p>
</td></tr>
-<tr valign=top><td><b>num_designs</b></td><td>
+<tr><td class="val" id="num_designs">num_designs</td><td class="desc">
<p>Number of designs; should be normally 2^num_axis even though the Type&nbsp;1 specification strangely allows for intermediate designs to be present. This number cannot exceed&nbsp;16.</p>
</td></tr>
-<tr valign=top><td><b>axis</b></td><td>
+<tr><td class="val" id="axis">axis</td><td class="desc">
<p>A table of axis descriptors.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Var_Axis">FT_Var_Axis</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Var_Axis">FT_Var_Axis</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Var_Axis_
{
<a href="ft2-basic_types.html#FT_String">FT_String</a>* name;
@@ -153,83 +197,67 @@ Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> strid;
} <b>FT_Var_Axis</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A simple structure used to model a given axis in design space for Multiple Masters and GX var fonts.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>name</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="name">name</td><td class="desc">
<p>The axis's name. Not always meaningful for GX.</p>
</td></tr>
-<tr valign=top><td><b>minimum</b></td><td>
+<tr><td class="val" id="minimum">minimum</td><td class="desc">
<p>The axis's minimum design coordinate.</p>
</td></tr>
-<tr valign=top><td><b>def</b></td><td>
+<tr><td class="val" id="def">def</td><td class="desc">
<p>The axis's default design coordinate. FreeType computes meaningful default values for MM; it is then an integer value, not in 16.16 format.</p>
</td></tr>
-<tr valign=top><td><b>maximum</b></td><td>
+<tr><td class="val" id="maximum">maximum</td><td class="desc">
<p>The axis's maximum design coordinate.</p>
</td></tr>
-<tr valign=top><td><b>tag</b></td><td>
+<tr><td class="val" id="tag">tag</td><td class="desc">
<p>The axis's tag (the GX equivalent to &lsquo;name&rsquo;). FreeType provides default values for MM if possible.</p>
</td></tr>
-<tr valign=top><td><b>strid</b></td><td>
+<tr><td class="val" id="strid">strid</td><td class="desc">
<p>The entry in &lsquo;name&rsquo; table (another GX version of &lsquo;name&rsquo;). Not meaningful for MM.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Var_Named_Style">FT_Var_Named_Style</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Var_Named_Style">FT_Var_Named_Style</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Var_Named_Style_
{
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>* coords;
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> strid;
} <b>FT_Var_Named_Style</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A simple structure used to model a named style in a GX var font.</p>
<p>This structure can't be used for MM fonts.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>coords</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="coords">coords</td><td class="desc">
<p>The design coordinates for this style. This is an array with one entry for each axis.</p>
</td></tr>
-<tr valign=top><td><b>strid</b></td><td>
+<tr><td class="val" id="strid">strid</td><td class="desc">
<p>The entry in &lsquo;name&rsquo; table identifying this style.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_MM_Var">FT_MM_Var</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_MM_Var">FT_MM_Var</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_MM_Var_
{
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> num_axis;
@@ -239,273 +267,216 @@ Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
<a href="ft2-multiple_masters.html#FT_Var_Named_Style">FT_Var_Named_Style</a>* namedstyle;
} <b>FT_MM_Var</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model the axes and space of a Multiple Masters or GX var distortable font.</p>
<p>Some fields are specific to one format and not to the other.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>num_axis</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="num_axis">num_axis</td><td class="desc">
<p>The number of axes. The maximum value is&nbsp;4 for MM; no limit in GX.</p>
</td></tr>
-<tr valign=top><td><b>num_designs</b></td><td>
+<tr><td class="val" id="num_designs">num_designs</td><td class="desc">
<p>The number of designs; should be normally 2^num_axis for MM fonts. Not meaningful for GX (where every glyph could have a different number of designs).</p>
</td></tr>
-<tr valign=top><td><b>num_namedstyles</b></td><td>
-<p>The number of named styles; only meaningful for GX which allows certain design coordinates to have a string ID (in the &lsquo;name&rsquo; table) associated with them. The font can tell the user that, for example, Weight=1.5 is &lsquo;Bold&rsquo;.</p>
+<tr><td class="val" id="num_namedstyles">num_namedstyles</td><td class="desc">
+<p>The number of named styles; only meaningful for GX that allows certain design coordinates to have a string ID (in the &lsquo;name&rsquo; table) associated with them. The font can tell the user that, for example, Weight=1.5 is &lsquo;Bold&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>axis</b></td><td>
+<tr><td class="val" id="axis">axis</td><td class="desc">
<p>A table of axis descriptors. GX fonts contain slightly more data than MM.</p>
</td></tr>
-<tr valign=top><td><b>namedstyles</b></td><td>
+<tr><td class="val" id="namedstyles">namedstyles</td><td class="desc">
<p>A table of named styles. Only meaningful with GX.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Multi_Master">FT_Get_Multi_Master</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Multi_Master">FT_Get_Multi_Master</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_Multi_Master</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a> *amaster );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the Multiple Master descriptor of a given font.</p>
<p>This function can't be used with GX fonts.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>amaster</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="amaster">amaster</td><td class="desc">
<p>The Multiple Masters descriptor.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_MM_Var">FT_Get_MM_Var</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_MM_Var">FT_Get_MM_Var</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_MM_Var</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a>* *amaster );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the Multiple Master/GX var descriptor of a given font.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>amaster</b></td><td>
-<p>The Multiple Masters/GX var descriptor. Allocates a data structure, which the user must free (a single call to FT_FREE will do it).</p>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="amaster">amaster</td><td class="desc">
+<p>The Multiple Masters/GX var descriptor. Allocates a data structure, which the user must free.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Set_MM_Design_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> num_coords,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a>* coords );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>For Multiple Masters fonts, choose an interpolated font design through design coordinates.</p>
<p>This function can't be used with GX fonts.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>num_coords</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
<p>The number of design coordinates (must be equal to the number of axes in the font).</p>
</td></tr>
-<tr valign=top><td><b>coords</b></td><td>
+<tr><td class="val" id="coords">coords</td><td class="desc">
<p>An array of design coordinates.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Set_Var_Design_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> num_coords,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>* coords );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>For Multiple Master or GX Var fonts, choose an interpolated font design through design coordinates.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>num_coords</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
<p>The number of design coordinates (must be equal to the number of axes in the font).</p>
</td></tr>
-<tr valign=top><td><b>coords</b></td><td>
+<tr><td class="val" id="coords">coords</td><td class="desc">
<p>An array of design coordinates.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Set_MM_Blend_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> num_coords,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>* coords );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>For Multiple Masters and GX var fonts, choose an interpolated font design through normalized blend coordinates.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>num_coords</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
<p>The number of design coordinates (must be equal to the number of axes in the font).</p>
</td></tr>
-<tr valign=top><td><b>coords</b></td><td>
+<tr><td class="val" id="coords">coords</td><td class="desc">
<p>The design coordinates array (each element must be between 0 and 1.0).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Set_Var_Blend_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> num_coords,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>* coords );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This is another name of <a href="ft2-multiple_masters.html#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-ot_validation.html b/docs/reference/ft2-ot_validation.html
index edc8f76..a4988e1 100644
--- a/docs/reference/ft2-ot_validation.html
+++ b/docs/reference/ft2-ot_validation.html
@@ -3,115 +3,119 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-OpenType Validation
-</h1></center>
+<h1>OpenType Validation</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></td><td></td><td><a href="#FT_OpenType_Validate">FT_OpenType_Validate</a></td><td></td><td><a href="#FT_OpenType_Free">FT_OpenType_Free</a></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_OpenType_Validate">FT_OpenType_Validate</a></td><td>&nbsp;</td><td></td></tr>
+<tr><td><a href="#FT_OpenType_Free">FT_OpenType_Free</a></td><td><a href="#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></td><td></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>This section contains the declaration of functions to validate some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_BASE</a> 0x0100
-#define <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GDEF</a> 0x0200
-#define <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GPOS</a> 0x0400
-#define <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GSUB</a> 0x0800
-#define <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_JSTF</a> 0x1000
-#define <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_MATH</a> 0x2000
-
-#define <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OT</a> <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_BASE</a> | \
- <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GDEF</a> | \
- <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GPOS</a> | \
- <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GSUB</a> | \
- <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_JSTF</a> | \
- <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_MATH</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of bit-field constants used with <a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a> to indicate which OpenType tables should be validated.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_VALIDATE_BASE</b></td><td>
-<p>Validate BASE table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_GDEF</b></td><td>
-<p>Validate GDEF table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_GPOS</b></td><td>
-<p>Validate GPOS table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_GSUB</b></td><td>
-<p>Validate GSUB table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_JSTF</b></td><td>
-<p>Validate JSTF table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_MATH</b></td><td>
-<p>Validate MATH table.</p>
-</td></tr>
-<tr valign=top><td><b>FT_VALIDATE_OT</b></td><td>
-<p>Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_OpenType_Validate">FT_OpenType_Validate</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_OpenType_Validate">FT_OpenType_Validate</h3>
+<p>Defined in FT_OPENTYPE_VALIDATE_H (ftotval.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_OpenType_Validate</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> validation_flags,
@@ -120,89 +124,124 @@ Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).
<a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a> *GPOS_table,
<a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a> *GSUB_table,
<a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a> *JSTF_table );
+</pre>
+
+<p>Validate various OpenType tables to assure that all offsets and indices are valid. The idea is that a higher-level library that actually does the text layout can access those tables without error checking (which can be quite time consuming).</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Validate various OpenType tables to assure that all offsets and indices are valid. The idea is that a higher-level library which actually does the text layout can access those tables without error checking (which can be quite time consuming).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
-<tr valign=top><td><b>validation_flags</b></td><td>
-<p>A bit field which specifies the tables to be validated. See <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a> for possible values.</p>
+<tr><td class="val" id="validation_flags">validation_flags</td><td class="desc">
+<p>A bit field that specifies the tables to be validated. See <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a> for possible values.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>BASE_table</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="BASE_table">BASE_table</td><td class="desc">
<p>A pointer to the BASE table.</p>
</td></tr>
-<tr valign=top><td><b>GDEF_table</b></td><td>
+<tr><td class="val" id="GDEF_table">GDEF_table</td><td class="desc">
<p>A pointer to the GDEF table.</p>
</td></tr>
-<tr valign=top><td><b>GPOS_table</b></td><td>
+<tr><td class="val" id="GPOS_table">GPOS_table</td><td class="desc">
<p>A pointer to the GPOS table.</p>
</td></tr>
-<tr valign=top><td><b>GSUB_table</b></td><td>
+<tr><td class="val" id="GSUB_table">GSUB_table</td><td class="desc">
<p>A pointer to the GSUB table.</p>
</td></tr>
-<tr valign=top><td><b>JSTF_table</b></td><td>
+<tr><td class="val" id="JSTF_table">JSTF_table</td><td class="desc">
<p>A pointer to the JSTF table.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function only works with OpenType fonts, returning an error otherwise.</p>
<p>After use, the application should deallocate the five tables with <a href="ft2-ot_validation.html#FT_OpenType_Free">FT_OpenType_Free</a>. A NULL value indicates that the table either doesn't exist in the font, or the application hasn't asked for validation.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_OpenType_Free">FT_OpenType_Free</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_OpenType_Free">FT_OpenType_Free</h3>
+<p>Defined in FT_OPENTYPE_VALIDATE_H (ftotval.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_OpenType_Free</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a> table );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Free the buffer allocated by OpenType validator.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
-<tr valign=top><td><b>table</b></td><td>
+<tr><td class="val" id="table">table</td><td class="desc">
<p>The pointer to the buffer that is allocated by <a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function must be used to free the buffer allocated by <a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a> only.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</h3>
+<p>Defined in FT_OPENTYPE_VALIDATE_H (ftotval.h).</p>
+<pre>
+#define <a href="ft2-ot_validation.html#FT_VALIDATE_BASE">FT_VALIDATE_BASE</a> 0x0100
+#define <a href="ft2-ot_validation.html#FT_VALIDATE_GDEF">FT_VALIDATE_GDEF</a> 0x0200
+#define <a href="ft2-ot_validation.html#FT_VALIDATE_GPOS">FT_VALIDATE_GPOS</a> 0x0400
+#define <a href="ft2-ot_validation.html#FT_VALIDATE_GSUB">FT_VALIDATE_GSUB</a> 0x0800
+#define <a href="ft2-ot_validation.html#FT_VALIDATE_JSTF">FT_VALIDATE_JSTF</a> 0x1000
+#define <a href="ft2-ot_validation.html#FT_VALIDATE_MATH">FT_VALIDATE_MATH</a> 0x2000
+
+#define <a href="ft2-ot_validation.html#FT_VALIDATE_OT">FT_VALIDATE_OT</a> <a href="ft2-ot_validation.html#FT_VALIDATE_BASE">FT_VALIDATE_BASE</a> | \
+ <a href="ft2-ot_validation.html#FT_VALIDATE_GDEF">FT_VALIDATE_GDEF</a> | \
+ <a href="ft2-ot_validation.html#FT_VALIDATE_GPOS">FT_VALIDATE_GPOS</a> | \
+ <a href="ft2-ot_validation.html#FT_VALIDATE_GSUB">FT_VALIDATE_GSUB</a> | \
+ <a href="ft2-ot_validation.html#FT_VALIDATE_JSTF">FT_VALIDATE_JSTF</a> | \
+ <a href="ft2-ot_validation.html#FT_VALIDATE_MATH">FT_VALIDATE_MATH</a>
+</pre>
+
+<p>A list of bit-field constants used with <a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a> to indicate which OpenType tables should be validated.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_VALIDATE_BASE">FT_VALIDATE_BASE</td><td class="desc">
+<p>Validate BASE table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_GDEF">FT_VALIDATE_GDEF</td><td class="desc">
+<p>Validate GDEF table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_GPOS">FT_VALIDATE_GPOS</td><td class="desc">
+<p>Validate GPOS table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_GSUB">FT_VALIDATE_GSUB</td><td class="desc">
+<p>Validate GSUB table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_JSTF">FT_VALIDATE_JSTF</td><td class="desc">
+<p>Validate JSTF table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_MATH">FT_VALIDATE_MATH</td><td class="desc">
+<p>Validate MATH table.</p>
+</td></tr>
+<tr><td class="val" id="FT_VALIDATE_OT">FT_VALIDATE_OT</td><td class="desc">
+<p>Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-outline_processing.html b/docs/reference/ft2-outline_processing.html
index a36f136..323efc9 100644
--- a/docs/reference/ft2-outline_processing.html
+++ b/docs/reference/ft2-outline_processing.html
@@ -3,69 +3,131 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Outline Processing
-</h1></center>
+<h1>Outline Processing</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Outline">FT_Outline</a></td><td></td><td><a href="#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td></tr>
-<tr><td></td><td><a href="#FT_OUTLINE_FLAGS">FT_OUTLINE_FLAGS</a></td><td></td><td><a href="#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_New">FT_Outline_New</a></td><td></td><td><a href="#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_Done">FT_Outline_Done</a></td><td></td><td><a href="#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_Copy">FT_Outline_Copy</a></td><td></td><td><a href="#FT_Outline_Funcs">FT_Outline_Funcs</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_Translate">FT_Outline_Translate</a></td><td></td><td><a href="#FT_Outline_Decompose">FT_Outline_Decompose</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_Transform">FT_Outline_Transform</a></td><td></td><td><a href="#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td></td><td><a href="#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td></td><td><a href="#FT_Outline_Render">FT_Outline_Render</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_Check">FT_Outline_Check</a></td><td></td><td><a href="#FT_Orientation">FT_Orientation</a></td></tr>
-<tr><td></td><td><a href="#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td></td><td><a href="#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td></tr>
-<tr><td></td><td><a href="#ft_outline_flags">ft_outline_flags</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_Outline">FT_Outline</a></td><td><a href="#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td></tr>
+<tr><td><a href="#FT_Outline_New">FT_Outline_New</a></td><td><a href="#FT_Outline_Render">FT_Outline_Render</a></td></tr>
+<tr><td><a href="#FT_Outline_Done">FT_Outline_Done</a></td><td><a href="#FT_Outline_Decompose">FT_Outline_Decompose</a></td></tr>
+<tr><td><a href="#FT_Outline_Copy">FT_Outline_Copy</a></td><td><a href="#FT_Outline_Funcs">FT_Outline_Funcs</a></td></tr>
+<tr><td><a href="#FT_Outline_Translate">FT_Outline_Translate</a></td><td><a href="#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td></tr>
+<tr><td><a href="#FT_Outline_Transform">FT_Outline_Transform</a></td><td><a href="#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td></tr>
+<tr><td><a href="#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td><a href="#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td></tr>
+<tr><td><a href="#FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</a></td><td><a href="#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td></tr>
+<tr><td><a href="#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Outline_Check">FT_Outline_Check</a></td><td><a href="#FT_Orientation">FT_Orientation</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td></tr>
+<tr><td><a href="#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td><a href="#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td></td></tr>
+</table>
+
+
<p>This section contains routines used to create and destroy scalable glyph images known as &lsquo;outlines&rsquo;. These can also be measured, transformed, and converted into bitmaps and pixmaps.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline">FT_Outline</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Outline">FT_Outline</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_
{
<span class="keyword">short</span> n_contours; /* number of contours in glyph */
@@ -78,130 +140,46 @@ Defined in FT_IMAGE_H (freetype/ftimage.h).
<span class="keyword">int</span> flags; /* outline masks */
} <b>FT_Outline</b>;
+</pre>
- /* Following limits must be consistent with */
- /* <b>FT_Outline</b>.{n_contours,n_points} */
-#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
-#define FT_OUTLINE_POINTS_MAX SHRT_MAX
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This structure is used to describe an outline to the scan-line converter.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>n_contours</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="n_contours">n_contours</td><td class="desc">
<p>The number of contours in the outline.</p>
</td></tr>
-<tr valign=top><td><b>n_points</b></td><td>
+<tr><td class="val" id="n_points">n_points</td><td class="desc">
<p>The number of points in the outline.</p>
</td></tr>
-<tr valign=top><td><b>points</b></td><td>
+<tr><td class="val" id="points">points</td><td class="desc">
<p>A pointer to an array of &lsquo;n_points&rsquo; <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a> elements, giving the outline's point coordinates.</p>
</td></tr>
-<tr valign=top><td><b>tags</b></td><td>
+<tr><td class="val" id="tags">tags</td><td class="desc">
<p>A pointer to an array of &lsquo;n_points&rsquo; chars, giving each outline point's type.</p>
<p>If bit&nbsp;0 is unset, the point is &lsquo;off&rsquo; the curve, i.e., a Bézier control point, while it is &lsquo;on&rsquo; if set.</p>
<p>Bit&nbsp;1 is meaningful for &lsquo;off&rsquo; points only. If set, it indicates a third-order Bézier arc control point; and a second-order control point if unset.</p>
<p>If bit&nbsp;2 is set, bits 5-7 contain the drop-out mode (as defined in the OpenType specification; the value is the same as the argument to the SCANMODE instruction).</p>
<p>Bits 3 and&nbsp;4 are reserved for internal purposes.</p>
</td></tr>
-<tr valign=top><td><b>contours</b></td><td>
+<tr><td class="val" id="contours">contours</td><td class="desc">
<p>An array of &lsquo;n_contours&rsquo; shorts, giving the end point of each contour within the outline. For example, the first contour is defined by the points &lsquo;0&rsquo; to &lsquo;contours[0]&rsquo;, the second one is defined by the points &lsquo;contours[0]+1&rsquo; to &lsquo;contours[1]&rsquo;, etc.</p>
</td></tr>
-<tr valign=top><td><b>flags</b></td><td>
-<p>A set of bit flags used to characterize the outline and give hints to the scan-converter and hinter on how to convert/grid-fit it. See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_FLAGS</a>.</p>
+<tr><td class="val" id="flags">flags</td><td class="desc">
+<p>A set of bit flags used to characterize the outline and give hints to the scan-converter and hinter on how to convert/grid-fit it. See <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The B/W rasterizer only checks bit&nbsp;2 in the &lsquo;tags&rsquo; array for the first point of each contour. The drop-out mode as given with <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a>, <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SMART_DROPOUTS</a>, and <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_INCLUDE_STUBS</a> in &lsquo;flags&rsquo; is then overridden.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_OUTLINE_FLAGS">FT_OUTLINE_FLAGS</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_NONE</a> 0x0
-#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_OWNER</a> 0x1
-#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_EVEN_ODD_FILL</a> 0x2
-#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_REVERSE_FILL</a> 0x4
-#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a> 0x8
-#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SMART_DROPOUTS</a> 0x10
-#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_INCLUDE_STUBS</a> 0x20
-
-#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_HIGH_PRECISION</a> 0x100
-#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SINGLE_PASS</a> 0x200
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of bit-field constants use for the flags in an outline's &lsquo;flags&rsquo; field.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_OUTLINE_NONE</b></td><td>
-<p>Value&nbsp;0 is reserved.</p>
-</td></tr>
-<tr valign=top><td><b>FT_OUTLINE_OWNER</b></td><td>
-<p>If set, this flag indicates that the outline's field arrays (i.e., &lsquo;points&rsquo;, &lsquo;flags&rsquo;, and &lsquo;contours&rsquo;) are &lsquo;owned&rsquo; by the outline object, and should thus be freed when it is destroyed.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_OUTLINE_EVEN_ODD_FILL</b></td></tr>
-<tr valign=top><td></td><td>
-<p>By default, outlines are filled using the non-zero winding rule. If set to 1, the outline will be filled using the even-odd fill rule (only works with the smooth rasterizer).</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_OUTLINE_REVERSE_FILL</b></td></tr>
-<tr valign=top><td></td><td>
-<p>By default, outside contours of an outline are oriented in clock-wise direction, as defined in the TrueType specification. This flag is set if the outline uses the opposite direction (typically for Type&nbsp;1 fonts). This flag is ignored by the scan converter.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_OUTLINE_IGNORE_DROPOUTS</b></td></tr>
-<tr valign=top><td></td><td>
-<p>By default, the scan converter will try to detect drop-outs in an outline and correct the glyph bitmap to ensure consistent shape continuity. If set, this flag hints the scan-line converter to ignore such cases. See below for more information.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_OUTLINE_SMART_DROPOUTS</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Select smart dropout control. If unset, use simple dropout control. Ignored if <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a> is set. See below for more information.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_OUTLINE_INCLUDE_STUBS</b></td></tr>
-<tr valign=top><td></td><td>
-<p>If set, turn pixels on for &lsquo;stubs&rsquo;, otherwise exclude them. Ignored if <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a> is set. See below for more information.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>FT_OUTLINE_HIGH_PRECISION</b></td></tr>
-<tr valign=top><td></td><td>
-<p>This flag indicates that the scan-line converter should try to convert this outline to bitmaps with the highest possible quality. It is typically set for small character sizes. Note that this is only a hint that might be completely ignored by a given scan-converter.</p>
-</td></tr>
-<tr valign=top><td><b>FT_OUTLINE_SINGLE_PASS</b></td><td>
-<p>This flag is set to force a given scan-converter to only use a single pass over the outline to render a bitmap glyph image. Normally, it is set for very large character sizes. It is only a hint that might be completely ignored by a given scan-converter.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The flags <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a>, <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SMART_DROPOUTS</a>, and <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_INCLUDE_STUBS</a> are ignored by the smooth rasterizer.</p>
-<p>There exists a second mechanism to pass the drop-out mode to the B/W rasterizer; see the &lsquo;tags&rsquo; field in <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>.</p>
-<p>Please refer to the description of the &lsquo;SCANTYPE&rsquo; instruction in the OpenType specification (in file &lsquo;ttinst1.doc&rsquo;) how simple drop-outs, smart drop-outs, and stubs are defined.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_New">FT_Outline_New</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>note</h4>
+<p>The B/W rasterizer only checks bit&nbsp;2 in the &lsquo;tags&rsquo; array for the first point of each contour. The drop-out mode as given with <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a>, <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a>, and <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a> in &lsquo;flags&rsquo; is then overridden.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_New">FT_Outline_New</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_New</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> numPoints,
@@ -214,52 +192,43 @@ Defined in FT_OUTLINE_H (freetype/ftoutln.h).
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> numPoints,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> numContours,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> *anoutline );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Create a new outline of a given size.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object from where the outline is allocated. Note however that the new outline will <b>not</b> necessarily be <b>freed</b>, when destroying the library, by <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a>.</p>
</td></tr>
-<tr valign=top><td><b>numPoints</b></td><td>
-<p>The maximal number of points within the outline.</p>
+<tr><td class="val" id="numPoints">numPoints</td><td class="desc">
+<p>The maximum number of points within the outline. Must be smaller than or equal to 0xFFFF (65535).</p>
</td></tr>
-<tr valign=top><td><b>numContours</b></td><td>
-<p>The maximal number of contours within the outline.</p>
+<tr><td class="val" id="numContours">numContours</td><td class="desc">
+<p>The maximum number of contours within the outline. This value must be in the range 0 to &lsquo;numPoints&rsquo;.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>anoutline</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="anoutline">anoutline</td><td class="desc">
<p>A handle to the new outline.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The reason why this function takes a &lsquo;library&rsquo; parameter is simply to use the library's memory allocator.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Done">FT_Outline_Done</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Done">FT_Outline_Done</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Done</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
@@ -268,192 +237,154 @@ Defined in FT_OUTLINE_H (freetype/ftoutln.h).
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
FT_Outline_Done_Internal( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Destroy an outline created with <a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle of the library object used to allocate the outline.</p>
</td></tr>
-<tr valign=top><td><b>outline</b></td><td>
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the outline object to be discarded.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If the outline's &lsquo;owner&rsquo; field is not set, only the outline descriptor will be released.</p>
<p>The reason why this function takes an &lsquo;library&rsquo; parameter is simply to use ft_mem_free().</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Copy">FT_Outline_Copy</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Copy">FT_Outline_Copy</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Copy</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* source,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> *target );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Copy an outline into another one. Both objects must have the same sizes (number of points &amp; number of contours) when this function is called.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>source</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="source">source</td><td class="desc">
<p>A handle to the source outline.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>target</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="target">target</td><td class="desc">
<p>A handle to the target outline.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Translate">FT_Outline_Translate</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Translate">FT_Outline_Translate</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Outline_Translate</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> xOffset,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> yOffset );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Apply a simple translation to the points of an outline.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the target outline descriptor.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>xOffset</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="xOffset">xOffset</td><td class="desc">
<p>The horizontal offset.</p>
</td></tr>
-<tr valign=top><td><b>yOffset</b></td><td>
+<tr><td class="val" id="yOffset">yOffset</td><td class="desc">
<p>The vertical offset.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Transform">FT_Outline_Transform</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Transform">FT_Outline_Transform</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Outline_Transform</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>* matrix );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Apply a simple 2x2 matrix to all of an outline's points. Useful for applying rotations, slanting, flipping, etc.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the target outline descriptor.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>matrix</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="matrix">matrix</td><td class="desc">
<p>A pointer to the transformation matrix.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>You can use <a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a> if you need to translate the outline's points.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Embolden">FT_Outline_Embolden</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Embolden">FT_Outline_Embolden</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Embolden</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> strength );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Embolden an outline. The new outline will be at most 4&nbsp;times &lsquo;strength&rsquo; pixels wider and higher. You may think of the left and bottom borders as unchanged.</p>
<p>Negative &lsquo;strength&rsquo; values to reduce the outline thickness are possible also.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A handle to the target outline.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>strength</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="strength">strength</td><td class="desc">
<p>How strong the glyph is emboldened. Expressed in 26.6 pixel format.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The used algorithm to increase or decrease the thickness of the glyph doesn't change the number of points; this means that certain situations like acute angles or intersections are sometimes handled incorrectly.</p>
<p>If you need &lsquo;better&rsquo; metrics values you should call <a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a> or <a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a>.</p>
<p>Example call:</p>
@@ -462,345 +393,261 @@ Defined in FT_OUTLINE_H (freetype/ftoutln.h).
if ( face-&gt;slot-&gt;format == FT_GLYPH_FORMAT_OUTLINE )
FT_Outline_Embolden( &amp;face-&gt;slot-&gt;outline, strength );
</pre>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Reverse">FT_Outline_Reverse</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>To get meaningful results, font scaling values must be set with functions like <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> before calling FT_Render_Glyph.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Outline_EmboldenXY</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> xstrength,
+ <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> ystrength );
+</pre>
+
+<p>Embolden an outline. The new outline will be &lsquo;xstrength&rsquo; pixels wider and &lsquo;ystrength&rsquo; pixels higher. Otherwise, it is similar to <a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a>, which uses the same strength in both directions.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Reverse">FT_Outline_Reverse</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Outline_Reverse</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Reverse the drawing direction of an outline. This is used to ensure consistent fill conventions for mirrored glyphs.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the target outline descriptor.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>This function toggles the bit flag <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_REVERSE_FILL</a> in the outline's &lsquo;flags&rsquo; field.</p>
+
+<h4>note</h4>
+<p>This function toggles the bit flag <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_REVERSE_FILL</a> in the outline's &lsquo;flags&rsquo; field.</p>
<p>It shouldn't be used by a normal client application, unless it knows what it is doing.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Check">FT_Outline_Check</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Check">FT_Outline_Check</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Check</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Check the contents of an outline descriptor.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A handle to a source outline.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_BBOX_H (freetype/ftbbox.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Get_CBox">FT_Outline_Get_CBox</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
+ FT_EXPORT( <span class="keyword">void</span> )
+ <b>FT_Outline_Get_CBox</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
+ <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *acbox );
+</pre>
+
+<p>Return an outline's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bézier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bézier outside arcs).</p>
+<p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component, which is dedicated to this single task.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
+<p>A pointer to the source outline descriptor.</p>
+</td></tr>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="acbox">acbox</td><td class="desc">
+<p>The outline's control box.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>See <a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a> for a discussion of tricky fonts.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Get_BBox">FT_Outline_Get_BBox</h3>
+<p>Defined in FT_BBOX_H (ftbbox.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Get_BBox</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *abbox );
+</pre>
+
+<p>Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm that returns <i>very</i> quickly when the two boxes coincide. Otherwise, the outline Bézier arcs are traversed to extract their extrema.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm which returns <i>very</i> quickly when the two boxes coincide. Otherwise, the outline Bézier arcs are traversed to extract their extrema.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source outline.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>abbox</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="abbox">abbox</td><td class="desc">
<p>The outline's exact bounding box.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>If the font is tricky and the glyph has been loaded with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>, 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.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="ft_outline_flags">ft_outline_flags</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_none</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_NONE</a>
-#define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_owner</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_OWNER</a>
-#define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_even_odd_fill</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_EVEN_ODD_FILL</a>
-#define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_reverse_fill</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_REVERSE_FILL</a>
-#define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_ignore_dropouts</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a>
-#define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_high_precision</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_HIGH_PRECISION</a>
-#define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_single_pass</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SINGLE_PASS</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>These constants are deprecated. Please use the corresponding <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_FLAGS</a> values.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>ft_outline_none</b></td><td>
-<p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_NONE</a>.</p>
-</td></tr>
-<tr valign=top><td><b>ft_outline_owner</b></td><td>
-<p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_OWNER</a>.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>ft_outline_even_odd_fill</b></td></tr>
-<tr valign=top><td></td><td>
-<p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_EVEN_ODD_FILL</a>.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>ft_outline_reverse_fill</b></td></tr>
-<tr valign=top><td></td><td>
-<p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_REVERSE_FILL</a>.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>ft_outline_ignore_dropouts</b></td></tr>
-<tr valign=top><td></td><td>
-<p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a>.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>ft_outline_high_precision</b></td></tr>
-<tr valign=top><td></td><td>
-<p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_HIGH_PRECISION</a>.</p>
-</td></tr>
-<tr valign=top><td><b>ft_outline_single_pass</b></td><td>
-<p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SINGLE_PASS</a>.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">int</span>
- (*<b>FT_Outline_MoveToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
- <span class="keyword">void</span>* user );
+<h4>note</h4>
+<p>If the font is tricky and the glyph has been loaded with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>, 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.</p>
-#define FT_Outline_MoveTo_Func <b>FT_Outline_MoveToFunc</b>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A function pointer type used to describe the signature of a &lsquo;move to&rsquo; function during outline walking/decomposition.</p>
-<p>A &lsquo;move to&rsquo; is emitted to start a new contour in an outline.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>to</b></td><td>
-<p>A pointer to the target point of the &lsquo;move to&rsquo;.</p>
+<div class="section">
+<h3 id="FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Outline_Get_Bitmap</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
+ <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *abitmap );
+</pre>
+
+<p>Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle to a FreeType library object.</p>
</td></tr>
-<tr valign=top><td><b>user</b></td><td>
-<p>A typeless pointer which is passed from the caller of the decomposition function.</p>
+<tr><td class="val" id="outline">outline</td><td class="desc">
+<p>A pointer to the source outline descriptor.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>Error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">int</span>
- (*<b>FT_Outline_LineToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
- <span class="keyword">void</span>* user );
-
-#define FT_Outline_LineTo_Func <b>FT_Outline_LineToFunc</b>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A function pointer type used to describe the signature of a &lsquo;line to&rsquo; function during outline walking/decomposition.</p>
-<p>A &lsquo;line to&rsquo; is emitted to indicate a segment in the outline.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>to</b></td><td>
-<p>A pointer to the target point of the &lsquo;line to&rsquo;.</p>
-</td></tr>
-<tr valign=top><td><b>user</b></td><td>
-<p>A typeless pointer which is passed from the caller of the decomposition function.</p>
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="abitmap">abitmap</td><td class="desc">
+<p>A pointer to the target bitmap descriptor.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>Error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">int</span>
- (*<b>FT_Outline_ConicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control,
- <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
- <span class="keyword">void</span>* user );
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
-#define FT_Outline_ConicTo_Func <b>FT_Outline_ConicToFunc</b>
+<h4>note</h4>
+<p>This function does NOT CREATE the bitmap, it only renders an outline image within the one you pass to it! Consequently, the various fields in &lsquo;abitmap&rsquo; should be set accordingly.</p>
+<p>It will use the raster corresponding to the default glyph format.</p>
+<p>The value of the &lsquo;num_grays&rsquo; field in &lsquo;abitmap&rsquo; is ignored. If you select the gray-level rasterizer, and you want less than 256 gray levels, you have to use <a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a> directly.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A function pointer type used to describe the signature of a &lsquo;conic to&rsquo; function during outline walking or decomposition.</p>
-<p>A &lsquo;conic to&rsquo; is emitted to indicate a second-order Bézier arc in the outline.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>control</b></td><td>
-<p>An intermediate control point between the last position and the new target in &lsquo;to&rsquo;.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Render">FT_Outline_Render</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Outline_Render</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
+ <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
+ <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a>* params );
+</pre>
+
+<p>Render an outline within a bitmap using the current scan-convert. This function uses an <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure as an argument, allowing advanced features like direct composition, translucency, etc.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle to a FreeType library object.</p>
</td></tr>
-<tr valign=top><td><b>to</b></td><td>
-<p>A pointer to the target end point of the conic arc.</p>
+<tr><td class="val" id="outline">outline</td><td class="desc">
+<p>A pointer to the source outline descriptor.</p>
</td></tr>
-<tr valign=top><td><b>user</b></td><td>
-<p>A typeless pointer which is passed from the caller of the decomposition function.</p>
+</table>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="params">params</td><td class="desc">
+<p>A pointer to an <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure used to describe the rendering operation.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>Error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">int</span>
- (*<b>FT_Outline_CubicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control1,
- <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control2,
- <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
- <span class="keyword">void</span>* user );
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
-#define FT_Outline_CubicTo_Func <b>FT_Outline_CubicToFunc</b>
+<h4>note</h4>
+<p>You should know what you are doing and how <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> works to use this function.</p>
+<p>The field &lsquo;params.source&rsquo; will be set to &lsquo;outline&rsquo; before the scan converter is called, which means that the value you give to it is actually ignored.</p>
+<p>The gray-level rasterizer always uses 256 gray levels. If you want less gray levels, you have to provide your own span callback. See the <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a> value of the &lsquo;flags&rsquo; field in the <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure for more details.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A function pointer type used to describe the signature of a &lsquo;cubic to&rsquo; function during outline walking or decomposition.</p>
-<p>A &lsquo;cubic to&rsquo; is emitted to indicate a third-order Bézier arc.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>control1</b></td><td>
-<p>A pointer to the first Bézier control point.</p>
-</td></tr>
-<tr valign=top><td><b>control2</b></td><td>
-<p>A pointer to the second Bézier control point.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Decompose">FT_Outline_Decompose</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
+ FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+ <b>FT_Outline_Decompose</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
+ <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a>* func_interface,
+ <span class="keyword">void</span>* user );
+</pre>
+
+<p>Walk over an outline's structure to decompose it into individual segments and Bézier arcs. This function also emits &lsquo;move to&rsquo; operations to indicate the start of new contours in the outline.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
+<p>A pointer to the source target.</p>
</td></tr>
-<tr valign=top><td><b>to</b></td><td>
-<p>A pointer to the target end point.</p>
+<tr><td class="val" id="func_interface">func_interface</td><td class="desc">
+<p>A table of &lsquo;emitters&rsquo;, i.e., function pointers called during decomposition to indicate path operations.</p>
</td></tr>
-<tr valign=top><td><b>user</b></td><td>
-<p>A typeless pointer which is passed from the caller of the decomposition function.</p>
+</table>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="user">user</td><td class="desc">
+<p>A typeless pointer that is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>Error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Funcs">FT_Outline_Funcs</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>A contour that contains a single point only is represented by a &lsquo;move to&rsquo; operation followed by &lsquo;line to&rsquo; to the same point. In most cases, it is best to filter this out before using the outline for stroking purposes (otherwise it would result in a visible dot when round caps are used).</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Funcs">FT_Outline_Funcs</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_Funcs_
{
<a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a> move_to;
@@ -812,314 +659,306 @@ Defined in FT_IMAGE_H (freetype/ftimage.h).
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> delta;
} <b>FT_Outline_Funcs</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Béziers.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>move_to</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="move_to">move_to</td><td class="desc">
<p>The &lsquo;move to&rsquo; emitter.</p>
</td></tr>
-<tr valign=top><td><b>line_to</b></td><td>
+<tr><td class="val" id="line_to">line_to</td><td class="desc">
<p>The segment emitter.</p>
</td></tr>
-<tr valign=top><td><b>conic_to</b></td><td>
+<tr><td class="val" id="conic_to">conic_to</td><td class="desc">
<p>The second-order Bézier arc emitter.</p>
</td></tr>
-<tr valign=top><td><b>cubic_to</b></td><td>
+<tr><td class="val" id="cubic_to">cubic_to</td><td class="desc">
<p>The third-order Bézier arc emitter.</p>
</td></tr>
-<tr valign=top><td><b>shift</b></td><td>
+<tr><td class="val" id="shift">shift</td><td class="desc">
<p>The shift that is applied to coordinates before they are sent to the emitter.</p>
</td></tr>
-<tr valign=top><td><b>delta</b></td><td>
+<tr><td class="val" id="delta">delta</td><td class="desc">
<p>The delta that is applied to coordinates before they are sent to the emitter, but after the shift.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The point coordinates sent to the emitters are the transformed version of the original coordinates (this is important for high accuracy during scan-conversion). The transformation is simple:</p>
<pre class="colored">
x' = (x &lt;&lt; shift) - delta
y' = (x &lt;&lt; shift) - delta
</pre>
<p>Set the values of &lsquo;shift&rsquo; and &lsquo;delta&rsquo; to&nbsp;0 to get the original point coordinates.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Decompose">FT_Outline_Decompose</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Outline_Decompose</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
- <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a>* func_interface,
- <span class="keyword">void</span>* user );
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Walk over an outline's structure to decompose it into individual segments and Bézier arcs. This function also emits &lsquo;move to&rsquo; operations to indicate the start of new contours in the outline.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
-<p>A pointer to the source target.</p>
-</td></tr>
-<tr valign=top><td><b>func_interface</b></td><td>
-<p>A table of &lsquo;emitters&rsquo;, i.e., function pointers called during decomposition to indicate path operations.</p>
+<div class="section">
+<h3 id="FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">int</span>
+ (*<b>FT_Outline_MoveToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
+ <span class="keyword">void</span>* user );
+
+#define FT_Outline_MoveTo_Func <b>FT_Outline_MoveToFunc</b>
+</pre>
+
+<p>A function pointer type used to describe the signature of a &lsquo;move to&rsquo; function during outline walking/decomposition.</p>
+<p>A &lsquo;move to&rsquo; is emitted to start a new contour in an outline.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="to">to</td><td class="desc">
+<p>A pointer to the target point of the &lsquo;move to&rsquo;.</p>
</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>user</b></td><td>
-<p>A typeless pointer which is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.</p>
+<tr><td class="val" id="user">user</td><td class="desc">
+<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <span class="keyword">void</span> )
- <b>FT_Outline_Get_CBox</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
- <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *acbox );
+<h4>return</h4>
+<p>Error code. 0&nbsp;means success.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return an outline's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bézier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline which contains Bézier outside arcs).</p>
-<p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component which is dedicated to this single task.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
-<p>A pointer to the source outline descriptor.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_LineToFunc">FT_Outline_LineToFunc</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">int</span>
+ (*<b>FT_Outline_LineToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
+ <span class="keyword">void</span>* user );
+
+#define FT_Outline_LineTo_Func <b>FT_Outline_LineToFunc</b>
+</pre>
+
+<p>A function pointer type used to describe the signature of a &lsquo;line to&rsquo; function during outline walking/decomposition.</p>
+<p>A &lsquo;line to&rsquo; is emitted to indicate a segment in the outline.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="to">to</td><td class="desc">
+<p>A pointer to the target point of the &lsquo;line to&rsquo;.</p>
</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>acbox</b></td><td>
-<p>The outline's control box.</p>
+<tr><td class="val" id="user">user</td><td class="desc">
+<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>See <a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a> for a discussion of tricky fonts.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Outline_Get_Bitmap</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
- <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
- <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *abitmap );
+<h4>return</h4>
+<p>Error code. 0&nbsp;means success.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
-<p>A handle to a FreeType library object.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">int</span>
+ (*<b>FT_Outline_ConicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control,
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
+ <span class="keyword">void</span>* user );
+
+#define FT_Outline_ConicTo_Func <b>FT_Outline_ConicToFunc</b>
+</pre>
+
+<p>A function pointer type used to describe the signature of a &lsquo;conic to&rsquo; function during outline walking or decomposition.</p>
+<p>A &lsquo;conic to&rsquo; is emitted to indicate a second-order Bézier arc in the outline.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="control">control</td><td class="desc">
+<p>An intermediate control point between the last position and the new target in &lsquo;to&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>outline</b></td><td>
-<p>A pointer to the source outline descriptor.</p>
+<tr><td class="val" id="to">to</td><td class="desc">
+<p>A pointer to the target end point of the conic arc.</p>
</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>abitmap</b></td><td>
-<p>A pointer to the target bitmap descriptor.</p>
+<tr><td class="val" id="user">user</td><td class="desc">
+<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>This function does NOT CREATE the bitmap, it only renders an outline image within the one you pass to it! Consequently, the various fields in &lsquo;abitmap&rsquo; should be set accordingly.</p>
-<p>It will use the raster corresponding to the default glyph format.</p>
-<p>The value of the &lsquo;num_grays&rsquo; field in &lsquo;abitmap&rsquo; is ignored. If you select the gray-level rasterizer, and you want less than 256 gray levels, you have to use <a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a> directly.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Render">FT_Outline_Render</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
- <b>FT_Outline_Render</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
- <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
- <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a>* params );
+<h4>return</h4>
+<p>Error code. 0&nbsp;means success.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Render an outline within a bitmap using the current scan-convert. This function uses an <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure as an argument, allowing advanced features like direct composition, translucency, etc.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
-<p>A handle to a FreeType library object.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">int</span>
+ (*<b>FT_Outline_CubicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control1,
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control2,
+ <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
+ <span class="keyword">void</span>* user );
+
+#define FT_Outline_CubicTo_Func <b>FT_Outline_CubicToFunc</b>
+</pre>
+
+<p>A function pointer type used to describe the signature of a &lsquo;cubic to&rsquo; function during outline walking or decomposition.</p>
+<p>A &lsquo;cubic to&rsquo; is emitted to indicate a third-order Bézier arc.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="control1">control1</td><td class="desc">
+<p>A pointer to the first Bézier control point.</p>
</td></tr>
-<tr valign=top><td><b>outline</b></td><td>
-<p>A pointer to the source outline descriptor.</p>
+<tr><td class="val" id="control2">control2</td><td class="desc">
+<p>A pointer to the second Bézier control point.</p>
</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>params</b></td><td>
-<p>A pointer to an <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure used to describe the rendering operation.</p>
+<tr><td class="val" id="to">to</td><td class="desc">
+<p>A pointer to the target end point.</p>
+</td></tr>
+<tr><td class="val" id="user">user</td><td class="desc">
+<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>You should know what you are doing and how <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> works to use this function.</p>
-<p>The field &lsquo;params.source&rsquo; will be set to &lsquo;outline&rsquo; before the scan converter is called, which means that the value you give to it is actually ignored.</p>
-<p>The gray-level rasterizer always uses 256 gray levels. If you want less gray levels, you have to provide your own span callback. See the <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a> value of the &lsquo;flags&rsquo; field in the <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure for more details.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Orientation">FT_Orientation</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>return</h4>
+<p>Error code. 0&nbsp;means success.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Orientation">FT_Orientation</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Orientation_
{
- <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a> = 0,
- <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a> = 1,
- <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_RIGHT</a> = <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a>,
- <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_LEFT</a> = <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a>,
- <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_NONE</a>
+ <a href="ft2-outline_processing.html#FT_ORIENTATION_TRUETYPE">FT_ORIENTATION_TRUETYPE</a> = 0,
+ <a href="ft2-outline_processing.html#FT_ORIENTATION_POSTSCRIPT">FT_ORIENTATION_POSTSCRIPT</a> = 1,
+ <a href="ft2-outline_processing.html#FT_ORIENTATION_FILL_RIGHT">FT_ORIENTATION_FILL_RIGHT</a> = <a href="ft2-outline_processing.html#FT_ORIENTATION_TRUETYPE">FT_ORIENTATION_TRUETYPE</a>,
+ <a href="ft2-outline_processing.html#FT_ORIENTATION_FILL_LEFT">FT_ORIENTATION_FILL_LEFT</a> = <a href="ft2-outline_processing.html#FT_ORIENTATION_POSTSCRIPT">FT_ORIENTATION_POSTSCRIPT</a>,
+ <a href="ft2-outline_processing.html#FT_ORIENTATION_NONE">FT_ORIENTATION_NONE</a>
} <b>FT_Orientation</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A list of values used to describe an outline's contour orientation.</p>
<p>The TrueType and PostScript specifications use different conventions to determine whether outline contours should be filled or unfilled.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td colspan=0><b>FT_ORIENTATION_TRUETYPE</b></td></tr>
-<tr valign=top><td></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_ORIENTATION_TRUETYPE">FT_ORIENTATION_TRUETYPE</td><td class="desc">
<p>According to the TrueType specification, clockwise contours must be filled, and counter-clockwise ones must be unfilled.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_ORIENTATION_POSTSCRIPT</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_ORIENTATION_POSTSCRIPT">FT_ORIENTATION_POSTSCRIPT</td><td class="desc">
<p>According to the PostScript specification, counter-clockwise contours must be filled, and clockwise ones must be unfilled.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_ORIENTATION_FILL_RIGHT</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_ORIENTATION_FILL_RIGHT">FT_ORIENTATION_FILL_RIGHT</td><td class="desc">
<p>This is identical to <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a>, but is used to remember that in TrueType, everything that is to the right of the drawing direction of a contour must be filled.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_ORIENTATION_FILL_LEFT</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_ORIENTATION_FILL_LEFT">FT_ORIENTATION_FILL_LEFT</td><td class="desc">
<p>This is identical to <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a>, but is used to remember that in PostScript, everything that is to the left of the drawing direction of a contour must be filled.</p>
</td></tr>
-<tr valign=top><td><b>FT_ORIENTATION_NONE</b></td><td>
+<tr><td class="val" id="FT_ORIENTATION_NONE">FT_ORIENTATION_NONE</td><td class="desc">
<p>The orientation cannot be determined. That is, different parts of the glyph have different orientation.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_OUTLINE_H (freetype/ftoutln.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</h3>
+<p>Defined in FT_OUTLINE_H (ftoutln.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a> )
<b>FT_Outline_Get_Orientation</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This function analyzes a glyph outline and tries to compute its fill orientation (see <a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a>). This is done by computing the direction of each global horizontal and/or vertical extrema within the outline.</p>
+<p>This function analyzes a glyph outline and tries to compute its fill orientation (see <a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a>). This is done by integrating the total area covered by the outline. The positive integral corresponds to the clockwise orientation and <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a> is returned. The negative integral corresponds to the counter-clockwise orientation and <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a> is returned.</p>
<p>Note that this will return <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a> for empty outlines.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>outline</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A handle to the source outline.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The orientation.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_OUTLINE_XXX">FT_OUTLINE_XXX</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+#define <a href="ft2-outline_processing.html#FT_OUTLINE_NONE">FT_OUTLINE_NONE</a> 0x0
+#define <a href="ft2-outline_processing.html#FT_OUTLINE_OWNER">FT_OUTLINE_OWNER</a> 0x1
+#define <a href="ft2-outline_processing.html#FT_OUTLINE_EVEN_ODD_FILL">FT_OUTLINE_EVEN_ODD_FILL</a> 0x2
+#define <a href="ft2-outline_processing.html#FT_OUTLINE_REVERSE_FILL">FT_OUTLINE_REVERSE_FILL</a> 0x4
+#define <a href="ft2-outline_processing.html#FT_OUTLINE_IGNORE_DROPOUTS">FT_OUTLINE_IGNORE_DROPOUTS</a> 0x8
+#define <a href="ft2-outline_processing.html#FT_OUTLINE_SMART_DROPOUTS">FT_OUTLINE_SMART_DROPOUTS</a> 0x10
+#define <a href="ft2-outline_processing.html#FT_OUTLINE_INCLUDE_STUBS">FT_OUTLINE_INCLUDE_STUBS</a> 0x20
+
+#define <a href="ft2-outline_processing.html#FT_OUTLINE_HIGH_PRECISION">FT_OUTLINE_HIGH_PRECISION</a> 0x100
+#define <a href="ft2-outline_processing.html#FT_OUTLINE_SINGLE_PASS">FT_OUTLINE_SINGLE_PASS</a> 0x200
+
+
+ /* these constants are deprecated; use the corresponding */
+ /* `<b>FT_OUTLINE_XXX</b>' values instead */
+#define ft_outline_none <a href="ft2-outline_processing.html#FT_OUTLINE_NONE">FT_OUTLINE_NONE</a>
+#define ft_outline_owner <a href="ft2-outline_processing.html#FT_OUTLINE_OWNER">FT_OUTLINE_OWNER</a>
+#define ft_outline_even_odd_fill <a href="ft2-outline_processing.html#FT_OUTLINE_EVEN_ODD_FILL">FT_OUTLINE_EVEN_ODD_FILL</a>
+#define ft_outline_reverse_fill <a href="ft2-outline_processing.html#FT_OUTLINE_REVERSE_FILL">FT_OUTLINE_REVERSE_FILL</a>
+#define ft_outline_ignore_dropouts <a href="ft2-outline_processing.html#FT_OUTLINE_IGNORE_DROPOUTS">FT_OUTLINE_IGNORE_DROPOUTS</a>
+#define ft_outline_high_precision <a href="ft2-outline_processing.html#FT_OUTLINE_HIGH_PRECISION">FT_OUTLINE_HIGH_PRECISION</a>
+#define ft_outline_single_pass <a href="ft2-outline_processing.html#FT_OUTLINE_SINGLE_PASS">FT_OUTLINE_SINGLE_PASS</a>
+</pre>
+
+<p>A list of bit-field constants use for the flags in an outline's &lsquo;flags&rsquo; field.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_OUTLINE_NONE">FT_OUTLINE_NONE</td><td class="desc">
+<p>Value&nbsp;0 is reserved.</p>
+</td></tr>
+<tr><td class="val" id="FT_OUTLINE_OWNER">FT_OUTLINE_OWNER</td><td class="desc">
+<p>If set, this flag indicates that the outline's field arrays (i.e., &lsquo;points&rsquo;, &lsquo;flags&rsquo;, and &lsquo;contours&rsquo;) are &lsquo;owned&rsquo; by the outline object, and should thus be freed when it is destroyed.</p>
+</td></tr>
+<tr><td class="val" id="FT_OUTLINE_EVEN_ODD_FILL">FT_OUTLINE_EVEN_ODD_FILL</td><td class="desc">
+<p>By default, outlines are filled using the non-zero winding rule. If set to 1, the outline will be filled using the even-odd fill rule (only works with the smooth rasterizer).</p>
+</td></tr>
+<tr><td class="val" id="FT_OUTLINE_REVERSE_FILL">FT_OUTLINE_REVERSE_FILL</td><td class="desc">
+<p>By default, outside contours of an outline are oriented in clock-wise direction, as defined in the TrueType specification. This flag is set if the outline uses the opposite direction (typically for Type&nbsp;1 fonts). This flag is ignored by the scan converter.</p>
+</td></tr>
+<tr><td class="val" id="FT_OUTLINE_IGNORE_DROPOUTS">FT_OUTLINE_IGNORE_DROPOUTS</td><td class="desc">
+<p>By default, the scan converter will try to detect drop-outs in an outline and correct the glyph bitmap to ensure consistent shape continuity. If set, this flag hints the scan-line converter to ignore such cases. See below for more information.</p>
+</td></tr>
+<tr><td class="val" id="FT_OUTLINE_SMART_DROPOUTS">FT_OUTLINE_SMART_DROPOUTS</td><td class="desc">
+<p>Select smart dropout control. If unset, use simple dropout control. Ignored if <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a> is set. See below for more information.</p>
+</td></tr>
+<tr><td class="val" id="FT_OUTLINE_INCLUDE_STUBS">FT_OUTLINE_INCLUDE_STUBS</td><td class="desc">
+<p>If set, turn pixels on for &lsquo;stubs&rsquo;, otherwise exclude them. Ignored if <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a> is set. See below for more information.</p>
+</td></tr>
+<tr><td class="val" id="FT_OUTLINE_HIGH_PRECISION">FT_OUTLINE_HIGH_PRECISION</td><td class="desc">
+<p>This flag indicates that the scan-line converter should try to convert this outline to bitmaps with the highest possible quality. It is typically set for small character sizes. Note that this is only a hint that might be completely ignored by a given scan-converter.</p>
+</td></tr>
+<tr><td class="val" id="FT_OUTLINE_SINGLE_PASS">FT_OUTLINE_SINGLE_PASS</td><td class="desc">
+<p>This flag is set to force a given scan-converter to only use a single pass over the outline to render a bitmap glyph image. Normally, it is set for very large character sizes. It is only a hint that might be completely ignored by a given scan-converter.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>The flags <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a>, <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a>, and <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a> are ignored by the smooth rasterizer.</p>
+<p>There exists a second mechanism to pass the drop-out mode to the B/W rasterizer; see the &lsquo;tags&rsquo; field in <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>.</p>
+<p>Please refer to the description of the &lsquo;SCANTYPE&rsquo; instruction in the OpenType specification (in file &lsquo;ttinst1.doc&rsquo;) how simple drop-outs, smart drop-outs, and stubs are defined.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-pfr_fonts.html b/docs/reference/ft2-pfr_fonts.html
index 6a968f3..8f3cb8a 100644
--- a/docs/reference/ft2-pfr_fonts.html
+++ b/docs/reference/ft2-pfr_fonts.html
@@ -3,204 +3,240 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-PFR Fonts
-</h1></center>
+<h1>PFR Fonts</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td></td><td><a href="#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td></td><td><a href="#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td><a href="#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td><a href="#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>This section contains the declaration of PFR-specific functions.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_PFR_H (freetype/ftpfr.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</h3>
+<p>Defined in FT_PFR_H (ftpfr.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_PFR_Metrics</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *aoutline_resolution,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *ametrics_resolution,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *ametrics_x_scale,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *ametrics_y_scale );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the outline and metrics resolutions of a given PFR face.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>Handle to the input face. It can be a non-PFR face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aoutline_resolution</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aoutline_resolution">aoutline_resolution</td><td class="desc">
<p>Outline resolution. This is equivalent to &lsquo;face-&gt;units_per_EM&rsquo; for non-PFR fonts. Optional (parameter can be NULL).</p>
</td></tr>
-<tr valign=top><td><b>ametrics_resolution</b></td><td>
+<tr><td class="val" id="ametrics_resolution">ametrics_resolution</td><td class="desc">
<p>Metrics resolution. This is equivalent to &lsquo;outline_resolution&rsquo; for non-PFR fonts. Optional (parameter can be NULL).</p>
</td></tr>
-<tr valign=top><td><b>ametrics_x_scale</b></td><td>
+<tr><td class="val" id="ametrics_x_scale">ametrics_x_scale</td><td class="desc">
<p>A 16.16 fixed-point number used to scale distance expressed in metrics units to device sub-pixels. This is equivalent to &lsquo;face-&gt;size-&gt;x_scale&rsquo;, but for metrics only. Optional (parameter can be NULL).</p>
</td></tr>
-<tr valign=top><td><b>ametrics_y_scale</b></td><td>
+<tr><td class="val" id="ametrics_y_scale">ametrics_y_scale</td><td class="desc">
<p>Same as &lsquo;ametrics_x_scale&rsquo; but for the vertical direction. optional (parameter can be NULL).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If the input face is not a PFR, this function will return an error. However, in all cases, it will return valid values.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_PFR_H (freetype/ftpfr.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</h3>
+<p>Defined in FT_PFR_H (ftpfr.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_PFR_Kerning</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> left,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> right,
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a> *avector );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the kerning pair corresponding to two glyphs in a PFR face. The distance is expressed in metrics units, unlike the result of <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
-<tr valign=top><td><b>left</b></td><td>
+<tr><td class="val" id="left">left</td><td class="desc">
<p>Index of the left glyph.</p>
</td></tr>
-<tr valign=top><td><b>right</b></td><td>
+<tr><td class="val" id="right">right</td><td class="desc">
<p>Index of the right glyph.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>avector</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="avector">avector</td><td class="desc">
<p>A kerning vector.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function always return distances in original PFR metrics units. This is unlike <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a> with the <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a> mode, which always returns distances converted to outline units.</p>
<p>You can use the value of the &lsquo;x_scale&rsquo; and &lsquo;y_scale&rsquo; parameters returned by <a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a> to scale these to device sub-pixels.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_PFR_H (freetype/ftpfr.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_PFR_Advance">FT_Get_PFR_Advance</h3>
+<p>Defined in FT_PFR_H (ftpfr.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_PFR_Advance</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> *aadvance );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return a given glyph advance, expressed in original metrics units, from a PFR font.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
-<tr valign=top><td><b>gindex</b></td><td>
+<tr><td class="val" id="gindex">gindex</td><td class="desc">
<p>The glyph index.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aadvance</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aadvance">aadvance</td><td class="desc">
<p>The glyph advance in metrics units.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>You can use the &lsquo;x_scale&rsquo; or &lsquo;y_scale&rsquo; results of <a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a> to convert the advance to device sub-pixels (i.e., 1/64th of pixels).</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-quick_advance.html b/docs/reference/ft2-quick_advance.html
index 80efee1..4cffbf8 100644
--- a/docs/reference/ft2-quick_advance.html
+++ b/docs/reference/ft2-quick_advance.html
@@ -3,183 +3,222 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Quick retrieval of advance values
-</h1></center>
+<h1>Quick retrieval of advance values</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td><td></td><td><a href="#FT_Get_Advances">FT_Get_Advances</a></td></tr>
-<tr><td></td><td><a href="#FT_Get_Advance">FT_Get_Advance</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
-<p>This section contains functions to quickly extract advance values without handling glyph outlines, if possible.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_ADVANCES_H (freetype/ftadvanc.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<table class="synopsis">
+<tr><td><a href="#FT_Get_Advance">FT_Get_Advance</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Get_Advances">FT_Get_Advances</a></td><td><a href="#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td></tr>
+</table>
-#define <b>FT_ADVANCE_FLAG_FAST_ONLY</b> 0x20000000UL
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A bit-flag to be OR-ed with the &lsquo;flags&rsquo; parameter of the <a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a> and <a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a> functions.</p>
-<p>If set, it indicates that you want these functions to fail if the corresponding hinting mode or font driver doesn't allow for very quick advance computation.</p>
-<p>Typically, glyphs which are either unscaled, unhinted, bitmapped, or light-hinted can have their advance width computed very quickly.</p>
-<p>Normal and bytecode hinted modes, which require loading, scaling, and hinting of the glyph outline, are extremely slow by comparison.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Advance">FT_Get_Advance</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_ADVANCES_H (freetype/ftadvanc.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>This section contains functions to quickly extract advance values without handling glyph outlines, if possible.</p>
+<div class="section">
+<h3 id="FT_Get_Advance">FT_Get_Advance</h3>
+<p>Defined in FT_ADVANCES_H (ftadvanc.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_Advance</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *padvance );
+</pre>
+
+<p>Retrieve the advance value of a given glyph outline in an <a href="ft2-base_interface.html#FT_Face">FT_Face</a>.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Retrieve the advance value of a given glyph outline in an <a href="ft2-base_interface.html#FT_Face">FT_Face</a>. By default, the unhinted advance is returned in font units.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>The source <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
</td></tr>
-<tr valign=top><td><b>gindex</b></td><td>
+<tr><td class="val" id="gindex">gindex</td><td class="desc">
<p>The glyph index.</p>
</td></tr>
-<tr valign=top><td><b>load_flags</b></td><td>
+<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>A set of bit flags similar to those used when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>, used to determine what kind of advances you need.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>padvance</b></td><td>
-<p>The advance value, in either font units or 16.16 format.</p>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="padvance">padvance</td><td class="desc">
+<p>The advance value. If scaling is performed (based on the value of &lsquo;load_flags&rsquo;), the advance value is in 16.16 format. Otherwise, it is in font units.</p>
<p>If <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a> is set, this is the vertical advance corresponding to a vertical layout. Otherwise, it is the horizontal advance in a horizontal layout.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function may fail if you use <a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a> and if the corresponding font backend doesn't have a quick way to retrieve the advances.</p>
<p>A scaled advance is returned in 16.16 format but isn't transformed by the affine transformation specified by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Advances">FT_Get_Advances</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_ADVANCES_H (freetype/ftadvanc.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Advances">FT_Get_Advances</h3>
+<p>Defined in FT_ADVANCES_H (ftadvanc.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_Advances</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> start,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> count,
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *padvances );
+</pre>
+
+<p>Retrieve the advance values of several glyph outlines in an <a href="ft2-base_interface.html#FT_Face">FT_Face</a>.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Retrieve the advance values of several glyph outlines in an <a href="ft2-base_interface.html#FT_Face">FT_Face</a>. By default, the unhinted advances are returned in font units.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>The source <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
</td></tr>
-<tr valign=top><td><b>start</b></td><td>
+<tr><td class="val" id="start">start</td><td class="desc">
<p>The first glyph index.</p>
</td></tr>
-<tr valign=top><td><b>count</b></td><td>
+<tr><td class="val" id="count">count</td><td class="desc">
<p>The number of advance values you want to retrieve.</p>
</td></tr>
-<tr valign=top><td><b>load_flags</b></td><td>
+<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>A set of bit flags similar to those used when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>padvance</b></td><td>
-<p>The advances, in either font units or 16.16 format. This array must contain at least &lsquo;count&rsquo; elements.</p>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="padvance">padvance</td><td class="desc">
+<p>The advance values. This array, to be provided by the caller, must contain at least &lsquo;count&rsquo; elements.</p>
+<p>If scaling is performed (based on the value of &lsquo;load_flags&rsquo;), the advance values are in 16.16 format. Otherwise, they are in font units.</p>
<p>If <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a> is set, these are the vertical advances corresponding to a vertical layout. Otherwise, they are the horizontal advances in a horizontal layout.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function may fail if you use <a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a> and if the corresponding font backend doesn't have a quick way to retrieve the advances.</p>
<p>Scaled advances are returned in 16.16 format but aren't transformed by the affine transformation specified by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</h3>
+<p>Defined in FT_ADVANCES_H (ftadvanc.h).</p>
+<pre>
+#define <b>FT_ADVANCE_FLAG_FAST_ONLY</b> 0x20000000UL
+</pre>
+
+<p>A bit-flag to be OR-ed with the &lsquo;flags&rsquo; parameter of the <a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a> and <a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a> functions.</p>
+<p>If set, it indicates that you want these functions to fail if the corresponding hinting mode or font driver doesn't allow for very quick advance computation.</p>
+<p>Typically, glyphs that are either unscaled, unhinted, bitmapped, or light-hinted can have their advance width computed very quickly.</p>
+<p>Normal and bytecode hinted modes that require loading, scaling, and hinting of the glyph outline, are extremely slow by comparison.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-raster.html b/docs/reference/ft2-raster.html
index 34f2078..3d40621 100644
--- a/docs/reference/ft2-raster.html
+++ b/docs/reference/ft2-raster.html
@@ -3,81 +3,135 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Scanline Converter
-</h1></center>
+<h1>Scanline Converter</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Raster">FT_Raster</a></td><td></td><td><a href="#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></td><td></td><td><a href="#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></td></tr>
-<tr><td></td><td><a href="#FT_Span">FT_Span</a></td><td></td><td><a href="#FT_Raster_Params">FT_Raster_Params</a></td><td></td><td><a href="#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></td></tr>
-<tr><td></td><td><a href="#FT_SpanFunc">FT_SpanFunc</a></td><td></td><td><a href="#FT_Raster_NewFunc">FT_Raster_NewFunc</a></td><td></td><td><a href="#FT_Raster_Funcs">FT_Raster_Funcs</a></td></tr>
-<tr><td></td><td><a href="#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></td><td></td><td><a href="#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></td><td></td><td></td></tr>
-<tr><td></td><td><a href="#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></td><td></td><td><a href="#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_Raster">FT_Raster</a></td><td>&nbsp;</td><td><a href="#FT_Raster_Funcs">FT_Raster_Funcs</a></td></tr>
+<tr><td><a href="#FT_Span">FT_Span</a></td><td><a href="#FT_Raster_NewFunc">FT_Raster_NewFunc</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_SpanFunc">FT_SpanFunc</a></td><td><a href="#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></td><td><a href="#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></td><td><a href="#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></td></tr>
+<tr><td><a href="#FT_Raster_Params">FT_Raster_Params</a></td><td><a href="#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></td><td></td></tr>
+<tr><td><a href="#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></td><td><a href="#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></td><td></td></tr>
+</table>
+
+
<p>This section contains technical definitions.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Raster">FT_Raster</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Raster">FT_Raster</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RasterRec_* <b>FT_Raster</b>;
+</pre>
+
+<p>An opaque handle (pointer) to a raster object. Each object can be used independently to convert an outline into a bitmap or pixmap.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A handle (pointer) to a raster object. Each object can be used independently to convert an outline into a bitmap or pixmap.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Span">FT_Span</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Span">FT_Span</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Span_
{
<span class="keyword">short</span> x;
@@ -85,42 +139,34 @@ Defined in FT_IMAGE_H (freetype/ftimage.h).
<span class="keyword">unsigned</span> <span class="keyword">char</span> coverage;
} <b>FT_Span</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A structure used to model a single span of gray (or black) pixels when rendering a monochrome or anti-aliased bitmap.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>x</b></td><td>
+<p>A structure used to model a single span of gray pixels when rendering an anti-aliased bitmap.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="x">x</td><td class="desc">
<p>The span's horizontal start position.</p>
</td></tr>
-<tr valign=top><td><b>len</b></td><td>
+<tr><td class="val" id="len">len</td><td class="desc">
<p>The span's length in pixels.</p>
</td></tr>
-<tr valign=top><td><b>coverage</b></td><td>
-<p>The span color/coverage, ranging from 0 (background) to 255 (foreground). Only used for anti-aliased rendering.</p>
+<tr><td class="val" id="coverage">coverage</td><td class="desc">
+<p>The span color/coverage, ranging from 0 (background) to 255 (foreground).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>This structure is used by the span drawing callback type named <a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a> which takes the y&nbsp;coordinate of the span as a a parameter.</p>
+
+<h4>note</h4>
+<p>This structure is used by the span drawing callback type named <a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a> that takes the y&nbsp;coordinate of the span as a parameter.</p>
<p>The coverage value is always between 0 and 255. If you want less gray values, the callback function has to reduce them.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_SpanFunc">FT_SpanFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_SpanFunc">FT_SpanFunc</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">void</span>
(*<b>FT_SpanFunc</b>)( <span class="keyword">int</span> y,
<span class="keyword">int</span> count,
@@ -128,439 +174,294 @@ Defined in FT_IMAGE_H (freetype/ftimage.h).
<span class="keyword">void</span>* user );
#define FT_Raster_Span_Func <b>FT_SpanFunc</b>
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used as a call-back by the anti-aliased renderer in order to let client applications draw themselves the gray pixel spans on each scan line.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>y</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="y">y</td><td class="desc">
<p>The scanline's y&nbsp;coordinate.</p>
</td></tr>
-<tr valign=top><td><b>count</b></td><td>
+<tr><td class="val" id="count">count</td><td class="desc">
<p>The number of spans to draw on this scanline.</p>
</td></tr>
-<tr valign=top><td><b>spans</b></td><td>
+<tr><td class="val" id="spans">spans</td><td class="desc">
<p>A table of &lsquo;count&rsquo; spans to draw on the scanline.</p>
</td></tr>
-<tr valign=top><td><b>user</b></td><td>
+<tr><td class="val" id="user">user</td><td class="desc">
<p>User-supplied data that is passed to the callback.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This callback allows client applications to directly render the gray spans of the anti-aliased bitmap to any kind of surfaces.</p>
<p>This can be used to write anti-aliased outlines directly to a given background bitmap, and even perform translucency.</p>
<p>Note that the &lsquo;count&rsquo; field cannot be greater than a fixed value defined by the &lsquo;FT_MAX_GRAY_SPANS&rsquo; configuration macro in &lsquo;ftoption.h&rsquo;. By default, this value is set to&nbsp;32, which means that if there are more than 32&nbsp;spans on a given scanline, the callback is called several times with the same &lsquo;y&rsquo; parameter in order to draw all callbacks.</p>
<p>Otherwise, the callback is only called once per scan-line, and only for those scanlines that do have &lsquo;gray&rsquo; pixels on them.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <span class="keyword">int</span>
- (*<b>FT_Raster_BitTest_Func</b>)( <span class="keyword">int</span> y,
- <span class="keyword">int</span> x,
- <span class="keyword">void</span>* user );
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>THIS TYPE IS DEPRECATED. DO NOT USE IT.</p>
-<p>A function used as a call-back by the monochrome scan-converter to test whether a given target pixel is already set to the drawing &lsquo;color&rsquo;. These tests are crucial to implement drop-out control per-se the TrueType spec.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>y</b></td><td>
-<p>The pixel's y&nbsp;coordinate.</p>
-</td></tr>
-<tr valign=top><td><b>x</b></td><td>
-<p>The pixel's x&nbsp;coordinate.</p>
-</td></tr>
-<tr valign=top><td><b>user</b></td><td>
-<p>User-supplied data that is passed to the callback.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>1&nbsp;if the pixel is &lsquo;set&rsquo;, 0&nbsp;otherwise.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">void</span>
- (*<b>FT_Raster_BitSet_Func</b>)( <span class="keyword">int</span> y,
- <span class="keyword">int</span> x,
- <span class="keyword">void</span>* user );
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>THIS TYPE IS DEPRECATED. DO NOT USE IT.</p>
-<p>A function used as a call-back by the monochrome scan-converter to set an individual target pixel. This is crucial to implement drop-out control according to the TrueType specification.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>y</b></td><td>
-<p>The pixel's y&nbsp;coordinate.</p>
-</td></tr>
-<tr valign=top><td><b>x</b></td><td>
-<p>The pixel's x&nbsp;coordinate.</p>
-</td></tr>
-<tr valign=top><td><b>user</b></td><td>
-<p>User-supplied data that is passed to the callback.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>1&nbsp;if the pixel is &lsquo;set&rsquo;, 0&nbsp;otherwise.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DEFAULT</a> 0x0
-#define <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a> 0x1
-#define <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a> 0x2
-#define <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_CLIP</a> 0x4
-
- /* deprecated */
-#define ft_raster_flag_default <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DEFAULT</a>
-#define ft_raster_flag_aa <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a>
-#define ft_raster_flag_direct <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a>
-#define ft_raster_flag_clip <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_CLIP</a>
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of bit flag constants as used in the &lsquo;flags&rsquo; field of a <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_RASTER_FLAG_DEFAULT</b></td><td>
-<p>This value is 0.</p>
-</td></tr>
-<tr valign=top><td><b>FT_RASTER_FLAG_AA</b></td><td>
-<p>This flag is set to indicate that an anti-aliased glyph image should be generated. Otherwise, it will be monochrome (1-bit).</p>
-</td></tr>
-<tr valign=top><td><b>FT_RASTER_FLAG_DIRECT</b></td><td>
-<p>This flag is set to indicate direct rendering. In this mode, client applications must provide their own span callback. This lets them directly draw or compose over an existing bitmap. If this bit is not set, the target pixmap's buffer <i>must</i> be zeroed before rendering.</p>
-<p>Note that for now, direct rendering is only possible with anti-aliased glyphs.</p>
-</td></tr>
-<tr valign=top><td><b>FT_RASTER_FLAG_CLIP</b></td><td>
-<p>This flag is only used in direct rendering mode. If set, the output will be clipped to a box specified in the &lsquo;clip_box&rsquo; field of the <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure.</p>
-<p>Note that by default, the glyph bitmap is clipped to the target pixmap, except in direct rendering mode where all spans are generated if no clipping box is set.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Raster_Params">FT_Raster_Params</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Raster_Params">FT_Raster_Params</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Raster_Params_
{
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>* target;
<span class="keyword">const</span> <span class="keyword">void</span>* source;
<span class="keyword">int</span> flags;
<a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a> gray_spans;
- <a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a> black_spans; /* doesn't work! */
- <a href="ft2-raster.html#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a> bit_test; /* doesn't work! */
- <a href="ft2-raster.html#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a> bit_set; /* doesn't work! */
+ <a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a> black_spans; /* unused */
+ <a href="ft2-raster.html#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a> bit_test; /* unused */
+ <a href="ft2-raster.html#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a> bit_set; /* unused */
<span class="keyword">void</span>* user;
<a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> clip_box;
} <b>FT_Raster_Params</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure to hold the arguments used by a raster's render function.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>target</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="target">target</td><td class="desc">
<p>The target bitmap.</p>
</td></tr>
-<tr valign=top><td><b>source</b></td><td>
+<tr><td class="val" id="source">source</td><td class="desc">
<p>A pointer to the source glyph image (e.g., an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>).</p>
</td></tr>
-<tr valign=top><td><b>flags</b></td><td>
+<tr><td class="val" id="flags">flags</td><td class="desc">
<p>The rendering flags.</p>
</td></tr>
-<tr valign=top><td><b>gray_spans</b></td><td>
+<tr><td class="val" id="gray_spans">gray_spans</td><td class="desc">
<p>The gray span drawing callback.</p>
</td></tr>
-<tr valign=top><td><b>black_spans</b></td><td>
-<p>The black span drawing callback. UNIMPLEMENTED!</p>
+<tr><td class="val" id="black_spans">black_spans</td><td class="desc">
+<p>Unused.</p>
</td></tr>
-<tr valign=top><td><b>bit_test</b></td><td>
-<p>The bit test callback. UNIMPLEMENTED!</p>
+<tr><td class="val" id="bit_test">bit_test</td><td class="desc">
+<p>Unused.</p>
</td></tr>
-<tr valign=top><td><b>bit_set</b></td><td>
-<p>The bit set callback. UNIMPLEMENTED!</p>
+<tr><td class="val" id="bit_set">bit_set</td><td class="desc">
+<p>Unused.</p>
</td></tr>
-<tr valign=top><td><b>user</b></td><td>
+<tr><td class="val" id="user">user</td><td class="desc">
<p>User-supplied data that is passed to each drawing callback.</p>
</td></tr>
-<tr valign=top><td><b>clip_box</b></td><td>
+<tr><td class="val" id="clip_box">clip_box</td><td class="desc">
<p>An optional clipping box. It is only used in direct rendering mode. Note that coordinates here should be expressed in <i>integer</i> pixels (and not in 26.6 fixed-point units).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>An anti-aliased glyph bitmap is drawn if the <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a> bit flag is set in the &lsquo;flags&rsquo; field, otherwise a monochrome bitmap is generated.</p>
-<p>If the <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a> bit flag is set in &lsquo;flags&rsquo;, the raster will call the &lsquo;gray_spans&rsquo; callback to draw gray pixel spans, in the case of an aa glyph bitmap, it will call &lsquo;black_spans&rsquo;, and &lsquo;bit_test&rsquo; and &lsquo;bit_set&rsquo; in the case of a monochrome bitmap. This allows direct composition over a pre-existing bitmap through user-provided callbacks to perform the span drawing/composition.</p>
-<p>Note that the &lsquo;bit_test&rsquo; and &lsquo;bit_set&rsquo; callbacks are required when rendering a monochrome bitmap, as they are crucial to implement correct drop-out control as defined in the TrueType specification.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Raster_NewFunc">FT_Raster_NewFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>If the <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a> bit flag is set in &lsquo;flags&rsquo;, the raster will call the &lsquo;gray_spans&rsquo; callback to draw gray pixel spans. This allows direct composition over a pre-existing bitmap through user-provided callbacks to perform the span drawing and composition. Not supported by the monochrome rasterizer.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+#define <a href="ft2-raster.html#FT_RASTER_FLAG_DEFAULT">FT_RASTER_FLAG_DEFAULT</a> 0x0
+#define <a href="ft2-raster.html#FT_RASTER_FLAG_AA">FT_RASTER_FLAG_AA</a> 0x1
+#define <a href="ft2-raster.html#FT_RASTER_FLAG_DIRECT">FT_RASTER_FLAG_DIRECT</a> 0x2
+#define <a href="ft2-raster.html#FT_RASTER_FLAG_CLIP">FT_RASTER_FLAG_CLIP</a> 0x4
+
+ /* these constants are deprecated; use the corresponding */
+ /* `<b>FT_RASTER_FLAG_XXX</b>' values instead */
+#define ft_raster_flag_default <a href="ft2-raster.html#FT_RASTER_FLAG_DEFAULT">FT_RASTER_FLAG_DEFAULT</a>
+#define ft_raster_flag_aa <a href="ft2-raster.html#FT_RASTER_FLAG_AA">FT_RASTER_FLAG_AA</a>
+#define ft_raster_flag_direct <a href="ft2-raster.html#FT_RASTER_FLAG_DIRECT">FT_RASTER_FLAG_DIRECT</a>
+#define ft_raster_flag_clip <a href="ft2-raster.html#FT_RASTER_FLAG_CLIP">FT_RASTER_FLAG_CLIP</a>
+</pre>
+
+<p>A list of bit flag constants as used in the &lsquo;flags&rsquo; field of a <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_RASTER_FLAG_DEFAULT">FT_RASTER_FLAG_DEFAULT</td><td class="desc">
+<p>This value is 0.</p>
+</td></tr>
+<tr><td class="val" id="FT_RASTER_FLAG_AA">FT_RASTER_FLAG_AA</td><td class="desc">
+<p>This flag is set to indicate that an anti-aliased glyph image should be generated. Otherwise, it will be monochrome (1-bit).</p>
+</td></tr>
+<tr><td class="val" id="FT_RASTER_FLAG_DIRECT">FT_RASTER_FLAG_DIRECT</td><td class="desc">
+<p>This flag is set to indicate direct rendering. In this mode, client applications must provide their own span callback. This lets them directly draw or compose over an existing bitmap. If this bit is not set, the target pixmap's buffer <i>must</i> be zeroed before rendering.</p>
+<p>Direct rendering is only possible with anti-aliased glyphs.</p>
+</td></tr>
+<tr><td class="val" id="FT_RASTER_FLAG_CLIP">FT_RASTER_FLAG_CLIP</td><td class="desc">
+<p>This flag is only used in direct rendering mode. If set, the output will be clipped to a box specified in the &lsquo;clip_box&rsquo; field of the <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure.</p>
+<p>Note that by default, the glyph bitmap is clipped to the target pixmap, except in direct rendering mode where all spans are generated if no clipping box is set.</p>
+</td></tr>
+</table>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Raster_NewFunc">FT_Raster_NewFunc</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">int</span>
(*<b>FT_Raster_NewFunc</b>)( <span class="keyword">void</span>* memory,
<a href="ft2-raster.html#FT_Raster">FT_Raster</a>* raster );
#define FT_Raster_New_Func <b>FT_Raster_NewFunc</b>
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to create a new raster object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>memory</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A handle to the memory allocator.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>raster</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="raster">raster</td><td class="desc">
<p>A handle to the new raster object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>Error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The &lsquo;memory&rsquo; parameter is a typeless pointer in order to avoid un-wanted dependencies on the rest of the FreeType code. In practice, it is an <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> object, i.e., a handle to the standard FreeType memory allocator. However, this field can be completely ignored by a given raster implementation.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Raster_DoneFunc">FT_Raster_DoneFunc</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">void</span>
(*<b>FT_Raster_DoneFunc</b>)( <a href="ft2-raster.html#FT_Raster">FT_Raster</a> raster );
#define FT_Raster_Done_Func <b>FT_Raster_DoneFunc</b>
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to destroy a given raster object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>raster</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="raster">raster</td><td class="desc">
<p>A handle to the raster object.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Raster_ResetFunc">FT_Raster_ResetFunc</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">void</span>
(*<b>FT_Raster_ResetFunc</b>)( <a href="ft2-raster.html#FT_Raster">FT_Raster</a> raster,
<span class="keyword">unsigned</span> <span class="keyword">char</span>* pool_base,
<span class="keyword">unsigned</span> <span class="keyword">long</span> pool_size );
#define FT_Raster_Reset_Func <b>FT_Raster_ResetFunc</b>
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>FreeType provides an area of memory called the &lsquo;render pool&rsquo;, available to all registered rasters. This pool can be freely used during a given scan-conversion but is shared by all rasters. Its content is thus transient.</p>
<p>This function is called each time the render pool changes, or just after a new raster object is created.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>raster</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="raster">raster</td><td class="desc">
<p>A handle to the new raster object.</p>
</td></tr>
-<tr valign=top><td><b>pool_base</b></td><td>
+<tr><td class="val" id="pool_base">pool_base</td><td class="desc">
<p>The address in memory of the render pool.</p>
</td></tr>
-<tr valign=top><td><b>pool_size</b></td><td>
+<tr><td class="val" id="pool_size">pool_size</td><td class="desc">
<p>The size in bytes of the render pool.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Rasters can ignore the render pool and rely on dynamic memory allocation if they want to (a handle to the memory allocator is passed to the raster constructor). However, this is not recommended for efficiency purposes.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">int</span>
(*<b>FT_Raster_SetModeFunc</b>)( <a href="ft2-raster.html#FT_Raster">FT_Raster</a> raster,
<span class="keyword">unsigned</span> <span class="keyword">long</span> mode,
<span class="keyword">void</span>* args );
#define FT_Raster_Set_Mode_Func <b>FT_Raster_SetModeFunc</b>
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>This function is a generic facility to change modes or attributes in a given raster. This can be used for debugging purposes, or simply to allow implementation-specific &lsquo;features&rsquo; in a given raster module.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>raster</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="raster">raster</td><td class="desc">
<p>A handle to the new raster object.</p>
</td></tr>
-<tr valign=top><td><b>mode</b></td><td>
+<tr><td class="val" id="mode">mode</td><td class="desc">
<p>A 4-byte tag used to name the mode or property.</p>
</td></tr>
-<tr valign=top><td><b>args</b></td><td>
+<tr><td class="val" id="args">args</td><td class="desc">
<p>A pointer to the new mode/property to use.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Raster_RenderFunc">FT_Raster_RenderFunc</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">int</span>
(*<b>FT_Raster_RenderFunc</b>)( <a href="ft2-raster.html#FT_Raster">FT_Raster</a> raster,
<span class="keyword">const</span> <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a>* params );
#define FT_Raster_Render_Func <b>FT_Raster_RenderFunc</b>
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Invoke a given raster to scan-convert a given glyph image into a target bitmap.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>raster</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="raster">raster</td><td class="desc">
<p>A handle to the raster object.</p>
</td></tr>
-<tr valign=top><td><b>params</b></td><td>
+<tr><td class="val" id="params">params</td><td class="desc">
<p>A pointer to an <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure used to store the rendering parameters.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>Error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The exact format of the source image depends on the raster's glyph format defined in its <a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a> structure. It can be an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> or anything else in order to support a large array of glyph formats.</p>
<p>Note also that the render function can fail and return a &lsquo;FT_Err_Unimplemented_Feature&rsquo; error code if the raster used does not support direct composition.</p>
-<p>XXX: For now, the standard raster doesn't support direct composition but this should change for the final release (see the files &lsquo;demos/src/ftgrays.c&rsquo; and &lsquo;demos/src/ftgrays2.c&rsquo; for examples of distinct implementations which support direct composition).</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Raster_Funcs">FT_Raster_Funcs</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_IMAGE_H (freetype/ftimage.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>XXX: For now, the standard raster doesn't support direct composition but this should change for the final release (see the files &lsquo;demos/src/ftgrays.c&rsquo; and &lsquo;demos/src/ftgrays2.c&rsquo; for examples of distinct implementations that support direct composition).</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Raster_Funcs">FT_Raster_Funcs</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Raster_Funcs_
{
<a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a> glyph_format;
@@ -571,36 +472,61 @@ Defined in FT_IMAGE_H (freetype/ftimage.h).
<a href="ft2-raster.html#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a> raster_done;
} <b>FT_Raster_Funcs</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to describe a given raster class to the library.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>glyph_format</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="glyph_format">glyph_format</td><td class="desc">
<p>The supported glyph format for this raster.</p>
</td></tr>
-<tr valign=top><td><b>raster_new</b></td><td>
+<tr><td class="val" id="raster_new">raster_new</td><td class="desc">
<p>The raster constructor.</p>
</td></tr>
-<tr valign=top><td><b>raster_reset</b></td><td>
+<tr><td class="val" id="raster_reset">raster_reset</td><td class="desc">
<p>Used to reset the render pool within the raster.</p>
</td></tr>
-<tr valign=top><td><b>raster_render</b></td><td>
+<tr><td class="val" id="raster_render">raster_render</td><td class="desc">
<p>A function to render a glyph into a given bitmap.</p>
</td></tr>
-<tr valign=top><td><b>raster_done</b></td><td>
+<tr><td class="val" id="raster_done">raster_done</td><td class="desc">
<p>The raster destructor.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">int</span>
+ (*<b>FT_Raster_BitTest_Func</b>)( <span class="keyword">int</span> y,
+ <span class="keyword">int</span> x,
+ <span class="keyword">void</span>* user );
+</pre>
+
+<p>Deprecated, unimplemented.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</h3>
+<p>Defined in FT_IMAGE_H (ftimage.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">void</span>
+ (*<b>FT_Raster_BitSet_Func</b>)( <span class="keyword">int</span> y,
+ <span class="keyword">int</span> x,
+ <span class="keyword">void</span>* user );
+</pre>
+
+<p>Deprecated, unimplemented.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-sfnt_names.html b/docs/reference/ft2-sfnt_names.html
index ab1312a..3bd918d 100644
--- a/docs/reference/ft2-sfnt_names.html
+++ b/docs/reference/ft2-sfnt_names.html
@@ -3,64 +3,124 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-SFNT Names
-</h1></center>
+<h1>SFNT Names</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_SfntName">FT_SfntName</a></td></tr>
-<tr><td></td><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td></tr>
-<tr><td></td><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td></tr>
-<tr><td></td><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td></tr>
-<tr><td></td><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_SfntName">FT_SfntName</a></td></tr>
+<tr><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td></tr>
+<tr><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td></tr>
+<tr><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td></tr>
+<tr><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td></tr>
+</table>
+
+
<p>The TrueType and OpenType specifications allow the inclusion of a special &lsquo;names table&rsquo; in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.</p>
<p>The definitions below are used to access them if available.</p>
<p>Note that this has nothing to do with glyph names!</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_SfntName">FT_SfntName</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_SfntName">FT_SfntName</h3>
+<p>Defined in FT_SFNT_NAMES_H (ftsnames.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SfntName_
{
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> platform_id;
@@ -72,161 +132,125 @@ Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> string_len; /* in bytes */
} <b>FT_SfntName</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model an SFNT &lsquo;name&rsquo; table entry.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>platform_id</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="platform_id">platform_id</td><td class="desc">
<p>The platform ID for &lsquo;string&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>encoding_id</b></td><td>
+<tr><td class="val" id="encoding_id">encoding_id</td><td class="desc">
<p>The encoding ID for &lsquo;string&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>language_id</b></td><td>
+<tr><td class="val" id="language_id">language_id</td><td class="desc">
<p>The language ID for &lsquo;string&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>name_id</b></td><td>
+<tr><td class="val" id="name_id">name_id</td><td class="desc">
<p>An identifier for &lsquo;string&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>string</b></td><td>
+<tr><td class="val" id="string">string</td><td class="desc">
<p>The &lsquo;name&rsquo; string. Note that its format differs depending on the (platform,encoding) pair. It can be a Pascal String, a UTF-16 one, etc.</p>
<p>Generally speaking, the string is not zero-terminated. Please refer to the TrueType specification for details.</p>
</td></tr>
-<tr valign=top><td><b>string_len</b></td><td>
+<tr><td class="val" id="string_len">string_len</td><td class="desc">
<p>The length of &lsquo;string&rsquo; in bytes.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Possible values for &lsquo;platform_id&rsquo;, &lsquo;encoding_id&rsquo;, &lsquo;language_id&rsquo;, and &lsquo;name_id&rsquo; are given in the file &lsquo;ttnameid.h&rsquo;. For details please refer to the TrueType or OpenType specification.</p>
<p>See also <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a>, <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a>, and <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a>.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</h3>
+<p>Defined in FT_SFNT_NAMES_H (ftsnames.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
<b>FT_Get_Sfnt_Name_Count</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the number of name strings in the SFNT &lsquo;name&rsquo; table.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The number of strings in the &lsquo;name&rsquo; table.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</h3>
+<p>Defined in FT_SFNT_NAMES_H (ftsnames.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_Sfnt_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> idx,
<a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a> *aname );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve a string of the SFNT &lsquo;name&rsquo; table for a given index.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
-<tr valign=top><td><b>idx</b></td><td>
+<tr><td class="val" id="idx">idx</td><td class="desc">
<p>The index of the &lsquo;name&rsquo; string.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aname</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aname">aname</td><td class="desc">
<p>The indexed <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a> structure.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The &lsquo;string&rsquo; array returned in the &lsquo;aname&rsquo; structure is not null-terminated. The application should deallocate it if it is no longer in use.</p>
<p>Use <a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a> to get the total number of available &lsquo;name&rsquo; table entries, then do a loop until you get the right platform, encoding, and name ID.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</h3>
+<p>Defined in FT_SFNT_NAMES_H (ftsnames.h).</p>
+<pre>
#define <b>FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</b> <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 'f' )
+</pre>
+
+<p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to make FT_Open_Face() ignore preferred family subfamily names in &lsquo;name&rsquo; table since OpenType version 1.4. For backwards compatibility with legacy systems that have a 4-face-per-family restriction.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to make FT_Open_Face() ignore preferred family subfamily names in &lsquo;name&rsquo; table since OpenType version 1.4. For backwards compatibility with legacy systems which has 4-face-per-family restriction.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</h3>
+<p>Defined in FT_SFNT_NAMES_H (ftsnames.h).</p>
+<pre>
#define <b>FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</b> <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 's' )
+</pre>
+
+<p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to make FT_Open_Face() ignore preferred subfamily names in &lsquo;name&rsquo; table since OpenType version 1.4. For backwards compatibility with legacy systems that have a 4-face-per-family restriction.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to make FT_Open_Face() ignore preferred subfamily names in &lsquo;name&rsquo; table since OpenType version 1.4. For backwards compatibility with legacy systems which has 4-face-per-family restriction.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-sizes_management.html b/docs/reference/ft2-sizes_management.html
index 104957b..50563eb 100644
--- a/docs/reference/ft2-sizes_management.html
+++ b/docs/reference/ft2-sizes_management.html
@@ -3,162 +3,200 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Size Management
-</h1></center>
+<h1>Size Management</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_New_Size">FT_New_Size</a></td><td></td><td><a href="#FT_Done_Size">FT_Done_Size</a></td><td></td><td><a href="#FT_Activate_Size">FT_Activate_Size</a></td><td></td><td></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_New_Size">FT_New_Size</a></td><td><a href="#FT_Done_Size">FT_Done_Size</a></td><td><a href="#FT_Activate_Size">FT_Activate_Size</a></td><td></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>When creating a new face object (e.g., with <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a>), an <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object is automatically created and used to store all pixel-size dependent information, available in the &lsquo;face-&gt;size&rsquo; field.</p>
<p>It is however possible to create more sizes for a given face, mostly in order to manage several character pixel sizes of the same font family and style. See <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> and <a href="ft2-sizes_management.html#FT_Done_Size">FT_Done_Size</a>.</p>
<p>Note that <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a> and <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> only modify the contents of the current &lsquo;active&rsquo; size; you thus need to use <a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a> to change it.</p>
<p>99% of applications won't need the functions provided here, especially if they use the caching sub-system, so be cautious when using these.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_New_Size">FT_New_Size</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SIZES_H (freetype/ftsizes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_New_Size">FT_New_Size</h3>
+<p>Defined in FT_SIZES_H (ftsizes.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_New_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-base_interface.html#FT_Size">FT_Size</a>* size );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Create a new size object from a given face object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a parent face object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>asize</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="asize">asize</td><td class="desc">
<p>A handle to a new size object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>You need to call <a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a> in order to select the new size for upcoming calls to <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a>, <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>, <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>, etc.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Done_Size">FT_Done_Size</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SIZES_H (freetype/ftsizes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Done_Size">FT_Done_Size</h3>
+<p>Defined in FT_SIZES_H (ftsizes.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Done_Size</b>( <a href="ft2-base_interface.html#FT_Size">FT_Size</a> size );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Discard a given size object. Note that <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> automatically discards all size objects allocated with <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>size</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="size">size</td><td class="desc">
<p>A handle to a target size object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Activate_Size">FT_Activate_Size</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SIZES_H (freetype/ftsizes.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Activate_Size">FT_Activate_Size</h3>
+<p>Defined in FT_SIZES_H (ftsizes.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Activate_Size</b>( <a href="ft2-base_interface.html#FT_Size">FT_Size</a> size );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Even though it is possible to create several size objects for a given face (see <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> for details), functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a> only use the one which has been activated last to determine the &lsquo;current character pixel size&rsquo;.</p>
+<p>Even though it is possible to create several size objects for a given face (see <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> for details), functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a> only use the one that has been activated last to determine the &lsquo;current character pixel size&rsquo;.</p>
<p>This function can be used to &lsquo;activate&rsquo; a previously created size object.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>size</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="size">size</td><td class="desc">
<p>A handle to a target size object.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If &lsquo;face&rsquo; is the size's parent face object, this function changes the value of &lsquo;face-&gt;size&rsquo; to the input size handle.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-system_interface.html b/docs/reference/ft2-system_interface.html
index 63b55b3..139cbc7 100644
--- a/docs/reference/ft2-system_interface.html
+++ b/docs/reference/ft2-system_interface.html
@@ -3,193 +3,222 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-System Interface
-</h1></center>
+<h1>System Interface</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_Memory">FT_Memory</a></td><td></td><td><a href="#FT_MemoryRec">FT_MemoryRec</a></td><td></td><td><a href="#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></td></tr>
-<tr><td></td><td><a href="#FT_Alloc_Func">FT_Alloc_Func</a></td><td></td><td><a href="#FT_Stream">FT_Stream</a></td><td></td><td><a href="#FT_StreamRec">FT_StreamRec</a></td></tr>
-<tr><td></td><td><a href="#FT_Free_Func">FT_Free_Func</a></td><td></td><td><a href="#FT_StreamDesc">FT_StreamDesc</a></td><td></td><td></td></tr>
-<tr><td></td><td><a href="#FT_Realloc_Func">FT_Realloc_Func</a></td><td></td><td><a href="#FT_Stream_IoFunc">FT_Stream_IoFunc</a></td><td></td><td></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#FT_Memory">FT_Memory</a></td><td><a href="#FT_MemoryRec">FT_MemoryRec</a></td><td><a href="#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></td></tr>
+<tr><td><a href="#FT_Alloc_Func">FT_Alloc_Func</a></td><td><a href="#FT_Stream">FT_Stream</a></td><td><a href="#FT_StreamRec">FT_StreamRec</a></td></tr>
+<tr><td><a href="#FT_Free_Func">FT_Free_Func</a></td><td><a href="#FT_StreamDesc">FT_StreamDesc</a></td><td></td></tr>
+<tr><td><a href="#FT_Realloc_Func">FT_Realloc_Func</a></td><td><a href="#FT_Stream_IoFunc">FT_Stream_IoFunc</a></td><td></td></tr>
+</table>
+
+
<p>This section contains various definitions related to memory management and i/o access. You need to understand this information if you want to use a custom memory manager or you own i/o streams.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Memory">FT_Memory</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SYSTEM_H (freetype/ftsystem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Memory">FT_Memory</h3>
+<p>Defined in FT_SYSTEM_H (ftsystem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_MemoryRec_* <b>FT_Memory</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a given memory manager object, defined with an <a href="ft2-system_interface.html#FT_MemoryRec">FT_MemoryRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Alloc_Func">FT_Alloc_Func</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SYSTEM_H (freetype/ftsystem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Alloc_Func">FT_Alloc_Func</h3>
+<p>Defined in FT_SYSTEM_H (ftsystem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">void</span>*
(*<b>FT_Alloc_Func</b>)( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
<span class="keyword">long</span> size );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to allocate &lsquo;size&rsquo; bytes from &lsquo;memory&rsquo;.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>memory</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A handle to the source memory manager.</p>
</td></tr>
-<tr valign=top><td><b>size</b></td><td>
+<tr><td class="val" id="size">size</td><td class="desc">
<p>The size in bytes to allocate.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>Address of new memory block. 0&nbsp;in case of failure.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Free_Func">FT_Free_Func</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SYSTEM_H (freetype/ftsystem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Free_Func">FT_Free_Func</h3>
+<p>Defined in FT_SYSTEM_H (ftsystem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">void</span>
(*<b>FT_Free_Func</b>)( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
<span class="keyword">void</span>* block );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to release a given block of memory.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>memory</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A handle to the source memory manager.</p>
</td></tr>
-<tr valign=top><td><b>block</b></td><td>
+<tr><td class="val" id="block">block</td><td class="desc">
<p>The address of the target memory block.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Realloc_Func">FT_Realloc_Func</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SYSTEM_H (freetype/ftsystem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Realloc_Func">FT_Realloc_Func</h3>
+<p>Defined in FT_SYSTEM_H (ftsystem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">void</span>*
(*<b>FT_Realloc_Func</b>)( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
<span class="keyword">long</span> cur_size,
<span class="keyword">long</span> new_size,
<span class="keyword">void</span>* block );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to re-allocate a given block of memory.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>memory</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A handle to the source memory manager.</p>
</td></tr>
-<tr valign=top><td><b>cur_size</b></td><td>
+<tr><td class="val" id="cur_size">cur_size</td><td class="desc">
<p>The block's current size in bytes.</p>
</td></tr>
-<tr valign=top><td><b>new_size</b></td><td>
+<tr><td class="val" id="new_size">new_size</td><td class="desc">
<p>The block's requested new size.</p>
</td></tr>
-<tr valign=top><td><b>block</b></td><td>
+<tr><td class="val" id="block">block</td><td class="desc">
<p>The block's current address.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>New block address. 0&nbsp;in case of memory shortage.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>In case of error, the old block must still be available.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_MemoryRec">FT_MemoryRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SYSTEM_H (freetype/ftsystem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_MemoryRec">FT_MemoryRec</h3>
+<p>Defined in FT_SYSTEM_H (ftsystem.h).</p>
+<pre>
<span class="keyword">struct</span> FT_MemoryRec_
{
<span class="keyword">void</span>* user;
@@ -197,158 +226,123 @@ Defined in FT_SYSTEM_H (freetype/ftsystem.h).
<a href="ft2-system_interface.html#FT_Free_Func">FT_Free_Func</a> free;
<a href="ft2-system_interface.html#FT_Realloc_Func">FT_Realloc_Func</a> realloc;
};
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to describe a given memory manager to FreeType&nbsp;2.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>user</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="user">user</td><td class="desc">
<p>A generic typeless pointer for user data.</p>
</td></tr>
-<tr valign=top><td><b>alloc</b></td><td>
+<tr><td class="val" id="alloc">alloc</td><td class="desc">
<p>A pointer type to an allocation function.</p>
</td></tr>
-<tr valign=top><td><b>free</b></td><td>
+<tr><td class="val" id="free">free</td><td class="desc">
<p>A pointer type to an memory freeing function.</p>
</td></tr>
-<tr valign=top><td><b>realloc</b></td><td>
+<tr><td class="val" id="realloc">realloc</td><td class="desc">
<p>A pointer type to a reallocation function.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stream">FT_Stream</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SYSTEM_H (freetype/ftsystem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stream">FT_Stream</h3>
+<p>Defined in FT_SYSTEM_H (ftsystem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_StreamRec_* <b>FT_Stream</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to an input stream.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_StreamDesc">FT_StreamDesc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SYSTEM_H (freetype/ftsystem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>also</h4>
+<p>See <a href="ft2-system_interface.html#FT_StreamRec">FT_StreamRec</a> for the publicly accessible fields of a given stream object.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_StreamDesc">FT_StreamDesc</h3>
+<p>Defined in FT_SYSTEM_H (ftsystem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">union</span> FT_StreamDesc_
{
<span class="keyword">long</span> value;
<span class="keyword">void</span>* pointer;
} <b>FT_StreamDesc</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A union type used to store either a long or a pointer. This is used to store a file descriptor or a &lsquo;FILE*&rsquo; in an input stream.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stream_IoFunc">FT_Stream_IoFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SYSTEM_H (freetype/ftsystem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stream_IoFunc">FT_Stream_IoFunc</h3>
+<p>Defined in FT_SYSTEM_H (ftsystem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">long</span>
(*<b>FT_Stream_IoFunc</b>)( <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> stream,
<span class="keyword">unsigned</span> <span class="keyword">long</span> offset,
<span class="keyword">unsigned</span> <span class="keyword">char</span>* buffer,
<span class="keyword">unsigned</span> <span class="keyword">long</span> count );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to seek and read data from a given input stream.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stream</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stream">stream</td><td class="desc">
<p>A handle to the source stream.</p>
</td></tr>
-<tr valign=top><td><b>offset</b></td><td>
+<tr><td class="val" id="offset">offset</td><td class="desc">
<p>The offset of read in stream (always from start).</p>
</td></tr>
-<tr valign=top><td><b>buffer</b></td><td>
+<tr><td class="val" id="buffer">buffer</td><td class="desc">
<p>The address of the read buffer.</p>
</td></tr>
-<tr valign=top><td><b>count</b></td><td>
+<tr><td class="val" id="count">count</td><td class="desc">
<p>The number of bytes to read from the stream.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The number of bytes effectively read by the stream.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function might be called to perform a seek or skip operation with a &lsquo;count&rsquo; of&nbsp;0. A non-zero return value then indicates an error.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SYSTEM_H (freetype/ftsystem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Stream_CloseFunc">FT_Stream_CloseFunc</h3>
+<p>Defined in FT_SYSTEM_H (ftsystem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">void</span>
(*<b>FT_Stream_CloseFunc</b>)( <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a> stream );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A function used to close a given input stream.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>stream</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="stream">stream</td><td class="desc">
<p>A handle to the target stream.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_StreamRec">FT_StreamRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_SYSTEM_H (freetype/ftsystem.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_StreamRec">FT_StreamRec</h3>
+<p>Defined in FT_SYSTEM_H (ftsystem.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_StreamRec_
{
<span class="keyword">unsigned</span> <span class="keyword">char</span>* base;
@@ -365,51 +359,47 @@ Defined in FT_SYSTEM_H (freetype/ftsystem.h).
<span class="keyword">unsigned</span> <span class="keyword">char</span>* limit;
} <b>FT_StreamRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to describe an input stream.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>base</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="base">base</td><td class="desc">
<p>For memory-based streams, this is the address of the first stream byte in memory. This field should always be set to NULL for disk-based streams.</p>
</td></tr>
-<tr valign=top><td><b>size</b></td><td>
+<tr><td class="val" id="size">size</td><td class="desc">
<p>The stream size in bytes.</p>
+<p>In case of compressed streams where the size is unknown before actually doing the decompression, the value is set to 0x7FFFFFFF. (Note that this size value can occur for normal streams also; it is thus just a hint.)</p>
</td></tr>
-<tr valign=top><td><b>pos</b></td><td>
+<tr><td class="val" id="pos">pos</td><td class="desc">
<p>The current position within the stream.</p>
</td></tr>
-<tr valign=top><td><b>descriptor</b></td><td>
+<tr><td class="val" id="descriptor">descriptor</td><td class="desc">
<p>This field is a union that can hold an integer or a pointer. It is used by stream implementations to store file descriptors or &lsquo;FILE*&rsquo; pointers.</p>
</td></tr>
-<tr valign=top><td><b>pathname</b></td><td>
+<tr><td class="val" id="pathname">pathname</td><td class="desc">
<p>This field is completely ignored by FreeType. However, it is often useful during debugging to use it to store the stream's filename (where available).</p>
</td></tr>
-<tr valign=top><td><b>read</b></td><td>
+<tr><td class="val" id="read">read</td><td class="desc">
<p>The stream's input function.</p>
</td></tr>
-<tr valign=top><td><b>close</b></td><td>
+<tr><td class="val" id="close">close</td><td class="desc">
<p>The stream's close function.</p>
</td></tr>
-<tr valign=top><td><b>memory</b></td><td>
+<tr><td class="val" id="memory">memory</td><td class="desc">
<p>The memory manager to use to preload frames. This is set internally by FreeType and shouldn't be touched by stream implementations.</p>
</td></tr>
-<tr valign=top><td><b>cursor</b></td><td>
+<tr><td class="val" id="cursor">cursor</td><td class="desc">
<p>This field is set and used internally by FreeType when parsing frames.</p>
</td></tr>
-<tr valign=top><td><b>limit</b></td><td>
+<tr><td class="val" id="limit">limit</td><td class="desc">
<p>This field is set and used internally by FreeType when parsing frames.</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-toc.html b/docs/reference/ft2-toc.html
index 9410b9e..6109816 100644
--- a/docs/reference/ft2-toc.html
+++ b/docs/reference/ft2-toc.html
@@ -3,217 +3,268 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>Table of Contents</h1></center>
-<br><table align=center width="75%"><tr><td><h2>General Remarks</h2><ul class="empty"><li>
-<table cellpadding=5>
-<tr valign=top><td class="left">
-<a href="ft2-user_allocation.html">User allocation</a></td><td>
+<h1>Table of Contents</h1>
+<div class="section">
+<h2>General Remarks</h2>
+<table class="toc">
+<tr><td class="link"><a href="ft2-header_inclusion.html">FreeType's header inclusion scheme</a></td><td class="desc">
+<p>How client applications should include FreeType header files.</p>
+</td></tr>
+<tr><td class="link"><a href="ft2-user_allocation.html">User allocation</a></td><td class="desc">
<p>How client applications should allocate FreeType data structures.</p>
</td></tr>
</table>
-</li></ul></td></tr></table>
-<br><table align=center width="75%"><tr><td><h2>Core API</h2><ul class="empty"><li>
-<table cellpadding=5>
-<tr valign=top><td class="left">
-<a href="ft2-version.html">FreeType Version</a></td><td>
+</div>
+<div class="section">
+<h2>Core API</h2>
+<table class="toc">
+<tr><td class="link"><a href="ft2-version.html">FreeType Version</a></td><td class="desc">
<p>Functions and macros related to FreeType versions.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-basic_types.html">Basic Data Types</a></td><td>
+<tr><td class="link"><a href="ft2-basic_types.html">Basic Data Types</a></td><td class="desc">
<p>The basic data types defined by the library.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-base_interface.html">Base Interface</a></td><td>
+<tr><td class="link"><a href="ft2-base_interface.html">Base Interface</a></td><td class="desc">
<p>The FreeType&nbsp;2 base font interface.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-glyph_variants.html">Glyph Variants</a></td><td>
+<tr><td class="link"><a href="ft2-glyph_variants.html">Glyph Variants</a></td><td class="desc">
<p>The FreeType&nbsp;2 interface to Unicode Ideographic Variation Sequences (IVS), using the SFNT cmap format&nbsp;14.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-glyph_management.html">Glyph Management</a></td><td>
+<tr><td class="link"><a href="ft2-glyph_management.html">Glyph Management</a></td><td class="desc">
<p>Generic interface to manage individual glyph data.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-mac_specific.html">Mac Specific Interface</a></td><td>
+<tr><td class="link"><a href="ft2-mac_specific.html">Mac Specific Interface</a></td><td class="desc">
<p>Only available on the Macintosh.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-sizes_management.html">Size Management</a></td><td>
+<tr><td class="link"><a href="ft2-sizes_management.html">Size Management</a></td><td class="desc">
<p>Managing multiple sizes per face.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-header_file_macros.html">Header File Macros</a></td><td>
+<tr><td class="link"><a href="ft2-header_file_macros.html">Header File Macros</a></td><td class="desc">
<p>Macro definitions used to #include specific header files.</p>
</td></tr>
</table>
-</li></ul></td></tr></table>
-<br><table align=center width="75%"><tr><td><h2>Format-Specific API</h2><ul class="empty"><li>
-<table cellpadding=5>
-<tr valign=top><td class="left">
-<a href="ft2-multiple_masters.html">Multiple Masters</a></td><td>
+</div>
+<div class="section">
+<h2>Format-Specific API</h2>
+<table class="toc">
+<tr><td class="link"><a href="ft2-multiple_masters.html">Multiple Masters</a></td><td class="desc">
<p>How to manage Multiple Masters fonts.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-truetype_tables.html">TrueType Tables</a></td><td>
+<tr><td class="link"><a href="ft2-truetype_tables.html">TrueType Tables</a></td><td class="desc">
<p>TrueType specific table types and functions.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-type1_tables.html">Type 1 Tables</a></td><td>
+<tr><td class="link"><a href="ft2-type1_tables.html">Type 1 Tables</a></td><td class="desc">
<p>Type&nbsp;1 (PostScript) specific font tables.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-sfnt_names.html">SFNT Names</a></td><td>
+<tr><td class="link"><a href="ft2-sfnt_names.html">SFNT Names</a></td><td class="desc">
<p>Access the names embedded in TrueType and OpenType files.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-bdf_fonts.html">BDF and PCF Files</a></td><td>
+<tr><td class="link"><a href="ft2-bdf_fonts.html">BDF and PCF Files</a></td><td class="desc">
<p>BDF and PCF specific API.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-cid_fonts.html">CID Fonts</a></td><td>
+<tr><td class="link"><a href="ft2-cid_fonts.html">CID Fonts</a></td><td class="desc">
<p>CID-keyed font specific API.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-pfr_fonts.html">PFR Fonts</a></td><td>
+<tr><td class="link"><a href="ft2-pfr_fonts.html">PFR Fonts</a></td><td class="desc">
<p>PFR/TrueDoc specific API.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-winfnt_fonts.html">Window FNT Files</a></td><td>
+<tr><td class="link"><a href="ft2-winfnt_fonts.html">Window FNT Files</a></td><td class="desc">
<p>Windows FNT specific API.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-font_formats.html">Font Formats</a></td><td>
+<tr><td class="link"><a href="ft2-font_formats.html">Font Formats</a></td><td class="desc">
<p>Getting the font format.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-gasp_table.html">Gasp Table</a></td><td>
+<tr><td class="link"><a href="ft2-gasp_table.html">Gasp Table</a></td><td class="desc">
<p>Retrieving TrueType &lsquo;gasp&rsquo; table entries.</p>
</td></tr>
</table>
-</li></ul></td></tr></table>
-<br><table align=center width="75%"><tr><td><h2>Cache Sub-System</h2><ul class="empty"><li>
-<table cellpadding=5>
-<tr valign=top><td class="left">
-<a href="ft2-cache_subsystem.html">Cache Sub-System</a></td><td>
+</div>
+<div class="section">
+<h2>Controlling FreeType Modules</h2>
+<table class="toc">
+<tr><td class="link"><a href="ft2-auto_hinter.html">The auto-hinter</a></td><td class="desc">
+<p>Controlling the auto-hinting module.</p>
+</td></tr>
+<tr><td class="link"><a href="ft2-cff_driver.html">The CFF driver</a></td><td class="desc">
+<p>Controlling the CFF driver module.</p>
+</td></tr>
+<tr><td class="link"><a href="ft2-tt_driver.html">The TrueType driver</a></td><td class="desc">
+<p>Controlling the TrueType driver module.</p>
+</td></tr>
+</table>
+</div>
+<div class="section">
+<h2>Cache Sub-System</h2>
+<table class="toc">
+<tr><td class="link"><a href="ft2-cache_subsystem.html">Cache Sub-System</a></td><td class="desc">
<p>How to cache face, size, and glyph data with FreeType&nbsp;2.</p>
</td></tr>
</table>
-</li></ul></td></tr></table>
-<br><table align=center width="75%"><tr><td><h2>Support API</h2><ul class="empty"><li>
-<table cellpadding=5>
-<tr valign=top><td class="left">
-<a href="ft2-computations.html">Computations</a></td><td>
+</div>
+<div class="section">
+<h2>Support API</h2>
+<table class="toc">
+<tr><td class="link"><a href="ft2-computations.html">Computations</a></td><td class="desc">
<p>Crunching fixed numbers and vectors.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-list_processing.html">List Processing</a></td><td>
+<tr><td class="link"><a href="ft2-list_processing.html">List Processing</a></td><td class="desc">
<p>Simple management of lists.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-outline_processing.html">Outline Processing</a></td><td>
+<tr><td class="link"><a href="ft2-outline_processing.html">Outline Processing</a></td><td class="desc">
<p>Functions to create, transform, and render vectorial glyph images.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-quick_advance.html">Quick retrieval of advance values</a></td><td>
+<tr><td class="link"><a href="ft2-quick_advance.html">Quick retrieval of advance values</a></td><td class="desc">
<p>Retrieve horizontal and vertical advance values without processing glyph outlines, if possible.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-bitmap_handling.html">Bitmap Handling</a></td><td>
+<tr><td class="link"><a href="ft2-bitmap_handling.html">Bitmap Handling</a></td><td class="desc">
<p>Handling FT_Bitmap objects.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-raster.html">Scanline Converter</a></td><td>
+<tr><td class="link"><a href="ft2-raster.html">Scanline Converter</a></td><td class="desc">
<p>How vectorial outlines are converted into bitmaps and pixmaps.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-glyph_stroker.html">Glyph Stroker</a></td><td>
+<tr><td class="link"><a href="ft2-glyph_stroker.html">Glyph Stroker</a></td><td class="desc">
<p>Generating bordered and stroked glyphs.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-system_interface.html">System Interface</a></td><td>
+<tr><td class="link"><a href="ft2-system_interface.html">System Interface</a></td><td class="desc">
<p>How FreeType manages memory and i/o.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-module_management.html">Module Management</a></td><td>
-<p>How to add, upgrade, and remove modules from FreeType.</p>
+<tr><td class="link"><a href="ft2-module_management.html">Module Management</a></td><td class="desc">
+<p>How to add, upgrade, remove, and control modules from FreeType.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-gzip.html">GZIP Streams</a></td><td>
+<tr><td class="link"><a href="ft2-gzip.html">GZIP Streams</a></td><td class="desc">
<p>Using gzip-compressed font files.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-lzw.html">LZW Streams</a></td><td>
+<tr><td class="link"><a href="ft2-lzw.html">LZW Streams</a></td><td class="desc">
<p>Using LZW-compressed font files.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-bzip2.html">BZIP2 Streams</a></td><td>
+<tr><td class="link"><a href="ft2-bzip2.html">BZIP2 Streams</a></td><td class="desc">
<p>Using bzip2-compressed font files.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-lcd_filtering.html">LCD Filtering</a></td><td>
+<tr><td class="link"><a href="ft2-lcd_filtering.html">LCD Filtering</a></td><td class="desc">
<p>Reduce color fringes of LCD-optimized bitmaps.</p>
</td></tr>
</table>
-</li></ul></td></tr></table>
-<br><table align=center width="75%"><tr><td><h2>Miscellaneous</h2><ul class="empty"><li>
-<table cellpadding=5>
-<tr valign=top><td class="left">
-<a href="ft2-ot_validation.html">OpenType Validation</a></td><td>
+</div>
+<div class="section">
+<h2>Miscellaneous</h2>
+<table class="toc">
+<tr><td class="link"><a href="ft2-ot_validation.html">OpenType Validation</a></td><td class="desc">
<p>An API to validate OpenType tables.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-incremental.html">Incremental Loading</a></td><td>
+<tr><td class="link"><a href="ft2-incremental.html">Incremental Loading</a></td><td class="desc">
<p>Custom Glyph Loading.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-truetype_engine.html">The TrueType Engine</a></td><td>
+<tr><td class="link"><a href="ft2-truetype_engine.html">The TrueType Engine</a></td><td class="desc">
<p>TrueType bytecode support.</p>
</td></tr>
-<tr valign=top><td class="left">
-<a href="ft2-gx_validation.html">TrueTypeGX/AAT Validation</a></td><td>
+<tr><td class="link"><a href="ft2-gx_validation.html">TrueTypeGX/AAT Validation</a></td><td class="desc">
<p>An API to validate TrueTypeGX/AAT tables.</p>
</td></tr>
</table>
-</li></ul></td></tr></table>
-<br><table align=center width="75%"><tr><td><h2><a href="ft2-index.html">Global Index</a></h2><ul class="empty"><li></li></ul></td></tr></table>
+</div>
+<div class="section">
+<h2><a href="ft2-index.html">Global Index</a></h2></div>
<hr>
-<table><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-</tr></table>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td></tr></table>
-<center><font size=-2>generated on Thu Mar 8 21:09:06 2012</font></center></body>
+<div class="timestamp">generated on Tue Dec 30 21:42:54 2014</div></body>
</html>
diff --git a/docs/reference/ft2-truetype_engine.html b/docs/reference/ft2-truetype_engine.html
index 02c67e9..d0c467b 100644
--- a/docs/reference/ft2-truetype_engine.html
+++ b/docs/reference/ft2-truetype_engine.html
@@ -3,130 +3,174 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-The TrueType Engine
-</h1></center>
+<h1>The TrueType Engine</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></td><td></td><td><a href="#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></td><td><a href="#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>This section contains a function used to query the level of TrueType bytecode support compiled in this version of the library.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_TrueTypeEngineType">FT_TrueTypeEngineType</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_TrueTypeEngineType_
{
- <a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_NONE</a> = 0,
- <a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a>,
- <a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a>
+ <a href="ft2-truetype_engine.html#FT_TRUETYPE_ENGINE_TYPE_NONE">FT_TRUETYPE_ENGINE_TYPE_NONE</a> = 0,
+ <a href="ft2-truetype_engine.html#FT_TRUETYPE_ENGINE_TYPE_UNPATENTED">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a>,
+ <a href="ft2-truetype_engine.html#FT_TRUETYPE_ENGINE_TYPE_PATENTED">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a>
} <b>FT_TrueTypeEngineType</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A list of values describing which kind of TrueType bytecode engine is implemented in a given FT_Library instance. It is used by the <a href="ft2-truetype_engine.html#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a> function.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td colspan=0><b>FT_TRUETYPE_ENGINE_TYPE_NONE</b></td></tr>
-<tr valign=top><td></td><td>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_TRUETYPE_ENGINE_TYPE_NONE">FT_TRUETYPE_ENGINE_TYPE_NONE</td><td class="desc">
<p>The library doesn't implement any kind of bytecode interpreter.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_TRUETYPE_ENGINE_TYPE_UNPATENTED">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</td><td class="desc">
<p>The library implements a bytecode interpreter that doesn't support the patented operations of the TrueType virtual machine.</p>
-<p>Its main use is to load certain Asian fonts which position and scale glyph components with bytecode instructions. It produces bad output for most other fonts.</p>
+<p>Its main use is to load certain Asian fonts that position and scale glyph components with bytecode instructions. It produces bad output for most other fonts.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>FT_TRUETYPE_ENGINE_TYPE_PATENTED</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="FT_TRUETYPE_ENGINE_TYPE_PATENTED">FT_TRUETYPE_ENGINE_TYPE_PATENTED</td><td class="desc">
<p>The library implements a bytecode interpreter that covers the full instruction set of the TrueType virtual machine (this was governed by patents until May 2010, hence the name).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.2</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_MODULE_H (freetype/ftmodapi.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</h3>
+<p>Defined in FT_MODULE_H (ftmodapi.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a> )
<b>FT_Get_TrueType_Engine_Type</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return an <a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a> value to indicate which level of the TrueType virtual machine a given library instance supports.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A library instance.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>A value indicating which level is supported.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.2</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-truetype_tables.html b/docs/reference/ft2-truetype_tables.html
index a57ba4f..9c63d67 100644
--- a/docs/reference/ft2-truetype_tables.html
+++ b/docs/reference/ft2-truetype_tables.html
@@ -3,456 +3,129 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-TrueType Tables
-</h1></center>
+<h1>TrueType Tables</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td><td></td><td><a href="#TT_Postscript">TT_Postscript</a></td></tr>
-<tr><td></td><td><a href="#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td><td></td><td><a href="#TT_PCLT">TT_PCLT</a></td></tr>
-<tr><td></td><td><a href="#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td><td></td><td><a href="#TT_MaxProfile">TT_MaxProfile</a></td></tr>
-<tr><td></td><td><a href="#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td><td></td><td><a href="#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td></tr>
-<tr><td></td><td><a href="#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td><td></td><td><a href="#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td></tr>
-<tr><td></td><td><a href="#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td><td></td><td><a href="#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td></tr>
-<tr><td></td><td><a href="#TT_Header">TT_Header</a></td><td></td><td><a href="#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td></tr>
-<tr><td></td><td><a href="#TT_HoriHeader">TT_HoriHeader</a></td><td></td><td><a href="#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td></tr>
-<tr><td></td><td><a href="#TT_VertHeader">TT_VertHeader</a></td><td></td><td><a href="#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td></tr>
-<tr><td></td><td><a href="#TT_OS2">TT_OS2</a></td><td></td><td><a href="#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
-<p>This section contains the definition of TrueType-specific tables as well as some routines used to access and process them.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a> 0
-#define <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> 1
-#define <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a> 2 /* deprecated */
-#define <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a> 3
-#define <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_CUSTOM</a> 4
-#define <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a> 7 /* artificial */
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of valid values for the &lsquo;platform_id&rsquo; identifier code in <a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a> and <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a> structures.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td colspan=0><b>TT_PLATFORM_APPLE_UNICODE</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Used by Apple to indicate a Unicode character map and/or name entry. See <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a> for corresponding &lsquo;encoding_id&rsquo; values. Note that name entries in this format are coded as big-endian UCS-2 character codes <i>only</i>.</p>
-</td></tr>
-<tr valign=top><td><b>TT_PLATFORM_MACINTOSH</b></td><td>
-<p>Used by Apple to indicate a MacOS-specific charmap and/or name entry. See <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a> for corresponding &lsquo;encoding_id&rsquo; values. Note that most TrueType fonts contain an Apple roman charmap to be usable on MacOS systems (even if they contain a Microsoft charmap as well).</p>
-</td></tr>
-<tr valign=top><td><b>TT_PLATFORM_ISO</b></td><td>
-<p>This value was used to specify ISO/IEC 10646 charmaps. It is however now deprecated. See <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a> for a list of corresponding &lsquo;encoding_id&rsquo; values.</p>
-</td></tr>
-<tr valign=top><td><b>TT_PLATFORM_MICROSOFT</b></td><td>
-<p>Used by Microsoft to indicate Windows-specific charmaps. See <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a> for a list of corresponding &lsquo;encoding_id&rsquo; values. Note that most fonts contain a Unicode charmap using (TT_PLATFORM_MICROSOFT, <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a>).</p>
-</td></tr>
-<tr valign=top><td><b>TT_PLATFORM_CUSTOM</b></td><td>
-<p>Used to indicate application-specific charmaps.</p>
-</td></tr>
-<tr valign=top><td><b>TT_PLATFORM_ADOBE</b></td><td>
-<p>This value isn't part of any font format specification, but is used by FreeType to report Adobe-specific charmaps in an <a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a> structure. See <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a>.</p>
-</td></tr>
+<table class="synopsis">
+<tr><td><a href="#TT_Header">TT_Header</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#TT_HoriHeader">TT_HoriHeader</a></td><td><a href="#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td></tr>
+<tr><td><a href="#TT_VertHeader">TT_VertHeader</a></td><td><a href="#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td></tr>
+<tr><td><a href="#TT_OS2">TT_OS2</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#TT_Postscript">TT_Postscript</a></td><td><a href="#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td></tr>
+<tr><td><a href="#TT_PCLT">TT_PCLT</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#TT_MaxProfile">TT_MaxProfile</a></td><td><a href="#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
+<tr><td><a href="#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
+<tr><td><a href="#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
+<tr><td><a href="#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
+<tr><td><a href="#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_DEFAULT</a> 0 /* Unicode 1.0 */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_1_1</a> 1 /* specify Hangul at U+34xx */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_ISO_10646</a> 2 /* deprecated */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_2_0</a> 3 /* or later */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_32</a> 4 /* 2.0 or later, full repertoire */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_VARIANT_SELECTOR</a> 5 /* variation selector data */
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a> charmaps and name entries.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>TT_APPLE_ID_DEFAULT</b></td><td>
-<p>Unicode version 1.0.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>TT_APPLE_ID_UNICODE_1_1</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Unicode 1.1; specifies Hangul characters starting at U+34xx.</p>
-</td></tr>
-<tr valign=top><td><b>TT_APPLE_ID_ISO_10646</b></td><td>
-<p>Deprecated (identical to preceding).</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>TT_APPLE_ID_UNICODE_2_0</b></td></tr>
-<tr valign=top><td></td><td>
-<p>Unicode 2.0 and beyond (UTF-16 BMP only).</p>
-</td></tr>
-<tr valign=top><td><b>TT_APPLE_ID_UNICODE_32</b></td><td>
-<p>Unicode 3.1 and beyond, using UTF-32.</p>
-</td></tr>
-<tr valign=top><td colspan=0><b>TT_APPLE_ID_VARIANT_SELECTOR</b></td></tr>
-<tr valign=top><td></td><td>
-<p>From Adobe, not Apple. Not a normal cmap. Specifies variations on a real cmap.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a> 0
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_JAPANESE</a> 1
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TRADITIONAL_CHINESE</a> 2
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KOREAN</a> 3
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARABIC</a> 4
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_HEBREW</a> 5
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GREEK</a> 6
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_RUSSIAN</a> 7
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_RSYMBOL</a> 8
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_DEVANAGARI</a> 9
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GURMUKHI</a> 10
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GUJARATI</a> 11
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ORIYA</a> 12
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_BENGALI</a> 13
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TAMIL</a> 14
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TELUGU</a> 15
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KANNADA</a> 16
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MALAYALAM</a> 17
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SINHALESE</a> 18
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_BURMESE</a> 19
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KHMER</a> 20
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_THAI</a> 21
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_LAOTIAN</a> 22
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GEORGIAN</a> 23
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARMENIAN</a> 24
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MALDIVIAN</a> 25
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SIMPLIFIED_CHINESE</a> 25
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TIBETAN</a> 26
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MONGOLIAN</a> 27
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GEEZ</a> 28
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SLAVIC</a> 29
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_VIETNAMESE</a> 30
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SINDHI</a> 31
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_UNINTERP</a> 32
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> charmaps and name entries.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>TT_MAC_ID_ROMAN</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_JAPANESE</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td colspan=0><b>TT_MAC_ID_TRADITIONAL_CHINESE</b></td></tr>
-<tr valign=top><td></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_KOREAN</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_ARABIC</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_HEBREW</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_GREEK</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_RUSSIAN</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_RSYMBOL</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_DEVANAGARI</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_GURMUKHI</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_GUJARATI</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_ORIYA</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_BENGALI</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_TAMIL</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_TELUGU</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_KANNADA</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_MALAYALAM</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_SINHALESE</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_BURMESE</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_KHMER</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_THAI</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_LAOTIAN</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_GEORGIAN</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_ARMENIAN</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_MALDIVIAN</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td colspan=0><b>TT_MAC_ID_SIMPLIFIED_CHINESE</b></td></tr>
-<tr valign=top><td></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_TIBETAN</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_MONGOLIAN</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_GEEZ</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_SLAVIC</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_VIETNAMESE</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_SINDHI</b></td><td>
-<p></p>
-</td></tr>
-<tr valign=top><td><b>TT_MAC_ID_UNINTERP</b></td><td>
-<p></p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_7BIT_ASCII</a> 0
-#define <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_10646</a> 1
-#define <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_8859_1</a> 2
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a> charmaps and name entries.</p>
-<p>Their use is now deprecated.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>TT_ISO_ID_7BIT_ASCII</b></td><td>
-<p>ASCII.</p>
-</td></tr>
-<tr valign=top><td><b>TT_ISO_ID_10646</b></td><td>
-<p>ISO/10646.</p>
-</td></tr>
-<tr valign=top><td><b>TT_ISO_ID_8859_1</b></td><td>
-<p>Also known as Latin-1.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_MS_ID_XXX">TT_MS_ID_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SYMBOL_CS</a> 0
-#define <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a> 1
-#define <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SJIS</a> 2
-#define <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_GB2312</a> 3
-#define <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_BIG_5</a> 4
-#define <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_WANSUNG</a> 5
-#define <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_JOHAB</a> 6
-#define <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UCS_4</a> 10
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a> charmaps and name entries.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>TT_MS_ID_SYMBOL_CS</b></td><td>
-<p>Corresponds to Microsoft symbol encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a>.</p>
-</td></tr>
-<tr valign=top><td><b>TT_MS_ID_UNICODE_CS</b></td><td>
-<p>Corresponds to a Microsoft WGL4 charmap, matching Unicode. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a>.</p>
-</td></tr>
-<tr valign=top><td><b>TT_MS_ID_SJIS</b></td><td>
-<p>Corresponds to SJIS Japanese encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a>.</p>
-</td></tr>
-<tr valign=top><td><b>TT_MS_ID_GB2312</b></td><td>
-<p>Corresponds to Simplified Chinese as used in Mainland China. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a>.</p>
-</td></tr>
-<tr valign=top><td><b>TT_MS_ID_BIG_5</b></td><td>
-<p>Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a>.</p>
-</td></tr>
-<tr valign=top><td><b>TT_MS_ID_WANSUNG</b></td><td>
-<p>Corresponds to Korean Wansung encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a>.</p>
-</td></tr>
-<tr valign=top><td><b>TT_MS_ID_JOHAB</b></td><td>
-<p>Corresponds to Johab encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a>.</p>
-</td></tr>
-<tr valign=top><td><b>TT_MS_ID_UCS_4</b></td><td>
-<p>Corresponds to UCS-4 or UTF-32 charmaps. This has been added to the OpenType specification version 1.4 (mid-2001.)</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_STANDARD</a> 0
-#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_EXPERT</a> 1
-#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_CUSTOM</a> 2
-#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_LATIN_1</a> 3
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a> charmaps. This is a FreeType-specific extension!</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>TT_ADOBE_ID_STANDARD</b></td><td>
-<p>Adobe standard encoding.</p>
-</td></tr>
-<tr valign=top><td><b>TT_ADOBE_ID_EXPERT</b></td><td>
-<p>Adobe expert encoding.</p>
-</td></tr>
-<tr valign=top><td><b>TT_ADOBE_ID_CUSTOM</b></td><td>
-<p>Adobe custom encoding.</p>
-</td></tr>
-<tr valign=top><td><b>TT_ADOBE_ID_LATIN_1</b></td><td>
-<p>Adobe Latin&nbsp;1 encoding.</p>
-</td></tr>
-</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_Header">TT_Header</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+
+<p>This section contains the definition of TrueType-specific tables as well as some routines used to access and process them.</p>
+
+<div class="section">
+<h3 id="TT_Header">TT_Header</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> TT_Header_
{
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> Table_Version;
@@ -480,24 +153,17 @@ Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
<a href="ft2-basic_types.html#FT_Short">FT_Short</a> Glyph_Data_Format;
} <b>TT_Header</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model a TrueType font header table. All fields follow the TrueType specification.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_HoriHeader">TT_HoriHeader</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_HoriHeader">TT_HoriHeader</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> TT_HoriHeader_
{
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> Version;
@@ -527,82 +193,74 @@ Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
<span class="keyword">void</span>* short_metrics;
} <b>TT_HoriHeader</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model a TrueType horizontal header, the &lsquo;hhea&rsquo; table, as well as the corresponding horizontal metrics table, i.e., the &lsquo;hmtx&rsquo; table.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>Version</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="Version">Version</td><td class="desc">
<p>The table version.</p>
</td></tr>
-<tr valign=top><td><b>Ascender</b></td><td>
+<tr><td class="val" id="Ascender">Ascender</td><td class="desc">
<p>The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
<p>You should use the &lsquo;sTypoAscender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
</td></tr>
-<tr valign=top><td><b>Descender</b></td><td>
+<tr><td class="val" id="Descender">Descender</td><td class="desc">
<p>The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
<p>You should use the &lsquo;sTypoDescender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
</td></tr>
-<tr valign=top><td><b>Line_Gap</b></td><td>
+<tr><td class="val" id="Line_Gap">Line_Gap</td><td class="desc">
<p>The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.</p>
</td></tr>
-<tr valign=top><td><b>advance_Width_Max</b></td><td>
+<tr><td class="val" id="advance_Width_Max">advance_Width_Max</td><td class="desc">
<p>This field is the maximum of all advance widths found in the font. It can be used to compute the maximum width of an arbitrary string of text.</p>
</td></tr>
-<tr valign=top><td><b>min_Left_Side_Bearing</b></td><td>
+<tr><td class="val" id="min_Left_Side_Bearing">min_Left_Side_Bearing</td><td class="desc">
<p>The minimum left side bearing of all glyphs within the font.</p>
</td></tr>
-<tr valign=top><td><b>min_Right_Side_Bearing</b></td><td>
+<tr><td class="val" id="min_Right_Side_Bearing">min_Right_Side_Bearing</td><td class="desc">
<p>The minimum right side bearing of all glyphs within the font.</p>
</td></tr>
-<tr valign=top><td><b>xMax_Extent</b></td><td>
+<tr><td class="val" id="xMax_Extent">xMax_Extent</td><td class="desc">
<p>The maximum horizontal extent (i.e., the &lsquo;width&rsquo; of a glyph's bounding box) for all glyphs in the font.</p>
</td></tr>
-<tr valign=top><td><b>caret_Slope_Rise</b></td><td>
+<tr><td class="val" id="caret_Slope_Rise">caret_Slope_Rise</td><td class="desc">
<p>The rise coefficient of the cursor's slope of the cursor (slope=rise/run).</p>
</td></tr>
-<tr valign=top><td><b>caret_Slope_Run</b></td><td>
+<tr><td class="val" id="caret_Slope_Run">caret_Slope_Run</td><td class="desc">
<p>The run coefficient of the cursor's slope.</p>
</td></tr>
-<tr valign=top><td><b>Reserved</b></td><td>
+<tr><td class="val" id="Reserved">Reserved</td><td class="desc">
<p>8&nbsp;reserved bytes.</p>
</td></tr>
-<tr valign=top><td><b>metric_Data_Format</b></td><td>
+<tr><td class="val" id="metric_Data_Format">metric_Data_Format</td><td class="desc">
<p>Always&nbsp;0.</p>
</td></tr>
-<tr valign=top><td><b>number_Of_HMetrics</b></td><td>
+<tr><td class="val" id="number_Of_HMetrics">number_Of_HMetrics</td><td class="desc">
<p>Number of HMetrics entries in the &lsquo;hmtx&rsquo; table -- this value can be smaller than the total number of glyphs in the font.</p>
</td></tr>
-<tr valign=top><td><b>long_metrics</b></td><td>
+<tr><td class="val" id="long_metrics">long_metrics</td><td class="desc">
<p>A pointer into the &lsquo;hmtx&rsquo; table.</p>
</td></tr>
-<tr valign=top><td><b>short_metrics</b></td><td>
+<tr><td class="val" id="short_metrics">short_metrics</td><td class="desc">
<p>A pointer into the &lsquo;hmtx&rsquo; table.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields which are different.</p>
+
+<h4>note</h4>
+<p>IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields, which are different.</p>
<p>This ensures that a single function in the &lsquo;ttload&rsquo; module is able to read both the horizontal and vertical headers.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_VertHeader">TT_VertHeader</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_VertHeader">TT_VertHeader</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> TT_VertHeader_
{
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> Version;
@@ -632,86 +290,77 @@ Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
<span class="keyword">void</span>* short_metrics;
} <b>TT_VertHeader</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model a TrueType vertical header, the &lsquo;vhea&rsquo; table, as well as the corresponding vertical metrics table, i.e., the &lsquo;vmtx&rsquo; table.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>Version</b></td><td>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="Version">Version</td><td class="desc">
<p>The table version.</p>
</td></tr>
-<tr valign=top><td><b>Ascender</b></td><td>
+<tr><td class="val" id="Ascender">Ascender</td><td class="desc">
<p>The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
<p>You should use the &lsquo;sTypoAscender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
</td></tr>
-<tr valign=top><td><b>Descender</b></td><td>
+<tr><td class="val" id="Descender">Descender</td><td class="desc">
<p>The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
<p>You should use the &lsquo;sTypoDescender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
</td></tr>
-<tr valign=top><td><b>Line_Gap</b></td><td>
+<tr><td class="val" id="Line_Gap">Line_Gap</td><td class="desc">
<p>The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.</p>
</td></tr>
-<tr valign=top><td><b>advance_Height_Max</b></td><td>
+<tr><td class="val" id="advance_Height_Max">advance_Height_Max</td><td class="desc">
<p>This field is the maximum of all advance heights found in the font. It can be used to compute the maximum height of an arbitrary string of text.</p>
</td></tr>
-<tr valign=top><td><b>min_Top_Side_Bearing</b></td><td>
+<tr><td class="val" id="min_Top_Side_Bearing">min_Top_Side_Bearing</td><td class="desc">
<p>The minimum top side bearing of all glyphs within the font.</p>
</td></tr>
-<tr valign=top><td colspan=0><b>min_Bottom_Side_Bearing</b></td></tr>
-<tr valign=top><td></td><td>
+<tr><td class="val" id="min_Bottom_Side_Bearing">min_Bottom_Side_Bearing</td><td class="desc">
<p>The minimum bottom side bearing of all glyphs within the font.</p>
</td></tr>
-<tr valign=top><td><b>yMax_Extent</b></td><td>
+<tr><td class="val" id="yMax_Extent">yMax_Extent</td><td class="desc">
<p>The maximum vertical extent (i.e., the &lsquo;height&rsquo; of a glyph's bounding box) for all glyphs in the font.</p>
</td></tr>
-<tr valign=top><td><b>caret_Slope_Rise</b></td><td>
+<tr><td class="val" id="caret_Slope_Rise">caret_Slope_Rise</td><td class="desc">
<p>The rise coefficient of the cursor's slope of the cursor (slope=rise/run).</p>
</td></tr>
-<tr valign=top><td><b>caret_Slope_Run</b></td><td>
+<tr><td class="val" id="caret_Slope_Run">caret_Slope_Run</td><td class="desc">
<p>The run coefficient of the cursor's slope.</p>
</td></tr>
-<tr valign=top><td><b>caret_Offset</b></td><td>
+<tr><td class="val" id="caret_Offset">caret_Offset</td><td class="desc">
<p>The cursor's offset for slanted fonts. This value is &lsquo;reserved&rsquo; in vmtx version 1.0.</p>
</td></tr>
-<tr valign=top><td><b>Reserved</b></td><td>
+<tr><td class="val" id="Reserved">Reserved</td><td class="desc">
<p>8&nbsp;reserved bytes.</p>
</td></tr>
-<tr valign=top><td><b>metric_Data_Format</b></td><td>
+<tr><td class="val" id="metric_Data_Format">metric_Data_Format</td><td class="desc">
<p>Always&nbsp;0.</p>
</td></tr>
-<tr valign=top><td><b>number_Of_HMetrics</b></td><td>
+<tr><td class="val" id="number_Of_HMetrics">number_Of_HMetrics</td><td class="desc">
<p>Number of VMetrics entries in the &lsquo;vmtx&rsquo; table -- this value can be smaller than the total number of glyphs in the font.</p>
</td></tr>
-<tr valign=top><td><b>long_metrics</b></td><td>
+<tr><td class="val" id="long_metrics">long_metrics</td><td class="desc">
<p>A pointer into the &lsquo;vmtx&rsquo; table.</p>
</td></tr>
-<tr valign=top><td><b>short_metrics</b></td><td>
+<tr><td class="val" id="short_metrics">short_metrics</td><td class="desc">
<p>A pointer into the &lsquo;vmtx&rsquo; table.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields which are different.</p>
+
+<h4>note</h4>
+<p>IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields, which are different.</p>
<p>This ensures that a single function in the &lsquo;ttload&rsquo; module is able to read both the horizontal and vertical headers.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_OS2">TT_OS2</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_OS2">TT_OS2</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> TT_OS2_
{
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> version; /* 0x0001 - more or 0xFFFF */
@@ -749,12 +398,12 @@ Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> usWinAscent;
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> usWinDescent;
- /* only version 1 tables: */
+ /* only version 1 and higher: */
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> ulCodePageRange1; /* Bits 0-31 */
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> ulCodePageRange2; /* Bits 32-63 */
- /* only version 2 tables: */
+ /* only version 2 and higher: */
<a href="ft2-basic_types.html#FT_Short">FT_Short</a> sxHeight;
<a href="ft2-basic_types.html#FT_Short">FT_Short</a> sCapHeight;
@@ -762,26 +411,24 @@ Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> usBreakChar;
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> usMaxContext;
+ /* only version 5 and higher: */
+
+ <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> usLowerOpticalPointSize; /* in twips (1/20th points) */
+ <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> usUpperOpticalPointSize; /* in twips (1/20th points) */
+
} <b>TT_OS2</b>;
+</pre>
+
+<p>A structure used to model a TrueType OS/2 table. All fields comply to the OpenType specification.</p>
+<p>Note that we now support old Mac fonts that do not include an OS/2 table. In this case, the &lsquo;version&rsquo; field is always set to 0xFFFF.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A structure used to model a TrueType OS/2 table. This is the long table version. All fields comply to the TrueType specification.</p>
-<p>Note that we now support old Mac fonts which do not include an OS/2 table. In this case, the &lsquo;version&rsquo; field is always set to 0xFFFF.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_Postscript">TT_Postscript</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="TT_Postscript">TT_Postscript</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> TT_Postscript_
{
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> FormatType;
@@ -798,24 +445,17 @@ Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
/* load them by default. See the ttpost.c file. */
} <b>TT_Postscript</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model a TrueType PostScript table. All fields comply to the TrueType specification. This structure does not reference the PostScript glyph names, which can be nevertheless accessed with the &lsquo;ttpost&rsquo; module.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_PCLT">TT_PCLT</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_PCLT">TT_PCLT</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> TT_PCLT_
{
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> Version;
@@ -835,24 +475,17 @@ Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
<a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> Reserved;
} <b>TT_PCLT</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model a TrueType PCLT table. All fields comply to the TrueType specification.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="TT_MaxProfile">TT_MaxProfile</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_MaxProfile">TT_MaxProfile</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> TT_MaxProfile_
{
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> version;
@@ -872,195 +505,211 @@ Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> maxComponentDepth;
} <b>TT_MaxProfile</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>The maximum profile is a table containing many max values which can be used to pre-allocate arrays. This ensures that no memory allocation occurs during a glyph load.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>version</b></td><td>
+<p>The maximum profile is a table containing many max values, which can be used to pre-allocate arrays. This ensures that no memory allocation occurs during a glyph load.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="version">version</td><td class="desc">
<p>The version number.</p>
</td></tr>
-<tr valign=top><td><b>numGlyphs</b></td><td>
+<tr><td class="val" id="numGlyphs">numGlyphs</td><td class="desc">
<p>The number of glyphs in this TrueType font.</p>
</td></tr>
-<tr valign=top><td><b>maxPoints</b></td><td>
+<tr><td class="val" id="maxPoints">maxPoints</td><td class="desc">
<p>The maximum number of points in a non-composite TrueType glyph. See also the structure element &lsquo;maxCompositePoints&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>maxContours</b></td><td>
+<tr><td class="val" id="maxContours">maxContours</td><td class="desc">
<p>The maximum number of contours in a non-composite TrueType glyph. See also the structure element &lsquo;maxCompositeContours&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>maxCompositePoints</b></td><td>
+<tr><td class="val" id="maxCompositePoints">maxCompositePoints</td><td class="desc">
<p>The maximum number of points in a composite TrueType glyph. See also the structure element &lsquo;maxPoints&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>maxCompositeContours</b></td><td>
+<tr><td class="val" id="maxCompositeContours">maxCompositeContours</td><td class="desc">
<p>The maximum number of contours in a composite TrueType glyph. See also the structure element &lsquo;maxContours&rsquo;.</p>
</td></tr>
-<tr valign=top><td><b>maxZones</b></td><td>
+<tr><td class="val" id="maxZones">maxZones</td><td class="desc">
<p>The maximum number of zones used for glyph hinting.</p>
</td></tr>
-<tr valign=top><td><b>maxTwilightPoints</b></td><td>
+<tr><td class="val" id="maxTwilightPoints">maxTwilightPoints</td><td class="desc">
<p>The maximum number of points in the twilight zone used for glyph hinting.</p>
</td></tr>
-<tr valign=top><td><b>maxStorage</b></td><td>
+<tr><td class="val" id="maxStorage">maxStorage</td><td class="desc">
<p>The maximum number of elements in the storage area used for glyph hinting.</p>
</td></tr>
-<tr valign=top><td><b>maxFunctionDefs</b></td><td>
+<tr><td class="val" id="maxFunctionDefs">maxFunctionDefs</td><td class="desc">
<p>The maximum number of function definitions in the TrueType bytecode for this font.</p>
</td></tr>
-<tr valign=top><td><b>maxInstructionDefs</b></td><td>
+<tr><td class="val" id="maxInstructionDefs">maxInstructionDefs</td><td class="desc">
<p>The maximum number of instruction definitions in the TrueType bytecode for this font.</p>
</td></tr>
-<tr valign=top><td><b>maxStackElements</b></td><td>
+<tr><td class="val" id="maxStackElements">maxStackElements</td><td class="desc">
<p>The maximum number of stack elements used during bytecode interpretation.</p>
</td></tr>
-<tr valign=top><td><b>maxSizeOfInstructions</b></td><td>
+<tr><td class="val" id="maxSizeOfInstructions">maxSizeOfInstructions</td><td class="desc">
<p>The maximum number of TrueType opcodes used for glyph hinting.</p>
</td></tr>
-<tr valign=top><td><b>maxComponentElements</b></td><td>
+<tr><td class="val" id="maxComponentElements">maxComponentElements</td><td class="desc">
<p>The maximum number of simple (i.e., non- composite) glyphs in a composite glyph.</p>
</td></tr>
-<tr valign=top><td><b>maxComponentDepth</b></td><td>
+<tr><td class="val" id="maxComponentDepth">maxComponentDepth</td><td class="desc">
<p>The maximum nesting depth of composite glyphs.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This structure is only used during font loading.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Sfnt_Tag">FT_Sfnt_Tag</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Sfnt_Tag">FT_Sfnt_Tag</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Sfnt_Tag_
{
- ft_sfnt_head = 0, /* <a href="ft2-truetype_tables.html#TT_Header">TT_Header</a> */
- ft_sfnt_maxp = 1, /* <a href="ft2-truetype_tables.html#TT_MaxProfile">TT_MaxProfile</a> */
- ft_sfnt_os2 = 2, /* <a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a> */
- ft_sfnt_hhea = 3, /* <a href="ft2-truetype_tables.html#TT_HoriHeader">TT_HoriHeader</a> */
- ft_sfnt_vhea = 4, /* <a href="ft2-truetype_tables.html#TT_VertHeader">TT_VertHeader</a> */
- ft_sfnt_post = 5, /* <a href="ft2-truetype_tables.html#TT_Postscript">TT_Postscript</a> */
- ft_sfnt_pclt = 6, /* <a href="ft2-truetype_tables.html#TT_PCLT">TT_PCLT</a> */
+ <a href="ft2-truetype_tables.html#FT_SFNT_HEAD">FT_SFNT_HEAD</a>,
+ <a href="ft2-truetype_tables.html#FT_SFNT_MAXP">FT_SFNT_MAXP</a>,
+ <a href="ft2-truetype_tables.html#FT_SFNT_OS2">FT_SFNT_OS2</a>,
+ <a href="ft2-truetype_tables.html#FT_SFNT_HHEA">FT_SFNT_HHEA</a>,
+ <a href="ft2-truetype_tables.html#FT_SFNT_VHEA">FT_SFNT_VHEA</a>,
+ <a href="ft2-truetype_tables.html#FT_SFNT_POST">FT_SFNT_POST</a>,
+ <a href="ft2-truetype_tables.html#FT_SFNT_PCLT">FT_SFNT_PCLT</a>,
- sfnt_max /* internal end mark */
+ FT_SFNT_MAX
} <b>FT_Sfnt_Tag</b>;
-</pre></table><br>
-<table align=center width="87%"><tr><td>
+ /* these constants are deprecated; use the corresponding `<b>FT_Sfnt_Tag</b>' */
+ /* values instead */
+#define ft_sfnt_head <a href="ft2-truetype_tables.html#FT_SFNT_HEAD">FT_SFNT_HEAD</a>
+#define ft_sfnt_maxp <a href="ft2-truetype_tables.html#FT_SFNT_MAXP">FT_SFNT_MAXP</a>
+#define ft_sfnt_os2 <a href="ft2-truetype_tables.html#FT_SFNT_OS2">FT_SFNT_OS2</a>
+#define ft_sfnt_hhea <a href="ft2-truetype_tables.html#FT_SFNT_HHEA">FT_SFNT_HHEA</a>
+#define ft_sfnt_vhea <a href="ft2-truetype_tables.html#FT_SFNT_VHEA">FT_SFNT_VHEA</a>
+#define ft_sfnt_post <a href="ft2-truetype_tables.html#FT_SFNT_POST">FT_SFNT_POST</a>
+#define ft_sfnt_pclt <a href="ft2-truetype_tables.html#FT_SFNT_PCLT">FT_SFNT_PCLT</a>
+</pre>
+
<p>An enumeration used to specify the index of an SFNT table. Used in the <a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a> API function.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_SFNT_HEAD">FT_SFNT_HEAD</td><td class="desc">
+<p>To access the font's <a href="ft2-truetype_tables.html#TT_Header">TT_Header</a> structure.</p>
+</td></tr>
+<tr><td class="val" id="FT_SFNT_MAXP">FT_SFNT_MAXP</td><td class="desc">
+<p>To access the font's <a href="ft2-truetype_tables.html#TT_MaxProfile">TT_MaxProfile</a> structure.</p>
+</td></tr>
+<tr><td class="val" id="FT_SFNT_OS2">FT_SFNT_OS2</td><td class="desc">
+<p>To access the font's <a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a> structure.</p>
+</td></tr>
+<tr><td class="val" id="FT_SFNT_HHEA">FT_SFNT_HHEA</td><td class="desc">
+<p>To access the font's <a href="ft2-truetype_tables.html#TT_HoriHeader">TT_HoriHeader</a> structure.</p>
+</td></tr>
+<tr><td class="val" id="FT_SFNT_VHEA">FT_SFNT_VHEA</td><td class="desc">
+<p>To access the font's <a href="ft2-truetype_tables.html#TT_VertHeader">TT_VertHeader</a> struture.</p>
+</td></tr>
+<tr><td class="val" id="FT_SFNT_POST">FT_SFNT_POST</td><td class="desc">
+<p>To access the font's <a href="ft2-truetype_tables.html#TT_Postscript">TT_Postscript</a> structure.</p>
+</td></tr>
+<tr><td class="val" id="FT_SFNT_PCLT">FT_SFNT_PCLT</td><td class="desc">
+<p>To access the font's <a href="ft2-truetype_tables.html#TT_PCLT">TT_PCLT</a> structure.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span>* )
<b>FT_Get_Sfnt_Table</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a> tag );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return a pointer to a given SFNT table within a face.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source.</p>
</td></tr>
-<tr valign=top><td><b>tag</b></td><td>
+<tr><td class="val" id="tag">tag</td><td class="desc">
<p>The index of the SFNT table.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>A type-less pointer to the table. This will be&nbsp;0 in case of error, or if the corresponding table was not found <b>OR</b> loaded from the file.</p>
<p>Use a typecast according to &lsquo;tag&rsquo; to access the structure elements.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The table is owned by the face object and disappears with it.</p>
<p>This function is only useful to access SFNT tables that are loaded by the sfnt, truetype, and opentype drivers. See <a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a> for a list.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>Here an example how to access the &lsquo;vhea&rsquo; table:</p>
+<pre class="colored">
+ TT_VertHeader* vert_header;
+
+
+ vert_header =
+ (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA );
+</pre>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Load_Sfnt_Table</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> tag,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> offset,
<a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>* buffer,
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>* length );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Load any font table into client memory.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
-<tr valign=top><td><b>tag</b></td><td>
+<tr><td class="val" id="tag">tag</td><td class="desc">
<p>The four-byte tag of the table to load. Use the value&nbsp;0 if you want to access the whole font file. Otherwise, you can use one of the definitions found in the <a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a> file, or forge a new one with <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>.</p>
</td></tr>
-<tr valign=top><td><b>offset</b></td><td>
+<tr><td class="val" id="offset">offset</td><td class="desc">
<p>The starting offset in the table (or file if tag == 0).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>buffer</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="buffer">buffer</td><td class="desc">
<p>The target buffer address. The client must ensure that the memory array is big enough to hold the data.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>length</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="length">length</td><td class="desc">
<p>If the &lsquo;length&rsquo; parameter is NULL, then try to load the whole table. Return an error code if it fails.</p>
<p>Else, if &lsquo;*length&rsquo; is&nbsp;0, exit immediately while returning the table's (or file) full size in it.</p>
<p>Else the number of bytes to read from the table or file, from the starting offset.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>If you need to determine the table's length you should first call this function with &lsquo;*length&rsquo; set to&nbsp;0, as in the following example:</p>
<pre class="colored">
FT_ULong length = 0;
@@ -1075,149 +724,450 @@ Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &amp;length );
if ( error ) { ... could not load table ... }
</pre>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>Note that structures like <a href="ft2-truetype_tables.html#TT_Header">TT_Header</a> or <a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a> can't be used with this function; they are limited to <a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a>. Reason is that those structures depend on the processor architecture, with varying size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Sfnt_Table_Info</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> table_index,
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> *tag,
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> *length );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return information on an SFNT table.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
-<tr valign=top><td><b>table_index</b></td><td>
+<tr><td class="val" id="table_index">table_index</td><td class="desc">
<p>The index of an SFNT table. The function returns FT_Err_Table_Missing for an invalid value.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>tag</b></td><td>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="tag">tag</td><td class="desc">
<p>The name tag of the SFNT table. If the value is NULL, &lsquo;table_index&rsquo; is ignored, and &lsquo;length&rsquo; returns the number of SFNT tables in the font.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>length</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="length">length</td><td class="desc">
<p>The length of the SFNT table (or the number of SFNT tables, depending on &lsquo;tag&rsquo;).</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>SFNT tables with length zero are treated as missing.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<h4>note</h4>
+<p>While parsing fonts, FreeType handles SFNT tables with length zero as missing.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> )
<b>FT_Get_CMap_Language_ID</b>( <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a> charmap );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>Return TrueType/sfnt specific cmap language ID. Definitions of language ID values are in &lsquo;freetype/ttnameid.h&rsquo;.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>charmap</b></td><td>
+<p>Return TrueType/sfnt specific cmap language ID. Definitions of language ID values are in &lsquo;ttnameid.h&rsquo;.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="charmap">charmap</td><td class="desc">
<p>The target charmap.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The language ID of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to a TrueType/sfnt face, just return&nbsp;0 as the default value.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_CMap_Format">FT_Get_CMap_Format</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<p>For a format&nbsp;14 cmap (to access Unicode IVS), the return value is 0xFFFFFFFF.</p>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_CMap_Format">FT_Get_CMap_Format</h3>
+<p>Defined in FT_TRUETYPE_TABLES_H (tttables.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> )
<b>FT_Get_CMap_Format</b>( <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a> charmap );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return TrueType/sfnt specific cmap format.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>charmap</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="charmap">charmap</td><td class="desc">
<p>The target charmap.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The format of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to a TrueType/sfnt face, return -1.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_UNPATENTED_HINTING_H (freetype/ttunpat.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</h3>
+<p>Defined in FT_UNPATENTED_HINTING_H (ttunpat.h).</p>
+<pre>
#define <b>FT_PARAM_TAG_UNPATENTED_HINTING</b> <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'u', 'n', 'p', 'a' )
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A constant used as the tag of an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structure to indicate that unpatented methods only should be used by the TrueType bytecode interpreter for a typeface opened by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_PLATFORM_XXX">TT_PLATFORM_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (ttnameid.h).</p>
+<pre>
+#define <a href="ft2-truetype_tables.html#TT_PLATFORM_APPLE_UNICODE">TT_PLATFORM_APPLE_UNICODE</a> 0
+#define <a href="ft2-truetype_tables.html#TT_PLATFORM_MACINTOSH">TT_PLATFORM_MACINTOSH</a> 1
+#define <a href="ft2-truetype_tables.html#TT_PLATFORM_ISO">TT_PLATFORM_ISO</a> 2 /* deprecated */
+#define <a href="ft2-truetype_tables.html#TT_PLATFORM_MICROSOFT">TT_PLATFORM_MICROSOFT</a> 3
+#define <a href="ft2-truetype_tables.html#TT_PLATFORM_CUSTOM">TT_PLATFORM_CUSTOM</a> 4
+#define <a href="ft2-truetype_tables.html#TT_PLATFORM_ADOBE">TT_PLATFORM_ADOBE</a> 7 /* artificial */
+</pre>
+
+<p>A list of valid values for the &lsquo;platform_id&rsquo; identifier code in <a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a> and <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a> structures.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="TT_PLATFORM_APPLE_UNICODE">TT_PLATFORM_APPLE_UNICODE</td><td class="desc">
+<p>Used by Apple to indicate a Unicode character map and/or name entry. See <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a> for corresponding &lsquo;encoding_id&rsquo; values. Note that name entries in this format are coded as big-endian UCS-2 character codes <i>only</i>.</p>
+</td></tr>
+<tr><td class="val" id="TT_PLATFORM_MACINTOSH">TT_PLATFORM_MACINTOSH</td><td class="desc">
+<p>Used by Apple to indicate a MacOS-specific charmap and/or name entry. See <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a> for corresponding &lsquo;encoding_id&rsquo; values. Note that most TrueType fonts contain an Apple roman charmap to be usable on MacOS systems (even if they contain a Microsoft charmap as well).</p>
+</td></tr>
+<tr><td class="val" id="TT_PLATFORM_ISO">TT_PLATFORM_ISO</td><td class="desc">
+<p>This value was used to specify ISO/IEC 10646 charmaps. It is however now deprecated. See <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a> for a list of corresponding &lsquo;encoding_id&rsquo; values.</p>
+</td></tr>
+<tr><td class="val" id="TT_PLATFORM_MICROSOFT">TT_PLATFORM_MICROSOFT</td><td class="desc">
+<p>Used by Microsoft to indicate Windows-specific charmaps. See <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a> for a list of corresponding &lsquo;encoding_id&rsquo; values. Note that most fonts contain a Unicode charmap using (TT_PLATFORM_MICROSOFT, <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a>).</p>
+</td></tr>
+<tr><td class="val" id="TT_PLATFORM_CUSTOM">TT_PLATFORM_CUSTOM</td><td class="desc">
+<p>Used to indicate application-specific charmaps.</p>
+</td></tr>
+<tr><td class="val" id="TT_PLATFORM_ADOBE">TT_PLATFORM_ADOBE</td><td class="desc">
+<p>This value isn't part of any font format specification, but is used by FreeType to report Adobe-specific charmaps in an <a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a> structure. See <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a>.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (ttnameid.h).</p>
+<pre>
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_DEFAULT">TT_APPLE_ID_DEFAULT</a> 0 /* Unicode 1.0 */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_1_1">TT_APPLE_ID_UNICODE_1_1</a> 1 /* specify Hangul at U+34xx */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_ISO_10646">TT_APPLE_ID_ISO_10646</a> 2 /* deprecated */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_2_0">TT_APPLE_ID_UNICODE_2_0</a> 3 /* or later */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_32">TT_APPLE_ID_UNICODE_32</a> 4 /* 2.0 or later, full repertoire */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_VARIANT_SELECTOR">TT_APPLE_ID_VARIANT_SELECTOR</a> 5 /* variation selector data */
+</pre>
+
+<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a> charmaps and name entries.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="TT_APPLE_ID_DEFAULT">TT_APPLE_ID_DEFAULT</td><td class="desc">
+<p>Unicode version 1.0.</p>
+</td></tr>
+<tr><td class="val" id="TT_APPLE_ID_UNICODE_1_1">TT_APPLE_ID_UNICODE_1_1</td><td class="desc">
+<p>Unicode 1.1; specifies Hangul characters starting at U+34xx.</p>
+</td></tr>
+<tr><td class="val" id="TT_APPLE_ID_ISO_10646">TT_APPLE_ID_ISO_10646</td><td class="desc">
+<p>Deprecated (identical to preceding).</p>
+</td></tr>
+<tr><td class="val" id="TT_APPLE_ID_UNICODE_2_0">TT_APPLE_ID_UNICODE_2_0</td><td class="desc">
+<p>Unicode 2.0 and beyond (UTF-16 BMP only).</p>
+</td></tr>
+<tr><td class="val" id="TT_APPLE_ID_UNICODE_32">TT_APPLE_ID_UNICODE_32</td><td class="desc">
+<p>Unicode 3.1 and beyond, using UTF-32.</p>
+</td></tr>
+<tr><td class="val" id="TT_APPLE_ID_VARIANT_SELECTOR">TT_APPLE_ID_VARIANT_SELECTOR</td><td class="desc">
+<p>From Adobe, not Apple. Not a normal cmap. Specifies variations on a real cmap.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_MAC_ID_XXX">TT_MAC_ID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (ttnameid.h).</p>
+<pre>
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ROMAN">TT_MAC_ID_ROMAN</a> 0
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_JAPANESE">TT_MAC_ID_JAPANESE</a> 1
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TRADITIONAL_CHINESE">TT_MAC_ID_TRADITIONAL_CHINESE</a> 2
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_KOREAN">TT_MAC_ID_KOREAN</a> 3
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ARABIC">TT_MAC_ID_ARABIC</a> 4
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_HEBREW">TT_MAC_ID_HEBREW</a> 5
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GREEK">TT_MAC_ID_GREEK</a> 6
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_RUSSIAN">TT_MAC_ID_RUSSIAN</a> 7
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_RSYMBOL">TT_MAC_ID_RSYMBOL</a> 8
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_DEVANAGARI">TT_MAC_ID_DEVANAGARI</a> 9
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GURMUKHI">TT_MAC_ID_GURMUKHI</a> 10
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GUJARATI">TT_MAC_ID_GUJARATI</a> 11
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ORIYA">TT_MAC_ID_ORIYA</a> 12
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_BENGALI">TT_MAC_ID_BENGALI</a> 13
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TAMIL">TT_MAC_ID_TAMIL</a> 14
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TELUGU">TT_MAC_ID_TELUGU</a> 15
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_KANNADA">TT_MAC_ID_KANNADA</a> 16
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_MALAYALAM">TT_MAC_ID_MALAYALAM</a> 17
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SINHALESE">TT_MAC_ID_SINHALESE</a> 18
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_BURMESE">TT_MAC_ID_BURMESE</a> 19
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_KHMER">TT_MAC_ID_KHMER</a> 20
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_THAI">TT_MAC_ID_THAI</a> 21
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_LAOTIAN">TT_MAC_ID_LAOTIAN</a> 22
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GEORGIAN">TT_MAC_ID_GEORGIAN</a> 23
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ARMENIAN">TT_MAC_ID_ARMENIAN</a> 24
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_MALDIVIAN">TT_MAC_ID_MALDIVIAN</a> 25
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SIMPLIFIED_CHINESE">TT_MAC_ID_SIMPLIFIED_CHINESE</a> 25
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TIBETAN">TT_MAC_ID_TIBETAN</a> 26
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_MONGOLIAN">TT_MAC_ID_MONGOLIAN</a> 27
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GEEZ">TT_MAC_ID_GEEZ</a> 28
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SLAVIC">TT_MAC_ID_SLAVIC</a> 29
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_VIETNAMESE">TT_MAC_ID_VIETNAMESE</a> 30
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SINDHI">TT_MAC_ID_SINDHI</a> 31
+#define <a href="ft2-truetype_tables.html#TT_MAC_ID_UNINTERP">TT_MAC_ID_UNINTERP</a> 32
+</pre>
+
+<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> charmaps and name entries.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="TT_MAC_ID_ROMAN">TT_MAC_ID_ROMAN</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_JAPANESE">TT_MAC_ID_JAPANESE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_TRADITIONAL_CHINESE">TT_MAC_ID_TRADITIONAL_CHINESE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_KOREAN">TT_MAC_ID_KOREAN</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_ARABIC">TT_MAC_ID_ARABIC</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_HEBREW">TT_MAC_ID_HEBREW</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_GREEK">TT_MAC_ID_GREEK</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_RUSSIAN">TT_MAC_ID_RUSSIAN</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_RSYMBOL">TT_MAC_ID_RSYMBOL</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_DEVANAGARI">TT_MAC_ID_DEVANAGARI</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_GURMUKHI">TT_MAC_ID_GURMUKHI</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_GUJARATI">TT_MAC_ID_GUJARATI</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_ORIYA">TT_MAC_ID_ORIYA</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_BENGALI">TT_MAC_ID_BENGALI</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_TAMIL">TT_MAC_ID_TAMIL</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_TELUGU">TT_MAC_ID_TELUGU</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_KANNADA">TT_MAC_ID_KANNADA</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_MALAYALAM">TT_MAC_ID_MALAYALAM</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_SINHALESE">TT_MAC_ID_SINHALESE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_BURMESE">TT_MAC_ID_BURMESE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_KHMER">TT_MAC_ID_KHMER</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_THAI">TT_MAC_ID_THAI</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_LAOTIAN">TT_MAC_ID_LAOTIAN</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_GEORGIAN">TT_MAC_ID_GEORGIAN</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_ARMENIAN">TT_MAC_ID_ARMENIAN</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_MALDIVIAN">TT_MAC_ID_MALDIVIAN</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_SIMPLIFIED_CHINESE">TT_MAC_ID_SIMPLIFIED_CHINESE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_TIBETAN">TT_MAC_ID_TIBETAN</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_MONGOLIAN">TT_MAC_ID_MONGOLIAN</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_GEEZ">TT_MAC_ID_GEEZ</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_SLAVIC">TT_MAC_ID_SLAVIC</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_VIETNAMESE">TT_MAC_ID_VIETNAMESE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_SINDHI">TT_MAC_ID_SINDHI</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="TT_MAC_ID_UNINTERP">TT_MAC_ID_UNINTERP</td><td class="desc">
+<p></p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_ISO_ID_XXX">TT_ISO_ID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (ttnameid.h).</p>
+<pre>
+#define <a href="ft2-truetype_tables.html#TT_ISO_ID_7BIT_ASCII">TT_ISO_ID_7BIT_ASCII</a> 0
+#define <a href="ft2-truetype_tables.html#TT_ISO_ID_10646">TT_ISO_ID_10646</a> 1
+#define <a href="ft2-truetype_tables.html#TT_ISO_ID_8859_1">TT_ISO_ID_8859_1</a> 2
+</pre>
+
+<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a> charmaps and name entries.</p>
+<p>Their use is now deprecated.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="TT_ISO_ID_7BIT_ASCII">TT_ISO_ID_7BIT_ASCII</td><td class="desc">
+<p>ASCII.</p>
+</td></tr>
+<tr><td class="val" id="TT_ISO_ID_10646">TT_ISO_ID_10646</td><td class="desc">
+<p>ISO/10646.</p>
+</td></tr>
+<tr><td class="val" id="TT_ISO_ID_8859_1">TT_ISO_ID_8859_1</td><td class="desc">
+<p>Also known as Latin-1.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_MS_ID_XXX">TT_MS_ID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (ttnameid.h).</p>
+<pre>
+#define <a href="ft2-truetype_tables.html#TT_MS_ID_SYMBOL_CS">TT_MS_ID_SYMBOL_CS</a> 0
+#define <a href="ft2-truetype_tables.html#TT_MS_ID_UNICODE_CS">TT_MS_ID_UNICODE_CS</a> 1
+#define <a href="ft2-truetype_tables.html#TT_MS_ID_SJIS">TT_MS_ID_SJIS</a> 2
+#define <a href="ft2-truetype_tables.html#TT_MS_ID_GB2312">TT_MS_ID_GB2312</a> 3
+#define <a href="ft2-truetype_tables.html#TT_MS_ID_BIG_5">TT_MS_ID_BIG_5</a> 4
+#define <a href="ft2-truetype_tables.html#TT_MS_ID_WANSUNG">TT_MS_ID_WANSUNG</a> 5
+#define <a href="ft2-truetype_tables.html#TT_MS_ID_JOHAB">TT_MS_ID_JOHAB</a> 6
+#define <a href="ft2-truetype_tables.html#TT_MS_ID_UCS_4">TT_MS_ID_UCS_4</a> 10
+</pre>
+
+<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a> charmaps and name entries.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="TT_MS_ID_SYMBOL_CS">TT_MS_ID_SYMBOL_CS</td><td class="desc">
+<p>Corresponds to Microsoft symbol encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a>.</p>
+</td></tr>
+<tr><td class="val" id="TT_MS_ID_UNICODE_CS">TT_MS_ID_UNICODE_CS</td><td class="desc">
+<p>Corresponds to a Microsoft WGL4 charmap, matching Unicode. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a>.</p>
+</td></tr>
+<tr><td class="val" id="TT_MS_ID_SJIS">TT_MS_ID_SJIS</td><td class="desc">
+<p>Corresponds to SJIS Japanese encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a>.</p>
+</td></tr>
+<tr><td class="val" id="TT_MS_ID_GB2312">TT_MS_ID_GB2312</td><td class="desc">
+<p>Corresponds to Simplified Chinese as used in Mainland China. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a>.</p>
+</td></tr>
+<tr><td class="val" id="TT_MS_ID_BIG_5">TT_MS_ID_BIG_5</td><td class="desc">
+<p>Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a>.</p>
+</td></tr>
+<tr><td class="val" id="TT_MS_ID_WANSUNG">TT_MS_ID_WANSUNG</td><td class="desc">
+<p>Corresponds to Korean Wansung encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a>.</p>
+</td></tr>
+<tr><td class="val" id="TT_MS_ID_JOHAB">TT_MS_ID_JOHAB</td><td class="desc">
+<p>Corresponds to Johab encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a>.</p>
+</td></tr>
+<tr><td class="val" id="TT_MS_ID_UCS_4">TT_MS_ID_UCS_4</td><td class="desc">
+<p>Corresponds to UCS-4 or UTF-32 charmaps. This has been added to the OpenType specification version 1.4 (mid-2001.)</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (ttnameid.h).</p>
+<pre>
+#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_STANDARD">TT_ADOBE_ID_STANDARD</a> 0
+#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_EXPERT">TT_ADOBE_ID_EXPERT</a> 1
+#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_CUSTOM">TT_ADOBE_ID_CUSTOM</a> 2
+#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_LATIN_1">TT_ADOBE_ID_LATIN_1</a> 3
+</pre>
+
+<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a> charmaps. This is a FreeType-specific extension!</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="TT_ADOBE_ID_STANDARD">TT_ADOBE_ID_STANDARD</td><td class="desc">
+<p>Adobe standard encoding.</p>
+</td></tr>
+<tr><td class="val" id="TT_ADOBE_ID_EXPERT">TT_ADOBE_ID_EXPERT</td><td class="desc">
+<p>Adobe expert encoding.</p>
+</td></tr>
+<tr><td class="val" id="TT_ADOBE_ID_CUSTOM">TT_ADOBE_ID_CUSTOM</td><td class="desc">
+<p>Adobe custom encoding.</p>
+</td></tr>
+<tr><td class="val" id="TT_ADOBE_ID_LATIN_1">TT_ADOBE_ID_LATIN_1</td><td class="desc">
+<p>Adobe Latin&nbsp;1 encoding.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-tt_driver.html b/docs/reference/ft2-tt_driver.html
new file mode 100644
index 0000000..5d71829
--- /dev/null
+++ b/docs/reference/ft2-tt_driver.html
@@ -0,0 +1,183 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>FreeType-2.5.5 API Reference</title>
+<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
+ body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+ color: #000000;
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
+
+ h1 { text-align: center; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
+
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
+
+ span.keyword { font-family: monospace;
+ text-align: left;
+ white-space: pre;
+ color: darkblue; }
+
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
+
+</style>
+</head>
+<body>
+
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
+
+<h1>The TrueType driver</h1>
+<h2>Synopsis</h2>
+<table class="synopsis">
+<tr><td><a href="#interpreter-version">interpreter-version</a></td><td><a href="#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td></tr>
+</table>
+
+
+<p>While FreeType's TrueType driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. The following lists the available properties together with the necessary macros and structures.</p>
+<p>The TrueType driver's module name is &lsquo;truetype&rsquo;.</p>
+
+<div class="section">
+<h3 id="interpreter-version">interpreter-version</h3>
+
+<p>Currently, two versions are available, representing the bytecode interpreter with and without subpixel hinting support, respectively. The default is subpixel support if TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support otherwise (since it isn't available then).</p>
+<p>If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering. The main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) font-specific tweaks.</p>
+<p>Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at &lsquo;<a href="http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>&rsquo;.</p>
+<p>The following example code demonstrates how to activate subpixel hinting (omitting the error handling).</p>
+<pre class="colored">
+ FT_Library library;
+ FT_Face face;
+ FT_UInt interpreter_version = TT_INTERPRETER_VERSION_38;
+
+
+ FT_Init_FreeType( &amp;library );
+
+ FT_Property_Set( library, "truetype",
+ "interpreter-version",
+ &amp;interpreter_version );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</h3>
+<p>Defined in FT_TRUETYPE_DRIVER_H (ftttdrv.h).</p>
+<pre>
+#define <a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_35">TT_INTERPRETER_VERSION_35</a> 35
+#define <a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_38">TT_INTERPRETER_VERSION_38</a> 38
+</pre>
+
+<p>A list of constants used for the <a href="ft2-tt_driver.html#interpreter-version">interpreter-version</a> property to select the hinting engine for Truetype fonts.</p>
+<p>The numeric value in the constant names represents the version number as returned by the &lsquo;GETINFO&rsquo; bytecode instruction.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="TT_INTERPRETER_VERSION_35">TT_INTERPRETER_VERSION_35</td><td class="desc">
+<p>Version&nbsp;35 corresponds to MS rasterizer v.1.7 as used e.g. in Windows&nbsp;98; only grayscale and B/W rasterizing is supported.</p>
+</td></tr>
+<tr><td class="val" id="TT_INTERPRETER_VERSION_38">TT_INTERPRETER_VERSION_38</td><td class="desc">
+<p>Version&nbsp;38 corresponds to MS rasterizer v.1.9; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in the Internet Explorer&nbsp;9 running on Windows&nbsp;7).</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>This property controls the behaviour of the bytecode interpreter and thus how outlines get hinted. It does <b>not</b> control how glyph get rasterized! In particular, it does not control subpixel color filtering.</p>
+<p>If FreeType has not been compiled with configuration option FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version&nbsp;38 causes an &lsquo;FT_Err_Unimplemented_Feature&rsquo; error.</p>
+<p>Depending on the graphics framework, Microsoft uses different bytecode engines. As a consequence, the version numbers returned by a call to the &lsquo;GETINFO[1]&rsquo; bytecode instruction are more convoluted than desired.</p>
+<pre class="colored">
+ framework Windows version result of GETINFO[1]
+ ----------------------------------------------------
+ GDI before XP 35
+ GDI XP and later 37
+ GDI+ old before Vista 37
+ GDI+ old Vista, 7 38
+ GDI+ after 7 40
+ DWrite before 8 39
+ DWrite 8 and later 40
+</pre>
+<p>Since FreeType doesn't provide all capabilities of DWrite ClearType, using version&nbsp;38 seems justified.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+</body>
+</html>
diff --git a/docs/reference/ft2-type1_tables.html b/docs/reference/ft2-type1_tables.html
index a7d1197..71355a9 100644
--- a/docs/reference/ft2-type1_tables.html
+++ b/docs/reference/ft2-type1_tables.html
@@ -3,63 +3,125 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Type 1 Tables
-</h1></center>
+<h1>Type 1 Tables</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#PS_FontInfoRec">PS_FontInfoRec</a></td><td></td><td><a href="#T1_Blend_Flags">T1_Blend_Flags</a></td><td></td><td><a href="#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></td></tr>
-<tr><td></td><td><a href="#PS_FontInfo">PS_FontInfo</a></td><td></td><td><a href="#CID_FaceDictRec">CID_FaceDictRec</a></td><td></td><td><a href="#FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></td></tr>
-<tr><td></td><td><a href="#T1_FontInfo">T1_FontInfo</a></td><td></td><td><a href="#CID_FaceDict">CID_FaceDict</a></td><td></td><td><a href="#FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></td></tr>
-<tr><td></td><td><a href="#PS_PrivateRec">PS_PrivateRec</a></td><td></td><td><a href="#CID_FaceInfoRec">CID_FaceInfoRec</a></td><td></td><td><a href="#T1_EncodingType">T1_EncodingType</a></td></tr>
-<tr><td></td><td><a href="#PS_Private">PS_Private</a></td><td></td><td><a href="#CID_FaceInfo">CID_FaceInfo</a></td><td></td><td><a href="#PS_Dict_Keys">PS_Dict_Keys</a></td></tr>
-<tr><td></td><td><a href="#T1_Private">T1_Private</a></td><td></td><td><a href="#CID_Info">CID_Info</a></td><td></td><td><a href="#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></td></tr>
-</table><br><br>
-
-<table align=center width="87%"><tr><td>
+<table class="synopsis">
+<tr><td><a href="#PS_FontInfoRec">PS_FontInfoRec</a></td><td><a href="#CID_FaceInfo">CID_FaceInfo</a></td><td><a href="#T1_EncodingType">T1_EncodingType</a></td></tr>
+<tr><td><a href="#PS_FontInfo">PS_FontInfo</a></td><td>&nbsp;</td><td><a href="#PS_Dict_Keys">PS_Dict_Keys</a></td></tr>
+<tr><td><a href="#PS_PrivateRec">PS_PrivateRec</a></td><td><a href="#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#PS_Private">PS_Private</a></td><td><a href="#FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></td><td><a href="#T1_FontInfo">T1_FontInfo</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></td><td><a href="#T1_Private">T1_Private</a></td></tr>
+<tr><td><a href="#CID_FaceDictRec">CID_FaceDictRec</a></td><td><a href="#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></td><td><a href="#CID_FontDict">CID_FontDict</a></td></tr>
+<tr><td><a href="#CID_FaceDict">CID_FaceDict</a></td><td>&nbsp;</td><td><a href="#CID_Info">CID_Info</a></td></tr>
+<tr><td><a href="#CID_FaceInfoRec">CID_FaceInfoRec</a></td><td><a href="#T1_Blend_Flags">T1_Blend_Flags</a></td><td></td></tr>
+</table>
+
+
<p>This section contains the definition of Type 1-specific tables, including structures related to other PostScript font formats.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="PS_FontInfoRec">PS_FontInfoRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="PS_FontInfoRec">PS_FontInfoRec</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> PS_FontInfoRec_
{
<a href="ft2-basic_types.html#FT_String">FT_String</a>* version;
@@ -73,62 +135,29 @@ Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> underline_thickness;
} <b>PS_FontInfoRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model a Type&nbsp;1 or Type&nbsp;2 FontInfo dictionary. Note that for Multiple Master fonts, each instance has its own FontInfo dictionary.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="PS_FontInfo">PS_FontInfo</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="PS_FontInfo">PS_FontInfo</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> PS_FontInfoRec_* <b>PS_FontInfo</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="T1_FontInfo">T1_FontInfo</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> <b>T1_FontInfo</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This type is equivalent to <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="PS_PrivateRec">PS_PrivateRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="PS_PrivateRec">PS_PrivateRec</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> PS_PrivateRec_
{
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> unique_id;
@@ -168,104 +197,29 @@ Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
<a href="ft2-basic_types.html#FT_Short">FT_Short</a> min_feature[2];
} <b>PS_PrivateRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to model a Type&nbsp;1 or Type&nbsp;2 private dictionary. Note that for Multiple Master fonts, each instance has its own Private dictionary.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="PS_Private">PS_Private</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="PS_Private">PS_Private</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> PS_PrivateRec_* <b>PS_Private</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="T1_Private">T1_Private</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a> <b>T1_Private</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This type is equivalent to <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="T1_Blend_Flags">T1_Blend_Flags</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">enum</span> T1_Blend_Flags_
- {
- /*# required fields in a FontInfo blend dictionary */
- T1_BLEND_UNDERLINE_POSITION = 0,
- T1_BLEND_UNDERLINE_THICKNESS,
- T1_BLEND_ITALIC_ANGLE,
-
- /*# required fields in a Private blend dictionary */
- T1_BLEND_BLUE_VALUES,
- T1_BLEND_OTHER_BLUES,
- T1_BLEND_STANDARD_WIDTH,
- T1_BLEND_STANDARD_HEIGHT,
- T1_BLEND_STEM_SNAP_WIDTHS,
- T1_BLEND_STEM_SNAP_HEIGHTS,
- T1_BLEND_BLUE_SCALE,
- T1_BLEND_BLUE_SHIFT,
- T1_BLEND_FAMILY_BLUES,
- T1_BLEND_FAMILY_OTHER_BLUES,
- T1_BLEND_FORCE_BOLD,
-
- /*# never remove */
- T1_BLEND_MAX
-
- } <b>T1_Blend_Flags</b>;
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A set of flags used to indicate which fields are present in a given blend dictionary (font info or private). Used to support Multiple Masters fonts.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="CID_FaceDictRec">CID_FaceDictRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="CID_FaceDictRec">CID_FaceDictRec</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> CID_FaceDictRec_
{
<a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a> private_dict;
@@ -285,43 +239,29 @@ Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> sd_bytes;
} <b>CID_FaceDictRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to represent data in a CID top-level dictionary.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="CID_FaceDict">CID_FaceDict</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="CID_FaceDict">CID_FaceDict</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> CID_FaceDictRec_* <b>CID_FaceDict</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a <a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="CID_FaceInfoRec">CID_FaceInfoRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="CID_FaceInfoRec">CID_FaceInfoRec</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> CID_FaceInfoRec_
{
<a href="ft2-basic_types.html#FT_String">FT_String</a>* cid_font_name;
@@ -350,327 +290,163 @@ Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> data_offset;
} <b>CID_FaceInfoRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A structure used to represent CID Face information.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="CID_FaceInfo">CID_FaceInfo</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="CID_FaceInfo">CID_FaceInfo</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> CID_FaceInfoRec_* <b>CID_FaceInfo</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to a <a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="CID_Info">CID_Info</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
- <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a> <b>CID_Info</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>This type is equivalent to <a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
<b>FT_Has_PS_Glyph_Names</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return true if a given face provides reliable PostScript glyph names. This is similar to using the <a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a> macro, except that certain fonts (mostly TrueType) contain incorrect glyph name tables.</p>
<p>When this function returns true, the caller is sure that the glyph names returned by <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a> are reliable.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>face handle</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>Boolean. True if glyph names are reliable.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_PS_Font_Info</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-type1_tables.html#PS_FontInfo">PS_FontInfo</a> afont_info );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> structure corresponding to a given PostScript font.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>PostScript face handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>afont_info</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="afont_info">afont_info</td><td class="desc">
<p>Output font info structure pointer.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The string pointers within the font info structure are owned by the face and don't need to be freed by the caller.</p>
<p>If the font's format is not PostScript-based, this function will return the &lsquo;FT_Err_Invalid_Argument&rsquo; error code.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_PS_Font_Private</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-type1_tables.html#PS_Private">PS_Private</a> afont_private );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a> structure corresponding to a given PostScript font.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>PostScript face handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>afont_private</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="afont_private">afont_private</td><td class="desc">
<p>Output private dictionary structure pointer.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The string pointers within the <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a> structure are owned by the face and don't need to be freed by the caller.</p>
<p>If the font's format is not PostScript-based, this function returns the &lsquo;FT_Err_Invalid_Argument&rsquo; error code.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="T1_EncodingType">T1_EncodingType</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">enum</span> T1_EncodingType_
- {
- T1_ENCODING_TYPE_NONE = 0,
- T1_ENCODING_TYPE_ARRAY,
- T1_ENCODING_TYPE_STANDARD,
- T1_ENCODING_TYPE_ISOLATIN1,
- T1_ENCODING_TYPE_EXPERT
-
- } <b>T1_EncodingType</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An enumeration describing the &lsquo;Encoding&rsquo; entry in a Type 1 dictionary.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="PS_Dict_Keys">PS_Dict_Keys</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">enum</span> PS_Dict_Keys_
- {
- /* conventionally in the font dictionary */
- PS_DICT_FONT_TYPE, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
- PS_DICT_FONT_MATRIX, /* <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> */
- PS_DICT_FONT_BBOX, /* <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> */
- PS_DICT_PAINT_TYPE, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
- PS_DICT_FONT_NAME, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
- PS_DICT_UNIQUE_ID, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
- PS_DICT_NUM_CHAR_STRINGS, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
- PS_DICT_CHAR_STRING_KEY, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
- PS_DICT_CHAR_STRING, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
- PS_DICT_ENCODING_TYPE, /* <a href="ft2-type1_tables.html#T1_EncodingType">T1_EncodingType</a> */
- PS_DICT_ENCODING_ENTRY, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
-
- /* conventionally in the font Private dictionary */
- PS_DICT_NUM_SUBRS, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
- PS_DICT_SUBR, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
- PS_DICT_STD_HW, /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> */
- PS_DICT_STD_VW, /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> */
- PS_DICT_NUM_BLUE_VALUES, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
- PS_DICT_BLUE_VALUE, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
- PS_DICT_BLUE_FUZZ, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
- PS_DICT_NUM_OTHER_BLUES, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
- PS_DICT_OTHER_BLUE, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
- PS_DICT_NUM_FAMILY_BLUES, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
- PS_DICT_FAMILY_BLUE, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
- PS_DICT_NUM_FAMILY_OTHER_BLUES, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
- PS_DICT_FAMILY_OTHER_BLUE, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
- PS_DICT_BLUE_SCALE, /* <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> */
- PS_DICT_BLUE_SHIFT, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
- PS_DICT_NUM_STEM_SNAP_H, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
- PS_DICT_STEM_SNAP_H, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
- PS_DICT_NUM_STEM_SNAP_V, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
- PS_DICT_STEM_SNAP_V, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
- PS_DICT_FORCE_BOLD, /* <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> */
- PS_DICT_RND_STEM_UP, /* <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> */
- PS_DICT_MIN_FEATURE, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
- PS_DICT_LEN_IV, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
- PS_DICT_PASSWORD, /* <a href="ft2-basic_types.html#FT_Long">FT_Long</a> */
- PS_DICT_LANGUAGE_GROUP, /* <a href="ft2-basic_types.html#FT_Long">FT_Long</a> */
- /* conventionally in the font FontInfo dictionary */
- PS_DICT_VERSION, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
- PS_DICT_NOTICE, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
- PS_DICT_FULL_NAME, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
- PS_DICT_FAMILY_NAME, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
- PS_DICT_WEIGHT, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
- PS_DICT_IS_FIXED_PITCH, /* <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> */
- PS_DICT_UNDERLINE_POSITION, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
- PS_DICT_UNDERLINE_THICKNESS, /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> */
- PS_DICT_FS_TYPE, /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> */
- PS_DICT_ITALIC_ANGLE, /* <a href="ft2-basic_types.html#FT_Long">FT_Long</a> */
-
- PS_DICT_MAX = PS_DICT_ITALIC_ANGLE
-
- } <b>PS_Dict_Keys</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>An enumeration used in calls to <a href="ft2-type1_tables.html#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a> to identify the Type&nbsp;1 dictionary entry to retrieve.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> )
<b>FT_Get_PS_Font_Value</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-type1_tables.html#PS_Dict_Keys">PS_Dict_Keys</a> key,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> idx,
<span class="keyword">void</span> *value,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> value_len );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve the value for the supplied key from a PostScript font.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>PostScript face handle.</p>
</td></tr>
-<tr valign=top><td><b>key</b></td><td>
+<tr><td class="val" id="key">key</td><td class="desc">
<p>An enumeration value representing the dictionary key to retrieve.</p>
</td></tr>
-<tr valign=top><td><b>idx</b></td><td>
+<tr><td class="val" id="idx">idx</td><td class="desc">
<p>For array values, this specifies the index to be returned.</p>
</td></tr>
-<tr valign=top><td><b>value</b></td><td>
+<tr><td class="val" id="value">value</td><td class="desc">
<p>A pointer to memory into which to write the value.</p>
</td></tr>
-<tr valign=top><td><b>valen_len</b></td><td>
+<tr><td class="val" id="valen_len">valen_len</td><td class="desc">
<p>The size, in bytes, of the memory supplied for the value.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>value</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="value">value</td><td class="desc">
<p>The value matching the above key, if it exists.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The amount of memory (in bytes) required to hold the requested value (if it exists, -1 otherwise).</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The values returned are not pointers into the internal structures of the face, but are &lsquo;fresh&rsquo; copies, so that the memory containing them belongs to the calling application. This also enforces the &lsquo;read-only&rsquo; nature of these values, i.e., this function cannot be used to manipulate the face.</p>
<p>&lsquo;value&rsquo; is a void pointer because the values returned can be of various types.</p>
<p>If either &lsquo;value&rsquo; is NULL or &lsquo;value_len&rsquo; is too small, just the required memory size for the requested entry is returned.</p>
@@ -678,12 +454,405 @@ Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).
<p>PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To get the value as in the font stream, you need to divide by 65536000.0 (to remove the FT_Fixed scale, and the x1000 scale).</p>
<p>IMPORTANT: Only key/value pairs read by the FreeType interpreter can be retrieved. So, for example, PostScript procedures such as NP, ND, and RD are not available. Arbitrary keys are, obviously, not be available either.</p>
<p>If the font's format is not PostScript-based, this function returns the &lsquo;FT_Err_Invalid_Argument&rsquo; error code.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="T1_Blend_Flags">T1_Blend_Flags</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">enum</span> T1_Blend_Flags_
+ {
+ /* required fields in a FontInfo blend dictionary */
+ <a href="ft2-type1_tables.html#T1_BLEND_UNDERLINE_POSITION">T1_BLEND_UNDERLINE_POSITION</a> = 0,
+ <a href="ft2-type1_tables.html#T1_BLEND_UNDERLINE_THICKNESS">T1_BLEND_UNDERLINE_THICKNESS</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_ITALIC_ANGLE">T1_BLEND_ITALIC_ANGLE</a>,
+
+ /* required fields in a Private blend dictionary */
+ <a href="ft2-type1_tables.html#T1_BLEND_BLUE_VALUES">T1_BLEND_BLUE_VALUES</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_OTHER_BLUES">T1_BLEND_OTHER_BLUES</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_STANDARD_WIDTH">T1_BLEND_STANDARD_WIDTH</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_STANDARD_HEIGHT">T1_BLEND_STANDARD_HEIGHT</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_STEM_SNAP_WIDTHS">T1_BLEND_STEM_SNAP_WIDTHS</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_STEM_SNAP_HEIGHTS">T1_BLEND_STEM_SNAP_HEIGHTS</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_BLUE_SCALE">T1_BLEND_BLUE_SCALE</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_BLUE_SHIFT">T1_BLEND_BLUE_SHIFT</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_FAMILY_BLUES">T1_BLEND_FAMILY_BLUES</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_FAMILY_OTHER_BLUES">T1_BLEND_FAMILY_OTHER_BLUES</a>,
+ <a href="ft2-type1_tables.html#T1_BLEND_FORCE_BOLD">T1_BLEND_FORCE_BOLD</a>,
+
+ T1_BLEND_MAX /* do not remove */
+
+ } <b>T1_Blend_Flags</b>;
+
+
+ /* these constants are deprecated; use the corresponding */
+ /* `<b>T1_Blend_Flags</b>' values instead */
+#define t1_blend_underline_position <a href="ft2-type1_tables.html#T1_BLEND_UNDERLINE_POSITION">T1_BLEND_UNDERLINE_POSITION</a>
+#define t1_blend_underline_thickness <a href="ft2-type1_tables.html#T1_BLEND_UNDERLINE_THICKNESS">T1_BLEND_UNDERLINE_THICKNESS</a>
+#define t1_blend_italic_angle <a href="ft2-type1_tables.html#T1_BLEND_ITALIC_ANGLE">T1_BLEND_ITALIC_ANGLE</a>
+#define t1_blend_blue_values <a href="ft2-type1_tables.html#T1_BLEND_BLUE_VALUES">T1_BLEND_BLUE_VALUES</a>
+#define t1_blend_other_blues <a href="ft2-type1_tables.html#T1_BLEND_OTHER_BLUES">T1_BLEND_OTHER_BLUES</a>
+#define t1_blend_standard_widths <a href="ft2-type1_tables.html#T1_BLEND_STANDARD_WIDTH">T1_BLEND_STANDARD_WIDTH</a>
+#define t1_blend_standard_height <a href="ft2-type1_tables.html#T1_BLEND_STANDARD_HEIGHT">T1_BLEND_STANDARD_HEIGHT</a>
+#define t1_blend_stem_snap_widths <a href="ft2-type1_tables.html#T1_BLEND_STEM_SNAP_WIDTHS">T1_BLEND_STEM_SNAP_WIDTHS</a>
+#define t1_blend_stem_snap_heights <a href="ft2-type1_tables.html#T1_BLEND_STEM_SNAP_HEIGHTS">T1_BLEND_STEM_SNAP_HEIGHTS</a>
+#define t1_blend_blue_scale <a href="ft2-type1_tables.html#T1_BLEND_BLUE_SCALE">T1_BLEND_BLUE_SCALE</a>
+#define t1_blend_blue_shift <a href="ft2-type1_tables.html#T1_BLEND_BLUE_SHIFT">T1_BLEND_BLUE_SHIFT</a>
+#define t1_blend_family_blues <a href="ft2-type1_tables.html#T1_BLEND_FAMILY_BLUES">T1_BLEND_FAMILY_BLUES</a>
+#define t1_blend_family_other_blues <a href="ft2-type1_tables.html#T1_BLEND_FAMILY_OTHER_BLUES">T1_BLEND_FAMILY_OTHER_BLUES</a>
+#define t1_blend_force_bold <a href="ft2-type1_tables.html#T1_BLEND_FORCE_BOLD">T1_BLEND_FORCE_BOLD</a>
+#define t1_blend_max T1_BLEND_MAX
+</pre>
+
+<p>A set of flags used to indicate which fields are present in a given blend dictionary (font info or private). Used to support Multiple Masters fonts.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="T1_BLEND_UNDERLINE_POSITION">T1_BLEND_UNDERLINE_POSITION</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_UNDERLINE_THICKNESS">T1_BLEND_UNDERLINE_THICKNESS</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_ITALIC_ANGLE">T1_BLEND_ITALIC_ANGLE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_BLUE_VALUES">T1_BLEND_BLUE_VALUES</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_OTHER_BLUES">T1_BLEND_OTHER_BLUES</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_STANDARD_WIDTH">T1_BLEND_STANDARD_WIDTH</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_STANDARD_HEIGHT">T1_BLEND_STANDARD_HEIGHT</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_STEM_SNAP_WIDTHS">T1_BLEND_STEM_SNAP_WIDTHS</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_STEM_SNAP_HEIGHTS">T1_BLEND_STEM_SNAP_HEIGHTS</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_BLUE_SCALE">T1_BLEND_BLUE_SCALE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_BLUE_SHIFT">T1_BLEND_BLUE_SHIFT</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_FAMILY_BLUES">T1_BLEND_FAMILY_BLUES</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_FAMILY_OTHER_BLUES">T1_BLEND_FAMILY_OTHER_BLUES</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_BLEND_FORCE_BOLD">T1_BLEND_FORCE_BOLD</td><td class="desc">
+<p></p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="T1_EncodingType">T1_EncodingType</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">enum</span> T1_EncodingType_
+ {
+ <a href="ft2-type1_tables.html#T1_ENCODING_TYPE_NONE">T1_ENCODING_TYPE_NONE</a> = 0,
+ <a href="ft2-type1_tables.html#T1_ENCODING_TYPE_ARRAY">T1_ENCODING_TYPE_ARRAY</a>,
+ <a href="ft2-type1_tables.html#T1_ENCODING_TYPE_STANDARD">T1_ENCODING_TYPE_STANDARD</a>,
+ <a href="ft2-type1_tables.html#T1_ENCODING_TYPE_ISOLATIN1">T1_ENCODING_TYPE_ISOLATIN1</a>,
+ <a href="ft2-type1_tables.html#T1_ENCODING_TYPE_EXPERT">T1_ENCODING_TYPE_EXPERT</a>
+
+ } <b>T1_EncodingType</b>;
+</pre>
+
+<p>An enumeration describing the &lsquo;Encoding&rsquo; entry in a Type 1 dictionary.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="T1_ENCODING_TYPE_NONE">T1_ENCODING_TYPE_NONE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_ENCODING_TYPE_ARRAY">T1_ENCODING_TYPE_ARRAY</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_ENCODING_TYPE_STANDARD">T1_ENCODING_TYPE_STANDARD</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_ENCODING_TYPE_ISOLATIN1">T1_ENCODING_TYPE_ISOLATIN1</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="T1_ENCODING_TYPE_EXPERT">T1_ENCODING_TYPE_EXPERT</td><td class="desc">
+<p></p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="PS_Dict_Keys">PS_Dict_Keys</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <span class="keyword">enum</span> PS_Dict_Keys_
+ {
+ /* conventionally in the font dictionary */
+ <a href="ft2-type1_tables.html#PS_DICT_FONT_TYPE">PS_DICT_FONT_TYPE</a>, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_FONT_MATRIX">PS_DICT_FONT_MATRIX</a>, /* <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_FONT_BBOX">PS_DICT_FONT_BBOX</a>, /* <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_PAINT_TYPE">PS_DICT_PAINT_TYPE</a>, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_FONT_NAME">PS_DICT_FONT_NAME</a>, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
+ <a href="ft2-type1_tables.html#PS_DICT_UNIQUE_ID">PS_DICT_UNIQUE_ID</a>, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_NUM_CHAR_STRINGS">PS_DICT_NUM_CHAR_STRINGS</a>, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_CHAR_STRING_KEY">PS_DICT_CHAR_STRING_KEY</a>, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
+ <a href="ft2-type1_tables.html#PS_DICT_CHAR_STRING">PS_DICT_CHAR_STRING</a>, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
+ <a href="ft2-type1_tables.html#PS_DICT_ENCODING_TYPE">PS_DICT_ENCODING_TYPE</a>, /* <a href="ft2-type1_tables.html#T1_EncodingType">T1_EncodingType</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_ENCODING_ENTRY">PS_DICT_ENCODING_ENTRY</a>, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
+
+ /* conventionally in the font Private dictionary */
+ <a href="ft2-type1_tables.html#PS_DICT_NUM_SUBRS">PS_DICT_NUM_SUBRS</a>, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_SUBR">PS_DICT_SUBR</a>, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
+ <a href="ft2-type1_tables.html#PS_DICT_STD_HW">PS_DICT_STD_HW</a>, /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_STD_VW">PS_DICT_STD_VW</a>, /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_NUM_BLUE_VALUES">PS_DICT_NUM_BLUE_VALUES</a>, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_BLUE_VALUE">PS_DICT_BLUE_VALUE</a>, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_BLUE_FUZZ">PS_DICT_BLUE_FUZZ</a>, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_NUM_OTHER_BLUES">PS_DICT_NUM_OTHER_BLUES</a>, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_OTHER_BLUE">PS_DICT_OTHER_BLUE</a>, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_NUM_FAMILY_BLUES">PS_DICT_NUM_FAMILY_BLUES</a>, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_FAMILY_BLUE">PS_DICT_FAMILY_BLUE</a>, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_NUM_FAMILY_OTHER_BLUES">PS_DICT_NUM_FAMILY_OTHER_BLUES</a>, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_FAMILY_OTHER_BLUE">PS_DICT_FAMILY_OTHER_BLUE</a>, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_BLUE_SCALE">PS_DICT_BLUE_SCALE</a>, /* <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_BLUE_SHIFT">PS_DICT_BLUE_SHIFT</a>, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_NUM_STEM_SNAP_H">PS_DICT_NUM_STEM_SNAP_H</a>, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_STEM_SNAP_H">PS_DICT_STEM_SNAP_H</a>, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_NUM_STEM_SNAP_V">PS_DICT_NUM_STEM_SNAP_V</a>, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_STEM_SNAP_V">PS_DICT_STEM_SNAP_V</a>, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_FORCE_BOLD">PS_DICT_FORCE_BOLD</a>, /* <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_RND_STEM_UP">PS_DICT_RND_STEM_UP</a>, /* <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_MIN_FEATURE">PS_DICT_MIN_FEATURE</a>, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_LEN_IV">PS_DICT_LEN_IV</a>, /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_PASSWORD">PS_DICT_PASSWORD</a>, /* <a href="ft2-basic_types.html#FT_Long">FT_Long</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_LANGUAGE_GROUP">PS_DICT_LANGUAGE_GROUP</a>, /* <a href="ft2-basic_types.html#FT_Long">FT_Long</a> */
+
+ /* conventionally in the font FontInfo dictionary */
+ <a href="ft2-type1_tables.html#PS_DICT_VERSION">PS_DICT_VERSION</a>, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
+ <a href="ft2-type1_tables.html#PS_DICT_NOTICE">PS_DICT_NOTICE</a>, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
+ <a href="ft2-type1_tables.html#PS_DICT_FULL_NAME">PS_DICT_FULL_NAME</a>, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
+ <a href="ft2-type1_tables.html#PS_DICT_FAMILY_NAME">PS_DICT_FAMILY_NAME</a>, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
+ <a href="ft2-type1_tables.html#PS_DICT_WEIGHT">PS_DICT_WEIGHT</a>, /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
+ <a href="ft2-type1_tables.html#PS_DICT_IS_FIXED_PITCH">PS_DICT_IS_FIXED_PITCH</a>, /* <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_UNDERLINE_POSITION">PS_DICT_UNDERLINE_POSITION</a>, /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_UNDERLINE_THICKNESS">PS_DICT_UNDERLINE_THICKNESS</a>, /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_FS_TYPE">PS_DICT_FS_TYPE</a>, /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> */
+ <a href="ft2-type1_tables.html#PS_DICT_ITALIC_ANGLE">PS_DICT_ITALIC_ANGLE</a>, /* <a href="ft2-basic_types.html#FT_Long">FT_Long</a> */
+
+ PS_DICT_MAX = <a href="ft2-type1_tables.html#PS_DICT_ITALIC_ANGLE">PS_DICT_ITALIC_ANGLE</a>
+
+ } <b>PS_Dict_Keys</b>;
+</pre>
+
+<p>An enumeration used in calls to <a href="ft2-type1_tables.html#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a> to identify the Type&nbsp;1 dictionary entry to retrieve.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="PS_DICT_FONT_TYPE">PS_DICT_FONT_TYPE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_FONT_MATRIX">PS_DICT_FONT_MATRIX</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_FONT_BBOX">PS_DICT_FONT_BBOX</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_PAINT_TYPE">PS_DICT_PAINT_TYPE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_FONT_NAME">PS_DICT_FONT_NAME</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_UNIQUE_ID">PS_DICT_UNIQUE_ID</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_NUM_CHAR_STRINGS">PS_DICT_NUM_CHAR_STRINGS</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_CHAR_STRING_KEY">PS_DICT_CHAR_STRING_KEY</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_CHAR_STRING">PS_DICT_CHAR_STRING</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_ENCODING_TYPE">PS_DICT_ENCODING_TYPE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_ENCODING_ENTRY">PS_DICT_ENCODING_ENTRY</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_NUM_SUBRS">PS_DICT_NUM_SUBRS</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_SUBR">PS_DICT_SUBR</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_STD_HW">PS_DICT_STD_HW</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_STD_VW">PS_DICT_STD_VW</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_NUM_BLUE_VALUES">PS_DICT_NUM_BLUE_VALUES</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_BLUE_VALUE">PS_DICT_BLUE_VALUE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_BLUE_FUZZ">PS_DICT_BLUE_FUZZ</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_NUM_OTHER_BLUES">PS_DICT_NUM_OTHER_BLUES</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_OTHER_BLUE">PS_DICT_OTHER_BLUE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_NUM_FAMILY_BLUES">PS_DICT_NUM_FAMILY_BLUES</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_FAMILY_BLUE">PS_DICT_FAMILY_BLUE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_NUM_FAMILY_OTHER_BLUES">PS_DICT_NUM_FAMILY_OTHER_BLUES</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_FAMILY_OTHER_BLUE">PS_DICT_FAMILY_OTHER_BLUE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_BLUE_SCALE">PS_DICT_BLUE_SCALE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_BLUE_SHIFT">PS_DICT_BLUE_SHIFT</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_NUM_STEM_SNAP_H">PS_DICT_NUM_STEM_SNAP_H</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_STEM_SNAP_H">PS_DICT_STEM_SNAP_H</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_NUM_STEM_SNAP_V">PS_DICT_NUM_STEM_SNAP_V</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_STEM_SNAP_V">PS_DICT_STEM_SNAP_V</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_FORCE_BOLD">PS_DICT_FORCE_BOLD</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_RND_STEM_UP">PS_DICT_RND_STEM_UP</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_MIN_FEATURE">PS_DICT_MIN_FEATURE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_LEN_IV">PS_DICT_LEN_IV</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_PASSWORD">PS_DICT_PASSWORD</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_LANGUAGE_GROUP">PS_DICT_LANGUAGE_GROUP</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_VERSION">PS_DICT_VERSION</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_NOTICE">PS_DICT_NOTICE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_FULL_NAME">PS_DICT_FULL_NAME</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_FAMILY_NAME">PS_DICT_FAMILY_NAME</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_WEIGHT">PS_DICT_WEIGHT</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_IS_FIXED_PITCH">PS_DICT_IS_FIXED_PITCH</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_UNDERLINE_POSITION">PS_DICT_UNDERLINE_POSITION</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_UNDERLINE_THICKNESS">PS_DICT_UNDERLINE_THICKNESS</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_FS_TYPE">PS_DICT_FS_TYPE</td><td class="desc">
+<p></p>
+</td></tr>
+<tr><td class="val" id="PS_DICT_ITALIC_ANGLE">PS_DICT_ITALIC_ANGLE</td><td class="desc">
+<p></p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="T1_FontInfo">T1_FontInfo</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> <b>T1_FontInfo</b>;
+</pre>
+
+<p>This type is equivalent to <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="T1_Private">T1_Private</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a> <b>T1_Private</b>;
+</pre>
+
+<p>This type is equivalent to <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="CID_FontDict">CID_FontDict</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a> <b>CID_FontDict</b>;
+</pre>
+
+<p>This type is equivalent to <a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="CID_Info">CID_Info</h3>
+<p>Defined in FT_TYPE1_TABLES_H (t1tables.h).</p>
+<pre>
+ <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a> <b>CID_Info</b>;
+</pre>
+
+<p>This type is equivalent to <a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-user_allocation.html b/docs/reference/ft2-user_allocation.html
index 3868a39..52bd6ec 100644
--- a/docs/reference/ft2-user_allocation.html
+++ b/docs/reference/ft2-user_allocation.html
@@ -3,45 +3,108 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
+
+<h1>User allocation</h1>
-<center><h1>
-User allocation
-</h1></center>
-<table align=center width="87%"><tr><td>
<p>FreeType assumes that structures allocated by the user and passed as arguments are zeroed out except for the actual data. In other words, it is recommended to use &lsquo;calloc&rsquo; (or variants of it) instead of &lsquo;malloc&rsquo; for allocation.</p>
-</td></tr></table><br>
+
</body>
</html>
diff --git a/docs/reference/ft2-version.html b/docs/reference/ft2-version.html
index 9136441..89e3dac 100644
--- a/docs/reference/ft2-version.html
+++ b/docs/reference/ft2-version.html
@@ -3,217 +3,250 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-FreeType Version
-</h1></center>
+<h1>FreeType Version</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FREETYPE_XXX">FREETYPE_XXX</a></td><td></td><td><a href="#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></td></tr>
-<tr><td></td><td><a href="#FT_Library_Version">FT_Library_Version</a></td><td></td><td><a href="#FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_Library_Version">FT_Library_Version</a></td><td>&nbsp;</td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></td></tr>
+<tr><td><a href="#FREETYPE_MAJOR">FREETYPE_MAJOR</a></td><td><a href="#FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></td></tr>
+<tr><td><a href="#FREETYPE_MINOR">FREETYPE_MINOR</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FREETYPE_PATCH">FREETYPE_PATCH</a></td><td><a href="#FREETYPE_XXX">FREETYPE_XXX</a></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>Note that those functions and macros are of limited use because even a new release of FreeType with only documentation changes increases the version number.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FREETYPE_XXX">FREETYPE_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
-#define <a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MAJOR</a> 2
-#define <a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MINOR</a> 4
-#define <a href="ft2-version.html#FREETYPE_XXX">FREETYPE_PATCH</a> 9
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>These three macros identify the FreeType source code version. Use <a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a> to access them at runtime.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FREETYPE_MAJOR</b></td><td>
-<p>The major version number.</p>
-</td></tr>
-<tr valign=top><td><b>FREETYPE_MINOR</b></td><td>
-<p>The minor version number.</p>
-</td></tr>
-<tr valign=top><td><b>FREETYPE_PATCH</b></td><td>
-<p>The patch level.</p>
-</td></tr>
-</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>The version number of FreeType if built as a dynamic link library with the &lsquo;libtool&rsquo; package is <i>not</i> controlled by these three macros.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Library_Version">FT_Library_Version</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<div class="section">
+<h3 id="FT_Library_Version">FT_Library_Version</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Library_Version</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> *amajor,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> *aminor,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> *apatch );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Return the version of the FreeType library being used. This is useful when dynamically linking to the library, since one cannot use the macros <a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MAJOR</a>, <a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MINOR</a>, and <a href="ft2-version.html#FREETYPE_XXX">FREETYPE_PATCH</a>.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>library</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
<p>A source library handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>amajor</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="amajor">amajor</td><td class="desc">
<p>The major version number.</p>
</td></tr>
-<tr valign=top><td><b>aminor</b></td><td>
+<tr><td class="val" id="aminor">aminor</td><td class="desc">
<p>The minor version number.</p>
</td></tr>
-<tr valign=top><td><b>apatch</b></td><td>
+<tr><td class="val" id="apatch">apatch</td><td class="desc">
<p>The patch version number.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>The reason why this function takes a &lsquo;library&rsquo; argument is because certain programs implement library initialization in a custom way that doesn't use <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a>.</p>
<p>In such cases, the library version might not be available before the library object has been created.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> )
<b>FT_Face_CheckTrueTypePatents</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Parse all bytecode instructions of a TrueType font file to check whether any of the patented opcodes are used. This is only useful if you want to be able to use the unpatented hinter with fonts that do <b>not</b> use these opcodes.</p>
<p>Note that this function parses <b>all</b> glyph instructions in the font file, which may be slow.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A face handle.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>1&nbsp;if this is a TrueType font that uses one of the patented opcodes, 0&nbsp;otherwise.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Since May 2010, TrueType hinting is no longer patented.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.5</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_FREETYPE_H (freetype/freetype.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> )
<b>FT_Face_SetUnpatentedHinting</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> value );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Enable or disable the unpatented hinter for a given face. Only enable it if you have determined that the face doesn't use any patented opcodes (see <a href="ft2-version.html#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a>).</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A face handle.</p>
</td></tr>
-<tr valign=top><td><b>value</b></td><td>
+<tr><td class="val" id="value">value</td><td class="desc">
<p>New boolean setting.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>The old setting value. This will always be false if this is not an SFNT font, or if the unpatented hinter is not compiled in this instance of the library.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>Since May 2010, TrueType hinting is no longer patented.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
+
+<h4>since</h4>
<p>2.3.5</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FREETYPE_XXX">FREETYPE_XXX</h3>
+<p>Defined in FT_FREETYPE_H (freetype.h).</p>
+<pre>
+#define <a href="ft2-version.html#FREETYPE_MAJOR">FREETYPE_MAJOR</a> 2
+#define <a href="ft2-version.html#FREETYPE_MINOR">FREETYPE_MINOR</a> 5
+#define <a href="ft2-version.html#FREETYPE_PATCH">FREETYPE_PATCH</a> 5
+</pre>
+
+<p>These three macros identify the FreeType source code version. Use <a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a> to access them at runtime.</p>
+
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FREETYPE_MAJOR">FREETYPE_MAJOR</td><td class="desc">
+<p>The major version number.</p>
+</td></tr>
+<tr><td class="val" id="FREETYPE_MINOR">FREETYPE_MINOR</td><td class="desc">
+<p>The minor version number.</p>
+</td></tr>
+<tr><td class="val" id="FREETYPE_PATCH">FREETYPE_PATCH</td><td class="desc">
+<p>The patch level.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>The version number of FreeType if built as a dynamic link library with the &lsquo;libtool&rsquo; package is <i>not</i> controlled by these three macros.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/reference/ft2-winfnt_fonts.html b/docs/reference/ft2-winfnt_fonts.html
index 3c72039..a17e350 100644
--- a/docs/reference/ft2-winfnt_fonts.html
+++ b/docs/reference/ft2-winfnt_fonts.html
@@ -3,164 +3,216 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.4.9 API Reference</title>
+<title>FreeType-2.5.5 API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
-<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<center><h1>FreeType-2.4.9 API Reference</h1></center>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.5.5 API Reference</h1>
-<center><h1>
-Window FNT Files
-</h1></center>
+<h1>Window FNT Files</h1>
<h2>Synopsis</h2>
-<table align=center cellspacing=5 cellpadding=0 border=0>
-<tr><td></td><td><a href="#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td><td></td><td><a href="#FT_WinFNT_Header">FT_WinFNT_Header</a></td><td></td><td></td></tr>
-<tr><td></td><td><a href="#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td><td></td><td><a href="#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td></td><td></td></tr>
-</table><br><br>
+<table class="synopsis">
+<tr><td><a href="#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td><td><a href="#FT_WinFNT_Header">FT_WinFNT_Header</a></td><td></td></tr>
+<tr><td><a href="#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td><td><a href="#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td></td></tr>
+</table>
+
-<table align=center width="87%"><tr><td>
<p>This section contains the declaration of Windows FNT specific functions.</p>
-</td></tr></table><br>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1252</a> 0
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_DEFAULT</a> 1
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_SYMBOL</a> 2
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_MAC</a> 77
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP932</a> 128
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP949</a> 129
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1361</a> 130
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP936</a> 134
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP950</a> 136
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1253</a> 161
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1254</a> 162
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1258</a> 163
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1255</a> 177
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1256</a> 178
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1257</a> 186
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a> 204
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP874</a> 222
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1250</a> 238
-#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_OEM</a> 255
+<div class="section">
+<h3 id="FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</h3>
+<p>Defined in FT_WINFONTS_H (ftwinfnt.h).</p>
+<pre>
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1252">FT_WinFNT_ID_CP1252</a> 0
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_DEFAULT">FT_WinFNT_ID_DEFAULT</a> 1
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_SYMBOL">FT_WinFNT_ID_SYMBOL</a> 2
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_MAC">FT_WinFNT_ID_MAC</a> 77
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP932">FT_WinFNT_ID_CP932</a> 128
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP949">FT_WinFNT_ID_CP949</a> 129
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1361">FT_WinFNT_ID_CP1361</a> 130
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP936">FT_WinFNT_ID_CP936</a> 134
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP950">FT_WinFNT_ID_CP950</a> 136
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1253">FT_WinFNT_ID_CP1253</a> 161
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1254">FT_WinFNT_ID_CP1254</a> 162
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1258">FT_WinFNT_ID_CP1258</a> 163
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1255">FT_WinFNT_ID_CP1255</a> 177
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1256">FT_WinFNT_ID_CP1256</a> 178
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1257">FT_WinFNT_ID_CP1257</a> 186
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1251">FT_WinFNT_ID_CP1251</a> 204
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP874">FT_WinFNT_ID_CP874</a> 222
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1250">FT_WinFNT_ID_CP1250</a> 238
+#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_OEM">FT_WinFNT_ID_OEM</a> 255
+</pre>
+
+<p>A list of valid values for the &lsquo;charset&rsquo; byte in <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a>. Exact mapping tables for the various cpXXXX encodings (except for cp1361) can be found at <a href="ftp://ftp.unicode.org/public">ftp://ftp.unicode.org/public</a> in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.</p>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
-<p>A list of valid values for the &lsquo;charset&rsquo; byte in <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a>. Exact mapping tables for the various cpXXXX encodings (except for cp1361) can be found at ftp://ftp.unicode.org in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>FT_WinFNT_ID_DEFAULT</b></td><td>
+<h4>values</h4>
+<table class="fields">
+<tr><td class="val" id="FT_WinFNT_ID_DEFAULT">FT_WinFNT_ID_DEFAULT</td><td class="desc">
<p>This is used for font enumeration and font creation as a &lsquo;don't care&rsquo; value. Valid font files don't contain this value. When querying for information about the character set of the font that is currently selected into a specified device context, this return value (of the related Windows API) simply denotes failure.</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_SYMBOL</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_SYMBOL">FT_WinFNT_ID_SYMBOL</td><td class="desc">
<p>There is no known mapping table available.</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_MAC</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_MAC">FT_WinFNT_ID_MAC</td><td class="desc">
<p>Mac Roman encoding.</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_OEM</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_OEM">FT_WinFNT_ID_OEM</td><td class="desc">
<p>From Michael Pöttgen &lt;michael@poettgen.de&gt;:</p>
<p>The &lsquo;Windows Font Mapping&rsquo; article says that FT_WinFNT_ID_OEM is used for the charset of vector fonts, like &lsquo;modern.fon&rsquo;, &lsquo;roman.fon&rsquo;, and &lsquo;script.fon&rsquo; on Windows.</p>
<p>The &lsquo;CreateFont&rsquo; documentation says: The FT_WinFNT_ID_OEM value specifies a character set that is operating-system dependent.</p>
<p>The &lsquo;IFIMETRICS&rsquo; documentation from the &lsquo;Windows Driver Development Kit&rsquo; says: This font supports an OEM-specific character set. The OEM character set is system dependent.</p>
<p>In general OEM, as opposed to ANSI (i.e., cp1252), denotes the second default codepage that most international versions of Windows have. It is one of the OEM codepages from</p>
-<p>http://www.microsoft.com/globaldev/reference/cphome.mspx,</p>
+<p><a href="http://www.microsoft.com/globaldev/reference/cphome.mspx">http://www.microsoft.com/globaldev/reference/cphome.mspx</a>,</p>
<p>and is used for the &lsquo;DOS boxes&rsquo;, to support legacy applications. A German Windows version for example usually uses ANSI codepage 1252 and OEM codepage 850.</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP874</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP874">FT_WinFNT_ID_CP874</td><td class="desc">
<p>A superset of Thai TIS 620 and ISO 8859-11.</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP932</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP932">FT_WinFNT_ID_CP932</td><td class="desc">
<p>A superset of Japanese Shift-JIS (with minor deviations).</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP936</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP936">FT_WinFNT_ID_CP936</td><td class="desc">
<p>A superset of simplified Chinese GB 2312-1980 (with different ordering and minor deviations).</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP949</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP949">FT_WinFNT_ID_CP949</td><td class="desc">
<p>A superset of Korean Hangul KS&nbsp;C 5601-1987 (with different ordering and minor deviations).</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP950</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP950">FT_WinFNT_ID_CP950</td><td class="desc">
<p>A superset of traditional Chinese Big&nbsp;5 ETen (with different ordering and minor deviations).</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP1250</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP1250">FT_WinFNT_ID_CP1250</td><td class="desc">
<p>A superset of East European ISO 8859-2 (with slightly different ordering).</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP1251</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP1251">FT_WinFNT_ID_CP1251</td><td class="desc">
<p>A superset of Russian ISO 8859-5 (with different ordering).</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP1252</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP1252">FT_WinFNT_ID_CP1252</td><td class="desc">
<p>ANSI encoding. A superset of ISO 8859-1.</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP1253</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP1253">FT_WinFNT_ID_CP1253</td><td class="desc">
<p>A superset of Greek ISO 8859-7 (with minor modifications).</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP1254</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP1254">FT_WinFNT_ID_CP1254</td><td class="desc">
<p>A superset of Turkish ISO 8859-9.</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP1255</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP1255">FT_WinFNT_ID_CP1255</td><td class="desc">
<p>A superset of Hebrew ISO 8859-8 (with some modifications).</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP1256</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP1256">FT_WinFNT_ID_CP1256</td><td class="desc">
<p>A superset of Arabic ISO 8859-6 (with different ordering).</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP1257</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP1257">FT_WinFNT_ID_CP1257</td><td class="desc">
<p>A superset of Baltic ISO 8859-13 (with some deviations).</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP1258</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP1258">FT_WinFNT_ID_CP1258</td><td class="desc">
<p>For Vietnamese. This encoding doesn't cover all necessary characters.</p>
</td></tr>
-<tr valign=top><td><b>FT_WinFNT_ID_CP1361</b></td><td>
+<tr><td class="val" id="FT_WinFNT_ID_CP1361">FT_WinFNT_ID_CP1361</td><td class="desc">
<p>Korean (Johab).</p>
</td></tr>
</table>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</h3>
+<p>Defined in FT_WINFONTS_H (ftwinfnt.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_WinFNT_HeaderRec_
{
<a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> version;
@@ -201,78 +253,58 @@ Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).
<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> reserved1[4];
} <b>FT_WinFNT_HeaderRec</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Windows FNT Header info.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_WinFNT_Header">FT_WinFNT_Header</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_WinFNT_Header">FT_WinFNT_Header</h3>
+<p>Defined in FT_WINFONTS_H (ftwinfnt.h).</p>
+<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_WinFNT_HeaderRec_* <b>FT_WinFNT_Header</b>;
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to an <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a> structure.</p>
-</td></tr></table><br>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
-<table align=center width="75%"><tr><td>
-<h4><a name="FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></h4>
-<table align=center width="87%"><tr><td>
-Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+<div class="section">
+<h3 id="FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</h3>
+<p>Defined in FT_WINFONTS_H (ftwinfnt.h).</p>
+<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Get_WinFNT_Header</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
<a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a> *aheader );
+</pre>
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Retrieve a Windows FNT font info header.</p>
-</td></tr></table><br>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>face</b></td><td>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
-<p></p>
-<table cellpadding=3 border=0>
-<tr valign=top><td><b>aheader</b></td><td>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="aheader">aheader</td><td class="desc">
<p>The WinFNT header.</p>
</td></tr>
</table>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
+
+<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>
-</td></tr></table>
-<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+
+<h4>note</h4>
<p>This function only works with Windows FNT faces, returning an error otherwise.</p>
-</td></tr></table>
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
diff --git a/docs/release b/docs/release
index 28a8235..98f16cd 100644
--- a/docs/release
+++ b/docs/release
@@ -1,7 +1,7 @@
How to prepare a new release
----------------------------
-. include/freetype/freetype.h: Update FREETYPE_MAJOR, FREETYPE_MINOR,
+. include/freetype.h: Update FREETYPE_MAJOR, FREETYPE_MINOR,
and FREETYPE_PATCH.
. Update version numbers in all files where necessary (for example, do
@@ -41,7 +41,8 @@ How to prepare a new release
. Run src/tools/chktrcmp.py and check that there are no undefined
trace_XXXX macros.
-. Tag the git repositories (freetype2, freetype2-demos) with
+. After pushing the new release, tag the git repositories (freetype2,
+ freetype2-demos) with
git tag VER-<version> -m "" -u <committer>
@@ -49,16 +50,21 @@ How to prepare a new release
git push --tags
- TODO: Tag the home page CVS on savannah.nongnu.org.
+. Check with
+
+ git clean -ndx
+
+ that the git directory is really clean (and remove extraneous files
+ if necessary).
. 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
+ everything in
- freetype.freedesktop.org:/srv/freetype.freedesktop.org/www/freetype2/docs/
+ <freetype-web git repository>/freetype2/docs
except the `reference' subdirectory. Do *not* use option `-l' from
zip!
@@ -70,7 +76,7 @@ How to prepare a new release
#!/bin/sh
- VERSION=2.4.8
+ VERSION=2.5.1
SAVANNAH_USER=wl
SOURCEFORGE_USER=wlemb
@@ -154,7 +160,7 @@ How to prepare a new release
#!/bin/sh
- VERSION=2.4.8
+ VERSION=2.5.1
SOURCEFORGE_USER=wlemb
#####################################################################
@@ -164,39 +170,26 @@ How to prepare a new release
# EOF
-. On SourceForge, tag the just uploaded `ftXXXX.zip' and
+. On SourceForge, tag the just uploaded `ftXXX.zip' and
`freetype-XXX.tar.bz2' files as the default files to download for
`Windows' and `Others', respectively.
. 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
+ <freetype-web git repository>/freetype2/docs/reference
- and copy it to
+. Update the `freetype-web' repository. `git push' then automatically
+ triggers an update of the public web pages within ten minutes, due
+ to a cron script (on wl@freedesktop.org) that rsyncs with
- shell.sf.net:/home/groups/f/fr/freetype/htdocs/index2.html
+ freedesktop.org://srv/freetype.freedesktop.org/www
. Announce new release on freetype-announce@nongnu.org and to relevant
newsgroups.
----------------------------------------------------------------------
-Copyright 2003, 2005-2007, 2009, 2011 by
+Copyright 2003, 2005-2007, 2009, 2011-2014 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/include/freetype/config/ftconfig.h b/include/config/ftconfig.h
index 5628569..22d70fd 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/config/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* ANSI-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2004, 2006-2008, 2010-2011 by */
+/* Copyright 1996-2004, 2006-2008, 2010-2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,11 +27,11 @@
/* Note however that if some specific modifications are needed, we */
/* advise you to place a modified copy in your build directory. */
/* */
- /* The build directory is usually `freetype/builds/<system>', and */
- /* contains system-specific files that are always included first when */
- /* building the library. */
+ /* The build directory is usually `builds/<system>', and contains */
+ /* system-specific files that are always included first when building */
+ /* the library. */
/* */
- /* This ANSI version should stay in `include/freetype/config'. */
+ /* This ANSI version should stay in `include/config/'. */
/* */
/*************************************************************************/
@@ -53,7 +53,7 @@ FT_BEGIN_HEADER
/* These macros can be toggled to suit a specific system. The current */
/* ones are defaults used to compile FreeType in an ANSI C environment */
/* (16bit compilers are also supported). Copy this file to your own */
- /* `freetype/builds/<system>' directory, and edit it to port the engine. */
+ /* `builds/<system>' directory, and edit it to port the engine. */
/* */
/*************************************************************************/
@@ -200,6 +200,30 @@ FT_BEGIN_HEADER
/* */
typedef unsigned XXX FT_UInt32;
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int64 */
+ /* */
+ /* A typedef for a 64bit signed integer type. The size depends on */
+ /* the configuration. Only defined if there is real 64bit support; */
+ /* otherwise, it gets emulated with a structure (if necessary). */
+ /* */
+ typedef signed XXX FT_Int64;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_UInt64 */
+ /* */
+ /* A typedef for a 64bit unsigned integer type. The size depends on */
+ /* the configuration. Only defined if there is real 64bit support; */
+ /* otherwise, it gets emulated with a structure (if necessary). */
+ /* */
+ typedef unsigned XXX FT_UInt64;
+
/* */
#endif
@@ -239,13 +263,24 @@ FT_BEGIN_HEADER
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
-#define FT_INT64 long
+#define FT_INT64 long
+#define FT_UINT64 unsigned long
-#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+ /*************************************************************************/
+ /* */
+ /* A 64-bit data type may create compilation problems if you compile */
+ /* in strict ANSI mode. To avoid them, we disable other 64-bit data */
+ /* types if __STDC__ is defined. You can however ignore this rule */
+ /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
+ /* */
+#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
/* this compiler provides the __int64 type */
#define FT_LONG64
-#define FT_INT64 __int64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
#elif defined( __BORLANDC__ ) /* Borland C++ */
@@ -254,7 +289,8 @@ FT_BEGIN_HEADER
/* this compiler provides the __int64 type */
#define FT_LONG64
-#define FT_INT64 __int64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
#elif defined( __WATCOMC__ ) /* Watcom C++ */
@@ -263,35 +299,24 @@ FT_BEGIN_HEADER
#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
#define FT_LONG64
-#define FT_INT64 long long int
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned 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 == (64 / FT_CHAR_BIT) */
-
-
- /*************************************************************************/
- /* */
- /* 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 )
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
-#ifdef __STDC__
-
- /* undefine the 64-bit macros in strict ANSI compilation mode */
-#undef FT_LONG64
-#undef FT_INT64
+#endif /* _MSC_VER */
-#endif /* __STDC__ */
+#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
-#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
+#ifdef FT_LONG64
+ typedef FT_INT64 FT_Int64;
+ typedef FT_UINT64 FT_UInt64;
+#endif
#define FT_BEGIN_STMNT do {
@@ -299,147 +324,6 @@ FT_BEGIN_HEADER
#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
@@ -457,6 +341,9 @@ FT_BEGIN_HEADER
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+#define FT_LOCAL_ARRAY( x ) extern const x
+#define FT_LOCAL_ARRAY_DEF( x ) const x
+
#ifndef FT_BASE
diff --git a/include/freetype/config/ftheader.h b/include/config/ftheader.h
index 2a7b8c4..b623629 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/config/ftheader.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
+/* Copyright 1996-2008, 2010, 2012, 2013 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 @@
*
*/
#ifndef FT_CONFIG_CONFIG_H
-#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h>
+#define FT_CONFIG_CONFIG_H <config/ftconfig.h>
#endif
@@ -122,7 +122,7 @@
*
*/
#ifndef FT_CONFIG_STANDARD_LIBRARY_H
-#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h>
+#define FT_CONFIG_STANDARD_LIBRARY_H <config/ftstdlib.h>
#endif
@@ -137,7 +137,7 @@
*
*/
#ifndef FT_CONFIG_OPTIONS_H
-#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h>
+#define FT_CONFIG_OPTIONS_H <config/ftoption.h>
#endif
@@ -153,7 +153,7 @@
*
*/
#ifndef FT_CONFIG_MODULES_H
-#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h>
+#define FT_CONFIG_MODULES_H <config/ftmodule.h>
#endif
/* */
@@ -170,7 +170,7 @@
* base FreeType~2 API.
*
*/
-#define FT_FREETYPE_H <freetype/freetype.h>
+#define FT_FREETYPE_H <freetype.h>
/*************************************************************************
@@ -185,7 +185,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_ERRORS_H <freetype/fterrors.h>
+#define FT_ERRORS_H <fterrors.h>
/*************************************************************************
@@ -198,7 +198,7 @@
* list of FreeType~2 module error offsets (and messages).
*
*/
-#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h>
+#define FT_MODULE_ERRORS_H <ftmoderr.h>
/*************************************************************************
@@ -214,7 +214,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_SYSTEM_H <freetype/ftsystem.h>
+#define FT_SYSTEM_H <ftsystem.h>
/*************************************************************************
@@ -230,7 +230,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_IMAGE_H <freetype/ftimage.h>
+#define FT_IMAGE_H <ftimage.h>
/*************************************************************************
@@ -245,7 +245,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_TYPES_H <freetype/fttypes.h>
+#define FT_TYPES_H <fttypes.h>
/*************************************************************************
@@ -260,7 +260,7 @@
* (Most applications will never need to include this file.)
*
*/
-#define FT_LIST_H <freetype/ftlist.h>
+#define FT_LIST_H <ftlist.h>
/*************************************************************************
@@ -273,7 +273,7 @@
* scalable outline management API of FreeType~2.
*
*/
-#define FT_OUTLINE_H <freetype/ftoutln.h>
+#define FT_OUTLINE_H <ftoutln.h>
/*************************************************************************
@@ -286,7 +286,7 @@
* API which manages multiple @FT_Size objects per face.
*
*/
-#define FT_SIZES_H <freetype/ftsizes.h>
+#define FT_SIZES_H <ftsizes.h>
/*************************************************************************
@@ -299,7 +299,7 @@
* module management API of FreeType~2.
*
*/
-#define FT_MODULE_H <freetype/ftmodapi.h>
+#define FT_MODULE_H <ftmodapi.h>
/*************************************************************************
@@ -312,7 +312,46 @@
* renderer module management API of FreeType~2.
*
*/
-#define FT_RENDER_H <freetype/ftrender.h>
+#define FT_RENDER_H <ftrender.h>
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_AUTOHINTER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the auto-hinting module.
+ *
+ */
+#define FT_AUTOHINTER_H <ftautoh.h>
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CFF_DRIVER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the CFF driver module.
+ *
+ */
+#define FT_CFF_DRIVER_H <ftcffdrv.h>
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TRUETYPE_DRIVER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the TrueType driver module.
+ *
+ */
+#define FT_TRUETYPE_DRIVER_H <ftttdrv.h>
/*************************************************************************
@@ -325,7 +364,7 @@
* types and API specific to the Type~1 format.
*
*/
-#define FT_TYPE1_TABLES_H <freetype/t1tables.h>
+#define FT_TYPE1_TABLES_H <t1tables.h>
/*************************************************************************
@@ -340,7 +379,7 @@
* definitions, taken from the TrueType and OpenType specifications.
*
*/
-#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h>
+#define FT_TRUETYPE_IDS_H <ttnameid.h>
/*************************************************************************
@@ -353,7 +392,7 @@
* types and API specific to the TrueType (as well as OpenType) format.
*
*/
-#define FT_TRUETYPE_TABLES_H <freetype/tttables.h>
+#define FT_TRUETYPE_TABLES_H <tttables.h>
/*************************************************************************
@@ -367,7 +406,7 @@
* SFNT-based font formats (i.e., TrueType and OpenType).
*
*/
-#define FT_TRUETYPE_TAGS_H <freetype/tttags.h>
+#define FT_TRUETYPE_TAGS_H <tttags.h>
/*************************************************************************
@@ -381,7 +420,7 @@
* face.
*
*/
-#define FT_BDF_H <freetype/ftbdf.h>
+#define FT_BDF_H <ftbdf.h>
/*************************************************************************
@@ -395,7 +434,7 @@
* face.
*
*/
-#define FT_CID_H <freetype/ftcid.h>
+#define FT_CID_H <ftcid.h>
/*************************************************************************
@@ -408,7 +447,7 @@
* definitions of an API which supports gzip-compressed files.
*
*/
-#define FT_GZIP_H <freetype/ftgzip.h>
+#define FT_GZIP_H <ftgzip.h>
/*************************************************************************
@@ -421,7 +460,7 @@
* definitions of an API which supports LZW-compressed files.
*
*/
-#define FT_LZW_H <freetype/ftlzw.h>
+#define FT_LZW_H <ftlzw.h>
/*************************************************************************
@@ -434,7 +473,7 @@
* definitions of an API which supports bzip2-compressed files.
*
*/
-#define FT_BZIP2_H <freetype/ftbzip2.h>
+#define FT_BZIP2_H <ftbzip2.h>
/*************************************************************************
@@ -447,7 +486,7 @@
* definitions of an API which supports Windows FNT files.
*
*/
-#define FT_WINFONTS_H <freetype/ftwinfnt.h>
+#define FT_WINFONTS_H <ftwinfnt.h>
/*************************************************************************
@@ -460,7 +499,7 @@
* API of the optional glyph management component.
*
*/
-#define FT_GLYPH_H <freetype/ftglyph.h>
+#define FT_GLYPH_H <ftglyph.h>
/*************************************************************************
@@ -473,7 +512,7 @@
* API of the optional bitmap conversion component.
*
*/
-#define FT_BITMAP_H <freetype/ftbitmap.h>
+#define FT_BITMAP_H <ftbitmap.h>
/*************************************************************************
@@ -486,7 +525,7 @@
* API of the optional exact bounding box computation routines.
*
*/
-#define FT_BBOX_H <freetype/ftbbox.h>
+#define FT_BBOX_H <ftbbox.h>
/*************************************************************************
@@ -499,7 +538,7 @@
* API of the optional FreeType~2 cache sub-system.
*
*/
-#define FT_CACHE_H <freetype/ftcache.h>
+#define FT_CACHE_H <ftcache.h>
/*************************************************************************
@@ -573,7 +612,7 @@
* compiled on the Mac (note that the base API still works though).
*
*/
-#define FT_MAC_H <freetype/ftmac.h>
+#define FT_MAC_H <ftmac.h>
/*************************************************************************
@@ -586,7 +625,7 @@
* optional multiple-masters management API of FreeType~2.
*
*/
-#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h>
+#define FT_MULTIPLE_MASTERS_H <ftmm.h>
/*************************************************************************
@@ -600,7 +639,7 @@
* SFNT-based font formats (i.e., TrueType and OpenType).
*
*/
-#define FT_SFNT_NAMES_H <freetype/ftsnames.h>
+#define FT_SFNT_NAMES_H <ftsnames.h>
/*************************************************************************
@@ -614,7 +653,7 @@
* GPOS, GSUB, JSTF).
*
*/
-#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h>
+#define FT_OPENTYPE_VALIDATE_H <ftotval.h>
/*************************************************************************
@@ -628,7 +667,7 @@
* mort, morx, bsln, just, kern, opbd, trak, prop).
*
*/
-#define FT_GX_VALIDATE_H <freetype/ftgxval.h>
+#define FT_GX_VALIDATE_H <ftgxval.h>
/*************************************************************************
@@ -641,7 +680,7 @@
* FreeType~2 API which accesses PFR-specific data.
*
*/
-#define FT_PFR_H <freetype/ftpfr.h>
+#define FT_PFR_H <ftpfr.h>
/*************************************************************************
@@ -653,7 +692,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which provides functions to stroke outline paths.
*/
-#define FT_STROKER_H <freetype/ftstroke.h>
+#define FT_STROKER_H <ftstroke.h>
/*************************************************************************
@@ -665,7 +704,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which performs artificial obliquing and emboldening.
*/
-#define FT_SYNTHESIS_H <freetype/ftsynth.h>
+#define FT_SYNTHESIS_H <ftsynth.h>
/*************************************************************************
@@ -678,7 +717,7 @@
* FreeType~2 API which provides functions specific to the XFree86 and
* X.Org X11 servers.
*/
-#define FT_XFREE86_H <freetype/ftxf86.h>
+#define FT_XFREE86_H <ftxf86.h>
/*************************************************************************
@@ -691,7 +730,7 @@
* FreeType~2 API which performs trigonometric computations (e.g.,
* cosines and arc tangents).
*/
-#define FT_TRIGONOMETRY_H <freetype/fttrigon.h>
+#define FT_TRIGONOMETRY_H <fttrigon.h>
/*************************************************************************
@@ -703,7 +742,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which performs color filtering for subpixel rendering.
*/
-#define FT_LCD_FILTER_H <freetype/ftlcdfil.h>
+#define FT_LCD_FILTER_H <ftlcdfil.h>
/*************************************************************************
@@ -715,7 +754,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which performs color filtering for subpixel rendering.
*/
-#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h>
+#define FT_UNPATENTED_HINTING_H <ttunpat.h>
/*************************************************************************
@@ -727,7 +766,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which performs color filtering for subpixel rendering.
*/
-#define FT_INCREMENTAL_H <freetype/ftincrem.h>
+#define FT_INCREMENTAL_H <ftincrem.h>
/*************************************************************************
@@ -739,7 +778,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which returns entries from the TrueType GASP table.
*/
-#define FT_GASP_H <freetype/ftgasp.h>
+#define FT_GASP_H <ftgasp.h>
/*************************************************************************
@@ -751,38 +790,38 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which returns individual and ranged glyph advances.
*/
-#define FT_ADVANCES_H <freetype/ftadvanc.h>
+#define FT_ADVANCES_H <ftadvanc.h>
/* */
-#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
+#define FT_ERROR_DEFINITIONS_H <fterrdef.h>
/* The internals of the cache sub-system are no longer exposed. We */
/* default to FT_CACHE_H at the moment just in case, but we know of */
/* no rogue client that uses them. */
/* */
-#define FT_CACHE_MANAGER_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h>
+#define FT_CACHE_MANAGER_H <ftcache.h>
+#define FT_CACHE_INTERNAL_MRU_H <ftcache.h>
+#define FT_CACHE_INTERNAL_MANAGER_H <ftcache.h>
+#define FT_CACHE_INTERNAL_CACHE_H <ftcache.h>
+#define FT_CACHE_INTERNAL_GLYPH_H <ftcache.h>
+#define FT_CACHE_INTERNAL_IMAGE_H <ftcache.h>
+#define FT_CACHE_INTERNAL_SBITS_H <ftcache.h>
-#define FT_INCREMENTAL_H <freetype/ftincrem.h>
+#define FT_INCREMENTAL_H <ftincrem.h>
-#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
+#define FT_TRUETYPE_UNPATENTED_H <ttunpat.h>
/*
- * Include internal headers definitions from <freetype/internal/...>
+ * Include internal headers definitions from <internal/...>
* only when building the library.
*/
#ifdef FT2_BUILD_LIBRARY
-#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
+#define FT_INTERNAL_INTERNAL_H <internal/internal.h>
#include FT_INTERNAL_INTERNAL_H
#endif /* FT2_BUILD_LIBRARY */
diff --git a/include/freetype/config/ftmodule.h b/include/config/ftmodule.h
index 76d271a..76d271a 100644
--- a/include/freetype/config/ftmodule.h
+++ b/include/config/ftmodule.h
diff --git a/include/freetype/config/ftoption.h b/include/config/ftoption.h
index 041e24a..2b0b67e 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/config/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2011 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -38,9 +38,9 @@ FT_BEGIN_HEADER
/* library from a single source directory. */
/* */
/* - You can put a copy of this file in your build directory, more */
- /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */
- /* is the name of a directory that is included _before_ the FreeType */
- /* include path during compilation. */
+ /* precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the */
+ /* name of a directory that is included _before_ the FreeType include */
+ /* path during compilation. */
/* */
/* The default FreeType Makefiles and Jamfiles use the build */
/* directory `builds/<system>' by default, but you can easily change */
@@ -51,7 +51,7 @@ FT_BEGIN_HEADER
/* locate this file during the build. For example, */
/* */
/* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */
- /* #include <freetype/config/ftheader.h> */
+ /* #include <config/ftheader.h> */
/* */
/* will use `$BUILD/myftoptions.h' instead of this file for macro */
/* definitions. */
@@ -59,9 +59,9 @@ FT_BEGIN_HEADER
/* Note also that you can similarly pre-define the macro */
/* FT_CONFIG_MODULES_H used to locate the file listing of the modules */
/* that are statically linked to the library at compile time. By */
- /* default, this file is <freetype/config/ftmodule.h>. */
+ /* default, this file is <config/ftmodule.h>. */
/* */
- /* We highly recommend using the third method whenever possible. */
+ /* We highly recommend using the third method whenever possible. */
/* */
/*************************************************************************/
@@ -216,6 +216,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* PNG bitmap support. */
+ /* */
+ /* FreeType now handles loading color bitmap glyphs in the PNG format. */
+ /* This requires help from the external libpng library. Uncompressed */
+ /* color bitmaps do not need any external libraries and will be */
+ /* supported regardless of this configuration. */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+/* #define FT_CONFIG_OPTION_USE_PNG */
+
+
+ /*************************************************************************/
+ /* */
+ /* HarfBuzz support. */
+ /* */
+ /* FreeType uses the HarfBuzz library to improve auto-hinting of */
+ /* OpenType fonts. If available, many glyphs not directly addressable */
+ /* by a font's character map will be hinted also. */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
+
+
+ /*************************************************************************/
+ /* */
/* DLL export compilation */
/* */
/* When compiling FreeType as a DLL, some systems/compilers need a */
@@ -514,7 +541,7 @@ FT_BEGIN_HEADER
/* does not contain any glyph name though. */
/* */
/* Accessing SFNT names is done through the functions declared in */
- /* `freetype/ftsnames.h'. */
+ /* `ftsnames.h'. */
/* */
#define TT_CONFIG_OPTION_SFNT_NAMES
@@ -560,6 +587,28 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */
+ /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */
+ /* replaces the native TrueType hinting mechanism when anything but */
+ /* FT_RENDER_MODE_MONO is requested. */
+ /* */
+ /* Enabling this causes the TrueType driver to ignore instructions under */
+ /* certain conditions. This is done in accordance with the guide here, */
+ /* with some minor differences: */
+ /* */
+ /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
+ /* */
+ /* By undefining this, you only compile the code necessary to hint */
+ /* TrueType glyphs with native TT hinting. */
+ /* */
+ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
+ /* defined. */
+ /* */
+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+
+ /*************************************************************************/
+ /* */
/* 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. The patents related to */
@@ -669,7 +718,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */
+ /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */
/* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */
/* required. */
/* */
@@ -716,6 +765,49 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/**** ****/
+ /**** C F F D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */
+ /* possible to set up the default values of the four control points that */
+ /* define the stem darkening behaviour of the (new) CFF engine. For */
+ /* more details please read the documentation of the */
+ /* `darkening-parameters' property of the cff driver module (file */
+ /* `ftcffdrv.h'), which allows the control at run-time. */
+ /* */
+ /* Do *not* undefine these macros! */
+ /* */
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0
+
+
+ /*************************************************************************/
+ /* */
+ /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */
+ /* engine gets compiled into FreeType. If defined, it is possible to */
+ /* switch between the two engines using the `hinting-engine' property of */
+ /* the cff driver module. */
+ /* */
+/* #define CFF_CONFIG_OPTION_OLD_ENGINE */
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
/**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/
/**** ****/
/*************************************************************************/
@@ -752,37 +844,10 @@ FT_BEGIN_HEADER
/*
- * Define this variable if you want to keep the layout of internal
- * structures that was used prior to FreeType 2.2. This also compiles in
- * a few obsolete functions to avoid linking problems on typical Unix
- * distributions.
- *
- * For embedded systems or building a new distribution from scratch, it
- * 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
-
-
- /*
- * 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.
+ * This macro is obsolete. Support has been removed in FreeType
+ * version 2.5.
*/
-
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-#define FT_MAX_CHARMAP_CACHEABLE 15
-#endif
+/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
/*
@@ -796,6 +861,35 @@ FT_BEGIN_HEADER
#define TT_USE_BYTECODE_INTERPRETER
#endif
+
+ /*
+ * Check CFF darkening parameters. The checks are the same as in function
+ * `cff_property_set' in file `cffdrivr.c'.
+ */
+#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \
+ \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \
+ \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \
+ \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500
+#error "Invalid CFF darkening parameters!"
+#endif
+
FT_END_HEADER
diff --git a/include/freetype/config/ftstdlib.h b/include/config/ftstdlib.h
index 11d5d0e..b940efc 100644
--- a/include/freetype/config/ftstdlib.h
+++ b/include/config/ftstdlib.h
@@ -5,7 +5,7 @@
/* ANSI-specific library and header configuration file (specification */
/* only). */
/* */
-/* Copyright 2002-2007, 2009, 2011 by */
+/* Copyright 2002-2007, 2009, 2011-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -159,7 +159,7 @@
/* on certain platforms */
#define ft_longjmp longjmp
-#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) ) /* same thing here */
+#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
/* the following is only used for debugging purposes, i.e., if */
diff --git a/include/freetype/freetype.h b/include/freetype.h
index 63c291a..27fd44b 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype.h
@@ -4,7 +4,7 @@
/* */
/* FreeType high-level API and common types (specification only). */
/* */
-/* Copyright 1996-2012 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,6 +16,10 @@
/***************************************************************************/
+#ifndef __FREETYPE_H__
+#define __FREETYPE_H__
+
+
#ifndef FT_FREETYPE_H
#error "`ft2build.h' hasn't been included yet!"
#error "Please always use macros to include FreeType header files."
@@ -25,14 +29,10 @@
#endif
-#ifndef __FREETYPE_H__
-#define __FREETYPE_H__
-
-
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
-#include FT_ERRORS_H
#include FT_TYPES_H
+#include FT_ERRORS_H
FT_BEGIN_HEADER
@@ -42,6 +42,38 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Section> */
+ /* header_inclusion */
+ /* */
+ /* <Title> */
+ /* FreeType's header inclusion scheme */
+ /* */
+ /* <Abstract> */
+ /* How client applications should include FreeType header files. */
+ /* */
+ /* <Description> */
+ /* To be as flexible as possible (and for historical reasons), */
+ /* FreeType uses a very special inclusion scheme to load header */
+ /* files, for example */
+ /* */
+ /* { */
+ /* #include <ft2build.h> */
+ /* */
+ /* #include FT_FREETYPE_H */
+ /* #include FT_OUTLINE_H */
+ /* } */
+ /* */
+ /* A compiler and its preprocessor only needs an include path to find */
+ /* the file `ft2build.h'; the exact locations and names of the other */
+ /* FreeType header files are hidden by preprocessor macro names, */
+ /* loaded by `ft2build.h'. The API documentation always gives the */
+ /* header macro name needed for a particular function. */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Section> */
/* user_allocation */
/* */
/* <Title> */
@@ -81,7 +113,8 @@ FT_BEGIN_HEADER
/* The FreeType~2 base font interface. */
/* */
/* <Description> */
- /* This section describes the public high-level API of FreeType~2. */
+ /* This section describes the most important public high-level API */
+ /* functions of FreeType~2. */
/* */
/* <Order> */
/* FT_Library */
@@ -90,6 +123,7 @@ FT_BEGIN_HEADER
/* FT_GlyphSlot */
/* FT_CharMap */
/* FT_Encoding */
+ /* FT_ENC_TAG */
/* */
/* FT_FaceRec */
/* */
@@ -98,13 +132,30 @@ FT_BEGIN_HEADER
/* FT_FACE_FLAG_FIXED_WIDTH */
/* FT_FACE_FLAG_HORIZONTAL */
/* FT_FACE_FLAG_VERTICAL */
+ /* FT_FACE_FLAG_COLOR */
/* FT_FACE_FLAG_SFNT */
+ /* FT_FACE_FLAG_CID_KEYED */
+ /* FT_FACE_FLAG_TRICKY */
/* FT_FACE_FLAG_KERNING */
/* FT_FACE_FLAG_MULTIPLE_MASTERS */
/* FT_FACE_FLAG_GLYPH_NAMES */
/* FT_FACE_FLAG_EXTERNAL_STREAM */
- /* FT_FACE_FLAG_FAST_GLYPHS */
/* FT_FACE_FLAG_HINTER */
+ /* FT_FACE_FLAG_TRICKY */
+ /* */
+ /* FT_HAS_HORIZONTAL */
+ /* FT_HAS_VERTICAL */
+ /* FT_HAS_KERNING */
+ /* FT_HAS_FIXED_SIZES */
+ /* FT_HAS_GLYPH_NAMES */
+ /* FT_HAS_MULTIPLE_MASTERS */
+ /* FT_HAS_COLOR */
+ /* */
+ /* FT_IS_SFNT */
+ /* FT_IS_SCALABLE */
+ /* FT_IS_FIXED_WIDTH */
+ /* FT_IS_CID_KEYED */
+ /* FT_IS_TRICKY */
/* */
/* FT_STYLE_FLAG_BOLD */
/* FT_STYLE_FLAG_ITALIC */
@@ -123,6 +174,7 @@ FT_BEGIN_HEADER
/* */
/* FT_New_Face */
/* FT_Done_Face */
+ /* FT_Reference_Face */
/* FT_New_Memory_Face */
/* FT_Open_Face */
/* FT_Open_Args */
@@ -135,10 +187,13 @@ FT_BEGIN_HEADER
/* FT_Request_Size */
/* FT_Select_Size */
/* FT_Size_Request_Type */
+ /* FT_Size_RequestRec */
/* FT_Size_Request */
/* FT_Set_Transform */
/* FT_Load_Glyph */
/* FT_Get_Char_Index */
+ /* FT_Get_First_Char */
+ /* FT_Get_Next_Char */
/* FT_Get_Name_Index */
/* FT_Load_Char */
/* */
@@ -155,11 +210,11 @@ FT_BEGIN_HEADER
/* FT_LOAD_NO_SCALE */
/* FT_LOAD_NO_HINTING */
/* FT_LOAD_NO_BITMAP */
- /* FT_LOAD_CROP_BITMAP */
+ /* FT_LOAD_NO_AUTOHINT */
+ /* FT_LOAD_COLOR */
/* */
/* FT_LOAD_VERTICAL_LAYOUT */
/* FT_LOAD_IGNORE_TRANSFORM */
- /* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */
/* FT_LOAD_FORCE_AUTOHINT */
/* FT_LOAD_NO_RECURSE */
/* FT_LOAD_PEDANTIC */
@@ -170,6 +225,8 @@ FT_BEGIN_HEADER
/* FT_LOAD_TARGET_LCD */
/* FT_LOAD_TARGET_LCD_V */
/* */
+ /* FT_LOAD_TARGET_MODE */
+ /* */
/* FT_Render_Glyph */
/* FT_Render_Mode */
/* FT_Get_Kerning */
@@ -183,14 +240,22 @@ FT_BEGIN_HEADER
/* FT_Set_Charmap */
/* FT_Get_Charmap_Index */
/* */
- /* 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 */
- /* */
/* FT_Get_FSType_Flags */
+ /* FT_Get_SubGlyph_Info */
+ /* */
+ /* FT_Face_Internal */
+ /* FT_Size_Internal */
+ /* FT_Slot_Internal */
+ /* */
+ /* FT_FACE_FLAG_XXX */
+ /* FT_STYLE_FLAG_XXX */
+ /* FT_OPEN_XXX */
+ /* FT_LOAD_XXX */
+ /* FT_LOAD_TARGET_XXX */
+ /* FT_SUBGLYPH_FLAG_XXX */
+ /* FT_FSTYPE_XXX */
+ /* */
+ /* FT_HAS_FAST_GLYPHS */
/* */
/*************************************************************************/
@@ -237,6 +302,10 @@ FT_BEGIN_HEADER
/* If not disabled with @FT_LOAD_NO_HINTING, the values represent */
/* dimensions of the hinted glyph (in case hinting is applicable). */
/* */
+ /* Stroking a glyph with an outside border does not increase */
+ /* `horiAdvance' or `vertAdvance'; you have to manually adjust these */
+ /* values to account for the added width and height. */
+ /* */
typedef struct FT_Glyph_Metrics_
{
FT_Pos width;
@@ -325,18 +394,27 @@ FT_BEGIN_HEADER
/* It also embeds a memory manager (see @FT_Memory), as well as a */
/* scan-line converter object (see @FT_Raster). */
/* */
- /* For multi-threading applications each thread should have its own */
- /* FT_Library object. */
+ /* In multi-threaded applications, make sure that the same FT_Library */
+ /* object or any of its children doesn't get accessed in parallel. */
/* */
/* <Note> */
/* Library objects are normally created by @FT_Init_FreeType, and */
- /* destroyed with @FT_Done_FreeType. */
+ /* destroyed with @FT_Done_FreeType. If you need reference-counting */
+ /* (cf. @FT_Reference_Library), use @FT_New_Library and */
+ /* @FT_Done_Library. */
/* */
typedef struct FT_LibraryRec_ *FT_Library;
/*************************************************************************/
/* */
+ /* <Section> */
+ /* module_management */
+ /* */
+ /*************************************************************************/
+
+ /*************************************************************************/
+ /* */
/* <Type> */
/* FT_Module */
/* */
@@ -376,6 +454,13 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* <Section> */
+ /* base_interface */
+ /* */
+ /*************************************************************************/
+
+ /*************************************************************************/
+ /* */
/* <Type> */
/* FT_Face */
/* */
@@ -411,7 +496,8 @@ FT_BEGIN_HEADER
/* <Note> */
/* Each @FT_Face has an _active_ @FT_Size object that is used by */
/* functions like @FT_Load_Glyph to determine the scaling */
- /* transformation which is used to load and hint glyphs and metrics. */
+ /* transformation that in turn is used to load and hint glyphs and */
+ /* metrics. */
/* */
/* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */
/* @FT_Request_Size or even @FT_Select_Size to change the content */
@@ -546,11 +632,12 @@ FT_BEGIN_HEADER
/* FT_ENCODING_MS_SYMBOL :: */
/* Corresponds to the Microsoft Symbol encoding, used to encode */
/* mathematical symbols in the 32..255 character code range. For */
- /* more information, see `http://www.ceviz.net/symbol.htm'. */
+ /* more information, see */
+ /* `http://www.kostis.net/charsets/symbol.htm'. */
/* */
/* FT_ENCODING_SJIS :: */
/* Corresponds to Japanese SJIS encoding. More info at */
- /* at `http://langsupport.japanreference.com/encoding.shtml'. */
+ /* at `http://en.wikipedia.org/wiki/Shift_JIS'. */
/* See note on multi-byte encodings below. */
/* */
/* FT_ENCODING_GB2312 :: */
@@ -564,7 +651,7 @@ FT_BEGIN_HEADER
/* FT_ENCODING_WANSUNG :: */
/* Corresponds to the Korean encoding system known as Wansung. */
/* For more information see */
- /* `http://www.microsoft.com/typography/unicode/949.txt'. */
+ /* `http://msdn.microsoft.com/en-US/goglobal/cc305154'. */
/* */
/* FT_ENCODING_JOHAB :: */
/* The Korean standard character set (KS~C 5601-1992), which */
@@ -639,10 +726,10 @@ FT_BEGIN_HEADER
/* FT_ENCODING_APPLE_ROMAN). */
/* */
/* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */
- /* @FT_Get_CMap_Language_ID to query the Mac language ID which may */
+ /* @FT_Get_CMap_Language_ID to query the Mac language ID that may */
/* be needed to be able to distinguish Apple encoding variants. See */
/* */
- /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT */
+ /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */
/* */
/* to get an idea how to do that. Basically, if the language ID */
/* is~0, don't use it, otherwise subtract 1 from the language ID. */
@@ -684,15 +771,8 @@ FT_BEGIN_HEADER
} FT_Encoding;
- /*************************************************************************/
- /* */
- /* <Enum> */
- /* ft_encoding_xxx */
- /* */
- /* <Description> */
- /* These constants are deprecated; use the corresponding @FT_Encoding */
- /* values instead. */
- /* */
+ /* these constants are deprecated; use the corresponding `FT_Encoding' */
+ /* values instead */
#define ft_encoding_none FT_ENCODING_NONE
#define ft_encoding_unicode FT_ENCODING_UNICODE
#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL
@@ -802,7 +882,7 @@ FT_BEGIN_HEADER
/* highest CID used in the font. */
/* */
/* family_name :: The face's family name. This is an ASCII */
- /* string, usually in English, which describes */
+ /* string, usually in English, that describes */
/* the typeface's family (like `Times New */
/* Roman', `Bodoni', `Garamond', etc). This */
/* is a least common denominator used to list */
@@ -814,7 +894,7 @@ FT_BEGIN_HEADER
/* PDF file). */
/* */
/* style_name :: The face's style name. This is an ASCII */
- /* string, usually in English, which describes */
+ /* string, usually in English, that describes */
/* the typeface's style (like `Italic', */
/* `Bold', `Condensed', etc). Not all font */
/* formats provide a style name, so this field */
@@ -844,8 +924,8 @@ FT_BEGIN_HEADER
/* expressed in font units (see */
/* `units_per_EM'). The box is large enough */
/* to contain any glyph from the font. Thus, */
- /* `bbox.yMax' can be seen as the `maximal */
- /* ascender', and `bbox.yMin' as the `minimal */
+ /* `bbox.yMax' can be seen as the `maximum */
+ /* ascender', and `bbox.yMin' as the `minimum */
/* descender'. Only relevant for scalable */
/* formats. */
/* */
@@ -871,19 +951,22 @@ FT_BEGIN_HEADER
/* usually negative. Only relevant for */
/* scalable formats. */
/* */
- /* height :: The height is the vertical distance */
+ /* height :: This value is the vertical distance */
/* between two consecutive baselines, */
/* expressed in font units. It is always */
/* positive. Only relevant for scalable */
/* formats. */
/* */
- /* max_advance_width :: The maximal advance width, in font units, */
+ /* If you want the global glyph height, use */
+ /* `ascender - descender'. */
+ /* */
+ /* max_advance_width :: The maximum advance width, in font units, */
/* for all glyphs in this face. This can be */
/* used to make word wrapping computations */
/* faster. Only relevant for scalable */
/* formats. */
/* */
- /* max_advance_height :: The maximal advance height, in font units, */
+ /* max_advance_height :: The maximum advance height, in font units, */
/* for all glyphs in this face. This is only */
/* relevant for vertical layouts, and is set */
/* to `height' for fonts that do not provide */
@@ -1045,7 +1128,7 @@ FT_BEGIN_HEADER
/* exist make FT_Load_Glyph return successfully; in all other cases */
/* you get an `FT_Err_Invalid_Argument' error. */
/* */
- /* Note that CID-keyed fonts which are in an SFNT wrapper don't */
+ /* Note that CID-keyed fonts that are in an SFNT wrapper don't */
/* have this flag set since the glyphs are accessed in the normal */
/* way (using contiguous indices); the `CID-ness' isn't visible to */
/* the application. */
@@ -1053,7 +1136,7 @@ FT_BEGIN_HEADER
/* FT_FACE_FLAG_TRICKY :: */
/* Set if the font is `tricky', this is, it always needs the */
/* font format's native hinting engine to get a reasonable result. */
- /* A typical example is the Chinese font `mingli.ttf' which uses */
+ /* A typical example is the Chinese font `mingli.ttf' that uses */
/* TrueType bytecode instructions to move and scale all of its */
/* subglyphs. */
/* */
@@ -1066,6 +1149,10 @@ FT_BEGIN_HEADER
/* Currently, there are about a dozen TrueType fonts in the list of */
/* tricky fonts; they are hard-coded in file `ttobjs.c'. */
/* */
+ /* FT_FACE_FLAG_COLOR :: */
+ /* Set if the font has color glyph tables. To access color glyphs */
+ /* use @FT_LOAD_COLOR. */
+ /* */
#define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 )
@@ -1080,6 +1167,7 @@ FT_BEGIN_HEADER
#define FT_FACE_FLAG_HINTER ( 1L << 11 )
#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 )
#define FT_FACE_FLAG_TRICKY ( 1L << 13 )
+#define FT_FACE_FLAG_COLOR ( 1L << 14 )
/*************************************************************************
@@ -1105,8 +1193,8 @@ FT_BEGIN_HEADER
* FT_HAS_VERTICAL( face )
*
* @description:
- * A macro that returns true whenever a face object contains vertical
- * metrics.
+ * A macro that returns true whenever a face object contains real
+ * vertical metrics (and not only synthesized ones).
*
*/
#define FT_HAS_VERTICAL( face ) \
@@ -1264,6 +1352,20 @@ FT_BEGIN_HEADER
( face->face_flags & FT_FACE_FLAG_TRICKY )
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_COLOR( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains
+ * tables for color glyphs.
+ *
+ */
+#define FT_HAS_COLOR( face ) \
+ ( face->face_flags & FT_FACE_FLAG_COLOR )
+
+
/*************************************************************************/
/* */
/* <Const> */
@@ -1338,7 +1440,7 @@ FT_BEGIN_HEADER
/* height :: The height in 26.6 fractional pixels. See */
/* @FT_FaceRec for the details. */
/* */
- /* max_advance :: The maximal advance width in 26.6 fractional */
+ /* max_advance :: The maximum advance width in 26.6 fractional */
/* pixels. See @FT_FaceRec for the details. */
/* */
/* <Note> */
@@ -1385,9 +1487,9 @@ FT_BEGIN_HEADER
/* <Fields> */
/* face :: Handle to the parent face object. */
/* */
- /* generic :: A typeless pointer, which is unused by the FreeType */
- /* library or any of its drivers. It can be used by */
- /* client applications to link their own data to each size */
+ /* generic :: A typeless pointer, unused by the FreeType library or */
+ /* any of its drivers. It can be used by client */
+ /* applications to link their own data to each size */
/* object. */
/* */
/* metrics :: Metrics for this size object. This field is read-only. */
@@ -1455,10 +1557,10 @@ FT_BEGIN_HEADER
/* listed through a direct, single-linked list */
/* using its `next' field. */
/* */
- /* generic :: A typeless pointer which is unused by the */
- /* FreeType library or any of its drivers. It */
- /* can be used by client applications to link */
- /* their own data to each glyph slot object. */
+ /* generic :: A typeless pointer unused by the FreeType */
+ /* library or any of its drivers. It can be */
+ /* used by client applications to link their own */
+ /* data to each glyph slot object. */
/* */
/* metrics :: The metrics of the last loaded glyph in the */
/* slot. The returned values depend on the last */
@@ -1485,8 +1587,8 @@ FT_BEGIN_HEADER
/* */
/* advance :: This shorthand is, depending on */
/* @FT_LOAD_IGNORE_TRANSFORM, the transformed */
- /* advance width for the glyph (in 26.6 */
- /* fractional pixel format). As specified with */
+ /* (hinted) advance width for the glyph, in 26.6 */
+ /* fractional pixel format. As specified with */
/* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */
/* `horiAdvance' or the `vertAdvance' value of */
/* `metrics' field. */
@@ -1505,15 +1607,15 @@ FT_BEGIN_HEADER
/* change between calls of @FT_Load_Glyph and a */
/* few other functions. */
/* */
- /* bitmap_left :: This is the bitmap's left bearing expressed */
- /* in integer pixels. Of course, this is only */
- /* valid if the format is */
- /* @FT_GLYPH_FORMAT_BITMAP. */
+ /* bitmap_left :: The bitmap's left bearing expressed in */
+ /* integer pixels. Only valid if the format is */
+ /* @FT_GLYPH_FORMAT_BITMAP, this is, if the */
+ /* glyph slot contains a bitmap. */
/* */
- /* bitmap_top :: This is the bitmap's top bearing expressed in */
- /* integer pixels. Remember that this is the */
- /* distance from the baseline to the top-most */
- /* glyph scanline, upwards y~coordinates being */
+ /* bitmap_top :: The bitmap's top bearing expressed in integer */
+ /* pixels. Remember that this is the distance */
+ /* from the baseline to the top-most glyph */
+ /* scanline, upwards y~coordinates being */
/* *positive*. */
/* */
/* outline :: The outline descriptor for the current glyph */
@@ -1527,7 +1629,6 @@ FT_BEGIN_HEADER
/* This field is only valid for the composite */
/* glyph format that should normally only be */
/* loaded with the @FT_LOAD_NO_RECURSE flag. */
- /* For now this is internal to FreeType. */
/* */
/* subglyphs :: An array of subglyph descriptors for */
/* composite glyphs. There are `num_subglyphs' */
@@ -1575,7 +1676,7 @@ FT_BEGIN_HEADER
/* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */
/* */
/* <Note> */
- /* Here a small pseudo code fragment which shows how to use */
+ /* Here a small pseudo code fragment that shows how to use */
/* `lsb_delta' and `rsb_delta': */
/* */
/* { */
@@ -1671,6 +1772,9 @@ FT_BEGIN_HEADER
/* For multi-threading applications each thread should have its own */
/* FT_Library object. */
/* */
+ /* If you need reference-counting (cf. @FT_Reference_Library), use */
+ /* @FT_New_Library and @FT_Done_Library. */
+ /* */
FT_EXPORT( FT_Error )
FT_Init_FreeType( FT_Library *alibrary );
@@ -1715,16 +1819,6 @@ FT_BEGIN_HEADER
/* */
/* FT_OPEN_PARAMS :: Use the `num_params' and `params' fields. */
/* */
- /* ft_open_memory :: Deprecated; use @FT_OPEN_MEMORY instead. */
- /* */
- /* ft_open_stream :: Deprecated; use @FT_OPEN_STREAM instead. */
- /* */
- /* ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead. */
- /* */
- /* ft_open_driver :: Deprecated; use @FT_OPEN_DRIVER instead. */
- /* */
- /* ft_open_params :: Deprecated; use @FT_OPEN_PARAMS instead. */
- /* */
/* <Note> */
/* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */
/* flags are mutually exclusive. */
@@ -1735,11 +1829,14 @@ FT_BEGIN_HEADER
#define FT_OPEN_DRIVER 0x8
#define FT_OPEN_PARAMS 0x10
-#define ft_open_memory FT_OPEN_MEMORY /* deprecated */
-#define ft_open_stream FT_OPEN_STREAM /* deprecated */
-#define ft_open_pathname FT_OPEN_PATHNAME /* deprecated */
-#define ft_open_driver FT_OPEN_DRIVER /* deprecated */
-#define ft_open_params FT_OPEN_PARAMS /* deprecated */
+
+ /* these constants are deprecated; use the corresponding `FT_OPEN_XXX' */
+ /* values instead */
+#define ft_open_memory FT_OPEN_MEMORY
+#define ft_open_stream FT_OPEN_STREAM
+#define ft_open_pathname FT_OPEN_PATHNAME
+#define ft_open_driver FT_OPEN_DRIVER
+#define ft_open_params FT_OPEN_PARAMS
/*************************************************************************/
@@ -1801,25 +1898,25 @@ FT_BEGIN_HEADER
/* opening a new face. */
/* */
/* <Note> */
- /* The stream type is determined by the contents of `flags' which */
+ /* The stream type is determined by the contents of `flags' that */
/* are tested in the following order by @FT_Open_Face: */
/* */
- /* If the `FT_OPEN_MEMORY' bit is set, assume that this is a */
+ /* If the @FT_OPEN_MEMORY bit is set, assume that this is a */
/* memory file of `memory_size' bytes, located at `memory_address'. */
/* The data are are not copied, and the client is responsible for */
/* releasing and destroying them _after_ the corresponding call to */
/* @FT_Done_Face. */
/* */
- /* Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a */
+ /* Otherwise, if the @FT_OPEN_STREAM bit is set, assume that a */
/* custom input stream `stream' is used. */
/* */
- /* Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this */
+ /* Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this */
/* is a normal file and use `pathname' to open it. */
/* */
- /* If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face only tries to */
+ /* If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to */
/* open the file with the driver whose handler is in `driver'. */
/* */
- /* If the `FT_OPEN_PARAMS' bit is set, the parameters given by */
+ /* If the @FT_OPEN_PARAMS bit is set, the parameters given by */
/* `num_params' and `params' is used. They are ignored otherwise. */
/* */
/* Ideally, both the `pathname' and `params' fields should be tagged */
@@ -1865,6 +1962,10 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* Use @FT_Done_Face to destroy the created @FT_Face object (along */
+ /* with its slot and sizes). */
+ /* */
FT_EXPORT( FT_Error )
FT_New_Face( FT_Library library,
const char* filepathname,
@@ -1878,7 +1979,7 @@ FT_BEGIN_HEADER
/* FT_New_Memory_Face */
/* */
/* <Description> */
- /* This function calls @FT_Open_Face to open a font which has been */
+ /* This function calls @FT_Open_Face to open a font that has been */
/* loaded into memory. */
/* */
/* <InOut> */
@@ -1924,7 +2025,7 @@ FT_BEGIN_HEADER
/* library :: A handle to the library resource. */
/* */
/* <Input> */
- /* args :: A pointer to an `FT_Open_Args' structure which must */
+ /* args :: A pointer to an `FT_Open_Args' structure that must */
/* be filled by the caller. */
/* */
/* face_index :: The index of the face within the font. The first */
@@ -1940,7 +2041,7 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* Unlike FreeType 1.x, this function automatically creates a glyph */
- /* slot for the face object which can be accessed directly through */
+ /* slot for the face object that can be accessed directly through */
/* `face->glyph'. */
/* */
/* FT_Open_Face can be used to quickly check whether the font */
@@ -1949,7 +2050,7 @@ FT_BEGIN_HEADER
/* if the font format is recognized, or non-zero otherwise; */
/* the function returns a more or less empty face handle in `*aface' */
/* (if `aface' isn't NULL). The only useful field in this special */
- /* case is `face->num_faces' which gives the number of faces within */
+ /* case is `face->num_faces' that gives the number of faces within */
/* the font file. After examination, the returned @FT_Face structure */
/* should be deallocated with a call to @FT_Done_Face. */
/* */
@@ -2007,7 +2108,7 @@ FT_BEGIN_HEADER
/* face :: The target face object. */
/* */
/* <Input> */
- /* parameters :: A pointer to @FT_Open_Args which must be filled by */
+ /* parameters :: A pointer to @FT_Open_Args that must be filled by */
/* the caller. */
/* */
/* <Return> */
@@ -2038,7 +2139,7 @@ FT_BEGIN_HEADER
/* then only destroys a face if the counter is~1, otherwise it simply */
/* decrements the counter. */
/* */
- /* This function helps in managing life-cycles of structures which */
+ /* This function helps in managing life-cycles of structures that */
/* reference @FT_Face objects. */
/* */
/* <Input> */
@@ -2227,6 +2328,14 @@ FT_BEGIN_HEADER
/* particular bitmap strike. Use @FT_Select_Size instead in that */
/* case. */
/* */
+ /* The relation between the requested size and the resulting glyph */
+ /* size is dependent entirely on how the size is defined in the */
+ /* source face. The font designer chooses the final size of each */
+ /* glyph relative to this size. For more information refer to */
+ /* `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' */
+ /* */
+ /* Don't use this function if you are using the FreeType cache API. */
+ /* */
FT_EXPORT( FT_Error )
FT_Request_Size( FT_Face face,
FT_Size_Request req );
@@ -2296,6 +2405,13 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* You should not rely on the resulting glyphs matching, or being */
+ /* constrained, to this pixel size. Refer to @FT_Request_Size to */
+ /* understand how requested sizes relate to actual sizes. */
+ /* */
+ /* Don't use this function if you are using the FreeType cache API. */
+ /* */
FT_EXPORT( FT_Error )
FT_Set_Pixel_Sizes( FT_Face face,
FT_UInt pixel_width,
@@ -2334,7 +2450,7 @@ FT_BEGIN_HEADER
/* the details. */
/* */
/* For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is */
- /* returned for invalid CID values (this is, for CID values which */
+ /* returned for invalid CID values (this is, for CID values that */
/* don't have a corresponding glyph in the font). See the discussion */
/* of the @FT_FACE_FLAG_CID_KEYED flag for more details. */
/* */
@@ -2409,14 +2525,20 @@ FT_BEGIN_HEADER
* behaviour to more specific and useful cases.
*
* FT_LOAD_NO_SCALE ::
- * Don't scale the outline glyph loaded, but keep it in font units.
+ * Don't scale the loaded outline glyph but keep it in font units.
*
* This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and
* unsets @FT_LOAD_RENDER.
*
+ * If the font is `tricky' (see @FT_FACE_FLAG_TRICKY for more), using
+ * FT_LOAD_NO_SCALE usually yields meaningless outlines because the
+ * subglyphs must be scaled and positioned with hinting instructions.
+ * This can be solved by loading the font without FT_LOAD_NO_SCALE and
+ * setting the character size to `font->units_per_EM'.
+ *
* FT_LOAD_NO_HINTING ::
- * Disable hinting. This generally generates `blurrier' bitmap glyph
- * when the glyph is rendered in any of the anti-aliased modes. See
+ * Disable hinting. This generally generates `blurrier' bitmap glyphs
+ * when the glyph are rendered in any of the anti-aliased modes. See
* also the note below.
*
* This flag is implied by @FT_LOAD_NO_SCALE.
@@ -2435,18 +2557,19 @@ FT_BEGIN_HEADER
* @FT_LOAD_NO_SCALE always sets this flag.
*
* FT_LOAD_VERTICAL_LAYOUT ::
- * Load the glyph for vertical text layout. _Don't_ use it as it is
- * problematic currently.
+ * Load the glyph for vertical text layout. In particular, the
+ * `advance' value in the @FT_GlyphSlotRec structure is set to the
+ * `vertAdvance' value of the `metrics' field.
+ *
+ * In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use
+ * this flag currently. Reason is that in this case vertical metrics
+ * get synthesized, and those values are not always consistent across
+ * various font formats.
*
* FT_LOAD_FORCE_AUTOHINT ::
* Indicates that the auto-hinter is preferred over the font's native
* hinter. See also the note below.
*
- * FT_LOAD_CROP_BITMAP ::
- * Indicates that the font driver should crop the loaded bitmap glyph
- * (i.e., remove all space around its black bits). Not all drivers
- * implement this.
- *
* FT_LOAD_PEDANTIC ::
* Indicates that the font driver should perform pedantic verifications
* during glyph loading. This is mostly used to detect broken glyphs
@@ -2457,18 +2580,12 @@ FT_BEGIN_HEADER
* result in partially hinted or distorted glyphs in case a glyph's
* bytecode is buggy.
*
- * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
- * Ignored. Deprecated.
- *
* FT_LOAD_NO_RECURSE ::
- * This flag is only used internally. It merely indicates that the
- * font driver should not load composite glyphs recursively. Instead,
- * it should set the `num_subglyph' and `subglyphs' values of the
- * glyph slot accordingly, and set `glyph->format' to
- * @FT_GLYPH_FORMAT_COMPOSITE.
- *
- * The description of sub-glyphs is not available to client
- * applications for now.
+ * Indicate that the font driver should not load composite glyphs
+ * recursively. Instead, it should set the `num_subglyph' and
+ * `subglyphs' values of the glyph slot accordingly, and set
+ * `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE. The description of
+ * subglyphs can then be accessed with @FT_Get_SubGlyph_Info.
*
* This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.
*
@@ -2493,6 +2610,20 @@ FT_BEGIN_HEADER
* FT_LOAD_NO_AUTOHINT ::
* Disable auto-hinter. See also the note below.
*
+ * FT_LOAD_COLOR ::
+ * This flag is used to request loading of color embedded-bitmap
+ * images. The resulting color bitmaps, if available, will have the
+ * @FT_PIXEL_MODE_BGRA format. When the flag is not used and color
+ * bitmaps are found, they will be converted to 256-level gray
+ * bitmaps transparently. Those bitmaps will be in the
+ * @FT_PIXEL_MODE_GRAY format.
+ *
+ * FT_LOAD_CROP_BITMAP ::
+ * Ignored. Deprecated.
+ *
+ * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
+ * Ignored. Deprecated.
+ *
* @note:
* By default, hinting is enabled and the font's native hinter (see
* @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can
@@ -2507,6 +2638,13 @@ FT_BEGIN_HEADER
* Besides deciding which hinter to use, you can also decide which
* hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details.
*
+ * Note that the auto-hinter needs a valid Unicode cmap (either a native
+ * one or synthesized by FreeType) for producing correct results. If a
+ * font provides an incorrect mapping (for example, assigning the
+ * character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a
+ * mathematical integral sign), the auto-hinter might produce useless
+ * results.
+ *
*/
#define FT_LOAD_DEFAULT 0x0
#define FT_LOAD_NO_SCALE ( 1L << 0 )
@@ -2523,6 +2661,8 @@ FT_BEGIN_HEADER
#define FT_LOAD_MONOCHROME ( 1L << 12 )
#define FT_LOAD_LINEAR_DESIGN ( 1L << 13 )
#define FT_LOAD_NO_AUTOHINT ( 1L << 15 )
+ /* Bits 16..19 are used by `FT_LOAD_TARGET_' */
+#define FT_LOAD_COLOR ( 1L << 20 )
/* */
@@ -2579,8 +2719,9 @@ FT_BEGIN_HEADER
* `load_flags'. They can't be ORed.
*
* If @FT_LOAD_RENDER is also set, the glyph is rendered in the
- * corresponding mode (i.e., the mode which matches the used algorithm
- * best) unless @FT_LOAD_MONOCHROME is set.
+ * corresponding mode (i.e., the mode that matches the used algorithm
+ * best). An exeption is FT_LOAD_TARGET_MONO since it implies
+ * @FT_LOAD_MONOCHROME.
*
* You can use a hinting algorithm that doesn't correspond to the same
* rendering mode. As an example, it is possible to use the `light'
@@ -2719,19 +2860,8 @@ FT_BEGIN_HEADER
} FT_Render_Mode;
- /*************************************************************************/
- /* */
- /* <Enum> */
- /* ft_render_mode_xxx */
- /* */
- /* <Description> */
- /* These constants are deprecated. Use the corresponding */
- /* @FT_Render_Mode values instead. */
- /* */
- /* <Values> */
- /* ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL */
- /* ft_render_mode_mono :: see @FT_RENDER_MODE_MONO */
- /* */
+ /* these constants are deprecated; use the corresponding */
+ /* `FT_Render_Mode' values instead */
#define ft_render_mode_normal FT_RENDER_MODE_NORMAL
#define ft_render_mode_mono FT_RENDER_MODE_MONO
@@ -2758,6 +2888,10 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* To get meaningful results, font scaling values must be set with */
+ /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */
+ /* */
FT_EXPORT( FT_Error )
FT_Render_Glyph( FT_GlyphSlot slot,
FT_Render_Mode render_mode );
@@ -2791,39 +2925,10 @@ FT_BEGIN_HEADER
} FT_Kerning_Mode;
- /*************************************************************************/
- /* */
- /* <Const> */
- /* ft_kerning_default */
- /* */
- /* <Description> */
- /* This constant is deprecated. Please use @FT_KERNING_DEFAULT */
- /* instead. */
- /* */
+ /* these constants are deprecated; use the corresponding */
+ /* `FT_Kerning_Mode' values instead */
#define ft_kerning_default FT_KERNING_DEFAULT
-
-
- /*************************************************************************/
- /* */
- /* <Const> */
- /* ft_kerning_unfitted */
- /* */
- /* <Description> */
- /* This constant is deprecated. Please use @FT_KERNING_UNFITTED */
- /* instead. */
- /* */
#define ft_kerning_unfitted FT_KERNING_UNFITTED
-
-
- /*************************************************************************/
- /* */
- /* <Const> */
- /* ft_kerning_unscaled */
- /* */
- /* <Description> */
- /* This constant is deprecated. Please use @FT_KERNING_UNSCALED */
- /* instead. */
- /* */
#define ft_kerning_unscaled FT_KERNING_UNSCALED
@@ -2922,7 +3027,7 @@ FT_BEGIN_HEADER
/* */
/* glyph_index :: The glyph index. */
/* */
- /* buffer_max :: The maximal number of bytes available in the */
+ /* buffer_max :: The maximum number of bytes available in the */
/* buffer. */
/* */
/* <Output> */
@@ -2944,9 +3049,8 @@ FT_BEGIN_HEADER
/* glyph index~0 always corresponds to the `missing glyph' (called */
/* `.notdef'). */
/* */
- /* This function is not compiled within the library if the config */
- /* macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in */
- /* `include/freetype/config/ftoptions.h'. */
+ /* This function always returns an error if the config macro */
+ /* `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is not defined in `ftoptions.h'. */
/* */
FT_EXPORT( FT_Error )
FT_Get_Glyph_Name( FT_Face face,
@@ -3002,8 +3106,8 @@ FT_BEGIN_HEADER
/* */
/* Because many fonts contain more than a single cmap for Unicode */
/* encoding, this function has some special code to select the one */
- /* which covers Unicode best (`best' in the sense that a UCS-4 cmap */
- /* is preferred to a UCS-2 cmap). It is thus preferable to */
+ /* that covers Unicode best (`best' in the sense that a UCS-4 cmap is */
+ /* preferred to a UCS-2 cmap). It is thus preferable to */
/* @FT_Set_Charmap in this case. */
/* */
FT_EXPORT( FT_Error )
@@ -3081,9 +3185,15 @@ FT_BEGIN_HEADER
/* <Note> */
/* If you use FreeType to manipulate the contents of font files */
/* directly, be aware that the glyph index returned by this function */
- /* doesn't always correspond to the internal indices used within */
- /* the file. This is done to ensure that value~0 always corresponds */
- /* to the `missing glyph'. */
+ /* doesn't always correspond to the internal indices used within the */
+ /* file. This is done to ensure that value~0 always corresponds to */
+ /* the `missing glyph'. If the first glyph is not named `.notdef', */
+ /* then for Type~1 and Type~42 fonts, `.notdef' will be moved into */
+ /* the glyph ID~0 position, and whatever was there will be moved to */
+ /* the position `.notdef' had. For Type~1 fonts, if there is no */
+ /* `.notdef' glyph at all, then one will be created at index~0 and */
+ /* whatever was there will be moved to the last index -- Type~42 */
+ /* fonts are considered invalid under this condition. */
/* */
FT_EXPORT( FT_UInt )
FT_Get_Char_Index( FT_Face face,
@@ -3351,7 +3461,7 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* Use this function rather than directly reading the `fs_type' field */
- /* in the @PS_FontInfoRec structure which is only guaranteed to */
+ /* in the @PS_FontInfoRec structure, which is only guaranteed to */
/* return the correct results for Type~1 fonts. */
/* */
/* <Since> */
@@ -3383,9 +3493,13 @@ FT_BEGIN_HEADER
/* code range for CJK characters. */
/* */
/* An IVS is registered and unique; for further details please refer */
- /* to Unicode Technical Report #37, the Ideographic Variation */
- /* Database. To date (October 2007), the character with the most */
- /* variants is U+908A, having 8~such IVS. */
+ /* to Unicode Technical Standard #37, the Ideographic Variation */
+ /* Database: */
+ /* */
+ /* http://www.unicode.org/reports/tr37/ */
+ /* */
+ /* To date (November 2014), the character with the most variants is */
+ /* U+9089, having 32 such IVS. */
/* */
/* Adobe and MS decided to support IVS with a new cmap subtable */
/* (format~14). It is an odd subtable because it is not a mapping of */
@@ -3527,7 +3641,7 @@ FT_BEGIN_HEADER
/* The character codepoint in Unicode. */
/* */
/* <Return> */
- /* A pointer to an array of variant selector code points which are */
+ /* A pointer to an array of variant selector code points that are */
/* active for the given character, or NULL if the corresponding list */
/* is empty. */
/* */
@@ -3561,7 +3675,7 @@ FT_BEGIN_HEADER
/* The variant selector code point in Unicode. */
/* */
/* <Return> */
- /* A list of all the code points which are specified by this selector */
+ /* A list of all the code points that are specified by this selector */
/* (both default and non-default codes are returned) or NULL if there */
/* is no valid cmap or the variant selector is invalid. */
/* */
@@ -3614,7 +3728,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A very simple function used to perform the computation `(a*b)/c' */
- /* with maximal accuracy (it uses a 64-bit intermediate integer */
+ /* with maximum accuracy (it uses a 64-bit intermediate integer */
/* whenever necessary). */
/* */
/* This function isn't necessarily as fast as some processor specific */
@@ -3636,12 +3750,6 @@ FT_BEGIN_HEADER
FT_Long c );
- /* */
-
- /* The following #if 0 ... #endif is for the documentation formatter, */
- /* hiding the internal `FT_MULFIX_INLINED' macro. */
-
-#if 0
/*************************************************************************/
/* */
/* <Function> */
@@ -3649,8 +3757,8 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A very simple function used to perform the computation */
- /* `(a*b)/0x10000' with maximal accuracy. Most of the time this is */
- /* used to multiply a given value by a 16.16 fixed float factor. */
+ /* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */
+ /* used to multiply a given value by a 16.16 fixed-point factor. */
/* */
/* <Input> */
/* a :: The first multiplier. */
@@ -3675,17 +3783,6 @@ FT_BEGIN_HEADER
FT_MulFix( FT_Long a,
FT_Long b );
- /* */
-#endif
-
-#ifdef FT_MULFIX_INLINED
-#define FT_MulFix( a, b ) FT_MULFIX_INLINED( a, b )
-#else
- FT_EXPORT( FT_Long )
- FT_MulFix( FT_Long a,
- FT_Long b );
-#endif
-
/*************************************************************************/
/* */
@@ -3694,22 +3791,16 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A very simple function used to perform the computation */
- /* `(a*0x10000)/b' with maximal accuracy. Most of the time, this is */
- /* used to divide a given value by a 16.16 fixed float factor. */
+ /* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */
+ /* used to divide a given value by a 16.16 fixed-point factor. */
/* */
/* <Input> */
- /* a :: The first multiplier. */
- /* b :: The second multiplier. Use a 16.16 factor here whenever */
- /* possible (see note below). */
+ /* a :: The numerator. */
+ /* b :: The denominator. Use a 16.16 factor here. */
/* */
/* <Return> */
/* The result of `(a*0x10000)/b'. */
/* */
- /* <Note> */
- /* The optimization for FT_DivFix() is simple: If (a~<<~16) fits in */
- /* 32~bits, then the division is computed directly. Otherwise, we */
- /* use a specialized version of @FT_MulDiv. */
- /* */
FT_EXPORT( FT_Long )
FT_DivFix( FT_Long a,
FT_Long b );
@@ -3809,6 +3900,18 @@ FT_BEGIN_HEADER
/* even a new release of FreeType with only documentation changes */
/* increases the version number. */
/* */
+ /* <Order> */
+ /* FT_Library_Version */
+ /* */
+ /* FREETYPE_MAJOR */
+ /* FREETYPE_MINOR */
+ /* FREETYPE_PATCH */
+ /* */
+ /* FT_Face_CheckTrueTypePatents */
+ /* FT_Face_SetUnpatentedHinting */
+ /* */
+ /* FREETYPE_XXX */
+ /* */
/*************************************************************************/
@@ -3833,8 +3936,8 @@ FT_BEGIN_HEADER
*
*/
#define FREETYPE_MAJOR 2
-#define FREETYPE_MINOR 4
-#define FREETYPE_PATCH 9
+#define FREETYPE_MINOR 5
+#define FREETYPE_PATCH 5
/*************************************************************************/
diff --git a/include/freetype/internal/internal.h b/include/freetype/internal/internal.h
deleted file mode 100644
index f500a65..0000000
--- a/include/freetype/internal/internal.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/***************************************************************************/
-/* */
-/* internal.h */
-/* */
-/* Internal header files (specification only). */
-/* */
-/* Copyright 1996-2001, 2002, 2003, 2004 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
-
-
- /*************************************************************************/
- /* */
- /* This file is automatically included by `ft2build.h'. */
- /* Do not include it manually! */
- /* */
- /*************************************************************************/
-
-
-#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h>
-#define FT_INTERNAL_PIC_H <freetype/internal/ftpic.h>
-#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h>
-#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h>
-#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>
-#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h>
-#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h>
-#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h>
-#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h>
-#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h>
-#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h>
-#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h>
-#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h>
-
-#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
-#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>
-
-#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
-#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
-#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <freetype/internal/psglobal.h>
-
-#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h>
-
-
-/* END */
diff --git a/include/ft2build.h b/include/ft2build.h
index 923d887..6f8eb7f 100644
--- a/include/ft2build.h
+++ b/include/ft2build.h
@@ -3,9 +3,8 @@
/* ft2build.h */
/* */
/* FreeType 2 build and setup macros. */
-/* (Generic version) */
/* */
-/* Copyright 1996-2001, 2006 by */
+/* Copyright 1996-2001, 2006, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,21 +18,25 @@
/*************************************************************************/
/* */
- /* This file corresponds to the default `ft2build.h' file for */
- /* FreeType 2. It uses the `freetype' include root. */
+ /* This is the `entry point' for FreeType header file inclusions. It is */
+ /* the only header file which should be included directly; all other */
+ /* FreeType header files should be accessed with macro names (after */
+ /* including `ft2build.h'). */
/* */
- /* Note that specific platforms might use a different configuration. */
- /* See builds/unix/ft2unix.h for an example. */
+ /* A typical example is */
+ /* */
+ /* #include <ft2build.h> */
+ /* #include FT_FREETYPE_H */
/* */
/*************************************************************************/
-#ifndef __FT2_BUILD_GENERIC_H__
-#define __FT2_BUILD_GENERIC_H__
+#ifndef __FT2BUILD_H__
+#define __FT2BUILD_H__
-#include <freetype/config/ftheader.h>
+#include <config/ftheader.h>
-#endif /* __FT2_BUILD_GENERIC_H__ */
+#endif /* __FT2BUILD_H__ */
/* END */
diff --git a/include/freetype/ftadvanc.h b/include/ftadvanc.h
index b2451be..955f93f 100644
--- a/include/freetype/ftadvanc.h
+++ b/include/ftadvanc.h
@@ -4,7 +4,7 @@
/* */
/* Quick computation of advance widths (specification only). */
/* */
-/* Copyright 2008 by */
+/* Copyright 2008, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -48,6 +48,11 @@ FT_BEGIN_HEADER
* @description:
* This section contains functions to quickly extract advance values
* without handling glyph outlines, if possible.
+ *
+ * @order:
+ * FT_Get_Advance
+ * FT_Get_Advances
+ *
*/
@@ -64,11 +69,11 @@ FT_BEGIN_HEADER
/* corresponding hinting mode or font driver doesn't allow for very */
/* quick advance computation. */
/* */
- /* Typically, glyphs which are either unscaled, unhinted, bitmapped, */
+ /* Typically, glyphs that are either unscaled, unhinted, bitmapped, */
/* or light-hinted can have their advance width computed very */
/* quickly. */
/* */
- /* Normal and bytecode hinted modes, which require loading, scaling, */
+ /* Normal and bytecode hinted modes that require loading, scaling, */
/* and hinting of the glyph outline, are extremely slow by */
/* comparison. */
/* */
@@ -82,8 +87,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Retrieve the advance value of a given glyph outline in an */
- /* @FT_Face. By default, the unhinted advance is returned in font */
- /* units. */
+ /* @FT_Face. */
/* */
/* <Input> */
/* face :: The source @FT_Face handle. */
@@ -94,8 +98,9 @@ FT_BEGIN_HEADER
/* calling @FT_Load_Glyph, used to determine what kind */
/* of advances you need. */
/* <Output> */
- /* padvance :: The advance value, in either font units or 16.16 */
- /* format. */
+ /* padvance :: The advance value. If scaling is performed (based on */
+ /* the value of `load_flags'), the advance value is in */
+ /* 16.16 format. Otherwise, it is in font units. */
/* */
/* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */
/* vertical advance corresponding to a vertical layout. */
@@ -127,8 +132,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Retrieve the advance values of several glyph outlines in an */
- /* @FT_Face. By default, the unhinted advances are returned in font */
- /* units. */
+ /* @FT_Face. */
/* */
/* <Input> */
/* face :: The source @FT_Face handle. */
@@ -141,8 +145,12 @@ FT_BEGIN_HEADER
/* calling @FT_Load_Glyph. */
/* */
/* <Output> */
- /* padvance :: The advances, in either font units or 16.16 format. */
- /* This array must contain at least `count' elements. */
+ /* padvance :: The advance values. This array, to be provided by the */
+ /* caller, must contain at least `count' elements. */
+ /* */
+ /* If scaling is performed (based on the value of */
+ /* `load_flags'), the advance values are in 16.16 format. */
+ /* Otherwise, they are in font units. */
/* */
/* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */
/* vertical advances corresponding to a vertical layout. */
@@ -168,7 +176,7 @@ FT_BEGIN_HEADER
FT_Int32 load_flags,
FT_Fixed *padvances );
-/* */
+ /* */
FT_END_HEADER
diff --git a/include/ftautoh.h b/include/ftautoh.h
new file mode 100644
index 0000000..59191ab
--- /dev/null
+++ b/include/ftautoh.h
@@ -0,0 +1,402 @@
+/***************************************************************************/
+/* */
+/* ftautoh.h */
+/* */
+/* FreeType API for controlling the auto-hinter (specification only). */
+/* */
+/* Copyright 2012, 2013 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __FTAUTOH_H__
+#define __FTAUTOH_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:
+ * auto_hinter
+ *
+ * @title:
+ * The auto-hinter
+ *
+ * @abstract:
+ * Controlling the auto-hinting module.
+ *
+ * @description:
+ * While FreeType's auto-hinter doesn't expose API functions by itself,
+ * it is possible to control its behaviour with @FT_Property_Set and
+ * @FT_Property_Get. The following lists the available properties
+ * together with the necessary macros and structures.
+ *
+ * Note that the auto-hinter's module name is `autofitter' for
+ * historical reasons.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * glyph-to-script-map
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * The auto-hinter provides various script modules to hint glyphs.
+ * Examples of supported scripts are Latin or CJK. Before a glyph is
+ * auto-hinted, the Unicode character map of the font gets examined, and
+ * the script is then determined based on Unicode character ranges, see
+ * below.
+ *
+ * OpenType fonts, however, often provide much more glyphs than
+ * character codes (small caps, superscripts, ligatures, swashes, etc.),
+ * to be controlled by so-called `features'. Handling OpenType features
+ * can be quite complicated and thus needs a separate library on top of
+ * FreeType.
+ *
+ * The mapping between glyph indices and scripts (in the auto-hinter
+ * sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an
+ * array with `num_glyphs' elements, as found in the font's @FT_Face
+ * structure. The `glyph-to-script-map' property returns a pointer to
+ * this array, which can be modified as needed. Note that the
+ * modification should happen before the first glyph gets processed by
+ * the auto-hinter so that the global analysis of the font shapes
+ * actually uses the modified mapping.
+ *
+ * The following example code demonstrates how to access it (omitting
+ * the error handling).
+ *
+ * {
+ * FT_Library library;
+ * FT_Face face;
+ * FT_Prop_GlyphToScriptMap prop;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ * FT_New_Face( library, "foo.ttf", 0, &face );
+ *
+ * prop.face = face;
+ *
+ * FT_Property_Get( library, "autofitter",
+ * "glyph-to-script-map", &prop );
+ *
+ * // adjust `prop.map' as needed right here
+ *
+ * FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
+ * }
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_AUTOHINTER_SCRIPT_XXX
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * A list of constants used for the @glyph-to-script-map property to
+ * specify the script submodule the auto-hinter should use for hinting a
+ * particular glyph.
+ *
+ * @values:
+ * FT_AUTOHINTER_SCRIPT_NONE ::
+ * Don't auto-hint this glyph.
+ *
+ * FT_AUTOHINTER_SCRIPT_LATIN ::
+ * Apply the latin auto-hinter. For the auto-hinter, `latin' is a
+ * very broad term, including Cyrillic and Greek also since characters
+ * from those scripts share the same design constraints.
+ *
+ * By default, characters from the following Unicode ranges are
+ * assigned to this submodule.
+ *
+ * {
+ * U+0020 - U+007F // Basic Latin (no control characters)
+ * U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
+ * U+0100 - U+017F // Latin Extended-A
+ * U+0180 - U+024F // Latin Extended-B
+ * U+0250 - U+02AF // IPA Extensions
+ * U+02B0 - U+02FF // Spacing Modifier Letters
+ * U+0300 - U+036F // Combining Diacritical Marks
+ * U+0370 - U+03FF // Greek and Coptic
+ * U+0400 - U+04FF // Cyrillic
+ * U+0500 - U+052F // Cyrillic Supplement
+ * U+1D00 - U+1D7F // Phonetic Extensions
+ * U+1D80 - U+1DBF // Phonetic Extensions Supplement
+ * U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
+ * U+1E00 - U+1EFF // Latin Extended Additional
+ * U+1F00 - U+1FFF // Greek Extended
+ * U+2000 - U+206F // General Punctuation
+ * U+2070 - U+209F // Superscripts and Subscripts
+ * U+20A0 - U+20CF // Currency Symbols
+ * U+2150 - U+218F // Number Forms
+ * U+2460 - U+24FF // Enclosed Alphanumerics
+ * U+2C60 - U+2C7F // Latin Extended-C
+ * U+2DE0 - U+2DFF // Cyrillic Extended-A
+ * U+2E00 - U+2E7F // Supplemental Punctuation
+ * U+A640 - U+A69F // Cyrillic Extended-B
+ * U+A720 - U+A7FF // Latin Extended-D
+ * U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
+ * U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
+ * U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
+ * }
+ *
+ * FT_AUTOHINTER_SCRIPT_CJK ::
+ * Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old
+ * Vietnamese, and some other scripts.
+ *
+ * By default, characters from the following Unicode ranges are
+ * assigned to this submodule.
+ *
+ * {
+ * U+1100 - U+11FF // Hangul Jamo
+ * U+2E80 - U+2EFF // CJK Radicals Supplement
+ * U+2F00 - U+2FDF // Kangxi Radicals
+ * U+2FF0 - U+2FFF // Ideographic Description Characters
+ * U+3000 - U+303F // CJK Symbols and Punctuation
+ * U+3040 - U+309F // Hiragana
+ * U+30A0 - U+30FF // Katakana
+ * U+3100 - U+312F // Bopomofo
+ * U+3130 - U+318F // Hangul Compatibility Jamo
+ * U+3190 - U+319F // Kanbun
+ * U+31A0 - U+31BF // Bopomofo Extended
+ * U+31C0 - U+31EF // CJK Strokes
+ * U+31F0 - U+31FF // Katakana Phonetic Extensions
+ * U+3200 - U+32FF // Enclosed CJK Letters and Months
+ * U+3300 - U+33FF // CJK Compatibility
+ * U+3400 - U+4DBF // CJK Unified Ideographs Extension A
+ * U+4DC0 - U+4DFF // Yijing Hexagram Symbols
+ * U+4E00 - U+9FFF // CJK Unified Ideographs
+ * U+A960 - U+A97F // Hangul Jamo Extended-A
+ * U+AC00 - U+D7AF // Hangul Syllables
+ * U+D7B0 - U+D7FF // Hangul Jamo Extended-B
+ * U+F900 - U+FAFF // CJK Compatibility Ideographs
+ * U+FE10 - U+FE1F // Vertical forms
+ * U+FE30 - U+FE4F // CJK Compatibility Forms
+ * U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
+ * U+1B000 - U+1B0FF // Kana Supplement
+ * U+1D300 - U+1D35F // Tai Xuan Hing Symbols
+ * U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
+ * U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
+ * U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
+ * U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
+ * U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
+ * }
+ *
+ * FT_AUTOHINTER_SCRIPT_INDIC ::
+ * Apply the indic auto-hinter, covering all major scripts from the
+ * Indian sub-continent and some other related scripts like Thai, Lao,
+ * or Tibetan.
+ *
+ * By default, characters from the following Unicode ranges are
+ * assigned to this submodule.
+ *
+ * {
+ * U+0900 - U+0DFF // Indic Range
+ * U+0F00 - U+0FFF // Tibetan
+ * U+1900 - U+194F // Limbu
+ * U+1B80 - U+1BBF // Sundanese
+ * U+1C80 - U+1CDF // Meetei Mayak
+ * U+A800 - U+A82F // Syloti Nagri
+ * U+11800 - U+118DF // Sharada
+ * }
+ *
+ * Note that currently Indic support is rudimentary only, missing blue
+ * zone support.
+ *
+ */
+#define FT_AUTOHINTER_SCRIPT_NONE 0
+#define FT_AUTOHINTER_SCRIPT_LATIN 1
+#define FT_AUTOHINTER_SCRIPT_CJK 2
+#define FT_AUTOHINTER_SCRIPT_INDIC 3
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_Prop_GlyphToScriptMap
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * The data exchange structure for the @glyph-to-script-map property.
+ *
+ */
+ typedef struct FT_Prop_GlyphToScriptMap_
+ {
+ FT_Face face;
+ FT_Byte* map;
+
+ } FT_Prop_GlyphToScriptMap;
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * fallback-script
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * If no auto-hinter script module can be assigned to a glyph, a
+ * fallback script gets assigned to it (see also the
+ * @glyph-to-script-map property). By default, this is
+ * @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property,
+ * this fallback value can be changed.
+ *
+ * {
+ * FT_Library library;
+ * FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "autofitter",
+ * "fallback-script", &fallback_script );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * It's important to use the right timing for changing this value: The
+ * creation of the glyph-to-script map that eventually uses the
+ * fallback script value gets triggered either by setting or reading a
+ * face-specific property like @glyph-to-script-map, or by auto-hinting
+ * any glyph from that face. In particular, if you have already created
+ * an @FT_Face structure but not loaded any glyph (using the
+ * auto-hinter), a change of the fallback script will affect this face.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * default-script
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * If Freetype gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make
+ * the HarfBuzz library access OpenType features for getting better
+ * glyph coverages, this property sets the (auto-fitter) script to be
+ * used for the default (OpenType) script data of a font's GSUB table.
+ * Features for the default script are intended for all scripts not
+ * explicitly handled in GSUB; an example is a `dlig' feature,
+ * containing the combination of the characters `T', `E', and `L' to
+ * form a `TEL' ligature.
+ *
+ * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the
+ * `default-script' property, this default value can be changed.
+ *
+ * {
+ * FT_Library library;
+ * FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "autofitter",
+ * "default-script", &default_script );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * It's important to use the right timing for changing this value: The
+ * creation of the glyph-to-script map that eventually uses the
+ * default script value gets triggered either by setting or reading a
+ * face-specific property like @glyph-to-script-map, or by auto-hinting
+ * any glyph from that face. In particular, if you have already created
+ * an @FT_Face structure but not loaded any glyph (using the
+ * auto-hinter), a change of the default script will affect this face.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * increase-x-height
+ *
+ * @description:
+ * For ppem values in the range 6~<= ppem <= `increase-x-height', round
+ * up the font's x~height much more often than normally. If the value
+ * is set to~0, which is the default, this feature is switched off. Use
+ * this property to improve the legibility of small font sizes if
+ * necessary.
+ *
+ * {
+ * FT_Library library;
+ * FT_Face face;
+ * FT_Prop_IncreaseXHeight prop;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ * FT_New_Face( library, "foo.ttf", 0, &face );
+ * FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
+ *
+ * prop.face = face;
+ * prop.limit = 14;
+ *
+ * FT_Property_Set( library, "autofitter",
+ * "increase-x-height", &prop );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * Set this value right after calling @FT_Set_Char_Size, but before
+ * loading any glyph (using the auto-hinter).
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_Prop_IncreaseXHeight
+ *
+ * @description:
+ * The data exchange structure for the @increase-x-height property.
+ *
+ */
+ typedef struct FT_Prop_IncreaseXHeight_
+ {
+ FT_Face face;
+ FT_UInt limit;
+
+ } FT_Prop_IncreaseXHeight;
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTAUTOH_H__ */
+
+
+/* END */
diff --git a/include/freetype/ftbbox.h b/include/ftbbox.h
index 9766919..d6800e2 100644
--- a/include/freetype/ftbbox.h
+++ b/include/ftbbox.h
@@ -4,7 +4,7 @@
/* */
/* FreeType exact bbox computation (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2007, 2011 by */
+/* Copyright 1996-2001, 2003, 2007, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -60,7 +60,7 @@ FT_BEGIN_HEADER
/* <Description> */
/* Compute the exact bounding box of an outline. This is slower */
/* than computing the control box. However, it uses an advanced */
- /* algorithm which returns _very_ quickly when the two boxes */
+ /* algorithm that returns _very_ quickly when the two boxes */
/* coincide. Otherwise, the outline Bézier arcs are traversed to */
/* extract their extrema. */
/* */
@@ -78,14 +78,13 @@ FT_BEGIN_HEADER
/* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */
/* reasonable values for the BBox it is necessary to load the glyph */
/* at a large ppem value (so that the hinting instructions can */
- /* properly shift and scale the subglyphs), then extracting the BBox */
+ /* properly shift and scale the subglyphs), then extracting the BBox, */
/* which can be eventually converted back to font units. */
/* */
FT_EXPORT( FT_Error )
FT_Outline_Get_BBox( FT_Outline* outline,
FT_BBox *abbox );
-
/* */
diff --git a/include/freetype/ftbdf.h b/include/ftbdf.h
index 4f8baf8..6d262e4 100644
--- a/include/freetype/ftbdf.h
+++ b/include/ftbdf.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (specification). */
/* */
-/* Copyright 2002, 2003, 2004, 2006, 2009 by */
+/* Copyright 2002-2004, 2006, 2009, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -53,7 +53,7 @@ FT_BEGIN_HEADER
/**********************************************************************
*
* @enum:
- * FT_PropertyType
+ * BDF_PropertyType
*
* @description:
* A list of BDF property types.
@@ -106,7 +106,8 @@ FT_BEGIN_HEADER
* The property type.
*
* u.atom ::
- * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
+ * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be
+ * NULL, indicating an empty string.
*
* u.integer ::
* A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
@@ -199,7 +200,7 @@ FT_BEGIN_HEADER
const char* prop_name,
BDF_PropertyRec *aproperty );
- /* */
+ /* */
FT_END_HEADER
diff --git a/include/freetype/ftbitmap.h b/include/ftbitmap.h
index 9274236..eae7169 100644
--- a/include/freetype/ftbitmap.h
+++ b/include/ftbitmap.h
@@ -4,7 +4,7 @@
/* */
/* FreeType utility functions for bitmaps (specification). */
/* */
-/* Copyright 2004, 2005, 2006, 2008 by */
+/* Copyright 2004-2006, 2008, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -45,7 +45,9 @@ FT_BEGIN_HEADER
/* Handling FT_Bitmap objects. */
/* */
/* <Description> */
- /* This section contains functions for converting FT_Bitmap objects. */
+ /* This section contains functions for handling @FT_Bitmap objects. */
+ /* Note that none of the functions changes the bitmap's `flow' (as */
+ /* indicated by the sign of the `pitch' field in `FT_Bitmap'). */
/* */
/*************************************************************************/
@@ -122,6 +124,9 @@ FT_BEGIN_HEADER
/* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */
/* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */
/* */
+ /* Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format */
+ /* are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). */
+ /* */
FT_EXPORT( FT_Error )
FT_Bitmap_Embolden( FT_Library library,
FT_Bitmap* bitmap,
@@ -135,9 +140,9 @@ FT_BEGIN_HEADER
/* FT_Bitmap_Convert */
/* */
/* <Description> */
- /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */
- /* bitmap object with depth 8bpp, making the number of used bytes per */
- /* line (a.k.a. the `pitch') a multiple of `alignment'. */
+ /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */
+ /* to a bitmap object with depth 8bpp, making the number of used */
+ /* bytes line (a.k.a. the `pitch') a multiple of `alignment'. */
/* */
/* <Input> */
/* library :: A handle to a library object. */
diff --git a/include/freetype/ftbzip2.h b/include/ftbzip2.h
index 1bf81b1..4dce161 100644
--- a/include/freetype/ftbzip2.h
+++ b/include/ftbzip2.h
@@ -91,7 +91,7 @@ FT_BEGIN_HEADER
FT_Stream_OpenBzip2( FT_Stream stream,
FT_Stream source );
- /* */
+ /* */
FT_END_HEADER
diff --git a/include/freetype/ftcache.h b/include/ftcache.h
index 6af5306..a30e925 100644
--- a/include/freetype/ftcache.h
+++ b/include/ftcache.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache subsystem (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
+/* Copyright 1996-2008, 2010, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -156,7 +156,7 @@ FT_BEGIN_HEADER
* @note:
* Never use NULL as a valid @FTC_FaceID.
*
- * Face IDs are passed by the client to the cache manager, which calls,
+ * Face IDs are passed by the client to the cache manager that calls,
* when needed, the @FTC_Face_Requester to translate them into new
* @FT_Face objects.
*
@@ -209,22 +209,11 @@ FT_BEGIN_HEADER
typedef FT_Error
(*FTC_Face_Requester)( FTC_FaceID face_id,
FT_Library library,
- FT_Pointer request_data,
+ FT_Pointer req_data,
FT_Face* aface );
- /* */
-
-#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 */
/*************************************************************************/
/*************************************************************************/
@@ -381,7 +370,7 @@ FT_BEGIN_HEADER
/* should never try to discard it yourself. */
/* */
/* The @FT_Face object doesn't necessarily have a current size object */
- /* (i.e., face->size can be 0). If you need a specific `font size', */
+ /* (i.e., face->size can be~0). If you need a specific `font size', */
/* use @FTC_Manager_LookupSize instead. */
/* */
/* Never change the face's transformation matrix (i.e., never call */
@@ -705,17 +694,6 @@ 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 */
-
/*************************************************************************/
/* */
@@ -723,7 +701,7 @@ FT_BEGIN_HEADER
/* FTC_ImageCache */
/* */
/* <Description> */
- /* A handle to an glyph image cache object. They are designed to */
+ /* A handle to a glyph image cache object. They are designed to */
/* hold many distinct glyph images while not exceeding a certain */
/* memory threshold. */
/* */
@@ -1068,70 +1046,9 @@ FT_BEGIN_HEADER
FTC_SBit *sbit,
FTC_Node *anode );
-
- /* */
-
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- /*@***********************************************************************/
- /* */
- /* <Struct> */
- /* FTC_FontRec */
- /* */
- /* <Description> */
- /* A simple structure used to describe a given `font' to the cache */
- /* manager. Note that a `font' is the combination of a given face */
- /* with a given character size. */
- /* */
- /* <Fields> */
- /* face_id :: The ID of the face to use. */
- /* */
- /* pix_width :: The character width in integer pixels. */
- /* */
- /* pix_height :: The character height in integer pixels. */
- /* */
- typedef struct FTC_FontRec_
- {
- FTC_FaceID face_id;
- FT_UShort pix_width;
- FT_UShort pix_height;
-
- } FTC_FontRec;
-
-
/* */
-#define FTC_FONT_COMPARE( f1, f2 ) \
- ( (f1)->face_id == (f2)->face_id && \
- (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) ^ \
- ((f)->pix_height) )
-
- typedef FTC_FontRec* FTC_Font;
-
-
- FT_EXPORT( FT_Error )
- FTC_Manager_Lookup_Face( FTC_Manager manager,
- FTC_FaceID face_id,
- FT_Face *aface );
-
- FT_EXPORT( FT_Error )
- FTC_Manager_Lookup_Size( FTC_Manager manager,
- FTC_Font font,
- FT_Face *aface,
- FT_Size *asize );
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
- /* */
-
FT_END_HEADER
#endif /* __FTCACHE_H__ */
diff --git a/include/ftcffdrv.h b/include/ftcffdrv.h
new file mode 100644
index 0000000..f7031bc
--- /dev/null
+++ b/include/ftcffdrv.h
@@ -0,0 +1,262 @@
+/***************************************************************************/
+/* */
+/* ftcffdrv.h */
+/* */
+/* FreeType API for controlling the CFF driver (specification only). */
+/* */
+/* Copyright 2013, 2014 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __FTCFFDRV_H__
+#define __FTCFFDRV_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * cff_driver
+ *
+ * @title:
+ * The CFF driver
+ *
+ * @abstract:
+ * Controlling the CFF driver module.
+ *
+ * @description:
+ * While FreeType's CFF driver doesn't expose API functions by itself,
+ * it is possible to control its behaviour with @FT_Property_Set and
+ * @FT_Property_Get. The list below gives the available properties
+ * together with the necessary macros and structures.
+ *
+ * The CFF driver's module name is `cff'.
+ *
+ * *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine*
+ *
+ * The rasterizer is positioning horizontal features (e.g., ascender
+ * height & x-height, or crossbars) on the pixel grid and minimizing the
+ * amount of antialiasing applied to them, while placing vertical
+ * features (vertical stems) on the pixel grid without hinting, thus
+ * representing the stem position and weight accurately. Sometimes the
+ * vertical stems may be only partially black. In this context,
+ * `antialiasing' means that stems are not positioned exactly on pixel
+ * borders, causing a fuzzy appearance.
+ *
+ * There are two principles behind this approach.
+ *
+ * 1) No hinting in the horizontal direction: Unlike `superhinted'
+ * TrueType, which changes glyph widths to accommodate regular
+ * inter-glyph spacing, Adobe's approach is `faithful to the design' in
+ * representing both the glyph width and the inter-glyph spacing
+ * designed for the font. This makes the screen display as close as it
+ * can be to the result one would get with infinite resolution, while
+ * preserving what is considered the key characteristics of each glyph.
+ * Note that the distances between unhinted and grid-fitted positions at
+ * small sizes are comparable to kerning values and thus would be
+ * noticeable (and distracting) while reading if hinting were applied.
+ *
+ * One of the reasons to not hint horizontally is antialiasing for LCD
+ * screens: The pixel geometry of modern displays supplies three
+ * vertical sub-pixels as the eye moves horizontally across each visible
+ * pixel. On devices where we can be certain this characteristic is
+ * present a rasterizer can take advantage of the sub-pixels to add
+ * increments of weight. In Western writing systems this turns out to
+ * be the more critical direction anyway; the weights and spacing of
+ * vertical stems (see above) are central to Armenian, Cyrillic, Greek,
+ * and Latin type designs. Even when the rasterizer uses greyscale
+ * antialiasing instead of color (a necessary compromise when one
+ * doesn't know the screen characteristics), the unhinted vertical
+ * features preserve the design's weight and spacing much better than
+ * aliased type would.
+ *
+ * 2) Aligment in the vertical direction: Weights and spacing along the
+ * y~axis are less critical; what is much more important is the visual
+ * alignment of related features (like cap-height and x-height). The
+ * sense of alignment for these is enhanced by the sharpness of grid-fit
+ * edges, while the cruder vertical resolution (full pixels instead of
+ * 1/3 pixels) is less of a problem.
+ *
+ * On the technical side, horizontal alignment zones for ascender,
+ * x-height, and other important height values (traditionally called
+ * `blue zones') as defined in the font are positioned independently,
+ * each being rounded to the nearest pixel edge, taking care of
+ * overshoot suppression at small sizes, stem darkening, and scaling.
+ *
+ * Hstems (this is, hint values defined in the font to help align
+ * horizontal features) that fall within a blue zone are said to be
+ * `captured' and are aligned to that zone. Uncaptured stems are moved
+ * in one of four ways, top edge up or down, bottom edge up or down.
+ * Unless there are conflicting hstems, the smallest movement is taken
+ * to minimize distortion.
+ *
+ * @order:
+ * hinting-engine
+ * no-stem-darkening
+ * darkening-parameters
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * hinting-engine
+ *
+ * @description:
+ * Thanks to Adobe, which contributed a new hinting (and parsing)
+ * engine, an application can select between `freetype' and `adobe' if
+ * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration
+ * macro isn't defined, `hinting-engine' does nothing.
+ *
+ * The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is
+ * defined, and `adobe' otherwise.
+ *
+ * The following example code demonstrates how to select Adobe's hinting
+ * engine (omitting the error handling).
+ *
+ * {
+ * FT_Library library;
+ * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "cff",
+ * "hinting-engine", &hinting_engine );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_CFF_HINTING_XXX
+ *
+ * @description:
+ * A list of constants used for the @hinting-engine property to select
+ * the hinting engine for CFF fonts.
+ *
+ * @values:
+ * FT_CFF_HINTING_FREETYPE ::
+ * Use the old FreeType hinting engine.
+ *
+ * FT_CFF_HINTING_ADOBE ::
+ * Use the hinting engine contributed by Adobe.
+ *
+ */
+#define FT_CFF_HINTING_FREETYPE 0
+#define FT_CFF_HINTING_ADOBE 1
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * no-stem-darkening
+ *
+ * @description:
+ * By default, the Adobe CFF engine darkens stems at smaller sizes,
+ * regardless of hinting, to enhance contrast. This feature requires
+ * a rendering system with proper gamma correction. Setting this
+ * property, stem darkening gets switched off.
+ *
+ * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
+ *
+ * {
+ * FT_Library library;
+ * FT_Bool no_stem_darkening = TRUE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "cff",
+ * "no-stem-darkening", &no_stem_darkening );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * darkening-parameters
+ *
+ * @description:
+ * By default, the Adobe CFF engine darkens stems as follows (if the
+ * `no-stem-darkening' property isn't set):
+ *
+ * {
+ * stem width <= 0.5px: darkening amount = 0.4px
+ * stem width = 1px: darkening amount = 0.275px
+ * stem width = 1.667px: darkening amount = 0.275px
+ * stem width >= 2.333px: darkening amount = 0px
+ * }
+ *
+ * and piecewise linear in-between. At configuration time, these four
+ * control points can be set with the macro
+ * `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'. At runtime, the control
+ * points can be changed using the `darkening-parameters' property, as
+ * the following example demonstrates.
+ *
+ * {
+ * FT_Library library;
+ * FT_Int darken_params[8] = { 500, 300, // x1, y1
+ * 1000, 200, // x2, y2
+ * 1500, 100, // x3, y3
+ * 2000, 0 }; // x4, y4
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "cff",
+ * "darkening-parameters", darken_params );
+ * }
+ *
+ * The x~values give the stem width, and the y~values the darkening
+ * amount. The unit is 1000th of pixels. All coordinate values must be
+ * positive; the x~values must be monotonically increasing; the
+ * y~values must be monotonically decreasing and smaller than or
+ * equal to 500 (corresponding to half a pixel); the slope of each
+ * linear piece must be shallower than -1 (e.g., -.4).
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ */
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __FTCFFDRV_H__ */
+
+
+/* END */
diff --git a/include/freetype/ftchapters.h b/include/ftchapters.h
index 6cdf54e..d333761 100644
--- a/include/freetype/ftchapters.h
+++ b/include/ftchapters.h
@@ -1,7 +1,7 @@
/***************************************************************************/
/* */
/* This file defines the structure of the FreeType reference. */
-/* It is used by the python script which generates the HTML files. */
+/* It is used by the python script that generates the HTML files. */
/* */
/***************************************************************************/
@@ -15,6 +15,7 @@
/* General Remarks */
/* */
/* <Sections> */
+/* header_inclusion */
/* user_allocation */
/* */
/***************************************************************************/
@@ -67,6 +68,22 @@
/***************************************************************************/
/* */
/* <Chapter> */
+/* module_specific */
+/* */
+/* <Title> */
+/* Controlling FreeType Modules */
+/* */
+/* <Sections> */
+/* auto_hinter */
+/* cff_driver */
+/* tt_driver */
+/* */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/* */
+/* <Chapter> */
/* cache_subsystem */
/* */
/* <Title> */
diff --git a/include/freetype/ftcid.h b/include/ftcid.h
index 203a30c..17550d8 100644
--- a/include/freetype/ftcid.h
+++ b/include/ftcid.h
@@ -156,7 +156,8 @@ FT_BEGIN_HEADER
FT_UInt glyph_index,
FT_UInt *cid );
- /* */
+ /* */
+
FT_END_HEADER
diff --git a/include/freetype/fterrdef.h b/include/fterrdef.h
index fb4b53b..99b2fad 100644
--- a/include/freetype/fterrdef.h
+++ b/include/fterrdef.h
@@ -4,7 +4,7 @@
/* */
/* FreeType error codes (specification). */
/* */
-/* Copyright 2002, 2004, 2006, 2007, 2010-2011 by */
+/* Copyright 2002, 2004, 2006, 2007, 2010-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,214 +31,218 @@
/* generic errors */
- FT_NOERRORDEF_( Ok, 0x00, \
+ FT_NOERRORDEF_( Ok, 0x00,
"no error" )
- FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \
+ FT_ERRORDEF_( Cannot_Open_Resource, 0x01,
"cannot open resource" )
- FT_ERRORDEF_( Unknown_File_Format, 0x02, \
+ FT_ERRORDEF_( Unknown_File_Format, 0x02,
"unknown file format" )
- FT_ERRORDEF_( Invalid_File_Format, 0x03, \
+ FT_ERRORDEF_( Invalid_File_Format, 0x03,
"broken file" )
- FT_ERRORDEF_( Invalid_Version, 0x04, \
+ FT_ERRORDEF_( Invalid_Version, 0x04,
"invalid FreeType version" )
- FT_ERRORDEF_( Lower_Module_Version, 0x05, \
+ FT_ERRORDEF_( Lower_Module_Version, 0x05,
"module version is too low" )
- FT_ERRORDEF_( Invalid_Argument, 0x06, \
+ FT_ERRORDEF_( Invalid_Argument, 0x06,
"invalid argument" )
- FT_ERRORDEF_( Unimplemented_Feature, 0x07, \
+ FT_ERRORDEF_( Unimplemented_Feature, 0x07,
"unimplemented feature" )
- FT_ERRORDEF_( Invalid_Table, 0x08, \
+ FT_ERRORDEF_( Invalid_Table, 0x08,
"broken table" )
- FT_ERRORDEF_( Invalid_Offset, 0x09, \
+ FT_ERRORDEF_( Invalid_Offset, 0x09,
"broken offset within table" )
- FT_ERRORDEF_( Array_Too_Large, 0x0A, \
+ FT_ERRORDEF_( Array_Too_Large, 0x0A,
"array allocation size too large" )
- FT_ERRORDEF_( Missing_Module, 0x0B, \
+ FT_ERRORDEF_( Missing_Module, 0x0B,
"missing module" )
+ FT_ERRORDEF_( Missing_Property, 0x0C,
+ "missing property" )
/* glyph/character errors */
- FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \
+ FT_ERRORDEF_( Invalid_Glyph_Index, 0x10,
"invalid glyph index" )
- FT_ERRORDEF_( Invalid_Character_Code, 0x11, \
+ FT_ERRORDEF_( Invalid_Character_Code, 0x11,
"invalid character code" )
- FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \
+ FT_ERRORDEF_( Invalid_Glyph_Format, 0x12,
"unsupported glyph image format" )
- FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \
+ FT_ERRORDEF_( Cannot_Render_Glyph, 0x13,
"cannot render this glyph format" )
- FT_ERRORDEF_( Invalid_Outline, 0x14, \
+ FT_ERRORDEF_( Invalid_Outline, 0x14,
"invalid outline" )
- FT_ERRORDEF_( Invalid_Composite, 0x15, \
+ FT_ERRORDEF_( Invalid_Composite, 0x15,
"invalid composite glyph" )
- FT_ERRORDEF_( Too_Many_Hints, 0x16, \
+ FT_ERRORDEF_( Too_Many_Hints, 0x16,
"too many hints" )
- FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \
+ FT_ERRORDEF_( Invalid_Pixel_Size, 0x17,
"invalid pixel size" )
/* handle errors */
- FT_ERRORDEF_( Invalid_Handle, 0x20, \
+ FT_ERRORDEF_( Invalid_Handle, 0x20,
"invalid object handle" )
- FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \
+ FT_ERRORDEF_( Invalid_Library_Handle, 0x21,
"invalid library handle" )
- FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \
+ FT_ERRORDEF_( Invalid_Driver_Handle, 0x22,
"invalid module handle" )
- FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \
+ FT_ERRORDEF_( Invalid_Face_Handle, 0x23,
"invalid face handle" )
- FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \
+ FT_ERRORDEF_( Invalid_Size_Handle, 0x24,
"invalid size handle" )
- FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \
+ FT_ERRORDEF_( Invalid_Slot_Handle, 0x25,
"invalid glyph slot handle" )
- FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \
+ FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26,
"invalid charmap handle" )
- FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \
+ FT_ERRORDEF_( Invalid_Cache_Handle, 0x27,
"invalid cache manager handle" )
- FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \
+ FT_ERRORDEF_( Invalid_Stream_Handle, 0x28,
"invalid stream handle" )
/* driver errors */
- FT_ERRORDEF_( Too_Many_Drivers, 0x30, \
+ FT_ERRORDEF_( Too_Many_Drivers, 0x30,
"too many modules" )
- FT_ERRORDEF_( Too_Many_Extensions, 0x31, \
+ FT_ERRORDEF_( Too_Many_Extensions, 0x31,
"too many extensions" )
/* memory errors */
- FT_ERRORDEF_( Out_Of_Memory, 0x40, \
+ FT_ERRORDEF_( Out_Of_Memory, 0x40,
"out of memory" )
- FT_ERRORDEF_( Unlisted_Object, 0x41, \
+ FT_ERRORDEF_( Unlisted_Object, 0x41,
"unlisted object" )
/* stream errors */
- FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \
+ FT_ERRORDEF_( Cannot_Open_Stream, 0x51,
"cannot open stream" )
- FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \
+ FT_ERRORDEF_( Invalid_Stream_Seek, 0x52,
"invalid stream seek" )
- FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \
+ FT_ERRORDEF_( Invalid_Stream_Skip, 0x53,
"invalid stream skip" )
- FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \
+ FT_ERRORDEF_( Invalid_Stream_Read, 0x54,
"invalid stream read" )
- FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \
+ FT_ERRORDEF_( Invalid_Stream_Operation, 0x55,
"invalid stream operation" )
- FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \
+ FT_ERRORDEF_( Invalid_Frame_Operation, 0x56,
"invalid frame operation" )
- FT_ERRORDEF_( Nested_Frame_Access, 0x57, \
+ FT_ERRORDEF_( Nested_Frame_Access, 0x57,
"nested frame access" )
- FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \
+ FT_ERRORDEF_( Invalid_Frame_Read, 0x58,
"invalid frame read" )
/* raster errors */
- FT_ERRORDEF_( Raster_Uninitialized, 0x60, \
+ FT_ERRORDEF_( Raster_Uninitialized, 0x60,
"raster uninitialized" )
- FT_ERRORDEF_( Raster_Corrupted, 0x61, \
+ FT_ERRORDEF_( Raster_Corrupted, 0x61,
"raster corrupted" )
- FT_ERRORDEF_( Raster_Overflow, 0x62, \
+ FT_ERRORDEF_( Raster_Overflow, 0x62,
"raster overflow" )
- FT_ERRORDEF_( Raster_Negative_Height, 0x63, \
+ FT_ERRORDEF_( Raster_Negative_Height, 0x63,
"negative height while rastering" )
/* cache errors */
- FT_ERRORDEF_( Too_Many_Caches, 0x70, \
+ FT_ERRORDEF_( Too_Many_Caches, 0x70,
"too many registered caches" )
/* TrueType and SFNT errors */
- FT_ERRORDEF_( Invalid_Opcode, 0x80, \
+ FT_ERRORDEF_( Invalid_Opcode, 0x80,
"invalid opcode" )
- FT_ERRORDEF_( Too_Few_Arguments, 0x81, \
+ FT_ERRORDEF_( Too_Few_Arguments, 0x81,
"too few arguments" )
- FT_ERRORDEF_( Stack_Overflow, 0x82, \
+ FT_ERRORDEF_( Stack_Overflow, 0x82,
"stack overflow" )
- FT_ERRORDEF_( Code_Overflow, 0x83, \
+ FT_ERRORDEF_( Code_Overflow, 0x83,
"code overflow" )
- FT_ERRORDEF_( Bad_Argument, 0x84, \
+ FT_ERRORDEF_( Bad_Argument, 0x84,
"bad argument" )
- FT_ERRORDEF_( Divide_By_Zero, 0x85, \
+ FT_ERRORDEF_( Divide_By_Zero, 0x85,
"division by zero" )
- FT_ERRORDEF_( Invalid_Reference, 0x86, \
+ FT_ERRORDEF_( Invalid_Reference, 0x86,
"invalid reference" )
- FT_ERRORDEF_( Debug_OpCode, 0x87, \
+ FT_ERRORDEF_( Debug_OpCode, 0x87,
"found debug opcode" )
- FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \
+ FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88,
"found ENDF opcode in execution stream" )
- FT_ERRORDEF_( Nested_DEFS, 0x89, \
+ FT_ERRORDEF_( Nested_DEFS, 0x89,
"nested DEFS" )
- FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \
+ FT_ERRORDEF_( Invalid_CodeRange, 0x8A,
"invalid code range" )
- FT_ERRORDEF_( Execution_Too_Long, 0x8B, \
+ FT_ERRORDEF_( Execution_Too_Long, 0x8B,
"execution context too long" )
- FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \
+ FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C,
"too many function definitions" )
- FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \
+ FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D,
"too many instruction definitions" )
- FT_ERRORDEF_( Table_Missing, 0x8E, \
+ FT_ERRORDEF_( Table_Missing, 0x8E,
"SFNT font table missing" )
- FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \
+ FT_ERRORDEF_( Horiz_Header_Missing, 0x8F,
"horizontal header (hhea) table missing" )
- FT_ERRORDEF_( Locations_Missing, 0x90, \
+ FT_ERRORDEF_( Locations_Missing, 0x90,
"locations (loca) table missing" )
- FT_ERRORDEF_( Name_Table_Missing, 0x91, \
+ FT_ERRORDEF_( Name_Table_Missing, 0x91,
"name table missing" )
- FT_ERRORDEF_( CMap_Table_Missing, 0x92, \
+ FT_ERRORDEF_( CMap_Table_Missing, 0x92,
"character map (cmap) table missing" )
- FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \
+ FT_ERRORDEF_( Hmtx_Table_Missing, 0x93,
"horizontal metrics (hmtx) table missing" )
- FT_ERRORDEF_( Post_Table_Missing, 0x94, \
+ FT_ERRORDEF_( Post_Table_Missing, 0x94,
"PostScript (post) table missing" )
- FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \
+ FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95,
"invalid horizontal metrics" )
- FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \
+ FT_ERRORDEF_( Invalid_CharMap_Format, 0x96,
"invalid character map (cmap) format" )
- FT_ERRORDEF_( Invalid_PPem, 0x97, \
+ FT_ERRORDEF_( Invalid_PPem, 0x97,
"invalid ppem value" )
- FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \
+ FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98,
"invalid vertical metrics" )
- FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \
+ FT_ERRORDEF_( Could_Not_Find_Context, 0x99,
"could not find context" )
- FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \
+ FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A,
"invalid PostScript (post) table format" )
- FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \
+ FT_ERRORDEF_( Invalid_Post_Table, 0x9B,
"invalid PostScript (post) table" )
/* CFF, CID, and Type 1 errors */
- FT_ERRORDEF_( Syntax_Error, 0xA0, \
+ FT_ERRORDEF_( Syntax_Error, 0xA0,
"opcode syntax error" )
- FT_ERRORDEF_( Stack_Underflow, 0xA1, \
+ FT_ERRORDEF_( Stack_Underflow, 0xA1,
"argument stack underflow" )
- FT_ERRORDEF_( Ignore, 0xA2, \
+ FT_ERRORDEF_( Ignore, 0xA2,
"ignore" )
- FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \
+ FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3,
"no Unicode glyph name found" )
+ FT_ERRORDEF_( Glyph_Too_Big, 0xA4,
+ "glyph to big for hinting" )
/* BDF errors */
- FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \
+ FT_ERRORDEF_( Missing_Startfont_Field, 0xB0,
"`STARTFONT' field missing" )
- FT_ERRORDEF_( Missing_Font_Field, 0xB1, \
+ FT_ERRORDEF_( Missing_Font_Field, 0xB1,
"`FONT' field missing" )
- FT_ERRORDEF_( Missing_Size_Field, 0xB2, \
+ FT_ERRORDEF_( Missing_Size_Field, 0xB2,
"`SIZE' field missing" )
- FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \
+ FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3,
"`FONTBOUNDINGBOX' field missing" )
- FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \
+ FT_ERRORDEF_( Missing_Chars_Field, 0xB4,
"`CHARS' field missing" )
- FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \
+ FT_ERRORDEF_( Missing_Startchar_Field, 0xB5,
"`STARTCHAR' field missing" )
- FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \
+ FT_ERRORDEF_( Missing_Encoding_Field, 0xB6,
"`ENCODING' field missing" )
- FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \
+ FT_ERRORDEF_( Missing_Bbx_Field, 0xB7,
"`BBX' field missing" )
- FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \
+ FT_ERRORDEF_( Bbx_Too_Big, 0xB8,
"`BBX' too big" )
- FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \
+ FT_ERRORDEF_( Corrupted_Font_Header, 0xB9,
"Font header corrupted or missing fields" )
- FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \
+ FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA,
"Font glyphs corrupted or missing fields" )
diff --git a/include/freetype/fterrors.h b/include/fterrors.h
index a54699f..0fa3e4d 100644
--- a/include/freetype/fterrors.h
+++ b/include/fterrors.h
@@ -4,7 +4,7 @@
/* */
/* FreeType error code handling (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2007 by */
+/* Copyright 1996-2002, 2004, 2007, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -28,9 +28,8 @@
/* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */
/* defined in ftoption.h in order to make the higher byte indicate */
/* the module where the error has happened (this is not compatible */
- /* with standard builds of FreeType 2). You can then use the macro */
- /* FT_ERROR_BASE macro to extract the generic error code from an */
- /* FT_Error value. */
+ /* with standard builds of FreeType 2). See the file `ftmoderr.h' for */
+ /* more details. */
/* */
/* */
/* II - Error Message strings */
@@ -101,12 +100,6 @@
#undef FT_NEED_EXTERN_C
-#undef FT_ERR_XCAT
-#undef FT_ERR_CAT
-
-#define FT_ERR_XCAT( x, y ) x ## y
-#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
-
/* FT_ERR_PREFIX is used as a prefix for error identifiers. */
/* By default, we use `FT_Err_'. */
@@ -150,11 +143,11 @@
/* this macro is used to define an error */
-#define FT_ERRORDEF_( e, v, s ) \
+#define FT_ERRORDEF_( e, v, s ) \
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
/* this is only used for <module>_Err_Ok, which must be 0! */
-#define FT_NOERRORDEF_( e, v, s ) \
+#define FT_NOERRORDEF_( e, v, s ) \
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
@@ -194,11 +187,9 @@
#undef FT_NEED_EXTERN_C
#undef FT_ERR_BASE
- /* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */
-#ifndef FT_KEEP_ERR_PREFIX
+ /* FT_ERR_PREFIX is needed internally */
+#ifndef FT2_BUILD_LIBRARY
#undef FT_ERR_PREFIX
-#else
-#undef FT_KEEP_ERR_PREFIX
#endif
#endif /* __FTERRORS_H__ */
diff --git a/include/freetype/ftgasp.h b/include/ftgasp.h
index 453d4fa..3f3d765 100644
--- a/include/freetype/ftgasp.h
+++ b/include/ftgasp.h
@@ -120,7 +120,8 @@
FT_Get_Gasp( FT_Face face,
FT_UInt ppem );
-/* */
+ /* */
+
#endif /* _FT_GASP_H_ */
diff --git a/include/freetype/ftglyph.h b/include/ftglyph.h
index 3de69f7..15fa6a9 100644
--- a/include/freetype/ftglyph.h
+++ b/include/ftglyph.h
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (specification). */
/* */
-/* Copyright 1996-2003, 2006, 2008, 2009, 2011 by */
+/* Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -94,7 +94,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* The root glyph structure contains a given glyph image plus its */
- /* advance width in 16.16 fixed float format. */
+ /* advance width in 16.16 fixed-point format. */
/* */
/* <Fields> */
/* library :: A handle to the FreeType library object. */
@@ -325,22 +325,8 @@ FT_BEGIN_HEADER
} FT_Glyph_BBox_Mode;
- /*************************************************************************/
- /* */
- /* <Enum> */
- /* ft_glyph_bbox_xxx */
- /* */
- /* <Description> */
- /* These constants are deprecated. Use the corresponding */
- /* @FT_Glyph_BBox_Mode values instead. */
- /* */
- /* <Values> */
- /* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */
- /* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */
- /* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */
- /* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */
- /* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */
- /* */
+ /* these constants are deprecated; use the corresponding */
+ /* `FT_Glyph_BBox_Mode' values instead */
#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED
#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS
#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT
@@ -358,17 +344,17 @@ FT_BEGIN_HEADER
/* outline's points, including Bézier control points. Though it */
/* coincides with the exact bounding box for most glyphs, it can be */
/* slightly larger in some situations (like when rotating an outline */
- /* which contains Bézier outside arcs). */
+ /* that contains Bézier outside arcs). */
/* */
/* Computing the control box is very fast, while getting the bounding */
/* box can take much more time as it needs to walk over all segments */
/* and arcs in the outline. To get the latter, you can use the */
- /* `ftbbox' component which is dedicated to this single task. */
+ /* `ftbbox' component, which is dedicated to this single task. */
/* */
/* <Input> */
/* glyph :: A handle to the source glyph object. */
/* */
- /* mode :: The mode which indicates how to interpret the returned */
+ /* mode :: The mode that indicates how to interpret the returned */
/* bounding box values. */
/* */
/* <Output> */
@@ -388,7 +374,7 @@ FT_BEGIN_HEADER
/* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */
/* reasonable values for the CBox it is necessary to load the glyph */
/* at a large ppem value (so that the hinting instructions can */
- /* properly shift and scale the subglyphs), then extracting the CBox */
+ /* properly shift and scale the subglyphs), then extracting the CBox, */
/* which can be eventually converted back to font units. */
/* */
/* Note that the maximum coordinates are exclusive, which means that */
@@ -603,7 +589,6 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_Error )
FT_Matrix_Invert( FT_Matrix* matrix );
-
/* */
diff --git a/include/freetype/ftgxval.h b/include/ftgxval.h
index 497015c..88c3d93 100644
--- a/include/freetype/ftgxval.h
+++ b/include/ftgxval.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating TrueTypeGX/AAT tables (specification). */
/* */
-/* Copyright 2004, 2005, 2006 by */
+/* Copyright 2004-2006, 2013 by */
/* Masatake YAMATO, Redhat K.K, */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -57,9 +57,19 @@ FT_BEGIN_HEADER
/* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */
/* trak, prop, lcar). */
/* */
+ /* <Order> */
+ /* FT_TrueTypeGX_Validate */
+ /* FT_TrueTypeGX_Free */
+ /* */
+ /* FT_ClassicKern_Validate */
+ /* FT_ClassicKern_Free */
+ /* */
+ /* FT_VALIDATE_GX_LENGTH */
+ /* FT_VALIDATE_GXXXX */
+ /* FT_VALIDATE_CKERNXXX */
+ /* */
/*************************************************************************/
-
/*************************************************************************/
/* */
/* */
@@ -171,8 +181,6 @@ FT_BEGIN_HEADER
FT_VALIDATE_lcar )
- /* */
-
/**********************************************************************
*
* @function:
@@ -180,7 +188,7 @@ FT_BEGIN_HEADER
*
* @description:
* Validate various TrueTypeGX tables to assure that all offsets and
- * indices are valid. The idea is that a higher-level library which
+ * indices are valid. The idea is that a higher-level library that
* actually does the text layout can access those tables without
* error checking (which can be quite time consuming).
*
@@ -189,7 +197,7 @@ FT_BEGIN_HEADER
* A handle to the input face.
*
* validation_flags ::
- * A bit field which specifies the tables to be validated. See
+ * A bit field that specifies the tables to be validated. See
* @FT_VALIDATE_GXXXX for possible values.
*
* table_length ::
@@ -221,8 +229,6 @@ FT_BEGIN_HEADER
FT_UInt table_length );
- /* */
-
/**********************************************************************
*
* @function:
@@ -248,8 +254,6 @@ FT_BEGIN_HEADER
FT_Bytes table );
- /* */
-
/**********************************************************************
*
* @enum:
@@ -277,8 +281,6 @@ FT_BEGIN_HEADER
#define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
- /* */
-
/**********************************************************************
*
* @function:
@@ -286,7 +288,7 @@ FT_BEGIN_HEADER
*
* @description:
* Validate classic (16-bit format) kern table to assure that the offsets
- * and indices are valid. The idea is that a higher-level library which
+ * and indices are valid. The idea is that a higher-level library that
* actually does the text layout can access those tables without error
* checking (which can be quite time consuming).
*
@@ -299,7 +301,7 @@ FT_BEGIN_HEADER
* A handle to the input face.
*
* validation_flags ::
- * A bit field which specifies the dialect to be validated. See
+ * A bit field that specifies the dialect to be validated. See
* @FT_VALIDATE_CKERNXXX for possible values.
*
* @output:
@@ -320,8 +322,6 @@ FT_BEGIN_HEADER
FT_Bytes *ckern_table );
- /* */
-
/**********************************************************************
*
* @function:
@@ -346,8 +346,7 @@ FT_BEGIN_HEADER
FT_ClassicKern_Free( FT_Face face,
FT_Bytes table );
-
- /* */
+ /* */
FT_END_HEADER
diff --git a/include/freetype/ftgzip.h b/include/ftgzip.h
index acbc4f0..eb346c6 100644
--- a/include/freetype/ftgzip.h
+++ b/include/ftgzip.h
@@ -4,7 +4,7 @@
/* */
/* Gzip-compressed stream support. */
/* */
-/* Copyright 2002, 2003, 2004, 2006 by */
+/* Copyright 2002-2004, 2006, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -91,7 +91,53 @@ FT_BEGIN_HEADER
FT_Stream_OpenGzip( FT_Stream stream,
FT_Stream source );
- /* */
+
+ /************************************************************************
+ *
+ * @function:
+ * FT_Gzip_Uncompress
+ *
+ * @description:
+ * Decompress a zipped input buffer into an output buffer. This function
+ * is modeled after zlib's `uncompress' function.
+ *
+ * @input:
+ * memory ::
+ * A FreeType memory handle.
+ *
+ * input ::
+ * The input buffer.
+ *
+ * input_len ::
+ * The length of the input buffer.
+ *
+ * @output:
+ * output::
+ * The output buffer.
+ *
+ * @inout:
+ * output_len ::
+ * Before calling the function, this is the the total size of the
+ * output buffer, which must be large enough to hold the entire
+ * uncompressed data (so the size of the uncompressed data must be
+ * known in advance). After calling the function, `output_len' is the
+ * size of the used data in `output'.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * This function may return `FT_Err_Unimplemented_Feature' if your build
+ * of FreeType was not compiled with zlib support.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Gzip_Uncompress( FT_Memory memory,
+ FT_Byte* output,
+ FT_ULong* output_len,
+ const FT_Byte* input,
+ FT_ULong input_len );
+
+ /* */
FT_END_HEADER
diff --git a/include/freetype/ftimage.h b/include/ftimage.h
index 04b5e04..2f7ca2a 100644
--- a/include/freetype/ftimage.h
+++ b/include/ftimage.h
@@ -5,8 +5,7 @@
/* FreeType glyph image formats and default raster interface */
/* (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
-/* 2010 by */
+/* Copyright 1996-2010, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -54,7 +53,7 @@ FT_BEGIN_HEADER
/* <Description> */
/* 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. */
+ /* units, or 16.16, or 26.6 fixed-point pixel coordinates. */
/* */
typedef signed long FT_Pos;
@@ -169,6 +168,15 @@ FT_BEGIN_HEADER
/* times taller than the original glyph image. See also */
/* @FT_RENDER_MODE_LCD_V. */
/* */
+ /* FT_PIXEL_MODE_BGRA :: */
+ /* An image with four 8-bit channels per pixel, representing a */
+ /* color image (such as emoticons) with alpha channel. For each */
+ /* pixel, the format is BGRA, which means, the blue channel comes */
+ /* first in memory. The color channels are pre-multiplied and in */
+ /* the sRGB colorspace. For example, full red at half-translucent */
+ /* opacity will be represented as `00,00,80,80', not `00,00,FF,80'. */
+ /* See also @FT_LOAD_COLOR. */
+ /* */
typedef enum FT_Pixel_Mode_
{
FT_PIXEL_MODE_NONE = 0,
@@ -178,73 +186,21 @@ FT_BEGIN_HEADER
FT_PIXEL_MODE_GRAY4,
FT_PIXEL_MODE_LCD,
FT_PIXEL_MODE_LCD_V,
+ FT_PIXEL_MODE_BGRA,
FT_PIXEL_MODE_MAX /* do not remove */
} FT_Pixel_Mode;
- /*************************************************************************/
- /* */
- /* <Enum> */
- /* ft_pixel_mode_xxx */
- /* */
- /* <Description> */
- /* A list of deprecated constants. Use the corresponding */
- /* @FT_Pixel_Mode values instead. */
- /* */
- /* <Values> */
- /* ft_pixel_mode_none :: See @FT_PIXEL_MODE_NONE. */
- /* ft_pixel_mode_mono :: See @FT_PIXEL_MODE_MONO. */
- /* ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY. */
- /* ft_pixel_mode_pal2 :: See @FT_PIXEL_MODE_GRAY2. */
- /* ft_pixel_mode_pal4 :: See @FT_PIXEL_MODE_GRAY4. */
- /* */
+ /* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */
+ /* values instead. */
#define ft_pixel_mode_none FT_PIXEL_MODE_NONE
#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY
#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4
- /* */
-
-#if 0
-
- /*************************************************************************/
- /* */
- /* <Enum> */
- /* FT_Palette_Mode */
- /* */
- /* <Description> */
- /* THIS TYPE IS DEPRECATED. DO NOT USE IT! */
- /* */
- /* An enumeration type to describe the format of a bitmap palette, */
- /* used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */
- /* */
- /* <Values> */
- /* ft_palette_mode_rgb :: The palette is an array of 3-byte RGB */
- /* records. */
- /* */
- /* ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA */
- /* records. */
- /* */
- /* <Note> */
- /* As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by */
- /* FreeType, these types are not handled by the library itself. */
- /* */
- typedef enum FT_Palette_Mode_
- {
- ft_palette_mode_rgb = 0,
- ft_palette_mode_rgba,
-
- ft_palette_mode_max /* do not remove */
-
- } FT_Palette_Mode;
-
- /* */
-
-#endif
-
/*************************************************************************/
/* */
@@ -309,13 +265,13 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Bitmap_
{
- int rows;
- int width;
+ unsigned int rows;
+ unsigned int width;
int pitch;
unsigned char* buffer;
- short num_grays;
- char pixel_mode;
- char palette_mode;
+ unsigned short num_grays;
+ unsigned char pixel_mode;
+ unsigned char palette_mode;
void* palette;
} FT_Bitmap;
@@ -372,7 +328,7 @@ FT_BEGIN_HEADER
/* */
/* flags :: A set of bit flags used to characterize the outline */
/* and give hints to the scan-converter and hinter on */
- /* how to convert/grid-fit it. See @FT_OUTLINE_FLAGS. */
+ /* how to convert/grid-fit it. See @FT_OUTLINE_XXX. */
/* */
/* <Note> */
/* The B/W rasterizer only checks bit~2 in the `tags' array for the */
@@ -393,6 +349,8 @@ FT_BEGIN_HEADER
} FT_Outline;
+ /* */
+
/* Following limits must be consistent with */
/* FT_Outline.{n_contours,n_points} */
#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
@@ -402,7 +360,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Enum> */
- /* FT_OUTLINE_FLAGS */
+ /* FT_OUTLINE_XXX */
/* */
/* <Description> */
/* A list of bit-field constants use for the flags in an outline's */
@@ -483,24 +441,8 @@ FT_BEGIN_HEADER
#define FT_OUTLINE_SINGLE_PASS 0x200
- /*************************************************************************
- *
- * @enum:
- * ft_outline_flags
- *
- * @description:
- * These constants are deprecated. Please use the corresponding
- * @FT_OUTLINE_FLAGS values.
- *
- * @values:
- * ft_outline_none :: See @FT_OUTLINE_NONE.
- * ft_outline_owner :: See @FT_OUTLINE_OWNER.
- * ft_outline_even_odd_fill :: See @FT_OUTLINE_EVEN_ODD_FILL.
- * ft_outline_reverse_fill :: See @FT_OUTLINE_REVERSE_FILL.
- * ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS.
- * ft_outline_high_precision :: See @FT_OUTLINE_HIGH_PRECISION.
- * ft_outline_single_pass :: See @FT_OUTLINE_SINGLE_PASS.
- */
+ /* these constants are deprecated; use the corresponding */
+ /* `FT_OUTLINE_XXX' values instead */
#define ft_outline_none FT_OUTLINE_NONE
#define ft_outline_owner FT_OUTLINE_OWNER
#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL
@@ -546,7 +488,7 @@ FT_BEGIN_HEADER
/* <Input> */
/* to :: A pointer to the target point of the `move to'. */
/* */
- /* user :: A typeless pointer which is passed from the caller of the */
+ /* user :: A typeless pointer, which is passed from the caller of the */
/* decomposition function. */
/* */
/* <Return> */
@@ -573,7 +515,7 @@ FT_BEGIN_HEADER
/* <Input> */
/* to :: A pointer to the target point of the `line to'. */
/* */
- /* user :: A typeless pointer which is passed from the caller of the */
+ /* user :: A typeless pointer, which is passed from the caller of the */
/* decomposition function. */
/* */
/* <Return> */
@@ -604,7 +546,7 @@ FT_BEGIN_HEADER
/* */
/* to :: A pointer to the target end point of the conic arc. */
/* */
- /* user :: A typeless pointer which is passed from the caller of */
+ /* user :: A typeless pointer, which is passed from the caller of */
/* the decomposition function. */
/* */
/* <Return> */
@@ -636,7 +578,7 @@ FT_BEGIN_HEADER
/* */
/* to :: A pointer to the target end point. */
/* */
- /* user :: A typeless pointer which is passed from the caller of */
+ /* user :: A typeless pointer, which is passed from the caller of */
/* the decomposition function. */
/* */
/* <Return> */
@@ -787,22 +729,8 @@ FT_BEGIN_HEADER
} FT_Glyph_Format;
- /*************************************************************************/
- /* */
- /* <Enum> */
- /* ft_glyph_format_xxx */
- /* */
- /* <Description> */
- /* A list of deprecated constants. Use the corresponding */
- /* @FT_Glyph_Format values instead. */
- /* */
- /* <Values> */
- /* ft_glyph_format_none :: See @FT_GLYPH_FORMAT_NONE. */
- /* ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE. */
- /* ft_glyph_format_bitmap :: See @FT_GLYPH_FORMAT_BITMAP. */
- /* ft_glyph_format_outline :: See @FT_GLYPH_FORMAT_OUTLINE. */
- /* ft_glyph_format_plotter :: See @FT_GLYPH_FORMAT_PLOTTER. */
- /* */
+ /* these constants are deprecated; use the corresponding */
+ /* `FT_Glyph_Format' values instead. */
#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP
@@ -827,8 +755,8 @@ FT_BEGIN_HEADER
/* a a bitmap. This section contains the public API for rasters. */
/* */
/* Note that in FreeType 2, all rasters are now encapsulated within */
- /* specific modules called `renderers'. See `freetype/ftrender.h' for */
- /* more details on renderers. */
+ /* specific modules called `renderers'. See `ftrender.h' for more */
+ /* details on renderers. */
/* */
/*************************************************************************/
@@ -847,6 +775,21 @@ FT_BEGIN_HEADER
/* <Description> */
/* This section contains technical definitions. */
/* */
+ /* <Order> */
+ /* FT_Raster */
+ /* FT_Span */
+ /* FT_SpanFunc */
+ /* */
+ /* FT_Raster_Params */
+ /* FT_RASTER_FLAG_XXX */
+ /* */
+ /* FT_Raster_NewFunc */
+ /* FT_Raster_DoneFunc */
+ /* FT_Raster_ResetFunc */
+ /* FT_Raster_SetModeFunc */
+ /* FT_Raster_RenderFunc */
+ /* FT_Raster_Funcs */
+ /* */
/*************************************************************************/
@@ -856,8 +799,8 @@ FT_BEGIN_HEADER
/* FT_Raster */
/* */
/* <Description> */
- /* A handle (pointer) to a raster object. Each object can be used */
- /* independently to convert an outline into a bitmap or pixmap. */
+ /* An opaque handle (pointer) to a raster object. Each object can be */
+ /* used independently to convert an outline into a bitmap or pixmap. */
/* */
typedef struct FT_RasterRec_* FT_Raster;
@@ -868,8 +811,8 @@ FT_BEGIN_HEADER
/* FT_Span */
/* */
/* <Description> */
- /* A structure used to model a single span of gray (or black) pixels */
- /* when rendering a monochrome or anti-aliased bitmap. */
+ /* A structure used to model a single span of gray pixels when */
+ /* rendering an anti-aliased bitmap. */
/* */
/* <Fields> */
/* x :: The span's horizontal start position. */
@@ -877,13 +820,12 @@ FT_BEGIN_HEADER
/* len :: The span's length in pixels. */
/* */
/* coverage :: The span color/coverage, ranging from 0 (background) */
- /* to 255 (foreground). Only used for anti-aliased */
- /* rendering. */
+ /* to 255 (foreground). */
/* */
/* <Note> */
/* This structure is used by the span drawing callback type named */
- /* @FT_SpanFunc which takes the y~coordinate of the span as a */
- /* a parameter. */
+ /* @FT_SpanFunc that takes the y~coordinate of the span as a */
+ /* parameter. */
/* */
/* The coverage value is always between 0 and 255. If you want less */
/* gray values, the callback function has to reduce them. */
@@ -948,22 +890,7 @@ FT_BEGIN_HEADER
/* FT_Raster_BitTest_Func */
/* */
/* <Description> */
- /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */
- /* */
- /* A function used as a call-back by the monochrome scan-converter */
- /* to test whether a given target pixel is already set to the drawing */
- /* `color'. These tests are crucial to implement drop-out control */
- /* per-se the TrueType spec. */
- /* */
- /* <Input> */
- /* y :: The pixel's y~coordinate. */
- /* */
- /* x :: The pixel's x~coordinate. */
- /* */
- /* user :: User-supplied data that is passed to the callback. */
- /* */
- /* <Return> */
- /* 1~if the pixel is `set', 0~otherwise. */
+ /* Deprecated, unimplemented. */
/* */
typedef int
(*FT_Raster_BitTest_Func)( int y,
@@ -977,21 +904,7 @@ FT_BEGIN_HEADER
/* FT_Raster_BitSet_Func */
/* */
/* <Description> */
- /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */
- /* */
- /* A function used as a call-back by the monochrome scan-converter */
- /* to set an individual target pixel. This is crucial to implement */
- /* drop-out control according to the TrueType specification. */
- /* */
- /* <Input> */
- /* y :: The pixel's y~coordinate. */
- /* */
- /* x :: The pixel's x~coordinate. */
- /* */
- /* user :: User-supplied data that is passed to the callback. */
- /* */
- /* <Return> */
- /* 1~if the pixel is `set', 0~otherwise. */
+ /* Deprecated, unimplemented. */
/* */
typedef void
(*FT_Raster_BitSet_Func)( int y,
@@ -1025,8 +938,8 @@ FT_BEGIN_HEADER
/* pixmap's buffer _must_ be zeroed before */
/* rendering. */
/* */
- /* Note that for now, direct rendering is */
- /* only possible with anti-aliased glyphs. */
+ /* Direct rendering is only possible with */
+ /* anti-aliased glyphs. */
/* */
/* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
/* rendering mode. If set, the output will */
@@ -1044,7 +957,8 @@ FT_BEGIN_HEADER
#define FT_RASTER_FLAG_DIRECT 0x2
#define FT_RASTER_FLAG_CLIP 0x4
- /* deprecated */
+ /* these constants are deprecated; use the corresponding */
+ /* `FT_RASTER_FLAG_XXX' values instead */
#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT
#define ft_raster_flag_aa FT_RASTER_FLAG_AA
#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
@@ -1070,11 +984,11 @@ FT_BEGIN_HEADER
/* */
/* gray_spans :: The gray span drawing callback. */
/* */
- /* black_spans :: The black span drawing callback. UNIMPLEMENTED! */
+ /* black_spans :: Unused. */
/* */
- /* bit_test :: The bit test callback. UNIMPLEMENTED! */
+ /* bit_test :: Unused. */
/* */
- /* bit_set :: The bit set callback. UNIMPLEMENTED! */
+ /* bit_set :: Unused. */
/* */
/* user :: User-supplied data that is passed to each drawing */
/* callback. */
@@ -1091,15 +1005,9 @@ FT_BEGIN_HEADER
/* */
/* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */
/* raster will call the `gray_spans' callback to draw gray pixel */
- /* spans, in the case of an aa glyph bitmap, it will call */
- /* `black_spans', and `bit_test' and `bit_set' in the case of a */
- /* monochrome bitmap. This allows direct composition over a */
- /* pre-existing bitmap through user-provided callbacks to perform the */
- /* span drawing/composition. */
- /* */
- /* Note that the `bit_test' and `bit_set' callbacks are required when */
- /* rendering a monochrome bitmap, as they are crucial to implement */
- /* correct drop-out control as defined in the TrueType specification. */
+ /* spans. This allows direct composition over a pre-existing bitmap */
+ /* through user-provided callbacks to perform the span drawing and */
+ /* composition. Not supported by the monochrome rasterizer. */
/* */
typedef struct FT_Raster_Params_
{
@@ -1107,9 +1015,9 @@ FT_BEGIN_HEADER
const void* source;
int flags;
FT_SpanFunc gray_spans;
- FT_SpanFunc black_spans; /* doesn't work! */
- FT_Raster_BitTest_Func bit_test; /* doesn't work! */
- FT_Raster_BitSet_Func bit_set; /* doesn't work! */
+ FT_SpanFunc black_spans; /* unused */
+ FT_Raster_BitTest_Func bit_test; /* unused */
+ FT_Raster_BitSet_Func bit_set; /* unused */
void* user;
FT_BBox clip_box;
@@ -1256,7 +1164,7 @@ FT_BEGIN_HEADER
/* XXX: For now, the standard raster doesn't support direct */
/* composition but this should change for the final release (see */
/* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */
- /* for examples of distinct implementations which support direct */
+ /* for examples of distinct implementations that support direct */
/* composition). */
/* */
typedef int
@@ -1296,7 +1204,6 @@ FT_BEGIN_HEADER
} FT_Raster_Funcs;
-
/* */
diff --git a/include/freetype/ftincrem.h b/include/ftincrem.h
index aaf689f..4c0246c 100644
--- a/include/freetype/ftincrem.h
+++ b/include/ftincrem.h
@@ -4,7 +4,7 @@
/* */
/* FreeType incremental loading (specification). */
/* */
-/* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */
+/* Copyright 2002, 2003, 2006-2008, 2010, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -45,7 +45,7 @@ FT_BEGIN_HEADER
* @description:
* This section contains various functions used to perform so-called
* `incremental' glyph loading. This is a mode where all glyphs loaded
- * from a given @FT_Face are provided by the client application,
+ * from a given @FT_Face are provided by the client application.
*
* Apart from that, all other tables are loaded normally from the font
* file. This mode is useful when FreeType is used within another
@@ -345,6 +345,7 @@ FT_BEGIN_HEADER
/* */
+
FT_END_HEADER
#endif /* __FTINCREM_H__ */
diff --git a/include/freetype/ftlcdfil.h b/include/ftlcdfil.h
index 0b55ebe..e8679c1 100644
--- a/include/freetype/ftlcdfil.h
+++ b/include/ftlcdfil.h
@@ -5,7 +5,7 @@
/* FreeType API for color filtering of subpixel bitmap glyphs */
/* (specification). */
/* */
-/* Copyright 2006, 2007, 2008, 2010 by */
+/* Copyright 2006-2008, 2010, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -45,14 +45,52 @@ FT_BEGIN_HEADER
*
* @description:
* The @FT_Library_SetLcdFilter API can be used to specify a low-pass
- * filter which is then applied to LCD-optimized bitmaps generated
+ * filter, which is then applied to LCD-optimized bitmaps generated
* through @FT_Render_Glyph. This is useful to reduce color fringes
- * which would occur with unfiltered rendering.
+ * that would occur with unfiltered rendering.
*
* Note that no filter is active by default, and that this function is
* *not* implemented in default builds of the library. You need to
* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
* in order to activate it.
+ *
+ * FreeType generates alpha coverage maps, which are linear by nature.
+ * For instance, the value 0x80 in bitmap representation means that
+ * (within numerical precision) 0x80/0xFF fraction of that pixel is
+ * covered by the glyph's outline. The blending function for placing
+ * text over a background is
+ *
+ * {
+ * dst = alpha * src + (1 - alpha) * dst ,
+ * }
+ *
+ * which is known as OVER. However, when calculating the output of the
+ * OVER operator, the source colors should first be transformed to a
+ * linear color space, then alpha blended in that space, and transformed
+ * back to the output color space.
+ *
+ * When linear light blending is used, the default FIR5 filtering
+ * weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as
+ * they have been designed for black on white rendering while lacking
+ * gamma correction. To preserve color neutrality, weights for a FIR5
+ * filter should be chosen according to two free parameters `a' and `c',
+ * and the FIR weights should be
+ *
+ * {
+ * [a - c, a + c, 2 * a, a + c, a - c] .
+ * }
+ *
+ * This formula generates equal weights for all the color primaries
+ * across the filter kernel, which makes it colorless. One suggested
+ * set of weights is
+ *
+ * {
+ * [0x10, 0x50, 0x60, 0x50, 0x10] ,
+ * }
+ *
+ * where `a' has value 0x30 and `b' value 0x20. The weights in filter
+ * may have a sum larger than 0x100, which increases coloration slightly
+ * but also improves contrast.
*/
diff --git a/include/freetype/ftlist.h b/include/ftlist.h
index bb6f7f1..9950a27 100644
--- a/include/freetype/ftlist.h
+++ b/include/ftlist.h
@@ -4,7 +4,7 @@
/* */
/* Generic list support for FreeType (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2007, 2010 by */
+/* Copyright 1996-2001, 2003, 2007, 2010, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -173,7 +173,7 @@ FT_BEGIN_HEADER
/* FT_List_Iterator */
/* */
/* <Description> */
- /* An FT_List iterator function which is called during a list parse */
+ /* An FT_List iterator function that is called during a list parse */
/* by @FT_List_Iterate. */
/* */
/* <Input> */
@@ -200,7 +200,7 @@ FT_BEGIN_HEADER
/* <Input> */
/* list :: A handle to the list. */
/* iterator :: An iterator function, called on each node of the list. */
- /* user :: A user-supplied field which is passed as the second */
+ /* user :: A user-supplied field that is passed as the second */
/* argument to the iterator. */
/* */
/* <Return> */
@@ -218,7 +218,7 @@ FT_BEGIN_HEADER
/* FT_List_Destructor */
/* */
/* <Description> */
- /* An @FT_List iterator function which is called during a list */
+ /* An @FT_List iterator function that is called during a list */
/* finalization by @FT_List_Finalize to destroy all elements in a */
/* given list. */
/* */
@@ -248,11 +248,11 @@ FT_BEGIN_HEADER
/* list :: A handle to the list. */
/* */
/* destroy :: A list destructor that will be applied to each element */
- /* of the list. */
+ /* of the list. Set this to NULL if not needed. */
/* */
- /* memory :: The current memory object which handles deallocation. */
+ /* memory :: The current memory object that handles deallocation. */
/* */
- /* user :: A user-supplied field which is passed as the last */
+ /* user :: A user-supplied field that is passed as the last */
/* argument to the destructor. */
/* */
/* <Note> */
@@ -265,7 +265,6 @@ FT_BEGIN_HEADER
FT_Memory memory,
void* user );
-
/* */
diff --git a/include/freetype/ftlzw.h b/include/ftlzw.h
index 00d4016..857c0c5 100644
--- a/include/freetype/ftlzw.h
+++ b/include/ftlzw.h
@@ -88,7 +88,7 @@ FT_BEGIN_HEADER
FT_Stream_OpenLZW( FT_Stream stream,
FT_Stream source );
- /* */
+ /* */
FT_END_HEADER
diff --git a/include/freetype/ftmac.h b/include/ftmac.h
index ab5bab5..42874fe 100644
--- a/include/freetype/ftmac.h
+++ b/include/ftmac.h
@@ -4,7 +4,7 @@
/* */
/* Additional Mac-specific API. */
/* */
-/* Copyright 1996-2001, 2004, 2006, 2007 by */
+/* Copyright 1996-2001, 2004, 2006, 2007, 2013 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,7 +18,7 @@
/***************************************************************************/
/* */
-/* NOTE: Include this file after <freetype/freetype.h> and after any */
+/* NOTE: Include this file after FT_FREETYPE_H and after any */
/* Mac-specific headers (because this header uses Mac types such as */
/* Handle, FSSpec, FSRef, etc.) */
/* */
@@ -168,7 +168,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Return a pathname of the disk file and face index for given font */
- /* name which is handled by ATS framework. */
+ /* name that is handled by ATS framework. */
/* */
/* <Input> */
/* fontName :: Mac OS name of the font in ATS framework. */
diff --git a/include/freetype/ftmm.h b/include/ftmm.h
index 3aefb9e..2dcfd67 100644
--- a/include/freetype/ftmm.h
+++ b/include/ftmm.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Multiple Master font interface (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */
+/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -196,7 +196,7 @@ FT_BEGIN_HEADER
/* number of designs). */
/* */
/* num_namedstyles :: The number of named styles; only meaningful for */
- /* GX which allows certain design coordinates to */
+ /* GX that allows certain design coordinates to */
/* have a string ID (in the `name' table) */
/* associated with them. The font can tell the */
/* user that, for example, Weight=1.5 is `Bold'. */
@@ -218,9 +218,6 @@ FT_BEGIN_HEADER
} FT_MM_Var;
- /* */
-
-
/*************************************************************************/
/* */
/* <Function> */
@@ -258,8 +255,7 @@ FT_BEGIN_HEADER
/* */
/* <Output> */
/* amaster :: The Multiple Masters/GX var descriptor. */
- /* Allocates a data structure, which the user must free */
- /* (a single call to FT_FREE will do it). */
+ /* Allocates a data structure, which the user must free. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
@@ -366,7 +362,6 @@ FT_BEGIN_HEADER
FT_UInt num_coords,
FT_Fixed* coords );
-
/* */
diff --git a/include/freetype/ftmodapi.h b/include/ftmodapi.h
index 8f2e017..980f15d 100644
--- a/include/freetype/ftmodapi.h
+++ b/include/ftmodapi.h
@@ -4,7 +4,7 @@
/* */
/* FreeType modules public interface (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */
+/* Copyright 1996-2003, 2006, 2008-2010, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -42,11 +42,65 @@ FT_BEGIN_HEADER
/* Module Management */
/* */
/* <Abstract> */
- /* How to add, upgrade, and remove modules from FreeType. */
+ /* How to add, upgrade, remove, and control modules from FreeType. */
/* */
/* <Description> */
/* The definitions below are used to manage modules within FreeType. */
/* Modules can be added, upgraded, and removed at runtime. */
+ /* Additionally, some module properties can be controlled also. */
+ /* */
+ /* Here is a list of possible values of the `module_name' field in */
+ /* the @FT_Module_Class structure. */
+ /* */
+ /* { */
+ /* autofitter */
+ /* bdf */
+ /* cff */
+ /* gxvalid */
+ /* otvalid */
+ /* pcf */
+ /* pfr */
+ /* psaux */
+ /* pshinter */
+ /* psnames */
+ /* raster1, raster5 */
+ /* sfnt */
+ /* smooth, smooth-lcd, smooth-lcdv */
+ /* truetype */
+ /* type1 */
+ /* type42 */
+ /* t1cid */
+ /* winfonts */
+ /* } */
+ /* */
+ /* Note that the FreeType Cache sub-system is not a FreeType module. */
+ /* */
+ /* <Order> */
+ /* FT_Module */
+ /* FT_Module_Constructor */
+ /* FT_Module_Destructor */
+ /* FT_Module_Requester */
+ /* FT_Module_Class */
+ /* */
+ /* FT_Add_Module */
+ /* FT_Get_Module */
+ /* FT_Remove_Module */
+ /* FT_Add_Default_Modules */
+ /* */
+ /* FT_Property_Set */
+ /* FT_Property_Get */
+ /* */
+ /* FT_New_Library */
+ /* FT_Done_Library */
+ /* FT_Reference_Library */
+ /* */
+ /* FT_Renderer */
+ /* FT_Renderer_Class */
+ /* */
+ /* FT_Get_Renderer */
+ /* FT_Set_Renderer */
+ /* */
+ /* FT_Set_Debug_Hook */
/* */
/*************************************************************************/
@@ -118,7 +172,7 @@ FT_BEGIN_HEADER
/* A function used to query a given module for a specific interface. */
/* */
/* <Input> */
- /* module :: The module to finalize. */
+ /* module :: The module to be searched. */
/* */
/* name :: The name of the interface in the module. */
/* */
@@ -249,6 +303,137 @@ FT_BEGIN_HEADER
FT_Module module );
+ /**********************************************************************
+ *
+ * @function:
+ * FT_Property_Set
+ *
+ * @description:
+ * Set a property for a given module.
+ *
+ * @input:
+ * library ::
+ * A handle to the library the module is part of.
+ *
+ * module_name ::
+ * The module name.
+ *
+ * property_name ::
+ * The property name. Properties are described in the `Synopsis'
+ * subsection of the module's documentation.
+ *
+ * Note that only a few modules have properties.
+ *
+ * value ::
+ * A generic pointer to a variable or structure that gives the new
+ * value of the property. The exact definition of `value' is
+ * dependent on the property; see the `Synopsis' subsection of the
+ * module's documentation.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * If `module_name' isn't a valid module name, or `property_name'
+ * doesn't specify a valid property, or if `value' doesn't represent a
+ * valid value for the given property, an error is returned.
+ *
+ * The following example sets property `bar' (a simple integer) in
+ * module `foo' to value~1.
+ *
+ * {
+ * FT_UInt bar;
+ *
+ *
+ * bar = 1;
+ * FT_Property_Set( library, "foo", "bar", &bar );
+ * }
+ *
+ * Note that the FreeType Cache sub-system doesn't recognize module
+ * property changes. To avoid glyph lookup confusion within the cache
+ * you should call @FTC_Manager_Reset to completely flush the cache if
+ * a module property gets changed after @FTC_Manager_New has been
+ * called.
+ *
+ * It is not possible to set properties of the FreeType Cache
+ * sub-system itself with FT_Property_Set; use @FTC_Property_Set
+ * instead.
+ *
+ * @since:
+ * 2.4.11
+ *
+ */
+ FT_EXPORT( FT_Error )
+ FT_Property_Set( FT_Library library,
+ const FT_String* module_name,
+ const FT_String* property_name,
+ const void* value );
+
+
+ /**********************************************************************
+ *
+ * @function:
+ * FT_Property_Get
+ *
+ * @description:
+ * Get a module's property value.
+ *
+ * @input:
+ * library ::
+ * A handle to the library the module is part of.
+ *
+ * module_name ::
+ * The module name.
+ *
+ * property_name ::
+ * The property name. Properties are described in the `Synopsis'
+ * subsection of the module's documentation.
+ *
+ * @inout:
+ * value ::
+ * A generic pointer to a variable or structure that gives the
+ * value of the property. The exact definition of `value' is
+ * dependent on the property; see the `Synopsis' subsection of the
+ * module's documentation.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * If `module_name' isn't a valid module name, or `property_name'
+ * doesn't specify a valid property, or if `value' doesn't represent a
+ * valid value for the given property, an error is returned.
+ *
+ * The following example gets property `baz' (a range) in module `foo'.
+ *
+ * {
+ * typedef range_
+ * {
+ * FT_Int32 min;
+ * FT_Int32 max;
+ *
+ * } range;
+ *
+ * range baz;
+ *
+ *
+ * FT_Property_Get( library, "foo", "baz", &baz );
+ * }
+ *
+ * It is not possible to retrieve properties of the FreeType Cache
+ * sub-system with FT_Property_Get; use @FTC_Property_Get instead.
+ *
+ * @since:
+ * 2.4.11
+ *
+ */
+ FT_EXPORT( FT_Error )
+ FT_Property_Get( FT_Library library,
+ const FT_String* module_name,
+ const FT_String* property_name,
+ void* value );
+
+
/*************************************************************************/
/* */
/* <Function> */
@@ -260,7 +445,7 @@ FT_BEGIN_HEADER
/* @FT_Done_Library then only destroys a library if the counter is~1, */
/* otherwise it simply decrements the counter. */
/* */
- /* This function helps in managing life-cycles of structures which */
+ /* This function helps in managing life-cycles of structures that */
/* reference @FT_Library objects. */
/* */
/* <Input> */
@@ -333,7 +518,7 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_Error )
FT_Done_Library( FT_Library library );
-/* */
+ /* */
typedef void
(*FT_DebugHook_Func)( void* arg );
@@ -426,17 +611,17 @@ FT_BEGIN_HEADER
* The library implements a bytecode interpreter that doesn't
* support the patented operations of the TrueType virtual machine.
*
- * Its main use is to load certain Asian fonts which position and
+ * Its main use is to load certain Asian fonts that position and
* scale glyph components with bytecode instructions. It produces
* bad output for most other fonts.
*
- * FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
+ * FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
* The library implements a bytecode interpreter that covers
* the full instruction set of the TrueType virtual machine (this
* was governed by patents until May 2010, hence the name).
*
* @since:
- * 2.2
+ * 2.2
*
*/
typedef enum FT_TrueTypeEngineType_
@@ -471,7 +656,6 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_TrueTypeEngineType )
FT_Get_TrueType_Engine_Type( FT_Library library );
-
/* */
diff --git a/include/freetype/ftmoderr.h b/include/ftmoderr.h
index 1bf3b38..5a27db1 100644
--- a/include/freetype/ftmoderr.h
+++ b/include/ftmoderr.h
@@ -4,7 +4,7 @@
/* */
/* FreeType module error offsets (specification). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2010 by */
+/* Copyright 2001-2005, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,17 +18,57 @@
/*************************************************************************/
/* */
- /* This file is used to define the FreeType module error offsets. */
+ /* This file is used to define the FreeType module error codes. */
/* */
- /* The lower byte gives the error code, the higher byte gives the */
- /* module. The base module has error offset 0. For example, the error */
- /* `FT_Err_Invalid_File_Format' has value 0x003, the error */
- /* `TT_Err_Invalid_File_Format' has value 0x1103, the error */
- /* `T1_Err_Invalid_File_Format' has value 0x1203, etc. */
+ /* If the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in `ftoption.h' is */
+ /* set, the lower byte of an error value identifies the error code as */
+ /* usual. In addition, the higher byte identifies the module. For */
+ /* example, the error `FT_Err_Invalid_File_Format' has value 0x0003, the */
+ /* error `TT_Err_Invalid_File_Format' has value 0x1303, the error */
+ /* `T1_Err_Invalid_File_Format' has value 0x1403, etc. */
+ /* */
+ /* Note that `FT_Err_Ok', `TT_Err_Ok', etc. are always equal to zero, */
+ /* including the high byte. */
+ /* */
+ /* If FT_CONFIG_OPTION_USE_MODULE_ERRORS isn't set, the higher byte of */
+ /* an error value is set to zero. */
+ /* */
+ /* To hide the various `XXX_Err_' prefixes in the source code, FreeType */
+ /* provides some macros in `fttypes.h'. */
+ /* */
+ /* FT_ERR( err ) */
+ /* Add current error module prefix (as defined with the */
+ /* `FT_ERR_PREFIX' macro) to `err'. For example, in the BDF module */
+ /* the line */
+ /* */
+ /* error = FT_ERR( Invalid_Outline ); */
+ /* */
+ /* expands to */
+ /* */
+ /* error = BDF_Err_Invalid_Outline; */
+ /* */
+ /* For simplicity, you can always use `FT_Err_Ok' directly instead */
+ /* of `FT_ERR( Ok )'. */
+ /* */
+ /* FT_ERR_EQ( errcode, err ) */
+ /* FT_ERR_NEQ( errcode, err ) */
+ /* Compare error code `errcode' with the error `err' for equality */
+ /* and inequality, respectively. Example: */
+ /* */
+ /* if ( FT_ERR_EQ( error, Invalid_Outline ) ) */
+ /* ... */
+ /* */
+ /* Using this macro you don't have to think about error prefixes. */
+ /* Of course, if module errors are not active, the above example is */
+ /* the same as */
+ /* */
+ /* if ( error == FT_Err_Invalid_Outline ) */
+ /* ... */
+ /* */
+ /* FT_ERROR_BASE( errcode ) */
+ /* FT_ERROR_MODULE( errcode ) */
+ /* Get base error and module error code, respectively. */
/* */
- /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */
- /* to make the higher byte always zero (disabling the module error */
- /* mechanism). */
/* */
/* It can also be used to create a module error message table easily */
/* with something like */
@@ -48,9 +88,6 @@
/* #include FT_MODULE_ERRORS_H */
/* } */
/* */
- /* To use such a table, all errors must be ANDed with 0xFF00 to remove */
- /* the error code. */
- /* */
/*************************************************************************/
@@ -124,6 +161,7 @@
FT_MODERRDEF( Type1, 0x1300, "Type 1 module" )
FT_MODERRDEF( Type42, 0x1400, "Type 42 module" )
FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" )
+ FT_MODERRDEF( GXvalid, 0x1600, "GX validation module" )
#ifdef FT_MODERR_END_LIST
diff --git a/include/freetype/ftotval.h b/include/ftotval.h
index 027f2e8..75ba03e 100644
--- a/include/freetype/ftotval.h
+++ b/include/ftotval.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating OpenType tables (specification). */
/* */
-/* Copyright 2004, 2005, 2006, 2007 by */
+/* Copyright 2004-2007, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -58,6 +58,12 @@ FT_BEGIN_HEADER
/* This section contains the declaration of functions to validate */
/* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */
/* */
+ /* <Order> */
+ /* FT_OpenType_Validate */
+ /* FT_OpenType_Free */
+ /* */
+ /* FT_VALIDATE_OTXXX */
+ /* */
/*************************************************************************/
@@ -107,8 +113,6 @@ FT_BEGIN_HEADER
FT_VALIDATE_JSTF | \
FT_VALIDATE_MATH
- /* */
-
/**********************************************************************
*
* @function:
@@ -116,7 +120,7 @@ FT_BEGIN_HEADER
*
* @description:
* Validate various OpenType tables to assure that all offsets and
- * indices are valid. The idea is that a higher-level library which
+ * indices are valid. The idea is that a higher-level library that
* actually does the text layout can access those tables without
* error checking (which can be quite time consuming).
*
@@ -125,7 +129,7 @@ FT_BEGIN_HEADER
* A handle to the input face.
*
* validation_flags ::
- * A bit field which specifies the tables to be validated. See
+ * A bit field that specifies the tables to be validated. See
* @FT_VALIDATE_OTXXX for possible values.
*
* @output:
@@ -165,8 +169,6 @@ FT_BEGIN_HEADER
FT_Bytes *GSUB_table,
FT_Bytes *JSTF_table );
- /* */
-
/**********************************************************************
*
* @function:
@@ -191,8 +193,7 @@ FT_BEGIN_HEADER
FT_OpenType_Free( FT_Face face,
FT_Bytes table );
-
- /* */
+ /* */
FT_END_HEADER
diff --git a/include/freetype/ftoutln.h b/include/ftoutln.h
index 1cf3c3f..d3b8fbd 100644
--- a/include/freetype/ftoutln.h
+++ b/include/ftoutln.h
@@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */
/* */
-/* Copyright 1996-2003, 2005-2011 by */
+/* Copyright 1996-2003, 2005-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -52,13 +52,13 @@ FT_BEGIN_HEADER
/* */
/* <Order> */
/* FT_Outline */
- /* FT_OUTLINE_FLAGS */
/* FT_Outline_New */
/* FT_Outline_Done */
/* FT_Outline_Copy */
/* FT_Outline_Translate */
/* FT_Outline_Transform */
/* FT_Outline_Embolden */
+ /* FT_Outline_EmboldenXY */
/* FT_Outline_Reverse */
/* FT_Outline_Check */
/* */
@@ -67,13 +67,17 @@ FT_BEGIN_HEADER
/* */
/* FT_Outline_Get_Bitmap */
/* FT_Outline_Render */
- /* */
/* FT_Outline_Decompose */
/* FT_Outline_Funcs */
- /* FT_Outline_MoveTo_Func */
- /* FT_Outline_LineTo_Func */
- /* FT_Outline_ConicTo_Func */
- /* FT_Outline_CubicTo_Func */
+ /* FT_Outline_MoveToFunc */
+ /* FT_Outline_LineToFunc */
+ /* FT_Outline_ConicToFunc */
+ /* FT_Outline_CubicToFunc */
+ /* */
+ /* FT_Orientation */
+ /* FT_Outline_Get_Orientation */
+ /* */
+ /* FT_OUTLINE_XXX */
/* */
/*************************************************************************/
@@ -96,7 +100,7 @@ FT_BEGIN_HEADER
/* operations. */
/* */
/* <InOut> */
- /* user :: A typeless pointer which is passed to each */
+ /* user :: A typeless pointer that is passed to each */
/* emitter during the decomposition. It can be */
/* used to store the state during the */
/* decomposition. */
@@ -104,6 +108,13 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* A contour that contains a single point only is represented by a */
+ /* `move to' operation followed by `line to' to the same point. In */
+ /* most cases, it is best to filter this out before using the */
+ /* outline for stroking purposes (otherwise it would result in a */
+ /* visible dot when round caps are used). */
+ /* */
FT_EXPORT( FT_Error )
FT_Outline_Decompose( FT_Outline* outline,
const FT_Outline_Funcs* func_interface,
@@ -124,9 +135,11 @@ FT_BEGIN_HEADER
/* outline will *not* necessarily be *freed*, when */
/* destroying the library, by @FT_Done_FreeType. */
/* */
- /* numPoints :: The maximal number of points within the outline. */
+ /* numPoints :: The maximum number of points within the outline. */
+ /* Must be smaller than or equal to 0xFFFF (65535). */
/* */
- /* numContours :: The maximal number of contours within the outline. */
+ /* numContours :: The maximum number of contours within the outline. */
+ /* This value must be in the range 0 to `numPoints'. */
/* */
/* <Output> */
/* anoutline :: A handle to the new outline. */
@@ -214,12 +227,12 @@ FT_BEGIN_HEADER
/* the outline's points, including Bézier control points. Though it */
/* coincides with the exact bounding box for most glyphs, it can be */
/* slightly larger in some situations (like when rotating an outline */
- /* which contains Bézier outside arcs). */
+ /* that contains Bézier outside arcs). */
/* */
/* Computing the control box is very fast, while getting the bounding */
/* box can take much more time as it needs to walk over all segments */
/* and arcs in the outline. To get the latter, you can use the */
- /* `ftbbox' component which is dedicated to this single task. */
+ /* `ftbbox' component, which is dedicated to this single task. */
/* */
/* <Input> */
/* outline :: A pointer to the source outline descriptor. */
@@ -345,6 +358,9 @@ FT_BEGIN_HEADER
/* FT_Outline_Embolden( &face->slot->outline, strength ); */
/* } */
/* */
+ /* To get meaningful results, font scaling values must be set with */
+ /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */
+ /* */
FT_EXPORT( FT_Error )
FT_Outline_Embolden( FT_Outline* outline,
FT_Pos strength );
@@ -353,6 +369,23 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
+ /* FT_Outline_EmboldenXY */
+ /* */
+ /* <Description> */
+ /* Embolden an outline. The new outline will be `xstrength' pixels */
+ /* wider and `ystrength' pixels higher. Otherwise, it is similar to */
+ /* @FT_Outline_Embolden, which uses the same strength in both */
+ /* directions. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Outline_EmboldenXY( FT_Outline* outline,
+ FT_Pos xstrength,
+ FT_Pos ystrength );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* FT_Outline_Reverse */
/* */
/* <Description> */
@@ -505,9 +538,11 @@ FT_BEGIN_HEADER
*
* @description:
* This function analyzes a glyph outline and tries to compute its
- * fill orientation (see @FT_Orientation). This is done by computing
- * the direction of each global horizontal and/or vertical extrema
- * within the outline.
+ * fill orientation (see @FT_Orientation). This is done by integrating
+ * the total area covered by the outline. The positive integral
+ * corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT
+ * is returned. The negative integral corresponds to the counter-clockwise
+ * orientation and @FT_ORIENTATION_TRUETYPE is returned.
*
* Note that this will return @FT_ORIENTATION_TRUETYPE for empty
* outlines.
@@ -523,7 +558,6 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_Orientation )
FT_Outline_Get_Orientation( FT_Outline* outline );
-
/* */
diff --git a/include/freetype/ftpfr.h b/include/ftpfr.h
index 0b7b7d4..7d50353 100644
--- a/include/freetype/ftpfr.h
+++ b/include/ftpfr.h
@@ -161,7 +161,7 @@ FT_BEGIN_HEADER
FT_UInt gindex,
FT_Pos *aadvance );
- /* */
+ /* */
FT_END_HEADER
diff --git a/include/freetype/ftrender.h b/include/ftrender.h
index dd0229b..e8d3636 100644
--- a/include/freetype/ftrender.h
+++ b/include/ftrender.h
@@ -226,7 +226,6 @@ FT_BEGIN_HEADER
FT_UInt num_params,
FT_Parameter* parameters );
-
/* */
diff --git a/include/freetype/ftsizes.h b/include/ftsizes.h
index 3e548cc..4167045 100644
--- a/include/freetype/ftsizes.h
+++ b/include/ftsizes.h
@@ -4,7 +4,7 @@
/* */
/* FreeType size objects management (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */
+/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -129,7 +129,7 @@ FT_BEGIN_HEADER
/* <Description> */
/* Even though it is possible to create several size objects for a */
/* given face (see @FT_New_Size for details), functions like */
- /* @FT_Load_Glyph or @FT_Load_Char only use the one which has been */
+ /* @FT_Load_Glyph or @FT_Load_Char only use the one that has been */
/* activated last to determine the `current character pixel size'. */
/* */
/* This function can be used to `activate' a previously created size */
diff --git a/include/freetype/ftsnames.h b/include/ftsnames.h
index 485e4e1..88af440 100644
--- a/include/freetype/ftsnames.h
+++ b/include/ftsnames.h
@@ -7,7 +7,7 @@
/* */
/* This is _not_ used to retrieve glyph names! */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */
+/* Copyright 1996-2003, 2006, 2009, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -169,7 +169,7 @@ FT_BEGIN_HEADER
* A constant used as the tag of @FT_Parameter structures to make
* FT_Open_Face() ignore preferred family subfamily names in `name'
* table since OpenType version 1.4. For backwards compatibility with
- * legacy systems which has 4-face-per-family restriction.
+ * legacy systems that have a 4-face-per-family restriction.
*
*/
#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
@@ -184,7 +184,7 @@ FT_BEGIN_HEADER
* A constant used as the tag of @FT_Parameter structures to make
* FT_Open_Face() ignore preferred subfamily names in `name' table since
* OpenType version 1.4. For backwards compatibility with legacy
- * systems which has 4-face-per-family restriction.
+ * systems that have a 4-face-per-family restriction.
*
*/
#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' )
diff --git a/include/freetype/ftstroke.h b/include/ftstroke.h
index 49ae2bc..bd31170 100644
--- a/include/freetype/ftstroke.h
+++ b/include/ftstroke.h
@@ -4,7 +4,7 @@
/* */
/* FreeType path stroker (specification). */
/* */
-/* Copyright 2002-2006, 2008, 2009, 2011 by */
+/* Copyright 2002-2006, 2008, 2009, 2011-2012, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -46,6 +46,38 @@ FT_BEGIN_HEADER
* This can be useful to generate `bordered' glyph, i.e., glyphs
* displayed with a coloured (and anti-aliased) border around their
* shape.
+ *
+ * @order:
+ * FT_Stroker
+ *
+ * FT_Stroker_LineJoin
+ * FT_Stroker_LineCap
+ * FT_StrokerBorder
+ *
+ * FT_Outline_GetInsideBorder
+ * FT_Outline_GetOutsideBorder
+ *
+ * FT_Glyph_Stroke
+ * FT_Glyph_StrokeBorder
+ *
+ * FT_Stroker_New
+ * FT_Stroker_Set
+ * FT_Stroker_Rewind
+ * FT_Stroker_ParseOutline
+ * FT_Stroker_Done
+ *
+ * FT_Stroker_BeginSubPath
+ * FT_Stroker_EndSubPath
+ *
+ * FT_Stroker_LineTo
+ * FT_Stroker_ConicTo
+ * FT_Stroker_CubicTo
+ *
+ * FT_Stroker_GetBorderCounts
+ * FT_Stroker_ExportBorder
+ * FT_Stroker_GetCounts
+ * FT_Stroker_Export
+ *
*/
@@ -55,7 +87,7 @@ FT_BEGIN_HEADER
* FT_Stroker
*
* @description:
- * Opaque handler to a path stroker object.
+ * Opaque handle to a path stroker object.
*/
typedef struct FT_StrokerRec_* FT_Stroker;
@@ -271,11 +303,13 @@ FT_BEGIN_HEADER
* miter_limit ::
* The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and
* FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles,
- * expressed as 16.16 fixed point value.
+ * expressed as 16.16 fixed-point value.
*
* @note:
* The radius is expressed in the same units as the outline
* coordinates.
+ *
+ * This function calls @FT_Stroker_Rewind automatically.
*/
FT_EXPORT( void )
FT_Stroker_Set( FT_Stroker stroker,
@@ -570,10 +604,10 @@ FT_BEGIN_HEADER
* receive all new data.
*
* When an outline, or a sub-path, is `closed', the stroker generates
- * two independent `border' outlines, named `left' and `right'
+ * two independent `border' outlines, named `left' and `right'.
*
* When the outline, or a sub-path, is `opened', the stroker merges
- * the `border' outlines with caps. The `left' border receives all
+ * the `border' outlines with caps. The `left' border receives all
* points, while the `right' border becomes empty.
*
* Use the function @FT_Stroker_Export instead if you want to
@@ -682,6 +716,11 @@ FT_BEGIN_HEADER
*
* @note:
* The source glyph is untouched in case of error.
+ *
+ * Adding stroke may yield a significantly wider and taller glyph
+ * depending on how large of a radius was used to stroke the glyph. You
+ * may need to manually adjust horizontal and vertical advance amounts
+ * to account for this added size.
*/
FT_EXPORT( FT_Error )
FT_Glyph_Stroke( FT_Glyph *pglyph,
@@ -719,6 +758,11 @@ FT_BEGIN_HEADER
*
* @note:
* The source glyph is untouched in case of error.
+ *
+ * Adding stroke may yield a significantly wider and taller glyph
+ * depending on how large of a radius was used to stroke the glyph. You
+ * may need to manually adjust horizontal and vertical advance amounts
+ * to account for this added size.
*/
FT_EXPORT( FT_Error )
FT_Glyph_StrokeBorder( FT_Glyph *pglyph,
@@ -726,7 +770,7 @@ FT_BEGIN_HEADER
FT_Bool inside,
FT_Bool destroy );
- /* */
+ /* */
FT_END_HEADER
diff --git a/include/freetype/ftsynth.h b/include/ftsynth.h
index a068b79..d0ea730 100644
--- a/include/freetype/ftsynth.h
+++ b/include/ftsynth.h
@@ -5,7 +5,7 @@
/* FreeType synthesizing code for emboldening and slanting */
/* (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2006, 2008 by */
+/* Copyright 2000-2001, 2003, 2006, 2008, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -37,7 +37,7 @@
/* Main reason for not lifting the functions in this module to a */
/* `standard' API is that the used parameters for emboldening and */
/* slanting are not configurable. Consider the functions as a */
- /* code resource which should be copied into the application and */
+ /* code resource that should be copied into the application and */
/* adapted to the particular needs. */
@@ -61,8 +61,9 @@ FT_BEGIN_HEADER
/* taste). This function is actually a convenience function, providing */
/* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */
/* */
- /* For emboldened outlines the metrics are estimates only; if you need */
- /* precise values you should call @FT_Outline_Get_CBox. */
+ /* For emboldened outlines the height, width, and advance metrics are */
+ /* increased by the strength of the emboldening. You can also call */
+ /* @FT_Outline_Get_CBox to get precise values. */
FT_EXPORT( void )
FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
@@ -72,6 +73,7 @@ FT_BEGIN_HEADER
/* */
+
FT_END_HEADER
#endif /* __FTSYNTH_H__ */
diff --git a/include/freetype/ftsystem.h b/include/ftsystem.h
index e07460c..7436ed2 100644
--- a/include/freetype/ftsystem.h
+++ b/include/ftsystem.h
@@ -4,7 +4,7 @@
/* */
/* FreeType low-level system interface definition (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2005, 2010 by */
+/* Copyright 1996-2001, 2002, 2005, 2010, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -192,6 +192,10 @@ FT_BEGIN_HEADER
* @description:
* A handle to an input stream.
*
+ * @also:
+ * See @FT_StreamRec for the publicly accessible fields of a given
+ * stream object.
+ *
*/
typedef struct FT_StreamRec_* FT_Stream;
@@ -285,6 +289,11 @@ FT_BEGIN_HEADER
* size ::
* The stream size in bytes.
*
+ * In case of compressed streams where the size is unknown before
+ * actually doing the decompression, the value is set to 0x7FFFFFFF.
+ * (Note that this size value can occur for normal streams also; it is
+ * thus just a hint.)
+ *
* pos ::
* The current position within the stream.
*
@@ -335,7 +344,6 @@ FT_BEGIN_HEADER
} FT_StreamRec;
-
/* */
diff --git a/include/freetype/fttrigon.h b/include/fttrigon.h
index 6b77d2e..9c7b543 100644
--- a/include/freetype/fttrigon.h
+++ b/include/fttrigon.h
@@ -4,7 +4,7 @@
/* */
/* FreeType trigonometric functions (specification). */
/* */
-/* Copyright 2001, 2003, 2005, 2007 by */
+/* Copyright 2001, 2003, 2005, 2007, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -46,7 +46,7 @@ FT_BEGIN_HEADER
*
* @description:
* This type is used to model angle values in FreeType. Note that the
- * angle is a 16.16 fixed float value expressed in degrees.
+ * angle is a 16.16 fixed-point value expressed in degrees.
*
*/
typedef FT_Fixed FT_Angle;
@@ -106,7 +106,7 @@ FT_BEGIN_HEADER
* FT_Sin
*
* @description:
- * Return the sinus of a given angle in fixed point format.
+ * Return the sinus of a given angle in fixed-point format.
*
* @input:
* angle ::
@@ -130,7 +130,7 @@ FT_BEGIN_HEADER
* FT_Cos
*
* @description:
- * Return the cosinus of a given angle in fixed point format.
+ * Return the cosinus of a given angle in fixed-point format.
*
* @input:
* angle ::
@@ -154,7 +154,7 @@ FT_BEGIN_HEADER
* FT_Tan
*
* @description:
- * Return the tangent of a given angle in fixed point format.
+ * Return the tangent of a given angle in fixed-point format.
*
* @input:
* angle ::
@@ -237,7 +237,7 @@ FT_BEGIN_HEADER
*
* @input:
* angle ::
- * The address of angle.
+ * The input angle.
*
*/
FT_EXPORT( void )
@@ -259,7 +259,7 @@ FT_BEGIN_HEADER
*
* @input:
* angle ::
- * The address of angle.
+ * The input angle.
*
*/
FT_EXPORT( void )
diff --git a/include/ftttdrv.h b/include/ftttdrv.h
new file mode 100644
index 0000000..3588413
--- /dev/null
+++ b/include/ftttdrv.h
@@ -0,0 +1,170 @@
+/***************************************************************************/
+/* */
+/* ftttdrv.h */
+/* */
+/* FreeType API for controlling the TrueType driver */
+/* (specification only). */
+/* */
+/* Copyright 2013 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __FTTTDRV_H__
+#define __FTTTDRV_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:
+ * tt_driver
+ *
+ * @title:
+ * The TrueType driver
+ *
+ * @abstract:
+ * Controlling the TrueType driver module.
+ *
+ * @description:
+ * While FreeType's TrueType driver doesn't expose API functions by
+ * itself, it is possible to control its behaviour with @FT_Property_Set
+ * and @FT_Property_Get. The following lists the available properties
+ * together with the necessary macros and structures.
+ *
+ * The TrueType driver's module name is `truetype'.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * interpreter-version
+ *
+ * @description:
+ * Currently, two versions are available, representing the bytecode
+ * interpreter with and without subpixel hinting support,
+ * respectively. The default is subpixel support if
+ * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel
+ * support otherwise (since it isn't available then).
+ *
+ * If subpixel hinting is on, many TrueType bytecode instructions
+ * behave differently compared to B/W or grayscale rendering. The
+ * main idea is to render at a much increased horizontal resolution,
+ * then sampling down the created output to subpixel precision.
+ * However, many older fonts are not suited to this and must be
+ * specially taken care of by applying (hardcoded) font-specific
+ * tweaks.
+ *
+ * Details on subpixel hinting and some of the necessary tweaks can be
+ * found in Greg Hitchcock's whitepaper at
+ * `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.
+ *
+ * The following example code demonstrates how to activate subpixel
+ * hinting (omitting the error handling).
+ *
+ * {
+ * FT_Library library;
+ * FT_Face face;
+ * FT_UInt interpreter_version = TT_INTERPRETER_VERSION_38;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "truetype",
+ * "interpreter-version",
+ * &interpreter_version );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * TT_INTERPRETER_VERSION_XXX
+ *
+ * @description:
+ * A list of constants used for the @interpreter-version property to
+ * select the hinting engine for Truetype fonts.
+ *
+ * The numeric value in the constant names represents the version
+ * number as returned by the `GETINFO' bytecode instruction.
+ *
+ * @values:
+ * TT_INTERPRETER_VERSION_35 ::
+ * Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in
+ * Windows~98; only grayscale and B/W rasterizing is supported.
+ *
+ * TT_INTERPRETER_VERSION_38 ::
+ * Version~38 corresponds to MS rasterizer v.1.9; it is roughly
+ * equivalent to the hinting provided by DirectWrite ClearType (as
+ * can be found, for example, in the Internet Explorer~9 running on
+ * Windows~7).
+ *
+ * @note:
+ * This property controls the behaviour of the bytecode interpreter
+ * and thus how outlines get hinted. It does *not* control how glyph
+ * get rasterized! In particular, it does not control subpixel color
+ * filtering.
+ *
+ * If FreeType has not been compiled with configuration option
+ * FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 causes an
+ * `FT_Err_Unimplemented_Feature' error.
+ *
+ * Depending on the graphics framework, Microsoft uses different
+ * bytecode engines. As a consequence, the version numbers returned by
+ * a call to the `GETINFO[1]' bytecode instruction are more convoluted
+ * than desired.
+ *
+ * {
+ * framework Windows version result of GETINFO[1]
+ * ----------------------------------------------------
+ * GDI before XP 35
+ * GDI XP and later 37
+ * GDI+ old before Vista 37
+ * GDI+ old Vista, 7 38
+ * GDI+ after 7 40
+ * DWrite before 8 39
+ * DWrite 8 and later 40
+ * }
+ *
+ * Since FreeType doesn't provide all capabilities of DWrite ClearType,
+ * using version~38 seems justified.
+ *
+ */
+#define TT_INTERPRETER_VERSION_35 35
+#define TT_INTERPRETER_VERSION_38 38
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __FTTTDRV_H__ */
+
+
+/* END */
diff --git a/include/freetype/fttypes.h b/include/fttypes.h
index 3255527..2c01e87 100644
--- a/include/freetype/fttypes.h
+++ b/include/fttypes.h
@@ -4,7 +4,7 @@
/* */
/* FreeType simple types definitions (specification only). */
/* */
-/* Copyright 1996-2002, 2004, 2006-2009, 2012 by */
+/* Copyright 1996-2002, 2004, 2006-2009, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -57,6 +57,8 @@ FT_BEGIN_HEADER
/* FT_UInt16 */
/* FT_Int32 */
/* FT_UInt32 */
+ /* FT_Int64 */
+ /* FT_UInt64 */
/* FT_Short */
/* FT_UShort */
/* FT_Long */
@@ -78,7 +80,9 @@ FT_BEGIN_HEADER
/* FT_F2Dot14 */
/* FT_UnitVector */
/* FT_F26Dot6 */
+ /* FT_Data */
/* */
+ /* FT_MAKE_TAG */
/* */
/* FT_Generic */
/* FT_Generic_Finalizer */
@@ -255,7 +259,7 @@ FT_BEGIN_HEADER
/* FT_F2Dot14 */
/* */
/* <Description> */
- /* A signed 2.14 fixed float type used for unit vectors. */
+ /* A signed 2.14 fixed-point type used for unit vectors. */
/* */
typedef signed short FT_F2Dot14;
@@ -266,7 +270,7 @@ FT_BEGIN_HEADER
/* FT_F26Dot6 */
/* */
/* <Description> */
- /* A signed 26.6 fixed float type used for vectorial pixel */
+ /* A signed 26.6 fixed-point type used for vectorial pixel */
/* coordinates. */
/* */
typedef signed long FT_F26Dot6;
@@ -278,7 +282,7 @@ FT_BEGIN_HEADER
/* FT_Fixed */
/* */
/* <Description> */
- /* This type is used to store 16.16 fixed float values, like scaling */
+ /* This type is used to store 16.16 fixed-point values, like scaling */
/* values or matrix coefficients. */
/* */
typedef signed long FT_Fixed;
@@ -362,7 +366,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A simple structure used to store a 2x2 matrix. Coefficients are */
- /* in 16.16 fixed float format. The computation performed is: */
+ /* in 16.16 fixed-point format. The computation performed is: */
/* */
/* { */
/* x' = x*xx + y*xy */
@@ -418,7 +422,7 @@ FT_BEGIN_HEADER
/* details of usage. */
/* */
/* <Input> */
- /* The address of the FreeType object which is under finalization. */
+ /* The address of the FreeType object that is under finalization. */
/* Its client data is accessed through its `generic' field. */
/* */
typedef void (*FT_Generic_Finalizer)(void* object);
@@ -466,8 +470,8 @@ FT_BEGIN_HEADER
/* FT_MAKE_TAG */
/* */
/* <Description> */
- /* This macro converts four-letter tags which are used to label */
- /* TrueType tables into an unsigned long to be used within FreeType. */
+ /* This macro converts four-letter tags that are used to label */
+ /* TrueType tables into an unsigned long, to be used within FreeType. */
/* */
/* <Note> */
/* The produced values *must* be 32-bit integers. Don't redefine */
@@ -567,18 +571,28 @@ FT_BEGIN_HEADER
} FT_ListRec;
-
/* */
+
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
+#define FT_BOOL( x ) ( (FT_Bool)( x ) )
- /* return base error code (without module-specific prefix) */
-#define FT_ERROR_BASE( x ) ( (x) & 0xFF )
+ /* concatenate C tokens */
+#define FT_ERR_XCAT( x, y ) x ## y
+#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
- /* return module error code */
+ /* see `ftmoderr.h' for descriptions of the following macros */
+
+#define FT_ERR( e ) FT_ERR_CAT( FT_ERR_PREFIX, e )
+
+#define FT_ERROR_BASE( x ) ( (x) & 0xFF )
#define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U )
-#define FT_BOOL( x ) ( (FT_Bool)( x ) )
+#define FT_ERR_EQ( x, e ) \
+ ( FT_ERROR_BASE( x ) == FT_ERROR_BASE( FT_ERR( e ) ) )
+#define FT_ERR_NEQ( x, e ) \
+ ( FT_ERROR_BASE( x ) != FT_ERROR_BASE( FT_ERR( e ) ) )
+
FT_END_HEADER
diff --git a/include/freetype/ftwinfnt.h b/include/ftwinfnt.h
index ea33353..5026158 100644
--- a/include/freetype/ftwinfnt.h
+++ b/include/ftwinfnt.h
@@ -58,9 +58,10 @@ FT_BEGIN_HEADER
* @description:
* A list of valid values for the `charset' byte in
* @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
- * encodings (except for cp1361) can be found at ftp://ftp.unicode.org
- * in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is
- * roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
+ * encodings (except for cp1361) can be found at
+ * ftp://ftp.unicode.org/public in the MAPPINGS/VENDORS/MICSFT/WINDOWS
+ * subdirectory. cp1361 is roughly a superset of
+ * MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
*
* @values:
* FT_WinFNT_ID_DEFAULT ::
@@ -258,9 +259,9 @@ FT_BEGIN_HEADER
FT_Get_WinFNT_Header( FT_Face face,
FT_WinFNT_HeaderRec *aheader );
-
/* */
+
FT_END_HEADER
#endif /* __FTWINFNT_H__ */
diff --git a/include/freetype/ftxf86.h b/include/ftxf86.h
index 8c68afd..89d1993 100644
--- a/include/freetype/ftxf86.h
+++ b/include/ftxf86.h
@@ -4,7 +4,7 @@
/* */
/* Support functions for X11. */
/* */
-/* Copyright 2002, 2003, 2004, 2006, 2007 by */
+/* Copyright 2002-2004, 2006, 2007, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -62,7 +62,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Return a string describing the format of a given face, using values */
- /* which can be used as an X11 FONT_PROPERTY. Possible values are */
+ /* that can be used as an X11 FONT_PROPERTY. Possible values are */
/* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */
/* `PFR', and `Windows~FNT'. */
/* */
@@ -76,7 +76,8 @@ FT_BEGIN_HEADER
FT_EXPORT( const char* )
FT_Get_X11_Font_Format( FT_Face face );
- /* */
+ /* */
+
FT_END_HEADER
diff --git a/include/freetype/internal/autohint.h b/include/internal/autohint.h
index 231bdd4..545de93 100644
--- a/include/freetype/internal/autohint.h
+++ b/include/internal/autohint.h
@@ -4,7 +4,7 @@
/* */
/* High-level `autohint' module-specific interface (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2007 by */
+/* Copyright 1996-2002, 2007, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -86,20 +86,20 @@ FT_BEGIN_HEADER
/* FT_AutoHinter_GlobalGetFunc */
/* */
/* <Description> */
- /* Retrieves the global hints computed for a given face object the */
+ /* Retrieve the global hints computed for a given face object. The */
/* resulting data is dissociated from the face and will survive a */
/* call to FT_Done_Face(). It must be discarded through the API */
/* FT_AutoHinter_GlobalDoneFunc(). */
/* */
/* <Input> */
- /* hinter :: A handle to the source auto-hinter. */
+ /* hinter :: A handle to the source auto-hinter. */
/* */
- /* face :: A handle to the source face object. */
+ /* face :: A handle to the source face object. */
/* */
/* <Output> */
- /* global_hints :: A typeless pointer to the global hints. */
+ /* global_hints :: A typeless pointer to the global hints. */
/* */
- /* global_len :: The size in bytes of the global hints. */
+ /* global_len :: The size in bytes of the global hints. */
/* */
typedef void
(*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter hinter,
@@ -114,7 +114,7 @@ FT_BEGIN_HEADER
/* FT_AutoHinter_GlobalDoneFunc */
/* */
/* <Description> */
- /* Discards the global hints retrieved through */
+ /* Discard the global hints retrieved through */
/* FT_AutoHinter_GlobalGetFunc(). This is the only way these hints */
/* are freed from memory. */
/* */
@@ -168,8 +168,8 @@ FT_BEGIN_HEADER
/* This function is capable of loading composite glyphs by hinting */
/* each sub-glyph independently (which improves quality). */
/* */
- /* It will call the font driver with FT_Load_Glyph(), with */
- /* FT_LOAD_NO_SCALE set. */
+ /* It will call the font driver with @FT_Load_Glyph, with */
+ /* @FT_LOAD_NO_SCALE set. */
/* */
typedef FT_Error
(*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter hinter,
@@ -182,43 +182,56 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
- /* FT_AutoHinter_ServiceRec */
+ /* FT_AutoHinter_InterfaceRec */
/* */
/* <Description> */
/* The auto-hinter module's interface. */
/* */
- typedef struct FT_AutoHinter_ServiceRec_
+ typedef struct FT_AutoHinter_InterfaceRec_
{
FT_AutoHinter_GlobalResetFunc reset_face;
FT_AutoHinter_GlobalGetFunc get_global_hints;
FT_AutoHinter_GlobalDoneFunc done_global_hints;
FT_AutoHinter_GlyphLoadFunc load_glyph;
- } FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service;
+ } FT_AutoHinter_InterfaceRec, *FT_AutoHinter_Interface;
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \
- done_global_hints_, load_glyph_) \
- FT_CALLBACK_TABLE_DEF \
- const FT_AutoHinter_ServiceRec class_ = \
- { \
- reset_face_, get_global_hints_, done_global_hints_, load_glyph_ \
+#define FT_DEFINE_AUTOHINTER_INTERFACE( \
+ class_, \
+ reset_face_, \
+ get_global_hints_, \
+ done_global_hints_, \
+ load_glyph_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_AutoHinter_InterfaceRec class_ = \
+ { \
+ reset_face_, \
+ get_global_hints_, \
+ done_global_hints_, \
+ load_glyph_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \
- done_global_hints_, load_glyph_) \
- void \
- FT_Init_Class_##class_( FT_Library library, \
- FT_AutoHinter_ServiceRec* clazz) \
- { \
- FT_UNUSED(library); \
- clazz->reset_face = reset_face_; \
- clazz->get_global_hints = get_global_hints_; \
- clazz->done_global_hints = done_global_hints_; \
- clazz->load_glyph = load_glyph_; \
+#define FT_DEFINE_AUTOHINTER_INTERFACE( \
+ class_, \
+ reset_face_, \
+ get_global_hints_, \
+ done_global_hints_, \
+ load_glyph_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ FT_AutoHinter_InterfaceRec* clazz ) \
+ { \
+ FT_UNUSED( library ); \
+ \
+ clazz->reset_face = reset_face_; \
+ clazz->get_global_hints = get_global_hints_; \
+ clazz->done_global_hints = done_global_hints_; \
+ clazz->load_glyph = load_glyph_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/include/freetype/internal/ftcalc.h b/include/internal/ftcalc.h
index f8b4324..14ec37b 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/internal/ftcalc.h
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */
+/* Copyright 1996-2006, 2008, 2009, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,56 +29,222 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* <Function> */
- /* FT_FixedSqrt */
- /* */
- /* <Description> */
- /* Computes the square root of a 16.16 fixed point value. */
- /* */
- /* <Input> */
- /* x :: The value to compute the root for. */
- /* */
- /* <Return> */
- /* The result of `sqrt(x)'. */
- /* */
- /* <Note> */
- /* This function is not very fast. */
+ /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */
/* */
- FT_BASE( FT_Int32 )
- FT_SqrtFixed( FT_Int32 x );
+ /*************************************************************************/
+#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
+ /* Provide assembler fragments for performance-critical functions. */
+ /* These must be defined `static __inline__' with GCC. */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Sqrt32 */
- /* */
- /* <Description> */
- /* Computes the square root of an Int32 integer (which will be */
- /* handled as an unsigned long value). */
- /* */
- /* <Input> */
- /* x :: The value to compute the root for. */
- /* */
- /* <Return> */
- /* The result of `sqrt(x)'. */
- /* */
- FT_EXPORT( FT_Int32 )
- FT_Sqrt32( FT_Int32 x );
+#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+ /* 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( __thumb2__ ) ) && \
+ !( 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) */
+#if defined( __clang__ ) && defined( __thumb2__ )
+ "add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
+#else
+ "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
+#endif
+ "adds %1, %1, %0\n\t" /* %1 += %0 */
+ "adc %2, %2, #0\n\t" /* %2 += carry */
+ "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
+ "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
+ : "=r"(a), "=&r"(t2), "=&r"(t)
+ : "r"(a), "r"(b)
+ : "cc" );
+ return a;
+ }
+
+#endif /* __arm__ && */
+ /* ( __thumb2__ || !__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 */
+
+
+#if defined( __GNUC__ ) && defined( __x86_64__ )
+
+#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64
+
+ static __inline__ FT_Int32
+ FT_MulFix_x86_64( FT_Int32 a,
+ FT_Int32 b )
+ {
+ /* Temporarily disable the warning that C90 doesn't support */
+ /* `long long'. */
+#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
+#endif
+
+#if 1
+ /* Technically not an assembly fragment, but GCC does a really good */
+ /* job at inlining it and generating good machine code for it. */
+ long long ret, tmp;
- /*************************************************************************/
- /* */
- /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */
- /* */
- /*************************************************************************/
+ ret = (long long)a * b;
+ tmp = ret >> 63;
+ ret += 0x8000 + tmp;
+
+ return (FT_Int32)( ret >> 16 );
+#else
+
+ /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */
+ /* code from the lines below. The main issue is that `wide_a' is not */
+ /* properly initialized by sign-extending `a'. Instead, the generated */
+ /* machine code assumes that the register that contains `a' on input */
+ /* can be used directly as a 64-bit value, which is wrong most of the */
+ /* time. */
+ long long wide_a = (long long)a;
+ long long wide_b = (long long)b;
+ long long result;
+
+
+ __asm__ __volatile__ (
+ "imul %2, %1\n"
+ "mov %1, %0\n"
+ "sar $63, %0\n"
+ "lea 0x8000(%1, %0), %0\n"
+ "sar $16, %0\n"
+ : "=&r"(result), "=&r"(wide_a)
+ : "r"(wide_b)
+ : "cc" );
+
+ return (FT_Int32)result;
+#endif
+
+#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
+#pragma GCC diagnostic pop
+#endif
+ }
+
+#endif /* __GNUC__ && __x86_64__ */
+
+#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
+
+
+#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
+#ifdef FT_MULFIX_ASSEMBLER
+#define FT_MulFix( a, b ) FT_MULFIX_ASSEMBLER( (FT_Int32)(a), (FT_Int32)(b) )
+#endif
+#endif
-#ifdef TT_USE_BYTECODE_INTERPRETER
/*************************************************************************/
/* */
@@ -87,7 +253,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A very simple function used to perform the computation `(a*b)/c' */
- /* (without rounding) with maximal accuracy (it uses a 64-bit */
+ /* (without rounding) with maximum accuracy (it uses a 64-bit */
/* intermediate integer whenever necessary). */
/* */
/* This function isn't necessarily as fast as some processor specific */
@@ -108,8 +274,6 @@ FT_BEGIN_HEADER
FT_Long b,
FT_Long c );
-#endif /* TT_USE_BYTECODE_INTERPRETER */
-
/*
* A variant of FT_Matrix_Multiply which scales its result afterwards.
@@ -129,7 +293,6 @@ FT_BEGIN_HEADER
* A variant of FT_Vector_Transform. See comments for
* FT_Matrix_Multiply_Scaled.
*/
-
FT_BASE( void )
FT_Vector_Transform_Scaled( FT_Vector* vector,
const FT_Matrix* matrix,
@@ -148,10 +311,11 @@ FT_BEGIN_HEADER
FT_Pos out_x,
FT_Pos out_y );
+
/*
* Return TRUE if a corner is flat or nearly flat. This is equivalent to
- * saying that the angle difference between the `in' and `out' vectors is
- * very small.
+ * saying that the corner point is close to its neighbors, or inside an
+ * ellipse defined by the neighbor focal points to be more precise.
*/
FT_BASE( FT_Int )
ft_corner_is_flat( FT_Pos in_x,
@@ -160,6 +324,69 @@ FT_BEGIN_HEADER
FT_Pos out_y );
+ /*
+ * Return the most significant bit index.
+ */
+
+#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
+#if defined( __GNUC__ ) && \
+ ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ) )
+
+#if FT_SIZEOF_INT == 4
+
+#define FT_MSB( x ) ( 31 - __builtin_clz( x ) )
+
+#elif FT_SIZEOF_LONG == 4
+
+#define FT_MSB( x ) ( 31 - __builtin_clzl( x ) )
+
+#endif
+
+#endif /* __GNUC__ */
+#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
+
+#ifndef FT_MSB
+
+ FT_BASE( FT_Int )
+ FT_MSB( FT_UInt32 z );
+
+#endif
+
+
+ /*
+ * Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses
+ * two fixed-point arguments instead.
+ */
+ FT_BASE( FT_Fixed )
+ FT_Hypot( FT_Fixed x,
+ FT_Fixed y );
+
+
+#if 0
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_SqrtFixed */
+ /* */
+ /* <Description> */
+ /* Computes the square root of a 16.16 fixed-point value. */
+ /* */
+ /* <Input> */
+ /* x :: The value to compute the root for. */
+ /* */
+ /* <Return> */
+ /* The result of `sqrt(x)'. */
+ /* */
+ /* <Note> */
+ /* This function is not very fast. */
+ /* */
+ FT_BASE( FT_Int32 )
+ FT_SqrtFixed( FT_Int32 x );
+
+#endif /* 0 */
+
+
#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 )
#define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 )
#define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 )
diff --git a/include/freetype/internal/ftdebug.h b/include/internal/ftdebug.h
index 7baae35..58a3916 100644
--- a/include/freetype/internal/ftdebug.h
+++ b/include/internal/ftdebug.h
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2002, 2004, 2006-2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -185,7 +185,8 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* Define the FT_ASSERT macro. */
+ /* Define the FT_ASSERT and FT_THROW macros. The call to `FT_Throw' */
+ /* makes it possible to easily set a breakpoint at this function. */
/* */
/*************************************************************************/
@@ -199,10 +200,18 @@ FT_BEGIN_HEADER
__LINE__, __FILE__ ); \
} while ( 0 )
+#define FT_THROW( e ) \
+ ( FT_Throw( FT_ERR_CAT( FT_ERR_PREFIX, e ), \
+ __LINE__, \
+ __FILE__ ) | \
+ FT_ERR_CAT( FT_ERR_PREFIX, e ) )
+
#else /* !FT_DEBUG_LEVEL_ERROR */
#define FT_ASSERT( condition ) do { } while ( 0 )
+#define FT_THROW( e ) FT_ERR_CAT( FT_ERR_PREFIX, e )
+
#endif /* !FT_DEBUG_LEVEL_ERROR */
@@ -226,22 +235,18 @@ FT_BEGIN_HEADER
FT_Panic( const char* fmt,
... );
+ /* report file name and line number of an error */
+ FT_BASE( int )
+ FT_Throw( FT_Error error,
+ int line,
+ const char* file );
+
#endif /* FT_DEBUG_LEVEL_ERROR */
FT_BASE( void )
ft_debug_init( void );
-
-#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
-
- /* We disable the warning `conditional expression is constant' here */
- /* in order to compile cleanly with the maximum level of warnings. */
-#pragma warning( disable : 4127 )
-
-#endif /* _MSC_VER */
-
-
FT_END_HEADER
#endif /* __FTDEBUG_H__ */
diff --git a/include/freetype/internal/ftdriver.h b/include/internal/ftdriver.h
index 6f6b206..940218e 100644
--- a/include/freetype/internal/ftdriver.h
+++ b/include/internal/ftdriver.h
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver interface (specification). */
/* */
-/* Copyright 1996-2003, 2006, 2008, 2011 by */
+/* Copyright 1996-2003, 2006, 2008, 2011-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -60,22 +60,6 @@ FT_BEGIN_HEADER
(*FT_Size_SelectFunc)( FT_Size size,
FT_ULong size_index );
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- typedef FT_Error
- (*FT_Size_ResetPointsFunc)( FT_Size size,
- FT_F26Dot6 char_width,
- FT_F26Dot6 char_height,
- FT_UInt horz_resolution,
- FT_UInt vert_resolution );
-
- typedef FT_Error
- (*FT_Size_ResetPixelsFunc)( FT_Size size,
- FT_UInt pixel_width,
- FT_UInt pixel_height );
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
typedef FT_Error
(*FT_Slot_LoadFunc)( FT_GlyphSlot slot,
FT_Size size,
@@ -181,72 +165,42 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Driver_ClassRec_
{
- FT_Module_Class root;
-
- FT_Long face_object_size;
- FT_Long size_object_size;
- FT_Long slot_object_size;
-
- FT_Face_InitFunc init_face;
- FT_Face_DoneFunc done_face;
+ FT_Module_Class root;
- FT_Size_InitFunc init_size;
- FT_Size_DoneFunc done_size;
+ FT_Long face_object_size;
+ FT_Long size_object_size;
+ FT_Long slot_object_size;
- FT_Slot_InitFunc init_slot;
- FT_Slot_DoneFunc done_slot;
+ FT_Face_InitFunc init_face;
+ FT_Face_DoneFunc done_face;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_Size_InitFunc init_size;
+ FT_Size_DoneFunc done_size;
- FT_Size_ResetPointsFunc set_char_sizes;
- FT_Size_ResetPixelsFunc set_pixel_sizes;
+ FT_Slot_InitFunc init_slot;
+ FT_Slot_DoneFunc done_slot;
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+ FT_Slot_LoadFunc load_glyph;
- FT_Slot_LoadFunc load_glyph;
-
- FT_Face_GetKerningFunc get_kerning;
- FT_Face_AttachFunc attach_file;
- FT_Face_GetAdvancesFunc get_advances;
+ FT_Face_GetKerningFunc get_kerning;
+ FT_Face_AttachFunc attach_file;
+ FT_Face_GetAdvancesFunc get_advances;
/* since version 2.2 */
- FT_Size_RequestFunc request_size;
- FT_Size_SelectFunc select_size;
+ FT_Size_RequestFunc request_size;
+ FT_Size_SelectFunc select_size;
} FT_Driver_ClassRec, *FT_Driver_Class;
- /*
- * The following functions are used as stubs for `set_char_sizes' and
- * `set_pixel_sizes'; the code uses `request_size' and `select_size'
- * functions instead.
- *
- * Implementation is in `src/base/ftobjs.c'.
- */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- FT_BASE( FT_Error )
- ft_stub_set_char_sizes( FT_Size size,
- FT_F26Dot6 width,
- FT_F26Dot6 height,
- FT_UInt horz_res,
- FT_UInt vert_res );
-
- FT_BASE( FT_Error )
- ft_stub_set_pixel_sizes( FT_Size size,
- FT_UInt width,
- FT_UInt height );
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
/*************************************************************************/
/* */
/* <Macro> */
/* FT_DECLARE_DRIVER */
/* */
/* <Description> */
- /* Used to create a forward declaration of a */
- /* FT_Driver_ClassRec stract instance. */
+ /* Used to create a forward declaration of an FT_Driver_ClassRec */
+ /* struct instance. */
/* */
/* <Macro> */
/* FT_DEFINE_DRIVER */
@@ -254,160 +208,194 @@ FT_BEGIN_HEADER
/* <Description> */
/* Used to initialize an instance of FT_Driver_ClassRec struct. */
/* */
- /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */
- /* to called with a pointer where the allocated stracture is returned.*/
- /* And when it is no longer needed a Destroy function needs */
- /* to be called to release that allocation. */
- /* fcinit.c (ft_create_default_module_classes) already contains */
- /* a mechanism to call these functions for the default modules */
- /* described in ftmodule.h */
+ /* When FT_CONFIG_OPTION_PIC is defined a `create' function has to be */
+ /* called with a pointer where the allocated structure is returned. */
+ /* And when it is no longer needed a `destroy' function needs to be */
+ /* called to release that allocation. */
+ /* */
+ /* `fcinit.c' (ft_create_default_module_classes) already contains a */
+ /* mechanism to call these functions for the default modules */
+ /* described in `ftmodule.h'. */
/* */
- /* Notice that the created Create and Destroy functions call */
- /* pic_init and pic_free function to allow you to manually allocate */
- /* and initialize any additional global data, like module specific */
+ /* Notice that the created `create' and `destroy' functions call */
+ /* `pic_init' and `pic_free' to allow you to manually allocate and */
+ /* initialize any additional global data, like a module specific */
/* interface, and put them in the global pic container defined in */
- /* ftpic.h. if you don't need them just implement the functions as */
- /* empty to resolve the link error. Also the pic_init and pic_free */
- /* functions should be declared in pic.h, to be referred by driver */
- /* definition calling FT_DEFINE_DRIVER() in following. */
+ /* `ftpic.h'. If you don't need them just implement the functions as */
+ /* empty to resolve the link error. Also the `pic_init' and */
+ /* `pic_free' functions should be declared in `pic.h', to be referred */
+ /* by driver definition calling `FT_DEFINE_DRIVER' in following. */
/* */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
- /* allocated in the global scope (or the scope where the macro */
- /* is used). */
+ /* allocated in the global scope (or the scope where the macro is */
+ /* used). */
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \
- a_, b_,
-#else
- #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_)
-#endif
-
-#define FT_DECLARE_DRIVER(class_) \
+#define FT_DECLARE_DRIVER( class_ ) \
FT_CALLBACK_TABLE \
const FT_Driver_ClassRec class_;
-#define FT_DEFINE_DRIVER(class_, \
- flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_, \
- face_object_size_, size_object_size_, \
- slot_object_size_, init_face_, done_face_, \
- init_size_, done_size_, init_slot_, done_slot_, \
- old_set_char_sizes_, old_set_pixel_sizes_, \
- load_glyph_, get_kerning_, attach_file_, \
- get_advances_, request_size_, select_size_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Driver_ClassRec class_ = \
- { \
- FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_, \
- init_,done_,get_interface_) \
- \
- face_object_size_, \
- size_object_size_, \
- slot_object_size_, \
- \
- init_face_, \
- done_face_, \
- \
- init_size_, \
- done_size_, \
- \
- init_slot_, \
- done_slot_, \
- \
- FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \
- \
- load_glyph_, \
- \
- get_kerning_, \
- attach_file_, \
- get_advances_, \
- \
- request_size_, \
- select_size_ \
+#define FT_DEFINE_DRIVER( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_, \
+ face_object_size_, \
+ size_object_size_, \
+ slot_object_size_, \
+ init_face_, \
+ done_face_, \
+ init_size_, \
+ done_size_, \
+ init_slot_, \
+ done_slot_, \
+ load_glyph_, \
+ get_kerning_, \
+ attach_file_, \
+ get_advances_, \
+ request_size_, \
+ select_size_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_Driver_ClassRec class_ = \
+ { \
+ FT_DEFINE_ROOT_MODULE( flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ \
+ face_object_size_, \
+ size_object_size_, \
+ slot_object_size_, \
+ \
+ init_face_, \
+ done_face_, \
+ \
+ init_size_, \
+ done_size_, \
+ \
+ init_slot_, \
+ done_slot_, \
+ \
+ load_glyph_, \
+ \
+ get_kerning_, \
+ attach_file_, \
+ get_advances_, \
+ \
+ request_size_, \
+ select_size_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \
- clazz->set_char_sizes = a_; \
- clazz->set_pixel_sizes = b_;
-#else
- #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_)
-#endif
-
-#define FT_DECLARE_DRIVER(class_) FT_DECLARE_MODULE(class_)
-
-#define FT_DEFINE_DRIVER(class_, \
- flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_, \
- face_object_size_, size_object_size_, \
- slot_object_size_, init_face_, done_face_, \
- init_size_, done_size_, init_slot_, done_slot_, \
- old_set_char_sizes_, old_set_pixel_sizes_, \
- load_glyph_, get_kerning_, attach_file_, \
- get_advances_, request_size_, select_size_ ) \
- \
- void \
- FT_Destroy_Class_##class_( FT_Library library, \
- FT_Module_Class* clazz ) \
- { \
- FT_Memory memory = library->memory; \
- FT_Driver_Class dclazz = (FT_Driver_Class)clazz; \
- class_##_pic_free( library ); \
- if ( dclazz ) \
- FT_FREE( dclazz ); \
- } \
- \
- FT_Error \
- FT_Create_Class_##class_( FT_Library library, \
- FT_Module_Class** output_class ) \
- { \
- FT_Driver_Class clazz; \
- FT_Error error; \
- FT_Memory memory = library->memory; \
- \
- if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \
- return error; \
- \
- error = class_##_pic_init( library ); \
- if(error) \
- { \
- FT_FREE( clazz ); \
- return error; \
- } \
- \
- FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_, \
- init_,done_,get_interface_) \
- \
- clazz->face_object_size = face_object_size_; \
- clazz->size_object_size = size_object_size_; \
- clazz->slot_object_size = slot_object_size_; \
- \
- clazz->init_face = init_face_; \
- clazz->done_face = done_face_; \
- \
- clazz->init_size = init_size_; \
- clazz->done_size = done_size_; \
- \
- clazz->init_slot = init_slot_; \
- clazz->done_slot = done_slot_; \
- \
- FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \
- \
- clazz->load_glyph = load_glyph_; \
- \
- clazz->get_kerning = get_kerning_; \
- clazz->attach_file = attach_file_; \
- clazz->get_advances = get_advances_; \
- \
- clazz->request_size = request_size_; \
- clazz->select_size = select_size_; \
- \
- *output_class = (FT_Module_Class*)clazz; \
- return FT_Err_Ok; \
+#define FT_DECLARE_DRIVER( class_ ) FT_DECLARE_MODULE( class_ )
+
+#define FT_DEFINE_DRIVER( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_, \
+ face_object_size_, \
+ size_object_size_, \
+ slot_object_size_, \
+ init_face_, \
+ done_face_, \
+ init_size_, \
+ done_size_, \
+ init_slot_, \
+ done_slot_, \
+ load_glyph_, \
+ get_kerning_, \
+ attach_file_, \
+ get_advances_, \
+ request_size_, \
+ select_size_ ) \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_Module_Class* clazz ) \
+ { \
+ FT_Memory memory = library->memory; \
+ FT_Driver_Class dclazz = (FT_Driver_Class)clazz; \
+ \
+ \
+ class_ ## _pic_free( library ); \
+ if ( dclazz ) \
+ FT_FREE( dclazz ); \
+ } \
+ \
+ \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_Module_Class** output_class ) \
+ { \
+ FT_Driver_Class clazz = NULL; \
+ FT_Error error; \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
+ return error; \
+ \
+ error = class_ ## _pic_init( library ); \
+ if ( error ) \
+ { \
+ FT_FREE( clazz ); \
+ return error; \
+ } \
+ \
+ FT_DEFINE_ROOT_MODULE( flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ \
+ clazz->face_object_size = face_object_size_; \
+ clazz->size_object_size = size_object_size_; \
+ clazz->slot_object_size = slot_object_size_; \
+ \
+ clazz->init_face = init_face_; \
+ clazz->done_face = done_face_; \
+ \
+ clazz->init_size = init_size_; \
+ clazz->done_size = done_size_; \
+ \
+ clazz->init_slot = init_slot_; \
+ clazz->done_slot = done_slot_; \
+ \
+ clazz->load_glyph = load_glyph_; \
+ \
+ clazz->get_kerning = get_kerning_; \
+ clazz->attach_file = attach_file_; \
+ clazz->get_advances = get_advances_; \
+ \
+ clazz->request_size = request_size_; \
+ clazz->select_size = select_size_; \
+ \
+ *output_class = (FT_Module_Class*)clazz; \
+ \
+ return FT_Err_Ok; \
}
diff --git a/include/freetype/internal/ftgloadr.h b/include/internal/ftgloadr.h
index ce4dc6c..f70774f 100644
--- a/include/freetype/internal/ftgloadr.h
+++ b/include/internal/ftgloadr.h
@@ -121,20 +121,22 @@ FT_BEGIN_HEADER
FT_UInt n_contours );
-#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \
- ( (_count) == 0 || ((_loader)->base.outline.n_points + \
- (_loader)->current.outline.n_points + \
- (unsigned long)(_count)) <= (_loader)->max_points )
-
-#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \
- ( (_count) == 0 || ((_loader)->base.outline.n_contours + \
- (_loader)->current.outline.n_contours + \
- (unsigned long)(_count)) <= (_loader)->max_contours )
-
-#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points,_contours ) \
- ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \
- FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \
- ? 0 \
+#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \
+ ( (_count) == 0 || \
+ ( (_loader)->base.outline.n_points + \
+ (_loader)->current.outline.n_points + \
+ (unsigned long)(_count) ) <= (_loader)->max_points )
+
+#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \
+ ( (_count) == 0 || \
+ ( (_loader)->base.outline.n_contours + \
+ (_loader)->current.outline.n_contours + \
+ (unsigned long)(_count)) <= (_loader)->max_contours )
+
+#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \
+ ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \
+ FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \
+ ? 0 \
: FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) )
diff --git a/include/freetype/internal/ftmemory.h b/include/internal/ftmemory.h
index 026aa63..3d51aee 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/include/internal/ftmemory.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2010 by */
+/* Copyright 1996-2002, 2004-2007, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -141,8 +141,10 @@ FT_BEGIN_HEADER
const void* P );
-#define FT_MEM_ALLOC( ptr, size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, (size), &error ) )
+#define FT_MEM_ALLOC( ptr, size ) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, \
+ (FT_Long)(size), \
+ &error ) )
#define FT_MEM_FREE( ptr ) \
FT_BEGIN_STMNT \
@@ -154,45 +156,60 @@ FT_BEGIN_HEADER
FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) )
#define FT_MEM_REALLOC( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, 1, \
- (cursz), (newsz), \
- (ptr), &error ) )
-
-#define FT_MEM_QALLOC( ptr, size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qalloc( memory, (size), &error ) )
+ FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
+ 1, \
+ (FT_Long)(cursz), \
+ (FT_Long)(newsz), \
+ (ptr), \
+ &error ) )
+
+#define FT_MEM_QALLOC( ptr, size ) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_qalloc( memory, \
+ (FT_Long)(size), \
+ &error ) )
#define FT_MEM_QNEW( ptr ) \
FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) )
-#define FT_MEM_QREALLOC( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, 1, \
- (cursz), (newsz), \
- (ptr), &error ) )
-
-#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \
- (cursz), (newsz), \
- (ptr), &error ) )
-
-#define FT_MEM_ALLOC_MULT( ptr, count, item_size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, (item_size), \
- 0, (count), \
- NULL, &error ) )
-
-#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, (itmsz), \
- (oldcnt), (newcnt), \
- (ptr), &error ) )
-
-#define FT_MEM_QALLOC_MULT( ptr, count, item_size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, (item_size), \
- 0, (count), \
- NULL, &error ) )
-
-#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, (itmsz), \
- (oldcnt), (newcnt), \
- (ptr), &error ) )
+#define FT_MEM_QREALLOC( ptr, cursz, newsz ) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
+ 1, \
+ (FT_Long)(cursz), \
+ (FT_Long)(newsz), \
+ (ptr), \
+ &error ) )
+
+#define FT_MEM_ALLOC_MULT( ptr, count, item_size ) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
+ (FT_Long)(item_size), \
+ 0, \
+ (FT_Long)(count), \
+ NULL, \
+ &error ) )
+
+#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
+ (FT_Long)(itmsz), \
+ (FT_Long)(oldcnt), \
+ (FT_Long)(newcnt), \
+ (ptr), \
+ &error ) )
+
+#define FT_MEM_QALLOC_MULT( ptr, count, item_size ) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
+ (FT_Long)(item_size), \
+ 0, \
+ (FT_Long)(count), \
+ NULL, \
+ &error ) )
+
+#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
+ (FT_Long)(itmsz), \
+ (FT_Long)(oldcnt), \
+ (FT_Long)(newcnt), \
+ (ptr), \
+ &error ) )
#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 )
@@ -236,26 +253,37 @@ FT_BEGIN_HEADER
/* _typed_ in order to automatically compute array element sizes. */
/* */
-#define FT_MEM_NEW_ARRAY( ptr, count ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \
- 0, (count), \
- NULL, &error ) )
-
-#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \
- (cursz), (newsz), \
- (ptr), &error ) )
-
-#define FT_MEM_QNEW_ARRAY( ptr, count ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \
- 0, (count), \
- NULL, &error ) )
-
-#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \
- (cursz), (newsz), \
- (ptr), &error ) )
-
+#define FT_MEM_NEW_ARRAY( ptr, count ) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
+ sizeof ( *(ptr) ), \
+ 0, \
+ (FT_Long)(count), \
+ NULL, \
+ &error ) )
+
+#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
+ sizeof ( *(ptr) ), \
+ (FT_Long)(cursz), \
+ (FT_Long)(newsz), \
+ (ptr), \
+ &error ) )
+
+#define FT_MEM_QNEW_ARRAY( ptr, count ) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
+ sizeof ( *(ptr) ), \
+ 0, \
+ (FT_Long)(count), \
+ NULL, \
+ &error ) )
+
+#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \
+ FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
+ sizeof ( *(ptr) ), \
+ (FT_Long)(cursz), \
+ (FT_Long)(newsz), \
+ (ptr), \
+ &error ) )
#define FT_ALLOC( ptr, size ) \
FT_MEM_SET_ERROR( FT_MEM_ALLOC( ptr, size ) )
@@ -303,37 +331,6 @@ FT_BEGIN_HEADER
FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- FT_BASE( FT_Error )
- FT_Alloc( FT_Memory memory,
- FT_Long size,
- void* *P );
-
- FT_BASE( FT_Error )
- FT_QAlloc( FT_Memory memory,
- FT_Long size,
- void* *p );
-
- FT_BASE( FT_Error )
- FT_Realloc( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* *P );
-
- FT_BASE( FT_Error )
- FT_QRealloc( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* *p );
-
- FT_BASE( void )
- FT_Free( FT_Memory memory,
- void* *P );
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
FT_BASE( FT_Pointer )
ft_mem_strdup( FT_Memory memory,
const char* str,
@@ -345,6 +342,7 @@ FT_BEGIN_HEADER
FT_ULong size,
FT_Error *p_error );
+
#define FT_MEM_STRDUP( dst, str ) \
(dst) = (char*)ft_mem_strdup( memory, (const char*)(str), &error )
diff --git a/include/freetype/internal/ftobjs.h b/include/internal/ftobjs.h
index fc18275..b45a5ed 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/internal/ftobjs.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (specification). */
/* */
-/* Copyright 1996-2006, 2008, 2010, 2012 by */
+/* Copyright 1996-2006, 2008, 2010, 2012-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -72,6 +72,16 @@ FT_BEGIN_HEADER
#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) )
+ /*
+ * Approximate sqrt(x*x+y*y) using the `alpha max plus beta min'
+ * algorithm. We use alpha = 1, beta = 3/8, giving us results with a
+ * largest error less than 7% compared to the exact value.
+ */
+#define FT_HYPOT( x, y ) \
+ ( x = FT_ABS( x ), \
+ y = FT_ABS( y ), \
+ x > y ? x + ( 3 * y >> 3 ) \
+ : y + ( 3 * x >> 3 ) )
#define FT_PAD_FLOOR( x, n ) ( (x) & ~((n)-1) )
#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n )
@@ -83,14 +93,6 @@ FT_BEGIN_HEADER
/*
- * Return the highest power of 2 that is <= value; this correspond to
- * the highest bit in a given 32-bit value.
- */
- FT_BASE( FT_UInt32 )
- ft_highpow2( FT_UInt32 value );
-
-
- /*
* character classification functions -- since these are used to parse
* font files, we must not use those in <ctypes.h> which are
* locale-dependent
@@ -206,46 +208,79 @@ FT_BEGIN_HEADER
} FT_CMap_ClassRec;
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DECLARE_CMAP_CLASS(class_) \
- FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
-
-#define FT_DEFINE_CMAP_CLASS(class_, size_, init_, done_, char_index_, \
- char_next_, char_var_index_, char_var_default_, variant_list_, \
- charvariant_list_, variantchar_list_) \
- FT_CALLBACK_TABLE_DEF \
- const FT_CMap_ClassRec class_ = \
- { \
- size_, init_, done_, char_index_, char_next_, char_var_index_, \
- char_var_default_, variant_list_, charvariant_list_, variantchar_list_ \
+#define FT_DECLARE_CMAP_CLASS( class_ ) \
+ FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
+
+#define FT_DEFINE_CMAP_CLASS( \
+ class_, \
+ size_, \
+ init_, \
+ done_, \
+ char_index_, \
+ char_next_, \
+ char_var_index_, \
+ char_var_default_, \
+ variant_list_, \
+ charvariant_list_, \
+ variantchar_list_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_CMap_ClassRec class_ = \
+ { \
+ size_, \
+ init_, \
+ done_, \
+ char_index_, \
+ char_next_, \
+ char_var_index_, \
+ char_var_default_, \
+ variant_list_, \
+ charvariant_list_, \
+ variantchar_list_ \
};
+
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DECLARE_CMAP_CLASS(class_) \
- void FT_Init_Class_##class_( FT_Library library, FT_CMap_ClassRec* clazz);
-
-#define FT_DEFINE_CMAP_CLASS(class_, size_, init_, done_, char_index_, \
- char_next_, char_var_index_, char_var_default_, variant_list_, \
- charvariant_list_, variantchar_list_) \
- void \
- FT_Init_Class_##class_( FT_Library library, \
- FT_CMap_ClassRec* clazz) \
- { \
- FT_UNUSED(library); \
- clazz->size = size_; \
- clazz->init = init_; \
- clazz->done = done_; \
- clazz->char_index = char_index_; \
- clazz->char_next = char_next_; \
- clazz->char_var_index = char_var_index_; \
- clazz->char_var_default = char_var_default_; \
- clazz->variant_list = variant_list_; \
- clazz->charvariant_list = charvariant_list_; \
- clazz->variantchar_list = variantchar_list_; \
+#define FT_DECLARE_CMAP_CLASS( class_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ FT_CMap_ClassRec* clazz );
+
+#define FT_DEFINE_CMAP_CLASS( \
+ class_, \
+ size_, \
+ init_, \
+ done_, \
+ char_index_, \
+ char_next_, \
+ char_var_index_, \
+ char_var_default_, \
+ variant_list_, \
+ charvariant_list_, \
+ variantchar_list_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ FT_CMap_ClassRec* clazz ) \
+ { \
+ FT_UNUSED( library ); \
+ \
+ clazz->size = size_; \
+ clazz->init = init_; \
+ clazz->done = done_; \
+ clazz->char_index = char_index_; \
+ clazz->char_next = char_next_; \
+ clazz->char_var_index = char_var_index_; \
+ clazz->char_var_default = char_var_default_; \
+ clazz->variant_list = variant_list_; \
+ clazz->charvariant_list = charvariant_list_; \
+ clazz->variantchar_list = variantchar_list_; \
}
+
#endif /* FT_CONFIG_OPTION_PIC */
+
/* create a new charmap and add it to charmap->face */
FT_BASE( FT_Error )
FT_CMap_New( FT_CMap_Class clazz,
@@ -270,13 +305,13 @@ FT_BEGIN_HEADER
/* */
/* <Fields> */
/* max_points :: */
- /* The maximal number of points used to store the vectorial outline */
+ /* The maximum number of points used to store the vectorial outline */
/* of any glyph in this face. If this value cannot be known in */
/* advance, or if the face isn't scalable, this should be set to 0. */
/* Only relevant for scalable formats. */
/* */
/* max_contours :: */
- /* The maximal number of contours used to store the vectorial */
+ /* The maximum number of contours used to store the vectorial */
/* outline of any glyph in this face. If this value cannot be */
/* known in advance, or if the face isn't scalable, this should be */
/* set to 0. Only relevant for scalable formats. */
@@ -319,10 +354,6 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Face_InternalRec_
{
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- FT_UShort reserved1;
- FT_Short reserved2;
-#endif
FT_Matrix transform_matrix;
FT_Vector transform_delta;
FT_Int transform_flags;
@@ -334,7 +365,7 @@ FT_BEGIN_HEADER
#endif
FT_Bool ignore_unpatented_hinter;
- FT_UInt refcount;
+ FT_Int refcount;
} FT_Face_InternalRec;
@@ -411,6 +442,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
+ /*************************************************************************/
/**** ****/
/**** ****/
/**** M O D U L E S ****/
@@ -503,7 +535,7 @@ FT_BEGIN_HEADER
ft_module_get_service( FT_Module module,
const char* service_id );
- /* */
+ /* */
/*************************************************************************/
@@ -511,7 +543,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/**** ****/
/**** ****/
- /**** FACE, SIZE & GLYPH SLOT OBJECTS ****/
+ /**** F A C E, S I Z E & G L Y P H S L O T O B J E C T S ****/
/**** ****/
/**** ****/
/*************************************************************************/
@@ -853,7 +885,7 @@ FT_BEGIN_HEADER
FT_PIC_Container pic_container;
#endif
- FT_UInt refcount;
+ FT_Int refcount;
} FT_LibraryRec;
@@ -926,12 +958,13 @@ FT_BEGIN_HEADER
FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster;
#endif
+
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/**** ****/
/**** ****/
- /**** PIC-Support Macros for ftimage.h ****/
+ /**** P I C S U P P O R T ****/
/**** ****/
/**** ****/
/*************************************************************************/
@@ -939,6 +972,9 @@ FT_BEGIN_HEADER
/*************************************************************************/
+ /* PIC support macros for ftimage.h */
+
+
/*************************************************************************/
/* */
/* <Macro> */
@@ -947,38 +983,57 @@ FT_BEGIN_HEADER
/* <Description> */
/* Used to initialize an instance of FT_Outline_Funcs struct. */
/* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */
- /* called with a pre-allocated stracture to be filled. */
+ /* be called with a pre-allocated structure to be filled. */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro */
/* is used). */
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \
- cubic_to_, shift_, delta_) \
- static const FT_Outline_Funcs class_ = \
- { \
- move_to_, line_to_, conic_to_, cubic_to_, shift_, delta_ \
+#define FT_DEFINE_OUTLINE_FUNCS( \
+ class_, \
+ move_to_, \
+ line_to_, \
+ conic_to_, \
+ cubic_to_, \
+ shift_, \
+ delta_ ) \
+ static const FT_Outline_Funcs class_ = \
+ { \
+ move_to_, \
+ line_to_, \
+ conic_to_, \
+ cubic_to_, \
+ shift_, \
+ delta_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \
- cubic_to_, shift_, delta_) \
- static FT_Error \
- Init_Class_##class_( FT_Outline_Funcs* clazz ) \
- { \
- clazz->move_to = move_to_; \
- clazz->line_to = line_to_; \
- clazz->conic_to = conic_to_; \
- clazz->cubic_to = cubic_to_; \
- clazz->shift = shift_; \
- clazz->delta = delta_; \
- return FT_Err_Ok; \
+#define FT_DEFINE_OUTLINE_FUNCS( \
+ class_, \
+ move_to_, \
+ line_to_, \
+ conic_to_, \
+ cubic_to_, \
+ shift_, \
+ delta_ ) \
+ static FT_Error \
+ Init_Class_ ## class_( FT_Outline_Funcs* clazz ) \
+ { \
+ clazz->move_to = move_to_; \
+ clazz->line_to = line_to_; \
+ clazz->conic_to = conic_to_; \
+ clazz->cubic_to = cubic_to_; \
+ clazz->shift = shift_; \
+ clazz->delta = delta_; \
+ \
+ return FT_Err_Ok; \
}
#endif /* FT_CONFIG_OPTION_PIC */
+
/*************************************************************************/
/* */
/* <Macro> */
@@ -987,51 +1042,56 @@ FT_BEGIN_HEADER
/* <Description> */
/* Used to initialize an instance of FT_Raster_Funcs struct. */
/* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */
- /* called with a pre-allocated stracture to be filled. */
+ /* be called with a pre-allocated structure to be filled. */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro */
/* is used). */
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \
- raster_reset_, raster_set_mode_, \
- raster_render_, raster_done_) \
- const FT_Raster_Funcs class_ = \
- { \
- glyph_format_, raster_new_, raster_reset_, \
- raster_set_mode_, raster_render_, raster_done_ \
+#define FT_DEFINE_RASTER_FUNCS( \
+ class_, \
+ glyph_format_, \
+ raster_new_, \
+ raster_reset_, \
+ raster_set_mode_, \
+ raster_render_, \
+ raster_done_ ) \
+ const FT_Raster_Funcs class_ = \
+ { \
+ glyph_format_, \
+ raster_new_, \
+ raster_reset_, \
+ raster_set_mode_, \
+ raster_render_, \
+ raster_done_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \
- raster_reset_, raster_set_mode_, raster_render_, raster_done_) \
- void \
- FT_Init_Class_##class_( FT_Raster_Funcs* clazz ) \
- { \
- clazz->glyph_format = glyph_format_; \
- clazz->raster_new = raster_new_; \
- clazz->raster_reset = raster_reset_; \
- clazz->raster_set_mode = raster_set_mode_; \
- clazz->raster_render = raster_render_; \
- clazz->raster_done = raster_done_; \
+#define FT_DEFINE_RASTER_FUNCS( \
+ class_, \
+ glyph_format_, \
+ raster_new_, \
+ raster_reset_, \
+ raster_set_mode_, \
+ raster_render_, \
+ raster_done_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Raster_Funcs* clazz ) \
+ { \
+ clazz->glyph_format = glyph_format_; \
+ clazz->raster_new = raster_new_; \
+ clazz->raster_reset = raster_reset_; \
+ clazz->raster_set_mode = raster_set_mode_; \
+ clazz->raster_render = raster_render_; \
+ clazz->raster_done = raster_done_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** PIC-Support Macros for ftrender.h ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
+ /* PIC support macros for ftrender.h */
/*************************************************************************/
@@ -1042,40 +1102,64 @@ FT_BEGIN_HEADER
/* <Description> */
/* Used to initialize an instance of FT_Glyph_Class struct. */
/* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */
- /* called with a pre-allocated stracture to be filled. */
+ /* be called with a pre-allocated stcture to be filled. */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro */
/* is used). */
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \
- transform_, bbox_, prepare_) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Glyph_Class class_ = \
- { \
- size_, format_, init_, done_, copy_, transform_, bbox_, prepare_ \
+#define FT_DEFINE_GLYPH( \
+ class_, \
+ size_, \
+ format_, \
+ init_, \
+ done_, \
+ copy_, \
+ transform_, \
+ bbox_, \
+ prepare_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_Glyph_Class class_ = \
+ { \
+ size_, \
+ format_, \
+ init_, \
+ done_, \
+ copy_, \
+ transform_, \
+ bbox_, \
+ prepare_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \
- transform_, bbox_, prepare_) \
- void \
- FT_Init_Class_##class_( FT_Glyph_Class* clazz ) \
- { \
- clazz->glyph_size = size_; \
- clazz->glyph_format = format_; \
- clazz->glyph_init = init_; \
- clazz->glyph_done = done_; \
- clazz->glyph_copy = copy_; \
- clazz->glyph_transform = transform_; \
- clazz->glyph_bbox = bbox_; \
- clazz->glyph_prepare = prepare_; \
+#define FT_DEFINE_GLYPH( \
+ class_, \
+ size_, \
+ format_, \
+ init_, \
+ done_, \
+ copy_, \
+ transform_, \
+ bbox_, \
+ prepare_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Glyph_Class* clazz ) \
+ { \
+ clazz->glyph_size = size_; \
+ clazz->glyph_format = format_; \
+ clazz->glyph_init = init_; \
+ clazz->glyph_done = done_; \
+ clazz->glyph_copy = copy_; \
+ clazz->glyph_transform = transform_; \
+ clazz->glyph_bbox = bbox_; \
+ clazz->glyph_prepare = prepare_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
+
/*************************************************************************/
/* */
/* <Macro> */
@@ -1083,7 +1167,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Used to create a forward declaration of a */
- /* FT_Renderer_Class stract instance. */
+ /* FT_Renderer_Class struct instance. */
/* */
/* <Macro> */
/* FT_DEFINE_RENDERER */
@@ -1091,22 +1175,23 @@ FT_BEGIN_HEADER
/* <Description> */
/* Used to initialize an instance of FT_Renderer_Class struct. */
/* */
- /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */
- /* to called with a pointer where the allocated stracture is returned.*/
- /* And when it is no longer needed a Destroy function needs */
- /* to be called to release that allocation. */
- /* fcinit.c (ft_create_default_module_classes) already contains */
+ /* When FT_CONFIG_OPTION_PIC is defined a `create' funtion will need */
+ /* to be called with a pointer where the allocated structure is */
+ /* returned. And when it is no longer needed a `destroy' function */
+ /* needs to be called to release that allocation. */
+ /* `fcinit.c' (ft_create_default_module_classes) already contains */
/* a mechanism to call these functions for the default modules */
- /* described in ftmodule.h */
+ /* described in `ftmodule.h'. */
/* */
- /* Notice that the created Create and Destroy functions call */
- /* pic_init and pic_free function to allow you to manually allocate */
- /* and initialize any additional global data, like module specific */
+ /* Notice that the created `create' and `destroy' functions call */
+ /* `pic_init' and `pic_free' to allow you to manually allocate and */
+ /* initialize any additional global data, like a module specific */
/* interface, and put them in the global pic container defined in */
- /* ftpic.h. if you don't need them just implement the functions as */
- /* empty to resolve the link error. Also the pic_init and pic_free */
- /* functions should be declared in pic.h, to be referred by renderer */
- /* definition calling FT_DEFINE_RENDERER() in following. */
+ /* `ftpic.h'. If you don't need them just implement the functions as */
+ /* empty to resolve the link error. Also the `pic_init' and */
+ /* `pic_free' functions should be declared in `pic.h', to be referred */
+ /* by the renderer definition calling `FT_DEFINE_RENDERER' in the */
+ /* following. */
/* */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro */
@@ -1114,99 +1199,130 @@ FT_BEGIN_HEADER
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DECLARE_RENDERER(class_) \
- FT_EXPORT_VAR( const FT_Renderer_Class ) class_;
-
-#define FT_DEFINE_RENDERER(class_, \
- flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_, \
- glyph_format_, render_glyph_, transform_glyph_, \
- get_glyph_cbox_, set_mode_, raster_class_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Renderer_Class class_ = \
- { \
- FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_, \
- interface_,init_,done_,get_interface_) \
- glyph_format_, \
- \
- render_glyph_, \
- transform_glyph_, \
- get_glyph_cbox_, \
- set_mode_, \
- \
- raster_class_ \
+#define FT_DECLARE_RENDERER( class_ ) \
+ FT_EXPORT_VAR( const FT_Renderer_Class ) class_;
+
+#define FT_DEFINE_RENDERER( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_, \
+ glyph_format_, \
+ render_glyph_, \
+ transform_glyph_, \
+ get_glyph_cbox_, \
+ set_mode_, \
+ raster_class_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_Renderer_Class class_ = \
+ { \
+ FT_DEFINE_ROOT_MODULE( flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ glyph_format_, \
+ \
+ render_glyph_, \
+ transform_glyph_, \
+ get_glyph_cbox_, \
+ set_mode_, \
+ \
+ raster_class_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DECLARE_RENDERER(class_) FT_DECLARE_MODULE(class_)
-
-#define FT_DEFINE_RENDERER(class_, \
- flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_, \
- glyph_format_, render_glyph_, transform_glyph_, \
- get_glyph_cbox_, set_mode_, raster_class_ ) \
- \
- void \
- FT_Destroy_Class_##class_( FT_Library library, \
- FT_Module_Class* clazz ) \
- { \
- FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \
- FT_Memory memory = library->memory; \
- class_##_pic_free( library ); \
- if ( rclazz ) \
- FT_FREE( rclazz ); \
- } \
- \
- FT_Error \
- FT_Create_Class_##class_( FT_Library library, \
- FT_Module_Class** output_class ) \
- { \
- FT_Renderer_Class* clazz; \
- FT_Error error; \
- FT_Memory memory = library->memory; \
- \
- if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \
- return error; \
- \
- error = class_##_pic_init( library ); \
- if(error) \
- { \
- FT_FREE( clazz ); \
- return error; \
- } \
- \
- FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_, \
- interface_,init_,done_,get_interface_) \
- \
- clazz->glyph_format = glyph_format_; \
- \
- clazz->render_glyph = render_glyph_; \
- clazz->transform_glyph = transform_glyph_; \
- clazz->get_glyph_cbox = get_glyph_cbox_; \
- clazz->set_mode = set_mode_; \
- \
- clazz->raster_class = raster_class_; \
- \
- *output_class = (FT_Module_Class*)clazz; \
- return FT_Err_Ok; \
+#define FT_DECLARE_RENDERER( class_ ) FT_DECLARE_MODULE( class_ )
+
+#define FT_DEFINE_RENDERER( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_, \
+ glyph_format_, \
+ render_glyph_, \
+ transform_glyph_, \
+ get_glyph_cbox_, \
+ set_mode_, \
+ raster_class_ ) \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_Module_Class* clazz ) \
+ { \
+ FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ class_ ## _pic_free( library ); \
+ if ( rclazz ) \
+ FT_FREE( rclazz ); \
+ } \
+ \
+ \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_Module_Class** output_class ) \
+ { \
+ FT_Renderer_Class* clazz = NULL; \
+ FT_Error error; \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
+ return error; \
+ \
+ error = class_ ## _pic_init( library ); \
+ if ( error ) \
+ { \
+ FT_FREE( clazz ); \
+ return error; \
+ } \
+ \
+ FT_DEFINE_ROOT_MODULE( flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ \
+ clazz->glyph_format = glyph_format_; \
+ \
+ clazz->render_glyph = render_glyph_; \
+ clazz->transform_glyph = transform_glyph_; \
+ clazz->get_glyph_cbox = get_glyph_cbox_; \
+ clazz->set_mode = set_mode_; \
+ \
+ clazz->raster_class = raster_class_; \
+ \
+ *output_class = (FT_Module_Class*)clazz; \
+ \
+ return FT_Err_Ok; \
}
-
-
#endif /* FT_CONFIG_OPTION_PIC */
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** PIC-Support Macros for ftmodapi.h ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
+
+ /* PIC support macros for ftmodapi.h **/
#ifdef FT_CONFIG_OPTION_PIC
@@ -1247,6 +1363,7 @@ FT_BEGIN_HEADER
#endif
+
/*************************************************************************/
/* */
/* <Macro> */
@@ -1254,30 +1371,31 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Used to create a forward declaration of a */
- /* FT_Module_Class stract instance. */
+ /* FT_Module_Class struct instance. */
/* */
/* <Macro> */
/* FT_DEFINE_MODULE */
/* */
/* <Description> */
- /* Used to initialize an instance of FT_Module_Class struct. */
+ /* Used to initialize an instance of an FT_Module_Class struct. */
/* */
- /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */
- /* to called with a pointer where the allocated stracture is returned.*/
- /* And when it is no longer needed a Destroy function needs */
- /* to be called to release that allocation. */
- /* fcinit.c (ft_create_default_module_classes) already contains */
+ /* When FT_CONFIG_OPTION_PIC is defined a `create' funtion needs to */
+ /* be called with a pointer where the allocated structure is */
+ /* returned. And when it is no longer needed a `destroy' function */
+ /* needs to be called to release that allocation. */
+ /* `fcinit.c' (ft_create_default_module_classes) already contains */
/* a mechanism to call these functions for the default modules */
- /* described in ftmodule.h */
+ /* described in `ftmodule.h'. */
/* */
- /* Notice that the created Create and Destroy functions call */
- /* pic_init and pic_free function to allow you to manually allocate */
- /* and initialize any additional global data, like module specific */
+ /* Notice that the created `create' and `destroy' functions call */
+ /* `pic_init' and `pic_free' to allow you to manually allocate and */
+ /* initialize any additional global data, like a module specific */
/* interface, and put them in the global pic container defined in */
- /* ftpic.h. if you don't need them just implement the functions as */
- /* empty to resolve the link error. Also the pic_init and pic_free */
- /* functions should be declared in pic.h, to be referred by module */
- /* definition calling FT_DEFINE_MODULE() in following. */
+ /* `ftpic.h'. If you don't need them just implement the functions as */
+ /* empty to resolve the link error. Also the `pic_init' and */
+ /* `pic_free' functions should be declared in `pic.h', to be referred */
+ /* by the module definition calling `FT_DEFINE_MODULE' in the */
+ /* following. */
/* */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro */
@@ -1287,119 +1405,159 @@ FT_BEGIN_HEADER
/* FT_DEFINE_ROOT_MODULE */
/* */
/* <Description> */
- /* Used to initialize an instance of FT_Module_Class struct inside */
- /* another stract that contains it or in a function that initializes */
- /* that containing stract */
+ /* Used to initialize an instance of an FT_Module_Class struct inside */
+ /* another struct that contains it or in a function that initializes */
+ /* that containing struct. */
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DECLARE_MODULE(class_) \
- FT_CALLBACK_TABLE \
- const FT_Module_Class class_; \
-
-#define FT_DEFINE_ROOT_MODULE(flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_) \
- { \
- flags_, \
- size_, \
- \
- name_, \
- version_, \
- requires_, \
- \
- interface_, \
- \
- init_, \
- done_, \
- get_interface_, \
+#define FT_DECLARE_MODULE( class_ ) \
+ FT_CALLBACK_TABLE \
+ const FT_Module_Class class_;
+
+#define FT_DEFINE_ROOT_MODULE( \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ { \
+ flags_, \
+ size_, \
+ \
+ name_, \
+ version_, \
+ requires_, \
+ \
+ interface_, \
+ \
+ init_, \
+ done_, \
+ get_interface_, \
},
-#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Module_Class class_ = \
- { \
- flags_, \
- size_, \
- \
- name_, \
- version_, \
- requires_, \
- \
- interface_, \
- \
- init_, \
- done_, \
- get_interface_, \
+#define FT_DEFINE_MODULE( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_Module_Class class_ = \
+ { \
+ flags_, \
+ size_, \
+ \
+ name_, \
+ version_, \
+ requires_, \
+ \
+ interface_, \
+ \
+ init_, \
+ done_, \
+ get_interface_, \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DECLARE_MODULE(class_) \
- FT_Error FT_Create_Class_##class_( FT_Library library, \
- FT_Module_Class** output_class ); \
- void FT_Destroy_Class_##class_( FT_Library library, \
- FT_Module_Class* clazz );
-
-#define FT_DEFINE_ROOT_MODULE(flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_) \
- clazz->root.module_flags = flags_; \
- clazz->root.module_size = size_; \
- clazz->root.module_name = name_; \
- clazz->root.module_version = version_; \
- clazz->root.module_requires = requires_; \
- \
- clazz->root.module_interface = interface_; \
- \
- clazz->root.module_init = init_; \
- clazz->root.module_done = done_; \
- clazz->root.get_interface = get_interface_;
-
-#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_) \
- \
- void \
- FT_Destroy_Class_##class_( FT_Library library, \
- FT_Module_Class* clazz ) \
- { \
- FT_Memory memory = library->memory; \
- class_##_pic_free( library ); \
- if ( clazz ) \
- FT_FREE( clazz ); \
- } \
- \
- FT_Error \
- FT_Create_Class_##class_( FT_Library library, \
- FT_Module_Class** output_class ) \
- { \
- FT_Memory memory = library->memory; \
- FT_Module_Class* clazz; \
- FT_Error error; \
- \
- if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \
- return error; \
- error = class_##_pic_init( library ); \
- if(error) \
- { \
- FT_FREE( clazz ); \
- return error; \
- } \
- \
- clazz->module_flags = flags_; \
- clazz->module_size = size_; \
- clazz->module_name = name_; \
- clazz->module_version = version_; \
- clazz->module_requires = requires_; \
- \
- clazz->module_interface = interface_; \
- \
- clazz->module_init = init_; \
- clazz->module_done = done_; \
- clazz->get_interface = get_interface_; \
- \
- *output_class = clazz; \
- return FT_Err_Ok; \
+#define FT_DECLARE_MODULE( class_ ) \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_Module_Class** output_class ); \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_Module_Class* clazz );
+
+#define FT_DEFINE_ROOT_MODULE( \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ clazz->root.module_flags = flags_; \
+ clazz->root.module_size = size_; \
+ clazz->root.module_name = name_; \
+ clazz->root.module_version = version_; \
+ clazz->root.module_requires = requires_; \
+ \
+ clazz->root.module_interface = interface_; \
+ \
+ clazz->root.module_init = init_; \
+ clazz->root.module_done = done_; \
+ clazz->root.get_interface = get_interface_;
+
+#define FT_DEFINE_MODULE( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_Module_Class* clazz ) \
+ { \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ class_ ## _pic_free( library ); \
+ if ( clazz ) \
+ FT_FREE( clazz ); \
+ } \
+ \
+ \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_Module_Class** output_class ) \
+ { \
+ FT_Memory memory = library->memory; \
+ FT_Module_Class* clazz = NULL; \
+ FT_Error error; \
+ \
+ \
+ if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
+ return error; \
+ error = class_ ## _pic_init( library ); \
+ if ( error ) \
+ { \
+ FT_FREE( clazz ); \
+ return error; \
+ } \
+ \
+ clazz->module_flags = flags_; \
+ clazz->module_size = size_; \
+ clazz->module_name = name_; \
+ clazz->module_version = version_; \
+ clazz->module_requires = requires_; \
+ \
+ clazz->module_interface = interface_; \
+ \
+ clazz->module_init = init_; \
+ clazz->module_done = done_; \
+ clazz->get_interface = get_interface_; \
+ \
+ *output_class = clazz; \
+ \
+ return FT_Err_Ok; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/include/freetype/internal/ftpic.h b/include/internal/ftpic.h
index 5b674e6..485ce7a 100644
--- a/include/freetype/internal/ftpic.h
+++ b/include/internal/ftpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services (declaration). */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2012 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,29 +31,33 @@ FT_BEGIN_HEADER
#ifdef FT_CONFIG_OPTION_PIC
- typedef struct FT_PIC_Container_
+ typedef struct FT_PIC_Container_
{
/* pic containers for base */
- void* base;
+ void* base;
+
/* pic containers for modules */
- void* autofit;
- void* cff;
- void* pshinter;
- void* psnames;
- void* raster;
- void* sfnt;
- void* smooth;
- void* truetype;
+ void* autofit;
+ void* cff;
+ void* pshinter;
+ void* psnames;
+ void* raster;
+ void* sfnt;
+ void* smooth;
+ void* truetype;
+
} FT_PIC_Container;
- /* Initialize the various function tables, structs, etc. stored in the container. */
+
+ /* Initialize the various function tables, structs, etc. */
+ /* stored in the container. */
FT_BASE( FT_Error )
- ft_pic_container_init( FT_Library library );
+ ft_pic_container_init( FT_Library library );
/* Destroy the contents of the container. */
FT_BASE( void )
- ft_pic_container_destroy( FT_Library library );
+ ft_pic_container_destroy( FT_Library library );
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/include/freetype/internal/ftrfork.h b/include/internal/ftrfork.h
index 77e1020..d750cbe 100644
--- a/include/freetype/internal/ftrfork.h
+++ b/include/internal/ftrfork.h
@@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (specification). */
/* */
-/* Copyright 2004, 2006, 2007 by */
+/* Copyright 2004, 2006, 2007, 2012, 2013 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -80,26 +80,37 @@ FT_BEGIN_HEADER
} ft_raccess_guess_rec;
#ifndef FT_CONFIG_OPTION_PIC
+
/* this array is a storage in non-PIC mode, so ; is needed in END */
-#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
- const type name[] = {
-#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
- { raccess_guess_##func_suffix, FT_RFork_Rule_##type_suffix },
-#define CONST_FT_RFORK_RULE_ARRAY_END };
+#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
+ const type name[] = {
+#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
+ { raccess_guess_ ## func_suffix, \
+ FT_RFork_Rule_ ## type_suffix },
+#define CONST_FT_RFORK_RULE_ARRAY_END };
+
#else /* FT_CONFIG_OPTION_PIC */
+
/* this array is a function in PIC mode, so no ; is needed in END */
-#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
- void FT_Init_##name ( type* storage ) { \
- type *local = storage; \
- int i = 0;
-#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
- local[i].func = raccess_guess_##func_suffix; \
- local[i].type = FT_RFork_Rule_##type_suffix; \
- i++;
-#define CONST_FT_RFORK_RULE_ARRAY_END }
+#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
+ void \
+ FT_Init_Table_ ## name( type* storage ) \
+ { \
+ type* local = storage; \
+ \
+ \
+ int i = 0;
+#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
+ local[i].func = raccess_guess_ ## func_suffix; \
+ local[i].type = FT_RFork_Rule_ ## type_suffix; \
+ i++;
+#define CONST_FT_RFORK_RULE_ARRAY_END }
+
#endif /* FT_CONFIG_OPTION_PIC */
+
#endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */
+
/*************************************************************************/
/* */
/* <Function> */
@@ -213,6 +224,13 @@ FT_BEGIN_HEADER
/* tag :: */
/* The resource tag. */
/* */
+ /* sort_by_res_id :: */
+ /* A Boolean to sort the fragmented resource by their ids. */
+ /* The fragmented resources for `POST' resource should be sorted */
+ /* to restore Type1 font properly. For `snft' resources, sorting */
+ /* may induce a different order of the faces in comparison to that */
+ /* by QuickDraw API. */
+ /* */
/* <Output> */
/* offsets :: */
/* The stream offsets for the resource data specified by `tag'. */
@@ -235,6 +253,7 @@ FT_BEGIN_HEADER
FT_Long map_offset,
FT_Long rdata_pos,
FT_Long tag,
+ FT_Bool sort_by_res_id,
FT_Long **offsets,
FT_Long *count );
diff --git a/include/freetype/internal/ftserv.h b/include/internal/ftserv.h
index 4f481db..1203ec8 100644
--- a/include/freetype/internal/ftserv.h
+++ b/include/internal/ftserv.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType services (specification only). */
/* */
-/* Copyright 2003-2007, 2009, 2012 by */
+/* Copyright 2003-2007, 2009, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -34,14 +34,6 @@
FT_BEGIN_HEADER
-#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
-
- /* we disable the warning `conditional expression is constant' here */
- /* in order to compile cleanly with the maximum level of warnings */
-#pragma warning( disable : 4127 )
-
-#endif /* _MSC_VER */
-
/*
* @macro:
* FT_FACE_FIND_SERVICE
@@ -92,6 +84,7 @@ FT_BEGIN_HEADER
#endif /* !C++ */
+
/*
* @macro:
* FT_FACE_FIND_GLOBAL_SERVICE
@@ -167,7 +160,13 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Macro> */
- /* FT_DEFINE_SERVICEDESCREC1 .. FT_DEFINE_SERVICEDESCREC6 */
+ /* FT_DEFINE_SERVICEDESCREC1 */
+ /* FT_DEFINE_SERVICEDESCREC2 */
+ /* FT_DEFINE_SERVICEDESCREC3 */
+ /* FT_DEFINE_SERVICEDESCREC4 */
+ /* FT_DEFINE_SERVICEDESCREC5 */
+ /* FT_DEFINE_SERVICEDESCREC6 */
+ /* FT_DEFINE_SERVICEDESCREC7 */
/* */
/* <Description> */
/* Used to initialize an array of FT_ServiceDescRec structures. */
@@ -264,6 +263,26 @@ FT_BEGIN_HEADER
{ NULL, NULL } \
};
+#define FT_DEFINE_SERVICEDESCREC7( class_, \
+ serv_id_1, serv_data_1, \
+ serv_id_2, serv_data_2, \
+ serv_id_3, serv_data_3, \
+ serv_id_4, serv_data_4, \
+ serv_id_5, serv_data_5, \
+ serv_id_6, serv_data_6, \
+ serv_id_7, serv_data_7 ) \
+ static const FT_ServiceDescRec class_[] = \
+ { \
+ { serv_id_1, serv_data_1 }, \
+ { serv_id_2, serv_data_2 }, \
+ { serv_id_3, serv_data_3 }, \
+ { serv_id_4, serv_data_4 }, \
+ { serv_id_5, serv_data_5 }, \
+ { serv_id_6, serv_data_6 }, \
+ { serv_id_7, serv_data_7 }, \
+ { NULL, NULL } \
+ };
+
#else /* FT_CONFIG_OPTION_PIC */
#define FT_DEFINE_SERVICEDESCREC1( class_, \
@@ -283,7 +302,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -319,7 +338,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -358,7 +377,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -400,7 +419,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -445,7 +464,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -493,7 +512,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -521,6 +540,59 @@ FT_BEGIN_HEADER
return FT_Err_Ok; \
}
+#define FT_DEFINE_SERVICEDESCREC7( class_, \
+ serv_id_1, serv_data_1, \
+ serv_id_2, serv_data_2, \
+ serv_id_3, serv_data_3, \
+ serv_id_4, serv_data_4, \
+ serv_id_5, serv_data_5, \
+ serv_id_6, serv_data_6, \
+ serv_id_7, serv_data_7 ) \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_ServiceDescRec* clazz ) \
+ { \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ if ( clazz ) \
+ FT_FREE( clazz ); \
+ } \
+ \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_ServiceDescRec** output_class) \
+ { \
+ FT_ServiceDescRec* clazz = NULL; \
+ FT_Error error; \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 8 ) ) \
+ return error; \
+ \
+ clazz[0].serv_id = serv_id_1; \
+ clazz[0].serv_data = serv_data_1; \
+ clazz[1].serv_id = serv_id_2; \
+ clazz[1].serv_data = serv_data_2; \
+ clazz[2].serv_id = serv_id_3; \
+ clazz[2].serv_data = serv_data_3; \
+ clazz[3].serv_id = serv_id_4; \
+ clazz[3].serv_data = serv_data_4; \
+ clazz[4].serv_id = serv_id_5; \
+ clazz[4].serv_data = serv_data_5; \
+ clazz[5].serv_id = serv_id_6; \
+ clazz[5].serv_data = serv_data_6; \
+ clazz[6].serv_id = serv_id_7; \
+ clazz[6].serv_data = serv_data_7; \
+ clazz[7].serv_id = NULL; \
+ clazz[7].serv_data = NULL; \
+ \
+ *output_class = clazz; \
+ \
+ return FT_Err_Ok; \
+ }
+
#endif /* FT_CONFIG_OPTION_PIC */
@@ -573,7 +645,9 @@ FT_BEGIN_HEADER
/*
* A magic number used within the services cache.
*/
-#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)-2) /* magic number */
+
+ /* ensure that value `1' has the same width as a pointer */
+#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)~(FT_PtrDist)1)
/*
@@ -660,23 +734,24 @@ FT_BEGIN_HEADER
* The header files containing the services.
*/
-#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
-#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h>
-#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
-#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h>
-#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
-#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h>
-#define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h>
-#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h>
-#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h>
-#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h>
-#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h>
-#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
-#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h>
-#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
-#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
-#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h>
-#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h>
+#define FT_SERVICE_BDF_H <internal/services/svbdf.h>
+#define FT_SERVICE_CID_H <internal/services/svcid.h>
+#define FT_SERVICE_GLYPH_DICT_H <internal/services/svgldict.h>
+#define FT_SERVICE_GX_VALIDATE_H <internal/services/svgxval.h>
+#define FT_SERVICE_KERNING_H <internal/services/svkern.h>
+#define FT_SERVICE_MULTIPLE_MASTERS_H <internal/services/svmm.h>
+#define FT_SERVICE_OPENTYPE_VALIDATE_H <internal/services/svotval.h>
+#define FT_SERVICE_PFR_H <internal/services/svpfr.h>
+#define FT_SERVICE_POSTSCRIPT_CMAPS_H <internal/services/svpscmap.h>
+#define FT_SERVICE_POSTSCRIPT_INFO_H <internal/services/svpsinfo.h>
+#define FT_SERVICE_POSTSCRIPT_NAME_H <internal/services/svpostnm.h>
+#define FT_SERVICE_PROPERTIES_H <internal/services/svprop.h>
+#define FT_SERVICE_SFNT_H <internal/services/svsfnt.h>
+#define FT_SERVICE_TRUETYPE_ENGINE_H <internal/services/svtteng.h>
+#define FT_SERVICE_TT_CMAP_H <internal/services/svttcmap.h>
+#define FT_SERVICE_WINFNT_H <internal/services/svwinfnt.h>
+#define FT_SERVICE_XFREE86_NAME_H <internal/services/svxf86nm.h>
+#define FT_SERVICE_TRUETYPE_GLYF_H <internal/services/svttglyf.h>
/* */
diff --git a/include/freetype/internal/ftstream.h b/include/internal/ftstream.h
index 8b18500..2661858 100644
--- a/include/freetype/internal/ftstream.h
+++ b/include/internal/ftstream.h
@@ -4,7 +4,7 @@
/* */
/* Stream handling (specification). */
/* */
-/* Copyright 1996-2002, 2004-2006, 2011 by */
+/* Copyright 1996-2002, 2004-2006, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -154,67 +154,60 @@ FT_BEGIN_HEADER
/* */
#define FT_BYTE_( p, i ) ( ((const FT_Byte*)(p))[(i)] )
-#define FT_INT8_( p, i ) ( ((const FT_Char*)(p))[(i)] )
#define FT_INT16( x ) ( (FT_Int16)(x) )
#define FT_UINT16( x ) ( (FT_UInt16)(x) )
#define FT_INT32( x ) ( (FT_Int32)(x) )
#define FT_UINT32( x ) ( (FT_UInt32)(x) )
-#define FT_BYTE_I16( p, i, s ) ( FT_INT16( FT_BYTE_( p, i ) ) << (s) )
+
#define FT_BYTE_U16( p, i, s ) ( FT_UINT16( FT_BYTE_( p, i ) ) << (s) )
-#define FT_BYTE_I32( p, i, s ) ( FT_INT32( FT_BYTE_( p, i ) ) << (s) )
#define FT_BYTE_U32( p, i, s ) ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )
-#define FT_INT8_I16( p, i, s ) ( FT_INT16( FT_INT8_( p, i ) ) << (s) )
-#define FT_INT8_U16( p, i, s ) ( FT_UINT16( FT_INT8_( p, i ) ) << (s) )
-#define FT_INT8_I32( p, i, s ) ( FT_INT32( FT_INT8_( p, i ) ) << (s) )
-#define FT_INT8_U32( p, i, s ) ( FT_UINT32( FT_INT8_( p, i ) ) << (s) )
-
-#define FT_PEEK_SHORT( p ) FT_INT16( FT_INT8_I16( p, 0, 8) | \
- FT_BYTE_I16( p, 1, 0) )
+#define FT_PEEK_SHORT( p ) FT_INT16( FT_BYTE_U16( p, 0, 8) | \
+ FT_BYTE_U16( p, 1, 0) )
#define FT_PEEK_USHORT( p ) FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \
FT_BYTE_U16( p, 1, 0 ) )
-#define FT_PEEK_LONG( p ) FT_INT32( FT_INT8_I32( p, 0, 24 ) | \
- FT_BYTE_I32( p, 1, 16 ) | \
- FT_BYTE_I32( p, 2, 8 ) | \
- FT_BYTE_I32( p, 3, 0 ) )
+#define FT_PEEK_LONG( p ) FT_INT32( FT_BYTE_U32( p, 0, 24 ) | \
+ FT_BYTE_U32( p, 1, 16 ) | \
+ FT_BYTE_U32( p, 2, 8 ) | \
+ FT_BYTE_U32( p, 3, 0 ) )
#define FT_PEEK_ULONG( p ) FT_UINT32( FT_BYTE_U32( p, 0, 24 ) | \
FT_BYTE_U32( p, 1, 16 ) | \
FT_BYTE_U32( p, 2, 8 ) | \
FT_BYTE_U32( p, 3, 0 ) )
-#define FT_PEEK_OFF3( p ) FT_INT32( FT_INT8_I32( p, 0, 16 ) | \
- FT_BYTE_I32( p, 1, 8 ) | \
- FT_BYTE_I32( p, 2, 0 ) )
+#define FT_PEEK_OFF3( p ) FT_INT32( FT_BYTE_U32( p, 0, 16 ) | \
+ FT_BYTE_U32( p, 1, 8 ) | \
+ FT_BYTE_U32( p, 2, 0 ) )
#define FT_PEEK_UOFF3( p ) FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \
FT_BYTE_U32( p, 1, 8 ) | \
FT_BYTE_U32( p, 2, 0 ) )
-#define FT_PEEK_SHORT_LE( p ) FT_INT16( FT_INT8_I16( p, 1, 8 ) | \
- FT_BYTE_I16( p, 0, 0 ) )
+#define FT_PEEK_SHORT_LE( p ) FT_INT16( FT_BYTE_U16( p, 1, 8 ) | \
+ FT_BYTE_U16( p, 0, 0 ) )
#define FT_PEEK_USHORT_LE( p ) FT_UINT16( FT_BYTE_U16( p, 1, 8 ) | \
FT_BYTE_U16( p, 0, 0 ) )
-#define FT_PEEK_LONG_LE( p ) FT_INT32( FT_INT8_I32( p, 3, 24 ) | \
- FT_BYTE_I32( p, 2, 16 ) | \
- FT_BYTE_I32( p, 1, 8 ) | \
- FT_BYTE_I32( p, 0, 0 ) )
+#define FT_PEEK_LONG_LE( p ) FT_INT32( FT_BYTE_U32( p, 3, 24 ) | \
+ FT_BYTE_U32( p, 2, 16 ) | \
+ FT_BYTE_U32( p, 1, 8 ) | \
+ FT_BYTE_U32( p, 0, 0 ) )
#define FT_PEEK_ULONG_LE( p ) FT_UINT32( FT_BYTE_U32( p, 3, 24 ) | \
FT_BYTE_U32( p, 2, 16 ) | \
FT_BYTE_U32( p, 1, 8 ) | \
FT_BYTE_U32( p, 0, 0 ) )
-#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_INT8_I32( p, 2, 16 ) | \
- FT_BYTE_I32( p, 1, 8 ) | \
- FT_BYTE_I32( p, 0, 0 ) )
+#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_BYTE_U32( p, 2, 16 ) | \
+ FT_BYTE_U32( p, 1, 8 ) | \
+ FT_BYTE_U32( p, 0, 0 ) )
#define FT_PEEK_UOFF3_LE( p ) FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \
FT_BYTE_U32( p, 1, 8 ) | \
@@ -493,37 +486,41 @@ FT_BEGIN_HEADER
#define FT_STREAM_POS() \
FT_Stream_Pos( stream )
-#define FT_STREAM_SEEK( position ) \
- FT_SET_ERROR( FT_Stream_Seek( stream, position ) )
+#define FT_STREAM_SEEK( position ) \
+ FT_SET_ERROR( FT_Stream_Seek( stream, \
+ (FT_ULong)(position) ) )
-#define FT_STREAM_SKIP( distance ) \
- FT_SET_ERROR( FT_Stream_Skip( stream, distance ) )
+#define FT_STREAM_SKIP( distance ) \
+ FT_SET_ERROR( FT_Stream_Skip( stream, \
+ (FT_Long)(distance) ) )
-#define FT_STREAM_READ( buffer, count ) \
- FT_SET_ERROR( FT_Stream_Read( stream, \
- (FT_Byte*)buffer, \
- count ) )
+#define FT_STREAM_READ( buffer, count ) \
+ FT_SET_ERROR( FT_Stream_Read( stream, \
+ (FT_Byte*)(buffer), \
+ (FT_ULong)(count) ) )
-#define FT_STREAM_READ_AT( position, buffer, count ) \
- FT_SET_ERROR( FT_Stream_ReadAt( stream, \
- position, \
- (FT_Byte*)buffer, \
- count ) )
+#define FT_STREAM_READ_AT( position, buffer, count ) \
+ FT_SET_ERROR( FT_Stream_ReadAt( stream, \
+ (FT_ULong)(position), \
+ (FT_Byte*)buffer, \
+ (FT_ULong)(count) ) )
#define FT_STREAM_READ_FIELDS( fields, object ) \
FT_SET_ERROR( FT_Stream_ReadFields( stream, fields, object ) )
-#define FT_FRAME_ENTER( size ) \
- FT_SET_ERROR( \
- FT_DEBUG_INNER( FT_Stream_EnterFrame( stream, size ) ) )
+#define FT_FRAME_ENTER( size ) \
+ FT_SET_ERROR( \
+ FT_DEBUG_INNER( FT_Stream_EnterFrame( stream, \
+ (FT_ULong)(size) ) ) )
-#define FT_FRAME_EXIT() \
+#define FT_FRAME_EXIT() \
FT_DEBUG_INNER( FT_Stream_ExitFrame( stream ) )
#define FT_FRAME_EXTRACT( size, bytes ) \
FT_SET_ERROR( \
- FT_DEBUG_INNER( FT_Stream_ExtractFrame( stream, size, \
+ FT_DEBUG_INNER( FT_Stream_ExtractFrame( stream, \
+ (FT_ULong)(size), \
(FT_Byte**)&(bytes) ) ) )
#define FT_FRAME_RELEASE( bytes ) \
diff --git a/include/freetype/internal/fttrace.h b/include/internal/fttrace.h
index fbefdbd..d5253db 100644
--- a/include/freetype/internal/fttrace.h
+++ b/include/internal/fttrace.h
@@ -4,7 +4,7 @@
/* */
/* Tracing handling (specification only). */
/* */
-/* Copyright 2002, 2004-2007, 2009, 2011 by */
+/* Copyright 2002, 2004-2007, 2009, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -38,6 +38,7 @@ FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */
FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */
FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */
FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */
+FT_TRACE_DEF( bitmap ) /* bitmap checksum (ftobjs.c) */
/* Cache sub-system */
FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
@@ -73,6 +74,7 @@ FT_TRACE_DEF( t1parse )
/* PostScript helper module `psaux' */
FT_TRACE_DEF( t1decode )
FT_TRACE_DEF( psobjs )
+FT_TRACE_DEF( psconv )
/* PostScript hinting module `pshinter' */
FT_TRACE_DEF( pshrec )
@@ -86,6 +88,10 @@ FT_TRACE_DEF( cffload )
FT_TRACE_DEF( cffobjs )
FT_TRACE_DEF( cffparse )
+FT_TRACE_DEF( cf2blues )
+FT_TRACE_DEF( cf2hints )
+FT_TRACE_DEF( cf2interp )
+
/* Type 42 driver component */
FT_TRACE_DEF( t42 )
@@ -136,9 +142,13 @@ FT_TRACE_DEF( gxvprop )
FT_TRACE_DEF( gxvlcar )
/* autofit components */
+FT_TRACE_DEF( afmodule )
+FT_TRACE_DEF( afhints )
FT_TRACE_DEF( afcjk )
FT_TRACE_DEF( aflatin )
FT_TRACE_DEF( aflatin2 )
FT_TRACE_DEF( afwarp )
+FT_TRACE_DEF( afharfbuzz )
+FT_TRACE_DEF( afglobal )
/* END */
diff --git a/include/freetype/internal/ftvalid.h b/include/internal/ftvalid.h
index 00cd85e..c281b14 100644
--- a/include/freetype/internal/ftvalid.h
+++ b/include/internal/ftvalid.h
@@ -4,7 +4,7 @@
/* */
/* FreeType validation support (specification). */
/* */
-/* Copyright 2004 by */
+/* Copyright 2004, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -76,20 +76,31 @@ FT_BEGIN_HEADER
} FT_ValidationLevel;
+#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
+ /* We disable the warning `structure was padded due to */
+ /* __declspec(align())' in order to compile cleanly with */
+ /* the maximum level of warnings. */
+#pragma warning( push )
+#pragma warning( disable : 4324 )
+#endif /* _MSC_VER */
+
/* validator structure */
typedef struct FT_ValidatorRec_
{
+ ft_jmp_buf jump_buffer; /* used for exception handling */
+
const FT_Byte* base; /* address of table in memory */
const FT_Byte* limit; /* `base' + sizeof(table) in memory */
FT_ValidationLevel level; /* validation level */
FT_Error error; /* error returned. 0 means success */
- ft_jmp_buf jump_buffer; /* used for exception handling */
-
} FT_ValidatorRec;
+#if defined( _MSC_VER )
+#pragma warning( pop )
+#endif
-#define FT_VALIDATOR( x ) ((FT_Validator)( x ))
+#define FT_VALIDATOR( x ) ( (FT_Validator)( x ) )
FT_BASE( void )
@@ -115,31 +126,29 @@ FT_BEGIN_HEADER
/* Calls ft_validate_error. Assumes that the `valid' local variable */
/* holds a pointer to the current validator object. */
/* */
- /* Use preprocessor prescan to pass FT_ERR_PREFIX. */
- /* */
-#define FT_INVALID( _prefix, _error ) FT_INVALID_( _prefix, _error )
-#define FT_INVALID_( _prefix, _error ) \
- ft_validator_error( valid, _prefix ## _error )
+#define FT_INVALID( _error ) FT_INVALID_( _error )
+#define FT_INVALID_( _error ) \
+ ft_validator_error( valid, FT_THROW( _error ) )
/* called when a broken table is detected */
#define FT_INVALID_TOO_SHORT \
- FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+ FT_INVALID( Invalid_Table )
/* called when an invalid offset is detected */
#define FT_INVALID_OFFSET \
- FT_INVALID( FT_ERR_PREFIX, Invalid_Offset )
+ FT_INVALID( Invalid_Offset )
/* called when an invalid format/value is detected */
#define FT_INVALID_FORMAT \
- FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+ FT_INVALID( Invalid_Table )
/* called when an invalid glyph index is detected */
#define FT_INVALID_GLYPH_ID \
- FT_INVALID( FT_ERR_PREFIX, Invalid_Glyph_Index )
+ FT_INVALID( Invalid_Glyph_Index )
/* called when an invalid field value is detected */
#define FT_INVALID_DATA \
- FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+ FT_INVALID( Invalid_Table )
FT_END_HEADER
diff --git a/include/internal/internal.h b/include/internal/internal.h
new file mode 100644
index 0000000..e0ddb06
--- /dev/null
+++ b/include/internal/internal.h
@@ -0,0 +1,63 @@
+/***************************************************************************/
+/* */
+/* internal.h */
+/* */
+/* Internal header files (specification only). */
+/* */
+/* Copyright 1996-2004, 2013 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This file is automatically included by `ft2build.h'. */
+ /* Do not include it manually! */
+ /* */
+ /*************************************************************************/
+
+
+#define FT_INTERNAL_OBJECTS_H <internal/ftobjs.h>
+#define FT_INTERNAL_PIC_H <internal/ftpic.h>
+#define FT_INTERNAL_STREAM_H <internal/ftstream.h>
+#define FT_INTERNAL_MEMORY_H <internal/ftmemory.h>
+#define FT_INTERNAL_DEBUG_H <internal/ftdebug.h>
+#define FT_INTERNAL_CALC_H <internal/ftcalc.h>
+#define FT_INTERNAL_DRIVER_H <internal/ftdriver.h>
+#define FT_INTERNAL_TRACE_H <internal/fttrace.h>
+#define FT_INTERNAL_GLYPH_LOADER_H <internal/ftgloadr.h>
+#define FT_INTERNAL_SFNT_H <internal/sfnt.h>
+#define FT_INTERNAL_SERVICE_H <internal/ftserv.h>
+#define FT_INTERNAL_RFORK_H <internal/ftrfork.h>
+#define FT_INTERNAL_VALIDATE_H <internal/ftvalid.h>
+
+#define FT_INTERNAL_TRUETYPE_TYPES_H <internal/tttypes.h>
+#define FT_INTERNAL_TYPE1_TYPES_H <internal/t1types.h>
+
+#define FT_INTERNAL_POSTSCRIPT_AUX_H <internal/psaux.h>
+#define FT_INTERNAL_POSTSCRIPT_HINTS_H <internal/pshints.h>
+#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <internal/psglobal.h>
+
+#define FT_INTERNAL_AUTOHINT_H <internal/autohint.h>
+
+
+#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
+
+ /* We disable the warning `conditional expression is constant' here */
+ /* in order to compile cleanly with the maximum level of warnings. */
+ /* In particular, the warning complains about stuff like `while(0)' */
+ /* which is very useful in macro definitions. There is no benefit */
+ /* in having it enabled. */
+#pragma warning( disable : 4127 )
+
+#endif /* _MSC_VER */
+
+
+/* END */
diff --git a/include/freetype/internal/psaux.h b/include/internal/psaux.h
index a96e0df..e903114 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/internal/psaux.h
@@ -5,7 +5,7 @@
/* Auxiliary functions and data structures related to PostScript fonts */
/* (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */
+/* Copyright 1996-2004, 2006, 2008, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -101,6 +101,9 @@ FT_BEGIN_HEADER
/* capacity :: The current size of the heap block. Increments by */
/* 1kByte chunks. */
/* */
+ /* init :: Set to 0xDEADBEEF if `elements' and `lengths' have */
+ /* been allocated. */
+ /* */
/* max_elems :: The maximum number of elements in table. */
/* */
/* num_elems :: The current number of elements in table. */
@@ -183,6 +186,7 @@ FT_BEGIN_HEADER
T1_FIELD_TYPE_STRING,
T1_FIELD_TYPE_KEY,
T1_FIELD_TYPE_BBOX,
+ T1_FIELD_TYPE_MM_BBOX,
T1_FIELD_TYPE_INTEGER_ARRAY,
T1_FIELD_TYPE_FIXED_ARRAY,
T1_FIELD_TYPE_CALLBACK,
@@ -225,7 +229,7 @@ FT_BEGIN_HEADER
T1_Field_ParseFunc reader;
FT_UInt offset; /* offset of field in object */
FT_Byte size; /* size of field in bytes */
- FT_UInt array_max; /* maximal number of elements for */
+ FT_UInt array_max; /* maximum number of elements for */
/* array */
FT_UInt count_offset; /* offset of element count for */
/* arrays; must not be zero if in */
@@ -531,7 +535,7 @@ FT_BEGIN_HEADER
/* */
/* max_points :: maximum points in builder outline */
/* */
- /* max_contours :: Maximal number of contours in builder outline. */
+ /* max_contours :: Maximum number of contours in builder outline. */
/* */
/* pos_x :: The horizontal translation (if composite glyph). */
/* */
diff --git a/include/freetype/internal/pshints.h b/include/internal/pshints.h
index 5b7b698..f05ea68 100644
--- a/include/freetype/internal/pshints.h
+++ b/include/internal/pshints.h
@@ -6,7 +6,7 @@
/* recorders (specification only). These are used to support native */
/* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */
/* */
-/* Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2009 by */
+/* Copyright 2001-2003, 2005-2007, 2009, 2012, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -45,7 +45,7 @@ FT_BEGIN_HEADER
T1_Private* private_dict,
PSH_Globals* aglobals );
- typedef FT_Error
+ typedef void
(*PSH_Globals_SetScaleFunc)( PSH_Globals globals,
FT_Fixed x_scale,
FT_Fixed y_scale,
@@ -679,27 +679,37 @@ FT_BEGIN_HEADER
typedef PSHinter_Interface* PSHinter_Service;
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \
- get_t1_funcs_, get_t2_funcs_) \
- static const PSHinter_Interface class_ = \
- { \
- get_globals_funcs_, get_t1_funcs_, get_t2_funcs_ \
+#define FT_DEFINE_PSHINTER_INTERFACE( \
+ class_, \
+ get_globals_funcs_, \
+ get_t1_funcs_, \
+ get_t2_funcs_ ) \
+ static const PSHinter_Interface class_ = \
+ { \
+ get_globals_funcs_, \
+ get_t1_funcs_, \
+ get_t2_funcs_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \
- get_t1_funcs_, get_t2_funcs_) \
- void \
- FT_Init_Class_##class_( FT_Library library, \
- PSHinter_Interface* clazz) \
- { \
- FT_UNUSED(library); \
- clazz->get_globals_funcs = get_globals_funcs_; \
- clazz->get_t1_funcs = get_t1_funcs_; \
- clazz->get_t2_funcs = get_t2_funcs_; \
+#define FT_DEFINE_PSHINTER_INTERFACE( \
+ class_, \
+ get_globals_funcs_, \
+ get_t1_funcs_, \
+ get_t2_funcs_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ PSHinter_Interface* clazz ) \
+ { \
+ FT_UNUSED( library ); \
+ \
+ clazz->get_globals_funcs = get_globals_funcs_; \
+ clazz->get_t1_funcs = get_t1_funcs_; \
+ clazz->get_t2_funcs = get_t2_funcs_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/include/freetype/internal/services/svbdf.h b/include/internal/services/svbdf.h
index 0974752..0974752 100644
--- a/include/freetype/internal/services/svbdf.h
+++ b/include/internal/services/svbdf.h
diff --git a/include/freetype/internal/services/svcid.h b/include/internal/services/svcid.h
index 6be3f93..6be3f93 100644
--- a/include/freetype/internal/services/svcid.h
+++ b/include/internal/services/svcid.h
diff --git a/include/freetype/internal/services/svgldict.h b/include/internal/services/svgldict.h
index 1d12534..1d12534 100644
--- a/include/freetype/internal/services/svgldict.h
+++ b/include/internal/services/svgldict.h
diff --git a/include/freetype/internal/services/svgxval.h b/include/internal/services/svgxval.h
index 2cdab50..2cdab50 100644
--- a/include/freetype/internal/services/svgxval.h
+++ b/include/internal/services/svgxval.h
diff --git a/include/freetype/internal/services/svkern.h b/include/internal/services/svkern.h
index 1488adf..1488adf 100644
--- a/include/freetype/internal/services/svkern.h
+++ b/include/internal/services/svkern.h
diff --git a/include/freetype/internal/services/svmm.h b/include/internal/services/svmm.h
index b08a663..b08a663 100644
--- a/include/freetype/internal/services/svmm.h
+++ b/include/internal/services/svmm.h
diff --git a/include/freetype/internal/services/svotval.h b/include/internal/services/svotval.h
index 970bbd5..970bbd5 100644
--- a/include/freetype/internal/services/svotval.h
+++ b/include/internal/services/svotval.h
diff --git a/include/freetype/internal/services/svpfr.h b/include/internal/services/svpfr.h
index 462786f..462786f 100644
--- a/include/freetype/internal/services/svpfr.h
+++ b/include/internal/services/svpfr.h
diff --git a/include/freetype/internal/services/svpostnm.h b/include/internal/services/svpostnm.h
index a76b4fe..a76b4fe 100644
--- a/include/freetype/internal/services/svpostnm.h
+++ b/include/internal/services/svpostnm.h
diff --git a/include/internal/services/svprop.h b/include/internal/services/svprop.h
new file mode 100644
index 0000000..22da0bb
--- /dev/null
+++ b/include/internal/services/svprop.h
@@ -0,0 +1,81 @@
+/***************************************************************************/
+/* */
+/* svprop.h */
+/* */
+/* The FreeType property service (specification). */
+/* */
+/* Copyright 2012 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 __SVPROP_H__
+#define __SVPROP_H__
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_PROPERTIES "properties"
+
+
+ typedef FT_Error
+ (*FT_Properties_SetFunc)( FT_Module module,
+ const char* property_name,
+ const void* value );
+
+ typedef FT_Error
+ (*FT_Properties_GetFunc)( FT_Module module,
+ const char* property_name,
+ void* value );
+
+
+ FT_DEFINE_SERVICE( Properties )
+ {
+ FT_Properties_SetFunc set_property;
+ FT_Properties_GetFunc get_property;
+ };
+
+
+#ifndef FT_CONFIG_OPTION_PIC
+
+#define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \
+ set_property_, \
+ get_property_ ) \
+ static const FT_Service_PropertiesRec class_ = \
+ { \
+ set_property_, \
+ get_property_ \
+ };
+
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \
+ set_property_, \
+ get_property_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Service_PropertiesRec* clazz ) \
+ { \
+ clazz->set_property = set_property_; \
+ clazz->get_property = get_property_; \
+ }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVPROP_H__ */
+
+
+/* END */
diff --git a/include/freetype/internal/services/svpscmap.h b/include/internal/services/svpscmap.h
index 030948e..030948e 100644
--- a/include/freetype/internal/services/svpscmap.h
+++ b/include/internal/services/svpscmap.h
diff --git a/include/freetype/internal/services/svpsinfo.h b/include/internal/services/svpsinfo.h
index 4bfb506..4bfb506 100644
--- a/include/freetype/internal/services/svpsinfo.h
+++ b/include/internal/services/svpsinfo.h
diff --git a/include/freetype/internal/services/svsfnt.h b/include/internal/services/svsfnt.h
index d3835aa..d3835aa 100644
--- a/include/freetype/internal/services/svsfnt.h
+++ b/include/internal/services/svsfnt.h
diff --git a/include/freetype/internal/services/svttcmap.h b/include/internal/services/svttcmap.h
index 83994aa..4370f4c 100644
--- a/include/freetype/internal/services/svttcmap.h
+++ b/include/internal/services/svttcmap.h
@@ -7,7 +7,7 @@
/* Copyright 2003 by */
/* Masatake YAMATO, Redhat K.K. */
/* */
-/* Copyright 2003, 2008, 2009, 2012 by */
+/* Copyright 2003, 2008, 2009, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -47,7 +47,7 @@ FT_BEGIN_HEADER
/* <Fields> */
/* language :: */
/* The language ID used in Mac fonts. Definitions of values are in */
- /* freetype/ttnameid.h. */
+ /* `ttnameid.h'. */
/* */
/* format :: */
/* The cmap format. OpenType 1.5 defines the formats 0 (byte */
diff --git a/include/freetype/internal/services/svtteng.h b/include/internal/services/svtteng.h
index 58e02a6..58e02a6 100644
--- a/include/freetype/internal/services/svtteng.h
+++ b/include/internal/services/svtteng.h
diff --git a/include/freetype/internal/services/svttglyf.h b/include/internal/services/svttglyf.h
index 369eb84..369eb84 100644
--- a/include/freetype/internal/services/svttglyf.h
+++ b/include/internal/services/svttglyf.h
diff --git a/include/freetype/internal/services/svwinfnt.h b/include/internal/services/svwinfnt.h
index 57f7765..57f7765 100644
--- a/include/freetype/internal/services/svwinfnt.h
+++ b/include/internal/services/svwinfnt.h
diff --git a/include/freetype/internal/services/svxf86nm.h b/include/internal/services/svxf86nm.h
index ca5d884..ca5d884 100644
--- a/include/freetype/internal/services/svxf86nm.h
+++ b/include/internal/services/svxf86nm.h
diff --git a/include/freetype/internal/sfnt.h b/include/internal/sfnt.h
index 905ca8c..d558e86 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/internal/sfnt.h
@@ -4,7 +4,7 @@
/* */
/* High-level `sfnt' driver interface (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 1996-2006, 2009, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -125,77 +125,6 @@ FT_BEGIN_HEADER
(*TT_Done_Face_Func)( TT_Face face );
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- /*************************************************************************/
- /* */
- /* <FuncType> */
- /* TT_Load_SFNT_HeaderRec_Func */
- /* */
- /* <Description> */
- /* Loads the header of a SFNT font file. Supports collections. */
- /* */
- /* <Input> */
- /* face :: A handle to the target face object. */
- /* */
- /* stream :: The input stream. */
- /* */
- /* face_index :: The index of the TrueType font, if we are opening a */
- /* collection. */
- /* */
- /* <Output> */
- /* sfnt :: The SFNT header. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The stream cursor must be at the font file's origin. */
- /* */
- /* This function recognizes fonts embedded in a `TrueType */
- /* collection'. */
- /* */
- /* This function checks that the header is valid by looking at the */
- /* values of `search_range', `entry_selector', and `range_shift'. */
- /* */
- typedef FT_Error
- (*TT_Load_SFNT_HeaderRec_Func)( TT_Face face,
- FT_Stream stream,
- FT_Long face_index,
- SFNT_Header sfnt );
-
-
- /*************************************************************************/
- /* */
- /* <FuncType> */
- /* TT_Load_Directory_Func */
- /* */
- /* <Description> */
- /* Loads the table directory into a face object. */
- /* */
- /* <Input> */
- /* face :: A handle to the target face object. */
- /* */
- /* stream :: The input stream. */
- /* */
- /* sfnt :: The SFNT header. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The stream cursor must be on the first byte after the 4-byte font */
- /* format tag. This is the case just after a call to */
- /* TT_Load_Format_Tag(). */
- /* */
- typedef FT_Error
- (*TT_Load_Directory_Func)( TT_Face face,
- FT_Stream stream,
- SFNT_Header sfnt );
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
/*************************************************************************/
/* */
/* <FuncType> */
@@ -363,88 +292,6 @@ FT_BEGIN_HEADER
TT_SBit_MetricsRec *ametrics );
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- /*************************************************************************/
- /* */
- /* <FuncType> */
- /* TT_Set_SBit_Strike_OldFunc */
- /* */
- /* <Description> */
- /* Select an sbit strike for a given size request. */
- /* */
- /* <Input> */
- /* face :: The target face object. */
- /* */
- /* req :: The size request. */
- /* */
- /* <Output> */
- /* astrike_index :: The index of the sbit strike. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. Returns an error if no */
- /* sbit strike exists for the selected ppem values. */
- /* */
- typedef FT_Error
- (*TT_Set_SBit_Strike_OldFunc)( TT_Face face,
- FT_UInt x_ppem,
- FT_UInt y_ppem,
- FT_ULong* astrike_index );
-
-
- /*************************************************************************/
- /* */
- /* <FuncType> */
- /* TT_CharMap_Load_Func */
- /* */
- /* <Description> */
- /* Loads a given TrueType character map into memory. */
- /* */
- /* <Input> */
- /* face :: A handle to the parent face object. */
- /* */
- /* stream :: A handle to the current stream object. */
- /* */
- /* <InOut> */
- /* cmap :: A pointer to a cmap object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The function assumes that the stream is already in use (i.e., */
- /* opened). In case of error, all partially allocated tables are */
- /* released. */
- /* */
- typedef FT_Error
- (*TT_CharMap_Load_Func)( TT_Face face,
- void* cmap,
- FT_Stream input );
-
-
- /*************************************************************************/
- /* */
- /* <FuncType> */
- /* TT_CharMap_Free_Func */
- /* */
- /* <Description> */
- /* Destroys a character mapping table. */
- /* */
- /* <Input> */
- /* face :: A handle to the parent face object. */
- /* */
- /* cmap :: A handle to a cmap object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- typedef FT_Error
- (*TT_CharMap_Free_Func)( TT_Face face,
- void* cmap );
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
/*************************************************************************/
/* */
/* <FuncType> */
@@ -558,14 +405,18 @@ FT_BEGIN_HEADER
/* <Input> */
/* face :: A handle to the target face object. */
/* */
- /* stream :: The input stream. */
- /* */
/* vertical :: A boolean flag. If set, load vertical metrics. */
/* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
+ /* gindex :: The glyph index. */
/* */
- typedef FT_Error
+ /* <Output> */
+ /* abearing :: The horizontal (or vertical) bearing. Set to zero in */
+ /* case of error. */
+ /* */
+ /* aadvance :: The horizontal (or vertical) advance. Set to zero in */
+ /* case of error. */
+ /* */
+ typedef void
(*TT_Get_Metrics_Func)( TT_Face face,
FT_Bool vertical,
FT_UInt gindex,
@@ -657,11 +508,6 @@ FT_BEGIN_HEADER
TT_Load_Any_Func load_any;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- TT_Load_SFNT_HeaderRec_Func load_sfnt_header;
- TT_Load_Directory_Func load_directory;
-#endif
-
/* these functions are called by `load_face' but they can also */
/* be called from external modules, if there is a need to do so */
TT_Load_Table_Func load_head;
@@ -674,12 +520,6 @@ FT_BEGIN_HEADER
TT_Load_Table_Func load_name;
TT_Free_Table_Func free_name;
- /* optional tables */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- TT_Load_Table_Func load_hdmx_stub;
- TT_Free_Table_Func free_hdmx_stub;
-#endif
-
/* this field was called `load_kerning' up to version 2.1.10 */
TT_Load_Table_Func load_kern;
@@ -690,43 +530,12 @@ FT_BEGIN_HEADER
/* version 2.1.10 */
TT_Load_Table_Func load_bhed;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- /* see `ttsbit.h' */
- TT_Set_SBit_Strike_OldFunc set_sbit_strike_stub;
- TT_Load_Table_Func load_sbits_stub;
-
- /*
- * The following two fields appeared in version 2.1.8, and were placed
- * between `load_sbits' and `load_sbit_image'. We support them as a
- * special exception since they are used by Xfont library within the
- * X.Org xserver, and because the probability that other rogue clients
- * use the other version 2.1.7 fields below is _extremely_ low.
- *
- * Note that this forces us to disable an interesting memory-saving
- * optimization though...
- */
-
- TT_Find_SBit_Image_Func find_sbit_image;
- TT_Load_SBit_Metrics_Func load_sbit_metrics;
-
-#endif
-
TT_Load_SBit_Image_Func load_sbit_image;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- TT_Free_Table_Func free_sbits_stub;
-#endif
-
/* see `ttpost.h' */
TT_Get_PS_Name_Func get_psname;
TT_Free_Table_Func free_psnames;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- TT_CharMap_Load_Func load_charmap_stub;
- TT_CharMap_Free_Func free_charmap_stub;
-#endif
-
/* starting here, the structure differs from version 2.1.7 */
/* this field was introduced in version 2.1.8, named `get_psname' */
@@ -755,136 +564,141 @@ FT_BEGIN_HEADER
#ifndef FT_CONFIG_OPTION_PIC
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-#define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) \
- a,
-#else
- #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a)
-#endif
-#define FT_INTERNAL(a) \
- a,
-
-#define FT_DEFINE_SFNT_INTERFACE(class_, \
- goto_table_, init_face_, load_face_, done_face_, get_interface_, \
- load_any_, load_sfnt_header_, load_directory_, load_head_, \
- load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \
- load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \
- load_kern_, load_gasp_, load_pclt_, load_bhed_, \
- set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \
- load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \
- get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \
- get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \
- set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \
- static const SFNT_Interface class_ = \
- { \
- FT_INTERNAL(goto_table_) \
- FT_INTERNAL(init_face_) \
- FT_INTERNAL(load_face_) \
- FT_INTERNAL(done_face_) \
- FT_INTERNAL(get_interface_) \
- FT_INTERNAL(load_any_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory_) \
- FT_INTERNAL(load_head_) \
- FT_INTERNAL(load_hhea_) \
- FT_INTERNAL(load_cmap_) \
- FT_INTERNAL(load_maxp_) \
- FT_INTERNAL(load_os2_) \
- FT_INTERNAL(load_post_) \
- FT_INTERNAL(load_name_) \
- FT_INTERNAL(free_name_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub_) \
- FT_INTERNAL(load_kern_) \
- FT_INTERNAL(load_gasp_) \
- FT_INTERNAL(load_pclt_) \
- FT_INTERNAL(load_bhed_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics_) \
- FT_INTERNAL(load_sbit_image_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub_) \
- FT_INTERNAL(get_psname_) \
- FT_INTERNAL(free_psnames_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub_) \
- FT_INTERNAL(get_kerning_) \
- FT_INTERNAL(load_font_dir_) \
- FT_INTERNAL(load_hmtx_) \
- FT_INTERNAL(load_eblc_) \
- FT_INTERNAL(free_eblc_) \
- FT_INTERNAL(set_sbit_strike_) \
- FT_INTERNAL(load_strike_metrics_) \
- FT_INTERNAL(get_metrics_) \
+#define FT_DEFINE_SFNT_INTERFACE( \
+ class_, \
+ goto_table_, \
+ init_face_, \
+ load_face_, \
+ done_face_, \
+ get_interface_, \
+ load_any_, \
+ load_head_, \
+ load_hhea_, \
+ load_cmap_, \
+ load_maxp_, \
+ load_os2_, \
+ load_post_, \
+ load_name_, \
+ free_name_, \
+ load_kern_, \
+ load_gasp_, \
+ load_pclt_, \
+ load_bhed_, \
+ load_sbit_image_, \
+ get_psname_, \
+ free_psnames_, \
+ get_kerning_, \
+ load_font_dir_, \
+ load_hmtx_, \
+ load_eblc_, \
+ free_eblc_, \
+ set_sbit_strike_, \
+ load_strike_metrics_, \
+ get_metrics_ ) \
+ static const SFNT_Interface class_ = \
+ { \
+ goto_table_, \
+ init_face_, \
+ load_face_, \
+ done_face_, \
+ get_interface_, \
+ load_any_, \
+ load_head_, \
+ load_hhea_, \
+ load_cmap_, \
+ load_maxp_, \
+ load_os2_, \
+ load_post_, \
+ load_name_, \
+ free_name_, \
+ load_kern_, \
+ load_gasp_, \
+ load_pclt_, \
+ load_bhed_, \
+ load_sbit_image_, \
+ get_psname_, \
+ free_psnames_, \
+ get_kerning_, \
+ load_font_dir_, \
+ load_hmtx_, \
+ load_eblc_, \
+ free_eblc_, \
+ set_sbit_strike_, \
+ load_strike_metrics_, \
+ get_metrics_, \
};
#else /* FT_CONFIG_OPTION_PIC */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-#define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) \
- clazz->a = a_;
-#else
- #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_)
-#endif
-#define FT_INTERNAL(a, a_) \
- clazz->a = a_;
-
-#define FT_DEFINE_SFNT_INTERFACE(class_, \
- goto_table_, init_face_, load_face_, done_face_, get_interface_, \
- load_any_, load_sfnt_header_, load_directory_, load_head_, \
- load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \
- load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \
- load_kern_, load_gasp_, load_pclt_, load_bhed_, \
- set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \
- load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \
- get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \
- get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \
- set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \
- void \
- FT_Init_Class_##class_( FT_Library library, SFNT_Interface* clazz ) \
- { \
- FT_UNUSED(library); \
- FT_INTERNAL(goto_table,goto_table_) \
- FT_INTERNAL(init_face,init_face_) \
- FT_INTERNAL(load_face,load_face_) \
- FT_INTERNAL(done_face,done_face_) \
- FT_INTERNAL(get_interface,get_interface_) \
- FT_INTERNAL(load_any,load_any_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header,load_sfnt_header_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory,load_directory_) \
- FT_INTERNAL(load_head,load_head_) \
- FT_INTERNAL(load_hhea,load_hhea_) \
- FT_INTERNAL(load_cmap,load_cmap_) \
- FT_INTERNAL(load_maxp,load_maxp_) \
- FT_INTERNAL(load_os2,load_os2_) \
- FT_INTERNAL(load_post,load_post_) \
- FT_INTERNAL(load_name,load_name_) \
- FT_INTERNAL(free_name,free_name_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub,load_hdmx_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub,free_hdmx_stub_) \
- FT_INTERNAL(load_kern,load_kern_) \
- FT_INTERNAL(load_gasp,load_gasp_) \
- FT_INTERNAL(load_pclt,load_pclt_) \
- FT_INTERNAL(load_bhed,load_bhed_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub,set_sbit_strike_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub,load_sbits_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image,find_sbit_image_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics,load_sbit_metrics_) \
- FT_INTERNAL(load_sbit_image,load_sbit_image_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub,free_sbits_stub_) \
- FT_INTERNAL(get_psname,get_psname_) \
- FT_INTERNAL(free_psnames,free_psnames_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub,load_charmap_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub,free_charmap_stub_) \
- FT_INTERNAL(get_kerning,get_kerning_) \
- FT_INTERNAL(load_font_dir,load_font_dir_) \
- FT_INTERNAL(load_hmtx,load_hmtx_) \
- FT_INTERNAL(load_eblc,load_eblc_) \
- FT_INTERNAL(free_eblc,free_eblc_) \
- FT_INTERNAL(set_sbit_strike,set_sbit_strike_) \
- FT_INTERNAL(load_strike_metrics,load_strike_metrics_) \
- FT_INTERNAL(get_metrics,get_metrics_) \
+#define FT_INTERNAL( a, a_ ) \
+ clazz->a = a_;
+
+#define FT_DEFINE_SFNT_INTERFACE( \
+ class_, \
+ goto_table_, \
+ init_face_, \
+ load_face_, \
+ done_face_, \
+ get_interface_, \
+ load_any_, \
+ load_head_, \
+ load_hhea_, \
+ load_cmap_, \
+ load_maxp_, \
+ load_os2_, \
+ load_post_, \
+ load_name_, \
+ free_name_, \
+ load_kern_, \
+ load_gasp_, \
+ load_pclt_, \
+ load_bhed_, \
+ load_sbit_image_, \
+ get_psname_, \
+ free_psnames_, \
+ get_kerning_, \
+ load_font_dir_, \
+ load_hmtx_, \
+ load_eblc_, \
+ free_eblc_, \
+ set_sbit_strike_, \
+ load_strike_metrics_, \
+ get_metrics_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ SFNT_Interface* clazz ) \
+ { \
+ FT_UNUSED( library ); \
+ \
+ clazz->goto_table = goto_table_; \
+ clazz->init_face = init_face_; \
+ clazz->load_face = load_face_; \
+ clazz->done_face = done_face_; \
+ clazz->get_interface = get_interface_; \
+ clazz->load_any = load_any_; \
+ clazz->load_head = load_head_; \
+ clazz->load_hhea = load_hhea_; \
+ clazz->load_cmap = load_cmap_; \
+ clazz->load_maxp = load_maxp_; \
+ clazz->load_os2 = load_os2_; \
+ clazz->load_post = load_post_; \
+ clazz->load_name = load_name_; \
+ clazz->free_name = free_name_; \
+ clazz->load_kern = load_kern_; \
+ clazz->load_gasp = load_gasp_; \
+ clazz->load_pclt = load_pclt_; \
+ clazz->load_bhed = load_bhed_; \
+ clazz->load_sbit_image = load_sbit_image_; \
+ clazz->get_psname = get_psname_; \
+ clazz->free_psnames = free_psnames_; \
+ clazz->get_kerning = get_kerning_; \
+ clazz->load_font_dir = load_font_dir_; \
+ clazz->load_hmtx = load_hmtx_; \
+ clazz->load_eblc = load_eblc_; \
+ clazz->free_eblc = free_eblc_; \
+ clazz->set_sbit_strike = set_sbit_strike_; \
+ clazz->load_strike_metrics = load_strike_metrics_; \
+ clazz->get_metrics = get_metrics_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/include/freetype/internal/t1types.h b/include/internal/t1types.h
index f859de2..e20237c 100644
--- a/include/freetype/internal/t1types.h
+++ b/include/internal/t1types.h
@@ -5,7 +5,7 @@
/* Basic Type1/Type2 type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */
+/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -205,10 +205,6 @@ FT_BEGIN_HEADER
FT_CharMapRec charmaprecs[2];
FT_CharMap charmaps[2];
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- PS_Unicodes unicode_map;
-#endif
-
/* support for Multiple Masters fonts */
PS_Blend blend;
diff --git a/include/freetype/internal/tttypes.h b/include/internal/tttypes.h
index 57b1731..ad302b8 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/internal/tttypes.h
@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2002, 2004-2008, 2012-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -140,6 +140,75 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
+ /* WOFF_HeaderRec */
+ /* */
+ /* <Description> */
+ /* WOFF file format header. */
+ /* */
+ /* <Fields> */
+ /* See */
+ /* */
+ /* http://www.w3.org/TR/WOFF/#WOFFHeader */
+ /* */
+ typedef struct WOFF_HeaderRec_
+ {
+ FT_ULong signature;
+ FT_ULong flavor;
+ FT_ULong length;
+ FT_UShort num_tables;
+ FT_UShort reserved;
+ FT_ULong totalSfntSize;
+ FT_UShort majorVersion;
+ FT_UShort minorVersion;
+ FT_ULong metaOffset;
+ FT_ULong metaLength;
+ FT_ULong metaOrigLength;
+ FT_ULong privOffset;
+ FT_ULong privLength;
+
+ } WOFF_HeaderRec, *WOFF_Header;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* WOFF_TableRec */
+ /* */
+ /* <Description> */
+ /* This structure describes a given table of a WOFF font. */
+ /* */
+ /* <Fields> */
+ /* Tag :: A four-bytes tag describing the table. */
+ /* */
+ /* Offset :: The offset of the table from the start of the WOFF */
+ /* font in its resource. */
+ /* */
+ /* CompLength :: Compressed table length (in bytes). */
+ /* */
+ /* OrigLength :: Unompressed table length (in bytes). */
+ /* */
+ /* CheckSum :: The table checksum. This value can be ignored. */
+ /* */
+ /* OrigOffset :: The uncompressed table file offset. This value gets */
+ /* computed while constructing the (uncompressed) SFNT */
+ /* header. It is not contained in the WOFF file. */
+ /* */
+ typedef struct WOFF_TableRec_
+ {
+ FT_ULong Tag; /* table ID */
+ FT_ULong Offset; /* table file offset */
+ FT_ULong CompLength; /* compressed table length */
+ FT_ULong OrigLength; /* uncompressed table length */
+ FT_ULong CheckSum; /* uncompressed checksum */
+
+ FT_ULong OrigOffset; /* uncompressed table file offset */
+ /* (not in the WOFF file) */
+ } WOFF_TableRec, *WOFF_Table;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
/* TT_LongMetricsRec */
/* */
/* <Description> */
@@ -311,87 +380,6 @@ FT_BEGIN_HEADER
} TT_GaspRec;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* TT_HdmxEntryRec */
- /* */
- /* <Description> */
- /* A small structure used to model the pre-computed widths of a given */
- /* size. They are found in the `hdmx' table. */
- /* */
- /* <Fields> */
- /* ppem :: The pixels per EM value at which these metrics apply. */
- /* */
- /* max_width :: The maximum advance width for this metric. */
- /* */
- /* widths :: An array of widths. Note: These are 8-bit bytes. */
- /* */
- typedef struct TT_HdmxEntryRec_
- {
- FT_Byte ppem;
- FT_Byte max_width;
- FT_Byte* widths;
-
- } TT_HdmxEntryRec, *TT_HdmxEntry;
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* TT_HdmxRec */
- /* */
- /* <Description> */
- /* A structure used to model the `hdmx' table, which contains */
- /* pre-computed widths for a set of given sizes/dimensions. */
- /* */
- /* <Fields> */
- /* version :: The version number. */
- /* */
- /* num_records :: The number of hdmx records. */
- /* */
- /* records :: An array of hdmx records. */
- /* */
- typedef struct TT_HdmxRec_
- {
- FT_UShort version;
- FT_Short num_records;
- TT_HdmxEntry records;
-
- } TT_HdmxRec, *TT_Hdmx;
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* TT_Kern0_PairRec */
- /* */
- /* <Description> */
- /* A structure used to model a kerning pair for the kerning table */
- /* format 0. The engine now loads this table if it finds one in the */
- /* font file. */
- /* */
- /* <Fields> */
- /* left :: The index of the left glyph in pair. */
- /* */
- /* right :: The index of the right glyph in pair. */
- /* */
- /* value :: The kerning distance. A positive value spaces the */
- /* glyphs, a negative one makes them closer. */
- /* */
- typedef struct TT_Kern0_PairRec_
- {
- FT_UShort left; /* index of left glyph in pair */
- FT_UShort right; /* index of right glyph in pair */
- FT_FWord value; /* kerning value */
-
- } TT_Kern0_PairRec, *TT_Kern0_Pair;
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -434,16 +422,16 @@ FT_BEGIN_HEADER
/* */
typedef struct TT_SBit_MetricsRec_
{
- FT_Byte height;
- FT_Byte width;
+ FT_UShort height;
+ FT_UShort width;
- FT_Char horiBearingX;
- FT_Char horiBearingY;
- FT_Byte horiAdvance;
+ FT_Short horiBearingX;
+ FT_Short horiBearingY;
+ FT_UShort horiAdvance;
- FT_Char vertBearingX;
- FT_Char vertBearingY;
- FT_Byte vertAdvance;
+ FT_Short vertBearingX;
+ FT_Short vertBearingY;
+ FT_UShort vertAdvance;
} TT_SBit_MetricsRec, *TT_SBit_Metrics;
@@ -1060,6 +1048,20 @@ FT_BEGIN_HEADER
(*TT_Loader_EndGlyphFunc)( TT_Loader loader );
+ typedef enum TT_SbitTableType_
+ {
+ TT_SBIT_TABLE_TYPE_NONE = 0,
+ TT_SBIT_TABLE_TYPE_EBLC, /* `EBLC' (Microsoft), */
+ /* `bloc' (Apple) */
+ TT_SBIT_TABLE_TYPE_CBLC, /* `CBLC' (Google) */
+ TT_SBIT_TABLE_TYPE_SBIX, /* `sbix' (Apple) */
+
+ /* do not remove */
+ TT_SBIT_TABLE_TYPE_MAX
+
+ } TT_SbitTableType;
+
+
/*************************************************************************/
/* */
/* TrueType Face Type */
@@ -1171,13 +1173,6 @@ FT_BEGIN_HEADER
/* */
/* pclt :: The `pclt' SFNT table. */
/* */
- /* num_sbit_strikes :: The number of sbit strikes, i.e., bitmap */
- /* sizes, embedded in this font. */
- /* */
- /* sbit_strikes :: An array of sbit strikes embedded in this */
- /* font. This table is optional in a */
- /* TrueType/OpenType font. */
- /* */
/* num_sbit_scales :: The number of sbit scales for this font. */
/* */
/* sbit_scales :: Array of sbit scales embedded in this */
@@ -1269,9 +1264,6 @@ FT_BEGIN_HEADER
TT_HoriHeader horizontal; /* TrueType horizontal header */
TT_MaxProfile max_profile;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- FT_ULong max_components; /* stubbed to 0 */
-#endif
FT_Bool vertical_info;
TT_VertHeader vertical; /* TT Vertical header, if present */
@@ -1308,11 +1300,6 @@ FT_BEGIN_HEADER
/* */
/***********************************************************************/
- /* horizontal device metrics */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- TT_HdmxRec hdmx;
-#endif
-
/* grid-fitting and scaling table */
TT_GaspRec gasp; /* the `gasp' table */
@@ -1320,11 +1307,6 @@ FT_BEGIN_HEADER
TT_PCLT pclt;
/* embedded bitmaps support */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- FT_ULong num_sbit_strikes;
- TT_SBit_Strike sbit_strikes;
-#endif
-
FT_ULong num_sbit_scales;
TT_SBit_Scale sbit_scales;
@@ -1338,12 +1320,6 @@ FT_BEGIN_HEADER
/* */
/***********************************************************************/
- /* the glyph locations */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- FT_UShort num_locations_stub;
- FT_Long* glyph_locations_stub;
-#endif
-
/* the font program, if any */
FT_ULong font_program_size;
FT_Byte* font_program;
@@ -1356,13 +1332,6 @@ FT_BEGIN_HEADER
FT_ULong cvt_size;
FT_Short* cvt;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- /* the format 0 kerning table, if any */
- FT_Int num_kern_pairs;
- FT_Int kern_table_index;
- TT_Kern0_Pair kern_pairs;
-#endif
-
/* A pointer to the bytecode interpreter to use. This is also */
/* used to hook the debugger for the `ttdebug' utility. */
TT_Interpreter interpreter;
@@ -1383,11 +1352,8 @@ FT_BEGIN_HEADER
const char* postscript_name;
- /* since version 2.1.8, but was originally placed after */
- /* `glyph_locations_stub' */
FT_ULong glyf_len;
- /* since version 2.1.8, but was originally placed before `extra' */
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
FT_Bool doblend;
GX_Blend blend;
@@ -1412,6 +1378,7 @@ FT_BEGIN_HEADER
FT_Byte* sbit_table;
FT_ULong sbit_table_size;
+ TT_SbitTableType sbit_table_type;
FT_UInt sbit_num_strikes;
FT_Byte* kern_table;
@@ -1428,6 +1395,13 @@ FT_BEGIN_HEADER
FT_ULong horz_metrics_offset;
FT_ULong vert_metrics_offset;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ /* since 2.4.12 */
+ FT_ULong sph_found_func_flags; /* special functions found */
+ /* for this face */
+ FT_Bool sph_compatibility_mode;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
} TT_FaceRec;
@@ -1443,7 +1417,7 @@ FT_BEGIN_HEADER
/* <Fields> */
/* memory :: A handle to the memory manager. */
/* */
- /* max_points :: The maximal size in points of the zone. */
+ /* max_points :: The maximum size in points of the zone. */
/* */
/* max_contours :: Max size in links contours of the zone. */
/* */
@@ -1505,7 +1479,6 @@ FT_BEGIN_HEADER
FT_Int advance;
FT_Int linear;
FT_Bool linear_def;
- FT_Bool preserve_pps;
FT_Vector pp1;
FT_Vector pp2;
diff --git a/include/freetype/t1tables.h b/include/t1tables.h
index a14255e..61aefdd 100644
--- a/include/freetype/t1tables.h
+++ b/include/t1tables.h
@@ -5,7 +5,7 @@
/* Basic Type 1/Type 2 tables definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */
+/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -49,6 +49,26 @@ FT_BEGIN_HEADER
/* This section contains the definition of Type 1-specific tables, */
/* including structures related to other PostScript font formats. */
/* */
+ /* <Order> */
+ /* PS_FontInfoRec */
+ /* PS_FontInfo */
+ /* PS_PrivateRec */
+ /* PS_Private */
+ /* */
+ /* CID_FaceDictRec */
+ /* CID_FaceDict */
+ /* CID_FaceInfoRec */
+ /* CID_FaceInfo */
+ /* */
+ /* FT_Has_PS_Glyph_Names */
+ /* FT_Get_PS_Font_Info */
+ /* FT_Get_PS_Font_Private */
+ /* FT_Get_PS_Font_Value */
+ /* */
+ /* T1_Blend_Flags */
+ /* T1_EncodingType */
+ /* PS_Dict_Keys */
+ /* */
/*************************************************************************/
@@ -190,14 +210,30 @@ FT_BEGIN_HEADER
/* given blend dictionary (font info or private). Used to support */
/* Multiple Masters fonts. */
/* */
+ /* <Values> */
+ /* T1_BLEND_UNDERLINE_POSITION :: */
+ /* T1_BLEND_UNDERLINE_THICKNESS :: */
+ /* T1_BLEND_ITALIC_ANGLE :: */
+ /* T1_BLEND_BLUE_VALUES :: */
+ /* T1_BLEND_OTHER_BLUES :: */
+ /* T1_BLEND_STANDARD_WIDTH :: */
+ /* T1_BLEND_STANDARD_HEIGHT :: */
+ /* T1_BLEND_STEM_SNAP_WIDTHS :: */
+ /* T1_BLEND_STEM_SNAP_HEIGHTS :: */
+ /* T1_BLEND_BLUE_SCALE :: */
+ /* T1_BLEND_BLUE_SHIFT :: */
+ /* T1_BLEND_FAMILY_BLUES :: */
+ /* T1_BLEND_FAMILY_OTHER_BLUES :: */
+ /* T1_BLEND_FORCE_BOLD :: */
+ /* */
typedef enum T1_Blend_Flags_
{
- /*# required fields in a FontInfo blend dictionary */
+ /* required fields in a FontInfo blend dictionary */
T1_BLEND_UNDERLINE_POSITION = 0,
T1_BLEND_UNDERLINE_THICKNESS,
T1_BLEND_ITALIC_ANGLE,
- /*# required fields in a Private blend dictionary */
+ /* required fields in a Private blend dictionary */
T1_BLEND_BLUE_VALUES,
T1_BLEND_OTHER_BLUES,
T1_BLEND_STANDARD_WIDTH,
@@ -210,15 +246,13 @@ FT_BEGIN_HEADER
T1_BLEND_FAMILY_OTHER_BLUES,
T1_BLEND_FORCE_BOLD,
- /*# never remove */
- T1_BLEND_MAX
+ T1_BLEND_MAX /* do not remove */
} T1_Blend_Flags;
- /* */
-
- /*# backwards compatible definitions */
+ /* these constants are deprecated; use the corresponding */
+ /* `T1_Blend_Flags' values instead */
#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION
#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS
#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE
@@ -235,6 +269,8 @@ FT_BEGIN_HEADER
#define t1_blend_force_bold T1_BLEND_FORCE_BOLD
#define t1_blend_max T1_BLEND_MAX
+ /* */
+
/* maximum number of Multiple Masters designs, as defined in the spec */
#define T1_MAX_MM_DESIGNS 16
@@ -333,10 +369,17 @@ FT_BEGIN_HEADER
/* */
typedef struct CID_FaceDictRec_* CID_FaceDict;
- /* */
-
- /* backwards-compatible definition */
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* CID_FontDict */
+ /* */
+ /* <Description> */
+ /* This type is equivalent to @CID_FaceDictRec. It is deprecated but */
+ /* kept to maintain source compatibility between various versions of */
+ /* FreeType. */
+ /* */
typedef CID_FaceDictRec CID_FontDict;
@@ -503,6 +546,13 @@ FT_BEGIN_HEADER
/* An enumeration describing the `Encoding' entry in a Type 1 */
/* dictionary. */
/* */
+ /* <Values> */
+ /* T1_ENCODING_TYPE_NONE :: */
+ /* T1_ENCODING_TYPE_ARRAY :: */
+ /* T1_ENCODING_TYPE_STANDARD :: */
+ /* T1_ENCODING_TYPE_ISOLATIN1 :: */
+ /* T1_ENCODING_TYPE_EXPERT :: */
+ /* */
typedef enum T1_EncodingType_
{
T1_ENCODING_TYPE_NONE = 0,
@@ -523,6 +573,54 @@ FT_BEGIN_HEADER
/* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */
/* the Type~1 dictionary entry to retrieve. */
/* */
+ /* <Values> */
+ /* PS_DICT_FONT_TYPE :: */
+ /* PS_DICT_FONT_MATRIX :: */
+ /* PS_DICT_FONT_BBOX :: */
+ /* PS_DICT_PAINT_TYPE :: */
+ /* PS_DICT_FONT_NAME :: */
+ /* PS_DICT_UNIQUE_ID :: */
+ /* PS_DICT_NUM_CHAR_STRINGS :: */
+ /* PS_DICT_CHAR_STRING_KEY :: */
+ /* PS_DICT_CHAR_STRING :: */
+ /* PS_DICT_ENCODING_TYPE :: */
+ /* PS_DICT_ENCODING_ENTRY :: */
+ /* PS_DICT_NUM_SUBRS :: */
+ /* PS_DICT_SUBR :: */
+ /* PS_DICT_STD_HW :: */
+ /* PS_DICT_STD_VW :: */
+ /* PS_DICT_NUM_BLUE_VALUES :: */
+ /* PS_DICT_BLUE_VALUE :: */
+ /* PS_DICT_BLUE_FUZZ :: */
+ /* PS_DICT_NUM_OTHER_BLUES :: */
+ /* PS_DICT_OTHER_BLUE :: */
+ /* PS_DICT_NUM_FAMILY_BLUES :: */
+ /* PS_DICT_FAMILY_BLUE :: */
+ /* PS_DICT_NUM_FAMILY_OTHER_BLUES :: */
+ /* PS_DICT_FAMILY_OTHER_BLUE :: */
+ /* PS_DICT_BLUE_SCALE :: */
+ /* PS_DICT_BLUE_SHIFT :: */
+ /* PS_DICT_NUM_STEM_SNAP_H :: */
+ /* PS_DICT_STEM_SNAP_H :: */
+ /* PS_DICT_NUM_STEM_SNAP_V :: */
+ /* PS_DICT_STEM_SNAP_V :: */
+ /* PS_DICT_FORCE_BOLD :: */
+ /* PS_DICT_RND_STEM_UP :: */
+ /* PS_DICT_MIN_FEATURE :: */
+ /* PS_DICT_LEN_IV :: */
+ /* PS_DICT_PASSWORD :: */
+ /* PS_DICT_LANGUAGE_GROUP :: */
+ /* PS_DICT_VERSION :: */
+ /* PS_DICT_NOTICE :: */
+ /* PS_DICT_FULL_NAME :: */
+ /* PS_DICT_FAMILY_NAME :: */
+ /* PS_DICT_WEIGHT :: */
+ /* PS_DICT_IS_FIXED_PITCH :: */
+ /* PS_DICT_UNDERLINE_POSITION :: */
+ /* PS_DICT_UNDERLINE_THICKNESS :: */
+ /* PS_DICT_FS_TYPE :: */
+ /* PS_DICT_ITALIC_ANGLE :: */
+ /* */
typedef enum PS_Dict_Keys_
{
/* conventionally in the font dictionary */
diff --git a/include/freetype/ttnameid.h b/include/ttnameid.h
index 66aef04..e65b558 100644
--- a/include/freetype/ttnameid.h
+++ b/include/ttnameid.h
@@ -4,7 +4,7 @@
/* */
/* TrueType name ID definitions (specification only). */
/* */
-/* Copyright 1996-2002, 2003, 2004, 2006, 2007, 2008 by */
+/* Copyright 1996-2004, 2006-2008, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -316,11 +316,12 @@ FT_BEGIN_HEADER
/* */
/* Possible values of the language identifier field in the name records */
/* of the TTF `name' table if the `platform' identifier code is */
- /* TT_PLATFORM_MACINTOSH. */
+ /* TT_PLATFORM_MACINTOSH. These values are also used as return values */
+ /* for function @FT_Get_CMap_Language_ID. */
/* */
/* The canonical source for the Apple assigned Language ID's is at */
/* */
- /* http://fonts.apple.com/TTRefMan/RM06/Chap6name.html */
+ /* https://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html */
/* */
#define TT_MAC_LANGID_ENGLISH 0
#define TT_MAC_LANGID_FRENCH 1
@@ -461,45 +462,34 @@ FT_BEGIN_HEADER
/* of the TTF `name' table if the `platform' identifier code is */
/* TT_PLATFORM_MICROSOFT. */
/* */
- /* The canonical source for the MS assigned LCID's (seems to) be at */
+ /* The canonical source for the MS assigned LCIDs is */
/* */
/* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */
/* */
- /* It used to be at various places, among them */
- /* */
- /* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt */
- /* http://www.microsoft.com/globaldev/reference/loclanghome.asp */
- /* http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP */
- /* http://msdn.microsoft.com/library/en-us/passport25/ */
- /* NET_Passport_VBScript_Documentation/Single_Sign_In/ */
- /* Advanced_Single_Sign_In/Localization_and_LCIDs.asp */
- /* */
- /* Hopefully, it seems now that the Globaldev site prevails... */
- /* (updated by Antoine, 2004-02-17) */
#define TT_MS_LANGID_ARABIC_GENERAL 0x0001
#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401
#define TT_MS_LANGID_ARABIC_IRAQ 0x0801
-#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01
+#define TT_MS_LANGID_ARABIC_EGYPT 0x0C01
#define TT_MS_LANGID_ARABIC_LIBYA 0x1001
#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401
#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801
-#define TT_MS_LANGID_ARABIC_TUNISIA 0x1c01
+#define TT_MS_LANGID_ARABIC_TUNISIA 0x1C01
#define TT_MS_LANGID_ARABIC_OMAN 0x2001
#define TT_MS_LANGID_ARABIC_YEMEN 0x2401
#define TT_MS_LANGID_ARABIC_SYRIA 0x2801
-#define TT_MS_LANGID_ARABIC_JORDAN 0x2c01
+#define TT_MS_LANGID_ARABIC_JORDAN 0x2C01
#define TT_MS_LANGID_ARABIC_LEBANON 0x3001
#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401
#define TT_MS_LANGID_ARABIC_UAE 0x3801
-#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3c01
+#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01
#define TT_MS_LANGID_ARABIC_QATAR 0x4001
#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402
#define TT_MS_LANGID_CATALAN_SPAIN 0x0403
#define TT_MS_LANGID_CHINESE_GENERAL 0x0004
#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404
#define TT_MS_LANGID_CHINESE_PRC 0x0804
-#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0c04
+#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04
#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004
#if 1 /* this looks like the correct value */
@@ -517,7 +507,7 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_DANISH_DENMARK 0x0406
#define TT_MS_LANGID_GERMAN_GERMANY 0x0407
#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807
-#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0c07
+#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07
#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007
#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407
#define TT_MS_LANGID_GREEK_GREECE 0x0408
@@ -530,69 +520,69 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009
#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409
#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809
-#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0c09
+#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09
#define TT_MS_LANGID_ENGLISH_CANADA 0x1009
#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409
#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809
-#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1c09
+#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1C09
#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009
#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409
#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809
-#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2c09
+#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09
#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009
#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409
#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809
-#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3c09
+#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09
#define TT_MS_LANGID_ENGLISH_INDIA 0x4009
#define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409
#define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809
-#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040a
-#define TT_MS_LANGID_SPANISH_MEXICO 0x080a
-#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0c0a
-#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100a
-#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140a
-#define TT_MS_LANGID_SPANISH_PANAMA 0x180a
-#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1c0a
-#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200a
-#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240a
-#define TT_MS_LANGID_SPANISH_PERU 0x280a
-#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2c0a
-#define TT_MS_LANGID_SPANISH_ECUADOR 0x300a
-#define TT_MS_LANGID_SPANISH_CHILE 0x340a
-#define TT_MS_LANGID_SPANISH_URUGUAY 0x380a
-#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3c0a
-#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400a
-#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440a
-#define TT_MS_LANGID_SPANISH_HONDURAS 0x480a
-#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4c0a
-#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500a
-#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540a
+#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A
+#define TT_MS_LANGID_SPANISH_MEXICO 0x080A
+#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0C0A
+#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A
+#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A
+#define TT_MS_LANGID_SPANISH_PANAMA 0x180A
+#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1C0A
+#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200A
+#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240A
+#define TT_MS_LANGID_SPANISH_PERU 0x280A
+#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2C0A
+#define TT_MS_LANGID_SPANISH_ECUADOR 0x300A
+#define TT_MS_LANGID_SPANISH_CHILE 0x340A
+#define TT_MS_LANGID_SPANISH_URUGUAY 0x380A
+#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3C0A
+#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400A
+#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440A
+#define TT_MS_LANGID_SPANISH_HONDURAS 0x480A
+#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A
+#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A
+#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A
/* The following ID blatantly violate MS specs by using a */
/* sublanguage > 0x1F. */
-#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40aU
-#define TT_MS_LANGID_FINNISH_FINLAND 0x040b
-#define TT_MS_LANGID_FRENCH_FRANCE 0x040c
-#define TT_MS_LANGID_FRENCH_BELGIUM 0x080c
-#define TT_MS_LANGID_FRENCH_CANADA 0x0c0c
-#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100c
-#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140c
-#define TT_MS_LANGID_FRENCH_MONACO 0x180c
-#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1c0c
-#define TT_MS_LANGID_FRENCH_REUNION 0x200c
-#define TT_MS_LANGID_FRENCH_CONGO 0x240c
+#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU
+#define TT_MS_LANGID_FINNISH_FINLAND 0x040B
+#define TT_MS_LANGID_FRENCH_FRANCE 0x040C
+#define TT_MS_LANGID_FRENCH_BELGIUM 0x080C
+#define TT_MS_LANGID_FRENCH_CANADA 0x0C0C
+#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C
+#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C
+#define TT_MS_LANGID_FRENCH_MONACO 0x180C
+#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C
+#define TT_MS_LANGID_FRENCH_REUNION 0x200C
+#define TT_MS_LANGID_FRENCH_CONGO 0x240C
/* which was formerly: */
#define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO
-#define TT_MS_LANGID_FRENCH_SENEGAL 0x280c
-#define TT_MS_LANGID_FRENCH_CAMEROON 0x2c0c
-#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300c
-#define TT_MS_LANGID_FRENCH_MALI 0x340c
-#define TT_MS_LANGID_FRENCH_MOROCCO 0x380c
-#define TT_MS_LANGID_FRENCH_HAITI 0x3c0c
- /* and another violation of the spec (see 0xE40aU) */
-#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40cU
-#define TT_MS_LANGID_HEBREW_ISRAEL 0x040d
-#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040e
-#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040f
+#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C
+#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C
+#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C
+#define TT_MS_LANGID_FRENCH_MALI 0x340C
+#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C
+#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C
+ /* and another violation of the spec (see 0xE40AU) */
+#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU
+#define TT_MS_LANGID_HEBREW_ISRAEL 0x040D
+#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E
+#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F
#define TT_MS_LANGID_ITALIAN_ITALY 0x0410
#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810
#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411
@@ -610,27 +600,27 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818
#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419
#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819
-#define TT_MS_LANGID_CROATIAN_CROATIA 0x041a
-#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081a
-#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0c1a
+#define TT_MS_LANGID_CROATIAN_CROATIA 0x041A
+#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A
+#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A
#if 0 /* this used to be this value, but it looks like we were wrong */
-#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101a
+#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101A
#else /* current sources say */
-#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101a
-#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141a
+#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A
+#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A
/* and XPsp2 Platform SDK added (2004-07-26) */
/* Names are shortened to be significant within 40 chars. */
-#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181a
-#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181a
+#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A
+#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181A
#endif
-#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041b
-#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041c
-#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041d
-#define TT_MS_LANGID_SWEDISH_FINLAND 0x081d
-#define TT_MS_LANGID_THAI_THAILAND 0x041e
-#define TT_MS_LANGID_TURKISH_TURKEY 0x041f
+#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B
+#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C
+#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D
+#define TT_MS_LANGID_SWEDISH_FINLAND 0x081D
+#define TT_MS_LANGID_THAI_THAILAND 0x041E
+#define TT_MS_LANGID_TURKISH_TURKEY 0x041F
#define TT_MS_LANGID_URDU_PAKISTAN 0x0420
#define TT_MS_LANGID_URDU_INDIA 0x0820
#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421
@@ -643,13 +633,13 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827
#define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428
#define TT_MS_LANGID_FARSI_IRAN 0x0429
-#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042a
-#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042b
-#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042c
-#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082c
-#define TT_MS_LANGID_BASQUE_SPAIN 0x042d
-#define TT_MS_LANGID_SORBIAN_GERMANY 0x042e
-#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042f
+#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A
+#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B
+#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C
+#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C
+#define TT_MS_LANGID_BASQUE_SPAIN 0x042D
+#define TT_MS_LANGID_SORBIAN_GERMANY 0x042E
+#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F
#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430
#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431
#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432
@@ -660,32 +650,32 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437
#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438
#define TT_MS_LANGID_HINDI_INDIA 0x0439
-#define TT_MS_LANGID_MALTESE_MALTA 0x043a
+#define TT_MS_LANGID_MALTESE_MALTA 0x043A
/* Added by XPsp2 Platform SDK (2004-07-26) */
-#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043b
-#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083b
-#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3b
-#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103b
-#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143b
-#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183b
-#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3b
-#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203b
-#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243b
+#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B
+#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B
+#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B
+#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103B
+#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143B
+#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183B
+#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B
+#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B
+#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B
/* ... and we also keep our old identifier... */
-#define TT_MS_LANGID_SAAMI_LAPONIA 0x043b
+#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B
#if 0 /* this seems to be a previous inversion */
-#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c
-#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c
+#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C
+#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C
#else
-#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c
-#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c
+#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C
+#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C
#endif
-#define TT_MS_LANGID_YIDDISH_GERMANY 0x043d
-#define TT_MS_LANGID_MALAY_MALAYSIA 0x043e
-#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083e
-#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043f
+#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D
+#define TT_MS_LANGID_MALAY_MALAYSIA 0x043E
+#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E
+#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043F
#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440
/* alias declared in Windows 2000 */
#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \
@@ -703,12 +693,12 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_GUJARATI_INDIA 0x0447
#define TT_MS_LANGID_ORIYA_INDIA 0x0448
#define TT_MS_LANGID_TAMIL_INDIA 0x0449
-#define TT_MS_LANGID_TELUGU_INDIA 0x044a
-#define TT_MS_LANGID_KANNADA_INDIA 0x044b
-#define TT_MS_LANGID_MALAYALAM_INDIA 0x044c
-#define TT_MS_LANGID_ASSAMESE_INDIA 0x044d
-#define TT_MS_LANGID_MARATHI_INDIA 0x044e
-#define TT_MS_LANGID_SANSKRIT_INDIA 0x044f
+#define TT_MS_LANGID_TELUGU_INDIA 0x044A
+#define TT_MS_LANGID_KANNADA_INDIA 0x044B
+#define TT_MS_LANGID_MALAYALAM_INDIA 0x044C
+#define TT_MS_LANGID_ASSAMESE_INDIA 0x044D
+#define TT_MS_LANGID_MARATHI_INDIA 0x044E
+#define TT_MS_LANGID_SANSKRIT_INDIA 0x044F
#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850
#define TT_MS_LANGID_TIBETAN_CHINA 0x0451
@@ -742,13 +732,13 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459
#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859
/* Missing a LCID for Sindhi in Devanagari script */
-#define TT_MS_LANGID_SYRIAC_SYRIA 0x045a
-#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045b
-#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045c
-#define TT_MS_LANGID_INUKTITUT_CANADA 0x045d
-#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045e
-#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045f
-#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085f
+#define TT_MS_LANGID_SYRIAC_SYRIA 0x045A
+#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045B
+#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C
+#define TT_MS_LANGID_INUKTITUT_CANADA 0x045D
+#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E
+#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F
+#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085F
/* Missing a LCID for Tifinagh script */
#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460
/* Spelled this way by XPsp2 Platform SDK (2004-07-26) */
@@ -768,15 +758,15 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467
#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468
#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469
-#define TT_MS_LANGID_YORUBA_NIGERIA 0x046a
-#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046b
-#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086b
-#define TT_MS_LANGID_QUECHUA_PERU 0x0c6b
-#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046c
+#define TT_MS_LANGID_YORUBA_NIGERIA 0x046A
+#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B
+#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B
+#define TT_MS_LANGID_QUECHUA_PERU 0x0C6B
+#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046C
/* Also spelled by XPsp2 Platform SDK (2004-07-26) */
#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \
TT_MS_LANGID_SEPEDI_SOUTH_AFRICA
- /* language codes 0x046d, 0x046e and 0x046f are (still) unknown. */
+ /* language codes 0x046D, 0x046E and 0x046F are (still) unknown. */
#define TT_MS_LANGID_IGBO_NIGERIA 0x0470
#define TT_MS_LANGID_KANURI_NIGERIA 0x0471
#define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472
@@ -793,12 +783,12 @@ FT_BEGIN_HEADER
/* studying). */
#define TT_MS_LANGID_YI_CHINA 0x0478
#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479
- /* language codes from 0x047a to 0x047f are (still) unknown. */
+ /* language codes from 0x047A to 0x047F are (still) unknown. */
#define TT_MS_LANGID_UIGHUR_CHINA 0x0480
#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481
#if 0 /* not deemed useful for fonts */
-#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04ff
+#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04FF
#endif
@@ -1218,7 +1208,7 @@ FT_BEGIN_HEADER
/* */
/* Here some alias #defines in order to be clearer. */
/* */
- /* These are not always #defined to stay within the 31~character limit */
+ /* These are not always #defined to stay within the 31~character limit, */
/* which some compilers have. */
/* */
/* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */
diff --git a/include/freetype/tttables.h b/include/tttables.h
index 02236c2..e1d8b05 100644
--- a/include/freetype/tttables.h
+++ b/include/tttables.h
@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType tables definitions and interface */
/* (specification only). */
/* */
-/* Copyright 1996-2005, 2008-2011 by */
+/* Copyright 1996-2005, 2008-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -48,6 +48,25 @@ FT_BEGIN_HEADER
/* This section contains the definition of TrueType-specific tables */
/* as well as some routines used to access and process them. */
/* */
+ /* <Order> */
+ /* TT_Header */
+ /* TT_HoriHeader */
+ /* TT_VertHeader */
+ /* TT_OS2 */
+ /* TT_Postscript */
+ /* TT_PCLT */
+ /* TT_MaxProfile */
+ /* */
+ /* FT_Sfnt_Tag */
+ /* FT_Get_Sfnt_Table */
+ /* FT_Load_Sfnt_Table */
+ /* FT_Sfnt_Table_Info */
+ /* */
+ /* FT_Get_CMap_Language_ID */
+ /* FT_Get_CMap_Format */
+ /* */
+ /* FT_PARAM_TAG_UNPATENTED_HINTING */
+ /* */
/*************************************************************************/
@@ -170,8 +189,8 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
- /* be identical except for the names of their fields which */
- /* are different. */
+ /* be identical except for the names of their fields, */
+ /* which are different. */
/* */
/* This ensures that a single function in the `ttload' */
/* module is able to read both the horizontal and vertical */
@@ -296,8 +315,8 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
- /* be identical except for the names of their fields which */
- /* are different. */
+ /* be identical except for the names of their fields, */
+ /* which are different. */
/* */
/* This ensures that a single function in the `ttload' */
/* module is able to read both the horizontal and vertical */
@@ -340,12 +359,11 @@ FT_BEGIN_HEADER
/* TT_OS2 */
/* */
/* <Description> */
- /* A structure used to model a TrueType OS/2 table. This is the long */
- /* table version. All fields comply to the TrueType specification. */
+ /* A structure used to model a TrueType OS/2 table. All fields */
+ /* comply to the OpenType specification. */
/* */
- /* Note that we now support old Mac fonts which do not include an */
- /* OS/2 table. In this case, the `version' field is always set to */
- /* 0xFFFF. */
+ /* Note that we now support old Mac fonts that do not include an OS/2 */
+ /* table. In this case, the `version' field is always set to 0xFFFF. */
/* */
typedef struct TT_OS2_
{
@@ -384,12 +402,12 @@ FT_BEGIN_HEADER
FT_UShort usWinAscent;
FT_UShort usWinDescent;
- /* only version 1 tables: */
+ /* only version 1 and higher: */
FT_ULong ulCodePageRange1; /* Bits 0-31 */
FT_ULong ulCodePageRange2; /* Bits 32-63 */
- /* only version 2 tables: */
+ /* only version 2 and higher: */
FT_Short sxHeight;
FT_Short sCapHeight;
@@ -397,6 +415,11 @@ FT_BEGIN_HEADER
FT_UShort usBreakChar;
FT_UShort usMaxContext;
+ /* only version 5 and higher: */
+
+ FT_UShort usLowerOpticalPointSize; /* in twips (1/20th points) */
+ FT_UShort usUpperOpticalPointSize; /* in twips (1/20th points) */
+
} TT_OS2;
@@ -465,7 +488,7 @@ FT_BEGIN_HEADER
/* TT_MaxProfile */
/* */
/* <Description> */
- /* The maximum profile is a table containing many max values which */
+ /* The maximum profile is a table containing many max values, which */
/* can be used to pre-allocate arrays. This ensures that no memory */
/* allocation occurs during a glyph load. */
/* */
@@ -555,21 +578,44 @@ FT_BEGIN_HEADER
/* An enumeration used to specify the index of an SFNT table. */
/* Used in the @FT_Get_Sfnt_Table API function. */
/* */
+ /* <Values> */
+ /* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */
+ /* */
+ /* FT_SFNT_MAXP :: To access the font's @TT_MaxProfile structure. */
+ /* */
+ /* FT_SFNT_OS2 :: To access the font's @TT_OS2 structure. */
+ /* */
+ /* FT_SFNT_HHEA :: To access the font's @TT_HoriHeader structure. */
+ /* */
+ /* FT_SFNT_VHEA :: To access the font's @TT_VertHeader struture. */
+ /* */
+ /* FT_SFNT_POST :: To access the font's @TT_Postscript structure. */
+ /* */
+ /* FT_SFNT_PCLT :: To access the font's @TT_PCLT structure. */
+ /* */
typedef enum FT_Sfnt_Tag_
{
- 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 */
+ FT_SFNT_HEAD,
+ FT_SFNT_MAXP,
+ FT_SFNT_OS2,
+ FT_SFNT_HHEA,
+ FT_SFNT_VHEA,
+ FT_SFNT_POST,
+ FT_SFNT_PCLT,
- sfnt_max /* internal end mark */
+ FT_SFNT_MAX
} FT_Sfnt_Tag;
- /* */
+ /* these constants are deprecated; use the corresponding `FT_Sfnt_Tag' */
+ /* values instead */
+#define ft_sfnt_head FT_SFNT_HEAD
+#define ft_sfnt_maxp FT_SFNT_MAXP
+#define ft_sfnt_os2 FT_SFNT_OS2
+#define ft_sfnt_hhea FT_SFNT_HHEA
+#define ft_sfnt_vhea FT_SFNT_VHEA
+#define ft_sfnt_post FT_SFNT_POST
+#define ft_sfnt_pclt FT_SFNT_PCLT
/*************************************************************************/
@@ -600,6 +646,16 @@ FT_BEGIN_HEADER
/* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */
/* a list. */
/* */
+ /* Here an example how to access the `vhea' table: */
+ /* */
+ /* { */
+ /* TT_VertHeader* vert_header; */
+ /* */
+ /* */
+ /* vert_header = */
+ /* (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); */
+ /* } */
+ /* */
FT_EXPORT( void* )
FT_Get_Sfnt_Table( FT_Face face,
FT_Sfnt_Tag tag );
@@ -662,6 +718,12 @@ FT_BEGIN_HEADER
* error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
* if ( error ) { ... could not load table ... }
* }
+ *
+ * Note that structures like @TT_Header or @TT_OS2 can't be used with
+ * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that
+ * those structures depend on the processor architecture, with varying
+ * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).
+ *
*/
FT_EXPORT( FT_Error )
FT_Load_Sfnt_Table( FT_Face face,
@@ -702,7 +764,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
- * SFNT tables with length zero are treated as missing.
+ * While parsing fonts, FreeType handles SFNT tables with length zero as
+ * missing.
*
*/
FT_EXPORT( FT_Error )
@@ -719,7 +782,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Return TrueType/sfnt specific cmap language ID. Definitions of */
- /* language ID values are in `freetype/ttnameid.h'. */
+ /* language ID values are in `ttnameid.h'. */
/* */
/* <Input> */
/* charmap :: */
@@ -729,6 +792,9 @@ FT_BEGIN_HEADER
/* The language ID of `charmap'. If `charmap' doesn't belong to a */
/* TrueType/sfnt face, just return~0 as the default value. */
/* */
+ /* For a format~14 cmap (to access Unicode IVS), the return value is */
+ /* 0xFFFFFFFF. */
+ /* */
FT_EXPORT( FT_ULong )
FT_Get_CMap_Language_ID( FT_CharMap charmap );
diff --git a/include/freetype/tttags.h b/include/tttags.h
index 307ce4b..d59aa19 100644
--- a/include/freetype/tttags.h
+++ b/include/tttags.h
@@ -4,7 +4,7 @@
/* */
/* Tags for TrueType and OpenType tables (specification only). */
/* */
-/* Copyright 1996-2001, 2004, 2005, 2007, 2008 by */
+/* Copyright 1996-2001, 2004, 2005, 2007, 2008, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -40,6 +40,8 @@ FT_BEGIN_HEADER
#define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' )
#define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' )
#define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' )
+#define TTAG_CBDT FT_MAKE_TAG( 'C', 'B', 'D', 'T' )
+#define TTAG_CBLC FT_MAKE_TAG( 'C', 'B', 'L', 'C' )
#define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' )
#define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' )
#define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' )
@@ -86,6 +88,7 @@ FT_BEGIN_HEADER
#define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' )
#define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' )
#define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' )
+#define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' )
#define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' )
#define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' )
#define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' )
@@ -97,6 +100,7 @@ FT_BEGIN_HEADER
#define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' )
#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' )
+#define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' )
FT_END_HEADER
diff --git a/include/freetype/ttunpat.h b/include/ttunpat.h
index a016275..bf53ddd 100644
--- a/include/freetype/ttunpat.h
+++ b/include/ttunpat.h
@@ -48,7 +48,8 @@ FT_BEGIN_HEADER
*/
#define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
- /* */
+ /* */
+
FT_END_HEADER
diff --git a/modules.cfg b/modules.cfg
index a85378e..4e52594 100644
--- a/modules.cfg
+++ b/modules.cfg
@@ -1,6 +1,6 @@
# modules.cfg
#
-# Copyright 2005-2007, 2009-2011 by
+# Copyright 2005-2007, 2009-2011, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -19,7 +19,7 @@
# 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'.
+# in the file `include/config/ftoption.h'.
####
@@ -85,7 +85,7 @@ HINTING_MODULES += autofit
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
+# controlled in file include/config/ftoption.h
# (TT_CONFIG_OPTION_BYTECODE_INTERPRETER and friends).
@@ -106,7 +106,7 @@ RASTER_MODULES += smooth
# FreeType's cache sub-system (quite stable but still in beta -- this means
# that its public API is subject to change if necessary). See
-# include/freetype/ftcache.h. Needs ftglyph.c.
+# include/ftcache.h. Needs ftglyph.c.
AUX_MODULES += cache
# TrueType GX/AAT table validation. Needs ftgxval.c below.
@@ -114,17 +114,17 @@ AUX_MODULES += cache
# Support for streams compressed with gzip (files with suffix .gz).
#
-# See include/freetype/ftgzip.h for the API.
+# See include/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.
+# See include/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.
+# See include/ftbzip2.h for the API.
AUX_MODULES += bzip2
# OpenType table validation. Needs ftotval.c below.
@@ -149,95 +149,95 @@ AUX_MODULES += psnames
# Exact bounding box calculation.
#
-# See include/freetype/ftbbox.h for the API.
+# See include/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.
+# See include/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.
+# See include/ftbitmap.h for the API.
BASE_EXTENSIONS += ftbitmap.c
# Access CID font information.
#
-# See include/freetype/ftcid.h for the API.
+# See include/ftcid.h for the API.
BASE_EXTENSIONS += ftcid.c
# Access FSType information. Needs fttype1.c.
#
-# See include/freetype/freetype.h for the API.
+# See include/freetype.h for the API.
BASE_EXTENSIONS += ftfstype.c
# Support for GASP table queries.
#
-# See include/freetype/ftgasp.h for the API.
+# See include/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.
+# See include/ftglyph.h for the API.
BASE_EXTENSIONS += ftglyph.c
# Interface for gxvalid module.
#
-# See include/freetype/ftgxval.h for the API.
+# See include/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.
+# See include/ftlcdfil.h for the API.
BASE_EXTENSIONS += ftlcdfil.c
# Multiple Master font interface.
#
-# See include/freetype/ftmm.h for the API.
+# See include/ftmm.h for the API.
BASE_EXTENSIONS += ftmm.c
# Interface for otvalid module.
#
-# See include/freetype/ftotval.h for the API.
+# See include/ftotval.h for the API.
BASE_EXTENSIONS += ftotval.c
# Support for FT_Face_CheckTrueTypePatents.
#
-# See include/freetype/freetype.h for the API.
+# See include/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.
+# See include/ftpfr.h for the API.
BASE_EXTENSIONS += ftpfr.c
# Path stroker. Needs ftglyph.c.
#
-# See include/freetype/ftstroke.h for the API.
+# See include/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.
+# See include/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.
+# See include/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.
+# See include/ftwinfnt.h for the API.
BASE_EXTENSIONS += ftwinfnt.c
# Support functions for X11.
#
-# See include/freetype/ftxf86.h for the API.
+# See include/ftxf86.h for the API.
BASE_EXTENSIONS += ftxf86.c
####
diff --git a/src/Jamfile b/src/Jamfile
index 76ee0f4..1cc0685 100644
--- a/src/Jamfile
+++ b/src/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src Jamfile
#
-# Copyright 2001, 2002 by
+# Copyright 2001, 2002, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -11,7 +11,7 @@
SubDir FT2_TOP $(FT2_SRC_DIR) ;
-# The file <freetype/internal/internal.h> is used to define macros that are
+# The file <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.
#
diff --git a/src/autofit/afangles.c b/src/autofit/afangles.c
index 790af17..f8b095b 100644
--- a/src/autofit/afangles.c
+++ b/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-2006, 2011 by */
+/* Copyright 2003-2006, 2011-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,66 +20,6 @@
#include "aftypes.h"
-#if 0
-
- FT_LOCAL_DEF( FT_Int )
- af_corner_is_flat( FT_Pos x_in,
- FT_Pos y_in,
- FT_Pos x_out,
- FT_Pos y_out )
- {
- FT_Pos ax = x_in;
- FT_Pos ay = y_in;
-
- FT_Pos d_in, d_out, d_corner;
-
-
- if ( ax < 0 )
- ax = -ax;
- if ( ay < 0 )
- ay = -ay;
- d_in = ax + ay;
-
- ax = x_out;
- if ( ax < 0 )
- ax = -ax;
- ay = y_out;
- if ( ay < 0 )
- ay = -ay;
- d_out = ax + ay;
-
- ax = x_out + x_in;
- if ( ax < 0 )
- ax = -ax;
- ay = y_out + y_in;
- if ( ay < 0 )
- ay = -ay;
- d_corner = ax + ay;
-
- return ( d_in + d_out - d_corner ) < ( d_corner >> 4 );
- }
-
-
- FT_LOCAL_DEF( FT_Int )
- af_corner_orientation( FT_Pos x_in,
- FT_Pos y_in,
- FT_Pos x_out,
- FT_Pos y_out )
- {
- FT_Pos delta;
-
-
- delta = x_in * y_out - y_in * x_out;
-
- if ( delta == 0 )
- return 0;
- else
- return 1 - 2 * ( delta < 0 );
- }
-
-#endif /* 0 */
-
-
/*
* We are not using `af_angle_atan' anymore, but we keep the source
* code below just in case...
@@ -255,7 +195,7 @@
{
for ( j = i; j > 0; j-- )
{
- if ( table[j] > table[j - 1] )
+ if ( table[j] >= table[j - 1] )
break;
swap = table[j];
@@ -267,18 +207,26 @@
FT_LOCAL_DEF( void )
- af_sort_widths( FT_UInt count,
- AF_Width table )
+ af_sort_and_quantize_widths( FT_UInt* count,
+ AF_Width table,
+ FT_Pos threshold )
{
FT_UInt i, j;
+ FT_UInt cur_idx;
+ FT_Pos cur_val;
+ FT_Pos sum;
AF_WidthRec swap;
- for ( i = 1; i < count; i++ )
+ if ( *count == 1 )
+ return;
+
+ /* sort */
+ for ( i = 1; i < *count; i++ )
{
for ( j = i; j > 0; j-- )
{
- if ( table[j].org > table[j - 1].org )
+ if ( table[j].org >= table[j - 1].org )
break;
swap = table[j];
@@ -286,6 +234,51 @@
table[j - 1] = swap;
}
}
+
+ cur_idx = 0;
+ cur_val = table[cur_idx].org;
+
+ /* compute and use mean values for clusters not larger than */
+ /* `threshold'; this is very primitive and might not yield */
+ /* the best result, but normally, using reference character */
+ /* `o', `*count' is 2, so the code below is fully sufficient */
+ for ( i = 1; i < *count; i++ )
+ {
+ if ( table[i].org - cur_val > threshold ||
+ i == *count - 1 )
+ {
+ sum = 0;
+
+ /* fix loop for end of array */
+ if ( table[i].org - cur_val <= threshold &&
+ i == *count - 1 )
+ i++;
+
+ for ( j = cur_idx; j < i; j++ )
+ {
+ sum += table[j].org;
+ table[j].org = 0;
+ }
+ table[cur_idx].org = sum / j;
+
+ if ( i < *count - 1 )
+ {
+ cur_idx = i + 1;
+ cur_val = table[cur_idx].org;
+ }
+ }
+ }
+
+ cur_idx = 1;
+
+ /* compress array to remove zero values */
+ for ( i = 1; i < *count; i++ )
+ {
+ if ( table[i].org )
+ table[cur_idx++] = table[i];
+ }
+
+ *count = cur_idx;
}
diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c
new file mode 100644
index 0000000..811226e
--- /dev/null
+++ b/src/autofit/afblue.c
@@ -0,0 +1,177 @@
+/* This file has been generated by the Perl script `afblue.pl', */
+/* using data from file `afblue.dat'. */
+
+/***************************************************************************/
+/* */
+/* afblue.c */
+/* */
+/* Auto-fitter data for blue strings (body). */
+/* */
+/* Copyright 2013 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#include "aftypes.h"
+
+
+ FT_LOCAL_ARRAY_DEF( char )
+ af_blue_strings[] =
+ {
+ /* */
+ '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\x9F', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕПЗОСЭ */
+ '\0',
+ '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\xA8', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕШЗОСЭ */
+ '\0',
+ '\xD1', '\x85', '\xD0', '\xBF', '\xD0', '\xBD', '\xD1', '\x88', '\xD0', '\xB5', '\xD0', '\xB7', '\xD0', '\xBE', '\xD1', '\x81', /* Ñ…Ð¿Ð½ÑˆÐµÐ·Ð¾Ñ */
+ '\0',
+ '\xD1', '\x80', '\xD1', '\x83', '\xD1', '\x84', /* руф */
+ '\0',
+ '\xE0', '\xA4', '\x95', '\xE0', '\xA4', '\xAE', '\xE0', '\xA4', '\x85', '\xE0', '\xA4', '\x86', '\xE0', '\xA4', '\xA5', '\xE0', '\xA4', '\xA7', '\xE0', '\xA4', '\xAD', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */
+ '\0',
+ '\xE0', '\xA4', '\x88', '\xE0', '\xA4', '\x90', '\xE0', '\xA4', '\x93', '\xE0', '\xA4', '\x94', '\xE0', '\xA4', '\xBF', '\xE0', '\xA5', '\x80', '\xE0', '\xA5', '\x8B', '\xE0', '\xA5', '\x8C', /* ई ठओ औ ि ी ो ौ */
+ '\0',
+ '\xE0', '\xA4', '\x95', '\xE0', '\xA4', '\xAE', '\xE0', '\xA4', '\x85', '\xE0', '\xA4', '\x86', '\xE0', '\xA4', '\xA5', '\xE0', '\xA4', '\xA7', '\xE0', '\xA4', '\xAD', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */
+ '\0',
+ '\xE0', '\xA5', '\x81', '\xE0', '\xA5', '\x83', /* ॠृ */
+ '\0',
+ '\xCE', '\x93', '\xCE', '\x92', '\xCE', '\x95', '\xCE', '\x96', '\xCE', '\x98', '\xCE', '\x9F', '\xCE', '\xA9', /* ΓΒΕΖΘΟΩ */
+ '\0',
+ '\xCE', '\x92', '\xCE', '\x94', '\xCE', '\x96', '\xCE', '\x9E', '\xCE', '\x98', '\xCE', '\x9F', /* ΒΔΖΞΘΟ */
+ '\0',
+ '\xCE', '\xB2', '\xCE', '\xB8', '\xCE', '\xB4', '\xCE', '\xB6', '\xCE', '\xBB', '\xCE', '\xBE', /* βθδζλξ */
+ '\0',
+ '\xCE', '\xB1', '\xCE', '\xB5', '\xCE', '\xB9', '\xCE', '\xBF', '\xCF', '\x80', '\xCF', '\x83', '\xCF', '\x84', '\xCF', '\x89', /* αειοπστω */
+ '\0',
+ '\xCE', '\xB2', '\xCE', '\xB3', '\xCE', '\xB7', '\xCE', '\xBC', '\xCF', '\x81', '\xCF', '\x86', '\xCF', '\x87', '\xCF', '\x88', /* βγημÏφχψ */
+ '\0',
+ '\xD7', '\x91', '\xD7', '\x93', '\xD7', '\x94', '\xD7', '\x97', '\xD7', '\x9A', '\xD7', '\x9B', '\xD7', '\x9D', '\xD7', '\xA1', /* בדהחךכ×ס */
+ '\0',
+ '\xD7', '\x91', '\xD7', '\x98', '\xD7', '\x9B', '\xD7', '\x9D', '\xD7', '\xA1', '\xD7', '\xA6', /* בטכ×סצ */
+ '\0',
+ '\xD7', '\xA7', '\xD7', '\x9A', '\xD7', '\x9F', '\xD7', '\xA3', '\xD7', '\xA5', /* קךןףץ */
+ '\0',
+ 'T', 'H', 'E', 'Z', 'O', 'C', 'Q', 'S', /* THEZOCQS */
+ '\0',
+ 'H', 'E', 'Z', 'L', 'O', 'C', 'U', 'S', /* HEZLOCUS */
+ '\0',
+ 'f', 'i', 'j', 'k', 'd', 'b', 'h', /* fijkdbh */
+ '\0',
+ 'x', 'z', 'r', 'o', 'e', 's', 'c', /* xzroesc */
+ '\0',
+ 'p', 'q', 'g', 'j', 'y', /* pqgjy */
+ '\0',
+ '\xE0', '\xB0', '\x87', '\xE0', '\xB0', '\x8C', '\xE0', '\xB0', '\x99', '\xE0', '\xB0', '\x9E', '\xE0', '\xB0', '\xA3', '\xE0', '\xB0', '\xB1', '\xE0', '\xB1', '\xAF', /* ఇ ఌ ఙ ఞ ణ ఱ ౯ */
+ '\0',
+ '\xE0', '\xB0', '\x85', '\xE0', '\xB0', '\x95', '\xE0', '\xB0', '\x9A', '\xE0', '\xB0', '\xB0', '\xE0', '\xB0', '\xBD', '\xE0', '\xB1', '\xA8', '\xE0', '\xB1', '\xAC', /* అ క చ ర ఽ ౨ ౬ */
+#ifdef AF_CONFIG_OPTION_CJK
+ '\0',
+ '\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* 他们你來們到和地 */
+ '\xE5', '\xAF', '\xB9', '\xE5', '\xB0', '\x8D', '\xE5', '\xB0', '\xB1', '\xE5', '\xB8', '\xAD', '\xE6', '\x88', '\x91', '\xE6', '\x97', '\xB6', '\xE6', '\x99', '\x82', '\xE6', '\x9C', '\x83', /* 对å°å°±å¸­æˆ‘时時會 */
+ '\xE6', '\x9D', '\xA5', '\xE7', '\x82', '\xBA', '\xE8', '\x83', '\xBD', '\xE8', '\x88', '\xB0', '\xE8', '\xAA', '\xAA', '\xE8', '\xAF', '\xB4', '\xE8', '\xBF', '\x99', '\xE9', '\x80', '\x99', /* æ¥ç‚ºèƒ½èˆ°èªªè¯´è¿™é€™ */
+ '\xE9', '\xBD', '\x8A', '|', /* 齊 | */
+ '\xE5', '\x86', '\x9B', '\xE5', '\x90', '\x8C', '\xE5', '\xB7', '\xB2', '\xE6', '\x84', '\xBF', '\xE6', '\x97', '\xA2', '\xE6', '\x98', '\x9F', '\xE6', '\x98', '\xAF', '\xE6', '\x99', '\xAF', /* 军åŒå·²æ„¿æ—¢æ˜Ÿæ˜¯æ™¯ */
+ '\xE6', '\xB0', '\x91', '\xE7', '\x85', '\xA7', '\xE7', '\x8E', '\xB0', '\xE7', '\x8F', '\xBE', '\xE7', '\x90', '\x86', '\xE7', '\x94', '\xA8', '\xE7', '\xBD', '\xAE', '\xE8', '\xA6', '\x81', /* 民照现ç¾ç†ç”¨ç½®è¦ */
+ '\xE8', '\xBB', '\x8D', '\xE9', '\x82', '\xA3', '\xE9', '\x85', '\x8D', '\xE9', '\x87', '\x8C', '\xE9', '\x96', '\x8B', '\xE9', '\x9B', '\xB7', '\xE9', '\x9C', '\xB2', '\xE9', '\x9D', '\xA2', /* è»é‚£é…é‡Œé–‹é›·éœ²é¢ */
+ '\xE9', '\xA1', '\xBE', /* 顾 */
+ '\0',
+ '\xE4', '\xB8', '\xAA', '\xE4', '\xB8', '\xBA', '\xE4', '\xBA', '\xBA', '\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xA5', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', /* 个为人他以们你來 */
+ '\xE5', '\x80', '\x8B', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\xA4', '\xA7', '\xE5', '\xAF', '\xB9', '\xE5', '\xB0', '\x8D', '\xE5', '\xB0', '\xB1', /* 個們到和大对å°å°± */
+ '\xE6', '\x88', '\x91', '\xE6', '\x97', '\xB6', '\xE6', '\x99', '\x82', '\xE6', '\x9C', '\x89', '\xE6', '\x9D', '\xA5', '\xE7', '\x82', '\xBA', '\xE8', '\xA6', '\x81', '\xE8', '\xAA', '\xAA', /* 我时時有æ¥ç‚ºè¦èªª */
+ '\xE8', '\xAF', '\xB4', '|', /* 说 | */
+ '\xE4', '\xB8', '\xBB', '\xE4', '\xBA', '\x9B', '\xE5', '\x9B', '\xA0', '\xE5', '\xAE', '\x83', '\xE6', '\x83', '\xB3', '\xE6', '\x84', '\x8F', '\xE7', '\x90', '\x86', '\xE7', '\x94', '\x9F', /* 主些因它想æ„ç†ç”Ÿ */
+ '\xE7', '\x95', '\xB6', '\xE7', '\x9C', '\x8B', '\xE7', '\x9D', '\x80', '\xE7', '\xBD', '\xAE', '\xE8', '\x80', '\x85', '\xE8', '\x87', '\xAA', '\xE8', '\x91', '\x97', '\xE8', '\xA3', '\xA1', /* 當看ç€ç½®è€…自著裡 */
+ '\xE8', '\xBF', '\x87', '\xE8', '\xBF', '\x98', '\xE8', '\xBF', '\x9B', '\xE9', '\x80', '\xB2', '\xE9', '\x81', '\x8E', '\xE9', '\x81', '\x93', '\xE9', '\x82', '\x84', '\xE9', '\x87', '\x8C', /* 过还进進éŽé“還里 */
+ '\xE9', '\x9D', '\xA2', /* é¢ */
+#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
+ '\0',
+ '\xE4', '\xBA', '\x9B', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* 些们你來們到和地 */
+ '\xE5', '\xA5', '\xB9', '\xE5', '\xB0', '\x86', '\xE5', '\xB0', '\x87', '\xE5', '\xB0', '\xB1', '\xE5', '\xB9', '\xB4', '\xE5', '\xBE', '\x97', '\xE6', '\x83', '\x85', '\xE6', '\x9C', '\x80', /* 她将將就年得情最 */
+ '\xE6', '\xA0', '\xB7', '\xE6', '\xA8', '\xA3', '\xE7', '\x90', '\x86', '\xE8', '\x83', '\xBD', '\xE8', '\xAA', '\xAA', '\xE8', '\xAF', '\xB4', '\xE8', '\xBF', '\x99', '\xE9', '\x80', '\x99', /* 样樣ç†èƒ½èªªè¯´è¿™é€™ */
+ '\xE9', '\x80', '\x9A', '|', /* 通 | */
+ '\xE5', '\x8D', '\xB3', '\xE5', '\x90', '\x97', '\xE5', '\x90', '\xA7', '\xE5', '\x90', '\xAC', '\xE5', '\x91', '\xA2', '\xE5', '\x93', '\x81', '\xE5', '\x93', '\x8D', '\xE5', '\x97', '\x8E', /* å³å—å§å¬å‘¢å“å“å—Ž */
+ '\xE5', '\xB8', '\x88', '\xE5', '\xB8', '\xAB', '\xE6', '\x94', '\xB6', '\xE6', '\x96', '\xAD', '\xE6', '\x96', '\xB7', '\xE6', '\x98', '\x8E', '\xE7', '\x9C', '\xBC', '\xE9', '\x96', '\x93', /* 师師收断斷明眼間 */
+ '\xE9', '\x97', '\xB4', '\xE9', '\x99', '\x85', '\xE9', '\x99', '\x88', '\xE9', '\x99', '\x90', '\xE9', '\x99', '\xA4', '\xE9', '\x99', '\xB3', '\xE9', '\x9A', '\x8F', '\xE9', '\x9A', '\x9B', /* 间际陈é™é™¤é™³éšéš› */
+ '\xE9', '\x9A', '\xA8', /* 隨 */
+ '\0',
+ '\xE4', '\xBA', '\x8B', '\xE5', '\x89', '\x8D', '\xE5', '\xAD', '\xB8', '\xE5', '\xB0', '\x86', '\xE5', '\xB0', '\x87', '\xE6', '\x83', '\x85', '\xE6', '\x83', '\xB3', '\xE6', '\x88', '\x96', /* 事å‰å­¸å°†å°‡æƒ…想或 */
+ '\xE6', '\x94', '\xBF', '\xE6', '\x96', '\xAF', '\xE6', '\x96', '\xB0', '\xE6', '\xA0', '\xB7', '\xE6', '\xA8', '\xA3', '\xE6', '\xB0', '\x91', '\xE6', '\xB2', '\x92', '\xE6', '\xB2', '\xA1', /* 政斯新样樣民沒没 */
+ '\xE7', '\x84', '\xB6', '\xE7', '\x89', '\xB9', '\xE7', '\x8E', '\xB0', '\xE7', '\x8F', '\xBE', '\xE7', '\x90', '\x83', '\xE7', '\xAC', '\xAC', '\xE7', '\xB6', '\x93', '\xE8', '\xB0', '\x81', /* 然特现ç¾çƒç¬¬ç¶“è° */
+ '\xE8', '\xB5', '\xB7', '|', /* èµ· | */
+ '\xE4', '\xBE', '\x8B', '\xE5', '\x88', '\xA5', '\xE5', '\x88', '\xAB', '\xE5', '\x88', '\xB6', '\xE5', '\x8A', '\xA8', '\xE5', '\x8B', '\x95', '\xE5', '\x90', '\x97', '\xE5', '\x97', '\x8E', /* 例別别制动動å—å—Ž */
+ '\xE5', '\xA2', '\x9E', '\xE6', '\x8C', '\x87', '\xE6', '\x98', '\x8E', '\xE6', '\x9C', '\x9D', '\xE6', '\x9C', '\x9F', '\xE6', '\x9E', '\x84', '\xE7', '\x89', '\xA9', '\xE7', '\xA1', '\xAE', /* 增指明æœæœŸæž„物确 */
+ '\xE7', '\xA7', '\x8D', '\xE8', '\xAA', '\xBF', '\xE8', '\xB0', '\x83', '\xE8', '\xB2', '\xBB', '\xE8', '\xB4', '\xB9', '\xE9', '\x82', '\xA3', '\xE9', '\x83', '\xBD', '\xE9', '\x96', '\x93', /* ç§èª¿è°ƒè²»è´¹é‚£éƒ½é–“ */
+ '\xE9', '\x97', '\xB4', /* é—´ */
+#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
+#endif /* AF_CONFIG_OPTION_CJK */
+ '\0',
+
+ };
+
+
+ /* stringsets are specific to styles */
+ FT_LOCAL_ARRAY_DEF( AF_Blue_StringRec )
+ af_blue_stringsets[] =
+ {
+ /* */
+ { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 },
+ { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_CYRILLIC_SMALL, 0 },
+ { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_NEUTRAL |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_DEVANAGARI_BASE, 0 },
+ { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 },
+ { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_GREEK_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_GREEK_SMALL, 0 },
+ { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_LONG },
+ { AF_BLUE_STRING_HEBREW_BOTTOM, 0 },
+ { AF_BLUE_STRING_HEBREW_DESCENDER, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 },
+ { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
+ { AF_BLUE_STRING_LATIN_SMALL, 0 },
+ { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_TELUGU_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
+#ifdef AF_CONFIG_OPTION_CJK
+ { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP },
+ { AF_BLUE_STRING_CJK_BOTTOM, 0 },
+#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
+ { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ },
+ { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ |
+ AF_BLUE_PROPERTY_CJK_RIGHT },
+#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
+ { AF_BLUE_STRING_MAX, 0 },
+#endif /* AF_CONFIG_OPTION_CJK */
+
+ };
+
+
+/* END */
diff --git a/src/autofit/afblue.cin b/src/autofit/afblue.cin
new file mode 100644
index 0000000..c6762be
--- /dev/null
+++ b/src/autofit/afblue.cin
@@ -0,0 +1,39 @@
+/***************************************************************************/
+/* */
+/* afblue.c */
+/* */
+/* Auto-fitter data for blue strings (body). */
+/* */
+/* Copyright 2013 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#include "aftypes.h"
+
+
+ FT_LOCAL_ARRAY_DEF( char )
+ af_blue_strings[] =
+ {
+ /* */
+@AF_BLUE_STRINGS_ARRAY@
+ };
+
+
+ /* stringsets are specific to styles */
+ FT_LOCAL_ARRAY_DEF( AF_Blue_StringRec )
+ af_blue_stringsets[] =
+ {
+ /* */
+@AF_BLUE_STRINGSETS_ARRAY@
+ };
+
+
+/* END */
diff --git a/src/autofit/afblue.dat b/src/autofit/afblue.dat
new file mode 100644
index 0000000..3f98c13
--- /dev/null
+++ b/src/autofit/afblue.dat
@@ -0,0 +1,337 @@
+// afblue.dat
+//
+// Auto-fitter data for blue strings.
+//
+// Copyright 2013, 2014 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 data specific to blue zones. It gets processed by
+// a script to simulate `jagged arrays', with enumeration values holding
+// offsets into the arrays.
+//
+// The format of the file is rather simple: A section starts with three
+// labels separated by whitespace and followed by a colon (everything in a
+// single line); the first label gives the name of the enumeration template,
+// the second the name of the array template, and the third the name of the
+// `maximum' template, holding the size of the largest array element. The
+// script then fills the corresponding templates (indicated by `@'
+// characters around the name).
+//
+// A section contains one or more data records. Each data record consists
+// of two or more lines. The first line holds the enumeration name, and the
+// remaining lines the corresponding array data.
+//
+// There are two possible representations for array data.
+//
+// - A string of characters in UTF-8 encoding enclosed in double quotes,
+// using C syntax. There can be only one string per line, thus the
+// starting and ending double quote must be the first and last character
+// in the line, respectively, ignoring whitespace before and after the
+// string. Space characters within the string are ignored too. If there
+// are multiple strings (in multiple lines), they are concatenated to a
+// single string. In the output, a string gets represented as a series of
+// singles bytes, followed by a zero byte. The enumeration values simply
+// hold byte offsets to the start of the corresponding strings.
+//
+// - Data blocks enclosed in balanced braces, which get copied verbatim and
+// which can span multiple lines. The opening brace of a block must be
+// the first character of a line (ignoring whitespace), and the closing
+// brace the last (ignoring whitespace also). The script appends a comma
+// character after each block and counts the number of blocks to set the
+// enumeration values.
+//
+// A section can contain either strings only or data blocks only.
+//
+// A comment line starts with `//'; it gets removed. A preprocessor
+// directive line (using the standard syntax of `cpp') starts with `#' and
+// gets copied verbatim to both the enumeration and the array. Whitespace
+// outside of a string is insignificant.
+//
+// Preprocessor directives are ignored while the script computes maximum
+// values; this essentially means that the maximum values can easily be too
+// large. Given that the purpose of those values is to create local
+// fixed-size arrays at compile time for further processing of the blue zone
+// data, this isn't a problem. Note the the final zero byte of a string is
+// not counted. Note also that the count holds the number of UTF-8 encoded
+// characters, not bytes.
+
+
+// The blue zone string data, to be used in the blue stringsets below.
+
+AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
+
+ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP
+ "БВЕПЗОСЭ"
+ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM
+ "БВЕШЗОСЭ"
+ AF_BLUE_STRING_CYRILLIC_SMALL
+ "хпншезоÑ"
+ AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER
+ "руф"
+
+ // we separate the letters with spaces to avoid ligatures;
+ // this is just for convenience to simplify reading
+ AF_BLUE_STRING_DEVANAGARI_BASE
+ "क म अ आ थ ध भ श"
+ AF_BLUE_STRING_DEVANAGARI_TOP
+ "ई ठओ औ ि ी ो ौ"
+ // note that some fonts have extreme variation in the height of the
+ // round head elements; for this reason we also define the `base'
+ // blue zone, which must be always present
+ AF_BLUE_STRING_DEVANAGARI_HEAD
+ "क म अ आ थ ध भ श"
+ AF_BLUE_STRING_DEVANAGARI_BOTTOM
+ "ॠृ"
+
+ AF_BLUE_STRING_GREEK_CAPITAL_TOP
+ "ΓΒΕΖΘΟΩ"
+ AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM
+ "ΒΔΖΞΘΟ"
+ AF_BLUE_STRING_GREEK_SMALL_BETA_TOP
+ "βθδζλξ"
+ AF_BLUE_STRING_GREEK_SMALL
+ "αειοπστω"
+ AF_BLUE_STRING_GREEK_SMALL_DESCENDER
+ "βγημÏφχψ"
+
+ AF_BLUE_STRING_HEBREW_TOP
+ "בדהחךכ×ס"
+ AF_BLUE_STRING_HEBREW_BOTTOM
+ "בטכ×סצ"
+ AF_BLUE_STRING_HEBREW_DESCENDER
+ "קךןףץ"
+
+ AF_BLUE_STRING_LATIN_CAPITAL_TOP
+ "THEZOCQS"
+ AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM
+ "HEZLOCUS"
+ AF_BLUE_STRING_LATIN_SMALL_F_TOP
+ "fijkdbh"
+ AF_BLUE_STRING_LATIN_SMALL
+ "xzroesc"
+ AF_BLUE_STRING_LATIN_SMALL_DESCENDER
+ "pqgjy"
+
+ // we separate the letters with spaces to avoid ligatures;
+ // this is just for convenience to simplify reading
+ AF_BLUE_STRING_TELUGU_TOP
+ "ఇ ఌ ఙ ఞ ణ ఱ ౯"
+
+ AF_BLUE_STRING_TELUGU_BOTTOM
+ "అ క చ ర ఽ ౨ ౬"
+
+#ifdef AF_CONFIG_OPTION_CJK
+
+ AF_BLUE_STRING_CJK_TOP
+ "他们你來們到和地"
+ "对å°å°±å¸­æˆ‘时時會"
+ "æ¥ç‚ºèƒ½èˆ°èªªè¯´è¿™é€™"
+ "齊 |"
+ "军åŒå·²æ„¿æ—¢æ˜Ÿæ˜¯æ™¯"
+ "民照现ç¾ç†ç”¨ç½®è¦"
+ "è»é‚£é…里開雷露é¢"
+ "顾"
+ AF_BLUE_STRING_CJK_BOTTOM
+ "个为人他以们你來"
+ "個們到和大对å°å°±"
+ "我时時有æ¥ç‚ºè¦èªª"
+ "说 |"
+ "主些因它想æ„ç†ç”Ÿ"
+ "當看ç€ç½®è€…自著裡"
+ "过还进進éŽé“還里"
+ "é¢"
+
+#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
+
+ AF_BLUE_STRING_CJK_LEFT
+ "些们你來們到和地"
+ "她将將就年得情最"
+ "样樣ç†èƒ½èªªè¯´è¿™é€™"
+ "通 |"
+ "å³å—å§å¬å‘¢å“å“å—Ž"
+ "师師收断斷明眼間"
+ "间际陈é™é™¤é™³éšéš›"
+ "隨"
+ AF_BLUE_STRING_CJK_RIGHT
+ "事å‰å­¸å°†å°‡æƒ…想或"
+ "政斯新样樣民沒没"
+ "然特现ç¾çƒç¬¬ç¶“è°"
+ "èµ· |"
+ "例別别制动動å—å—Ž"
+ "增指明æœæœŸæž„物确"
+ "ç§èª¿è°ƒè²»è´¹é‚£éƒ½é–“"
+ "é—´"
+
+#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
+
+#endif /* AF_CONFIG_OPTION_CJK */
+
+
+// The blue zone stringsets, as used in the script styles, cf. `afstyles.h'.
+//
+// The AF_BLUE_PROPERTY_XXX flags are defined in `afblue.h'; here some
+// explanations.
+//
+// A blue zone in general is defined by a reference and an overshoot line.
+// During the hinting process, all coordinate values between those two lines
+// are set equal to the reference value, provided that the blue zone is not
+// wider than 0.75 pixels (otherwise the blue zone gets ignored). All
+// entries must have `AF_BLUE_STRING_MAX' as the final line.
+//
+// During the glyph analysis, edges are sorted from bottom to top, and then
+// sequentially checked, edge by edge, against the blue zones in the order
+// given below.
+//
+//
+// latin auto-hinter
+// -----------------
+//
+// Characters in a blue string are automatically classified as having a flat
+// (reference) or a round (overshoot) extremum. The blue zone is then set
+// up by the mean values of all flat extrema and all round extrema,
+// respectively. Only horizontal blue zones (i.e., adjusting vertical
+// coordinate values) are supported.
+//
+// For the latin auto-hinter, the overshoot should be larger than the
+// reference for top zones, and vice versa for bottom zones.
+//
+// LATIN_TOP
+// Take the maximum flat and round coordinate values of the blue string
+// characters for computing the blue zone's reference and overshoot
+// values.
+//
+// If not set, take the minimum values.
+//
+// LATIN_NEUTRAL
+// Ignore round extrema and define the blue zone with flat values only.
+// Both top and bottom of contours can match. This is useful for
+// scripts like Devanagari where vowel signs attach to the base
+// character and are implemented as components of composite glyphs.
+//
+// If not set, both round and flat extrema are taken into account.
+// Additionally, only the top or the bottom of a contour can match,
+// depending on the LATIN_TOP flag.
+//
+// Neutral blue zones should always follow non-neutral blue zones.
+//
+// LATIN_X_HEIGHT
+// Scale all glyphs vertically from the corresponding script to make the
+// reference line of this blue zone align on the grid. The scaling
+// takes place before all other blue zones get aligned to the grid.
+// Only one blue character string of a script style can have this flag.
+//
+// LATIN_LONG
+// Apply an additional constraint for blue zone values: Don't
+// necessarily use the extremum as-is but a segment of the topmost (or
+// bottommost) contour that is longer than a heuristic threshold, and
+// which is not too far away vertically from the real extremum. This
+// ensures that small bumps in the outline are ignored (for example, the
+// `vertical serifs' found in many Hebrew glyph designs).
+//
+// The segment must be at least EM/25 font units long, and the distance
+// to the extremum must be smaller than EM/4.
+//
+//
+// cjk auto-hinter
+// ---------------
+//
+// Characters in a blue string are *not* automatically classified. Instead,
+// first come the characters used for the overshoot value, then the
+// character `|', then the characters used for the reference value. The
+// blue zone is then set up by the mean values of all reference values and
+// all overshoot values, respectively. Both horizontal and vertical blue
+// zones (i.e., adjusting vertical and horizontal coordinate values,
+// respectively) are supported.
+//
+// For the cjk auto-hinter, the overshoot should be smaller than the
+// reference for top zones, and vice versa for bottom zones.
+//
+// CJK_TOP
+// Take the maximum flat and round coordinate values of the blue string
+// characters. If not set, take the minimum values.
+//
+// CJK_RIGHT
+// A synonym for CJK_TOP. If CJK_HORIZ is set, this flag indicates the
+// right blue zone, taking horizontal maximum values.
+//
+// CJK_HORIZ
+// Define a blue zone for horizontal hinting (i.e., vertical blue
+// zones). If not set, this is a blue zone for vertical hinting.
+
+
+AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
+
+ AF_BLUE_STRINGSET_CYRL
+ { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }
+ { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_CYRILLIC_SMALL, 0 }
+ { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_DEVA
+ { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_NEUTRAL |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_DEVANAGARI_BASE, 0 }
+ { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_GREK
+ { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 }
+ { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_GREEK_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_GREEK_SMALL, 0 }
+ { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_HEBR
+ { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_LONG }
+ { AF_BLUE_STRING_HEBREW_BOTTOM, 0 }
+ { AF_BLUE_STRING_HEBREW_DESCENDER, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_LATN
+ { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 }
+ { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
+ { AF_BLUE_STRING_LATIN_SMALL, 0 }
+ { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_TELU
+ { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_TELUGU_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
+
+#ifdef AF_CONFIG_OPTION_CJK
+
+ AF_BLUE_STRINGSET_HANI
+ { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP }
+ { AF_BLUE_STRING_CJK_BOTTOM, 0 }
+#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
+ { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ }
+ { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ |
+ AF_BLUE_PROPERTY_CJK_RIGHT }
+#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
+ { AF_BLUE_STRING_MAX, 0 }
+
+#endif /* AF_CONFIG_OPTION_CJK */
+
+
+// END
diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h
new file mode 100644
index 0000000..a861841
--- /dev/null
+++ b/src/autofit/afblue.h
@@ -0,0 +1,203 @@
+/* This file has been generated by the Perl script `afblue.pl', */
+/* using data from file `afblue.dat'. */
+
+/***************************************************************************/
+/* */
+/* afblue.h */
+/* */
+/* Auto-fitter data for blue strings (specification). */
+/* */
+/* Copyright 2013, 2014 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 __AFBLUE_H__
+#define __AFBLUE_H__
+
+
+FT_BEGIN_HEADER
+
+
+ /* an auxiliary macro to decode a UTF-8 character -- since we only use */
+ /* hard-coded, self-converted data, no error checking is performed */
+#define GET_UTF8_CHAR( ch, p ) \
+ ch = (unsigned char)*p++; \
+ if ( ch >= 0x80 ) \
+ { \
+ FT_UInt len; \
+ \
+ \
+ if ( ch < 0xE0 ) \
+ { \
+ len = 1; \
+ ch &= 0x1F; \
+ } \
+ else if ( ch < 0xF0 ) \
+ { \
+ len = 2; \
+ ch &= 0x0F; \
+ } \
+ else \
+ { \
+ len = 3; \
+ ch &= 0x07; \
+ } \
+ \
+ for ( ; len > 0; len-- ) \
+ ch = ( ch << 6 ) | ( *p++ & 0x3F ); \
+ }
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** B L U E S T R I N G S *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /* At the bottommost level, we define strings for finding blue zones. */
+
+
+#define AF_BLUE_STRING_MAX_LEN 51
+
+ /* The AF_Blue_String enumeration values are offsets into the */
+ /* `af_blue_strings' array. */
+
+ typedef enum AF_Blue_String_
+ {
+ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 0,
+ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 17,
+ AF_BLUE_STRING_CYRILLIC_SMALL = 34,
+ AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 51,
+ AF_BLUE_STRING_DEVANAGARI_BASE = 58,
+ AF_BLUE_STRING_DEVANAGARI_TOP = 83,
+ AF_BLUE_STRING_DEVANAGARI_HEAD = 108,
+ AF_BLUE_STRING_DEVANAGARI_BOTTOM = 133,
+ AF_BLUE_STRING_GREEK_CAPITAL_TOP = 140,
+ AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 155,
+ AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 168,
+ AF_BLUE_STRING_GREEK_SMALL = 181,
+ AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 198,
+ AF_BLUE_STRING_HEBREW_TOP = 215,
+ AF_BLUE_STRING_HEBREW_BOTTOM = 232,
+ AF_BLUE_STRING_HEBREW_DESCENDER = 245,
+ AF_BLUE_STRING_LATIN_CAPITAL_TOP = 256,
+ AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 265,
+ AF_BLUE_STRING_LATIN_SMALL_F_TOP = 274,
+ AF_BLUE_STRING_LATIN_SMALL = 282,
+ AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 290,
+ AF_BLUE_STRING_TELUGU_TOP = 296,
+ AF_BLUE_STRING_TELUGU_BOTTOM = 318,
+ af_blue_1_1 = 339,
+#ifdef AF_CONFIG_OPTION_CJK
+ AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
+ AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 153,
+ af_blue_1_1_1 = af_blue_1_1 + 304,
+#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
+ AF_BLUE_STRING_CJK_LEFT = af_blue_1_1_1 + 1,
+ AF_BLUE_STRING_CJK_RIGHT = af_blue_1_1_1 + 153,
+ af_blue_1_1_2 = af_blue_1_1_1 + 304,
+#else
+ af_blue_1_1_2 = af_blue_1_1_1 + 0,
+#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
+ af_blue_1_2 = af_blue_1_1_2 + 0,
+#else
+ af_blue_1_2 = af_blue_1_1 + 0,
+#endif /* AF_CONFIG_OPTION_CJK */
+
+
+ AF_BLUE_STRING_MAX /* do not remove */
+
+ } AF_Blue_String;
+
+
+ FT_LOCAL_ARRAY( char )
+ af_blue_strings[];
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** B L U E S T R I N G S E T S *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /* The next level is to group blue strings into style-specific sets. */
+
+
+ /* Properties are specific to a writing system. We assume that a given */
+ /* blue string can't be used in more than a single writing system, which */
+ /* is a safe bet. */
+#define AF_BLUE_PROPERTY_LATIN_TOP ( 1 << 0 ) /* must have value 1 */
+#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1 << 1 )
+#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 2 )
+#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 3 )
+
+#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 0 ) /* must have value 1 */
+#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 1 ) /* must have value 2 */
+#define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP
+
+
+#define AF_BLUE_STRINGSET_MAX_LEN 7
+
+ /* The AF_Blue_Stringset enumeration values are offsets into the */
+ /* `af_blue_stringsets' array. */
+
+ typedef enum AF_Blue_Stringset_
+ {
+ AF_BLUE_STRINGSET_CYRL = 0,
+ AF_BLUE_STRINGSET_DEVA = 6,
+ AF_BLUE_STRINGSET_GREK = 12,
+ AF_BLUE_STRINGSET_HEBR = 19,
+ AF_BLUE_STRINGSET_LATN = 23,
+ AF_BLUE_STRINGSET_TELU = 30,
+ af_blue_2_1 = 33,
+#ifdef AF_CONFIG_OPTION_CJK
+ AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
+ af_blue_2_1_1 = af_blue_2_1 + 2,
+#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
+ af_blue_2_1_2 = af_blue_2_1_1 + 2,
+#else
+ af_blue_2_1_2 = af_blue_2_1_1 + 0,
+#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
+ af_blue_2_2 = af_blue_2_1_2 + 1,
+#else
+ af_blue_2_2 = af_blue_2_1 + 0,
+#endif /* AF_CONFIG_OPTION_CJK */
+
+
+ AF_BLUE_STRINGSET_MAX /* do not remove */
+
+ } AF_Blue_Stringset;
+
+
+ typedef struct AF_Blue_StringRec_
+ {
+ AF_Blue_String string;
+ FT_UShort properties;
+
+ } AF_Blue_StringRec;
+
+
+ FT_LOCAL_ARRAY( AF_Blue_StringRec )
+ af_blue_stringsets[];
+
+/* */
+
+FT_END_HEADER
+
+
+#endif /* __AFBLUE_H__ */
+
+
+/* END */
diff --git a/src/autofit/afblue.hin b/src/autofit/afblue.hin
new file mode 100644
index 0000000..0b4b48d
--- /dev/null
+++ b/src/autofit/afblue.hin
@@ -0,0 +1,142 @@
+/***************************************************************************/
+/* */
+/* afblue.h */
+/* */
+/* Auto-fitter data for blue strings (specification). */
+/* */
+/* Copyright 2013, 2014 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 __AFBLUE_H__
+#define __AFBLUE_H__
+
+
+FT_BEGIN_HEADER
+
+
+ /* an auxiliary macro to decode a UTF-8 character -- since we only use */
+ /* hard-coded, self-converted data, no error checking is performed */
+#define GET_UTF8_CHAR( ch, p ) \
+ ch = (unsigned char)*p++; \
+ if ( ch >= 0x80 ) \
+ { \
+ FT_UInt len; \
+ \
+ \
+ if ( ch < 0xE0 ) \
+ { \
+ len = 1; \
+ ch &= 0x1F; \
+ } \
+ else if ( ch < 0xF0 ) \
+ { \
+ len = 2; \
+ ch &= 0x0F; \
+ } \
+ else \
+ { \
+ len = 3; \
+ ch &= 0x07; \
+ } \
+ \
+ for ( ; len > 0; len-- ) \
+ ch = ( ch << 6 ) | ( *p++ & 0x3F ); \
+ }
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** B L U E S T R I N G S *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /* At the bottommost level, we define strings for finding blue zones. */
+
+
+#define AF_BLUE_STRING_MAX_LEN @AF_BLUE_STRING_MAX_LEN@
+
+ /* The AF_Blue_String enumeration values are offsets into the */
+ /* `af_blue_strings' array. */
+
+ typedef enum AF_Blue_String_
+ {
+@AF_BLUE_STRING_ENUM@
+
+ AF_BLUE_STRING_MAX /* do not remove */
+
+ } AF_Blue_String;
+
+
+ FT_LOCAL_ARRAY( char )
+ af_blue_strings[];
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** B L U E S T R I N G S E T S *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /* The next level is to group blue strings into style-specific sets. */
+
+
+ /* Properties are specific to a writing system. We assume that a given */
+ /* blue string can't be used in more than a single writing system, which */
+ /* is a safe bet. */
+#define AF_BLUE_PROPERTY_LATIN_TOP ( 1 << 0 ) /* must have value 1 */
+#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1 << 1 )
+#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 2 )
+#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 3 )
+
+#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 0 ) /* must have value 1 */
+#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 1 ) /* must have value 2 */
+#define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP
+
+
+#define AF_BLUE_STRINGSET_MAX_LEN @AF_BLUE_STRINGSET_MAX_LEN@
+
+ /* The AF_Blue_Stringset enumeration values are offsets into the */
+ /* `af_blue_stringsets' array. */
+
+ typedef enum AF_Blue_Stringset_
+ {
+@AF_BLUE_STRINGSET_ENUM@
+
+ AF_BLUE_STRINGSET_MAX /* do not remove */
+
+ } AF_Blue_Stringset;
+
+
+ typedef struct AF_Blue_StringRec_
+ {
+ AF_Blue_String string;
+ FT_UShort properties;
+
+ } AF_Blue_StringRec;
+
+
+ FT_LOCAL_ARRAY( AF_Blue_StringRec )
+ af_blue_stringsets[];
+
+/* */
+
+FT_END_HEADER
+
+
+#endif /* __AFBLUE_H__ */
+
+
+/* END */
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index 8e407c8..048e0e7 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -2,9 +2,9 @@
/* */
/* afcjk.c */
/* */
-/* Auto-fitter hinting routines for CJK script (body). */
+/* Auto-fitter hinting routines for CJK writing system (body). */
/* */
-/* Copyright 2006-2012 by */
+/* Copyright 2006-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,7 +26,8 @@
#include FT_ADVANCES_H
#include FT_INTERNAL_DEBUG_H
-#include "aftypes.h"
+#include "afglobal.h"
+#include "afpic.h"
#include "aflatin.h"
@@ -67,13 +68,18 @@
FT_LOCAL_DEF( void )
af_cjk_metrics_init_widths( AF_CJKMetrics metrics,
- FT_Face face,
- FT_ULong charcode )
+ FT_Face face )
{
/* scan the array of segments in each direction */
AF_GlyphHintsRec hints[1];
+ FT_TRACE5(( "\n"
+ "cjk standard widths computation (style `%s')\n"
+ "===================================================\n"
+ "\n",
+ af_style_names[metrics->root.style_class->style] ));
+
af_glyph_hints_init( hints, face->memory );
metrics->axis[AF_DIMENSION_HORZ].width_count = 0;
@@ -81,15 +87,59 @@
{
FT_Error error;
- FT_UInt glyph_index;
+ FT_ULong glyph_index;
+ FT_Long y_offset;
int dim;
AF_CJKMetricsRec dummy[1];
AF_Scaler scaler = &dummy->root.scaler;
+#ifdef FT_CONFIG_OPTION_PIC
+ AF_FaceGlobals globals = metrics->root.globals;
+#endif
- glyph_index = FT_Get_Char_Index( face, charcode );
- if ( glyph_index == 0 )
- goto Exit;
+ AF_StyleClass style_class = metrics->root.style_class;
+ AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET
+ [style_class->script];
+
+ FT_UInt32 standard_char;
+
+
+ standard_char = script_class->standard_char1;
+ af_get_char_index( &metrics->root,
+ standard_char,
+ &glyph_index,
+ &y_offset );
+ if ( !glyph_index )
+ {
+ if ( script_class->standard_char2 )
+ {
+ standard_char = script_class->standard_char2;
+ af_get_char_index( &metrics->root,
+ standard_char,
+ &glyph_index,
+ &y_offset );
+ if ( !glyph_index )
+ {
+ if ( script_class->standard_char3 )
+ {
+ standard_char = script_class->standard_char3;
+ af_get_char_index( &metrics->root,
+ standard_char,
+ &glyph_index,
+ &y_offset );
+ if ( !glyph_index )
+ goto Exit;
+ }
+ else
+ goto Exit;
+ }
+ }
+ else
+ goto Exit;
+ }
+
+ FT_TRACE5(( "standard character: U+%04lX (glyph index %d)\n",
+ standard_char, glyph_index ));
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
if ( error || face->glyph->outline.n_points <= 0 )
@@ -108,7 +158,7 @@
scaler->render_mode = FT_RENDER_MODE_NORMAL;
scaler->flags = 0;
- af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy );
+ af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy );
error = af_glyph_hints_reload( hints, &face->glyph->outline );
if ( error )
@@ -122,11 +172,15 @@
FT_UInt num_widths = 0;
- error = af_latin_hints_compute_segments( hints, (AF_Dimension)dim );
+ error = af_latin_hints_compute_segments( hints,
+ (AF_Dimension)dim );
if ( error )
goto Exit;
- af_latin_hints_link_segments( hints, (AF_Dimension)dim );
+ af_latin_hints_link_segments( hints,
+ 0,
+ NULL,
+ (AF_Dimension)dim );
seg = axhints->segments;
limit = seg + axhints->num_segments;
@@ -150,7 +204,10 @@
}
}
- af_sort_widths( num_widths, axis->widths );
+ /* this also replaces multiple almost identical stem widths */
+ /* with a single one (the value 100 is heuristic) */
+ af_sort_and_quantize_widths( &num_widths, axis->widths,
+ dummy->units_per_em / 100 );
axis->width_count = num_widths;
}
@@ -168,263 +225,212 @@
axis->edge_distance_threshold = stdw / 5;
axis->standard_width = stdw;
axis->extra_light = 0;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_UInt i;
+
+
+ FT_TRACE5(( "%s widths:\n",
+ dim == AF_DIMENSION_VERT ? "horizontal"
+ : "vertical" ));
+
+ FT_TRACE5(( " %d (standard)", axis->standard_width ));
+ for ( i = 1; i < axis->width_count; i++ )
+ FT_TRACE5(( " %d", axis->widths[i].org ));
+
+ FT_TRACE5(( "\n" ));
+ }
+#endif
}
}
+ FT_TRACE5(( "\n" ));
+
af_glyph_hints_done( hints );
}
-#define AF_CJK_MAX_TEST_CHARACTERS 32
+ /* Find all blue zones. */
-
- /* Each blue zone has two types of fill and unfill, this is, */
- /* filling the entire glyph square or not. */
-
- enum
+ static void
+ af_cjk_metrics_init_blues( AF_CJKMetrics metrics,
+ FT_Face face )
{
- AF_CJK_BLUE_TYPE_FILL,
- AF_CJK_BLUE_TYPE_UNFILL,
- AF_CJK_BLUE_TYPE_MAX
- };
+ FT_Pos fills[AF_BLUE_STRING_MAX_LEN];
+ FT_Pos flats[AF_BLUE_STRING_MAX_LEN];
+ FT_Int num_fills;
+ FT_Int num_flats;
- /* 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 */
- };
+ FT_Bool fill;
+ AF_CJKBlue blue;
+ FT_Error error;
+ AF_CJKAxis axis;
+ FT_Outline outline;
- /* Calculate blue zones for all the CJK_BLUE_XXX's. */
+ AF_StyleClass sc = metrics->root.style_class;
- 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];
+ AF_Blue_Stringset bss = sc->blue_stringset;
+ const AF_Blue_StringRec* bs = &af_blue_stringsets[bss];
- 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;
+ /* we walk over the blue character strings as specified in the */
+ /* style's entry in the `af_blue_stringset' array, computing its */
+ /* extremum points (depending on the string properties) */
-#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
+ FT_TRACE5(( "cjk blue zones computation\n"
+ "==========================\n"
+ "\n" ));
+ for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ )
+ {
+ const char* p = &af_blue_strings[bs->string];
+ FT_Pos* blue_ref;
+ FT_Pos* blue_shoot;
- /* 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" ));
+ if ( AF_CJK_IS_HORIZ_BLUE( bs ) )
+ axis = &metrics->axis[AF_DIMENSION_HORZ];
+ else
+ axis = &metrics->axis[AF_DIMENSION_VERT];
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_String* cjk_blue_name[4] =
+ {
+ (FT_String*)"bottom", /* -- , -- */
+ (FT_String*)"top", /* -- , TOP */
+ (FT_String*)"left", /* HORIZ, -- */
+ (FT_String*)"right" /* HORIZ, TOP */
+ };
- for ( bb = 0; bb < AF_CJK_BLUE_MAX; bb++ )
- {
- FT_Int fill_type;
- FT_Pos* blue_ref;
- FT_Pos* blue_shoot;
+ FT_TRACE5(( "blue zone %d (%s):\n",
+ axis->blue_count,
+ cjk_blue_name[AF_CJK_IS_HORIZ_BLUE( bs ) |
+ AF_CJK_IS_TOP_BLUE( bs ) ] ));
+ }
+#endif /* FT_DEBUG_LEVEL_TRACE */
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 );
+ fill = 1; /* start with characters that define fill values */
+ FT_TRACE5(( " [overshoot values]\n" ));
+ while ( *p )
+ {
+ FT_ULong ch;
+ FT_ULong glyph_index;
+ FT_Long y_offset;
+ FT_Pos best_pos; /* same as points.y or points.x, resp. */
+ FT_Int best_point;
+ FT_Vector* points;
- FT_TRACE5(( "cjk blue %s/%s\n", cjk_blue_name[bb],
- cjk_blue_type_name[fill_type] ));
+ GET_UTF8_CHAR( ch, p );
- for ( ; p < limit && *p; p++ )
+ /* switch to characters that define flat values */
+ if ( ch == '|' )
{
- FT_UInt glyph_index;
- FT_Pos best_pos; /* same as points.y */
- FT_Int best_point;
- FT_Vector* points;
+ fill = 0;
+ FT_TRACE5(( " [reference values]\n" ));
+ continue;
+ }
+ /* load the character in the face -- skip unknown or empty ones */
+ af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset );
+ if ( glyph_index == 0 )
+ {
+ FT_TRACE5(( " U+%04lX unavailable\n", ch ));
+ continue;
+ }
- FT_TRACE5(( " U+%lX...", *p ));
+ error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
+ outline = face->glyph->outline;
+ if ( error || outline.n_points <= 0 )
+ {
+ FT_TRACE5(( " U+%04lX contains no outlines\n", ch ));
+ continue;
+ }
- /* 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;
- }
+ /* now compute min or max point indices and coordinates */
+ points = outline.points;
+ best_point = -1;
+ best_pos = 0; /* make compiler happy */
- error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
- if ( error || glyph->outline.n_points <= 0 )
- {
- FT_TRACE5(( "no outline\n" ));
- continue;
- }
+ {
+ FT_Int nn;
+ FT_Int first = 0;
+ FT_Int last = -1;
- /* now compute min or max point indices and coordinates */
- points = glyph->outline.points;
- best_point = -1;
- best_pos = 0; /* make compiler happy */
+ for ( nn = 0; nn < outline.n_contours; first = last + 1, nn++ )
{
- 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;
+ FT_Int pp;
- last = glyph->outline.contours[nn];
+ last = 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;
+ /* 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 )
+ if ( AF_CJK_IS_HORIZ_BLUE( bs ) )
+ {
+ if ( AF_CJK_IS_RIGHT_BLUE( bs ) )
{
- case AF_CJK_BLUE_TOP:
for ( pp = first; pp <= last; pp++ )
- if ( best_point < 0 || points[pp].y > best_pos )
+ if ( best_point < 0 || points[pp].x > best_pos )
{
best_point = pp;
- best_pos = points[pp].y;
+ best_pos = points[pp].x;
}
- break;
-
- case AF_CJK_BLUE_BOTTOM:
+ }
+ else
+ {
for ( pp = first; pp <= last; pp++ )
- if ( best_point < 0 || points[pp].y < best_pos )
+ if ( best_point < 0 || points[pp].x < best_pos )
{
best_point = pp;
- best_pos = points[pp].y;
+ best_pos = points[pp].x;
}
- break;
-
- case AF_CJK_BLUE_LEFT:
+ }
+ }
+ else
+ {
+ if ( AF_CJK_IS_TOP_BLUE( bs ) )
+ {
for ( pp = first; pp <= last; pp++ )
- if ( best_point < 0 || points[pp].x < best_pos )
+ if ( best_point < 0 || points[pp].y > best_pos )
{
best_point = pp;
- best_pos = points[pp].x;
+ best_pos = points[pp].y;
}
- break;
-
- case AF_CJK_BLUE_RIGHT:
+ }
+ else
+ {
for ( pp = first; pp <= last; pp++ )
- if ( best_point < 0 || points[pp].x > best_pos )
+ if ( best_point < 0 || points[pp].y < best_pos )
{
best_point = pp;
- best_pos = points[pp].x;
+ best_pos = points[pp].y;
}
- break;
-
- default:
- ;
}
}
- FT_TRACE5(( "best_pos=%5ld\n", best_pos ));
}
- if ( fill )
- fills[num_fills++] = best_pos;
- else
- flats[num_flats++] = best_pos;
+ FT_TRACE5(( " U+%04lX: best_pos = %5ld\n", ch, best_pos ));
}
+
+ if ( fill )
+ fills[num_fills++] = best_pos;
+ else
+ flats[num_flats++] = best_pos;
}
if ( num_flats == 0 && num_fills == 0 )
@@ -433,34 +439,30 @@
* we couldn't find a single glyph to compute this blue zone,
* we will simply ignore it then
*/
- FT_TRACE5(( "empty\n" ));
+ 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 );
+ /* we have computed the contents of the `fill' and `flats' tables, */
+ /* now determine the reference and overshoot position of the blue -- */
+ /* we simply take the median value after a simple sort */
af_sort_pos( num_fills, fills );
+ af_sort_pos( num_flats, flats );
- 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;
+ 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_ref =
*blue_shoot = fills[num_fills / 2];
}
else if ( num_fills == 0 )
{
- *blue_ref = flats[num_flats / 2];
+ *blue_ref =
*blue_shoot = flats[num_flats / 2];
}
else
@@ -478,25 +480,34 @@
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;
+ /* AF_CJK_IS_TOP_BLUE covers `right' and `top' */
+ if ( AF_CJK_IS_TOP_BLUE( bs ) ^ under_ref )
+ {
+ *blue_ref =
+ *blue_shoot = ( shoot + ref ) / 2;
+
+ FT_TRACE5(( " [reference smaller than overshoot,"
+ " taking mean value]\n" ));
+ }
}
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;
+ if ( AF_CJK_IS_TOP_BLUE( bs ) )
+ blue->flags |= AF_CJK_BLUE_TOP;
- FT_TRACE5(( "-- cjk %s bluezone ref = %ld shoot = %ld\n",
- cjk_blue_name[bb], *blue_ref, *blue_shoot ));
+ FT_TRACE5(( " -> reference = %ld\n"
+ " overshoot = %ld\n",
+ *blue_ref, *blue_shoot ));
}
+ FT_TRACE5(( "\n" ));
+
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 )
@@ -506,14 +517,14 @@
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_ULong glyph_index;
+ FT_Long y_offset;
- glyph_index = FT_Get_Char_Index( face, i );
+ af_get_char_index( &metrics->root, i, &glyph_index, &y_offset );
if ( glyph_index == 0 )
continue;
@@ -543,6 +554,8 @@
}
+ /* Initialize global metrics. */
+
FT_LOCAL_DEF( FT_Error )
af_cjk_metrics_init( AF_CJKMetrics metrics,
FT_Face face )
@@ -552,21 +565,21 @@
metrics->units_per_em = face->units_per_EM;
- if ( FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )
- face->charmap = NULL;
- else
+ if ( !FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )
{
- af_cjk_metrics_init_widths( metrics, face, 0x7530 );
- af_cjk_metrics_init_blues( metrics, face, af_cjk_hani_blue_chars );
+ af_cjk_metrics_init_widths( metrics, face );
+ af_cjk_metrics_init_blues( metrics, face );
af_cjk_metrics_check_digits( metrics, face );
}
FT_Set_Charmap( face, oldmap );
-
- return AF_Err_Ok;
+ return FT_Err_Ok;
}
+ /* Adjust scaling value, then scale and shift widths */
+ /* and blue zones (if applicable) for given dimension. */
+
static void
af_cjk_metrics_scale_dim( AF_CJKMetrics metrics,
AF_Scaler scaler,
@@ -578,8 +591,6 @@
FT_UInt nn;
- axis = &metrics->axis[dim];
-
if ( dim == AF_DIMENSION_HORZ )
{
scale = scaler->x_scale;
@@ -591,6 +602,8 @@
delta = scaler->y_delta;
}
+ axis = &metrics->axis[dim];
+
if ( axis->org_scale == scale && axis->org_delta == delta )
return;
@@ -646,12 +659,13 @@
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 ));
+ FT_TRACE5(( ">> active cjk blue zone %c%d[%ld/%ld]:\n"
+ " ref: cur=%.2f fit=%.2f\n"
+ " 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;
}
@@ -659,10 +673,14 @@
}
+ /* Scale global values in both directions. */
+
FT_LOCAL_DEF( void )
af_cjk_metrics_scale( AF_CJKMetrics metrics,
AF_Scaler scaler )
{
+ /* we copy the whole structure since the x and y scaling values */
+ /* are not modified, contrary to e.g. the `latin' auto-hinter */
metrics->root.scaler = *scaler;
af_cjk_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ );
@@ -678,6 +696,9 @@
/*************************************************************************/
/*************************************************************************/
+
+ /* Walk over all contours and compute its segments. */
+
static FT_Error
af_cjk_hints_compute_segments( AF_GlyphHints hints,
AF_Dimension dim )
@@ -699,7 +720,7 @@
{
AF_Point pt = seg->first;
AF_Point last = seg->last;
- AF_Flags f0 = (AF_Flags)(pt->flags & AF_FLAG_CONTROL);
+ AF_Flags f0 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL );
AF_Flags f1;
@@ -708,7 +729,7 @@
for ( ; pt != last; f0 = f1 )
{
pt = pt->next;
- f1 = (AF_Flags)(pt->flags & AF_FLAG_CONTROL);
+ f1 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL );
if ( !f0 && !f1 )
break;
@@ -718,7 +739,7 @@
}
}
- return AF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -744,10 +765,6 @@
/* now compare each segment to the others */
for ( seg1 = segments; seg1 < segment_limit; seg1++ )
{
- /* the fake segments are for metrics hinting only */
- if ( seg1->first == seg1->last )
- continue;
-
if ( seg1->dir != major_dir )
continue;
@@ -892,7 +909,7 @@
AF_Dimension dim )
{
AF_AxisHints axis = &hints->axis[dim];
- FT_Error error = AF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Memory memory = hints->memory;
AF_CJKAxis laxis = &((AF_CJKMetrics)hints->metrics)->axis[dim];
@@ -934,7 +951,7 @@
for ( seg = segments; seg < segment_limit; seg++ )
{
- AF_Edge found = 0;
+ AF_Edge found = NULL;
FT_Pos best = 0xFFFFU;
FT_Int ee;
@@ -962,14 +979,15 @@
/* can make a single edge. */
if ( link )
{
- AF_Segment seg1 = edge->first;
- AF_Segment link1;
+ AF_Segment seg1 = edge->first;
FT_Pos dist2 = 0;
do
{
- link1 = seg1->link;
+ AF_Segment link1 = seg1->link;
+
+
if ( link1 )
{
dist2 = AF_SEGMENT_DIST( link, link1 );
@@ -1006,10 +1024,11 @@
edge->first = seg;
edge->last = seg;
+ edge->dir = seg->dir;
edge->fpos = seg->pos;
- edge->opos = edge->pos = FT_MulFix( seg->pos, scale );
+ edge->opos = FT_MulFix( seg->pos, scale );
+ edge->pos = edge->opos;
seg->edge_next = seg;
- edge->dir = seg->dir;
}
else
{
@@ -1021,25 +1040,26 @@
}
}
- /*********************************************************************/
- /* */
- /* Good, we now compute each edge's properties according to segments */
- /* found on its position. Basically, these are as follows. */
- /* */
- /* - 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 */
- /* */
- /*********************************************************************/
-
- /* first of all, set the `edge' field in each segment -- this is */
- /* required in order to compute edge links */
- /* */
- /* Note that removing this loop and setting the `edge' field of each */
- /* segment directly in the code above slows down execution speed for */
- /* some reasons on platforms like the Sun. */
+ /******************************************************************/
+ /* */
+ /* Good, we now compute each edge's properties according to the */
+ /* segments found on its position. Basically, these are */
+ /* */
+ /* - 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 */
+ /* */
+ /******************************************************************/
+
+ /* first of all, set the `edge' field in each segment -- this is */
+ /* required in order to compute edge links */
+ /*
+ * Note that removing this loop and setting the `edge' field of each
+ * segment directly in the code above slows down execution speed for
+ * some reasons on platforms like the Sun.
+ */
{
AF_Edge edges = axis->edges;
AF_Edge edge_limit = edges + axis->num_edges;
@@ -1148,6 +1168,8 @@
}
+ /* Detect segments and edges for given dimension. */
+
static FT_Error
af_cjk_hints_detect_features( AF_GlyphHints hints,
AF_Dimension dim )
@@ -1166,6 +1188,8 @@
}
+ /* Compute all edges which lie within blue zones. */
+
FT_LOCAL_DEF( void )
af_cjk_hints_compute_blue_edges( AF_GlyphHints hints,
AF_CJKMetrics metrics,
@@ -1213,10 +1237,10 @@
/* 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 );
+ is_top_right_blue =
+ (FT_Byte)( ( blue->flags & AF_CJK_BLUE_TOP ) != 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 */
@@ -1253,6 +1277,8 @@
}
+ /* Initalize hinting engine. */
+
FT_LOCAL_DEF( FT_Error )
af_cjk_hints_init( AF_GlyphHints hints,
AF_CJKMetrics metrics )
@@ -1261,7 +1287,7 @@
FT_UInt32 scaler_flags, other_flags;
- af_glyph_hints_rescale( hints, (AF_ScriptMetrics)metrics );
+ af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics );
/*
* correct x_scale and y_scale when needed, since they may have
@@ -1311,7 +1337,7 @@
hints->scaler_flags = scaler_flags;
hints->other_flags = other_flags;
- return 0;
+ return FT_Err_Ok;
}
@@ -1323,8 +1349,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_cjk_snap_width( AF_Width widths,
@@ -1371,7 +1397,9 @@
}
- /* compute the snapped width of a given stem */
+ /* Compute the snapped width of a given stem. */
+ /* There is a lot of voodoo in this function; changing the hard-coded */
+ /* parameters influence the whole hinting process. */
static FT_Pos
af_cjk_compute_stem_width( AF_GlyphHints hints,
@@ -1380,8 +1408,8 @@
AF_Edge_Flags base_flags,
AF_Edge_Flags stem_flags )
{
- AF_CJKMetrics metrics = (AF_CJKMetrics) hints->metrics;
- AF_CJKAxis axis = & metrics->axis[dim];
+ 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 );
@@ -1492,7 +1520,7 @@
}
- /* align one stem edge relative to the previous stem edge */
+ /* Align one stem edge relative to the previous stem edge. */
static void
af_cjk_align_linked_edge( AF_GlyphHints hints,
@@ -1509,9 +1537,18 @@
stem_edge->pos = base_edge->pos + fitted_width;
+
+ FT_TRACE5(( " CJKLINK: edge %d @%d (opos=%.2f) linked to %.2f,"
+ " dist was %.2f, now %.2f\n",
+ stem_edge - hints->axis[dim].edges, stem_edge->fpos,
+ 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_cjk_align_serif_edge( AF_GlyphHints hints,
AF_Edge base,
@@ -1665,6 +1702,8 @@
}
+ /* The main grid-fitting routine. */
+
static void
af_cjk_hint_edges( AF_GlyphHints hints,
AF_Dimension dim )
@@ -1680,10 +1719,16 @@
FT_Bool has_last_stem = FALSE;
FT_Pos last_stem_pos = 0;
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_UInt num_actions = 0;
+#endif
+
+
+ FT_TRACE5(( "cjk %s edge hinting (style `%s')\n",
+ dim == AF_DIMENSION_VERT ? "horizontal" : "vertical",
+ af_style_names[hints->metrics->style_class->style] ));
/* 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 ) )
{
@@ -1714,10 +1759,14 @@
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 ));
+#ifdef FT_DEBUG_LEVEL_TRACE
+ 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 ));
+
+ num_actions++;
+#endif
edge1->pos = blue->fit;
edge1->flags |= AF_EDGE_DONE;
@@ -1726,6 +1775,10 @@
{
af_cjk_align_linked_edge( hints, dim, edge1, edge2 );
edge2->flags |= AF_EDGE_DONE;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ num_actions++;
+#endif
}
if ( !anchor )
@@ -1767,6 +1820,7 @@
}
/* now align the stem */
+
/* this should not happen, but it's better to be safe */
if ( edge2->blue_edge )
{
@@ -1774,6 +1828,11 @@
af_cjk_align_linked_edge( hints, dim, edge2, edge );
edge->flags |= AF_EDGE_DONE;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ num_actions++;
+#endif
+
continue;
}
@@ -1781,6 +1840,11 @@
{
af_cjk_align_linked_edge( hints, dim, edge2, edge );
edge->flags |= AF_EDGE_DONE;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ num_actions++;
+#endif
+
/* We rarely reaches here it seems;
* usually the two edges belonging
* to one stem are marked as DONE together
@@ -1948,7 +2012,7 @@
}
if ( !skipped )
- return;
+ goto Exit;
/*
* now hint the remaining edges (serifs and single) in order
@@ -1968,7 +2032,7 @@
}
if ( !skipped )
- return;
+ goto Exit;
for ( edge = edges; edge < edge_limit; edge++ )
{
@@ -2006,6 +2070,16 @@
}
}
}
+
+ Exit:
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( !num_actions )
+ FT_TRACE5(( " (none)\n" ));
+ FT_TRACE5(( "\n" ));
+#endif
+
+ return;
}
@@ -2099,6 +2173,8 @@
}
+ /* Apply the complete hinting algorithm to a CJK glyph. */
+
FT_LOCAL_DEF( FT_Error )
af_cjk_hints_apply( AF_GlyphHints hints,
FT_Outline* outline,
@@ -2186,81 +2262,41 @@
/*************************************************************************/
- /* this corresponds to Unicode 6.0 */
+ AF_DEFINE_WRITING_SYSTEM_CLASS(
+ af_cjk_writing_system_class,
- static const AF_Script_UniRangeRec af_cjk_uniranges[] =
- {
- 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 */
- AF_UNIRANGE_REC( 0x3200UL, 0x32FFUL ), /* Enclosed CJK Letters and Months */
- AF_UNIRANGE_REC( 0x3300UL, 0x33FFUL ), /* CJK Compatibility */
- 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 )
- };
-
-
- AF_DEFINE_SCRIPT_CLASS( af_cjk_script_class,
- AF_SCRIPT_CJK,
- af_cjk_uniranges,
+ AF_WRITING_SYSTEM_CJK,
sizeof ( AF_CJKMetricsRec ),
- (AF_Script_InitMetricsFunc) af_cjk_metrics_init,
- (AF_Script_ScaleMetricsFunc)af_cjk_metrics_scale,
- (AF_Script_DoneMetricsFunc) NULL,
+ (AF_WritingSystem_InitMetricsFunc) af_cjk_metrics_init,
+ (AF_WritingSystem_ScaleMetricsFunc)af_cjk_metrics_scale,
+ (AF_WritingSystem_DoneMetricsFunc) NULL,
- (AF_Script_InitHintsFunc) af_cjk_hints_init,
- (AF_Script_ApplyHintsFunc) af_cjk_hints_apply
+ (AF_WritingSystem_InitHintsFunc) af_cjk_hints_init,
+ (AF_WritingSystem_ApplyHintsFunc) af_cjk_hints_apply
)
+
#else /* !AF_CONFIG_OPTION_CJK */
- static const AF_Script_UniRangeRec af_cjk_uniranges[] =
- {
- AF_UNIRANGE_REC( 0UL, 0UL )
- };
+ AF_DEFINE_WRITING_SYSTEM_CLASS(
+ af_cjk_writing_system_class,
- AF_DEFINE_SCRIPT_CLASS( af_cjk_script_class,
- AF_SCRIPT_CJK,
- af_cjk_uniranges,
+ AF_WRITING_SYSTEM_CJK,
sizeof ( AF_CJKMetricsRec ),
- (AF_Script_InitMetricsFunc) NULL,
- (AF_Script_ScaleMetricsFunc)NULL,
- (AF_Script_DoneMetricsFunc) NULL,
+ (AF_WritingSystem_InitMetricsFunc) NULL,
+ (AF_WritingSystem_ScaleMetricsFunc)NULL,
+ (AF_WritingSystem_DoneMetricsFunc) NULL,
- (AF_Script_InitHintsFunc) NULL,
- (AF_Script_ApplyHintsFunc) NULL
+ (AF_WritingSystem_InitHintsFunc) NULL,
+ (AF_WritingSystem_ApplyHintsFunc) NULL
)
+
#endif /* !AF_CONFIG_OPTION_CJK */
diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h
index 8416c0d..4dd4f39 100644
--- a/src/autofit/afcjk.h
+++ b/src/autofit/afcjk.h
@@ -2,9 +2,9 @@
/* */
/* afcjk.h */
/* */
-/* Auto-fitter hinting routines for CJK script (specification). */
+/* Auto-fitter hinting routines for CJK writing system (specification). */
/* */
-/* Copyright 2006, 2007, 2011 by */
+/* Copyright 2006, 2007, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,39 +26,41 @@
FT_BEGIN_HEADER
- /* the CJK-specific script class */
+ /* the CJK-specific writing system */
- AF_DECLARE_SCRIPT_CLASS(af_cjk_script_class)
+ AF_DECLARE_WRITING_SYSTEM_CLASS( af_cjk_writing_system_class )
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** C J K G L O B A L M E T R I C S *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
- /* 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_IS_TOP_BLUE( b ) \
+ ( (b)->properties & AF_BLUE_PROPERTY_CJK_TOP )
+#define AF_CJK_IS_HORIZ_BLUE( b ) \
+ ( (b)->properties & AF_BLUE_PROPERTY_CJK_HORIZ )
+#define AF_CJK_IS_RIGHT_BLUE AF_CJK_IS_TOP_BLUE
#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_ACTIVE = 1 << 0, /* set if zone height is <= 3/4px */
+ AF_CJK_BLUE_TOP = 1 << 1, /* result of AF_CJK_IS_TOP_BLUE */
+ AF_CJK_BLUE_ADJUSTMENT = 1 << 2, /* used for scale adjustment */
+ /* optimization */
AF_CJK_BLUE_FLAG_MAX
};
@@ -77,16 +79,16 @@ FT_BEGIN_HEADER
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;
+ FT_UInt width_count; /* number of used widths */
+ AF_WidthRec widths[AF_CJK_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? */
/* used for horizontal metrics too for CJK */
FT_Bool control_overshoot;
FT_UInt blue_count;
- AF_CJKBlueRec blues[AF_CJK_BLUE_MAX];
+ AF_CJKBlueRec blues[AF_BLUE_STRINGSET_MAX];
FT_Fixed org_scale;
FT_Pos org_delta;
@@ -96,13 +98,14 @@ FT_BEGIN_HEADER
typedef struct AF_CJKMetricsRec_
{
- AF_ScriptMetricsRec root;
- FT_UInt units_per_em;
- AF_CJKAxisRec axis[AF_DIMENSION_MAX];
+ AF_StyleMetricsRec root;
+ FT_UInt units_per_em;
+ AF_CJKAxisRec axis[AF_DIMENSION_MAX];
} AF_CJKMetricsRec, *AF_CJKMetrics;
+#ifdef AF_CONFIG_OPTION_CJK
FT_LOCAL( FT_Error )
af_cjk_metrics_init( AF_CJKMetrics metrics,
FT_Face face );
@@ -120,15 +123,15 @@ FT_BEGIN_HEADER
FT_Outline* outline,
AF_CJKMetrics metrics );
- /* Shared. called from afindic.c */
+ /* 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_Face face );
+#endif /* AF_CONFIG_OPTION_CJK */
/* */
diff --git a/src/autofit/afcover.h b/src/autofit/afcover.h
new file mode 100644
index 0000000..d5ac969
--- /dev/null
+++ b/src/autofit/afcover.h
@@ -0,0 +1,105 @@
+/***************************************************************************/
+/* */
+/* afcover.h */
+/* */
+/* Auto-fitter coverages (specification only). */
+/* */
+/* Copyright 2013, 2014 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 can be included multiple times. */
+ /* Define `COVERAGE' as needed. */
+
+
+ /* Add new coverages here. The first and second arguments are the */
+ /* coverage name in lowercase and uppercase, respectively, followed */
+ /* by a description string. The last four arguments are the four */
+ /* characters defining the corresponding OpenType feature. */
+
+#if 0
+ /* XXX: It's not possible to define blue zone characters in advance. */
+ COVERAGE( alternative_fractions, ALTERNATIVE_FRACTIONS,
+ "alternative fractions",
+ 'a', 'f', 'r', 'c' )
+#endif
+
+ COVERAGE( petite_capitals_from_capitals, PETITE_CAPITALS_FROM_CAPITALS,
+ "petite capitals from capitals",
+ 'c', '2', 'c', 'p' )
+
+ COVERAGE( small_capitals_from_capitals, SMALL_CAPITALS_FROM_CAPITALS,
+ "small capitals from capitals",
+ 'c', '2', 's', 'c' )
+
+#if 0
+ /* XXX: Only digits are in this coverage, however, both normal style */
+ /* and oldstyle representation forms are possible. */
+ COVERAGE( denominators, DENOMINATORS,
+ "denominators",
+ 'd', 'n', 'o', 'm' )
+#endif
+
+#if 0
+ /* XXX: It's not possible to define blue zone characters in advance. */
+ COVERAGE( fractions, FRACTIONS,
+ "fractions",
+ 'f', 'r', 'a', 'c' )
+#endif
+
+#if 0
+ /* XXX: Only digits are in this coverage, however, both normal style */
+ /* and oldstyle representation forms are possible. */
+ COVERAGE( numerators, NUMERATORS,
+ "numerators",
+ 'n', 'u', 'm', 'r' )
+#endif
+
+ COVERAGE( ordinals, ORDINALS,
+ "ordinals",
+ 'o', 'r', 'd', 'n' )
+
+ COVERAGE( petite_capitals, PETITE_CAPITALS,
+ "petite capitals",
+ 'p', 'c', 'a', 'p' )
+
+ COVERAGE( ruby, RUBY,
+ "ruby",
+ 'r', 'u', 'b', 'y' )
+
+ COVERAGE( scientific_inferiors, SCIENTIFIC_INFERIORS,
+ "scientific inferiors",
+ 's', 'i', 'n', 'f' )
+
+ COVERAGE( small_capitals, SMALL_CAPITALS,
+ "small capitals",
+ 's', 'm', 'c', 'p' )
+
+ COVERAGE( subscript, SUBSCRIPT,
+ "subscript",
+ 's', 'u', 'b', 's' )
+
+ COVERAGE( superscript, SUPERSCRIPT,
+ "superscript",
+ 's', 'u', 'p', 's' )
+
+ COVERAGE( titling, TITLING,
+ "titling",
+ 't', 'i', 't', 'l' )
+
+#if 0
+ /* to be always excluded */
+ COVERAGE(nalt, 'n', 'a', 'l', 't'); /* Alternate Annotation Forms (?) */
+ COVERAGE(ornm, 'o', 'r', 'n', 'm'); /* Ornaments (?) */
+#endif
+
+
+/* END */
diff --git a/src/autofit/afdummy.c b/src/autofit/afdummy.c
index 4bf278c..f8702a1 100644
--- a/src/autofit/afdummy.c
+++ b/src/autofit/afdummy.c
@@ -5,7 +5,7 @@
/* Auto-fitter dummy routines to be used if no hinting should be */
/* performed (body). */
/* */
-/* Copyright 2003-2005, 2011 by */
+/* Copyright 2003-2005, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,12 +23,17 @@
static FT_Error
- af_dummy_hints_init( AF_GlyphHints hints,
- AF_ScriptMetrics metrics )
+ af_dummy_hints_init( AF_GlyphHints hints,
+ AF_StyleMetrics metrics )
{
- af_glyph_hints_rescale( hints,
- metrics );
- return AF_Err_Ok;
+ af_glyph_hints_rescale( hints, metrics );
+
+ hints->x_scale = metrics->scaler.x_scale;
+ hints->y_scale = metrics->scaler.y_scale;
+ hints->x_delta = metrics->scaler.x_delta;
+ hints->y_delta = metrics->scaler.y_delta;
+
+ return FT_Err_Ok;
}
@@ -36,25 +41,30 @@
af_dummy_hints_apply( AF_GlyphHints hints,
FT_Outline* outline )
{
- FT_UNUSED( hints );
- FT_UNUSED( outline );
+ FT_Error error;
+
- return AF_Err_Ok;
+ error = af_glyph_hints_reload( hints, outline );
+ if ( !error )
+ af_glyph_hints_save( hints, outline );
+
+ return error;
}
- AF_DEFINE_SCRIPT_CLASS( af_dummy_script_class,
- AF_SCRIPT_NONE,
- NULL,
+ AF_DEFINE_WRITING_SYSTEM_CLASS(
+ af_dummy_writing_system_class,
+
+ AF_WRITING_SYSTEM_DUMMY,
- sizeof ( AF_ScriptMetricsRec ),
+ sizeof ( AF_StyleMetricsRec ),
- (AF_Script_InitMetricsFunc) NULL,
- (AF_Script_ScaleMetricsFunc)NULL,
- (AF_Script_DoneMetricsFunc) NULL,
+ (AF_WritingSystem_InitMetricsFunc) NULL,
+ (AF_WritingSystem_ScaleMetricsFunc)NULL,
+ (AF_WritingSystem_DoneMetricsFunc) NULL,
- (AF_Script_InitHintsFunc) af_dummy_hints_init,
- (AF_Script_ApplyHintsFunc) af_dummy_hints_apply
+ (AF_WritingSystem_InitHintsFunc) af_dummy_hints_init,
+ (AF_WritingSystem_ApplyHintsFunc) af_dummy_hints_apply
)
diff --git a/src/autofit/afdummy.h b/src/autofit/afdummy.h
index 95d8f8c..ad1b0d3 100644
--- a/src/autofit/afdummy.h
+++ b/src/autofit/afdummy.h
@@ -5,7 +5,7 @@
/* Auto-fitter dummy routines to be used if no hinting should be */
/* performed (specification). */
/* */
-/* Copyright 2003-2005, 2011 by */
+/* Copyright 2003-2005, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,11 +25,9 @@
FT_BEGIN_HEADER
- /* A dummy script metrics class used when no hinting should
- * be performed. This is the default for non-latin glyphs!
- */
+ /* A dummy writing system used when no hinting should be performed. */
- AF_DECLARE_SCRIPT_CLASS( af_dummy_script_class )
+ AF_DECLARE_WRITING_SYSTEM_CLASS( af_dummy_writing_system_class )
/* */
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 3e0c02d..a54c20c 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter routines to compute global hinting values (body). */
/* */
-/* Copyright 2003-2011 by */
+/* Copyright 2003-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,129 +17,215 @@
#include "afglobal.h"
-#include "afdummy.h"
-#include "aflatin.h"
-#include "afcjk.h"
-#include "afindic.h"
-#include "afpic.h"
+#include "afranges.h"
+#include "hbshim.h"
+#include FT_INTERNAL_DEBUG_H
+
+
+ /*************************************************************************/
+ /* */
+ /* 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_afglobal
+
+
+ /* get writing system specific header files */
+#undef WRITING_SYSTEM
+#define WRITING_SYSTEM( ws, WS ) /* empty */
+#include "afwrtsys.h"
#include "aferrors.h"
+#include "afpic.h"
+
+
+#undef SCRIPT
+#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \
+ AF_DEFINE_SCRIPT_CLASS( \
+ af_ ## s ## _script_class, \
+ AF_SCRIPT_ ## S, \
+ af_ ## s ## _uniranges, \
+ sc1, sc2, sc3 )
+
+#include "afscript.h"
+
+
+#undef STYLE
+#define STYLE( s, S, d, ws, sc, ss, c ) \
+ AF_DEFINE_STYLE_CLASS( \
+ af_ ## s ## _style_class, \
+ AF_STYLE_ ## S, \
+ ws, \
+ sc, \
+ ss, \
+ c )
+
+#include "afstyles.h"
-#ifdef FT_OPTION_AUTOFIT2
-#include "aflatin2.h"
-#endif
#ifndef FT_CONFIG_OPTION_PIC
- /* when updating this table, don't forget to update */
- /* AF_SCRIPT_CLASSES_COUNT and autofit_module_class_pic_init */
+#undef WRITING_SYSTEM
+#define WRITING_SYSTEM( ws, WS ) \
+ &af_ ## ws ## _writing_system_class,
- /* populate this list when you add new scripts */
- static AF_ScriptClass const af_script_classes[] =
+ FT_LOCAL_ARRAY_DEF( AF_WritingSystemClass )
+ af_writing_system_classes[] =
{
- &af_dummy_script_class,
-#ifdef FT_OPTION_AUTOFIT2
- &af_latin2_script_class,
-#endif
- &af_latin_script_class,
- &af_cjk_script_class,
- &af_indic_script_class,
+
+#include "afwrtsys.h"
+
+ NULL /* do not remove */
+ };
+
+
+#undef SCRIPT
+#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \
+ &af_ ## s ## _script_class,
+
+ FT_LOCAL_ARRAY_DEF( AF_ScriptClass )
+ af_script_classes[] =
+ {
+
+#include "afscript.h"
+
+ NULL /* do not remove */
+ };
+
+
+#undef STYLE
+#define STYLE( s, S, d, ws, sc, ss, c ) \
+ &af_ ## s ## _style_class,
+
+ FT_LOCAL_ARRAY_DEF( AF_StyleClass )
+ af_style_classes[] =
+ {
+
+#include "afstyles.h"
+
NULL /* do not remove */
};
#endif /* !FT_CONFIG_OPTION_PIC */
- /* index of default script in `af_script_classes' */
-#define AF_SCRIPT_LIST_DEFAULT 2
- /* a bit mask indicating an uncovered glyph */
-#define AF_SCRIPT_LIST_NONE 0x7F
- /* if this flag is set, we have an ASCII digit */
-#define AF_DIGIT 0x80
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+#undef STYLE
+#define STYLE( s, S, d, ws, sc, ss, c ) #s,
- /*
- * Note that glyph_scripts[] is used to map each glyph into
- * an index into the `af_script_classes' array.
- *
- */
- typedef struct AF_FaceGlobalsRec_
+ FT_LOCAL_ARRAY_DEF( char* )
+ af_style_names[] =
{
- FT_Face face;
- FT_Long glyph_count; /* same as face->num_glyphs */
- FT_Byte* glyph_scripts;
- AF_ScriptMetrics metrics[AF_SCRIPT_MAX];
+#include "afstyles.h"
+
+ };
- } AF_FaceGlobalsRec;
+#endif /* FT_DEBUG_LEVEL_TRACE */
- /* Compute the script index of each glyph within a given face. */
+ /* Compute the style index of each glyph within a given face. */
static FT_Error
- af_face_globals_compute_script_coverage( AF_FaceGlobals globals )
+ af_face_globals_compute_style_coverage( AF_FaceGlobals globals )
{
- FT_Error error = AF_Err_Ok;
+ FT_Error error;
FT_Face face = globals->face;
FT_CharMap old_charmap = face->charmap;
- FT_Byte* gscripts = globals->glyph_scripts;
- FT_UInt ss, i;
+ FT_Byte* gstyles = globals->glyph_styles;
+ FT_UInt ss;
+ FT_UInt i;
+ FT_UInt dflt = ~0U; /* a non-valid value */
- /* the value AF_SCRIPT_LIST_NONE means `uncovered glyph' */
- FT_MEM_SET( globals->glyph_scripts,
- AF_SCRIPT_LIST_NONE,
+ /* the value AF_STYLE_UNASSIGNED means `uncovered glyph' */
+ FT_MEM_SET( globals->glyph_styles,
+ AF_STYLE_UNASSIGNED,
globals->glyph_count );
error = FT_Select_Charmap( face, FT_ENCODING_UNICODE );
if ( error )
{
- /*
- * Ignore this error; we simply use the default script.
- * XXX: Shouldn't we rather disable hinting?
- */
- error = AF_Err_Ok;
+ /*
+ * Ignore this error; we simply use the fallback style.
+ * XXX: Shouldn't we rather disable hinting?
+ */
+ error = FT_Err_Ok;
goto Exit;
}
- /* scan each script in a Unicode charmap */
- for ( ss = 0; AF_SCRIPT_CLASSES_GET[ss]; ss++ )
+ /* scan each style in a Unicode charmap */
+ for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ )
{
- AF_ScriptClass clazz = AF_SCRIPT_CLASSES_GET[ss];
+ AF_StyleClass style_class =
+ AF_STYLE_CLASSES_GET[ss];
+ AF_ScriptClass script_class =
+ AF_SCRIPT_CLASSES_GET[style_class->script];
AF_Script_UniRange range;
- if ( clazz->script_uni_ranges == NULL )
+ if ( script_class->script_uni_ranges == NULL )
continue;
/*
- * Scan all unicode points in the range and set the corresponding
- * glyph script index.
+ * Scan all Unicode points in the range and set the corresponding
+ * glyph style index.
*/
- for ( range = clazz->script_uni_ranges; range->first != 0; range++ )
+ if ( style_class->coverage == AF_COVERAGE_DEFAULT )
{
- FT_ULong charcode = range->first;
- FT_UInt gindex;
+ if ( (FT_UInt)style_class->script ==
+ globals->module->default_script )
+ dflt = ss;
+ for ( range = script_class->script_uni_ranges;
+ range->first != 0;
+ range++ )
+ {
+ FT_ULong charcode = range->first;
+ FT_UInt gindex;
- gindex = FT_Get_Char_Index( face, charcode );
- if ( gindex != 0 &&
- gindex < (FT_ULong)globals->glyph_count &&
- gscripts[gindex] == AF_SCRIPT_LIST_NONE )
- gscripts[gindex] = (FT_Byte)ss;
+ gindex = FT_Get_Char_Index( face, charcode );
- for (;;)
- {
- charcode = FT_Get_Next_Char( face, charcode, &gindex );
+ if ( gindex != 0 &&
+ gindex < (FT_ULong)globals->glyph_count &&
+ gstyles[gindex] == AF_STYLE_UNASSIGNED )
+ gstyles[gindex] = (FT_Byte)ss;
+
+ for (;;)
+ {
+ charcode = FT_Get_Next_Char( face, charcode, &gindex );
- if ( gindex == 0 || charcode > range->last )
- break;
+ if ( gindex == 0 || charcode > range->last )
+ break;
- if ( gindex < (FT_ULong)globals->glyph_count &&
- gscripts[gindex] == AF_SCRIPT_LIST_NONE )
- gscripts[gindex] = (FT_Byte)ss;
+ if ( gindex < (FT_ULong)globals->glyph_count &&
+ gstyles[gindex] == AF_STYLE_UNASSIGNED )
+ gstyles[gindex] = (FT_Byte)ss;
+ }
}
}
+ else
+ {
+ /* get glyphs not directly addressable by cmap */
+ af_get_coverage( globals, style_class, gstyles );
+ }
+ }
+
+ /* handle the default OpenType features of the default script ... */
+ af_get_coverage( globals, AF_STYLE_CLASSES_GET[dflt], gstyles );
+
+ /* ... and the remaining default OpenType features */
+ for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ )
+ {
+ AF_StyleClass style_class = AF_STYLE_CLASSES_GET[ss];
+
+
+ if ( ss != dflt && style_class->coverage == AF_COVERAGE_DEFAULT )
+ af_get_coverage( globals, style_class, gstyles );
}
/* mark ASCII digits */
@@ -149,28 +235,68 @@
if ( gindex != 0 && gindex < (FT_ULong)globals->glyph_count )
- gscripts[gindex] |= AF_DIGIT;
+ gstyles[gindex] |= AF_DIGIT;
}
Exit:
/*
- * By default, all uncovered glyphs are set to the latin script.
+ * By default, all uncovered glyphs are set to the fallback style.
* XXX: Shouldn't we disable hinting or do something similar?
*/
+ if ( globals->module->fallback_style != AF_STYLE_UNASSIGNED )
{
FT_Long nn;
for ( nn = 0; nn < globals->glyph_count; nn++ )
{
- if ( ( gscripts[nn] & ~AF_DIGIT ) == AF_SCRIPT_LIST_NONE )
+ if ( ( gstyles[nn] & ~AF_DIGIT ) == AF_STYLE_UNASSIGNED )
{
- gscripts[nn] &= ~AF_SCRIPT_LIST_NONE;
- gscripts[nn] |= AF_SCRIPT_LIST_DEFAULT;
+ gstyles[nn] &= ~AF_STYLE_UNASSIGNED;
+ gstyles[nn] |= globals->module->fallback_style;
}
}
}
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+ FT_TRACE4(( "\n"
+ "style coverage\n"
+ "==============\n"
+ "\n" ));
+
+ for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ )
+ {
+ AF_StyleClass style_class = AF_STYLE_CLASSES_GET[ss];
+ FT_UInt count = 0;
+ FT_Long idx;
+
+
+ FT_TRACE4(( "%s:\n", af_style_names[style_class->style] ));
+
+ for ( idx = 0; idx < globals->glyph_count; idx++ )
+ {
+ if ( ( gstyles[idx] & ~AF_DIGIT ) == style_class->style )
+ {
+ if ( !( count % 10 ) )
+ FT_TRACE4(( " " ));
+
+ FT_TRACE4(( " %d", idx ));
+ count++;
+
+ if ( !( count % 10 ) )
+ FT_TRACE4(( "\n" ));
+ }
+ }
+
+ if ( !count )
+ FT_TRACE4(( " (none)\n" ));
+ if ( count % 10 )
+ FT_TRACE4(( "\n" ));
+ }
+
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
FT_Set_Charmap( face, old_charmap );
return error;
}
@@ -178,7 +304,8 @@
FT_LOCAL_DEF( FT_Error )
af_face_globals_new( FT_Face face,
- AF_FaceGlobals *aglobals )
+ AF_FaceGlobals *aglobals,
+ AF_Module module )
{
FT_Error error;
FT_Memory memory;
@@ -187,21 +314,29 @@
memory = face->memory;
- if ( !FT_ALLOC( globals, sizeof ( *globals ) +
- face->num_glyphs * sizeof ( FT_Byte ) ) )
- {
- globals->face = face;
- globals->glyph_count = face->num_glyphs;
- globals->glyph_scripts = (FT_Byte*)( globals + 1 );
+ if ( FT_ALLOC( globals, sizeof ( *globals ) +
+ face->num_glyphs * sizeof ( FT_Byte ) ) )
+ goto Exit;
- error = af_face_globals_compute_script_coverage( globals );
- if ( error )
- {
- af_face_globals_free( globals );
- globals = NULL;
- }
+ globals->face = face;
+ globals->glyph_count = face->num_glyphs;
+ globals->glyph_styles = (FT_Byte*)( globals + 1 );
+ globals->module = module;
+
+#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
+ globals->hb_font = hb_ft_font_create( face, NULL );
+#endif
+
+ error = af_face_globals_compute_style_coverage( globals );
+ if ( error )
+ {
+ af_face_globals_free( globals );
+ globals = NULL;
}
+ else
+ globals->increase_x_height = AF_PROP_INCREASE_X_HEIGHT_MAX;
+ Exit:
*aglobals = globals;
return error;
}
@@ -216,25 +351,31 @@
FT_UInt nn;
- for ( nn = 0; nn < AF_SCRIPT_MAX; nn++ )
+ for ( nn = 0; nn < AF_STYLE_MAX; nn++ )
{
if ( globals->metrics[nn] )
{
- AF_ScriptClass clazz = AF_SCRIPT_CLASSES_GET[nn];
-
+ AF_StyleClass style_class =
+ AF_STYLE_CLASSES_GET[nn];
+ AF_WritingSystemClass writing_system_class =
+ AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system];
- FT_ASSERT( globals->metrics[nn]->clazz == clazz );
- if ( clazz->script_metrics_done )
- clazz->script_metrics_done( globals->metrics[nn] );
+ if ( writing_system_class->style_metrics_done )
+ writing_system_class->style_metrics_done( globals->metrics[nn] );
FT_FREE( globals->metrics[nn] );
}
}
- globals->glyph_count = 0;
- globals->glyph_scripts = NULL; /* no need to free this one! */
- globals->face = NULL;
+#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
+ hb_font_destroy( globals->hb_font );
+ globals->hb_font = NULL;
+#endif
+
+ globals->glyph_count = 0;
+ globals->glyph_styles = NULL; /* no need to free this one! */
+ globals->face = NULL;
FT_FREE( globals );
}
@@ -242,60 +383,64 @@
FT_LOCAL_DEF( FT_Error )
- af_face_globals_get_metrics( AF_FaceGlobals globals,
- FT_UInt gindex,
- FT_UInt options,
- AF_ScriptMetrics *ametrics )
+ af_face_globals_get_metrics( AF_FaceGlobals globals,
+ FT_UInt gindex,
+ FT_UInt options,
+ AF_StyleMetrics *ametrics )
{
- AF_ScriptMetrics metrics = NULL;
- FT_UInt gidx;
- AF_ScriptClass clazz;
- FT_UInt script = options & 15;
- const FT_Offset script_max = sizeof ( AF_SCRIPT_CLASSES_GET ) /
- sizeof ( AF_SCRIPT_CLASSES_GET[0] );
- FT_Error error = AF_Err_Ok;
+ AF_StyleMetrics metrics = NULL;
+
+ AF_Style style = (AF_Style)options;
+ AF_WritingSystemClass writing_system_class;
+ AF_StyleClass style_class;
+
+ FT_Error error = FT_Err_Ok;
if ( gindex >= (FT_ULong)globals->glyph_count )
{
- error = AF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
- gidx = script;
- if ( gidx == 0 || gidx + 1 >= script_max )
- gidx = globals->glyph_scripts[gindex] & AF_SCRIPT_LIST_NONE;
+ /* if we have a forced style (via `options'), use it, */
+ /* otherwise look into `glyph_styles' array */
+ if ( style == AF_STYLE_NONE_DFLT || style + 1 >= AF_STYLE_MAX )
+ style = (AF_Style)( globals->glyph_styles[gindex] &
+ AF_STYLE_UNASSIGNED );
- clazz = AF_SCRIPT_CLASSES_GET[gidx];
- if ( script == 0 )
- script = clazz->script;
+ style_class = AF_STYLE_CLASSES_GET[style];
+ writing_system_class = AF_WRITING_SYSTEM_CLASSES_GET
+ [style_class->writing_system];
- metrics = globals->metrics[clazz->script];
+ metrics = globals->metrics[style];
if ( metrics == NULL )
{
- /* create the global metrics object when needed */
+ /* create the global metrics object if necessary */
FT_Memory memory = globals->face->memory;
- if ( FT_ALLOC( metrics, clazz->script_metrics_size ) )
+ if ( FT_ALLOC( metrics, writing_system_class->style_metrics_size ) )
goto Exit;
- metrics->clazz = clazz;
+ metrics->style_class = style_class;
+ metrics->globals = globals;
- if ( clazz->script_metrics_init )
+ if ( writing_system_class->style_metrics_init )
{
- error = clazz->script_metrics_init( metrics, globals->face );
+ error = writing_system_class->style_metrics_init( metrics,
+ globals->face );
if ( error )
{
- if ( clazz->script_metrics_done )
- clazz->script_metrics_done( metrics );
+ if ( writing_system_class->style_metrics_done )
+ writing_system_class->style_metrics_done( metrics );
FT_FREE( metrics );
goto Exit;
}
}
- globals->metrics[clazz->script] = metrics;
+ globals->metrics[style] = metrics;
}
Exit:
@@ -310,7 +455,7 @@
FT_UInt gindex )
{
if ( gindex < (FT_ULong)globals->glyph_count )
- return (FT_Bool)( globals->glyph_scripts[gindex] & AF_DIGIT );
+ return (FT_Bool)( globals->glyph_styles[gindex] & AF_DIGIT );
return (FT_Bool)0;
}
diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h
index cc6860b..38d8d69 100644
--- a/src/autofit/afglobal.h
+++ b/src/autofit/afglobal.h
@@ -5,7 +5,7 @@
/* Auto-fitter routines to compute global hinting values */
/* (specification). */
/* */
-/* Copyright 2003-2005, 2007, 2009, 2011 by */
+/* Copyright 2003-2005, 2007, 2009, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,11 +22,66 @@
#include "aftypes.h"
+#include "afmodule.h"
+#include "hbshim.h"
FT_BEGIN_HEADER
+ FT_LOCAL_ARRAY( AF_WritingSystemClass )
+ af_writing_system_classes[];
+
+
+#undef SCRIPT
+#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \
+ AF_DECLARE_SCRIPT_CLASS( af_ ## s ## _script_class )
+
+#include "afscript.h"
+
+ FT_LOCAL_ARRAY( AF_ScriptClass )
+ af_script_classes[];
+
+
+#undef STYLE
+#define STYLE( s, S, d, ws, sc, ss, c ) \
+ AF_DECLARE_STYLE_CLASS( af_ ## s ## _style_class )
+
+#include "afstyles.h"
+
+ FT_LOCAL_ARRAY( AF_StyleClass )
+ af_style_classes[];
+
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_LOCAL_ARRAY( char* )
+ af_style_names[];
+#endif
+
+
+ /*
+ * Default values and flags for both autofitter globals (found in
+ * AF_ModuleRec) and face globals (in AF_FaceGlobalsRec).
+ */
+
+ /* index of fallback style in `af_style_classes' */
+#ifdef AF_CONFIG_OPTION_CJK
+#define AF_STYLE_FALLBACK AF_STYLE_HANI_DFLT
+#else
+#define AF_STYLE_FALLBACK AF_STYLE_NONE_DFLT
+#endif
+ /* default script for OpenType; ignored if HarfBuzz isn't used */
+#define AF_SCRIPT_DEFAULT AF_SCRIPT_LATN
+ /* a bit mask indicating an uncovered glyph */
+#define AF_STYLE_UNASSIGNED 0x7F
+ /* if this flag is set, we have an ASCII digit */
+#define AF_DIGIT 0x80
+
+ /* `increase-x-height' property */
+#define AF_PROP_INCREASE_X_HEIGHT_MIN 6
+#define AF_PROP_INCREASE_X_HEIGHT_MAX 0
+
+
/************************************************************************/
/************************************************************************/
/***** *****/
@@ -37,21 +92,45 @@ FT_BEGIN_HEADER
/*
- * model the global hints data for a given face, decomposed into
- * script-specific items
+ * Note that glyph_styles[] maps each glyph to an index into the
+ * `af_style_classes' array.
+ *
*/
- typedef struct AF_FaceGlobalsRec_* AF_FaceGlobals;
+ typedef struct AF_FaceGlobalsRec_
+ {
+ FT_Face face;
+ FT_Long glyph_count; /* same as face->num_glyphs */
+ FT_Byte* glyph_styles;
+
+#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
+ hb_font_t* hb_font;
+#endif
+
+ /* per-face auto-hinter properties */
+ FT_UInt increase_x_height;
+ AF_StyleMetrics metrics[AF_STYLE_MAX];
+
+ AF_Module module; /* to access global properties */
+
+ } AF_FaceGlobalsRec;
+
+
+ /*
+ * model the global hints data for a given face, decomposed into
+ * style-specific items
+ */
FT_LOCAL( FT_Error )
af_face_globals_new( FT_Face face,
- AF_FaceGlobals *aglobals );
+ AF_FaceGlobals *aglobals,
+ AF_Module module );
FT_LOCAL( FT_Error )
- af_face_globals_get_metrics( AF_FaceGlobals globals,
- FT_UInt gindex,
- FT_UInt options,
- AF_ScriptMetrics *ametrics );
+ af_face_globals_get_metrics( AF_FaceGlobals globals,
+ FT_UInt gindex,
+ FT_UInt options,
+ AF_StyleMetrics *ametrics );
FT_LOCAL( void )
af_face_globals_free( AF_FaceGlobals globals );
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index f51066f..f3cc50f 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines (body). */
/* */
-/* Copyright 2003-2007, 2009-2011 by */
+/* Copyright 2003-2007, 2009-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,6 +19,17 @@
#include "afhints.h"
#include "aferrors.h"
#include FT_INTERNAL_CALC_H
+#include FT_INTERNAL_DEBUG_H
+
+
+ /*************************************************************************/
+ /* */
+ /* 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_afhints
/* Get new segment for given axis. */
@@ -28,7 +39,7 @@
FT_Memory memory,
AF_Segment *asegment )
{
- FT_Error error = AF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
AF_Segment segment = NULL;
@@ -41,7 +52,7 @@
if ( old_max >= big_max )
{
- error = AF_Err_Out_Of_Memory;
+ error = FT_THROW( Out_Of_Memory );
goto Exit;
}
@@ -63,16 +74,17 @@
}
- /* Get new edge for given axis, direction, and position. */
+ /* Get new edge for given axis, direction, and position, */
+ /* without initializing the edge itself. */
FT_LOCAL( FT_Error )
af_axis_hints_new_edge( AF_AxisHints axis,
FT_Int fpos,
AF_Direction dir,
FT_Memory memory,
- AF_Edge *aedge )
+ AF_Edge *anedge )
{
- FT_Error error = AF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
AF_Edge edge = NULL;
AF_Edge edges;
@@ -86,7 +98,7 @@
if ( old_max >= big_max )
{
- error = AF_Err_Out_Of_Memory;
+ error = FT_THROW( Out_Of_Memory );
goto Exit;
}
@@ -119,12 +131,8 @@
axis->num_edges++;
- FT_ZERO( edge );
- edge->fpos = (FT_Short)fpos;
- edge->dir = (FT_Char)dir;
-
Exit:
- *aedge = edge;
+ *anedge = edge;
return error;
}
@@ -133,6 +141,17 @@
#include FT_CONFIG_STANDARD_LIBRARY_H
+ /* The dump functions are used in the `ftgrid' demo program, too. */
+#define AF_DUMP( varformat ) \
+ do \
+ { \
+ if ( to_stdout ) \
+ printf varformat; \
+ else \
+ FT_TRACE7( varformat ); \
+ } while ( 0 )
+
+
static const char*
af_dir_str( AF_Direction dir )
{
@@ -161,43 +180,37 @@
}
-#define AF_INDEX_NUM( ptr, base ) ( (ptr) ? ( (ptr) - (base) ) : -1 )
+#define AF_INDEX_NUM( ptr, base ) (int)( (ptr) ? ( (ptr) - (base) ) : -1 )
#ifdef __cplusplus
extern "C" {
#endif
void
- af_glyph_hints_dump_points( AF_GlyphHints hints )
+ af_glyph_hints_dump_points( AF_GlyphHints hints,
+ FT_Bool to_stdout )
{
AF_Point points = hints->points;
AF_Point limit = points + hints->num_points;
AF_Point point;
- printf( "Table of points:\n" );
- printf( " [ index | xorg | yorg | xscale | yscale"
- " | xfit | yfit | flags ]\n" );
+ AF_DUMP(( "Table of points:\n"
+ " [ index | xorg | yorg | xscale | yscale"
+ " | xfit | yfit | flags ]\n" ));
for ( point = points; point < limit; point++ )
- {
- 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->flags & AF_FLAG_WEAK_INTERPOLATION ) ? 'w' : ' ',
- ( point->flags & AF_FLAG_INFLECTION ) ? 'i' : ' ',
- ( point->flags & AF_FLAG_EXTREMA_X ) ? '<' : ' ',
- ( point->flags & AF_FLAG_EXTREMA_Y ) ? 'v' : ' ',
- ( point->flags & AF_FLAG_ROUND_X ) ? '(' : ' ',
- ( point->flags & AF_FLAG_ROUND_Y ) ? 'u' : ' ');
- }
- printf( "\n" );
+ AF_DUMP(( " [ %5d | %5d | %5d | %6.2f | %6.2f"
+ " | %5.2f | %5.2f | %c ]\n",
+ AF_INDEX_NUM( point, points ),
+ point->fx,
+ point->fy,
+ point->ox / 64.0,
+ point->oy / 64.0,
+ point->x / 64.0,
+ point->y / 64.0,
+ ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ? 'w' : ' '));
+ AF_DUMP(( "\n" ));
}
#ifdef __cplusplus
}
@@ -226,7 +239,7 @@
if ( pos == 0 )
return "normal";
- temp[pos] = 0;
+ temp[pos] = '\0';
return temp;
}
@@ -238,7 +251,8 @@
extern "C" {
#endif
void
- af_glyph_hints_dump_segments( AF_GlyphHints hints )
+ af_glyph_hints_dump_segments( AF_GlyphHints hints,
+ FT_Bool to_stdout )
{
FT_Int dimension;
@@ -246,30 +260,41 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
AF_AxisHints axis = &hints->axis[dimension];
+ AF_Point points = hints->points;
+ AF_Edge edges = axis->edges;
AF_Segment segments = axis->segments;
AF_Segment limit = segments + axis->num_segments;
AF_Segment seg;
- printf ( "Table of %s segments:\n",
- dimension == AF_DIMENSION_HORZ ? "vertical" : "horizontal" );
- printf ( " [ index | pos | dir | link | serif |"
- " height | extra | flags ]\n" );
+ AF_DUMP(( "Table of %s segments:\n",
+ dimension == AF_DIMENSION_HORZ ? "vertical"
+ : "horizontal" ));
+ if ( axis->num_segments )
+ AF_DUMP(( " [ index | pos | dir | from"
+ " | to | link | serif | edge"
+ " | height | extra | flags ]\n" ));
+ else
+ AF_DUMP(( " (none)\n" ));
for ( seg = segments; seg < limit; seg++ )
- {
- 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,
- af_dir_str( (AF_Direction)seg->dir ),
- AF_INDEX_NUM( seg->link, segments ),
- AF_INDEX_NUM( seg->serif, segments ),
- seg->height,
- seg->height - ( seg->max_coord - seg->min_coord ),
- af_edge_flags_to_string( (AF_Edge_Flags)seg->flags ) );
- }
- printf( "\n" );
+ AF_DUMP(( " [ %5d | %5.2g | %5s | %4d"
+ " | %4d | %4d | %5d | %4d"
+ " | %6d | %5d | %11s ]\n",
+ AF_INDEX_NUM( seg, segments ),
+ dimension == AF_DIMENSION_HORZ
+ ? (int)seg->first->ox / 64.0
+ : (int)seg->first->oy / 64.0,
+ af_dir_str( (AF_Direction)seg->dir ),
+ AF_INDEX_NUM( seg->first, points ),
+ AF_INDEX_NUM( seg->last, points ),
+ AF_INDEX_NUM( seg->link, segments ),
+ AF_INDEX_NUM( seg->serif, segments ),
+ AF_INDEX_NUM( seg->edge, edges ),
+ seg->height,
+ seg->height - ( seg->max_coord - seg->min_coord ),
+ af_edge_flags_to_string( (AF_Edge_Flags)seg->flags ) ));
+ AF_DUMP(( "\n" ));
}
}
#ifdef __cplusplus
@@ -296,7 +321,7 @@
axis = &hints->axis[dim];
*num_segments = axis->num_segments;
- return AF_Err_Ok;
+ return FT_Err_Ok;
}
#ifdef __cplusplus
}
@@ -312,7 +337,9 @@
af_glyph_hints_get_segment_offset( AF_GlyphHints hints,
FT_Int dimension,
FT_Int idx,
- FT_Pos* offset )
+ FT_Pos *offset,
+ FT_Bool *is_blue,
+ FT_Pos *blue_offset )
{
AF_Dimension dim;
AF_AxisHints axis;
@@ -320,20 +347,29 @@
if ( !offset )
- return AF_Err_Invalid_Argument;
+ return FT_THROW( 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;
+ return FT_THROW( Invalid_Argument );
+
+ seg = &axis->segments[idx];
+ *offset = ( dim == AF_DIMENSION_HORZ ) ? seg->first->ox
+ : seg->first->oy;
+ if ( seg->edge )
+ *is_blue = (FT_Bool)( seg->edge->blue_edge != 0 );
+ else
+ *is_blue = FALSE;
- seg = &axis->segments[idx];
- *offset = (dim == AF_DIMENSION_HORZ) ? seg->first->ox
- : seg->first->oy;
+ if ( *is_blue )
+ *blue_offset = seg->edge->blue_edge->cur;
+ else
+ *blue_offset = 0;
- return AF_Err_Ok;
+ return FT_Err_Ok;
}
#ifdef __cplusplus
}
@@ -346,7 +382,8 @@
extern "C" {
#endif
void
- af_glyph_hints_dump_edges( AF_GlyphHints hints )
+ af_glyph_hints_dump_edges( AF_GlyphHints hints,
+ FT_Bool to_stdout )
{
FT_Int dimension;
@@ -363,92 +400,35 @@
* note: AF_DIMENSION_HORZ corresponds to _vertical_ edges
* 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" );
+ AF_DUMP(( "Table of %s edges:\n",
+ dimension == AF_DIMENSION_HORZ ? "vertical"
+ : "horizontal" ));
+ if ( axis->num_edges )
+ AF_DUMP(( " [ index | pos | dir | link"
+ " | serif | blue | opos | pos | flags ]\n" ));
+ else
+ AF_DUMP(( " (none)\n" ));
for ( edge = edges; edge < limit; edge++ )
- {
- printf ( " [ %5d | %5.2g | %5s | %4d |"
- " %5d | %c | %5.2f | %5.2f | %11s ]\n",
- edge - edges,
- (int)edge->opos / 64.0,
- af_dir_str( (AF_Direction)edge->dir ),
- AF_INDEX_NUM( edge->link, edges ),
- AF_INDEX_NUM( edge->serif, edges ),
- edge->blue_edge ? 'y' : 'n',
- edge->opos / 64.0,
- edge->pos / 64.0,
- af_edge_flags_to_string( (AF_Edge_Flags)edge->flags ) );
- }
- printf( "\n" );
+ AF_DUMP(( " [ %5d | %5.2g | %5s | %4d"
+ " | %5d | %c | %5.2f | %5.2f | %11s ]\n",
+ AF_INDEX_NUM( edge, edges ),
+ (int)edge->opos / 64.0,
+ af_dir_str( (AF_Direction)edge->dir ),
+ AF_INDEX_NUM( edge->link, edges ),
+ AF_INDEX_NUM( edge->serif, edges ),
+ edge->blue_edge ? 'y' : 'n',
+ edge->opos / 64.0,
+ edge->pos / 64.0,
+ af_edge_flags_to_string( (AF_Edge_Flags)edge->flags ) ));
+ AF_DUMP(( "\n" ));
}
}
#ifdef __cplusplus
}
#endif
-#else /* !FT_DEBUG_AUTOFIT */
-
- /* these empty stubs are only used to link the `ftgrid' test program */
- /* if debugging is disabled */
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
- void
- af_glyph_hints_dump_points( AF_GlyphHints hints )
- {
- FT_UNUSED( hints );
- }
-
-
- void
- af_glyph_hints_dump_segments( AF_GlyphHints hints )
- {
- FT_UNUSED( hints );
- }
-
-
- 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 );
- }
-
-#ifdef __cplusplus
- }
-#endif
+#undef AF_DUMP
#endif /* !FT_DEBUG_AUTOFIT */
@@ -494,8 +474,8 @@
}
}
- /* return no direction if arm lengths differ too much */
- /* (value 14 is heuristic) */
+ /* return no direction if arm lengths differ too much */
+ /* (value 14 is heuristic, corresponding to approx. 4.1 degrees) */
ss *= 14;
if ( FT_ABS( ll ) <= FT_ABS( ss ) )
dir = AF_DIR_NONE;
@@ -516,48 +496,48 @@
FT_LOCAL_DEF( void )
af_glyph_hints_done( AF_GlyphHints hints )
{
- if ( hints && hints->memory )
- {
- FT_Memory memory = hints->memory;
- int dim;
+ FT_Memory memory = hints->memory;
+ int dim;
- /*
- * note that we don't need to free the segment and edge
- * buffers since they are really within the hints->points array
- */
- for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
- {
- AF_AxisHints axis = &hints->axis[dim];
+ if ( !( hints && hints->memory ) )
+ return;
+ /*
+ * note that we don't need to free the segment and edge
+ * buffers since they are really within the hints->points array
+ */
+ for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
+ {
+ AF_AxisHints axis = &hints->axis[dim];
- axis->num_segments = 0;
- axis->max_segments = 0;
- FT_FREE( axis->segments );
- axis->num_edges = 0;
- axis->max_edges = 0;
- FT_FREE( axis->edges );
- }
+ axis->num_segments = 0;
+ axis->max_segments = 0;
+ FT_FREE( axis->segments );
- FT_FREE( hints->contours );
- hints->max_contours = 0;
- hints->num_contours = 0;
+ axis->num_edges = 0;
+ axis->max_edges = 0;
+ FT_FREE( axis->edges );
+ }
- FT_FREE( hints->points );
- hints->num_points = 0;
- hints->max_points = 0;
+ FT_FREE( hints->contours );
+ hints->max_contours = 0;
+ hints->num_contours = 0;
- hints->memory = NULL;
- }
+ FT_FREE( hints->points );
+ hints->num_points = 0;
+ hints->max_points = 0;
+
+ hints->memory = NULL;
}
/* Reset metrics. */
FT_LOCAL_DEF( void )
- af_glyph_hints_rescale( AF_GlyphHints hints,
- AF_ScriptMetrics metrics )
+ af_glyph_hints_rescale( AF_GlyphHints hints,
+ AF_StyleMetrics metrics )
{
hints->metrics = metrics;
hints->scaler_flags = metrics->scaler.flags;
@@ -571,7 +551,7 @@
af_glyph_hints_reload( AF_GlyphHints hints,
FT_Outline* outline )
{
- FT_Error error = AF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
AF_Point points;
FT_UInt old_max, new_max;
FT_Fixed x_scale = hints->x_scale;
@@ -663,6 +643,9 @@
for ( point = points; point < point_limit; point++, vec++, tag++ )
{
+ point->in_dir = (FT_Char)AF_DIR_NONE;
+ point->out_dir = (FT_Char)AF_DIR_NONE;
+
point->fx = (FT_Short)vec->x;
point->fy = (FT_Short)vec->y;
point->ox = point->x = FT_MulFix( vec->x, x_scale ) + x_delta;
@@ -710,60 +693,228 @@
}
}
- /* compute directions of in & out vectors */
{
- AF_Point first = points;
- AF_Point prev = NULL;
- FT_Pos in_x = 0;
- FT_Pos in_y = 0;
- AF_Direction in_dir = AF_DIR_NONE;
+ /*
+ * Compute directions of `in' and `out' vectors.
+ *
+ * Note that distances between points that are very near to each
+ * other are accumulated. In other words, the auto-hinter
+ * prepends the small vectors between near points to the first
+ * non-near vector. All intermediate points are tagged as
+ * weak; the directions are adjusted also to be equal to the
+ * accumulated one.
+ */
+
+ /* value 20 in `near_limit' is heuristic */
+ FT_UInt units_per_em = hints->metrics->scaler.face->units_per_EM;
+ FT_Int near_limit = 20 * units_per_em / 2048;
+ FT_Int near_limit2 = 2 * near_limit - 1;
+
+ AF_Point* contour;
+ AF_Point* contour_limit = hints->contours + hints->num_contours;
+
+
+ for ( contour = hints->contours; contour < contour_limit; contour++ )
+ {
+ AF_Point first = *contour;
+ AF_Point next, prev, curr;
+ FT_Pos out_x, out_y;
+
+ FT_Bool is_first;
- for ( point = points; point < point_limit; point++ )
- {
- AF_Point next;
- FT_Pos out_x, out_y;
+ /* since the first point of a contour could be part of a */
+ /* series of near points, go backwards to find the first */
+ /* non-near point and adjust `first' */
- if ( point == first )
+ point = first;
+ prev = first->prev;
+
+ while ( prev != first )
{
- prev = first->prev;
- in_x = first->fx - prev->fx;
- in_y = first->fy - prev->fy;
- in_dir = af_direction_compute( in_x, in_y );
- first = prev + 1;
+ out_x = point->fx - prev->fx;
+ out_y = point->fy - prev->fy;
+
+ /*
+ * We use Taxicab metrics to measure the vector length.
+ *
+ * Note that the accumulated distances so far could have the
+ * opposite direction of the distance measured here. For this
+ * reason we use `near_limit2' for the comparison to get a
+ * non-near point even in the worst case.
+ */
+ if ( FT_ABS( out_x ) + FT_ABS( out_y ) >= near_limit2 )
+ break;
+
+ point = prev;
+ prev = prev->prev;
}
- point->in_dir = (FT_Char)in_dir;
+ /* adjust first point */
+ first = point;
+
+ /* now loop over all points of the contour to get */
+ /* `in' and `out' vector directions */
- next = point->next;
- out_x = next->fx - point->fx;
- out_y = next->fy - point->fy;
+ curr = first;
- in_dir = af_direction_compute( out_x, out_y );
- point->out_dir = (FT_Char)in_dir;
+ /*
+ * We abuse the `u' and `v' fields to store index deltas to the
+ * next and previous non-near point, respectively.
+ *
+ * To avoid problems with not having non-near points, we point to
+ * `first' by default as the next non-near point.
+ *
+ */
+ curr->u = (FT_Pos)( first - curr );
+ first->v = -curr->u;
- /* check for weak points */
+ out_x = 0;
+ out_y = 0;
- if ( point->flags & ( AF_FLAG_CONIC | AF_FLAG_CUBIC ) )
+ is_first = 1;
+
+ for ( point = first;
+ point != first || is_first;
+ point = point->next )
{
+ AF_Direction out_dir;
+
+
+ is_first = 0;
+
+ next = point->next;
+
+ out_x += next->fx - point->fx;
+ out_y += next->fy - point->fy;
+
+ if ( FT_ABS( out_x ) + FT_ABS( out_y ) < near_limit )
+ {
+ next->flags |= AF_FLAG_WEAK_INTERPOLATION;
+ continue;
+ }
+
+ curr->u = (FT_Pos)( next - curr );
+ next->v = -curr->u;
+
+ out_dir = af_direction_compute( out_x, out_y );
+
+ /* adjust directions for all points inbetween; */
+ /* the loop also updates position of `curr' */
+ curr->out_dir = (FT_Char)out_dir;
+ for ( curr = curr->next; curr != next; curr = curr->next )
+ {
+ curr->in_dir = (FT_Char)out_dir;
+ curr->out_dir = (FT_Char)out_dir;
+ }
+ next->in_dir = (FT_Char)out_dir;
+
+ curr->u = (FT_Pos)( first - curr );
+ first->v = -curr->u;
+
+ out_x = 0;
+ out_y = 0;
+ }
+ }
+
+ /*
+ * The next step is to `simplify' an outline's topology so that we
+ * can identify local extrema more reliably: A series of
+ * non-horizontal or non-vertical vectors pointing into the same
+ * quadrant are handled as a single, long vector. From a
+ * topological point of the view, the intermediate points are of no
+ * interest and thus tagged as weak.
+ */
+
+ for ( point = points; point < point_limit; point++ )
+ {
+ if ( point->flags & AF_FLAG_WEAK_INTERPOLATION )
+ continue;
+
+ if ( point->in_dir == AF_DIR_NONE &&
+ point->out_dir == AF_DIR_NONE )
+ {
+ /* check whether both vectors point into the same quadrant */
+
+ FT_Pos in_x, in_y;
+ FT_Pos out_x, out_y;
+
+ AF_Point next_u = point + point->u;
+ AF_Point prev_v = point + point->v;
+
+
+ in_x = point->fx - prev_v->fx;
+ in_y = point->fy - prev_v->fy;
+
+ out_x = next_u->fx - point->fx;
+ out_y = next_u->fy - point->fy;
+
+ if ( ( in_x ^ out_x ) >= 0 && ( in_y ^ out_y ) >= 0 )
+ {
+ /* yes, so tag current point as weak */
+ /* and update index deltas */
+
+ point->flags |= AF_FLAG_WEAK_INTERPOLATION;
+
+ prev_v->u = (FT_Pos)( next_u - prev_v );
+ next_u->v = -prev_v->u;
+ }
+ }
+ }
+
+ /*
+ * Finally, check for remaining weak points. Everything else not
+ * collected in edges so far is then implicitly classified as strong
+ * points.
+ */
+
+ for ( point = points; point < point_limit; point++ )
+ {
+ if ( point->flags & AF_FLAG_WEAK_INTERPOLATION )
+ continue;
+
+ if ( point->flags & AF_FLAG_CONTROL )
+ {
+ /* control points are always weak */
Is_Weak_Point:
point->flags |= AF_FLAG_WEAK_INTERPOLATION;
}
else if ( point->out_dir == point->in_dir )
{
if ( point->out_dir != AF_DIR_NONE )
+ {
+ /* current point lies on a horizontal or */
+ /* vertical segment (but doesn't start or end it) */
goto Is_Weak_Point;
+ }
- if ( ft_corner_is_flat( in_x, in_y, out_x, out_y ) )
- goto Is_Weak_Point;
+ {
+ AF_Point next_u = point + point->u;
+ AF_Point prev_v = point + point->v;
+
+
+ if ( ft_corner_is_flat( point->fx - prev_v->fx,
+ point->fy - prev_v->fy,
+ next_u->fx - point->fx,
+ next_u->fy - point->fy ) )
+ {
+ /* either the `in' or the `out' vector is much more */
+ /* dominant than the other one, so tag current point */
+ /* as weak and update index deltas */
+
+ prev_v->u = (FT_Pos)( next_u - prev_v );
+ next_u->v = -prev_v->u;
+
+ goto Is_Weak_Point;
+ }
+ }
}
else if ( point->in_dir == -point->out_dir )
+ {
+ /* current point forms a spike */
goto Is_Weak_Point;
-
- in_x = out_x;
- in_y = out_y;
- prev = point;
+ }
}
}
}
@@ -920,8 +1071,7 @@
/* if this point is candidate to weak interpolation, we */
/* interpolate it after all strong points have been processed */
- if ( ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) &&
- !( point->flags & AF_FLAG_INFLECTION ) )
+ if ( ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) )
continue;
if ( dim == AF_DIMENSION_VERT )
@@ -1177,8 +1327,6 @@
}
}
- point = points;
-
for ( ; contour < contour_limit; contour++ )
{
AF_Point first_touched, last_touched;
@@ -1201,7 +1349,6 @@
}
first_touched = point;
- last_touched = point;
for (;;)
{
diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h
index 1c52e0d..92101de 100644
--- a/src/autofit/afhints.h
+++ b/src/autofit/afhints.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines (specification). */
/* */
-/* Copyright 2003-2008, 2010-2011 by */
+/* Copyright 2003-2008, 2010-2012, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,7 +27,7 @@ FT_BEGIN_HEADER
/*
* The definition of outline glyph hints. These are shared by all
- * script analysis routines (until now).
+ * writing system analysis routines (until now).
*/
typedef enum AF_Dimension_
@@ -62,33 +62,34 @@ FT_BEGIN_HEADER
*
* by David Turner and Werner Lemberg
*
- * http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
+ * http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
+ *
+ * with appropriate updates.
*
*
* 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.
+ * find segments in an outline.
*
- * 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.
+ * A segment is a series of at least two consecutive points that are
+ * approximately aligned along a coordinate axis. The analysis to do
+ * so is specific to a writing system.
*
*
* Edges
*
+ * `af_{cjk,latin,...}_hints_compute_edges' are the functions to find
+ * 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.
+ * As an example, the `latin' writing system first tries to grid-fit
+ * edges, then to align segments on the edges unless it detects that
+ * they form a serif.
*
*
* A H
@@ -107,6 +108,8 @@ FT_BEGIN_HEADER
*
* Stems
*
+ * Stems are detected by `af_{cjk,latin,...}_hint_edges'.
+ *
* 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
@@ -127,17 +130,21 @@ FT_BEGIN_HEADER
* 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.
*
+ * The detection and handling of stems is dependent on the writing
+ * system.
+ *
*
* Serifs
*
- * On the opposite, a serif has
+ * Serifs are detected by `af_{cjk,latin,...}_hint_edges'.
+ *
+ * In comparison to a stem, a serif (as handled by the auto-hinter
+ * module that takes care of the `latin' writing system) has
*
* best segment_1 = segment_2 && best segment_2 != segment_1
*
@@ -147,8 +154,6 @@ FT_BEGIN_HEADER
* 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
*
@@ -169,18 +174,19 @@ FT_BEGIN_HEADER
*
* 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
+ * Experience has shown that points 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)
+ * same, but the curvature changes sign) [currently, such points
+ * aren't handled specially in the auto-hinter]
*
- * `af_glyph_hints_align_strong_points' is the function which takes
+ * `af_glyph_hints_align_strong_points' is the function that takes
* care of such situations; it is equivalent to the TrueType `IP'
* hinting instruction.
*
@@ -210,23 +216,12 @@ FT_BEGIN_HEADER
AF_FLAG_CUBIC = 1 << 1,
AF_FLAG_CONTROL = AF_FLAG_CONIC | AF_FLAG_CUBIC,
- /* point extremum flags */
- AF_FLAG_EXTREMA_X = 1 << 2,
- AF_FLAG_EXTREMA_Y = 1 << 3,
-
- /* point roundness flags */
- AF_FLAG_ROUND_X = 1 << 4,
- AF_FLAG_ROUND_Y = 1 << 5,
-
/* point touch flags */
- AF_FLAG_TOUCH_X = 1 << 6,
- AF_FLAG_TOUCH_Y = 1 << 7,
+ AF_FLAG_TOUCH_X = 1 << 2,
+ AF_FLAG_TOUCH_Y = 1 << 3,
/* candidates for weak interpolation have this flag set */
- AF_FLAG_WEAK_INTERPOLATION = 1 << 8,
-
- /* all inflection points in the outline have this flag set */
- AF_FLAG_INFLECTION = 1 << 9
+ AF_FLAG_WEAK_INTERPOLATION = 1 << 4
} AF_Flags;
@@ -234,10 +229,11 @@ FT_BEGIN_HEADER
/* edge hint flags */
typedef enum AF_Edge_Flags_
{
- AF_EDGE_NORMAL = 0,
- AF_EDGE_ROUND = 1 << 0,
- AF_EDGE_SERIF = 1 << 1,
- AF_EDGE_DONE = 1 << 2
+ AF_EDGE_NORMAL = 0,
+ AF_EDGE_ROUND = 1 << 0,
+ AF_EDGE_SERIF = 1 << 1,
+ AF_EDGE_DONE = 1 << 2,
+ AF_EDGE_NEUTRAL = 1 << 3 /* set if edge aligns to a neutral blue zone */
} AF_Edge_Flags;
@@ -254,7 +250,7 @@ FT_BEGIN_HEADER
FT_Char out_dir; /* direction of outwards vector */
FT_Pos ox, oy; /* original, scaled position */
- FT_Short fx, fy; /* original, unscaled position (font units) */
+ FT_Short fx, fy; /* original, unscaled position (in font units) */
FT_Pos x, y; /* current position */
FT_Pos u, v; /* current (x,y) or (y,x) depending on context */
@@ -290,19 +286,19 @@ FT_BEGIN_HEADER
typedef struct AF_EdgeRec_
{
- FT_Short fpos; /* original, unscaled position (font units) */
- FT_Pos opos; /* original, scaled position */
- FT_Pos pos; /* current position */
+ FT_Short fpos; /* original, unscaled position (in font units) */
+ FT_Pos opos; /* original, scaled position */
+ FT_Pos pos; /* current position */
FT_Byte flags; /* edge flags */
FT_Char dir; /* edge direction */
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; /* 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_Width blue_edge; /* non-NULL if this is a blue edge */
+ 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; /* first segment in edge */
AF_Segment last; /* last segment in edge */
@@ -330,31 +326,31 @@ FT_BEGIN_HEADER
typedef struct AF_GlyphHintsRec_
{
- FT_Memory memory;
+ FT_Memory memory;
- FT_Fixed x_scale;
- FT_Pos x_delta;
+ FT_Fixed x_scale;
+ FT_Pos x_delta;
- FT_Fixed y_scale;
- FT_Pos y_delta;
+ FT_Fixed y_scale;
+ FT_Pos y_delta;
- 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; /* number of allocated points */
+ FT_Int num_points; /* number of used points */
+ AF_Point points; /* points array */
- FT_Int max_contours; /* number of allocated contours */
- FT_Int num_contours; /* number of used contours */
- AF_Point* contours; /* contours array */
+ 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];
+ AF_AxisHintsRec axis[AF_DIMENSION_MAX];
- FT_UInt32 scaler_flags; /* copy of scaler flags */
- FT_UInt32 other_flags; /* free for script-specific */
- /* implementations */
- AF_ScriptMetrics metrics;
+ FT_UInt32 scaler_flags; /* copy of scaler flags */
+ FT_UInt32 other_flags; /* free for style-specific */
+ /* implementations */
+ AF_StyleMetrics metrics;
- FT_Pos xmin_delta; /* used for warping */
- FT_Pos xmax_delta;
+ FT_Pos xmin_delta; /* used for warping */
+ FT_Pos xmax_delta;
} AF_GlyphHintsRec;
@@ -416,8 +412,8 @@ FT_BEGIN_HEADER
FT_Memory memory );
FT_LOCAL( void )
- af_glyph_hints_rescale( AF_GlyphHints hints,
- AF_ScriptMetrics metrics );
+ af_glyph_hints_rescale( AF_GlyphHints hints,
+ AF_StyleMetrics metrics );
FT_LOCAL( FT_Error )
af_glyph_hints_reload( AF_GlyphHints hints,
diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c
index 9c74838..197881b 100644
--- a/src/autofit/afindic.c
+++ b/src/autofit/afindic.c
@@ -2,9 +2,9 @@
/* */
/* afindic.c */
/* */
-/* Auto-fitter hinting routines for Indic scripts (body). */
+/* Auto-fitter hinting routines for Indic writing system (body). */
/* */
-/* Copyright 2007, 2011 by */
+/* Copyright 2007, 2011-2013 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, */
@@ -46,7 +46,7 @@
face->charmap = NULL;
else
{
- af_cjk_metrics_init_widths( metrics, face, 0x7530 );
+ af_cjk_metrics_init_widths( metrics, face );
#if 0
/* either need indic specific blue_chars[] or just skip blue zones */
af_cjk_metrics_init_blues( metrics, face, af_cjk_blue_chars );
@@ -56,7 +56,7 @@
FT_Set_Charmap( face, oldmap );
- return AF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -97,58 +97,41 @@
/*************************************************************************/
- static const AF_Script_UniRangeRec af_indic_uniranges[] =
- {
-#if 0
- 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)
- };
-
+ AF_DEFINE_WRITING_SYSTEM_CLASS(
+ af_indic_writing_system_class,
- AF_DEFINE_SCRIPT_CLASS( af_indic_script_class,
- AF_SCRIPT_INDIC,
- af_indic_uniranges,
+ AF_WRITING_SYSTEM_INDIC,
sizeof ( AF_CJKMetricsRec ),
- (AF_Script_InitMetricsFunc) af_indic_metrics_init,
- (AF_Script_ScaleMetricsFunc)af_indic_metrics_scale,
- (AF_Script_DoneMetricsFunc) NULL,
+ (AF_WritingSystem_InitMetricsFunc) af_indic_metrics_init,
+ (AF_WritingSystem_ScaleMetricsFunc)af_indic_metrics_scale,
+ (AF_WritingSystem_DoneMetricsFunc) NULL,
- (AF_Script_InitHintsFunc) af_indic_hints_init,
- (AF_Script_ApplyHintsFunc) af_indic_hints_apply
+ (AF_WritingSystem_InitHintsFunc) af_indic_hints_init,
+ (AF_WritingSystem_ApplyHintsFunc) af_indic_hints_apply
)
+
#else /* !AF_CONFIG_OPTION_INDIC */
- static const AF_Script_UniRangeRec af_indic_uniranges[] =
- {
- { 0, 0 }
- };
+ AF_DEFINE_WRITING_SYSTEM_CLASS(
+ af_indic_writing_system_class,
- AF_DEFINE_SCRIPT_CLASS( af_indic_script_class,
- AF_SCRIPT_INDIC,
- af_indic_uniranges,
+ AF_WRITING_SYSTEM_INDIC,
sizeof ( AF_CJKMetricsRec ),
- (AF_Script_InitMetricsFunc) NULL,
- (AF_Script_ScaleMetricsFunc)NULL,
- (AF_Script_DoneMetricsFunc) NULL,
+ (AF_WritingSystem_InitMetricsFunc) NULL,
+ (AF_WritingSystem_ScaleMetricsFunc)NULL,
+ (AF_WritingSystem_DoneMetricsFunc) NULL,
- (AF_Script_InitHintsFunc) NULL,
- (AF_Script_ApplyHintsFunc) NULL
+ (AF_WritingSystem_InitHintsFunc) NULL,
+ (AF_WritingSystem_ApplyHintsFunc) NULL
)
+
#endif /* !AF_CONFIG_OPTION_INDIC */
diff --git a/src/autofit/afindic.h b/src/autofit/afindic.h
index 662a982..9e13cf7 100644
--- a/src/autofit/afindic.h
+++ b/src/autofit/afindic.h
@@ -2,9 +2,10 @@
/* */
/* afindic.h */
/* */
-/* Auto-fitter hinting routines for Indic scripts (specification). */
+/* Auto-fitter hinting routines for Indic writing system */
+/* (specification). */
/* */
-/* Copyright 2007 by */
+/* Copyright 2007, 2012, 2013 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, */
@@ -25,9 +26,9 @@
FT_BEGIN_HEADER
- /* the Indic-specific script class */
+ /* the `indic' writing system */
- AF_DECLARE_SCRIPT_CLASS(af_indic_script_class)
+ AF_DECLARE_WRITING_SYSTEM_CLASS( af_indic_writing_system_class )
/* */
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index 30145a2..36a3689 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -2,9 +2,9 @@
/* */
/* aflatin.c */
/* */
-/* Auto-fitter hinting routines for latin script (body). */
+/* Auto-fitter hinting routines for latin writing system (body). */
/* */
-/* Copyright 2003-2011 by */
+/* Copyright 2003-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,6 +20,8 @@
#include FT_ADVANCES_H
#include FT_INTERNAL_DEBUG_H
+#include "afglobal.h"
+#include "afpic.h"
#include "aflatin.h"
#include "aferrors.h"
@@ -53,29 +55,85 @@
FT_LOCAL_DEF( void )
af_latin_metrics_init_widths( AF_LatinMetrics metrics,
- FT_Face face,
- FT_ULong charcode )
+ FT_Face face )
{
/* scan the array of segments in each direction */
AF_GlyphHintsRec hints[1];
+ FT_TRACE5(( "\n"
+ "latin standard widths computation (style `%s')\n"
+ "=====================================================\n"
+ "\n",
+ af_style_names[metrics->root.style_class->style] ));
+
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_LatinMetricsRec dummy[1];
- AF_Scaler scaler = &dummy->root.scaler;
+ FT_Error error;
+ FT_ULong glyph_index;
+ FT_Long y_offset;
+ int dim;
+ AF_LatinMetricsRec dummy[1];
+ AF_Scaler scaler = &dummy->root.scaler;
+
+#ifdef FT_CONFIG_OPTION_PIC
+ AF_FaceGlobals globals = metrics->root.globals;
+#endif
+ AF_StyleClass style_class = metrics->root.style_class;
+ AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET
+ [style_class->script];
- glyph_index = FT_Get_Char_Index( face, charcode );
- if ( glyph_index == 0 )
- goto Exit;
+ FT_UInt32 standard_char;
+
+
+ /*
+ * We check more than a single standard character to catch features
+ * like `c2sc' (small caps from caps) that don't contain lowercase
+ * letters by definition, or other features that mainly operate on
+ * numerals.
+ */
+
+ standard_char = script_class->standard_char1;
+ af_get_char_index( &metrics->root,
+ standard_char,
+ &glyph_index,
+ &y_offset );
+ if ( !glyph_index )
+ {
+ if ( script_class->standard_char2 )
+ {
+ standard_char = script_class->standard_char2;
+ af_get_char_index( &metrics->root,
+ standard_char,
+ &glyph_index,
+ &y_offset );
+ if ( !glyph_index )
+ {
+ if ( script_class->standard_char3 )
+ {
+ standard_char = script_class->standard_char3;
+ af_get_char_index( &metrics->root,
+ standard_char,
+ &glyph_index,
+ &y_offset );
+ if ( !glyph_index )
+ goto Exit;
+ }
+ else
+ goto Exit;
+ }
+ }
+ else
+ goto Exit;
+ }
+
+ FT_TRACE5(( "standard character: U+%04lX (glyph index %d)\n",
+ standard_char, glyph_index ));
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
if ( error || face->glyph->outline.n_points <= 0 )
@@ -94,7 +152,7 @@
scaler->render_mode = FT_RENDER_MODE_NORMAL;
scaler->flags = 0;
- af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy );
+ af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy );
error = af_glyph_hints_reload( hints, &face->glyph->outline );
if ( error )
@@ -113,7 +171,15 @@
if ( error )
goto Exit;
+ /*
+ * We assume that the glyphs selected for the stem width
+ * computation are `featureless' enough so that the linking
+ * algorithm works fine without adjustments of its scoring
+ * function.
+ */
af_latin_hints_link_segments( hints,
+ 0,
+ NULL,
(AF_Dimension)dim );
seg = axhints->segments;
@@ -138,46 +204,51 @@
}
}
- af_sort_widths( num_widths, axis->widths );
+ /* this also replaces multiple almost identical stem widths */
+ /* with a single one (the value 100 is heuristic) */
+ af_sort_and_quantize_widths( &num_widths, axis->widths,
+ dummy->units_per_em / 100 );
axis->width_count = num_widths;
}
- Exit:
+ Exit:
for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
{
AF_LatinAxis axis = &metrics->axis[dim];
FT_Pos stdw;
- stdw = ( axis->width_count > 0 )
- ? axis->widths[0].org
- : AF_LATIN_CONSTANT( metrics, 50 );
+ 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 );
- }
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_UInt i;
+ FT_TRACE5(( "%s widths:\n",
+ dim == AF_DIMENSION_VERT ? "horizontal"
+ : "vertical" ));
-#define AF_LATIN_MAX_TEST_CHARACTERS 12
+ FT_TRACE5(( " %d (standard)", axis->standard_width ));
+ for ( i = 1; i < axis->width_count; i++ )
+ FT_TRACE5(( " %d", axis->widths[i].org ));
+ FT_TRACE5(( "\n" ));
+ }
+#endif
+ }
+ }
- static const char af_latin_blue_chars[AF_LATIN_MAX_BLUES]
- [AF_LATIN_MAX_TEST_CHARACTERS + 1] =
- {
- "THEZOCQS",
- "HEZLOCUS",
- "fijkdbh",
- "xzroesc",
- "xzroesc",
- "pqgjy"
- };
+ FT_TRACE5(( "\n" ));
+
+ af_glyph_hints_done( hints );
+ }
/* Find all blue zones. Flat segments give the reference points, */
@@ -187,63 +258,122 @@
af_latin_metrics_init_blues( AF_LatinMetrics metrics,
FT_Face face )
{
- FT_Pos flats [AF_LATIN_MAX_TEST_CHARACTERS];
- FT_Pos rounds[AF_LATIN_MAX_TEST_CHARACTERS];
+ FT_Pos flats [AF_BLUE_STRING_MAX_LEN];
+ FT_Pos rounds[AF_BLUE_STRING_MAX_LEN];
+
FT_Int num_flats;
FT_Int num_rounds;
- FT_Int bb;
+
AF_LatinBlue blue;
FT_Error error;
- AF_LatinAxis axis = &metrics->axis[AF_DIMENSION_VERT];
- FT_GlyphSlot glyph = face->glyph;
+ AF_LatinAxis axis = &metrics->axis[AF_DIMENSION_VERT];
+ FT_Outline outline;
+
+ AF_StyleClass sc = metrics->root.style_class;
+
+ AF_Blue_Stringset bss = sc->blue_stringset;
+ const AF_Blue_StringRec* bs = &af_blue_stringsets[bss];
- /* we compute the blues simply by loading each character from the */
- /* `af_latin_blue_chars[blues]' string, then finding its top-most or */
- /* bottom-most points (depending on `AF_IS_TOP_BLUE') */
+ /* we walk over the blue character strings as specified in the */
+ /* style's entry in the `af_blue_stringset' array */
- FT_TRACE5(( "blue zones computation\n" ));
- FT_TRACE5(( "------------------------------------------------\n" ));
+ FT_TRACE5(( "latin blue zones computation\n"
+ "============================\n"
+ "\n" ));
- for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ )
+ for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ )
{
- const char* p = af_latin_blue_chars[bb];
- const char* limit = p + AF_LATIN_MAX_TEST_CHARACTERS;
+ const char* p = &af_blue_strings[bs->string];
FT_Pos* blue_ref;
FT_Pos* blue_shoot;
- FT_TRACE5(( "blue %3d: ", bb ));
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_Bool have_flag = 0;
+
+
+ FT_TRACE5(( "blue zone %d", axis->blue_count ));
+
+ if ( bs->properties )
+ {
+ FT_TRACE5(( " (" ));
+
+ if ( AF_LATIN_IS_TOP_BLUE( bs ) )
+ {
+ FT_TRACE5(( "top" ));
+ have_flag = 1;
+ }
+
+ if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) )
+ {
+ if ( have_flag )
+ FT_TRACE5(( ", " ));
+ FT_TRACE5(( "neutral" ));
+ have_flag = 1;
+ }
+
+ if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) )
+ {
+ if ( have_flag )
+ FT_TRACE5(( ", " ));
+ FT_TRACE5(( "small top" ));
+ have_flag = 1;
+ }
+
+ if ( AF_LATIN_IS_LONG_BLUE( bs ) )
+ {
+ if ( have_flag )
+ FT_TRACE5(( ", " ));
+ FT_TRACE5(( "long" ));
+ }
+
+ FT_TRACE5(( ")" ));
+ }
+
+ FT_TRACE5(( ":\n" ));
+ }
+#endif /* FT_DEBUG_LEVEL_TRACE */
num_flats = 0;
num_rounds = 0;
- for ( ; p < limit && *p; p++ )
+ while ( *p )
{
- FT_UInt glyph_index;
+ FT_ULong ch;
+ FT_ULong glyph_index;
+ FT_Long y_offset;
FT_Pos best_y; /* same as points.y */
- FT_Int best_point, best_first, best_last;
+ FT_Int best_point, best_contour_first, best_contour_last;
FT_Vector* points;
FT_Bool round = 0;
- FT_TRACE5(( "'%c'", *p ));
+ GET_UTF8_CHAR( ch, p );
/* load the character in the face -- skip unknown or empty ones */
- glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p );
+ af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset );
if ( glyph_index == 0 )
+ {
+ FT_TRACE5(( " U+%04lX unavailable\n", ch ));
continue;
+ }
- error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
- if ( error || glyph->outline.n_points <= 0 )
+ error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
+ outline = face->glyph->outline;
+ if ( error || outline.n_points <= 0 )
+ {
+ FT_TRACE5(( " U+%04lX contains no outlines\n", ch ));
continue;
+ }
/* now compute min or max point indices and coordinates */
- points = glyph->outline.points;
- best_point = -1;
- best_y = 0; /* make compiler happy */
- best_first = 0; /* ditto */
- best_last = 0; /* ditto */
+ points = outline.points;
+ best_point = -1;
+ best_y = 0; /* make compiler happy */
+ best_contour_first = 0; /* ditto */
+ best_contour_last = 0; /* ditto */
{
FT_Int nn;
@@ -251,23 +381,21 @@
FT_Int last = -1;
- for ( nn = 0;
- nn < glyph->outline.n_contours;
- first = last + 1, nn++ )
+ for ( nn = 0; nn < outline.n_contours; first = last + 1, nn++ )
{
FT_Int old_best_point = best_point;
FT_Int pp;
- last = glyph->outline.contours[nn];
+ last = 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. */
+ /* that are way outside of the glyph's real outline. */
if ( last <= first )
continue;
- if ( AF_LATIN_IS_TOP_BLUE( bb ) )
+ if ( AF_LATIN_IS_TOP_BLUE( bs ) )
{
for ( pp = first; pp <= last; pp++ )
if ( best_point < 0 || points[pp].y > best_y )
@@ -288,11 +416,10 @@
if ( best_point != old_best_point )
{
- best_first = first;
- best_last = last;
+ best_contour_first = first;
+ best_contour_last = last;
}
}
- FT_TRACE5(( "%5d", best_y ));
}
/* now check whether the point belongs to a straight or round */
@@ -300,47 +427,297 @@
/* lies, then inspect its previous and next points */
if ( best_point >= 0 )
{
+ FT_Pos best_x = points[best_point].x;
FT_Int prev, next;
+ FT_Int best_segment_first, best_segment_last;
+ FT_Int best_on_point_first, best_on_point_last;
FT_Pos dist;
- /* now look for the previous and next points that are not on the */
- /* same Y coordinate. Threshold the `closeness'... */
+ best_segment_first = best_point;
+ best_segment_last = best_point;
+
+ if ( FT_CURVE_TAG( outline.tags[best_point] ) == FT_CURVE_TAG_ON )
+ {
+ best_on_point_first = best_point;
+ best_on_point_last = best_point;
+ }
+ else
+ {
+ best_on_point_first = -1;
+ best_on_point_last = -1;
+ }
+
+ /* look for the previous and next points on the contour */
+ /* that are not on the same Y coordinate, then threshold */
+ /* the `closeness'... */
prev = best_point;
next = prev;
do
{
- if ( prev > best_first )
+ if ( prev > best_contour_first )
prev--;
else
- prev = best_last;
+ prev = best_contour_last;
- dist = points[prev].y - best_y;
- if ( dist < -5 || dist > 5 )
- break;
+ dist = FT_ABS( points[prev].y - best_y );
+ /* accept a small distance or a small angle (both values are */
+ /* heuristic; value 20 corresponds to approx. 2.9 degrees) */
+ if ( dist > 5 )
+ if ( FT_ABS( points[prev].x - best_x ) <= 20 * dist )
+ break;
+
+ best_segment_first = prev;
+
+ if ( FT_CURVE_TAG( outline.tags[prev] ) == FT_CURVE_TAG_ON )
+ {
+ best_on_point_first = prev;
+ if ( best_on_point_last < 0 )
+ best_on_point_last = prev;
+ }
} while ( prev != best_point );
do
{
- if ( next < best_last )
+ if ( next < best_contour_last )
next++;
else
- next = best_first;
+ next = best_contour_first;
- dist = points[next].y - best_y;
- if ( dist < -5 || dist > 5 )
- break;
+ dist = FT_ABS( points[next].y - best_y );
+ if ( dist > 5 )
+ if ( FT_ABS( points[next].x - best_x ) <= 20 * dist )
+ break;
+
+ best_segment_last = next;
+
+ if ( FT_CURVE_TAG( outline.tags[next] ) == FT_CURVE_TAG_ON )
+ {
+ best_on_point_last = next;
+ if ( best_on_point_first < 0 )
+ best_on_point_first = next;
+ }
} while ( next != best_point );
- /* 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 );
+ if ( AF_LATIN_IS_LONG_BLUE( bs ) )
+ {
+ /* If this flag is set, we have an additional constraint to */
+ /* get the blue zone distance: Find a segment of the topmost */
+ /* (or bottommost) contour that is longer than a heuristic */
+ /* threshold. This ensures that small bumps in the outline */
+ /* are ignored (for example, the `vertical serifs' found in */
+ /* many Hebrew glyph designs). */
+
+ /* If this segment is long enough, we are done. Otherwise, */
+ /* search the segment next to the extremum that is long */
+ /* enough, has the same direction, and a not too large */
+ /* vertical distance from the extremum. Note that the */
+ /* algorithm doesn't check whether the found segment is */
+ /* actually the one (vertically) nearest to the extremum. */
+
+ /* heuristic threshold value */
+ FT_Pos length_threshold = metrics->units_per_em / 25;
+
+
+ dist = FT_ABS( points[best_segment_last].x -
+ points[best_segment_first].x );
+
+ if ( dist < length_threshold &&
+ best_segment_last - best_segment_first + 2 <=
+ best_contour_last - best_contour_first )
+ {
+ /* heuristic threshold value */
+ FT_Pos height_threshold = metrics->units_per_em / 4;
+
+ FT_Int first;
+ FT_Int last;
+ FT_Bool hit;
+
+ /* we intentionally declare these two variables */
+ /* outside of the loop since various compilers emit */
+ /* incorrect warning messages otherwise, talking about */
+ /* `possibly uninitialized variables' */
+ FT_Int p_first = 0; /* make compiler happy */
+ FT_Int p_last = 0;
+
+ FT_Bool left2right;
+
+
+ /* compute direction */
+ prev = best_point;
+
+ do
+ {
+ if ( prev > best_contour_first )
+ prev--;
+ else
+ prev = best_contour_last;
+
+ if ( points[prev].x != best_x )
+ break;
+
+ } while ( prev != best_point );
+
+ /* skip glyph for the degenerate case */
+ if ( prev == best_point )
+ continue;
+
+ left2right = FT_BOOL( points[prev].x < points[best_point].x );
+
+ first = best_segment_last;
+ last = first;
+ hit = 0;
+
+ do
+ {
+ FT_Bool l2r;
+ FT_Pos d;
+
+
+ if ( !hit )
+ {
+ /* no hit; adjust first point */
+ first = last;
+
+ /* also adjust first and last on point */
+ if ( FT_CURVE_TAG( outline.tags[first] ) ==
+ FT_CURVE_TAG_ON )
+ {
+ p_first = first;
+ p_last = first;
+ }
+ else
+ {
+ p_first = -1;
+ p_last = -1;
+ }
+
+ hit = 1;
+ }
+
+ if ( last < best_contour_last )
+ last++;
+ else
+ last = best_contour_first;
+
+ if ( FT_ABS( best_y - points[first].y ) > height_threshold )
+ {
+ /* vertical distance too large */
+ hit = 0;
+ continue;
+ }
+
+ /* same test as above */
+ dist = FT_ABS( points[last].y - points[first].y );
+ if ( dist > 5 )
+ if ( FT_ABS( points[last].x - points[first].x ) <=
+ 20 * dist )
+ {
+ hit = 0;
+ continue;
+ }
+
+ if ( FT_CURVE_TAG( outline.tags[last] ) == FT_CURVE_TAG_ON )
+ {
+ p_last = last;
+ if ( p_first < 0 )
+ p_first = last;
+ }
+
+ l2r = FT_BOOL( points[first].x < points[last].x );
+ d = FT_ABS( points[last].x - points[first].x );
+
+ if ( l2r == left2right &&
+ d >= length_threshold )
+ {
+ /* all constraints are met; update segment after finding */
+ /* its end */
+ do
+ {
+ if ( last < best_contour_last )
+ last++;
+ else
+ last = best_contour_first;
+
+ d = FT_ABS( points[last].y - points[first].y );
+ if ( d > 5 )
+ if ( FT_ABS( points[next].x - points[first].x ) <=
+ 20 * dist )
+ {
+ if ( last > best_contour_first )
+ last--;
+ else
+ last = best_contour_last;
+ break;
+ }
+
+ p_last = last;
+
+ if ( FT_CURVE_TAG( outline.tags[last] ) ==
+ FT_CURVE_TAG_ON )
+ {
+ p_last = last;
+ if ( p_first < 0 )
+ p_first = last;
+ }
+
+ } while ( last != best_segment_first );
+
+ best_y = points[first].y;
+
+ best_segment_first = first;
+ best_segment_last = last;
+
+ best_on_point_first = p_first;
+ best_on_point_last = p_last;
+
+ break;
+ }
+
+ } while ( last != best_segment_first );
+ }
+ }
+
+ /* for computing blue zones, we add the y offset as returned */
+ /* by the currently used OpenType feature -- for example, */
+ /* superscript glyphs might be identical to subscript glyphs */
+ /* with a vertical shift */
+ best_y += y_offset;
+
+ FT_TRACE5(( " U+%04lX: best_y = %5ld", ch, best_y ));
+
+ /* now set the `round' flag depending on the segment's kind: */
+ /* */
+ /* - if the horizontal distance between the first and last */
+ /* `on' point is larger than upem/8 (value 8 is heuristic) */
+ /* we have a flat segment */
+ /* - if either the first or the last point of the segment is */
+ /* an `off' point, the segment is round, otherwise it is */
+ /* flat */
+ if ( best_on_point_first >= 0 &&
+ best_on_point_last >= 0 &&
+ (FT_UInt)( FT_ABS( points[best_on_point_last].x -
+ points[best_on_point_first].x ) ) >
+ metrics->units_per_em / 8 )
+ round = 0;
+ else
+ round = FT_BOOL(
+ FT_CURVE_TAG( outline.tags[best_segment_first] ) !=
+ FT_CURVE_TAG_ON ||
+ FT_CURVE_TAG( outline.tags[best_segment_last] ) !=
+ FT_CURVE_TAG_ON );
- FT_TRACE5(( "%c ", round ? 'r' : 'f' ));
+ if ( round && AF_LATIN_IS_NEUTRAL_BLUE( bs ) )
+ {
+ /* only use flat segments for a neutral blue zone */
+ FT_TRACE5(( " (round, skipped)\n" ));
+ continue;
+ }
+
+ FT_TRACE5(( " (%s)\n", round ? "round" : "flat" ));
}
if ( round )
@@ -349,15 +726,13 @@
flats[num_flats++] = best_y;
}
- FT_TRACE5(( "\n" ));
-
if ( num_flats == 0 && num_rounds == 0 )
{
/*
* we couldn't find a single glyph to compute this blue zone,
* we will simply ignore it then
*/
- FT_TRACE5(( "empty\n" ));
+ FT_TRACE5(( " empty\n" ));
continue;
}
@@ -385,7 +760,7 @@
}
else
{
- *blue_ref = flats[num_flats / 2];
+ *blue_ref = flats [num_flats / 2];
*blue_shoot = rounds[num_rounds / 2];
}
@@ -399,24 +774,33 @@
FT_Bool over_ref = FT_BOOL( shoot > ref );
- if ( AF_LATIN_IS_TOP_BLUE( bb ) ^ over_ref )
+ if ( AF_LATIN_IS_TOP_BLUE( bs ) ^ over_ref )
+ {
*blue_ref =
*blue_shoot = ( shoot + ref ) / 2;
+
+ FT_TRACE5(( " [overshoot smaller than reference,"
+ " taking mean value]\n" ));
+ }
}
blue->flags = 0;
- if ( AF_LATIN_IS_TOP_BLUE( bb ) )
+ if ( AF_LATIN_IS_TOP_BLUE( bs ) )
blue->flags |= AF_LATIN_BLUE_TOP;
+ if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) )
+ blue->flags |= AF_LATIN_BLUE_NEUTRAL;
/*
* The following flag is used later to adjust the y and x scales
* in order to optimize the pixel grid alignment of the top of small
* letters.
*/
- if ( bb == AF_LATIN_BLUE_SMALL_TOP )
+ if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) )
blue->flags |= AF_LATIN_BLUE_ADJUSTMENT;
- FT_TRACE5(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot ));
+ FT_TRACE5(( " -> reference = %ld\n"
+ " overshoot = %ld\n",
+ *blue_ref, *blue_shoot ));
}
FT_TRACE5(( "\n" ));
@@ -439,10 +823,11 @@
/* digit `0' is 0x30 in all supported charmaps */
for ( i = 0x30; i <= 0x39; i++ )
{
- FT_UInt glyph_index;
+ FT_ULong glyph_index;
+ FT_Long y_offset;
- glyph_index = FT_Get_Char_Index( face, i );
+ af_get_char_index( &metrics->root, i, &glyph_index, &y_offset );
if ( glyph_index == 0 )
continue;
@@ -478,41 +863,20 @@
af_latin_metrics_init( AF_LatinMetrics metrics,
FT_Face face )
{
- FT_Error error = AF_Err_Ok;
FT_CharMap oldmap = face->charmap;
- FT_UInt ee;
-
- static const FT_Encoding latin_encodings[] =
- {
- FT_ENCODING_UNICODE,
- FT_ENCODING_APPLE_ROMAN,
- FT_ENCODING_ADOBE_STANDARD,
- FT_ENCODING_ADOBE_LATIN_1,
-
- FT_ENCODING_NONE /* end of list */
- };
metrics->units_per_em = face->units_per_EM;
- /* do we have a latin charmap in there? */
- for ( ee = 0; latin_encodings[ee] != FT_ENCODING_NONE; ee++ )
- {
- error = FT_Select_Charmap( face, latin_encodings[ee] );
- if ( !error )
- break;
- }
-
- if ( !error )
+ if ( !FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )
{
- /* For now, compute the standard width and height from the `o'. */
- af_latin_metrics_init_widths( metrics, face, 'o' );
+ af_latin_metrics_init_widths( metrics, face );
af_latin_metrics_init_blues( metrics, face );
af_latin_metrics_check_digits( metrics, face );
}
FT_Set_Charmap( face, oldmap );
- return AF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -569,9 +933,26 @@
if ( blue )
{
- FT_Pos scaled = FT_MulFix( blue->shoot.org, scaler->y_scale );
- FT_Pos fitted = ( scaled + 40 ) & ~63;
+ FT_Pos scaled;
+ FT_Pos threshold;
+ FT_Pos fitted;
+ FT_UInt limit;
+ FT_UInt ppem;
+
+
+ scaled = FT_MulFix( blue->shoot.org, scaler->y_scale );
+ ppem = metrics->root.scaler.face->size->metrics.x_ppem;
+ limit = metrics->root.globals->increase_x_height;
+ threshold = 40;
+ /* if the `increase-x-height' property is active, */
+ /* we round up much more often */
+ if ( limit &&
+ ppem <= limit &&
+ ppem >= AF_PROP_INCREASE_X_HEIGHT_MIN )
+ threshold = 52;
+
+ fitted = ( scaled + threshold ) & ~63;
if ( scaled != fitted )
{
@@ -584,7 +965,20 @@
else
#endif
if ( dim == AF_DIMENSION_VERT )
+ {
scale = FT_MulDiv( scale, fitted, scaled );
+
+ FT_TRACE5((
+ "af_latin_metrics_scale_dim:"
+ " x height alignment (style `%s'):\n"
+ " "
+ " vertical scaling changed from %.4f to %.4f (by %d%%)\n"
+ "\n",
+ af_style_names[metrics->root.style_class->style],
+ axis->org_scale / 65536.0,
+ scale / 65536.0,
+ ( fitted - scaled ) * 100 / scaled ));
+ }
}
}
}
@@ -603,6 +997,10 @@
metrics->root.scaler.y_delta = delta;
}
+ FT_TRACE5(( "%s widths (style `%s')\n",
+ dim == AF_DIMENSION_HORZ ? "horizontal" : "vertical",
+ af_style_names[metrics->root.style_class->style] ));
+
/* scale the widths */
for ( nn = 0; nn < axis->width_count; nn++ )
{
@@ -611,15 +1009,31 @@
width->cur = FT_MulFix( width->org, scale );
width->fit = width->cur;
+
+ FT_TRACE5(( " %d scaled to %.2f\n",
+ width->org,
+ width->cur / 64.0 ));
}
+ FT_TRACE5(( "\n" ));
+
/* an extra-light axis corresponds to a standard width that is */
/* smaller than 5/8 pixels */
axis->extra_light =
(FT_Bool)( FT_MulFix( axis->standard_width, scale ) < 32 + 8 );
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( axis->extra_light )
+ FT_TRACE5(( "`%s' style is extra light (at current resolution)\n"
+ "\n",
+ af_style_names[metrics->root.style_class->style] ));
+#endif
+
if ( dim == AF_DIMENSION_VERT )
{
+ FT_TRACE5(( "blue zones (style `%s')\n",
+ af_style_names[metrics->root.style_class->style] ));
+
/* scale the blue zones */
for ( nn = 0; nn < axis->blue_count; nn++ )
{
@@ -677,7 +1091,7 @@
if ( delta2 < 32 )
delta2 = 0;
- else if ( delta < 48 )
+ else if ( delta2 < 48 )
delta2 = 32;
else
delta2 = 64;
@@ -691,6 +1105,19 @@
#endif
blue->flags |= AF_LATIN_BLUE_ACTIVE;
+
+ FT_TRACE5(( " reference %d: %d scaled to %.2f%s\n"
+ " overshoot %d: %d scaled to %.2f%s\n",
+ nn,
+ blue->ref.org,
+ blue->ref.fit / 64.0,
+ blue->flags & AF_LATIN_BLUE_ACTIVE ? ""
+ : " (inactive)",
+ nn,
+ blue->shoot.org,
+ blue->shoot.fit / 64.0,
+ blue->flags & AF_LATIN_BLUE_ACTIVE ? ""
+ : " (inactive)" ));
}
}
}
@@ -705,6 +1132,7 @@
{
metrics->root.scaler.render_mode = scaler->render_mode;
metrics->root.scaler.face = scaler->face;
+ metrics->root.scaler.flags = scaler->flags;
af_latin_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ );
af_latin_metrics_scale_dim( metrics, scaler, AF_DIMENSION_VERT );
@@ -728,7 +1156,7 @@
{
AF_AxisHints axis = &hints->axis[dim];
FT_Memory memory = hints->memory;
- FT_Error error = AF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
AF_Segment segment = NULL;
AF_SegmentRec seg0;
AF_Point* contour = hints->contours;
@@ -848,7 +1276,7 @@
on_edge = 0;
segment = NULL;
- /* fallthrough */
+ /* fall through */
}
}
@@ -865,17 +1293,19 @@
/* this is the start of a new segment! */
segment_dir = (AF_Direction)point->out_dir;
- /* clear all segment fields */
error = af_axis_hints_new_segment( axis, memory, &segment );
if ( error )
goto Exit;
- segment[0] = seg0;
+ /* clear all segment fields */
+ segment[0] = seg0;
+
segment->dir = (FT_Char)segment_dir;
min_pos = max_pos = point->u;
segment->first = point;
segment->last = point;
- on_edge = 1;
+
+ on_edge = 1;
}
point = point->next;
@@ -884,8 +1314,8 @@
} /* contours */
- /* now slightly increase the height of segments when this makes */
- /* sense -- this is used to better detect and ignore serifs */
+ /* now slightly increase the height of segments if this makes */
+ /* sense -- this is used to better detect and ignore serifs */
{
AF_Segment segments = axis->segments;
AF_Segment segments_end = segments + axis->num_segments;
@@ -899,9 +1329,6 @@
FT_Pos last_v = last->v;
- if ( first == last )
- continue;
-
if ( first_v < last_v )
{
AF_Point p;
@@ -940,31 +1367,44 @@
}
- /* Link segments to form stems and serifs. */
+ /* Link segments to form stems and serifs. If `width_count' and */
+ /* `widths' are non-zero, use them to fine-tune the scoring function. */
FT_LOCAL_DEF( void )
af_latin_hints_link_segments( AF_GlyphHints hints,
+ FT_UInt width_count,
+ AF_WidthRec* widths,
AF_Dimension dim )
{
AF_AxisHints axis = &hints->axis[dim];
AF_Segment segments = axis->segments;
AF_Segment segment_limit = segments + axis->num_segments;
- FT_Pos len_threshold, len_score;
+ FT_Pos len_threshold, len_score, dist_score, max_width;
AF_Segment seg1, seg2;
+ if ( width_count )
+ max_width = widths[width_count - 1].org;
+ else
+ max_width = 0;
+
+ /* a heuristic value to set up a minimum value for overlapping */
len_threshold = AF_LATIN_CONSTANT( hints->metrics, 8 );
if ( len_threshold == 0 )
len_threshold = 1;
+ /* a heuristic value to weight lengths */
len_score = AF_LATIN_CONSTANT( hints->metrics, 6000 );
+ /* a heuristic value to weight distances (no call to */
+ /* AF_LATIN_CONSTANT needed, since we work on multiples */
+ /* of the stem width) */
+ dist_score = 3000;
+
/* now compare each segment to the others */
for ( seg1 = segments; seg1 < segment_limit; seg1++ )
{
- /* the fake segments are introduced to hint the metrics -- */
- /* we must never link them to anything */
- if ( seg1->dir != axis->major_dir || seg1->first == seg1->last )
+ if ( seg1->dir != axis->major_dir )
continue;
/* search for stems having opposite directions, */
@@ -978,10 +1418,9 @@
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;
if ( min < seg2->min_coord )
@@ -991,15 +1430,49 @@
max = seg2->max_coord;
/* compute maximum coordinate difference of the two segments */
+ /* (this is, how much they overlap) */
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;
+ /*
+ * The score is the sum of two demerits indicating the
+ * `badness' of a fit, measured along the segments' main axis
+ * and orthogonal to it, respectively.
+ *
+ * o The less overlapping along the main axis, the worse it
+ * is, causing a larger demerit.
+ *
+ * o The nearer the orthogonal distance to a stem width, the
+ * better it is, causing a smaller demerit. For simplicity,
+ * however, we only increase the demerit for values that
+ * exceed the largest stem width.
+ */
+
+ FT_Pos dist = pos2 - pos1;
+
+ FT_Pos dist_demerit, score;
+
+
+ if ( max_width )
+ {
+ /* distance demerits are based on multiples of `max_width'; */
+ /* we scale by 1024 for getting more precision */
+ FT_Pos delta = ( dist << 10 ) / max_width - ( 1 << 10 );
+
+
+ if ( delta > 10000 )
+ dist_demerit = 32000;
+ else if ( delta > 0 )
+ dist_demerit = delta * delta / dist_score;
+ else
+ dist_demerit = 0;
+ }
+ else
+ dist_demerit = dist; /* default if no widths available */
+
+ score = dist_demerit + len_score / len;
/* and we search for the smallest score */
- /* of the sum of the two values */
if ( score < seg1->score )
{
seg1->score = score;
@@ -1040,7 +1513,7 @@
AF_Dimension dim )
{
AF_AxisHints axis = &hints->axis[dim];
- FT_Error error = AF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Memory memory = hints->memory;
AF_LatinAxis laxis = &((AF_LatinMetrics)hints->metrics)->axis[dim];
@@ -1169,17 +1642,17 @@
}
- /*********************************************************************/
- /* */
- /* Good, we will now compute each edge's properties according to */
- /* the segments found on its position. Basically, these are */
- /* */
- /* - 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 */
- /* */
- /*********************************************************************/
+ /******************************************************************/
+ /* */
+ /* Good, we now compute each edge's properties according to the */
+ /* segments found on its position. Basically, these are */
+ /* */
+ /* - 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 */
+ /* */
+ /******************************************************************/
/* first of all, set the `edge' field in each segment -- this is */
/* required in order to compute edge links */
@@ -1331,6 +1804,8 @@
FT_LOCAL_DEF( FT_Error )
af_latin_hints_detect_features( AF_GlyphHints hints,
+ FT_UInt width_count,
+ AF_WidthRec* widths,
AF_Dimension dim )
{
FT_Error error;
@@ -1339,7 +1814,7 @@
error = af_latin_hints_compute_segments( hints, dim );
if ( !error )
{
- af_latin_hints_link_segments( hints, dim );
+ af_latin_hints_link_segments( hints, width_count, widths, dim );
error = af_latin_hints_compute_edges( hints, dim );
}
@@ -1367,9 +1842,10 @@
/* for each horizontal edge search the blue zone which is closest */
for ( ; edge < edge_limit; edge++ )
{
- FT_Int bb;
- AF_Width best_blue = NULL;
- FT_Pos best_dist; /* initial threshold */
+ FT_UInt bb;
+ AF_Width best_blue = NULL;
+ FT_Bool best_blue_is_neutral = 0;
+ FT_Pos best_dist; /* initial threshold */
/* compute the initial threshold as a fraction of the EM size */
@@ -1380,27 +1856,29 @@
if ( best_dist > 64 / 2 )
best_dist = 64 / 2;
- for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ )
+ for ( bb = 0; bb < latin->blue_count; bb++ )
{
AF_LatinBlue blue = latin->blues + bb;
- FT_Bool is_top_blue, is_major_dir;
+ FT_Bool is_top_blue, is_neutral_blue, is_major_dir;
/* skip inactive blue zones (i.e., those that are too large) */
if ( !( blue->flags & AF_LATIN_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_blue = (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_TOP ) != 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_blue ^ is_major_dir )
+ /* if it is a top zone, check for right edges (against the major */
+ /* direction); if it is a bottom zone, check for left edges (in */
+ /* the major direction) -- this assumes the TrueType convention */
+ /* for the orientation of contours */
+ is_top_blue =
+ (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_TOP ) != 0 );
+ is_neutral_blue =
+ (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_NEUTRAL ) != 0);
+ is_major_dir =
+ FT_BOOL( edge->dir == axis->major_dir );
+
+ /* neutral blue zones are handled for both directions */
+ if ( is_top_blue ^ is_major_dir || is_neutral_blue )
{
FT_Pos dist;
@@ -1413,15 +1891,19 @@
dist = FT_MulFix( dist, scale );
if ( dist < best_dist )
{
- best_dist = dist;
- best_blue = &blue->ref;
+ best_dist = dist;
+ best_blue = &blue->ref;
+ best_blue_is_neutral = is_neutral_blue;
}
/* 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 )
+ /* position of a bottom zone (provided we don't have a */
+ /* neutral blue zone) */
+ if ( edge->flags & AF_EDGE_ROUND &&
+ dist != 0 &&
+ !is_neutral_blue )
{
FT_Bool is_under_ref = FT_BOOL( edge->fpos < blue->ref.org );
@@ -1435,8 +1917,9 @@
dist = FT_MulFix( dist, scale );
if ( dist < best_dist )
{
- best_dist = dist;
- best_blue = &blue->shoot;
+ best_dist = dist;
+ best_blue = &blue->shoot;
+ best_blue_is_neutral = is_neutral_blue;
}
}
}
@@ -1444,7 +1927,11 @@
}
if ( best_blue )
+ {
edge->blue_edge = best_blue;
+ if ( best_blue_is_neutral )
+ edge->flags |= AF_EDGE_NEUTRAL;
+ }
}
}
@@ -1460,7 +1947,7 @@
FT_Face face = metrics->root.scaler.face;
- af_glyph_hints_rescale( hints, (AF_ScriptMetrics)metrics );
+ af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics );
/*
* correct x_scale and y_scale if needed, since they may have
@@ -1476,9 +1963,7 @@
#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;
- }
#endif
scaler_flags = hints->scaler_flags;
@@ -1518,7 +2003,7 @@
hints->scaler_flags = scaler_flags;
hints->other_flags = other_flags;
- return AF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -1589,8 +2074,8 @@
AF_Edge_Flags base_flags,
AF_Edge_Flags stem_flags )
{
- AF_LatinMetrics metrics = (AF_LatinMetrics) hints->metrics;
- AF_LatinAxis axis = & metrics->axis[dim];
+ 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 );
@@ -1722,7 +2207,7 @@
if ( delta < 0 )
delta = -delta;
- if (delta >= 16)
+ if ( delta >= 16 )
{
dist = org_dist;
if ( dist < 48 )
@@ -1762,9 +2247,9 @@
stem_edge->pos = base_edge->pos + fitted_width;
- FT_TRACE5(( " LINK: edge %d (opos=%.2f) linked to (%.2f),"
+ 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 - hints->axis[dim].edges, stem_edge->opos / 64.0,
stem_edge->pos / 64.0, dist / 64.0, fitted_width / 64.0 ));
}
@@ -1808,9 +2293,14 @@
AF_Edge anchor = NULL;
FT_Int has_serifs = 0;
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_UInt num_actions = 0;
+#endif
+
- FT_TRACE5(("%s edge hinting\n", dim == AF_DIMENSION_VERT ? "horizontal"
- : "vertical"));
+ FT_TRACE5(( "latin %s edge hinting (style `%s')\n",
+ dim == AF_DIMENSION_VERT ? "horizontal" : "vertical",
+ af_style_names[hints->metrics->style_class->style] ));
/* we begin by aligning all stems relative to the blue zone */
/* if needed -- that's only for horizontal edges */
@@ -1826,14 +2316,41 @@
if ( edge->flags & AF_EDGE_DONE )
continue;
- blue = edge->blue_edge;
edge1 = NULL;
edge2 = edge->link;
+ /*
+ * If a stem contains both a neutral and a non-neutral blue zone,
+ * skip the neutral one. Otherwise, outlines with different
+ * directions might be incorrectly aligned at the same vertical
+ * position.
+ *
+ * If we have two neutral blue zones, skip one of them.
+ *
+ */
+ if ( edge->blue_edge && edge2 && edge2->blue_edge )
+ {
+ FT_Byte neutral = edge->flags & AF_EDGE_NEUTRAL;
+ FT_Byte neutral2 = edge2->flags & AF_EDGE_NEUTRAL;
+
+
+ if ( ( neutral && neutral2 ) || neutral2 )
+ {
+ edge2->blue_edge = NULL;
+ edge2->flags &= ~AF_EDGE_NEUTRAL;
+ }
+ else if ( neutral )
+ {
+ edge->blue_edge = NULL;
+ edge->flags &= ~AF_EDGE_NEUTRAL;
+ }
+ }
+
+ blue = edge->blue_edge;
if ( blue )
edge1 = edge;
- /* flip edges if the other stem is aligned to a blue zone */
+ /* flip edges if the other edge is aligned to a blue zone */
else if ( edge2 && edge2->blue_edge )
{
blue = edge2->blue_edge;
@@ -1844,10 +2361,20 @@
if ( !edge1 )
continue;
- 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 ));
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( !anchor )
+ FT_TRACE5(( " BLUE_ANCHOR: edge %d (opos=%.2f) snapped to %.2f,"
+ " was %.2f (anchor=edge %d)\n",
+ edge1 - edges, edge1->opos / 64.0, blue->fit / 64.0,
+ edge1->pos / 64.0, edge - edges ));
+ else
+ 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 ));
+
+ num_actions++;
+#endif
edge1->pos = blue->fit;
edge1->flags |= AF_EDGE_DONE;
@@ -1856,6 +2383,10 @@
{
af_latin_align_linked_edge( hints, dim, edge1, edge2 );
edge2->flags |= AF_EDGE_DONE;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ num_actions++;
+#endif
}
if ( !anchor )
@@ -1886,10 +2417,14 @@
/* 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 ));
+ FT_TRACE5(( " ASSERTION FAILED for edge %d\n", edge2 - edges ));
af_latin_align_linked_edge( hints, dim, edge2, edge );
edge->flags |= AF_EDGE_DONE;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ num_actions++;
+#endif
continue;
}
@@ -1947,16 +2482,20 @@
else
edge->pos = FT_PIX_ROUND( edge->opos );
+ anchor = edge;
+ edge->flags |= AF_EDGE_DONE;
+
FT_TRACE5(( " ANCHOR: edge %d (opos=%.2f) and %d (opos=%.2f)"
- " snapped to (%.2f) (%.2f)\n",
+ " 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 ));
- anchor = edge;
-
- edge->flags |= AF_EDGE_DONE;
af_latin_align_linked_edge( hints, dim, edge, edge2 );
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ num_actions += 2;
+#endif
}
else
{
@@ -1989,7 +2528,7 @@
cur_pos1 = FT_PIX_ROUND( org_center );
- if (cur_len <= 64 )
+ if ( cur_len <= 64 )
{
u_off = 32;
d_off = 32;
@@ -2016,12 +2555,13 @@
edge->pos = cur_pos1 - cur_len / 2;
edge2->pos = cur_pos1 + cur_len / 2;
- FT_TRACE5(( " STEM: %d (opos=%.2f) to %d (opos=%.2f)"
- " snapped to (%.2f) and (%.2f)\n",
+ FT_TRACE5(( " STEM: edge %d (opos=%.2f) linked 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
{
org_pos = anchor->pos + ( edge->opos - anchor->opos );
@@ -2046,20 +2586,29 @@
edge->pos = ( delta1 < delta2 ) ? cur_pos1 : cur_pos2;
edge2->pos = edge->pos + cur_len;
- FT_TRACE5(( " STEM: %d (opos=%.2f) to %d (opos=%.2f)"
- " snapped to (%.2f) and (%.2f)\n",
+ FT_TRACE5(( " STEM: edge %d (opos=%.2f) linked 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 ));
}
+#ifdef FT_DEBUG_LEVEL_TRACE
+ num_actions++;
+#endif
+
edge->flags |= AF_EDGE_DONE;
edge2->flags |= AF_EDGE_DONE;
if ( edge > edges && edge->pos < edge[-1].pos )
{
- FT_TRACE5(( " BOUND: %d (pos=%.2f) to (%.2f)\n",
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE5(( " BOUND: edge %d (pos=%.2f) moved to %.2f\n",
edge - edges, edge->pos / 64.0, edge[-1].pos / 64.0 ));
+
+ num_actions++;
+#endif
+
edge->pos = edge[-1].pos;
}
}
@@ -2154,7 +2703,7 @@
{
af_latin_align_serif_edge( hints, edge->serif, edge );
FT_TRACE5(( " SERIF: edge %d (opos=%.2f) serif to %d (opos=%.2f)"
- " aligned to (%.2f)\n",
+ " aligned to %.2f\n",
edge - edges, edge->opos / 64.0,
edge->serif - edges, edge->serif->opos / 64.0,
edge->pos / 64.0 ));
@@ -2164,7 +2713,7 @@
edge->pos = FT_PIX_ROUND( edge->opos );
anchor = edge;
FT_TRACE5(( " SERIF_ANCHOR: edge %d (opos=%.2f)"
- " snapped to (%.2f)\n",
+ " snapped to %.2f\n",
edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));
}
else
@@ -2191,7 +2740,7 @@
after->pos - before->pos,
after->opos - before->opos );
- FT_TRACE5(( " SERIF_LINK1: edge %d (opos=%.2f) snapped to (%.2f)"
+ 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,
@@ -2201,26 +2750,49 @@
{
edge->pos = anchor->pos +
( ( edge->opos - anchor->opos + 16 ) & ~31 );
-
FT_TRACE5(( " SERIF_LINK2: edge %d (opos=%.2f)"
- " snapped to (%.2f)\n",
+ " snapped to %.2f\n",
edge - edges, edge->opos / 64.0, edge->pos / 64.0 ));
}
}
+#ifdef FT_DEBUG_LEVEL_TRACE
+ num_actions++;
+#endif
edge->flags |= AF_EDGE_DONE;
if ( edge > edges && edge->pos < edge[-1].pos )
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE5(( " BOUND: edge %d (pos=%.2f) moved to %.2f\n",
+ edge - edges, edge->pos / 64.0, edge[-1].pos / 64.0 ));
+
+ num_actions++;
+#endif
edge->pos = edge[-1].pos;
+ }
if ( edge + 1 < edge_limit &&
edge[1].flags & AF_EDGE_DONE &&
edge->pos > edge[1].pos )
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE5(( " BOUND: edge %d (pos=%.2f) moved to %.2f\n",
+ edge - edges, edge->pos / 64.0, edge[1].pos / 64.0 ));
+
+ num_actions++;
+#endif
+
edge->pos = edge[1].pos;
+ }
}
}
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( !num_actions )
+ FT_TRACE5(( " (none)\n" ));
FT_TRACE5(( "\n" ));
+#endif
}
@@ -2234,6 +2806,8 @@
FT_Error error;
int dim;
+ AF_LatinAxis axis;
+
error = af_glyph_hints_reload( hints, outline );
if ( error )
@@ -2247,14 +2821,22 @@
if ( AF_HINTS_DO_HORIZONTAL( hints ) )
#endif
{
- error = af_latin_hints_detect_features( hints, AF_DIMENSION_HORZ );
+ axis = &metrics->axis[AF_DIMENSION_HORZ];
+ error = af_latin_hints_detect_features( hints,
+ axis->width_count,
+ axis->widths,
+ AF_DIMENSION_HORZ );
if ( error )
goto Exit;
}
if ( AF_HINTS_DO_VERTICAL( hints ) )
{
- error = af_latin_hints_detect_features( hints, AF_DIMENSION_VERT );
+ axis = &metrics->axis[AF_DIMENSION_VERT];
+ error = af_latin_hints_detect_features( hints,
+ axis->width_count,
+ axis->widths,
+ AF_DIMENSION_VERT );
if ( error )
goto Exit;
@@ -2290,6 +2872,7 @@
af_glyph_hints_align_weak_points( hints, (AF_Dimension)dim );
}
}
+
af_glyph_hints_save( hints, outline );
Exit:
@@ -2306,53 +2889,19 @@
/*************************************************************************/
- /* XXX: this should probably fine tuned to differentiate better between */
- /* scripts... */
+ AF_DEFINE_WRITING_SYSTEM_CLASS(
+ af_latin_writing_system_class,
- static const AF_Script_UniRangeRec af_latin_uniranges[] =
- {
- AF_UNIRANGE_REC( 0x0020UL, 0x007FUL ), /* Basic Latin (no control chars) */
- AF_UNIRANGE_REC( 0x00A0UL, 0x00FFUL ), /* Latin-1 Supplement (no control chars) */
- AF_UNIRANGE_REC( 0x0100UL, 0x017FUL ), /* Latin Extended-A */
- AF_UNIRANGE_REC( 0x0180UL, 0x024FUL ), /* Latin Extended-B */
- AF_UNIRANGE_REC( 0x0250UL, 0x02AFUL ), /* IPA Extensions */
- AF_UNIRANGE_REC( 0x02B0UL, 0x02FFUL ), /* Spacing Modifier Letters */
- AF_UNIRANGE_REC( 0x0300UL, 0x036FUL ), /* Combining Diacritical Marks */
- AF_UNIRANGE_REC( 0x0370UL, 0x03FFUL ), /* Greek and Coptic */
- AF_UNIRANGE_REC( 0x0400UL, 0x04FFUL ), /* Cyrillic */
- AF_UNIRANGE_REC( 0x0500UL, 0x052FUL ), /* Cyrillic Supplement */
- AF_UNIRANGE_REC( 0x1D00UL, 0x1D7FUL ), /* Phonetic Extensions */
- AF_UNIRANGE_REC( 0x1D80UL, 0x1DBFUL ), /* Phonetic Extensions Supplement */
- AF_UNIRANGE_REC( 0x1DC0UL, 0x1DFFUL ), /* Combining Diacritical Marks Supplement */
- AF_UNIRANGE_REC( 0x1E00UL, 0x1EFFUL ), /* Latin Extended Additional */
- AF_UNIRANGE_REC( 0x1F00UL, 0x1FFFUL ), /* Greek Extended */
- AF_UNIRANGE_REC( 0x2000UL, 0x206FUL ), /* General Punctuation */
- AF_UNIRANGE_REC( 0x2070UL, 0x209FUL ), /* Superscripts and Subscripts */
- AF_UNIRANGE_REC( 0x20A0UL, 0x20CFUL ), /* Currency Symbols */
- AF_UNIRANGE_REC( 0x2150UL, 0x218FUL ), /* Number Forms */
- AF_UNIRANGE_REC( 0x2460UL, 0x24FFUL ), /* Enclosed Alphanumerics */
- AF_UNIRANGE_REC( 0x2C60UL, 0x2C7FUL ), /* Latin Extended-C */
- AF_UNIRANGE_REC( 0x2DE0UL, 0x2DFFUL ), /* Cyrillic Extended-A */
- AF_UNIRANGE_REC( 0xA640UL, 0xA69FUL ), /* Cyrillic Extended-B */
- AF_UNIRANGE_REC( 0xA720UL, 0xA7FFUL ), /* Latin Extended-D */
- AF_UNIRANGE_REC( 0xFB00UL, 0xFB06UL ), /* Alphab. Present. Forms (Latin Ligs) */
- AF_UNIRANGE_REC( 0x1D400UL, 0x1D7FFUL ), /* Mathematical Alphanumeric Symbols */
- AF_UNIRANGE_REC( 0UL, 0UL )
- };
-
-
- AF_DEFINE_SCRIPT_CLASS( af_latin_script_class,
- AF_SCRIPT_LATIN,
- af_latin_uniranges,
+ AF_WRITING_SYSTEM_LATIN,
sizeof ( AF_LatinMetricsRec ),
- (AF_Script_InitMetricsFunc) af_latin_metrics_init,
- (AF_Script_ScaleMetricsFunc)af_latin_metrics_scale,
- (AF_Script_DoneMetricsFunc) NULL,
+ (AF_WritingSystem_InitMetricsFunc) af_latin_metrics_init,
+ (AF_WritingSystem_ScaleMetricsFunc)af_latin_metrics_scale,
+ (AF_WritingSystem_DoneMetricsFunc) NULL,
- (AF_Script_InitHintsFunc) af_latin_hints_init,
- (AF_Script_ApplyHintsFunc) af_latin_hints_apply
+ (AF_WritingSystem_InitHintsFunc) af_latin_hints_init,
+ (AF_WritingSystem_ApplyHintsFunc) af_latin_hints_apply
)
diff --git a/src/autofit/aflatin.h b/src/autofit/aflatin.h
index c5c2d13..2c0bfca 100644
--- a/src/autofit/aflatin.h
+++ b/src/autofit/aflatin.h
@@ -2,9 +2,10 @@
/* */
/* aflatin.h */
/* */
-/* Auto-fitter hinting routines for latin script (specification). */
+/* Auto-fitter hinting routines for latin writing system */
+/* (specification). */
/* */
-/* Copyright 2003-2007, 2009, 2011 by */
+/* Copyright 2003-2007, 2009, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,10 +25,9 @@
FT_BEGIN_HEADER
+ /* the `latin' writing system */
- /* the latin-specific script class */
-
- AF_DECLARE_SCRIPT_CLASS(af_latin_script_class)
+ AF_DECLARE_WRITING_SYSTEM_CLASS( af_latin_writing_system_class )
/* constants are given with units_per_em == 2048 in mind */
@@ -46,40 +46,30 @@ FT_BEGIN_HEADER
/*
* The following declarations could be embedded in the file `aflatin.c';
- * they have been made semi-public to allow alternate script hinters to
- * re-use some of them.
+ * they have been made semi-public to allow alternate writing system
+ * hinters to re-use some of them.
*/
- /* Latin (global) metrics management */
-
- enum
- {
- AF_LATIN_BLUE_CAPITAL_TOP,
- AF_LATIN_BLUE_CAPITAL_BOTTOM,
- AF_LATIN_BLUE_SMALL_F_TOP,
- AF_LATIN_BLUE_SMALL_TOP,
- AF_LATIN_BLUE_SMALL_BOTTOM,
- AF_LATIN_BLUE_SMALL_MINOR,
-
- AF_LATIN_BLUE_MAX
- };
-
-
-#define AF_LATIN_IS_TOP_BLUE( b ) ( (b) == AF_LATIN_BLUE_CAPITAL_TOP || \
- (b) == AF_LATIN_BLUE_SMALL_F_TOP || \
- (b) == AF_LATIN_BLUE_SMALL_TOP )
+#define AF_LATIN_IS_TOP_BLUE( b ) \
+ ( (b)->properties & AF_BLUE_PROPERTY_LATIN_TOP )
+#define AF_LATIN_IS_NEUTRAL_BLUE( b ) \
+ ( (b)->properties & AF_BLUE_PROPERTY_LATIN_NEUTRAL )
+#define AF_LATIN_IS_X_HEIGHT_BLUE( b ) \
+ ( (b)->properties & AF_BLUE_PROPERTY_LATIN_X_HEIGHT )
+#define AF_LATIN_IS_LONG_BLUE( b ) \
+ ( (b)->properties & AF_BLUE_PROPERTY_LATIN_LONG )
#define AF_LATIN_MAX_WIDTHS 16
-#define AF_LATIN_MAX_BLUES AF_LATIN_BLUE_MAX
enum
{
- 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_ACTIVE = 1 << 0, /* set if zone height is <= 3/4px */
+ AF_LATIN_BLUE_TOP = 1 << 1, /* set if we have a top blue zone */
+ AF_LATIN_BLUE_NEUTRAL = 1 << 2, /* set if we have neutral blue zone */
+ AF_LATIN_BLUE_ADJUSTMENT = 1 << 3, /* used for scale adjustment */
+ /* optimization */
AF_LATIN_BLUE_FLAG_MAX
};
@@ -106,7 +96,7 @@ FT_BEGIN_HEADER
/* ignored for horizontal metrics */
FT_UInt blue_count;
- AF_LatinBlueRec blues[AF_LATIN_BLUE_MAX];
+ AF_LatinBlueRec blues[AF_BLUE_STRINGSET_MAX];
FT_Fixed org_scale;
FT_Pos org_delta;
@@ -116,9 +106,9 @@ FT_BEGIN_HEADER
typedef struct AF_LatinMetricsRec_
{
- AF_ScriptMetricsRec root;
- FT_UInt units_per_em;
- AF_LatinAxisRec axis[AF_DIMENSION_MAX];
+ AF_StyleMetricsRec root;
+ FT_UInt units_per_em;
+ AF_LatinAxisRec axis[AF_DIMENSION_MAX];
} AF_LatinMetricsRec, *AF_LatinMetrics;
@@ -133,8 +123,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
af_latin_metrics_init_widths( AF_LatinMetrics metrics,
- FT_Face face,
- FT_ULong charcode );
+ FT_Face face );
FT_LOCAL( void )
af_latin_metrics_check_digits( AF_LatinMetrics metrics,
@@ -174,31 +163,27 @@ FT_BEGIN_HEADER
/*
- * This shouldn't normally be exported. However, other scripts might
- * like to use this function as-is.
+ * The next functions shouldn't normally be exported. However, other
+ * writing systems might like to use these functions as-is.
*/
FT_LOCAL( FT_Error )
af_latin_hints_compute_segments( AF_GlyphHints hints,
AF_Dimension dim );
- /*
- * This shouldn't normally be exported. However, other scripts might
- * want to use this function as-is.
- */
FT_LOCAL( void )
af_latin_hints_link_segments( AF_GlyphHints hints,
+ FT_UInt width_count,
+ AF_WidthRec* widths,
AF_Dimension dim );
- /*
- * This shouldn't normally be exported. However, other scripts might
- * want to use this function as-is.
- */
FT_LOCAL( FT_Error )
af_latin_hints_compute_edges( AF_GlyphHints hints,
AF_Dimension dim );
FT_LOCAL( FT_Error )
af_latin_hints_detect_features( AF_GlyphHints hints,
+ FT_UInt width_count,
+ AF_WidthRec* widths,
AF_Dimension dim );
/* */
diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c
index ea6af8d..07590b3 100644
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -2,9 +2,9 @@
/* */
/* aflatin2.c */
/* */
-/* Auto-fitter hinting routines for latin script (body). */
+/* Auto-fitter hinting routines for latin writing system (body). */
/* */
-/* Copyright 2003-2011 by */
+/* Copyright 2003-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,6 +18,7 @@
#include FT_ADVANCES_H
+#include "afglobal.h"
#include "aflatin.h"
#include "aflatin2.h"
#include "aferrors.h"
@@ -56,8 +57,7 @@
FT_LOCAL_DEF( void )
af_latin2_metrics_init_widths( AF_LatinMetrics metrics,
- FT_Face face,
- FT_ULong charcode )
+ FT_Face face )
{
/* scan the array of segments in each direction */
AF_GlyphHintsRec hints[1];
@@ -76,7 +76,9 @@
AF_Scaler scaler = &dummy->root.scaler;
- glyph_index = FT_Get_Char_Index( face, charcode );
+ glyph_index = FT_Get_Char_Index(
+ face,
+ metrics->root.style_class->standard_char );
if ( glyph_index == 0 )
goto Exit;
@@ -93,7 +95,7 @@
scaler->render_mode = FT_RENDER_MODE_NORMAL;
scaler->flags = 0;
- af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy );
+ af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy );
error = af_glyph_hints_reload( hints, &face->glyph->outline );
if ( error )
@@ -198,8 +200,8 @@
/* 'af_latin2_blue_chars[blues]' string, then compute its top-most or */
/* bottom-most points (depending on `AF_IS_TOP_BLUE') */
- FT_TRACE5(( "blue zones computation\n" ));
- FT_TRACE5(( "------------------------------------------------\n" ));
+ FT_TRACE5(( "blue zones computation\n"
+ "======================\n\n" ));
for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ )
{
@@ -209,7 +211,7 @@
FT_Pos* blue_shoot;
- FT_TRACE5(( "blue %3d: ", bb ));
+ FT_TRACE5(( "blue zone %d:\n", bb ));
num_flats = 0;
num_rounds = 0;
@@ -222,8 +224,6 @@
FT_Bool round;
- 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 );
if ( glyph_index == 0 )
@@ -285,13 +285,14 @@
best_last = last;
}
}
- FT_TRACE5(( "%5d", best_y ));
+ FT_TRACE5(( " %c %d", *p, best_y ));
}
/* now check whether the point belongs to a straight or round */
/* segment; we first need to find in which contour the extremum */
/* lies, then inspect its previous and next points */
{
+ FT_Pos best_x = points[best_point].x;
FT_Int start, end, prev, next;
FT_Pos dist;
@@ -302,13 +303,16 @@
do
{
- prev = start-1;
+ prev = start - 1;
if ( prev < best_first )
prev = best_last;
- dist = points[prev].y - best_y;
- if ( dist < -5 || dist > 5 )
- break;
+ dist = FT_ABS( points[prev].y - best_y );
+ /* accept a small distance or a small angle (both values are */
+ /* heuristic; value 20 corresponds to approx. 2.9 degrees) */
+ if ( dist > 5 )
+ if ( FT_ABS( points[prev].x - best_x ) <= 20 * dist )
+ break;
start = prev;
@@ -316,13 +320,14 @@
do
{
- next = end+1;
+ next = end + 1;
if ( next > best_last )
next = best_first;
- dist = points[next].y - best_y;
- if ( dist < -5 || dist > 5 )
- break;
+ dist = FT_ABS( points[next].y - best_y );
+ if ( dist > 5 )
+ if ( FT_ABS( points[next].x - best_x ) <= 20 * dist )
+ break;
end = next;
@@ -333,7 +338,7 @@
FT_CURVE_TAG( glyph->outline.tags[start] ) != FT_CURVE_TAG_ON ||
FT_CURVE_TAG( glyph->outline.tags[ end ] ) != FT_CURVE_TAG_ON );
- FT_TRACE5(( "%c ", round ? 'r' : 'f' ));
+ FT_TRACE5(( " (%s)\n", round ? "round" : "flat" ));
}
if ( round )
@@ -342,15 +347,13 @@
flats[num_flats++] = best_y;
}
- FT_TRACE5(( "\n" ));
-
if ( num_flats == 0 && num_rounds == 0 )
{
/*
* we couldn't find a single glyph to compute this blue zone,
* we will simply ignore it then
*/
- FT_TRACE5(( "empty\n" ));
+ FT_TRACE5(( " empty\n" ));
continue;
}
@@ -393,7 +396,13 @@
if ( AF_LATIN_IS_TOP_BLUE( bb ) ^ over_ref )
- *blue_shoot = *blue_ref = ( shoot + ref ) / 2;
+ {
+ *blue_ref =
+ *blue_shoot = ( shoot + ref ) / 2;
+
+ FT_TRACE5(( " [overshoot smaller than reference,"
+ " taking mean value]\n" ));
+ }
}
blue->flags = 0;
@@ -401,14 +410,16 @@
blue->flags |= AF_LATIN_BLUE_TOP;
/*
- * The following flags is used later to adjust the y and x scales
+ * The following flag is used later to adjust the y and x scales
* in order to optimize the pixel grid alignment of the top of small
* letters.
*/
- if ( bb == AF_LATIN_BLUE_SMALL_TOP )
+ if ( AF_LATIN_IS_X_HEIGHT_BLUE( bb ) )
blue->flags |= AF_LATIN_BLUE_ADJUSTMENT;
- FT_TRACE5(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot ));
+ FT_TRACE5(( " -> reference = %ld\n"
+ " overshoot = %ld\n",
+ *blue_ref, *blue_shoot ));
}
return;
@@ -465,7 +476,7 @@
af_latin2_metrics_init( AF_LatinMetrics metrics,
FT_Face face )
{
- FT_Error error = AF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_CharMap oldmap = face->charmap;
FT_UInt ee;
@@ -491,14 +502,13 @@
if ( !error )
{
- /* For now, compute the standard width and height from the `o'. */
- af_latin2_metrics_init_widths( metrics, face, 'o' );
+ af_latin2_metrics_init_widths( metrics, face );
af_latin2_metrics_init_blues( metrics, face );
af_latin2_metrics_check_digits( metrics, face );
}
FT_Set_Charmap( face, oldmap );
- return AF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -553,8 +563,26 @@
if ( blue )
{
- FT_Pos scaled = FT_MulFix( blue->shoot.org, scaler->y_scale );
- FT_Pos fitted = ( scaled + 40 ) & ~63;
+ FT_Pos scaled;
+ FT_Pos threshold;
+ FT_Pos fitted;
+ FT_UInt limit;
+ FT_UInt ppem;
+
+
+ scaled = FT_MulFix( blue->shoot.org, scaler->y_scale );
+ ppem = metrics->root.scaler.face->size->metrics.x_ppem;
+ limit = metrics->root.globals->increase_x_height;
+ threshold = 40;
+
+ /* if the `increase-x-height' property is active, */
+ /* we round up much more often */
+ if ( limit &&
+ ppem <= limit &&
+ ppem >= AF_PROP_INCREASE_X_HEIGHT_MIN )
+ threshold = 52;
+
+ fitted = ( scaled + threshold ) & ~63;
#if 1
if ( scaled != fitted )
@@ -658,6 +686,7 @@
{
metrics->root.scaler.render_mode = scaler->render_mode;
metrics->root.scaler.face = scaler->face;
+ metrics->root.scaler.flags = scaler->flags;
af_latin2_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ );
af_latin2_metrics_scale_dim( metrics, scaler, AF_DIMENSION_VERT );
@@ -680,7 +709,7 @@
{
AF_AxisHints axis = &hints->axis[dim];
FT_Memory memory = hints->memory;
- FT_Error error = AF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
AF_Segment segment = NULL;
AF_SegmentRec seg0;
AF_Point* contour = hints->contours;
@@ -796,17 +825,17 @@
segment->dir = first->out_dir;
segment->first = first;
segment->last = point;
- segment->pos = (FT_Short)(( min_u + max_u ) >> 1);
+ segment->pos = (FT_Short)( ( min_u + max_u ) >> 1 );
segment->min_coord = (FT_Short) min_v;
segment->max_coord = (FT_Short) max_v;
- segment->height = (FT_Short)(max_v - min_v);
+ segment->height = (FT_Short)( max_v - min_v );
/* a segment is round if it doesn't have successive */
/* on-curve points. */
{
AF_Point pt = first;
AF_Point last = point;
- AF_Flags f0 = (AF_Flags)(pt->flags & AF_FLAG_CONTROL);
+ AF_Flags f0 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL );
AF_Flags f1;
@@ -815,7 +844,7 @@
for ( ; pt != last; f0 = f1 )
{
pt = pt->next;
- f1 = (AF_Flags)(pt->flags & AF_FLAG_CONTROL);
+ f1 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL );
if ( !f0 && !f1 )
break;
@@ -832,7 +861,7 @@
break;
/* jump to the start of the next segment, if any */
- while ( FT_ABS(point->out_dir) != major_dir )
+ while ( FT_ABS( point->out_dir ) != major_dir )
{
point = point->next;
@@ -861,9 +890,6 @@
FT_Pos last_v = last->v;
- if ( first == last )
- continue;
-
if ( first_v < last_v )
{
p = first->prev;
@@ -900,16 +926,17 @@
FT_UInt count = axis->num_segments;
FT_UInt ii, jj;
- for (ii = 0; ii < count; ii++)
+ for ( ii = 0; ii < count; ii++ )
{
if ( segments[ii].dir > 0 )
{
- for (jj = ii+1; jj < count; jj++)
+ for ( jj = ii + 1; jj < count; jj++ )
{
if ( segments[jj].dir < 0 )
{
AF_SegmentRec tmp;
+
tmp = segments[ii];
segments[ii] = segments[jj];
segments[jj] = tmp;
@@ -954,7 +981,7 @@
#ifdef AF_SORT_SEGMENTS
for ( seg1 = segments; seg1 < segment_mid; seg1++ )
{
- if ( seg1->dir != axis->major_dir || seg1->first == seg1->last )
+ if ( seg1->dir != axis->major_dir )
continue;
for ( seg2 = segment_mid; seg2 < segment_limit; seg2++ )
@@ -962,9 +989,7 @@
/* now compare each segment to the others */
for ( seg1 = segments; seg1 < segment_limit; seg1++ )
{
- /* the fake segments are introduced to hint the metrics -- */
- /* we must never link them to anything */
- if ( seg1->dir != axis->major_dir || seg1->first == seg1->last )
+ if ( seg1->dir != axis->major_dir )
continue;
for ( seg2 = segments; seg2 < segment_limit; seg2++ )
@@ -1036,7 +1061,7 @@
AF_Dimension dim )
{
AF_AxisHints axis = &hints->axis[dim];
- FT_Error error = AF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Memory memory = hints->memory;
AF_LatinAxis laxis = &((AF_LatinMetrics)hints->metrics)->axis[dim];
@@ -1070,7 +1095,7 @@
if ( dim == AF_DIMENSION_HORZ )
{
if ( laxis->width_count > 0 )
- segment_length_threshold = (laxis->standard_width * 10 ) >> 4;
+ segment_length_threshold = ( laxis->standard_width * 10 ) >> 4;
else
segment_length_threshold = FT_DivFix( 64, hints->y_scale );
}
@@ -1116,10 +1141,11 @@
{
FT_Pos dist = seg->serif->pos - seg->pos;
- if (dist < 0)
+
+ if ( dist < 0 )
dist = -dist;
- if (dist >= laxis->standard_width >> 1)
+ if ( dist >= laxis->standard_width >> 1 )
{
/* unlink this serif, it is too distant from its reference stem */
seg->serif = NULL;
@@ -1163,9 +1189,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
@@ -1417,7 +1444,7 @@
compare = &blue->ref;
dist = edge->fpos - compare->org;
- if (dist < 0)
+ if ( dist < 0 )
dist = -dist;
dist = FT_MulFix( dist, scale );
@@ -1470,7 +1497,7 @@
FT_Face face = metrics->root.scaler.face;
- af_glyph_hints_rescale( hints, (AF_ScriptMetrics)metrics );
+ af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics );
/*
* correct x_scale and y_scale if needed, since they may have
@@ -1521,8 +1548,8 @@
* 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;
@@ -1603,8 +1630,8 @@
FT_Int sign = 0;
FT_Int vertical = ( dim == AF_DIMENSION_VERT );
+ FT_UNUSED( base_flags );
- FT_UNUSED(base_flags);
if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) ||
axis->extra_light )
@@ -1734,7 +1761,7 @@
if ( delta < 0 )
delta = -delta;
- if (delta >= 16)
+ if ( delta >= 16 )
{
dist = org_dist;
if ( dist < 48 )
@@ -1788,7 +1815,7 @@
{
FT_UNUSED( hints );
- serif->pos = base->pos + (serif->opos - base->opos);
+ serif->pos = base->pos + ( serif->opos - base->opos );
}
@@ -1870,9 +1897,10 @@
{
anchor = edge;
- anchor_drift = (anchor->pos - anchor->opos);
- if (edge2)
- anchor_drift = (anchor_drift + (edge2->pos - edge2->opos)) >> 1;
+ anchor_drift = ( anchor->pos - anchor->opos );
+ if ( edge2 )
+ anchor_drift = ( anchor_drift +
+ ( edge2->pos - edge2->opos ) ) >> 1;
}
}
}
@@ -1964,8 +1992,8 @@
edge2->flags |= AF_EDGE_DONE;
- anchor_drift = ( (anchor->pos - anchor->opos) +
- (edge2->pos - edge2->opos)) >> 1;
+ anchor_drift = ( ( anchor->pos - anchor->opos ) +
+ ( edge2->pos - edge2->opos ) ) >> 1;
FT_TRACE5(( "DRIFT: %.2f\n", anchor_drift/64.0 ));
}
@@ -1984,8 +2012,8 @@
(AF_Edge_Flags)edge->flags,
(AF_Edge_Flags)edge2->flags );
- org_left = org_pos + ((org_len - cur_len) >> 1);
- org_right = org_pos + ((org_len + cur_len) >> 1);
+ org_left = org_pos + ( ( org_len - cur_len ) >> 1 );
+ org_right = org_pos + ( ( org_len + cur_len ) >> 1 );
FT_TRACE5(( "ALIGN: left=%.2f right=%.2f ",
org_left / 64.0, org_right / 64.0 ));
@@ -2013,13 +2041,13 @@
}
/* if the span is within a single pixel, don't touch it */
- if ( FT_PIX_FLOOR(org_left) == FT_PIX_CEIL(org_right) )
+ if ( FT_PIX_FLOOR( org_left ) == FT_PIX_CEIL( org_right ) )
{
FT_TRACE5(( "single pixel stem\n" ));
goto AlignStem;
}
- if (cur_len <= 96)
+ if ( cur_len <= 96 )
{
/* we want to avoid the absolute worst case which is
* when the left and right edges of the span each represent
@@ -2027,43 +2055,43 @@
* to 25/75%, since this is much more pleasant to the eye with
* very acceptable distortion
*/
- FT_Pos frac_left = (org_left) & 63;
- FT_Pos frac_right = (org_right) & 63;
+ FT_Pos frac_left = org_left & 63;
+ FT_Pos frac_right = org_right & 63;
if ( frac_left >= 22 && frac_left <= 42 &&
frac_right >= 22 && frac_right <= 42 )
{
org = frac_left;
- fit = (org <= 32) ? 16 : 48;
- delta = FT_ABS(fit - org);
+ fit = ( org <= 32 ) ? 16 : 48;
+ delta = FT_ABS( fit - org );
displacements[count] = fit - org;
scores[count++] = delta;
- FT_TRACE5(( "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);
+ fit = ( org <= 32 ) ? 16 : 48;
+ delta = FT_ABS( fit - org );
displacements[count] = fit - org;
scores[count++] = delta;
- FT_TRACE5(( "dispB=%.2f (%d) ", (fit - org) / 64.0, delta ));
+ FT_TRACE5(( "dispB=%.2f (%d) ", ( fit - org ) / 64.0, delta ));
}
}
/* snapping the left edge to the grid */
org = org_left;
- fit = FT_PIX_ROUND(org);
- delta = FT_ABS(fit - org);
+ fit = FT_PIX_ROUND( org );
+ delta = FT_ABS( fit - org );
displacements[count] = fit - org;
scores[count++] = delta;
- FT_TRACE5(( "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;
- fit = FT_PIX_ROUND(org);
- delta = FT_ABS(fit - org);
+ fit = FT_PIX_ROUND( org );
+ delta = FT_ABS( fit - org );
displacements[count] = fit - org;
scores[count++] = delta;
- FT_TRACE5(( "dispD=%.2f (%d) ", (fit - org) / 64.0, delta ));
+ FT_TRACE5(( "dispD=%.2f (%d) ", ( fit - org ) / 64.0, delta ));
/* now find the best displacement */
{
@@ -2071,9 +2099,9 @@
FT_Pos best_disp = displacements[0];
FT_UInt nn;
- for (nn = 1; nn < count; nn++)
+ for ( nn = 1; nn < count; nn++ )
{
- if (scores[nn] < best_score)
+ if ( scores[nn] < best_score )
{
best_score = scores[nn];
best_disp = displacements[nn];
@@ -2086,7 +2114,7 @@
}
AlignStem:
- edge->pos = cur_center - (cur_len >> 1);
+ edge->pos = cur_center - ( cur_len >> 1 );
edge2->pos = edge->pos + cur_len;
FT_TRACE5(( "STEM1: %d (opos=%.2f) to %d (opos=%.2f)"
@@ -2348,26 +2376,19 @@
/*************************************************************************/
- static const AF_Script_UniRangeRec af_latin2_uniranges[] =
- {
- AF_UNIRANGE_REC( 32UL, 127UL ), /* TODO: Add new Unicode ranges here! */
- AF_UNIRANGE_REC( 160UL, 255UL ),
- AF_UNIRANGE_REC( 0UL, 0UL )
- };
-
+ AF_DEFINE_WRITING_SYSTEM_CLASS(
+ af_latin2_writing_system_class,
- AF_DEFINE_SCRIPT_CLASS( af_latin2_script_class,
- AF_SCRIPT_LATIN2,
- af_latin2_uniranges,
+ AF_WRITING_SYSTEM_LATIN2,
sizeof ( AF_LatinMetricsRec ),
- (AF_Script_InitMetricsFunc) af_latin2_metrics_init,
- (AF_Script_ScaleMetricsFunc)af_latin2_metrics_scale,
- (AF_Script_DoneMetricsFunc) NULL,
+ (AF_WritingSystem_InitMetricsFunc) af_latin2_metrics_init,
+ (AF_WritingSystem_ScaleMetricsFunc)af_latin2_metrics_scale,
+ (AF_WritingSystem_DoneMetricsFunc) NULL,
- (AF_Script_InitHintsFunc) af_latin2_hints_init,
- (AF_Script_ApplyHintsFunc) af_latin2_hints_apply
+ (AF_WritingSystem_InitHintsFunc) af_latin2_hints_init,
+ (AF_WritingSystem_ApplyHintsFunc) af_latin2_hints_apply
)
diff --git a/src/autofit/aflatin2.h b/src/autofit/aflatin2.h
index 925c621..b5d252a 100644
--- a/src/autofit/aflatin2.h
+++ b/src/autofit/aflatin2.h
@@ -2,9 +2,10 @@
/* */
/* aflatin2.h */
/* */
-/* Auto-fitter hinting routines for latin script (specification). */
+/* Auto-fitter hinting routines for latin writing system */
+/* (specification). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 2003-2007, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,9 +26,10 @@
FT_BEGIN_HEADER
- /* the latin-specific script class */
+ /* the `latin' writing system */
+
+ AF_DECLARE_WRITING_SYSTEM_CLASS( af_latin2_writing_system_class )
- AF_DECLARE_SCRIPT_CLASS(af_latin2_script_class)
/* */
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index 34ef9d8..fb15c87 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter glyph loading routines (body). */
/* */
-/* Copyright 2003-2009, 2011-2012 by */
+/* Copyright 2003-2009, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,18 +16,23 @@
/***************************************************************************/
+#include "afglobal.h"
#include "afloader.h"
#include "afhints.h"
-#include "afglobal.h"
#include "aferrors.h"
+#include "afmodule.h"
+#include "afpic.h"
/* Initialize glyph loader. */
FT_LOCAL_DEF( FT_Error )
- af_loader_init( AF_Loader loader,
- FT_Memory memory )
+ af_loader_init( AF_Module module )
{
+ AF_Loader loader = module->loader;
+ FT_Memory memory = module->root.library->memory;
+
+
FT_ZERO( loader );
af_glyph_hints_init( &loader->hints, memory );
@@ -41,10 +46,11 @@
/* Reset glyph loader and compute globals if necessary. */
FT_LOCAL_DEF( FT_Error )
- af_loader_reset( AF_Loader loader,
+ af_loader_reset( AF_Module module,
FT_Face face )
{
- FT_Error error = AF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
+ AF_Loader loader = module->loader;
loader->face = face;
@@ -54,7 +60,7 @@
if ( loader->globals == NULL )
{
- error = af_face_globals_new( face, &loader->globals );
+ error = af_face_globals_new( face, &loader->globals, module );
if ( !error )
{
face->autohint.data =
@@ -71,8 +77,11 @@
/* Finalize glyph loader. */
FT_LOCAL_DEF( void )
- af_loader_done( AF_Loader loader )
+ af_loader_done( AF_Module module )
{
+ AF_Loader loader = module->loader;
+
+
af_glyph_hints_done( &loader->hints );
loader->face = NULL;
@@ -100,13 +109,15 @@
FT_Error error;
FT_Face face = loader->face;
FT_GlyphLoader gloader = loader->gloader;
- AF_ScriptMetrics metrics = loader->metrics;
+ AF_StyleMetrics metrics = loader->metrics;
AF_GlyphHints hints = &loader->hints;
FT_GlyphSlot slot = face->glyph;
FT_Slot_Internal internal = slot->internal;
+ FT_Int32 flags;
- error = FT_Load_Glyph( face, glyph_index, load_flags );
+ flags = load_flags | FT_LOAD_LINEAR_DESIGN;
+ error = FT_Load_Glyph( face, glyph_index, flags );
if ( error )
goto Exit;
@@ -120,14 +131,10 @@
loader->trans_delta = internal->glyph_delta;
inverse = loader->trans_matrix;
- FT_Matrix_Invert( &inverse );
- FT_Vector_Transform( &loader->trans_delta, &inverse );
+ if ( !FT_Matrix_Invert( &inverse ) )
+ FT_Vector_Transform( &loader->trans_delta, &inverse );
}
- /* set linear metrics */
- slot->linearHoriAdvance = slot->metrics.horiAdvance;
- slot->linearVertAdvance = slot->metrics.vertAdvance;
-
switch ( slot->format )
{
case FT_GLYPH_FORMAT_OUTLINE:
@@ -137,8 +144,8 @@
loader->trans_delta.x,
loader->trans_delta.y );
- /* copy the outline points in the loader's current */
- /* extra points which is used to keep original glyph coordinates */
+ /* copy the outline points in the loader's current */
+ /* extra points which are used to keep original glyph coordinates */
error = FT_GLYPHLOADER_CHECK_POINTS( gloader,
slot->outline.n_points + 4,
slot->outline.n_contours );
@@ -174,10 +181,20 @@
/* now load the slot image into the auto-outline and run the */
/* automatic hinting process */
- if ( metrics->clazz->script_hints_apply )
- metrics->clazz->script_hints_apply( hints,
- &gloader->current.outline,
- metrics );
+ {
+#ifdef FT_CONFIG_OPTION_PIC
+ AF_FaceGlobals globals = loader->globals;
+#endif
+ AF_StyleClass style_class = metrics->style_class;
+ AF_WritingSystemClass writing_system_class =
+ AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system];
+
+
+ if ( writing_system_class->style_hints_apply )
+ writing_system_class->style_hints_apply( hints,
+ &gloader->current.outline,
+ metrics );
+ }
/* we now need to adjust the metrics according to the change in */
/* width/positioning that occurred during the hinting process */
@@ -301,12 +318,7 @@
/* recompute subglyph pointer */
subglyph = gloader->base.subglyphs + num_base_subgs + nn;
- if ( subglyph->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS )
- {
- pp1 = loader->pp1;
- pp2 = loader->pp2;
- }
- else
+ if ( !( subglyph->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS ) )
{
loader->pp1 = pp1;
loader->pp2 = pp2;
@@ -343,14 +355,14 @@
if ( start_point + k >= num_base_points ||
l >= (FT_UInt)num_new_points )
{
- error = AF_Err_Invalid_Composite;
+ error = FT_THROW( Invalid_Composite );
goto Exit;
}
l += num_base_points;
- /* for now, only use the current point coordinates; */
- /* we may consider another approach in the near future */
+ /* for now, only use the current point coordinates; */
+ /* we eventually may consider another approach */
p1 = gloader->base.outline.points + start_point + k;
p2 = gloader->base.outline.points + start_point + l;
@@ -381,7 +393,7 @@
default:
/* we don't support other formats (yet?) */
- error = AF_Err_Unimplemented_Feature;
+ error = FT_THROW( Unimplemented_Feature );
}
Hint_Metrics:
@@ -484,18 +496,19 @@
/* Load a glyph. */
FT_LOCAL_DEF( FT_Error )
- af_loader_load_glyph( AF_Loader loader,
+ af_loader_load_glyph( AF_Module module,
FT_Face face,
FT_UInt gindex,
FT_Int32 load_flags )
{
FT_Error error;
- FT_Size size = face->size;
+ FT_Size size = face->size;
+ AF_Loader loader = module->loader;
AF_ScalerRec scaler;
if ( !size )
- return AF_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Size_Handle );
FT_ZERO( &scaler );
@@ -508,37 +521,45 @@
scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );
scaler.flags = 0; /* XXX: fix this */
- error = af_loader_reset( loader, face );
+ error = af_loader_reset( module, face );
if ( !error )
{
- AF_ScriptMetrics metrics;
- FT_UInt options = 0;
+ AF_StyleMetrics metrics;
+ FT_UInt options = AF_STYLE_NONE_DFLT;
#ifdef FT_OPTION_AUTOFIT2
- /* XXX: undocumented hook to activate the latin2 hinter */
+ /* XXX: undocumented hook to activate the latin2 writing system */
if ( load_flags & ( 1UL << 20 ) )
- options = 2;
+ options = AF_STYLE_LTN2_DFLT;
#endif
error = af_face_globals_get_metrics( loader->globals, gindex,
options, &metrics );
if ( !error )
{
+#ifdef FT_CONFIG_OPTION_PIC
+ AF_FaceGlobals globals = loader->globals;
+#endif
+ AF_StyleClass style_class = metrics->style_class;
+ AF_WritingSystemClass writing_system_class =
+ AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system];
+
+
loader->metrics = metrics;
- if ( metrics->clazz->script_metrics_scale )
- metrics->clazz->script_metrics_scale( metrics, &scaler );
+ if ( writing_system_class->style_metrics_scale )
+ writing_system_class->style_metrics_scale( metrics, &scaler );
else
metrics->scaler = scaler;
load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM;
load_flags &= ~FT_LOAD_RENDER;
- if ( metrics->clazz->script_hints_init )
+ if ( writing_system_class->style_hints_init )
{
- error = metrics->clazz->script_hints_init( &loader->hints,
- metrics );
+ error = writing_system_class->style_hints_init( &loader->hints,
+ metrics );
if ( error )
goto Exit;
}
diff --git a/src/autofit/afloader.h b/src/autofit/afloader.h
index eec0e92..9601e24 100644
--- a/src/autofit/afloader.h
+++ b/src/autofit/afloader.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter glyph loading routines (specification). */
/* */
-/* Copyright 2003-2005, 2011-2012 by */
+/* Copyright 2003-2005, 2011-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,13 +25,26 @@
FT_BEGIN_HEADER
- typedef struct AF_LoaderRec_
+ typedef struct AF_ModuleRec_* AF_Module;
+
+ /*
+ * The autofitter module's (global) data structure to communicate with
+ * actual fonts. If necessary, `local' data like the current face, the
+ * current face's auto-hint data, or the current glyph's parameters
+ * relevant to auto-hinting are `swapped in'. Cf. functions like
+ * `af_loader_reset' and `af_loader_load_g'.
+ */
+
+ typedef struct AF_LoaderRec_
{
- FT_Face face; /* current face */
- AF_FaceGlobals globals; /* current face globals */
- FT_GlyphLoader gloader; /* glyph loader */
+ /* current face data */
+ FT_Face face;
+ AF_FaceGlobals globals;
+
+ /* current glyph data */
+ FT_GlyphLoader gloader;
AF_GlyphHintsRec hints;
- AF_ScriptMetrics metrics;
+ AF_StyleMetrics metrics;
FT_Bool transformed;
FT_Matrix trans_matrix;
FT_Vector trans_delta;
@@ -43,21 +56,20 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- af_loader_init( AF_Loader loader,
- FT_Memory memory );
+ af_loader_init( AF_Module module );
FT_LOCAL( FT_Error )
- af_loader_reset( AF_Loader loader,
+ af_loader_reset( AF_Module module,
FT_Face face );
FT_LOCAL( void )
- af_loader_done( AF_Loader loader );
+ af_loader_done( AF_Module module );
FT_LOCAL( FT_Error )
- af_loader_load_glyph( AF_Loader loader,
+ af_loader_load_glyph( AF_Module module,
FT_Face face,
FT_UInt gindex,
FT_Int32 load_flags );
diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c
index 20b6218..641e03e 100644
--- a/src/autofit/afmodule.c
+++ b/src/autofit/afmodule.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter module implementation (body). */
/* */
-/* Copyright 2003-2006, 2009, 2011 by */
+/* Copyright 2003-2006, 2009, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,8 +16,10 @@
/***************************************************************************/
+#include "afglobal.h"
#include "afmodule.h"
#include "afloader.h"
+#include "aferrors.h"
#include "afpic.h"
#ifdef FT_DEBUG_AUTOFIT
@@ -28,66 +30,280 @@
#endif
#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_DEBUG_H
+#include FT_AUTOHINTER_H
+#include FT_SERVICE_PROPERTIES_H
- typedef struct FT_AutofitterRec_
+ /*************************************************************************/
+ /* */
+ /* 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_afmodule
+
+
+ static FT_Error
+ af_property_get_face_globals( FT_Face face,
+ AF_FaceGlobals* aglobals,
+ AF_Module module )
+ {
+ FT_Error error = FT_Err_Ok;
+ AF_FaceGlobals globals;
+
+
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
+
+ globals = (AF_FaceGlobals)face->autohint.data;
+ if ( !globals )
+ {
+ /* trigger computation of the global style data */
+ /* in case it hasn't been done yet */
+ error = af_face_globals_new( face, &globals, module );
+ if ( !error )
+ {
+ face->autohint.data =
+ (FT_Pointer)globals;
+ face->autohint.finalizer =
+ (FT_Generic_Finalizer)af_face_globals_free;
+ }
+ }
+
+ if ( !error )
+ *aglobals = globals;
+
+ return error;
+ }
+
+
+ static FT_Error
+ af_property_set( FT_Module ft_module,
+ const char* property_name,
+ const void* value )
+ {
+ FT_Error error = FT_Err_Ok;
+ AF_Module module = (AF_Module)ft_module;
+
+
+ if ( !ft_strcmp( property_name, "fallback-script" ) )
+ {
+ FT_UInt* fallback_script = (FT_UInt*)value;
+
+ FT_UInt ss;
+
+
+ /* We translate the fallback script to a fallback style that uses */
+ /* `fallback-script' as its script and `AF_COVERAGE_NONE' as its */
+ /* coverage value. */
+ for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ )
+ {
+ AF_StyleClass style_class = AF_STYLE_CLASSES_GET[ss];
+
+
+ if ( (FT_UInt)style_class->script == *fallback_script &&
+ style_class->coverage == AF_COVERAGE_DEFAULT )
+ {
+ module->fallback_style = ss;
+ break;
+ }
+ }
+
+ if ( !AF_STYLE_CLASSES_GET[ss] )
+ {
+ FT_TRACE0(( "af_property_set: Invalid value %d for property `%s'\n",
+ fallback_script, property_name ));
+ return FT_THROW( Invalid_Argument );
+ }
+
+ return error;
+ }
+ else if ( !ft_strcmp( property_name, "default-script" ) )
+ {
+ FT_UInt* default_script = (FT_UInt*)value;
+
+
+ module->default_script = *default_script;
+
+ return error;
+ }
+ else if ( !ft_strcmp( property_name, "increase-x-height" ) )
+ {
+ FT_Prop_IncreaseXHeight* prop = (FT_Prop_IncreaseXHeight*)value;
+ AF_FaceGlobals globals;
+
+
+ error = af_property_get_face_globals( prop->face, &globals, module );
+ if ( !error )
+ globals->increase_x_height = prop->limit;
+
+ return error;
+ }
+
+ FT_TRACE0(( "af_property_set: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ static FT_Error
+ af_property_get( FT_Module ft_module,
+ const char* property_name,
+ void* value )
+ {
+ FT_Error error = FT_Err_Ok;
+ AF_Module module = (AF_Module)ft_module;
+ FT_UInt fallback_style = module->fallback_style;
+ FT_UInt default_script = module->default_script;
+
+
+ if ( !ft_strcmp( property_name, "glyph-to-script-map" ) )
+ {
+ FT_Prop_GlyphToScriptMap* prop = (FT_Prop_GlyphToScriptMap*)value;
+ AF_FaceGlobals globals;
+
+
+ error = af_property_get_face_globals( prop->face, &globals, module );
+ if ( !error )
+ prop->map = globals->glyph_styles;
+
+ return error;
+ }
+ else if ( !ft_strcmp( property_name, "fallback-script" ) )
+ {
+ FT_UInt* val = (FT_UInt*)value;
+
+ AF_StyleClass style_class = AF_STYLE_CLASSES_GET[fallback_style];
+
+
+ *val = style_class->script;
+
+ return error;
+ }
+ else if ( !ft_strcmp( property_name, "default-script" ) )
+ {
+ FT_UInt* val = (FT_UInt*)value;
+
+
+ *val = default_script;
+
+ return error;
+ }
+ else if ( !ft_strcmp( property_name, "increase-x-height" ) )
+ {
+ FT_Prop_IncreaseXHeight* prop = (FT_Prop_IncreaseXHeight*)value;
+ AF_FaceGlobals globals;
+
+
+ error = af_property_get_face_globals( prop->face, &globals, module );
+ if ( !error )
+ prop->limit = globals->increase_x_height;
+
+ return error;
+ }
+
+
+ FT_TRACE0(( "af_property_get: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ FT_DEFINE_SERVICE_PROPERTIESREC(
+ af_service_properties,
+ (FT_Properties_SetFunc)af_property_set,
+ (FT_Properties_GetFunc)af_property_get )
+
+
+ FT_DEFINE_SERVICEDESCREC1(
+ af_services,
+ FT_SERVICE_ID_PROPERTIES, &AF_SERVICE_PROPERTIES_GET )
+
+
+ FT_CALLBACK_DEF( FT_Module_Interface )
+ af_get_interface( FT_Module module,
+ const char* module_interface )
{
- FT_ModuleRec root;
- AF_LoaderRec loader[1];
+ /* AF_SERVICES_GET dereferences `library' in PIC mode */
+#ifdef FT_CONFIG_OPTION_PIC
+ FT_Library library;
+
+
+ if ( !module )
+ return NULL;
+ library = module->library;
+ if ( !library )
+ return NULL;
+#else
+ FT_UNUSED( module );
+#endif
- } FT_AutofitterRec, *FT_Autofitter;
+ return ft_service_list_lookup( AF_SERVICES_GET, module_interface );
+ }
FT_CALLBACK_DEF( FT_Error )
- af_autofitter_init( FT_Autofitter module )
+ af_autofitter_init( FT_Module ft_module ) /* AF_Module */
{
- return af_loader_init( module->loader, module->root.library->memory );
+ AF_Module module = (AF_Module)ft_module;
+
+
+ module->fallback_style = AF_STYLE_FALLBACK;
+ module->default_script = AF_SCRIPT_DEFAULT;
+
+ return af_loader_init( module );
}
FT_CALLBACK_DEF( void )
- af_autofitter_done( FT_Autofitter module )
+ af_autofitter_done( FT_Module ft_module ) /* AF_Module */
{
- af_loader_done( module->loader );
+ AF_Module module = (AF_Module)ft_module;
+
+
+ af_loader_done( module );
}
FT_CALLBACK_DEF( FT_Error )
- af_autofitter_load_glyph( FT_Autofitter module,
- FT_GlyphSlot slot,
- FT_Size size,
- FT_UInt glyph_index,
- FT_Int32 load_flags )
+ af_autofitter_load_glyph( AF_Module module,
+ FT_GlyphSlot slot,
+ FT_Size size,
+ FT_UInt glyph_index,
+ FT_Int32 load_flags )
{
FT_UNUSED( size );
- return af_loader_load_glyph( module->loader, slot->face,
+ return af_loader_load_glyph( module, slot->face,
glyph_index, load_flags );
}
- FT_DEFINE_AUTOHINTER_SERVICE(
- af_autofitter_service,
- NULL,
- NULL,
- NULL,
- (FT_AutoHinter_GlyphLoadFunc)af_autofitter_load_glyph )
+ FT_DEFINE_AUTOHINTER_INTERFACE(
+ af_autofitter_interface,
+ NULL, /* reset_face */
+ NULL, /* get_global_hints */
+ NULL, /* done_global_hints */
+ (FT_AutoHinter_GlyphLoadFunc)af_autofitter_load_glyph ) /* load_glyph */
+
FT_DEFINE_MODULE(
autofit_module_class,
FT_MODULE_HINTER,
- sizeof ( FT_AutofitterRec ),
+ sizeof ( AF_ModuleRec ),
"autofitter",
0x10000L, /* version 1.0 of the autofitter */
0x20000L, /* requires FreeType 2.0 or above */
- (const void*)&AF_AF_AUTOFITTER_SERVICE_GET,
+ (const void*)&AF_INTERFACE_GET,
(FT_Module_Constructor)af_autofitter_init,
(FT_Module_Destructor) af_autofitter_done,
- (FT_Module_Requester) NULL )
+ (FT_Module_Requester) af_get_interface )
/* END */
diff --git a/src/autofit/afmodule.h b/src/autofit/afmodule.h
index d979239..20b7b9f 100644
--- a/src/autofit/afmodule.h
+++ b/src/autofit/afmodule.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter module implementation (specification). */
/* */
-/* Copyright 2003, 2004, 2005 by */
+/* Copyright 2003-2005, 2009, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,9 +23,31 @@
#include FT_INTERNAL_OBJECTS_H
#include FT_MODULE_H
+#include "afloader.h"
+
FT_BEGIN_HEADER
+
+ /*
+ * This is the `extended' FT_Module structure which holds the
+ * autofitter's global data. Right before hinting a glyph, the data
+ * specific to the glyph's face (blue zones, stem widths, etc.) are
+ * loaded into `loader' (see function `af_loader_reset').
+ */
+
+ typedef struct AF_ModuleRec_
+ {
+ FT_ModuleRec root;
+
+ FT_UInt fallback_style;
+ FT_UInt default_script;
+
+ AF_LoaderRec loader[1];
+
+ } AF_ModuleRec;
+
+
FT_DECLARE_MODULE(autofit_module_class)
diff --git a/src/autofit/afpic.c b/src/autofit/afpic.c
index 87074af..cb29fd7 100644
--- a/src/autofit/afpic.c
+++ b/src/autofit/afpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for autofit module. */
/* */
-/* Copyright 2009, 2010, 2011 by */
+/* Copyright 2009-2014 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,23 +20,35 @@
#include FT_FREETYPE_H
#include FT_INTERNAL_OBJECTS_H
#include "afpic.h"
+#include "afglobal.h"
#include "aferrors.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from afmodule.c */
- void FT_Init_Class_af_autofitter_service(
- FT_Library library,
- FT_AutoHinter_ServiceRec* clazz );
-
- /* forward declaration of PIC init functions from script classes */
-#include "aflatin.h"
-#ifdef FT_OPTION_AUTOFIT2
-#include "aflatin2.h"
-#endif
-#include "afcjk.h"
-#include "afdummy.h"
-#include "afindic.h"
+ FT_Error
+ FT_Create_Class_af_services( FT_Library library,
+ FT_ServiceDescRec** output_class );
+
+ void
+ FT_Destroy_Class_af_services( FT_Library library,
+ FT_ServiceDescRec* clazz );
+
+ void
+ FT_Init_Class_af_service_properties( FT_Service_PropertiesRec* clazz );
+
+ void FT_Init_Class_af_autofitter_interface(
+ FT_Library library,
+ FT_AutoHinter_InterfaceRec* clazz );
+
+
+ /* forward declaration of PIC init functions from writing system classes */
+#undef WRITING_SYSTEM
+#define WRITING_SYSTEM( ws, WS ) /* empty */
+
+#include "afwrtsys.h"
+
void
autofit_module_class_pic_free( FT_Library library )
@@ -47,7 +59,15 @@
if ( pic_container->autofit )
{
- FT_FREE( pic_container->autofit );
+ AFModulePIC* container = (AFModulePIC*)pic_container->autofit;
+
+
+ if ( container->af_services )
+ FT_Destroy_Class_af_services( library,
+ container->af_services );
+ container->af_services = NULL;
+
+ FT_FREE( container );
pic_container->autofit = NULL;
}
}
@@ -58,8 +78,8 @@
{
FT_PIC_Container* pic_container = &library->pic_container;
FT_UInt ss;
- FT_Error error = AF_Err_Ok;
- AFModulePIC* container;
+ FT_Error error = FT_Err_Ok;
+ AFModulePIC* container = NULL;
FT_Memory memory = library->memory;
@@ -71,39 +91,61 @@
/* initialize pointer table - */
/* this is how the module usually expects this data */
- for ( ss = 0 ; ss < AF_SCRIPT_CLASSES_REC_COUNT ; ss++ )
- {
+ error = FT_Create_Class_af_services( library,
+ &container->af_services );
+ if ( error )
+ goto Exit;
+
+ FT_Init_Class_af_service_properties( &container->af_service_properties );
+
+ for ( ss = 0; ss < AF_WRITING_SYSTEM_MAX; ss++ )
+ container->af_writing_system_classes[ss] =
+ &container->af_writing_system_classes_rec[ss];
+ container->af_writing_system_classes[AF_WRITING_SYSTEM_MAX] = NULL;
+
+ for ( ss = 0; ss < AF_SCRIPT_MAX; 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_MAX] = NULL;
+
+ for ( ss = 0; ss < AF_STYLE_MAX; ss++ )
+ container->af_style_classes[ss] =
+ &container->af_style_classes_rec[ss];
+ container->af_style_classes[AF_STYLE_MAX] = NULL;
+
+#undef WRITING_SYSTEM
+#define WRITING_SYSTEM( ws, WS ) \
+ FT_Init_Class_af_ ## ws ## _writing_system_class( \
+ &container->af_writing_system_classes_rec[ss++] );
- /* 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++] );
-#ifdef FT_OPTION_AUTOFIT2
- 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_autofitter_service(
- library, &container->af_autofitter_service );
-
-/* Exit: */
+#include "afwrtsys.h"
+
+#undef SCRIPT
+#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \
+ FT_Init_Class_af_ ## s ## _script_class( \
+ &container->af_script_classes_rec[ss++] );
+ ss = 0;
+#include "afscript.h"
+
+#undef STYLE
+#define STYLE( s, S, d, ws, sc, bss, c ) \
+ FT_Init_Class_af_ ## s ## _style_class( \
+ &container->af_style_classes_rec[ss++] );
+
+ ss = 0;
+#include "afstyles.h"
+
+ FT_Init_Class_af_autofitter_interface(
+ library, &container->af_autofitter_interface );
+
+ Exit:
if ( error )
autofit_module_class_pic_free( library );
return error;
}
-
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/src/autofit/afpic.h b/src/autofit/afpic.h
index 21b0ff9..9a68b4a 100644
--- a/src/autofit/afpic.h
+++ b/src/autofit/afpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for autofit module. */
/* */
-/* Copyright 2009, 2011 by */
+/* Copyright 2009, 2011-2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,38 +24,67 @@ FT_BEGIN_HEADER
#include FT_INTERNAL_PIC_H
+
#ifndef FT_CONFIG_OPTION_PIC
-#define AF_SCRIPT_CLASSES_GET af_script_classes
-#define AF_AF_AUTOFITTER_SERVICE_GET af_autofitter_service
+#define AF_SERVICES_GET af_services
+#define AF_SERVICE_PROPERTIES_GET af_service_properties
+
+#define AF_WRITING_SYSTEM_CLASSES_GET af_writing_system_classes
+#define AF_SCRIPT_CLASSES_GET af_script_classes
+#define AF_STYLE_CLASSES_GET af_style_classes
+#define AF_INTERFACE_GET af_autofitter_interface
#else /* FT_CONFIG_OPTION_PIC */
+ /* some include files required for members of AFModulePIC */
+#include FT_SERVICE_PROPERTIES_H
+
#include "aftypes.h"
- /* increase these when you add new scripts, */
- /* and update autofit_module_class_pic_init */
-#ifdef FT_OPTION_AUTOFIT2
-#define AF_SCRIPT_CLASSES_COUNT 6
-#else
-#define AF_SCRIPT_CLASSES_COUNT 5
-#endif
-#define AF_SCRIPT_CLASSES_REC_COUNT ( AF_SCRIPT_CLASSES_COUNT - 1 )
- typedef struct AFModulePIC_
+ 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;
+ FT_ServiceDescRec* af_services;
+ FT_Service_PropertiesRec af_service_properties;
+
+ AF_WritingSystemClass af_writing_system_classes
+ [AF_WRITING_SYSTEM_MAX + 1];
+ AF_WritingSystemClassRec af_writing_system_classes_rec
+ [AF_WRITING_SYSTEM_MAX];
+
+ AF_ScriptClass af_script_classes
+ [AF_SCRIPT_MAX + 1];
+ AF_ScriptClassRec af_script_classes_rec
+ [AF_SCRIPT_MAX];
+
+ AF_StyleClass af_style_classes
+ [AF_STYLE_MAX + 1];
+ AF_StyleClassRec af_style_classes_rec
+ [AF_STYLE_MAX];
+
+ FT_AutoHinter_InterfaceRec af_autofitter_interface;
} AFModulePIC;
-#define GET_PIC( lib ) \
+
+#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 AF_SERVICES_GET \
+ ( GET_PIC( library )->af_services )
+#define AF_SERVICE_PROPERTIES_GET \
+ ( GET_PIC( library )->af_service_properties )
+
+#define AF_WRITING_SYSTEM_CLASSES_GET \
+ ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_writing_system_classes )
+#define AF_SCRIPT_CLASSES_GET \
+ ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_script_classes )
+#define AF_STYLE_CLASSES_GET \
+ ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_style_classes )
+#define AF_INTERFACE_GET \
+ ( GET_PIC( library )->af_autofitter_interface )
+
/* see afpic.c for the implementation */
void
diff --git a/src/autofit/afranges.c b/src/autofit/afranges.c
new file mode 100644
index 0000000..b2c504d
--- /dev/null
+++ b/src/autofit/afranges.c
@@ -0,0 +1,220 @@
+/***************************************************************************/
+/* */
+/* afranges.c */
+/* */
+/* Auto-fitter Unicode script ranges (body). */
+/* */
+/* Copyright 2013, 2014 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 "afranges.h"
+
+
+ const AF_Script_UniRangeRec af_cyrl_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0400UL, 0x04FFUL ), /* Cyrillic */
+ AF_UNIRANGE_REC( 0x0500UL, 0x052FUL ), /* Cyrillic Supplement */
+ AF_UNIRANGE_REC( 0x2DE0UL, 0x2DFFUL ), /* Cyrillic Extended-A */
+ AF_UNIRANGE_REC( 0xA640UL, 0xA69FUL ), /* Cyrillic Extended-B */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ /* there are some characters in the Devanagari Unicode block that are */
+ /* generic to Indic scripts; we omit them so that their presence doesn't */
+ /* trigger Devanagari */
+
+ const AF_Script_UniRangeRec af_deva_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0900UL, 0x093BUL ), /* Devanagari */
+ /* omitting U+093C nukta */
+ AF_UNIRANGE_REC( 0x093DUL, 0x0950UL ),
+ /* omitting U+0951 udatta, U+0952 anudatta */
+ AF_UNIRANGE_REC( 0x0953UL, 0x0963UL ),
+ /* omitting U+0964 danda, U+0965 double danda */
+ AF_UNIRANGE_REC( 0x0966UL, 0x097FUL ),
+ AF_UNIRANGE_REC( 0x20B9UL, 0x20B9UL ), /* (new) Rupee sign */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_grek_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0370UL, 0x03FFUL ), /* Greek and Coptic */
+ AF_UNIRANGE_REC( 0x1F00UL, 0x1FFFUL ), /* Greek Extended */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_hebr_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0590UL, 0x05FFUL ), /* Hebrew */
+ AF_UNIRANGE_REC( 0xFB1DUL, 0xFB4FUL ), /* Alphab. Present. Forms (Hebrew) */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_latn_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0020UL, 0x007FUL ), /* Basic Latin (no control chars) */
+ AF_UNIRANGE_REC( 0x00A0UL, 0x00FFUL ), /* Latin-1 Supplement (no control chars) */
+ AF_UNIRANGE_REC( 0x0100UL, 0x017FUL ), /* Latin Extended-A */
+ AF_UNIRANGE_REC( 0x0180UL, 0x024FUL ), /* Latin Extended-B */
+ AF_UNIRANGE_REC( 0x0250UL, 0x02AFUL ), /* IPA Extensions */
+ AF_UNIRANGE_REC( 0x02B0UL, 0x02FFUL ), /* Spacing Modifier Letters */
+ AF_UNIRANGE_REC( 0x0300UL, 0x036FUL ), /* Combining Diacritical Marks */
+ AF_UNIRANGE_REC( 0x1D00UL, 0x1D7FUL ), /* Phonetic Extensions */
+ AF_UNIRANGE_REC( 0x1D80UL, 0x1DBFUL ), /* Phonetic Extensions Supplement */
+ AF_UNIRANGE_REC( 0x1DC0UL, 0x1DFFUL ), /* Combining Diacritical Marks Supplement */
+ AF_UNIRANGE_REC( 0x1E00UL, 0x1EFFUL ), /* Latin Extended Additional */
+ AF_UNIRANGE_REC( 0x2000UL, 0x206FUL ), /* General Punctuation */
+ AF_UNIRANGE_REC( 0x2070UL, 0x209FUL ), /* Superscripts and Subscripts */
+ AF_UNIRANGE_REC( 0x20A0UL, 0x20B8UL ), /* Currency Symbols ... */
+ AF_UNIRANGE_REC( 0x20BAUL, 0x20CFUL ), /* ... except new Rupee sign */
+ AF_UNIRANGE_REC( 0x2150UL, 0x218FUL ), /* Number Forms */
+ AF_UNIRANGE_REC( 0x2460UL, 0x24FFUL ), /* Enclosed Alphanumerics */
+ AF_UNIRANGE_REC( 0x2C60UL, 0x2C7FUL ), /* Latin Extended-C */
+ AF_UNIRANGE_REC( 0x2E00UL, 0x2E7FUL ), /* Supplemental Punctuation */
+ AF_UNIRANGE_REC( 0xA720UL, 0xA7FFUL ), /* Latin Extended-D */
+ AF_UNIRANGE_REC( 0xFB00UL, 0xFB06UL ), /* Alphab. Present. Forms (Latin Ligs) */
+ AF_UNIRANGE_REC( 0x1D400UL, 0x1D7FFUL ), /* Mathematical Alphanumeric Symbols */
+ AF_UNIRANGE_REC( 0x1F100UL, 0x1F1FFUL ), /* Enclosed Alphanumeric Supplement */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_none_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_telu_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0C00UL, 0x0C7FUL ), /* Telugu */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+#ifdef AF_CONFIG_OPTION_INDIC
+
+ const AF_Script_UniRangeRec af_beng_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0980UL, 0x09FFUL ), /* Bengali */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_gujr_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0A80UL, 0x0AFFUL ), /* Gujarati */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_guru_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0A00UL, 0x0A7FUL ), /* Gurmukhi */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_knda_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0C80UL, 0x0CFFUL ), /* Kannada */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_limb_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1900UL, 0x194FUL ), /* Limbu */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_mlym_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0D00UL, 0x0D7FUL ), /* Malayalam */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_orya_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0B00UL, 0x0B7FUL ), /* Oriya */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_sinh_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0D80UL, 0x0DFFUL ), /* Sinhala */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_sund_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1B80UL, 0x1BBFUL ), /* Sundanese */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_sylo_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0xA800UL, 0xA82FUL ), /* Syloti Nagri */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_taml_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0B80UL, 0x0BFFUL ), /* Tamil */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+ const AF_Script_UniRangeRec af_tibt_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0F00UL, 0x0FFFUL ), /* Tibetan */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
+#endif /* !AF_CONFIG_OPTION_INDIC */
+
+#ifdef AF_CONFIG_OPTION_CJK
+
+ /* this corresponds to Unicode 6.0 */
+
+ const AF_Script_UniRangeRec af_hani_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x1100UL, 0x11FFUL ), /* Hangul Jamo */
+ 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 */
+ AF_UNIRANGE_REC( 0x3200UL, 0x32FFUL ), /* Enclosed CJK Letters and Months */
+ AF_UNIRANGE_REC( 0x3300UL, 0x33FFUL ), /* CJK Compatibility */
+ 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 )
+ };
+
+#endif /* !AF_CONFIG_OPTION_CJK */
+
+/* END */
diff --git a/src/autofit/afranges.h b/src/autofit/afranges.h
new file mode 100644
index 0000000..fe5b2aa
--- /dev/null
+++ b/src/autofit/afranges.h
@@ -0,0 +1,41 @@
+/***************************************************************************/
+/* */
+/* afranges.h */
+/* */
+/* Auto-fitter Unicode script ranges (specification). */
+/* */
+/* Copyright 2013, 2014 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 __AFRANGES_H__
+#define __AFRANGES_H__
+
+
+#include "aftypes.h"
+
+
+FT_BEGIN_HEADER
+
+#undef SCRIPT
+#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \
+ extern const AF_Script_UniRangeRec af_ ## s ## _uniranges[];
+
+#include "afscript.h"
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __AFRANGES_H__ */
+
+
+/* END */
diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h
new file mode 100644
index 0000000..efe8754
--- /dev/null
+++ b/src/autofit/afscript.h
@@ -0,0 +1,139 @@
+/***************************************************************************/
+/* */
+/* afscript.h */
+/* */
+/* Auto-fitter scripts (specification only). */
+/* */
+/* Copyright 2013, 2014 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. */
+/* */
+/***************************************************************************/
+
+
+ /* The following part can be included multiple times. */
+ /* Define `SCRIPT' as needed. */
+
+
+ /* Add new scripts here. The first and second arguments are the */
+ /* script name in lowercase and uppercase, respectively, followed */
+ /* by a description string. Then comes the corresponding HarfBuzz */
+ /* script name tag, followed by a string of standard characters (to */
+ /* derive the standard width and height of stems). */
+
+ SCRIPT( cyrl, CYRL,
+ "Cyrillic",
+ HB_SCRIPT_CYRILLIC,
+ 0x43E, 0x41E, 0x0 ) /* оО */
+
+ SCRIPT( deva, DEVA,
+ "Devanagari",
+ HB_SCRIPT_DEVANAGARI,
+ 0x920, 0x935, 0x91F ) /* ठ व ट */
+
+ SCRIPT( grek, GREK,
+ "Greek",
+ HB_SCRIPT_GREEK,
+ 0x3BF, 0x39F, 0x0 ) /* οΟ */
+
+ SCRIPT( hebr, HEBR,
+ "Hebrew",
+ HB_SCRIPT_HEBREW,
+ 0x5DD, 0x0, 0x0 ) /* × */
+
+ SCRIPT( latn, LATN,
+ "Latin",
+ HB_SCRIPT_LATIN,
+ 'o', 'O', '0' )
+
+ SCRIPT( none, NONE,
+ "no script",
+ HB_SCRIPT_INVALID,
+ 0x0, 0x0, 0x0 )
+
+ /* there are no simple forms for letters; we thus use two digit shapes */
+ SCRIPT( telu, TELU,
+ "Telugu",
+ HB_SCRIPT_TELUGU,
+ 0xC66, 0xC67, 0x0 ) /* ౦ ౧ */
+
+#ifdef AF_CONFIG_OPTION_INDIC
+
+ SCRIPT( beng, BENG,
+ "Bengali",
+ HB_SCRIPT_BENGALI,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( gujr, GUJR,
+ "Gujarati",
+ HB_SCRIPT_GUJARATI,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( guru, GURU,
+ "Gurmukhi",
+ HB_SCRIPT_GURMUKHI,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( knda, KNDA,
+ "Kannada",
+ HB_SCRIPT_KANNADA,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( limb, LIMB,
+ "Limbu",
+ HB_SCRIPT_LIMBU,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( mlym, MLYM,
+ "Malayalam",
+ HB_SCRIPT_MALAYALAM,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( orya, ORYA,
+ "Oriya",
+ HB_SCRIPT_ORIYA,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( sinh, SINH,
+ "Sinhala",
+ HB_SCRIPT_SINHALA,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( sund, SUND,
+ "Sundanese",
+ HB_SCRIPT_SUNDANESE,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( sylo, SYLO,
+ "Syloti Nagri",
+ HB_SCRIPT_SYLOTI_NAGRI,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( taml, TAML,
+ "Tamil",
+ HB_SCRIPT_TAMIL,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+ SCRIPT( tibt, TIBT,
+ "Tibetan",
+ HB_SCRIPT_TIBETAN,
+ 'o', 0x0, 0x0 ) /* XXX */
+
+#endif /* AF_CONFIG_OPTION_INDIC */
+
+#ifdef AF_CONFIG_OPTION_CJK
+
+ SCRIPT( hani, HANI,
+ "CJKV ideographs",
+ HB_SCRIPT_HAN,
+ 0x7530, 0x56D7, 0x0 ) /* ç”°å›— */
+
+#endif /* AF_CONFIG_OPTION_CJK */
+
+
+/* END */
diff --git a/src/autofit/afstyles.h b/src/autofit/afstyles.h
new file mode 100644
index 0000000..f14d354
--- /dev/null
+++ b/src/autofit/afstyles.h
@@ -0,0 +1,164 @@
+/***************************************************************************/
+/* */
+/* afstyles.h */
+/* */
+/* Auto-fitter styles (specification only). */
+/* */
+/* Copyright 2013, 2014 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. */
+/* */
+/***************************************************************************/
+
+
+ /* The following part can be included multiple times. */
+ /* Define `STYLE' as needed. */
+
+
+ /* Add new styles here. The first and second arguments are the */
+ /* style name in lowercase and uppercase, respectively, followed */
+ /* by a description string. The next arguments are the */
+ /* corresponding writing system, script, blue stringset, and */
+ /* coverage. */
+ /* */
+ /* Note that styles using `AF_COVERAGE_DEFAULT' should always */
+ /* come after styles with other coverages. */
+ /* */
+ /* Example: */
+ /* */
+ /* STYLE( cyrl_dflt, CYRL_DFLT, */
+ /* "Cyrillic default style", */
+ /* AF_WRITING_SYSTEM_LATIN, */
+ /* AF_SCRIPT_CYRL, */
+ /* AF_BLUE_STRINGSET_CYRL, */
+ /* AF_COVERAGE_DEFAULT ) */
+
+#undef STYLE_LATIN
+#define STYLE_LATIN( s, S, f, F, ds, df, C ) \
+ STYLE( s ## _ ## f, S ## _ ## F, \
+ ds " " df " style", \
+ AF_WRITING_SYSTEM_LATIN, \
+ AF_SCRIPT_ ## S, \
+ AF_BLUE_STRINGSET_ ## S, \
+ AF_COVERAGE_ ## C )
+
+#undef META_STYLE_LATIN
+#define META_STYLE_LATIN( s, S, ds ) \
+ STYLE_LATIN( s, S, c2cp, C2CP, ds, \
+ "petite capticals from capitals", \
+ PETITE_CAPITALS_FROM_CAPITALS ) \
+ STYLE_LATIN( s, S, c2sc, C2SC, ds, \
+ "small capticals from capitals", \
+ SMALL_CAPITALS_FROM_CAPITALS ) \
+ STYLE_LATIN( s, S, ordn, ORDN, ds, \
+ "ordinals", \
+ ORDINALS ) \
+ STYLE_LATIN( s, S, pcap, PCAP, ds, \
+ "petite capitals", \
+ PETITE_CAPITALS ) \
+ STYLE_LATIN( s, S, sinf, SINF, ds, \
+ "scientific inferiors", \
+ SCIENTIFIC_INFERIORS ) \
+ STYLE_LATIN( s, S, smcp, SMCP, ds, \
+ "small capitals", \
+ SMALL_CAPITALS ) \
+ STYLE_LATIN( s, S, subs, SUBS, ds, \
+ "subscript", \
+ SUBSCRIPT ) \
+ STYLE_LATIN( s, S, sups, SUPS, ds, \
+ "superscript", \
+ SUPERSCRIPT ) \
+ STYLE_LATIN( s, S, titl, TITL, ds, \
+ "titling", \
+ TITLING ) \
+ STYLE_LATIN( s, S, dflt, DFLT, ds, \
+ "default", \
+ DEFAULT )
+
+ META_STYLE_LATIN( cyrl, CYRL, "Cyrillic" )
+
+ META_STYLE_LATIN( grek, GREK, "Greek" )
+
+ STYLE( hebr_dflt, HEBR_DFLT,
+ "Hebrew default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_HEBR,
+ AF_BLUE_STRINGSET_HEBR,
+ AF_COVERAGE_DEFAULT )
+ META_STYLE_LATIN( latn, LATN, "Latin" )
+
+ STYLE( deva_dflt, DEVA_DFLT,
+ "Devanagari default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_DEVA,
+ AF_BLUE_STRINGSET_DEVA,
+ AF_COVERAGE_DEFAULT )
+
+#ifdef FT_OPTION_AUTOFIT2
+ STYLE( ltn2_dflt, LTN2_DFLT,
+ "Latin 2 default style",
+ AF_WRITING_SYSTEM_LATIN2,
+ AF_SCRIPT_LATN,
+ AF_BLUE_STRINGSET_LATN,
+ AF_COVERAGE_DEFAULT )
+#endif
+
+ STYLE( none_dflt, NONE_DFLT,
+ "no style",
+ AF_WRITING_SYSTEM_DUMMY,
+ AF_SCRIPT_NONE,
+ (AF_Blue_Stringset)0,
+ AF_COVERAGE_DEFAULT )
+
+ STYLE( telu_dflt, TELU_DFLT,
+ "Telugu default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_TELU,
+ AF_BLUE_STRINGSET_TELU,
+ AF_COVERAGE_DEFAULT )
+
+#ifdef AF_CONFIG_OPTION_INDIC
+
+ /* no blue stringset support for the Indic writing system yet */
+#undef STYLE_DEFAULT_INDIC
+#define STYLE_DEFAULT_INDIC( s, S, d ) \
+ STYLE( s ## _dflt, S ## _DFLT, \
+ d " default style", \
+ AF_WRITING_SYSTEM_INDIC, \
+ AF_SCRIPT_ ## S, \
+ (AF_Blue_Stringset)0, \
+ AF_COVERAGE_DEFAULT )
+
+ STYLE_DEFAULT_INDIC( beng, BENG, "Bengali" )
+ STYLE_DEFAULT_INDIC( gujr, GUJR, "Gujarati" )
+ STYLE_DEFAULT_INDIC( guru, GURU, "Gurmukhi" )
+ STYLE_DEFAULT_INDIC( knda, KNDA, "Kannada" )
+ STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" )
+ STYLE_DEFAULT_INDIC( mlym, MLYM, "Malayalam" )
+ STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" )
+ STYLE_DEFAULT_INDIC( sinh, SINH, "Sinhala" )
+ STYLE_DEFAULT_INDIC( sund, SUND, "Sundanese" )
+ STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" )
+ STYLE_DEFAULT_INDIC( taml, TAML, "Tamil" )
+ STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" )
+
+#endif /* AF_CONFIG_OPTION_INDIC */
+
+#ifdef AF_CONFIG_OPTION_CJK
+
+ STYLE( hani_dflt, HANI_DFLT,
+ "CJKV ideographs default style",
+ AF_WRITING_SYSTEM_CJK,
+ AF_SCRIPT_HANI,
+ AF_BLUE_STRINGSET_HANI,
+ AF_COVERAGE_DEFAULT )
+
+#endif /* AF_CONFIG_OPTION_CJK */
+
+
+/* END */
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index 21e442c..61badd1 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter types (specification only). */
/* */
-/* Copyright 2003-2009, 2011 by */
+/* Copyright 2003-2009, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,15 +20,12 @@
*
* The auto-fitter is a complete rewrite of the old auto-hinter.
* Its main feature is the ability to differentiate between different
- * scripts in order to apply language-specific rules.
+ * writing systems and scripts in order to apply specific rules.
*
* The code has also been compartmentized into several entities that
* should make algorithmic experimentation easier than with the old
* code.
*
- * Finally, we get rid of the Catharon license, since this code is
- * released under the FreeType one.
- *
*************************************************************************/
@@ -42,6 +39,8 @@
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
+#include "afblue.h"
+
FT_BEGIN_HEADER
@@ -87,8 +86,9 @@ extern void* _af_debug_hints;
FT_Pos* table );
FT_LOCAL( void )
- af_sort_widths( FT_UInt count,
- AF_Width widths );
+ af_sort_and_quantize_widths( FT_UInt* count,
+ AF_Width widths,
+ FT_Pos threshold );
/*************************************************************************/
@@ -197,87 +197,124 @@ extern void* _af_debug_hints;
(a)->y_delta == (b)->y_delta )
+ typedef struct AF_StyleMetricsRec_* AF_StyleMetrics;
+
+ /* This function parses an FT_Face to compute global metrics for
+ * a specific style.
+ */
+ typedef FT_Error
+ (*AF_WritingSystem_InitMetricsFunc)( AF_StyleMetrics metrics,
+ FT_Face face );
+
+ typedef void
+ (*AF_WritingSystem_ScaleMetricsFunc)( AF_StyleMetrics metrics,
+ AF_Scaler scaler );
+
+ typedef void
+ (*AF_WritingSystem_DoneMetricsFunc)( AF_StyleMetrics metrics );
+
+
+ typedef FT_Error
+ (*AF_WritingSystem_InitHintsFunc)( AF_GlyphHints hints,
+ AF_StyleMetrics metrics );
+
+ typedef void
+ (*AF_WritingSystem_ApplyHintsFunc)( AF_GlyphHints hints,
+ FT_Outline* outline,
+ AF_StyleMetrics metrics );
+
+
/*************************************************************************/
/*************************************************************************/
/***** *****/
- /***** S C R I P T S *****/
+ /***** W R I T I N G S Y S T E M S *****/
/***** *****/
/*************************************************************************/
/*************************************************************************/
/*
- * 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
- * script.
+ * For the auto-hinter, a writing system consists of multiple scripts that
+ * can be handled similarly *in a typographical way*; the relationship is
+ * not based on history. For example, both the Greek and the unrelated
+ * Armenian scripts share the same features like ascender, descender,
+ * x-height, etc. Essentially, a writing system is covered by a
+ * submodule of the auto-fitter; it contains
*
- * - A specific global analyzer that will compute global metrics
- * specific to the script.
+ * - a specific global analyzer that computes global metrics specific to
+ * the script (based on script-specific characters to identify ascender
+ * height, x-height, etc.),
*
- * - A specific glyph analyzer that will compute segments and
- * edges for each glyph covered by the script.
+ * - a specific glyph analyzer that computes segments and edges for each
+ * glyph covered by the script,
*
- * - A specific grid-fitting algorithm that will distort the
- * scaled glyph outline according to the results of the glyph
- * analyzer.
- *
- * Note that a given analyzer and/or grid-fitting algorithm can be
- * used by more than one script.
+ * - a specific grid-fitting algorithm that distorts the scaled glyph
+ * outline according to the results of the glyph analyzer.
*/
- typedef enum AF_Script_
+#define __AFWRTSYS_H__ /* don't load header files */
+#undef WRITING_SYSTEM
+#define WRITING_SYSTEM( ws, WS ) \
+ AF_WRITING_SYSTEM_ ## WS,
+
+ /* The list of known writing systems. */
+ typedef enum AF_WritingSystem_
{
- AF_SCRIPT_NONE = 0,
- AF_SCRIPT_LATIN = 1,
- AF_SCRIPT_CJK = 2,
- AF_SCRIPT_INDIC = 3,
-#ifdef FT_OPTION_AUTOFIT2
- AF_SCRIPT_LATIN2,
-#endif
- /* add new scripts here. Don't forget to update the list in */
- /* `afglobal.c'. */
+#include "afwrtsys.h"
- AF_SCRIPT_MAX /* do not remove */
+ AF_WRITING_SYSTEM_MAX /* do not remove */
- } AF_Script;
+ } AF_WritingSystem;
+#undef __AFWRTSYS_H__
- typedef struct AF_ScriptClassRec_ const* AF_ScriptClass;
- typedef struct AF_ScriptMetricsRec_
+ typedef struct AF_WritingSystemClassRec_
{
- AF_ScriptClass clazz;
- AF_ScalerRec scaler;
- FT_Bool digits_have_same_width;
+ AF_WritingSystem writing_system;
- } AF_ScriptMetricsRec, *AF_ScriptMetrics;
+ FT_Offset style_metrics_size;
+ AF_WritingSystem_InitMetricsFunc style_metrics_init;
+ AF_WritingSystem_ScaleMetricsFunc style_metrics_scale;
+ AF_WritingSystem_DoneMetricsFunc style_metrics_done;
+ AF_WritingSystem_InitHintsFunc style_hints_init;
+ AF_WritingSystem_ApplyHintsFunc style_hints_apply;
- /* This function parses an FT_Face to compute global metrics for
- * a specific script.
+ } AF_WritingSystemClassRec;
+
+ typedef const AF_WritingSystemClassRec* AF_WritingSystemClass;
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** S C R I P T S *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /*
+ * Each script is associated with a set of Unicode ranges that gets used
+ * to test whether the font face supports the script.
+ *
+ * We use four-letter script tags from the OpenType specification,
+ * extended by `NONE', which indicates `no script'.
*/
- typedef FT_Error
- (*AF_Script_InitMetricsFunc)( AF_ScriptMetrics metrics,
- FT_Face face );
- typedef void
- (*AF_Script_ScaleMetricsFunc)( AF_ScriptMetrics metrics,
- AF_Scaler scaler );
+#undef SCRIPT
+#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \
+ AF_SCRIPT_ ## S,
- typedef void
- (*AF_Script_DoneMetricsFunc)( AF_ScriptMetrics metrics );
+ /* The list of known scripts. */
+ typedef enum AF_Script_
+ {
+#include "afscript.h"
- typedef FT_Error
- (*AF_Script_InitHintsFunc)( AF_GlyphHints hints,
- AF_ScriptMetrics metrics );
+ AF_SCRIPT_MAX /* do not remove */
- typedef void
- (*AF_Script_ApplyHintsFunc)( AF_GlyphHints hints,
- FT_Outline* outline,
- AF_ScriptMetrics metrics );
+ } AF_Script;
typedef struct AF_Script_UniRangeRec_
@@ -289,72 +326,300 @@ extern void* _af_debug_hints;
#define AF_UNIRANGE_REC( a, b ) { (FT_UInt32)(a), (FT_UInt32)(b) }
- typedef const AF_Script_UniRangeRec *AF_Script_UniRange;
+ typedef const AF_Script_UniRangeRec* AF_Script_UniRange;
typedef struct AF_ScriptClassRec_
{
- AF_Script script;
- AF_Script_UniRange script_uni_ranges; /* last must be { 0, 0 } */
+ AF_Script script;
- FT_Offset script_metrics_size;
- AF_Script_InitMetricsFunc script_metrics_init;
- AF_Script_ScaleMetricsFunc script_metrics_scale;
- AF_Script_DoneMetricsFunc script_metrics_done;
+ AF_Script_UniRange script_uni_ranges; /* last must be { 0, 0 } */
- AF_Script_InitHintsFunc script_hints_init;
- AF_Script_ApplyHintsFunc script_hints_apply;
+ FT_UInt32 standard_char1; /* for default width and height */
+ FT_UInt32 standard_char2; /* ditto */
+ FT_UInt32 standard_char3; /* ditto */
} AF_ScriptClassRec;
+ typedef const AF_ScriptClassRec* AF_ScriptClass;
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** C O V E R A G E S *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /*
+ * Usually, a font contains more glyphs than can be addressed by its
+ * character map.
+ *
+ * In the PostScript font world, encoding vectors specific to a given
+ * task are used to select such glyphs, and these glyphs can be often
+ * recognized by having a suffix in its glyph names. For example, a
+ * superscript glyph `A' might be called `A.sup'. Unfortunately, this
+ * naming scheme is not standardized and thus unusable for us.
+ *
+ * In the OpenType world, a better solution was invented, namely
+ * `features', which cleanly separate a character's input encoding from
+ * the corresponding glyph's appearance, and which don't use glyph names
+ * at all. For our purposes, and slightly generalized, an OpenType
+ * feature is a name of a mapping that maps character codes to
+ * non-standard glyph indices (features get used for other things also).
+ * For example, the `sups' feature provides superscript glyphs, thus
+ * mapping character codes like `A' or `B' to superscript glyph
+ * representation forms. How this mapping happens is completely
+ * uninteresting to us.
+ *
+ * For the auto-hinter, a `coverage' represents all glyphs of an OpenType
+ * feature collected in a set (as listed below) that can be hinted
+ * together. To continue the above example, superscript glyphs must not
+ * be hinted together with normal glyphs because the blue zones
+ * completely differ.
+ *
+ * Note that FreeType itself doesn't compute coverages; it only provides
+ * the glyphs addressable by the default Unicode character map. Instead,
+ * we use the HarfBuzz library (if available), which has many functions
+ * exactly for this purpose.
+ *
+ * AF_COVERAGE_DEFAULT is special: It should cover everything that isn't
+ * listed separately (including the glyphs addressable by the character
+ * map). In case HarfBuzz isn't available, it exactly covers the glyphs
+ * addressable by the character map.
+ *
+ */
+
+#undef COVERAGE
+#define COVERAGE( name, NAME, description, \
+ tag1, tag2, tag3, tag4 ) \
+ AF_COVERAGE_ ## NAME,
+
+
+ typedef enum AF_Coverage_
+ {
+#include "afcover.h"
+
+ AF_COVERAGE_DEFAULT
+
+ } AF_Coverage;
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** S T Y L E S *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /*
+ * The topmost structure for modelling the auto-hinter glyph input data
+ * is a `style class', grouping everything together.
+ */
+
+#undef STYLE
+#define STYLE( s, S, d, ws, sc, ss, c ) \
+ AF_STYLE_ ## S,
+
+ /* The list of known styles. */
+ typedef enum AF_Style_
+ {
+
+#include "afstyles.h"
+
+ AF_STYLE_MAX /* do not remove */
+
+ } AF_Style;
+
+
+ typedef struct AF_StyleClassRec_
+ {
+ AF_Style style;
+
+ AF_WritingSystem writing_system;
+ AF_Script script;
+ AF_Blue_Stringset blue_stringset;
+ AF_Coverage coverage;
+
+ } AF_StyleClassRec;
+
+ typedef const AF_StyleClassRec* AF_StyleClass;
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** S T Y L E M E T R I C S *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ typedef struct AF_FaceGlobalsRec_* AF_FaceGlobals;
+
+ /* This is the main structure that combines everything. Autofit modules */
+ /* specific to writing systems derive their structures from it, for */
+ /* example `AF_LatinMetrics'. */
+
+ typedef struct AF_StyleMetricsRec_
+ {
+ AF_StyleClass style_class;
+ AF_ScalerRec scaler;
+ FT_Bool digits_have_same_width;
+
+ AF_FaceGlobals globals; /* to access properties */
+
+ } AF_StyleMetricsRec;
+
/* Declare and define vtables for classes */
#ifndef FT_CONFIG_OPTION_PIC
+#define AF_DECLARE_WRITING_SYSTEM_CLASS( writing_system_class ) \
+ FT_CALLBACK_TABLE const AF_WritingSystemClassRec \
+ writing_system_class;
+
+#define AF_DEFINE_WRITING_SYSTEM_CLASS( \
+ writing_system_class, \
+ system, \
+ m_size, \
+ m_init, \
+ m_scale, \
+ m_done, \
+ h_init, \
+ h_apply ) \
+ FT_CALLBACK_TABLE_DEF \
+ const AF_WritingSystemClassRec writing_system_class = \
+ { \
+ system, \
+ \
+ m_size, \
+ \
+ m_init, \
+ m_scale, \
+ m_done, \
+ \
+ h_init, \
+ h_apply \
+ };
+
+
#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, \
+ std_char1, \
+ std_char2, \
+ std_char3 ) \
+ FT_CALLBACK_TABLE_DEF \
+ const AF_ScriptClassRec script_class = \
+ { \
+ script, \
+ ranges, \
+ std_char1, \
+ std_char2, \
+ std_char3 \
+ };
+
+
+#define AF_DECLARE_STYLE_CLASS( style_class ) \
+ FT_CALLBACK_TABLE const AF_StyleClassRec \
+ style_class;
+
+#define AF_DEFINE_STYLE_CLASS( \
+ style_class, \
+ style, \
+ writing_system, \
+ script, \
+ blue_stringset, \
+ coverage ) \
+ FT_CALLBACK_TABLE_DEF \
+ const AF_StyleClassRec style_class = \
+ { \
+ style, \
+ writing_system, \
+ script, \
+ blue_stringset, \
+ coverage \
};
#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; \
+#define AF_DECLARE_WRITING_SYSTEM_CLASS( writing_system_class ) \
+ FT_LOCAL( void ) \
+ FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec* ac );
+
+#define AF_DEFINE_WRITING_SYSTEM_CLASS( \
+ writing_system_class, \
+ system, \
+ m_size, \
+ m_init, \
+ m_scale, \
+ m_done, \
+ h_init, \
+ h_apply ) \
+ FT_LOCAL_DEF( void ) \
+ FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec* ac ) \
+ { \
+ ac->writing_system = system; \
+ \
+ ac->style_metrics_size = m_size; \
+ \
+ ac->style_metrics_init = m_init; \
+ ac->style_metrics_scale = m_scale; \
+ ac->style_metrics_done = m_done; \
+ \
+ ac->style_hints_init = h_init; \
+ ac->style_hints_apply = h_apply; \
+ }
+
+
+#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, \
+ std_char1, \
+ std_char2, \
+ std_char3 ) \
+ FT_LOCAL_DEF( void ) \
+ FT_Init_Class_ ## script_class( AF_ScriptClassRec* ac ) \
+ { \
+ ac->script = script_; \
+ ac->script_uni_ranges = ranges; \
+ ac->standard_char1 = std_char1; \
+ ac->standard_char2 = std_char2; \
+ ac->standard_char3 = std_char3; \
+ }
+
+
+#define AF_DECLARE_STYLE_CLASS( style_class ) \
+ FT_LOCAL( void ) \
+ FT_Init_Class_ ## style_class( AF_StyleClassRec* ac );
+
+#define AF_DEFINE_STYLE_CLASS( \
+ style_class, \
+ style_, \
+ writing_system_, \
+ script_, \
+ blue_stringset_, \
+ coverage_ ) \
+ FT_LOCAL_DEF( void ) \
+ FT_Init_Class_ ## style_class( AF_StyleClassRec* ac ) \
+ { \
+ ac->style = style_; \
+ ac->writing_system = writing_system_; \
+ ac->script = script_; \
+ ac->blue_stringset = blue_stringset_; \
+ ac->coverage = coverage_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/src/autofit/afwrtsys.h b/src/autofit/afwrtsys.h
new file mode 100644
index 0000000..8aa2ed9
--- /dev/null
+++ b/src/autofit/afwrtsys.h
@@ -0,0 +1,52 @@
+/***************************************************************************/
+/* */
+/* afwrtsys.h */
+/* */
+/* Auto-fitter writing systems (specification only). */
+/* */
+/* Copyright 2013 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __AFWRTSYS_H__
+#define __AFWRTSYS_H__
+
+ /* Since preprocessor directives can't create other preprocessor */
+ /* directives, we have to include the header files manually. */
+
+#include "afdummy.h"
+#include "aflatin.h"
+#include "afcjk.h"
+#include "afindic.h"
+#ifdef FT_OPTION_AUTOFIT2
+#include "aflatin2.h"
+#endif
+
+#endif /* __AFWRTSYS_H__ */
+
+
+ /* The following part can be included multiple times. */
+ /* Define `WRITING_SYSTEM' as needed. */
+
+
+ /* Add new writing systems here. The arguments are the writing system */
+ /* name in lowercase and uppercase, respectively. */
+
+ WRITING_SYSTEM( dummy, DUMMY )
+ WRITING_SYSTEM( latin, LATIN )
+ WRITING_SYSTEM( cjk, CJK )
+ WRITING_SYSTEM( indic, INDIC )
+#ifdef FT_OPTION_AUTOFIT2
+ WRITING_SYSTEM( latin2, LATIN2 )
+#endif
+
+
+/* END */
diff --git a/src/autofit/autofit.c b/src/autofit/autofit.c
index 3883a0a..e2b9934 100644
--- a/src/autofit/autofit.c
+++ b/src/autofit/autofit.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter module (body). */
/* */
-/* Copyright 2003-2007, 2011 by */
+/* Copyright 2003-2007, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,9 +20,12 @@
#include <ft2build.h>
#include "afpic.c"
#include "afangles.c"
+#include "afblue.c"
#include "afglobal.c"
#include "afhints.c"
+#include "afranges.c"
+
#include "afdummy.c"
#include "aflatin.c"
#ifdef FT_OPTION_AUTOFIT2
@@ -31,6 +34,8 @@
#include "afcjk.c"
#include "afindic.c"
+#include "hbshim.c"
+
#include "afloader.c"
#include "afmodule.c"
diff --git a/src/autofit/hbshim.c b/src/autofit/hbshim.c
new file mode 100644
index 0000000..a705cef
--- /dev/null
+++ b/src/autofit/hbshim.c
@@ -0,0 +1,545 @@
+/***************************************************************************/
+/* */
+/* hbshim.c */
+/* */
+/* HarfBuzz interface for accessing OpenType features (body). */
+/* */
+/* Copyright 2013, 2014 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_FREETYPE_H
+#include "afglobal.h"
+#include "aftypes.h"
+#include "hbshim.h"
+
+#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
+
+
+ /*************************************************************************/
+ /* */
+ /* 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_afharfbuzz
+
+
+ /*
+ * We use `sets' (in the HarfBuzz sense, which comes quite near to the
+ * usual mathematical meaning) to manage both lookups and glyph indices.
+ *
+ * 1. For each coverage, collect lookup IDs in a set. Note that an
+ * auto-hinter `coverage' is represented by one `feature', and a
+ * feature consists of an arbitrary number of (font specific) `lookup's
+ * that actually do the mapping job. Please check the OpenType
+ * specification for more details on features and lookups.
+ *
+ * 2. Create glyph ID sets from the corresponding lookup sets.
+ *
+ * 3. The glyph set corresponding to AF_COVERAGE_DEFAULT is computed
+ * with all lookups specific to the OpenType script activated. It
+ * relies on the order of AF_DEFINE_STYLE_CLASS entries so that
+ * special coverages (like `oldstyle figures') don't get overwritten.
+ *
+ */
+
+
+ /* load coverage tags */
+#undef COVERAGE
+#define COVERAGE( name, NAME, description, \
+ tag1, tag2, tag3, tag4 ) \
+ static const hb_tag_t name ## _coverage[] = \
+ { \
+ HB_TAG( tag1, tag2, tag3, tag4 ), \
+ HB_TAG_NONE \
+ };
+
+
+#include "afcover.h"
+
+
+ /* define mapping between coverage tags and AF_Coverage */
+#undef COVERAGE
+#define COVERAGE( name, NAME, description, \
+ tag1, tag2, tag3, tag4 ) \
+ name ## _coverage,
+
+
+ static const hb_tag_t* coverages[] =
+ {
+#include "afcover.h"
+
+ NULL /* AF_COVERAGE_DEFAULT */
+ };
+
+
+ /* load HarfBuzz script tags */
+#undef SCRIPT
+#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) h,
+
+
+ static const hb_script_t scripts[] =
+ {
+#include "afscript.h"
+ };
+
+
+ FT_Error
+ af_get_coverage( AF_FaceGlobals globals,
+ AF_StyleClass style_class,
+ FT_Byte* gstyles )
+ {
+ hb_face_t* face;
+
+ hb_set_t* gsub_lookups; /* GSUB lookups for a given script */
+ hb_set_t* gsub_glyphs; /* glyphs covered by GSUB lookups */
+ hb_set_t* gpos_lookups; /* GPOS lookups for a given script */
+ hb_set_t* gpos_glyphs; /* glyphs covered by GPOS lookups */
+
+ hb_script_t script;
+ const hb_tag_t* coverage_tags;
+ hb_tag_t script_tags[] = { HB_TAG_NONE,
+ HB_TAG_NONE,
+ HB_TAG_NONE,
+ HB_TAG_NONE };
+
+ hb_codepoint_t idx;
+#ifdef FT_DEBUG_LEVEL_TRACE
+ int count;
+#endif
+
+
+ if ( !globals || !style_class || !gstyles )
+ return FT_THROW( Invalid_Argument );
+
+ face = hb_font_get_face( globals->hb_font );
+
+ gsub_lookups = hb_set_create();
+ gsub_glyphs = hb_set_create();
+ gpos_lookups = hb_set_create();
+ gpos_glyphs = hb_set_create();
+
+ coverage_tags = coverages[style_class->coverage];
+ script = scripts[style_class->script];
+
+ /* Convert a HarfBuzz script tag into the corresponding OpenType */
+ /* tag or tags -- some Indic scripts like Devanagari have an old */
+ /* and a new set of features. */
+ hb_ot_tags_from_script( script,
+ &script_tags[0],
+ &script_tags[1] );
+
+ /* `hb_ot_tags_from_script' usually returns HB_OT_TAG_DEFAULT_SCRIPT */
+ /* as the second tag. We change that to HB_TAG_NONE except for the */
+ /* default script. */
+ if ( style_class->script == globals->module->default_script &&
+ style_class->coverage == AF_COVERAGE_DEFAULT )
+ {
+ if ( script_tags[0] == HB_TAG_NONE )
+ script_tags[0] = HB_OT_TAG_DEFAULT_SCRIPT;
+ else
+ {
+ if ( script_tags[1] == HB_TAG_NONE )
+ script_tags[1] = HB_OT_TAG_DEFAULT_SCRIPT;
+ else if ( script_tags[1] != HB_OT_TAG_DEFAULT_SCRIPT )
+ script_tags[2] = HB_OT_TAG_DEFAULT_SCRIPT;
+ }
+ }
+ else
+ {
+ if ( script_tags[1] == HB_OT_TAG_DEFAULT_SCRIPT )
+ script_tags[1] = HB_TAG_NONE;
+ }
+
+ hb_ot_layout_collect_lookups( face,
+ HB_OT_TAG_GSUB,
+ script_tags,
+ NULL,
+ coverage_tags,
+ gsub_lookups );
+
+ if ( hb_set_is_empty( gsub_lookups ) )
+ goto Exit; /* nothing to do */
+
+ hb_ot_layout_collect_lookups( face,
+ HB_OT_TAG_GPOS,
+ script_tags,
+ NULL,
+ coverage_tags,
+ gpos_lookups );
+
+ FT_TRACE4(( "GSUB lookups (style `%s'):\n"
+ " ",
+ af_style_names[style_class->style] ));
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ count = 0;
+#endif
+
+ for ( idx = -1; hb_set_next( gsub_lookups, &idx ); )
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE4(( " %d", idx ));
+ count++;
+#endif
+
+ /* get output coverage of GSUB feature */
+ hb_ot_layout_lookup_collect_glyphs( face,
+ HB_OT_TAG_GSUB,
+ idx,
+ NULL,
+ NULL,
+ NULL,
+ gsub_glyphs );
+ }
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( !count )
+ FT_TRACE4(( " (none)" ));
+ FT_TRACE4(( "\n\n" ));
+#endif
+
+ FT_TRACE4(( "GPOS lookups (style `%s'):\n"
+ " ",
+ af_style_names[style_class->style] ));
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ count = 0;
+#endif
+
+ for ( idx = -1; hb_set_next( gpos_lookups, &idx ); )
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE4(( " %d", idx ));
+ count++;
+#endif
+
+ /* get input coverage of GPOS feature */
+ hb_ot_layout_lookup_collect_glyphs( face,
+ HB_OT_TAG_GPOS,
+ idx,
+ NULL,
+ gpos_glyphs,
+ NULL,
+ NULL );
+ }
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( !count )
+ FT_TRACE4(( " (none)" ));
+ FT_TRACE4(( "\n\n" ));
+#endif
+
+ /*
+ * We now check whether we can construct blue zones, using glyphs
+ * covered by the feature only. In case there is not a single zone
+ * (this is, not a single character is covered), we skip this coverage.
+ *
+ */
+ if ( style_class->coverage != AF_COVERAGE_DEFAULT )
+ {
+ AF_Blue_Stringset bss = style_class->blue_stringset;
+ const AF_Blue_StringRec* bs = &af_blue_stringsets[bss];
+
+ FT_Bool found = 0;
+
+
+ for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ )
+ {
+ const char* p = &af_blue_strings[bs->string];
+
+
+ while ( *p )
+ {
+ hb_codepoint_t ch;
+
+
+ GET_UTF8_CHAR( ch, p );
+
+ for ( idx = -1; hb_set_next( gsub_lookups, &idx ); )
+ {
+ hb_codepoint_t gidx = FT_Get_Char_Index( globals->face, ch );
+
+
+ if ( hb_ot_layout_lookup_would_substitute( face, idx,
+ &gidx, 1, 1 ) )
+ {
+ found = 1;
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !found )
+ {
+ FT_TRACE4(( " no blue characters found; style skipped\n" ));
+ goto Exit;
+ }
+ }
+
+ /*
+ * Various OpenType features might use the same glyphs at different
+ * vertical positions; for example, superscript and subscript glyphs
+ * could be the same. However, the auto-hinter is completely
+ * agnostic of OpenType features after the feature analysis has been
+ * completed: The engine then simply receives a glyph index and returns a
+ * hinted and usually rendered glyph.
+ *
+ * Consider the superscript feature of font `pala.ttf': Some of the
+ * glyphs are `real', this is, they have a zero vertical offset, but
+ * most of them are small caps glyphs shifted up to the superscript
+ * position (this is, the `sups' feature is present in both the GSUB and
+ * GPOS tables). The code for blue zones computation actually uses a
+ * feature's y offset so that the `real' glyphs get correct hints. But
+ * later on it is impossible to decide whether a glyph index belongs to,
+ * say, the small caps or superscript feature.
+ *
+ * For this reason, we don't assign a style to a glyph if the current
+ * feature covers the glyph in both the GSUB and the GPOS tables. This
+ * is quite a broad condition, assuming that
+ *
+ * (a) glyphs that get used in multiple features are present in a
+ * feature without vertical shift,
+ *
+ * and
+ *
+ * (b) a feature's GPOS data really moves the glyph vertically.
+ *
+ * Not fulfilling condition (a) makes a font larger; it would also
+ * reduce the number of glyphs that could be addressed directly without
+ * using OpenType features, so this assumption is rather strong.
+ *
+ * Condition (b) is much weaker, and there might be glyphs which get
+ * missed. However, the OpenType features we are going to handle are
+ * primarily located in GSUB, and HarfBuzz doesn't provide an API to
+ * directly get the necessary information from the GPOS table. A
+ * possible solution might be to directly parse the GPOS table to find
+ * out whether a glyph gets shifted vertically, but this is something I
+ * would like to avoid if not really necessary.
+ *
+ * Note that we don't follow this logic for the default coverage.
+ * Complex scripts like Devanagari have mandatory GPOS features to
+ * position many glyph elements, using mark-to-base or mark-to-ligature
+ * tables; the number of glyphs missed due to condition (b) would be far
+ * too large.
+ *
+ */
+ if ( style_class->coverage != AF_COVERAGE_DEFAULT )
+ hb_set_subtract( gsub_glyphs, gpos_glyphs );
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE4(( " glyphs without GPOS data (`*' means already assigned)" ));
+ count = 0;
+#endif
+
+ for ( idx = -1; hb_set_next( gsub_glyphs, &idx ); )
+ {
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( !( count % 10 ) )
+ FT_TRACE4(( "\n"
+ " " ));
+
+ FT_TRACE4(( " %d", idx ));
+ count++;
+#endif
+
+ /* glyph indices returned by `hb_ot_layout_lookup_collect_glyphs' */
+ /* can be arbitrary: some fonts use fake indices for processing */
+ /* internal to GSUB or GPOS, which is fully valid */
+ if ( idx >= (hb_codepoint_t)globals->glyph_count )
+ continue;
+
+ if ( gstyles[idx] == AF_STYLE_UNASSIGNED )
+ gstyles[idx] = (FT_Byte)style_class->style;
+#ifdef FT_DEBUG_LEVEL_TRACE
+ else
+ FT_TRACE4(( "*" ));
+#endif
+ }
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( !count )
+ FT_TRACE4(( "\n"
+ " (none)" ));
+ FT_TRACE4(( "\n\n" ));
+#endif
+
+ Exit:
+ hb_set_destroy( gsub_lookups );
+ hb_set_destroy( gsub_glyphs );
+ hb_set_destroy( gpos_lookups );
+ hb_set_destroy( gpos_glyphs );
+
+ return FT_Err_Ok;
+ }
+
+
+ /* construct HarfBuzz features */
+#undef COVERAGE
+#define COVERAGE( name, NAME, description, \
+ tag1, tag2, tag3, tag4 ) \
+ static const hb_feature_t name ## _feature[] = \
+ { \
+ { \
+ HB_TAG( tag1, tag2, tag3, tag4 ), \
+ 1, 0, (unsigned int)-1 \
+ } \
+ };
+
+
+#include "afcover.h"
+
+
+ /* define mapping between HarfBuzz features and AF_Coverage */
+#undef COVERAGE
+#define COVERAGE( name, NAME, description, \
+ tag1, tag2, tag3, tag4 ) \
+ name ## _feature,
+
+
+ static const hb_feature_t* features[] =
+ {
+#include "afcover.h"
+
+ NULL /* AF_COVERAGE_DEFAULT */
+ };
+
+
+ FT_Error
+ af_get_char_index( AF_StyleMetrics metrics,
+ FT_ULong charcode,
+ FT_ULong *codepoint,
+ FT_Long *y_offset )
+ {
+ AF_StyleClass style_class;
+
+ const hb_feature_t* feature;
+
+ FT_ULong in_idx, out_idx;
+
+
+ if ( !metrics )
+ return FT_THROW( Invalid_Argument );
+
+ in_idx = FT_Get_Char_Index( metrics->globals->face, charcode );
+
+ style_class = metrics->style_class;
+
+ feature = features[style_class->coverage];
+
+ if ( feature )
+ {
+ FT_UInt upem = metrics->globals->face->units_per_EM;
+
+ hb_font_t* font = metrics->globals->hb_font;
+ hb_buffer_t* buf = hb_buffer_create();
+
+ uint32_t c = (uint32_t)charcode;
+
+ hb_glyph_info_t* ginfo;
+ hb_glyph_position_t* gpos;
+ unsigned int gcount;
+
+
+ /* we shape at a size of units per EM; this means font units */
+ hb_font_set_scale( font, upem, upem );
+
+ /* XXX: is this sufficient for a single character of any script? */
+ hb_buffer_set_direction( buf, HB_DIRECTION_LTR );
+ hb_buffer_set_script( buf, scripts[style_class->script] );
+
+ /* we add one character to `buf' ... */
+ hb_buffer_add_utf32( buf, &c, 1, 0, 1 );
+
+ /* ... and apply one feature */
+ hb_shape( font, buf, feature, 1 );
+
+ ginfo = hb_buffer_get_glyph_infos( buf, &gcount );
+ gpos = hb_buffer_get_glyph_positions( buf, &gcount );
+
+ out_idx = ginfo[0].codepoint;
+
+ /* getting the same index indicates no substitution, */
+ /* which means that the glyph isn't available in the feature */
+ if ( in_idx == out_idx )
+ {
+ *codepoint = 0;
+ *y_offset = 0;
+ }
+ else
+ {
+ *codepoint = out_idx;
+ *y_offset = gpos[0].y_offset;
+ }
+
+ hb_buffer_destroy( buf );
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( gcount > 1 )
+ FT_TRACE1(( "af_get_char_index:"
+ " input character mapped to multiple glyphs\n" ));
+#endif
+ }
+ else
+ {
+ *codepoint = in_idx;
+ *y_offset = 0;
+ }
+
+ return FT_Err_Ok;
+ }
+
+
+#else /* !FT_CONFIG_OPTION_USE_HARFBUZZ */
+
+
+ FT_Error
+ af_get_coverage( AF_FaceGlobals globals,
+ AF_StyleClass style_class,
+ FT_Byte* gstyles )
+ {
+ FT_UNUSED( globals );
+ FT_UNUSED( style_class );
+ FT_UNUSED( gstyles );
+
+ return FT_Err_Ok;
+ }
+
+
+ FT_Error
+ af_get_char_index( AF_StyleMetrics metrics,
+ FT_ULong charcode,
+ FT_ULong *codepoint,
+ FT_Long *y_offset )
+ {
+ FT_Face face;
+
+
+ if ( !metrics )
+ return FT_THROW( Invalid_Argument );
+
+ face = metrics->globals->face;
+
+ *codepoint = FT_Get_Char_Index( face, charcode );
+ *y_offset = 0;
+
+ return FT_Err_Ok;
+ }
+
+
+#endif /* !FT_CONFIG_OPTION_USE_HARFBUZZ */
+
+
+/* END */
diff --git a/src/autofit/hbshim.h b/src/autofit/hbshim.h
new file mode 100644
index 0000000..02f1513
--- /dev/null
+++ b/src/autofit/hbshim.h
@@ -0,0 +1,56 @@
+/***************************************************************************/
+/* */
+/* hbshim.h */
+/* */
+/* HarfBuzz interface for accessing OpenType features (specification). */
+/* */
+/* Copyright 2013 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __HBSHIM_H__
+#define __HBSHIM_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
+
+#include <hb.h>
+#include <hb-ot.h>
+#include <hb-ft.h>
+
+#endif
+
+
+FT_BEGIN_HEADER
+
+ FT_Error
+ af_get_coverage( AF_FaceGlobals globals,
+ AF_StyleClass style_class,
+ FT_Byte* gstyles );
+
+ FT_Error
+ af_get_char_index( AF_StyleMetrics metrics,
+ FT_ULong charcode,
+ FT_ULong *codepoint,
+ FT_Long *y_offset );
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __HBSHIM_H__ */
+
+
+/* END */
diff --git a/src/autofit/rules.mk b/src/autofit/rules.mk
index b76bb79..658f04e 100644
--- a/src/autofit/rules.mk
+++ b/src/autofit/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2003, 2004, 2005, 2006, 2007, 2011 by
+# Copyright 2003-2007, 2011, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -26,6 +26,7 @@ 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)/afblue.c \
$(AUTOF_DIR)/afcjk.c \
$(AUTOF_DIR)/afdummy.c \
$(AUTOF_DIR)/afglobal.c \
@@ -35,13 +36,19 @@ AUTOF_DRV_SRC := $(AUTOF_DIR)/afangles.c \
$(AUTOF_DIR)/afloader.c \
$(AUTOF_DIR)/afmodule.c \
$(AUTOF_DIR)/afpic.c \
- $(AUTOF_DIR)/afwarp.c
+ $(AUTOF_DIR)/afranges.c \
+ $(AUTOF_DIR)/afwarp.c \
+ $(AUTOF_DIR)/hbshim.c
# AUTOF driver headers
#
AUTOF_DRV_H := $(AUTOF_DRV_SRC:%c=%h) \
+ $(AUTOF_DIR)/afcover.h \
$(AUTOF_DIR)/aferrors.h \
- $(AUTOF_DIR)/aftypes.h
+ $(AUTOF_DIR)/afscript.h \
+ $(AUTOF_DIR)/afstyles.h \
+ $(AUTOF_DIR)/aftypes.h \
+ $(AUTOF_DIR)/afwrtsys.h
# AUTOF driver object(s)
diff --git a/src/base/basepic.c b/src/base/basepic.c
index d754eb1..aeb6fd5 100644
--- a/src/base/basepic.c
+++ b/src/base/basepic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for base. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,14 +21,22 @@
#include FT_INTERNAL_OBJECTS_H
#include "basepic.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from ftglyph.c */
- void FT_Init_Class_ft_outline_glyph_class( FT_Glyph_Class* clazz );
- void FT_Init_Class_ft_bitmap_glyph_class( FT_Glyph_Class* clazz );
+ void
+ FT_Init_Class_ft_outline_glyph_class( FT_Glyph_Class* clazz );
+
+ void
+ FT_Init_Class_ft_bitmap_glyph_class( FT_Glyph_Class* clazz );
- /* forward declaration of PIC init function from ftrfork.c (not modularized) */
- void FT_Init_Table_raccess_guess_table( ft_raccess_guess_rec* record );
+#ifdef FT_CONFIG_OPTION_MAC_FONTS
+ /* forward declaration of PIC init function from ftrfork.c */
+ /* (not modularized) */
+ void
+ FT_Init_Table_ft_raccess_guess_table( ft_raccess_guess_rec* record );
+#endif
/* forward declaration of PIC init functions from ftinit.c */
FT_Error
@@ -37,14 +45,18 @@
void
ft_destroy_default_module_classes( FT_Library library );
+
void
ft_base_pic_free( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Memory memory = library->memory;
+ FT_Memory memory = library->memory;
+
+
if ( pic_container->base )
{
- /* Destroy default module classes (in case FT_Add_Default_Modules was used) */
+ /* destroy default module classes */
+ /* (in case FT_Add_Default_Modules was used) */
ft_destroy_default_module_classes( library );
FT_FREE( pic_container->base );
@@ -57,12 +69,13 @@
ft_base_pic_init( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- BasePIC* container;
- FT_Memory memory = library->memory;
+ FT_Error error = FT_Err_Ok;
+ BasePIC* container = NULL;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
- if ( FT_ALLOC ( container, sizeof ( *container ) ) )
+ if ( FT_ALLOC( container, sizeof ( *container ) ) )
return error;
FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->base = container;
@@ -72,21 +85,23 @@
if ( error )
goto Exit;
- /* initialize pointer table - this is how the module usually expects this data */
+ /* initialize pointer table - */
+ /* this is how the module usually expects this data */
FT_Init_Class_ft_outline_glyph_class(
&container->ft_outline_glyph_class );
FT_Init_Class_ft_bitmap_glyph_class(
&container->ft_bitmap_glyph_class );
- FT_Init_Table_raccess_guess_table(
- (ft_raccess_guess_rec*)&container->ft_raccess_guess_table);
+#ifdef FT_CONFIG_OPTION_MAC_FONTS
+ FT_Init_Table_ft_raccess_guess_table(
+ (ft_raccess_guess_rec*)&container->ft_raccess_guess_table );
+#endif
-Exit:
- if( error )
+ Exit:
+ if ( error )
ft_base_pic_free( library );
return error;
}
-
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/src/base/basepic.h b/src/base/basepic.h
index bf90bef..329d7c8 100644
--- a/src/base/basepic.h
+++ b/src/base/basepic.h
@@ -25,11 +25,13 @@ FT_BEGIN_HEADER
#include FT_INTERNAL_PIC_H
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class
-#define FT_BITMAP_GLYPH_CLASS_GET &ft_bitmap_glyph_class
-#define FT_DEFAULT_MODULES_GET ft_default_modules
+
+#define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class
+#define FT_BITMAP_GLYPH_CLASS_GET &ft_bitmap_glyph_class
+#define FT_DEFAULT_MODULES_GET ft_default_modules
+
#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
-#define FT_RACCESS_GUESS_TABLE_GET ft_raccess_guess_table
+#define FT_RACCESS_GUESS_TABLE_GET ft_raccess_guess_table
#endif
#else /* FT_CONFIG_OPTION_PIC */
@@ -41,25 +43,35 @@ FT_BEGIN_HEADER
#endif
- typedef struct BasePIC_
+ typedef struct BasePIC_
{
- FT_Module_Class** default_module_classes;
- FT_Glyph_Class ft_outline_glyph_class;
- FT_Glyph_Class ft_bitmap_glyph_class;
+ FT_Module_Class** default_module_classes;
+ FT_Glyph_Class ft_outline_glyph_class;
+ FT_Glyph_Class ft_bitmap_glyph_class;
+
#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
- ft_raccess_guess_rec ft_raccess_guess_table[FT_RACCESS_N_RULES];
+ ft_raccess_guess_rec ft_raccess_guess_table[FT_RACCESS_N_RULES];
#endif
+
} BasePIC;
-#define GET_PIC(lib) ((BasePIC*)((lib)->pic_container.base))
-#define FT_OUTLINE_GLYPH_CLASS_GET (&GET_PIC(library)->ft_outline_glyph_class)
-#define FT_BITMAP_GLYPH_CLASS_GET (&GET_PIC(library)->ft_bitmap_glyph_class)
-#define FT_DEFAULT_MODULES_GET (GET_PIC(library)->default_module_classes)
+
+#define GET_PIC( lib ) ( (BasePIC*)( (lib)->pic_container.base ) )
+
+#define FT_OUTLINE_GLYPH_CLASS_GET \
+ ( &GET_PIC( library )->ft_outline_glyph_class )
+#define FT_BITMAP_GLYPH_CLASS_GET \
+ ( &GET_PIC( library )->ft_bitmap_glyph_class )
+#define FT_DEFAULT_MODULES_GET \
+ ( GET_PIC( library )->default_module_classes )
+
#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
-#define FT_RACCESS_GUESS_TABLE_GET (GET_PIC(library)->ft_raccess_guess_table)
+#define FT_RACCESS_GUESS_TABLE_GET \
+ ( GET_PIC( library )->ft_raccess_guess_table )
#endif
- /* see basepic.c for the implementation. */
+
+ /* see basepic.c for the implementation */
void
ft_base_pic_free( FT_Library library );
@@ -67,7 +79,8 @@ FT_BEGIN_HEADER
ft_base_pic_init( FT_Library library );
#endif /* FT_CONFIG_OPTION_PIC */
- /* */
+
+ /* */
FT_END_HEADER
diff --git a/src/base/ftadvanc.c b/src/base/ftadvanc.c
index a8bb43d..18884ef 100644
--- a/src/base/ftadvanc.c
+++ b/src/base/ftadvanc.c
@@ -4,7 +4,7 @@
/* */
/* Quick computation of advance widths (body). */
/* */
-/* Copyright 2008, 2009, 2011 by */
+/* Copyright 2008, 2009, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,6 +17,8 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_ADVANCES_H
#include FT_INTERNAL_OBJECTS_H
@@ -35,7 +37,7 @@
return FT_Err_Ok;
if ( face->size == NULL )
- return FT_Err_Invalid_Size_Handle;
+ return FT_THROW( Invalid_Size_Handle );
if ( flags & FT_LOAD_VERTICAL_LAYOUT )
scale = face->size->metrics.y_scale;
@@ -76,10 +78,13 @@
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
+
+ if ( !padvance )
+ return FT_THROW( Invalid_Argument );
if ( gindex >= (FT_UInt)face->num_glyphs )
- return FT_Err_Invalid_Glyph_Index;
+ return FT_THROW( Invalid_Glyph_Index );
func = face->driver->clazz->get_advances;
if ( func && LOAD_ADVANCE_FAST_CHECK( flags ) )
@@ -91,7 +96,7 @@
if ( !error )
return _ft_face_scale_advances( face, padvance, 1, flags );
- if ( error != FT_ERROR_BASE( FT_Err_Unimplemented_Feature ) )
+ if ( FT_ERR_NEQ( error, Unimplemented_Feature ) )
return error;
}
@@ -114,12 +119,15 @@
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
+
+ if ( !padvances )
+ return FT_THROW( Invalid_Argument );
num = (FT_UInt)face->num_glyphs;
end = start + count;
if ( start >= num || end < start || end > num )
- return FT_Err_Invalid_Glyph_Index;
+ return FT_THROW( Invalid_Glyph_Index );
if ( count == 0 )
return FT_Err_Ok;
@@ -131,14 +139,14 @@
if ( !error )
return _ft_face_scale_advances( face, padvances, count, flags );
- if ( error != FT_ERROR_BASE( FT_Err_Unimplemented_Feature ) )
+ if ( FT_ERR_NEQ( error, Unimplemented_Feature ) )
return error;
}
error = FT_Err_Ok;
if ( flags & FT_ADVANCE_FLAG_FAST_ONLY )
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY;
for ( nn = 0; nn < count; nn++ )
diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c
index 4b8e911..f9a1751 100644
--- a/src/base/ftbbox.c
+++ b/src/base/ftbbox.c
@@ -4,7 +4,7 @@
/* */
/* FreeType bbox computation (body). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2006, 2010 by */
+/* Copyright 1996-2002, 2004, 2006, 2010, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -25,6 +25,8 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_BBOX_H
#include FT_IMAGE_H
#include FT_OUTLINE_H
@@ -40,16 +42,35 @@
} TBBox_Rec;
+#define FT_UPDATE_BBOX( p, bbox ) \
+ FT_BEGIN_STMNT \
+ if ( p->x < bbox.xMin ) \
+ bbox.xMin = p->x; \
+ if ( p->x > bbox.xMax ) \
+ bbox.xMax = p->x; \
+ if ( p->y < bbox.yMin ) \
+ bbox.yMin = p->y; \
+ if ( p->y > bbox.yMax ) \
+ bbox.yMax = p->y; \
+ FT_END_STMNT
+
+#define CHECK_X( p, bbox ) \
+ ( p->x < bbox.xMin || p->x > bbox.xMax )
+
+#define CHECK_Y( p, bbox ) \
+ ( p->y < bbox.yMin || p->y > bbox.yMax )
+
+
/*************************************************************************/
/* */
/* <Function> */
/* BBox_Move_To */
/* */
/* <Description> */
- /* This function is used as a `move_to' and `line_to' emitter during */
+ /* This function is used as a `move_to' emitter during */
/* FT_Outline_Decompose(). It simply records the destination point */
- /* in `user->last'; no further computations are necessary since we */
- /* use the cbox as the starting bbox which must be refined. */
+ /* in `user->last'. We also update bbox in case contour starts with */
+ /* an implicit `on' point. */
/* */
/* <Input> */
/* to :: A pointer to the destination vector. */
@@ -64,17 +85,42 @@
BBox_Move_To( FT_Vector* to,
TBBox_Rec* user )
{
+ FT_UPDATE_BBOX( to, user->bbox );
+
user->last = *to;
return 0;
}
-#define CHECK_X( p, bbox ) \
- ( p->x < bbox.xMin || p->x > bbox.xMax )
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* BBox_Line_To */
+ /* */
+ /* <Description> */
+ /* This function is used as a `line_to' emitter during */
+ /* FT_Outline_Decompose(). It simply records the destination point */
+ /* in `user->last'; no further computations are necessary because */
+ /* bbox already contains both explicit ends of the line segment. */
+ /* */
+ /* <Input> */
+ /* to :: A pointer to the destination vector. */
+ /* */
+ /* <InOut> */
+ /* user :: A pointer to the current walk context. */
+ /* */
+ /* <Return> */
+ /* Always 0. Needed for the interface only. */
+ /* */
+ static int
+ BBox_Line_To( FT_Vector* to,
+ TBBox_Rec* user )
+ {
+ user->last = *to;
-#define CHECK_Y( p, bbox ) \
- ( p->y < bbox.yMin || p->y > bbox.yMax )
+ return 0;
+ }
/*************************************************************************/
@@ -83,7 +129,7 @@
/* BBox_Conic_Check */
/* */
/* <Description> */
- /* Finds the extrema of a 1-dimensional conic Bezier curve and update */
+ /* Find the extrema of a 1-dimensional conic Bezier curve and update */
/* a bounding range. This version uses direct computation, as it */
/* doesn't need square roots. */
/* */
@@ -106,30 +152,19 @@
FT_Pos* min,
FT_Pos* max )
{
- if ( y1 <= y3 && y2 == y1 ) /* flat arc */
- goto Suite;
-
- if ( y1 < y3 )
- {
- if ( y2 >= y1 && y2 <= y3 ) /* ascending arc */
- goto Suite;
- }
- else
- {
- if ( y2 >= y3 && y2 <= y1 ) /* descending arc */
- {
- y2 = y1;
- y1 = y3;
- y3 = y2;
- goto Suite;
- }
- }
-
- y1 = y3 = y1 - FT_MulDiv( y2 - y1, y2 - y1, y1 - 2*y2 + y3 );
-
- Suite:
- if ( y1 < *min ) *min = y1;
- if ( y3 > *max ) *max = y3;
+ /* This function is only called when a control off-point is outside */
+ /* the bbox that contains all on-points. It finds a local extremum */
+ /* within the segment, equal to (y1*y3 - y2*y2)/(y1 - 2*y2 + y3). */
+ /* Or, offsetting from y2, we get */
+
+ y1 -= y2;
+ y3 -= y2;
+ y2 += FT_MulDiv( y1, y3, y1 + y3 );
+
+ if ( y2 < *min )
+ *min = y2;
+ if ( y2 > *max )
+ *max = y2;
}
@@ -164,8 +199,8 @@
FT_Vector* to,
TBBox_Rec* user )
{
- /* we don't need to check `to' since it is always an `on' point, thus */
- /* within the bbox */
+ /* in case `to' is implicit and not included in bbox yet */
+ FT_UPDATE_BBOX( to, user->bbox );
if ( CHECK_X( control, user->bbox ) )
BBox_Conic_Check( user->last.x,
@@ -193,9 +228,9 @@
/* BBox_Cubic_Check */
/* */
/* <Description> */
- /* Finds the extrema of a 1-dimensional cubic Bezier curve and */
- /* updates a bounding range. This version uses splitting because we */
- /* don't want to use square roots and extra accuracy. */
+ /* Find the extrema of a 1-dimensional cubic Bezier curve and */
+ /* update a bounding range. This version uses iterative splitting */
+ /* because it is faster than the exact solution with square roots. */
/* */
/* <Input> */
/* p1 :: The start coordinate. */
@@ -211,294 +246,117 @@
/* */
/* max :: The address of the current maximum. */
/* */
-
-#if 0
-
- static void
- BBox_Cubic_Check( FT_Pos p1,
- FT_Pos p2,
- FT_Pos p3,
- FT_Pos p4,
- FT_Pos* min,
- FT_Pos* max )
+ static FT_Pos
+ cubic_peak( FT_Pos q1,
+ FT_Pos q2,
+ FT_Pos q3,
+ FT_Pos q4 )
{
- FT_Pos stack[32*3 + 1], *arc;
-
-
- arc = stack;
-
- arc[0] = p1;
- arc[1] = p2;
- arc[2] = p3;
- arc[3] = p4;
-
- do
+ FT_Pos peak = 0;
+ FT_Int shift;
+
+ /* This function finds a peak of a cubic segment if it is above 0 */
+ /* using iterative bisection of the segment, or returns 0. */
+ /* The fixed-point arithmetic of bisection is inherently stable */
+ /* but may loose accuracy in the two lowest bits. To compensate, */
+ /* we upscale the segment if there is room. Large values may need */
+ /* to be downscaled to avoid overflows during bisection. */
+ /* It is called with either q2 or q3 positive, which is necessary */
+ /* for the peak to exist and avoids undefined FT_MSB. */
+
+ shift = 27 -
+ FT_MSB( FT_ABS( q1 ) | FT_ABS( q2 ) | FT_ABS( q3 ) | FT_ABS( q4 ) );
+
+ if ( shift > 0 )
{
- FT_Pos y1 = arc[0];
- FT_Pos y2 = arc[1];
- FT_Pos y3 = arc[2];
- FT_Pos y4 = arc[3];
-
+ /* upscaling too much just wastes time */
+ if ( shift > 2 )
+ shift = 2;
+
+ q1 <<= shift;
+ q2 <<= shift;
+ q3 <<= shift;
+ q4 <<= shift;
+ }
+ else
+ {
+ q1 >>= -shift;
+ q2 >>= -shift;
+ q3 >>= -shift;
+ q4 >>= -shift;
+ }
- if ( y1 == y4 )
+ /* for a peak to exist above 0, the cubic segment must have */
+ /* at least one of its control off-points above 0. */
+ while ( q2 > 0 || q3 > 0 )
+ {
+ /* determine which half contains the maximum and split */
+ if ( q1 + q2 > q3 + q4 ) /* first half */
{
- if ( y1 == y2 && y1 == y3 ) /* flat */
- goto Test;
+ q4 = q4 + q3;
+ q3 = q3 + q2;
+ q2 = q2 + q1;
+ q4 = q4 + q3;
+ q3 = q3 + q2;
+ q4 = ( q4 + q3 ) / 8;
+ q3 = q3 / 4;
+ q2 = q2 / 2;
}
- else if ( y1 < y4 )
+ else /* second half */
{
- if ( y2 >= y1 && y2 <= y4 && y3 >= y1 && y3 <= y4 ) /* ascending */
- goto Test;
+ q1 = q1 + q2;
+ q2 = q2 + q3;
+ q3 = q3 + q4;
+ q1 = q1 + q2;
+ q2 = q2 + q3;
+ q1 = ( q1 + q2 ) / 8;
+ q2 = q2 / 4;
+ q3 = q3 / 2;
}
- else
+
+ /* check whether either end reached the maximum */
+ if ( q1 == q2 && q1 >= q3 )
{
- if ( y2 >= y4 && y2 <= y1 && y3 >= y4 && y3 <= y1 ) /* descending */
- {
- y2 = y1;
- y1 = y4;
- y4 = y2;
- goto Test;
- }
+ peak = q1;
+ break;
}
+ if ( q3 == q4 && q2 <= q4 )
+ {
+ peak = q4;
+ break;
+ }
+ }
- /* unknown direction -- split the arc in two */
- arc[6] = y4;
- arc[1] = y1 = ( y1 + y2 ) / 2;
- arc[5] = y4 = ( y4 + y3 ) / 2;
- y2 = ( y2 + y3 ) / 2;
- arc[2] = y1 = ( y1 + y2 ) / 2;
- arc[4] = y4 = ( y4 + y2 ) / 2;
- arc[3] = ( y1 + y4 ) / 2;
-
- arc += 3;
- goto Suite;
-
- Test:
- if ( y1 < *min ) *min = y1;
- if ( y4 > *max ) *max = y4;
- arc -= 3;
-
- Suite:
- ;
- } while ( arc >= stack );
- }
-
-#else
-
- static void
- test_cubic_extrema( FT_Pos y1,
- FT_Pos y2,
- FT_Pos y3,
- FT_Pos y4,
- FT_Fixed u,
- FT_Pos* min,
- FT_Pos* max )
- {
- /* FT_Pos a = y4 - 3*y3 + 3*y2 - y1; */
- FT_Pos b = y3 - 2*y2 + y1;
- FT_Pos c = y2 - y1;
- FT_Pos d = y1;
- FT_Pos y;
- FT_Fixed uu;
-
- FT_UNUSED ( y4 );
-
-
- /* The polynomial is */
- /* */
- /* P(x) = a*x^3 + 3b*x^2 + 3c*x + d , */
- /* */
- /* dP/dx = 3a*x^2 + 6b*x + 3c . */
- /* */
- /* However, we also have */
- /* */
- /* dP/dx(u) = 0 , */
- /* */
- /* which implies by subtraction that */
- /* */
- /* P(u) = b*u^2 + 2c*u + d . */
-
- if ( u > 0 && u < 0x10000L )
- {
- uu = FT_MulFix( u, u );
- y = d + FT_MulFix( c, 2*u ) + FT_MulFix( b, uu );
+ if ( shift > 0 )
+ peak >>= shift;
+ else
+ peak <<= -shift;
- if ( y < *min ) *min = y;
- if ( y > *max ) *max = y;
- }
+ return peak;
}
static void
- BBox_Cubic_Check( FT_Pos y1,
- FT_Pos y2,
- FT_Pos y3,
- FT_Pos y4,
+ BBox_Cubic_Check( FT_Pos p1,
+ FT_Pos p2,
+ FT_Pos p3,
+ FT_Pos p4,
FT_Pos* min,
FT_Pos* max )
{
- /* always compare first and last points */
- if ( y1 < *min ) *min = y1;
- else if ( y1 > *max ) *max = y1;
+ /* This function is only called when a control off-point is outside */
+ /* the bbox that contains all on-points. So at least one of the */
+ /* conditions below holds and cubic_peak is called with at least one */
+ /* non-zero argument. */
- if ( y4 < *min ) *min = y4;
- else if ( y4 > *max ) *max = y4;
+ if ( p2 > *max || p3 > *max )
+ *max += cubic_peak( p1 - *max, p2 - *max, p3 - *max, p4 - *max );
- /* now, try to see if there are split points here */
- if ( y1 <= y4 )
- {
- /* flat or ascending arc test */
- if ( y1 <= y2 && y2 <= y4 && y1 <= y3 && y3 <= y4 )
- return;
- }
- else /* y1 > y4 */
- {
- /* descending arc test */
- if ( y1 >= y2 && y2 >= y4 && y1 >= y3 && y3 >= y4 )
- return;
- }
-
- /* There are some split points. Find them. */
- {
- FT_Pos a = y4 - 3*y3 + 3*y2 - y1;
- FT_Pos b = y3 - 2*y2 + y1;
- FT_Pos c = y2 - y1;
- FT_Pos d;
- FT_Fixed t;
-
-
- /* We need to solve `ax^2+2bx+c' here, without floating points! */
- /* The trick is to normalize to a different representation in order */
- /* to use our 16.16 fixed point routines. */
- /* */
- /* We compute FT_MulFix(b,b) and FT_MulFix(a,c) after normalization. */
- /* These values must fit into a single 16.16 value. */
- /* */
- /* We normalize a, b, and c to `8.16' fixed float values to ensure */
- /* that its product is held in a `16.16' value. */
-
- {
- FT_ULong t1, t2;
- int shift = 0;
-
-
- /* The following computation is based on the fact that for */
- /* any value `y', if `n' is the position of the most */
- /* significant bit of `abs(y)' (starting from 0 for the */
- /* least significant bit), then `y' is in the range */
- /* */
- /* -2^n..2^n-1 */
- /* */
- /* We want to shift `a', `b', and `c' concurrently in order */
- /* to ensure that they all fit in 8.16 values, which maps */
- /* to the integer range `-2^23..2^23-1'. */
- /* */
- /* Necessarily, we need to shift `a', `b', and `c' so that */
- /* the most significant bit of its absolute values is at */
- /* _most_ at position 23. */
- /* */
- /* We begin by computing `t1' as the bitwise `OR' of the */
- /* absolute values of `a', `b', `c'. */
-
- t1 = (FT_ULong)( ( a >= 0 ) ? a : -a );
- t2 = (FT_ULong)( ( b >= 0 ) ? b : -b );
- t1 |= t2;
- t2 = (FT_ULong)( ( c >= 0 ) ? c : -c );
- t1 |= t2;
-
- /* Now we can be sure that the most significant bit of `t1' */
- /* is the most significant bit of either `a', `b', or `c', */
- /* depending on the greatest integer range of the particular */
- /* variable. */
- /* */
- /* Next, we compute the `shift', by shifting `t1' as many */
- /* times as necessary to move its MSB to position 23. This */
- /* corresponds to a value of `t1' that is in the range */
- /* 0x40_0000..0x7F_FFFF. */
- /* */
- /* Finally, we shift `a', `b', and `c' by the same amount. */
- /* This ensures that all values are now in the range */
- /* -2^23..2^23, i.e., they are now expressed as 8.16 */
- /* fixed-float numbers. This also means that we are using */
- /* 24 bits of precision to compute the zeros, independently */
- /* of the range of the original polynomial coefficients. */
- /* */
- /* This algorithm should ensure reasonably accurate values */
- /* for the zeros. Note that they are only expressed with */
- /* 16 bits when computing the extrema (the zeros need to */
- /* be in 0..1 exclusive to be considered part of the arc). */
-
- if ( t1 == 0 ) /* all coefficients are 0! */
- return;
-
- if ( t1 > 0x7FFFFFUL )
- {
- do
- {
- shift++;
- t1 >>= 1;
-
- } while ( t1 > 0x7FFFFFUL );
-
- /* this loses some bits of precision, but we use 24 of them */
- /* for the computation anyway */
- a >>= shift;
- b >>= shift;
- c >>= shift;
- }
- else if ( t1 < 0x400000UL )
- {
- do
- {
- shift++;
- t1 <<= 1;
-
- } while ( t1 < 0x400000UL );
-
- a <<= shift;
- b <<= shift;
- c <<= shift;
- }
- }
-
- /* handle a == 0 */
- if ( a == 0 )
- {
- if ( b != 0 )
- {
- t = - FT_DivFix( c, b ) / 2;
- test_cubic_extrema( y1, y2, y3, y4, t, min, max );
- }
- }
- else
- {
- /* solve the equation now */
- d = FT_MulFix( b, b ) - FT_MulFix( a, c );
- if ( d < 0 )
- return;
-
- if ( d == 0 )
- {
- /* there is a single split point at -b/a */
- t = - FT_DivFix( b, a );
- test_cubic_extrema( y1, y2, y3, y4, t, min, max );
- }
- else
- {
- /* there are two solutions; we need to filter them */
- d = FT_SqrtFixed( (FT_Int32)d );
- t = - FT_DivFix( b - d, a );
- test_cubic_extrema( y1, y2, y3, y4, t, min, max );
-
- t = - FT_DivFix( b + d, a );
- test_cubic_extrema( y1, y2, y3, y4, t, min, max );
- }
- }
- }
+ /* now flip the signs to update the minimum */
+ if ( p2 < *min || p3 < *min )
+ *min -= cubic_peak( *min - p1, *min - p2, *min - p3, *min - p4 );
}
-#endif
-
/*************************************************************************/
/* */
@@ -534,8 +392,9 @@
FT_Vector* to,
TBBox_Rec* user )
{
- /* we don't need to check `to' since it is always an `on' point, thus */
- /* within the bbox */
+ /* We don't need to check `to' since it is always an on-point, */
+ /* thus within the bbox. Only segments with an off-point outside */
+ /* the bbox can possibly reach new extreme values. */
if ( CHECK_X( control1, user->bbox ) ||
CHECK_X( control2, user->bbox ) )
@@ -560,31 +419,35 @@
return 0;
}
-FT_DEFINE_OUTLINE_FUNCS(bbox_interface,
+
+ FT_DEFINE_OUTLINE_FUNCS(bbox_interface,
(FT_Outline_MoveTo_Func) BBox_Move_To,
- (FT_Outline_LineTo_Func) BBox_Move_To,
+ (FT_Outline_LineTo_Func) BBox_Line_To,
(FT_Outline_ConicTo_Func)BBox_Conic_To,
(FT_Outline_CubicTo_Func)BBox_Cubic_To,
0, 0
)
+
/* documentation is in ftbbox.h */
FT_EXPORT_DEF( FT_Error )
FT_Outline_Get_BBox( FT_Outline* outline,
FT_BBox *abbox )
{
- FT_BBox cbox;
- FT_BBox bbox;
+ FT_BBox cbox = { 0x7FFFFFFFL, 0x7FFFFFFFL,
+ -0x7FFFFFFFL, -0x7FFFFFFFL };
+ FT_BBox bbox = { 0x7FFFFFFFL, 0x7FFFFFFFL,
+ -0x7FFFFFFFL, -0x7FFFFFFFL };
FT_Vector* vec;
FT_UShort n;
if ( !abbox )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( !outline )
- return FT_Err_Invalid_Outline;
+ return FT_THROW( Invalid_Outline );
/* if outline is empty, return (0,0,0,0) */
if ( outline->n_points == 0 || outline->n_contours <= 0 )
@@ -599,32 +462,13 @@ FT_DEFINE_OUTLINE_FUNCS(bbox_interface,
/* coincide, we exit immediately. */
vec = outline->points;
- bbox.xMin = bbox.xMax = cbox.xMin = cbox.xMax = vec->x;
- bbox.yMin = bbox.yMax = cbox.yMin = cbox.yMax = vec->y;
- vec++;
- for ( n = 1; n < outline->n_points; n++ )
+ for ( n = 0; n < outline->n_points; n++ )
{
- FT_Pos x = vec->x;
- FT_Pos y = vec->y;
-
-
- /* update control box */
- if ( x < cbox.xMin ) cbox.xMin = x;
- if ( x > cbox.xMax ) cbox.xMax = x;
-
- if ( y < cbox.yMin ) cbox.yMin = y;
- if ( y > cbox.yMax ) cbox.yMax = y;
+ FT_UPDATE_BBOX( vec, cbox);
if ( FT_CURVE_TAG( outline->tags[n] ) == FT_CURVE_TAG_ON )
- {
- /* update bbox for `on' points only */
- if ( x < bbox.xMin ) bbox.xMin = x;
- if ( x > bbox.xMax ) bbox.xMax = x;
-
- if ( y < bbox.yMin ) bbox.yMin = y;
- if ( y > bbox.yMax ) bbox.yMax = y;
- }
+ FT_UPDATE_BBOX( vec, bbox);
vec++;
}
diff --git a/src/base/ftbdf.c b/src/base/ftbdf.c
index d29adf0..d9dcbad 100644
--- a/src/base/ftbdf.c
+++ b/src/base/ftbdf.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (body). */
/* */
-/* Copyright 2002, 2003, 2004 by */
+/* Copyright 2002-2004, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,6 +17,8 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_BDF_H
@@ -32,19 +34,18 @@
const char* encoding = NULL;
const char* registry = NULL;
+ FT_Service_BDF service;
- error = FT_Err_Invalid_Argument;
-
- if ( face )
- {
- FT_Service_BDF service;
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
- FT_FACE_FIND_SERVICE( face, service, BDF );
+ FT_FACE_FIND_SERVICE( face, service, BDF );
- if ( service && service->get_charset_id )
- error = service->get_charset_id( face, &encoding, &registry );
- }
+ if ( service && service->get_charset_id )
+ error = service->get_charset_id( face, &encoding, &registry );
+ else
+ error = FT_THROW( Invalid_Argument );
if ( acharset_encoding )
*acharset_encoding = encoding;
@@ -65,23 +66,25 @@
{
FT_Error error;
+ FT_Service_BDF service;
- error = FT_Err_Invalid_Argument;
- aproperty->type = BDF_PROPERTY_TYPE_NONE;
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
- if ( face )
- {
- FT_Service_BDF service;
+ if ( !aproperty )
+ return FT_THROW( Invalid_Argument );
+ aproperty->type = BDF_PROPERTY_TYPE_NONE;
- FT_FACE_FIND_SERVICE( face, service, BDF );
+ FT_FACE_FIND_SERVICE( face, service, BDF );
- if ( service && service->get_property )
- error = service->get_property( face, prop_name, aproperty );
- }
+ if ( service && service->get_property )
+ error = service->get_property( face, prop_name, aproperty );
+ else
+ error = FT_THROW( Invalid_Argument );
- return error;
+ return error;
}
diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c
index 84fa322..19a1a80 100644
--- a/src/base/ftbitmap.c
+++ b/src/base/ftbitmap.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility functions for bitmaps (body). */
/* */
-/* Copyright 2004-2009, 2011 by */
+/* Copyright 2004-2009, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,6 +17,8 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_BITMAP_H
#include FT_IMAGE_H
#include FT_INTERNAL_OBJECTS_H
@@ -31,7 +33,8 @@
FT_EXPORT_DEF( void )
FT_Bitmap_New( FT_Bitmap *abitmap )
{
- *abitmap = null_bitmap;
+ if ( abitmap )
+ *abitmap = null_bitmap;
}
@@ -42,25 +45,42 @@
const FT_Bitmap *source,
FT_Bitmap *target)
{
- FT_Memory memory = library->memory;
+ FT_Memory memory;
FT_Error error = FT_Err_Ok;
- FT_Int pitch = source->pitch;
- FT_ULong size;
+
+ FT_Int pitch;
+ FT_ULong size;
+
+ FT_Int source_pitch_sign, target_pitch_sign;
+ if ( !library )
+ return FT_THROW( Invalid_Library_Handle );
+
+ if ( !source || !target )
+ return FT_THROW( Invalid_Argument );
+
if ( source == target )
return FT_Err_Ok;
+ source_pitch_sign = source->pitch < 0 ? -1 : 1;
+ target_pitch_sign = target->pitch < 0 ? -1 : 1;
+
if ( source->buffer == NULL )
{
*target = *source;
+ if ( source_pitch_sign != target_pitch_sign )
+ target->pitch = -target->pitch;
return FT_Err_Ok;
}
+ memory = library->memory;
+ pitch = source->pitch;
+
if ( pitch < 0 )
pitch = -pitch;
- size = (FT_ULong)( pitch * source->rows );
+ size = (FT_ULong)pitch * source->rows;
if ( target->buffer )
{
@@ -68,9 +88,9 @@
FT_ULong target_size;
- if ( target_pitch < 0 )
+ if ( target_pitch < 0 )
target_pitch = -target_pitch;
- target_size = (FT_ULong)( target_pitch * target->rows );
+ target_size = (FT_ULong)target_pitch * target->rows;
if ( target_size != size )
(void)FT_QREALLOC( target->buffer, target_size, size );
@@ -87,13 +107,35 @@
*target = *source;
target->buffer = p;
- FT_MEM_COPY( target->buffer, source->buffer, size );
+ if ( source_pitch_sign == target_pitch_sign )
+ FT_MEM_COPY( target->buffer, source->buffer, size );
+ else
+ {
+ /* take care of bitmap flow */
+ FT_UInt i;
+ FT_Byte* s = source->buffer;
+ FT_Byte* t = target->buffer;
+
+
+ t += pitch * ( target->rows - 1 );
+
+ for ( i = target->rows; i > 0; i-- )
+ {
+ FT_ARRAY_COPY( t, s, pitch );
+
+ s += pitch;
+ t -= pitch;
+ }
+ }
}
return error;
}
+ /* Enlarge `bitmap' horizontally and vertically by `xpixels' */
+ /* and `ypixels', respectively. */
+
static FT_Error
ft_bitmap_assure_buffer( FT_Memory memory,
FT_Bitmap* bitmap,
@@ -104,7 +146,7 @@
int pitch;
int new_pitch;
FT_UInt bpp;
- FT_Int i, width, height;
+ FT_UInt i, width, height;
unsigned char* buffer = NULL;
@@ -135,24 +177,24 @@
new_pitch = ( width + xpixels );
break;
default:
- return FT_Err_Invalid_Glyph_Format;
+ return FT_THROW( Invalid_Glyph_Format );
}
/* if no need to allocate memory */
if ( ypixels == 0 && new_pitch <= pitch )
{
/* zero the padding */
- FT_Int bit_width = pitch * 8;
- FT_Int bit_last = ( width + xpixels ) * bpp;
+ FT_UInt bit_width = pitch * 8;
+ FT_UInt bit_last = ( width + xpixels ) * bpp;
if ( bit_last < bit_width )
{
FT_Byte* line = bitmap->buffer + ( bit_last >> 3 );
FT_Byte* end = bitmap->buffer + pitch;
- FT_Int shift = bit_last & 7;
+ FT_UInt shift = bit_last & 7;
FT_UInt mask = 0xFF00U >> shift;
- FT_Int count = height;
+ FT_UInt count = height;
for ( ; count > 0; count--, line += pitch, end += pitch )
@@ -166,19 +208,22 @@
write++;
}
if ( write < end )
- FT_MEM_ZERO( write, end-write );
+ FT_MEM_ZERO( write, end - write );
}
}
return FT_Err_Ok;
}
+ /* otherwise allocate new buffer */
if ( FT_QALLOC_MULT( buffer, new_pitch, bitmap->rows + ypixels ) )
return error;
+ /* new rows get added at the top of the bitmap, */
+ /* thus take care of the flow direction */
if ( bitmap->pitch > 0 )
{
- FT_Int len = ( width * bpp + 7 ) >> 3;
+ FT_UInt len = ( width * bpp + 7 ) >> 3;
for ( i = 0; i < bitmap->rows; i++ )
@@ -187,7 +232,7 @@
}
else
{
- FT_Int len = ( width * bpp + 7 ) >> 3;
+ FT_UInt len = ( width * bpp + 7 ) >> 3;
for ( i = 0; i < bitmap->rows; i++ )
@@ -218,19 +263,20 @@
{
FT_Error error;
unsigned char* p;
- FT_Int i, x, y, pitch;
+ FT_Int i, x, pitch;
+ FT_UInt y;
FT_Int xstr, ystr;
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
if ( !bitmap || !bitmap->buffer )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( ( ( FT_PIX_ROUND( xStrength ) >> 6 ) > FT_INT_MAX ) ||
( ( FT_PIX_ROUND( yStrength ) >> 6 ) > FT_INT_MAX ) )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
xstr = (FT_Int)FT_PIX_ROUND( xStrength ) >> 6;
ystr = (FT_Int)FT_PIX_ROUND( yStrength ) >> 6;
@@ -238,7 +284,7 @@
if ( xstr == 0 && ystr == 0 )
return FT_Err_Ok;
else if ( xstr < 0 || ystr < 0 )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
switch ( bitmap->pixel_mode )
{
@@ -246,17 +292,11 @@
case FT_PIXEL_MODE_GRAY4:
{
FT_Bitmap tmp;
- FT_Int align;
-
- if ( bitmap->pixel_mode == FT_PIXEL_MODE_GRAY2 )
- align = ( bitmap->width + xstr + 3 ) / 4;
- else
- align = ( bitmap->width + xstr + 1 ) / 2;
+ /* convert to 8bpp */
FT_Bitmap_New( &tmp );
-
- error = FT_Bitmap_Convert( library, bitmap, &tmp, align );
+ error = FT_Bitmap_Convert( library, bitmap, &tmp, 1 );
if ( error )
return error;
@@ -277,12 +317,17 @@
case FT_PIXEL_MODE_LCD_V:
ystr *= 3;
break;
+
+ case FT_PIXEL_MODE_BGRA:
+ /* We don't embolden color glyphs. */
+ return FT_Err_Ok;
}
error = ft_bitmap_assure_buffer( library->memory, bitmap, xstr, ystr );
if ( error )
return error;
+ /* take care of bitmap flow */
pitch = bitmap->pitch;
if ( pitch > 0 )
p = bitmap->buffer + pitch * ystr;
@@ -303,7 +348,7 @@
*/
for ( x = pitch - 1; x >= 0; x-- )
{
- unsigned char tmp;
+ unsigned char tmp;
tmp = p[x];
@@ -318,7 +363,7 @@
p[x] |= p[x - 1] << ( 8 - i );
#if 0
- if ( p[x] == 0xff )
+ if ( p[x] == 0xFF )
break;
#endif
}
@@ -328,12 +373,12 @@
{
if ( p[x] + p[x - i] > bitmap->num_grays - 1 )
{
- p[x] = (unsigned char)(bitmap->num_grays - 1);
+ p[x] = (unsigned char)( bitmap->num_grays - 1 );
break;
}
else
{
- p[x] = (unsigned char)(p[x] + p[x-i]);
+ p[x] = (unsigned char)( p[x] + p[x - i] );
if ( p[x] == bitmap->num_grays - 1 )
break;
}
@@ -369,6 +414,52 @@
}
+ static FT_Byte
+ ft_gray_for_premultiplied_srgb_bgra( const FT_Byte* bgra )
+ {
+ FT_UInt a = bgra[3];
+ FT_UInt l;
+
+
+ /* Short-circuit transparent color to avoid division by zero. */
+ if ( !a )
+ return 0;
+
+ /*
+ * Luminosity for sRGB is defined using ~0.2126,0.7152,0.0722
+ * coefficients for RGB channels *on the linear colors*.
+ * A gamma of 2.2 is fair to assume. And then, we need to
+ * undo the premultiplication too.
+ *
+ * http://accessibility.kde.org/hsl-adjusted.php
+ *
+ * We do the computation with integers only, applying a gamma of 2.0.
+ * We guarantee 32-bit arithmetic to avoid overflow but the resulting
+ * luminosity fits into 16 bits.
+ *
+ */
+
+ l = ( 4732UL /* 0.0722 * 65536 */ * bgra[0] * bgra[0] +
+ 46871UL /* 0.7152 * 65536 */ * bgra[1] * bgra[1] +
+ 13933UL /* 0.2126 * 65536 */ * bgra[2] * bgra[2] ) >> 16;
+
+ /*
+ * Final transparency can be determined as follows.
+ *
+ * - If alpha is zero, we want 0.
+ * - If alpha is zero and luminosity is zero, we want 255.
+ * - If alpha is zero and luminosity is one, we want 0.
+ *
+ * So the formula is a * (1 - l) = a - l * a.
+ *
+ * We still need to undo premultiplication by dividing l by a*a.
+ *
+ */
+
+ return (FT_Byte)( a - l / a );
+ }
+
+
/* documentation is in ftbitmap.h */
FT_EXPORT_DEF( FT_Error )
@@ -380,9 +471,15 @@
FT_Error error = FT_Err_Ok;
FT_Memory memory;
+ FT_Byte* s;
+ FT_Byte* t;
+
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
+
+ if ( !source || !target )
+ return FT_THROW( Invalid_Argument );
memory = library->memory;
@@ -394,14 +491,17 @@
case FT_PIXEL_MODE_GRAY4:
case FT_PIXEL_MODE_LCD:
case FT_PIXEL_MODE_LCD_V:
+ case FT_PIXEL_MODE_BGRA:
{
- FT_Int pad;
- FT_Long old_size;
+ FT_Int pad, old_target_pitch, target_pitch;
+ FT_ULong old_size;
+
+ old_target_pitch = target->pitch;
+ if ( old_target_pitch < 0 )
+ old_target_pitch = -old_target_pitch;
- old_size = target->rows * target->pitch;
- if ( old_size < 0 )
- old_size = -old_size;
+ old_size = target->rows * old_target_pitch;
target->pixel_mode = FT_PIXEL_MODE_GRAY;
target->rows = source->rows;
@@ -415,30 +515,39 @@
pad = alignment - pad;
}
- target->pitch = source->width + pad;
+ target_pitch = source->width + pad;
- if ( target->pitch > 0 &&
- (FT_ULong)target->rows > FT_ULONG_MAX / target->pitch )
- return FT_Err_Invalid_Argument;
+ if ( target_pitch > 0 &&
+ (FT_ULong)target->rows > FT_ULONG_MAX / target_pitch )
+ return FT_THROW( Invalid_Argument );
- if ( target->rows * target->pitch > old_size &&
+ if ( target->rows * target_pitch > old_size &&
FT_QREALLOC( target->buffer,
- old_size, target->rows * target->pitch ) )
+ old_size, target->rows * target_pitch ) )
return error;
+
+ target->pitch = target->pitch < 0 ? -target_pitch : target_pitch;
}
break;
default:
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
}
+ s = source->buffer;
+ t = target->buffer;
+
+ /* take care of bitmap flow */
+ if ( source->pitch < 0 )
+ s -= source->pitch * ( source->rows - 1 );
+ if ( target->pitch < 0 )
+ t -= target->pitch * ( target->rows - 1 );
+
switch ( source->pixel_mode )
{
case FT_PIXEL_MODE_MONO:
{
- FT_Byte* s = source->buffer;
- FT_Byte* t = target->buffer;
- FT_Int i;
+ FT_UInt i;
target->num_grays = 2;
@@ -447,7 +556,7 @@
{
FT_Byte* ss = s;
FT_Byte* tt = t;
- FT_Int j;
+ FT_UInt j;
/* get the full bytes */
@@ -495,12 +604,8 @@
case FT_PIXEL_MODE_LCD:
case FT_PIXEL_MODE_LCD_V:
{
- FT_Int width = source->width;
- FT_Byte* s = source->buffer;
- FT_Byte* t = target->buffer;
- FT_Int s_pitch = source->pitch;
- FT_Int t_pitch = target->pitch;
- FT_Int i;
+ FT_Int width = source->width;
+ FT_UInt i;
target->num_grays = 256;
@@ -509,8 +614,8 @@
{
FT_ARRAY_COPY( t, s, width );
- s += s_pitch;
- t += t_pitch;
+ s += source->pitch;
+ t += target->pitch;
}
}
break;
@@ -518,9 +623,7 @@
case FT_PIXEL_MODE_GRAY2:
{
- FT_Byte* s = source->buffer;
- FT_Byte* t = target->buffer;
- FT_Int i;
+ FT_UInt i;
target->num_grays = 4;
@@ -529,7 +632,7 @@
{
FT_Byte* ss = s;
FT_Byte* tt = t;
- FT_Int j;
+ FT_UInt j;
/* get the full bytes */
@@ -570,9 +673,7 @@
case FT_PIXEL_MODE_GRAY4:
{
- FT_Byte* s = source->buffer;
- FT_Byte* t = target->buffer;
- FT_Int i;
+ FT_UInt i;
target->num_grays = 16;
@@ -581,7 +682,7 @@
{
FT_Byte* ss = s;
FT_Byte* tt = t;
- FT_Int j;
+ FT_UInt j;
/* get the full bytes */
@@ -607,6 +708,34 @@
break;
+ case FT_PIXEL_MODE_BGRA:
+ {
+ FT_UInt i;
+
+
+ target->num_grays = 256;
+
+ for ( i = source->rows; i > 0; i-- )
+ {
+ FT_Byte* ss = s;
+ FT_Byte* tt = t;
+ FT_UInt j;
+
+
+ for ( j = source->width; j > 0; j-- )
+ {
+ tt[0] = ft_gray_for_premultiplied_srgb_bgra( ss );
+
+ ss += 4;
+ tt += 1;
+ }
+
+ s += source->pitch;
+ t += target->pitch;
+ }
+ }
+ break;
+
default:
;
}
@@ -650,10 +779,10 @@
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
if ( !bitmap )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
memory = library->memory;
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index 2aeea04..57f7968 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (body). */
/* */
-/* Copyright 1996-2006, 2008, 2012 by */
+/* Copyright 1996-2006, 2008, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -34,21 +34,19 @@
#include <ft2build.h>
#include FT_GLYPH_H
+#include FT_TRIGONOMETRY_H
#include FT_INTERNAL_CALC_H
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
-#ifdef FT_MULFIX_INLINED
+
+#ifdef FT_MULFIX_ASSEMBLER
#undef FT_MulFix
#endif
-/* we need to define a 64-bits data type here */
-
-#ifdef FT_LONG64
-
- typedef FT_INT64 FT_Int64;
+/* we need to emulate a 64-bit data type if a real one isn't available */
-#else
+#ifndef FT_LONG64
typedef struct FT_Int64_
{
@@ -57,7 +55,7 @@
} FT_Int64;
-#endif /* FT_LONG64 */
+#endif /* !FT_LONG64 */
/*************************************************************************/
@@ -70,6 +68,16 @@
#define FT_COMPONENT trace_calc
+ /* transfer sign leaving a positive number */
+#define FT_MOVE_SIGN( x, s ) \
+ FT_BEGIN_STMNT \
+ if ( x < 0 ) \
+ { \
+ x = -x; \
+ s = -s; \
+ } \
+ FT_END_STMNT
+
/* The following three functions are available regardless of whether */
/* FT_LONG64 is defined. */
@@ -78,8 +86,8 @@
FT_EXPORT_DEF( FT_Fixed )
FT_RoundFix( FT_Fixed a )
{
- return ( a >= 0 ) ? ( a + 0x8000L ) & ~0xFFFFL
- : -((-a + 0x8000L ) & ~0xFFFFL );
+ return a >= 0 ? ( a + 0x8000L ) & ~0xFFFFL
+ : -((-a + 0x8000L ) & ~0xFFFFL );
}
@@ -88,8 +96,8 @@
FT_EXPORT_DEF( FT_Fixed )
FT_CeilFix( FT_Fixed a )
{
- return ( a >= 0 ) ? ( a + 0xFFFFL ) & ~0xFFFFL
- : -((-a + 0xFFFFL ) & ~0xFFFFL );
+ return a >= 0 ? ( a + 0xFFFFL ) & ~0xFFFFL
+ : -((-a + 0xFFFFL ) & ~0xFFFFL );
}
@@ -98,43 +106,65 @@
FT_EXPORT_DEF( FT_Fixed )
FT_FloorFix( FT_Fixed a )
{
- return ( a >= 0 ) ? a & ~0xFFFFL
- : -((-a) & ~0xFFFFL );
+ return a >= 0 ? a & ~0xFFFFL
+ : -((-a) & ~0xFFFFL );
}
+#ifndef FT_MSB
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_BASE_DEF ( FT_Int )
+ FT_MSB( FT_UInt32 z )
+ {
+ FT_Int shift = 0;
- /* documentation is in ftcalc.h */
- FT_EXPORT_DEF( FT_Int32 )
- FT_Sqrt32( FT_Int32 x )
- {
- FT_UInt32 val, root, newroot, mask;
+ /* determine msb bit index in `shift' */
+ if ( z & 0xFFFF0000UL )
+ {
+ z >>= 16;
+ shift += 16;
+ }
+ if ( z & 0x0000FF00UL )
+ {
+ z >>= 8;
+ shift += 8;
+ }
+ if ( z & 0x000000F0UL )
+ {
+ z >>= 4;
+ shift += 4;
+ }
+ if ( z & 0x0000000CUL )
+ {
+ z >>= 2;
+ shift += 2;
+ }
+ if ( z & 0x00000002UL )
+ {
+ /* z >>= 1; */
+ shift += 1;
+ }
+ return shift;
+ }
- root = 0;
- mask = (FT_UInt32)0x40000000UL;
- val = (FT_UInt32)x;
+#endif /* !FT_MSB */
- do
- {
- newroot = root + mask;
- if ( newroot <= val )
- {
- val -= newroot;
- root = newroot + mask;
- }
- root >>= 1;
- mask >>= 2;
+ /* documentation is in ftcalc.h */
- } while ( mask != 0 );
+ FT_BASE_DEF( FT_Fixed )
+ FT_Hypot( FT_Fixed x,
+ FT_Fixed y )
+ {
+ FT_Vector v;
- return root;
- }
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+ v.x = x;
+ v.y = y;
+
+ return FT_Vector_Length( &v );
+ }
#ifdef FT_LONG64
@@ -147,24 +177,21 @@
FT_Long b,
FT_Long c )
{
- FT_Int s;
+ FT_Int s = 1;
FT_Long d;
- s = 1;
- if ( a < 0 ) { a = -a; s = -1; }
- if ( b < 0 ) { b = -b; s = -s; }
- if ( c < 0 ) { c = -c; s = -s; }
+ FT_MOVE_SIGN( a, s );
+ FT_MOVE_SIGN( b, s );
+ FT_MOVE_SIGN( c, s );
d = (FT_Long)( c > 0 ? ( (FT_Int64)a * b + ( c >> 1 ) ) / c
: 0x7FFFFFFFL );
- return ( s > 0 ) ? d : -d;
+ return s < 0 ? -d : d;
}
-#ifdef TT_USE_BYTECODE_INTERPRETER
-
/* documentation is in ftcalc.h */
FT_BASE_DEF( FT_Long )
@@ -172,23 +199,20 @@
FT_Long b,
FT_Long c )
{
- FT_Int s;
+ FT_Int s = 1;
FT_Long d;
- s = 1;
- if ( a < 0 ) { a = -a; s = -1; }
- if ( b < 0 ) { b = -b; s = -s; }
- if ( c < 0 ) { c = -c; s = -s; }
+ FT_MOVE_SIGN( a, s );
+ FT_MOVE_SIGN( b, s );
+ FT_MOVE_SIGN( c, s );
d = (FT_Long)( c > 0 ? (FT_Int64)a * b / c
: 0x7FFFFFFFL );
- return ( s > 0 ) ? d : -d;
+ return s < 0 ? -d : d;
}
-#endif /* TT_USE_BYTECODE_INTERPRETER */
-
/* documentation is in freetype.h */
@@ -206,21 +230,12 @@
FT_Long c;
- if ( a < 0 )
- {
- a = -a;
- s = -1;
- }
-
- if ( b < 0 )
- {
- b = -b;
- s = -s;
- }
+ FT_MOVE_SIGN( a, s );
+ FT_MOVE_SIGN( b, s );
c = (FT_Long)( ( (FT_Int64)a * b + 0x8000L ) >> 16 );
- return ( s > 0 ) ? c : -c;
+ return s < 0 ? -c : c;
#endif /* FT_MULFIX_ASSEMBLER */
}
@@ -232,21 +247,17 @@
FT_DivFix( FT_Long a,
FT_Long b )
{
- FT_Int32 s;
- FT_UInt32 q;
+ FT_Int s = 1;
+ FT_Long q;
- s = 1;
- if ( a < 0 ) { a = -a; s = -1; }
- if ( b < 0 ) { b = -b; s = -s; }
- if ( b == 0 )
- /* check for division by 0 */
- q = 0x7FFFFFFFL;
- else
- /* compute result directly */
- q = (FT_UInt32)( ( ( (FT_Int64)a << 16 ) + ( b >> 1 ) ) / b );
+ FT_MOVE_SIGN( a, s );
+ FT_MOVE_SIGN( b, s );
- return ( s < 0 ? -(FT_Long)q : (FT_Long)q );
+ q = (FT_Long)( b > 0 ? ( ( (FT_UInt64)a << 16 ) + ( b >> 1 ) ) / b
+ : 0x7FFFFFFFL );
+
+ return s < 0 ? -q : q;
}
@@ -294,25 +305,30 @@
FT_Int i;
- q = 0;
- r = hi;
-
- if ( r >= y )
+ if ( hi >= y )
return (FT_UInt32)0x7FFFFFFFL;
- i = 32;
+ /* We shift as many bits as we can into the high register, perform */
+ /* 32-bit division with modulo there, then work through the remaining */
+ /* bits with long division. This optimization is especially noticeable */
+ /* for smaller dividends that barely use the high register. */
+
+ i = 31 - FT_MSB( hi );
+ r = ( hi << i ) | ( lo >> ( 32 - i ) ); lo <<= i; /* left 64-bit shift */
+ q = r / y;
+ r -= q * y; /* remainder */
+
+ i = 32 - i; /* bits remaining in low register */
do
{
- r <<= 1;
q <<= 1;
- r |= lo >> 31;
+ r = ( r << 1 ) | ( lo >> 31 ); lo <<= 1;
if ( r >= y )
{
r -= y;
q |= 1;
}
- lo <<= 1;
} while ( --i );
return q;
@@ -324,7 +340,7 @@
FT_Int64* y,
FT_Int64 *z )
{
- register FT_UInt32 lo, hi;
+ FT_UInt32 lo, hi;
lo = x->lo + y->lo;
@@ -335,99 +351,134 @@
}
- /* documentation is in freetype.h */
-
- /* The FT_MulDiv function has been optimized thanks to ideas from */
- /* Graham Asher. The trick is to optimize computation when everything */
- /* fits within 32-bits (a rather common case). */
+ /* The FT_MulDiv function has been optimized thanks to ideas from */
+ /* Graham Asher and Alexei Podtelezhnikov. The trick is to optimize */
+ /* a rather common case when everything fits within 32-bits. */
+ /* */
+ /* We compute 'a*b+c/2', then divide it by 'c' (all positive values). */
+ /* */
+ /* The product of two positive numbers never exceeds the square of */
+ /* its mean values. Therefore, we always avoid the overflow by */
+ /* imposing */
+ /* */
+ /* (a + b) / 2 <= sqrt(X - c/2) , */
/* */
- /* we compute 'a*b+c/2', then divide it by 'c'. (positive values) */
+ /* where X = 2^32 - 1, the maximum unsigned 32-bit value, and using */
+ /* unsigned arithmetic. Now we replace `sqrt' with a linear function */
+ /* that is smaller or equal for all values of c in the interval */
+ /* [0;X/2]; it should be equal to sqrt(X) and sqrt(3X/4) at the */
+ /* endpoints. Substituting the linear solution and explicit numbers */
+ /* we get */
/* */
- /* 46340 is FLOOR(SQRT(2^31-1)). */
+ /* a + b <= 131071.99 - c / 122291.84 . */
/* */
- /* if ( a <= 46340 && b <= 46340 ) then ( a*b <= 0x7FFEA810 ) */
+ /* In practice, we should use a faster and even stronger inequality */
/* */
- /* 0x7FFFFFFF - 0x7FFEA810 = 0x157F0 */
+ /* a + b <= 131071 - (c >> 16) */
/* */
- /* if ( c < 0x157F0*2 ) then ( a*b+c/2 <= 0x7FFFFFFF ) */
+ /* or, alternatively, */
/* */
- /* and 2*0x157F0 = 176096 */
+ /* a + b <= 129894 - (c >> 17) . */
/* */
+ /* FT_MulFix, on the other hand, is optimized for a small value of */
+ /* the first argument, when the second argument can be much larger. */
+ /* This can be achieved by scaling the second argument and the limit */
+ /* in the above inequalities. For example, */
+ /* */
+ /* a + (b >> 8) <= (131071 >> 4) */
+ /* */
+ /* covers the practical range of use. The actual test below is a bit */
+ /* tighter to avoid the border case overflows. */
+ /* */
+ /* In the case of FT_DivFix, the exact overflow check */
+ /* */
+ /* a << 16 <= X - c/2 */
+ /* */
+ /* is scaled down by 2^16 and we use */
+ /* */
+ /* a <= 65535 - (c >> 17) . */
+
+ /* documentation is in freetype.h */
FT_EXPORT_DEF( FT_Long )
FT_MulDiv( FT_Long a,
FT_Long b,
FT_Long c )
{
- long s;
+ FT_Int s = 1;
/* XXX: this function does not allow 64-bit arguments */
if ( a == 0 || b == c )
return a;
- s = a; a = FT_ABS( a );
- s ^= b; b = FT_ABS( b );
- s ^= c; c = FT_ABS( c );
+ FT_MOVE_SIGN( a, s );
+ FT_MOVE_SIGN( b, s );
+ FT_MOVE_SIGN( c, s );
+
+ if ( c == 0 )
+ a = 0x7FFFFFFFL;
- if ( a <= 46340L && b <= 46340L && c <= 176095L && c > 0 )
- a = ( a * b + ( c >> 1 ) ) / c;
+ else if ( (FT_ULong)a + b <= 129894UL - ( c >> 17 ) )
+ a = ( (FT_ULong)a * b + ( c >> 1 ) ) / c;
- else if ( (FT_Int32)c > 0 )
+ else
{
FT_Int64 temp, temp2;
- ft_multo64( (FT_Int32)a, (FT_Int32)b, &temp );
+ ft_multo64( a, b, &temp );
temp2.hi = 0;
- temp2.lo = (FT_UInt32)(c >> 1);
+ temp2.lo = c >> 1;
+
FT_Add64( &temp, &temp2, &temp );
- a = ft_div64by32( temp.hi, temp.lo, (FT_Int32)c );
+
+ /* last attempt to ditch long division */
+ a = temp.hi == 0 ? temp.lo / c
+ : ft_div64by32( temp.hi, temp.lo, c );
}
- else
- a = 0x7FFFFFFFL;
- return ( s < 0 ? -a : a );
+ return s < 0 ? -a : a;
}
-#ifdef TT_USE_BYTECODE_INTERPRETER
-
FT_BASE_DEF( FT_Long )
FT_MulDiv_No_Round( FT_Long a,
FT_Long b,
FT_Long c )
{
- long s;
+ FT_Int s = 1;
if ( a == 0 || b == c )
return a;
- s = a; a = FT_ABS( a );
- s ^= b; b = FT_ABS( b );
- s ^= c; c = FT_ABS( c );
+ FT_MOVE_SIGN( a, s );
+ FT_MOVE_SIGN( b, s );
+ FT_MOVE_SIGN( c, s );
+
+ if ( c == 0 )
+ a = 0x7FFFFFFFL;
- if ( a <= 46340L && b <= 46340L && c > 0 )
- a = a * b / c;
+ else if ( (FT_ULong)a + b <= 131071UL )
+ a = (FT_ULong)a * b / c;
- else if ( (FT_Int32)c > 0 )
+ else
{
FT_Int64 temp;
- ft_multo64( (FT_Int32)a, (FT_Int32)b, &temp );
- a = ft_div64by32( temp.hi, temp.lo, (FT_Int32)c );
+ ft_multo64( a, b, &temp );
+
+ /* last attempt to ditch long division */
+ a = temp.hi == 0 ? temp.lo / c
+ : ft_div64by32( temp.hi, temp.lo, c );
}
- else
- a = 0x7FFFFFFFL;
- return ( s < 0 ? -a : a );
+ return s < 0 ? -a : a;
}
-#endif /* TT_USE_BYTECODE_INTERPRETER */
-
/* documentation is in freetype.h */
@@ -481,7 +532,7 @@
ua = (FT_ULong)a;
ub = (FT_ULong)b;
- if ( ua <= 2048 && ub <= 1048576L )
+ if ( ua + ( ub >> 8 ) <= 8190UL )
ua = ( ua * ub + 0x8000U ) >> 16;
else
{
@@ -499,20 +550,20 @@
#else /* 0 */
- FT_Long s;
+ FT_Int s = 1;
FT_ULong ua, ub;
if ( a == 0 || b == 0x10000L )
return a;
- s = a; a = FT_ABS( a );
- s ^= b; b = FT_ABS( b );
+ FT_MOVE_SIGN( a, s );
+ FT_MOVE_SIGN( b, s );
ua = (FT_ULong)a;
ub = (FT_ULong)b;
- if ( ua <= 2048 && ub <= 1048576L )
+ if ( ua + ( ub >> 8 ) <= 8190UL )
ua = ( ua * ub + 0x8000UL ) >> 16;
else
{
@@ -523,7 +574,7 @@
( ( al * ( ub & 0xFFFFUL ) + 0x8000UL ) >> 16 );
}
- return ( s < 0 ? -(FT_Long)ua : (FT_Long)ua );
+ return s < 0 ? -(FT_Long)ua : (FT_Long)ua;
#endif /* 0 */
@@ -536,23 +587,24 @@
FT_DivFix( FT_Long a,
FT_Long b )
{
- FT_Int32 s;
- FT_UInt32 q;
+ FT_Int s = 1;
+ FT_Long q;
/* XXX: this function does not allow 64-bit arguments */
- s = (FT_Int32)a; a = FT_ABS( a );
- s ^= (FT_Int32)b; b = FT_ABS( b );
- if ( (FT_UInt32)b == 0 )
+ FT_MOVE_SIGN( a, s );
+ FT_MOVE_SIGN( b, s );
+
+ if ( b == 0 )
{
/* check for division by 0 */
- q = (FT_UInt32)0x7FFFFFFFL;
+ q = 0x7FFFFFFFL;
}
- else if ( ( a >> 16 ) == 0 )
+ else if ( a <= 65535L - ( b >> 17 ) )
{
/* compute result directly */
- q = (FT_UInt32)( ( a << 16 ) + ( b >> 1 ) ) / (FT_UInt32)b;
+ q = (FT_Long)( ( ( (FT_ULong)a << 16 ) + ( b >> 1 ) ) / b );
}
else
{
@@ -560,138 +612,18 @@
FT_Int64 temp, temp2;
- temp.hi = (FT_Int32) ( a >> 16 );
- temp.lo = (FT_UInt32)( a << 16 );
+ temp.hi = a >> 16;
+ temp.lo = a << 16;
temp2.hi = 0;
- temp2.lo = (FT_UInt32)( b >> 1 );
- FT_Add64( &temp, &temp2, &temp );
- q = ft_div64by32( temp.hi, temp.lo, (FT_Int32)b );
- }
-
- return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q );
- }
-
-
-#if 0
-
- /* documentation is in ftcalc.h */
-
- FT_EXPORT_DEF( void )
- FT_MulTo64( FT_Int32 x,
- FT_Int32 y,
- FT_Int64 *z )
- {
- FT_Int32 s;
-
-
- s = x; x = FT_ABS( x );
- s ^= y; y = FT_ABS( y );
-
- ft_multo64( x, y, z );
-
- if ( s < 0 )
- {
- z->lo = (FT_UInt32)-(FT_Int32)z->lo;
- z->hi = ~z->hi + !( z->lo );
- }
- }
-
+ temp2.lo = b >> 1;
- /* apparently, the second version of this code is not compiled correctly */
- /* on Mac machines with the MPW C compiler.. tsk, tsk, tsk... */
-
-#if 1
-
- FT_EXPORT_DEF( FT_Int32 )
- FT_Div64by32( FT_Int64* x,
- FT_Int32 y )
- {
- FT_Int32 s;
- FT_UInt32 q, r, i, lo;
-
-
- s = x->hi;
- if ( s < 0 )
- {
- x->lo = (FT_UInt32)-(FT_Int32)x->lo;
- x->hi = ~x->hi + !x->lo;
- }
- s ^= y; y = FT_ABS( y );
-
- /* Shortcut */
- if ( x->hi == 0 )
- {
- if ( y > 0 )
- q = x->lo / y;
- else
- q = 0x7FFFFFFFL;
-
- return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q );
- }
-
- r = x->hi;
- lo = x->lo;
-
- if ( r >= (FT_UInt32)y ) /* we know y is to be treated as unsigned here */
- return ( s < 0 ? 0x80000001UL : 0x7FFFFFFFUL );
- /* Return Max/Min Int32 if division overflow. */
- /* This includes division by zero! */
- q = 0;
- for ( i = 0; i < 32; i++ )
- {
- r <<= 1;
- q <<= 1;
- r |= lo >> 31;
-
- if ( r >= (FT_UInt32)y )
- {
- r -= y;
- q |= 1;
- }
- lo <<= 1;
- }
-
- return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q );
- }
-
-#else /* 0 */
-
- FT_EXPORT_DEF( FT_Int32 )
- FT_Div64by32( FT_Int64* x,
- FT_Int32 y )
- {
- FT_Int32 s;
- FT_UInt32 q;
-
-
- s = x->hi;
- if ( s < 0 )
- {
- x->lo = (FT_UInt32)-(FT_Int32)x->lo;
- x->hi = ~x->hi + !x->lo;
- }
- s ^= y; y = FT_ABS( y );
-
- /* Shortcut */
- if ( x->hi == 0 )
- {
- if ( y > 0 )
- q = ( x->lo + ( y >> 1 ) ) / y;
- else
- q = 0x7FFFFFFFL;
-
- return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q );
+ FT_Add64( &temp, &temp2, &temp );
+ q = (FT_Long)ft_div64by32( temp.hi, temp.lo, b );
}
- q = ft_div64by32( x->hi, x->lo, y );
-
- return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q );
+ return s < 0 ? -q : q;
}
-#endif /* 0 */
-
-#endif /* 0 */
-
#endif /* FT_LONG64 */
@@ -727,14 +659,14 @@
if ( !matrix )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* compute discriminant */
delta = FT_MulFix( matrix->xx, matrix->yy ) -
FT_MulFix( matrix->xy, matrix->yx );
if ( !delta )
- return FT_Err_Invalid_Argument; /* matrix can't be inverted */
+ return FT_THROW( Invalid_Argument ); /* matrix can't be inverted */
matrix->xy = - FT_DivFix( matrix->xy, delta );
matrix->yx = - FT_DivFix( matrix->yx, delta );
@@ -800,6 +732,8 @@
}
+#if 0
+
/* documentation is in ftcalc.h */
FT_BASE_DEF( FT_Int32 )
@@ -834,6 +768,8 @@
return (FT_Int32)root;
}
+#endif /* 0 */
+
/* documentation is in ftcalc.h */
@@ -923,35 +859,40 @@
FT_Pos out_x,
FT_Pos out_y )
{
- FT_Pos ax = in_x;
- FT_Pos ay = in_y;
-
- FT_Pos d_in, d_out, d_corner;
-
-
- if ( ax < 0 )
- ax = -ax;
- if ( ay < 0 )
- ay = -ay;
- d_in = ax + ay;
-
- ax = out_x;
- if ( ax < 0 )
- ax = -ax;
- ay = out_y;
- if ( ay < 0 )
- ay = -ay;
- d_out = ax + ay;
-
- ax = out_x + in_x;
- if ( ax < 0 )
- ax = -ax;
- ay = out_y + in_y;
- if ( ay < 0 )
- ay = -ay;
- d_corner = ax + ay;
-
- return ( d_in + d_out - d_corner ) < ( d_corner >> 4 );
+ FT_Pos ax = in_x + out_x;
+ FT_Pos ay = in_y + out_y;
+
+ FT_Pos d_in, d_out, d_hypot;
+
+
+ /* The idea of this function is to compare the length of the */
+ /* hypotenuse with the `in' and `out' length. The `corner' */
+ /* represented by `in' and `out' is flat if the hypotenuse's */
+ /* length isn't too large. */
+ /* */
+ /* This approach has the advantage that the angle between */
+ /* `in' and `out' is not checked. In case one of the two */
+ /* vectors is `dominant', this is, much larger than the */
+ /* other vector, we thus always have a flat corner. */
+ /* */
+ /* hypotenuse */
+ /* x---------------------------x */
+ /* \ / */
+ /* \ / */
+ /* in \ / out */
+ /* \ / */
+ /* o */
+ /* Point */
+
+ d_in = FT_HYPOT( in_x, in_y );
+ d_out = FT_HYPOT( out_x, out_y );
+ d_hypot = FT_HYPOT( ax, ay );
+
+ /* now do a simple length comparison: */
+ /* */
+ /* d_in + d_out < 17/16 d_hypot */
+
+ return ( d_in + d_out - d_hypot ) < ( d_hypot >> 4 );
}
diff --git a/src/base/ftcid.c b/src/base/ftcid.c
index 733aae1..741879d 100644
--- a/src/base/ftcid.c
+++ b/src/base/ftcid.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing CID font information. */
/* */
-/* Copyright 2007, 2009 by Derek Clegg, Michael Toftdal. */
+/* Copyright 2007, 2009, 2013 by Derek Clegg, Michael Toftdal. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -35,7 +35,7 @@
FT_Int s = 0;
- error = FT_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( face )
{
@@ -65,7 +65,7 @@
FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face,
FT_Bool *is_cid )
{
- FT_Error error = FT_Err_Invalid_Argument;
+ FT_Error error = FT_ERR( Invalid_Argument );
FT_Bool ic = 0;
@@ -92,7 +92,7 @@
FT_UInt glyph_index,
FT_UInt *cid )
{
- FT_Error error = FT_Err_Invalid_Argument;
+ FT_Error error = FT_ERR( Invalid_Argument );
FT_UInt c = 0;
diff --git a/src/base/ftdbgmem.c b/src/base/ftdbgmem.c
index 12fed04..6fb86fe 100644
--- a/src/base/ftdbgmem.c
+++ b/src/base/ftdbgmem.c
@@ -4,7 +4,7 @@
/* */
/* Memory debugger (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2009 by */
+/* Copyright 2001-2006, 2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -344,85 +344,80 @@
ft_mem_table_destroy( FT_MemTable table )
{
FT_ULong i;
+ FT_Long leak_count = 0;
+ FT_ULong leaks = 0;
FT_DumpMemory( table->memory );
- if ( table )
+ /* remove all blocks from the table, revealing leaked ones */
+ for ( i = 0; i < table->size; i++ )
{
- FT_Long leak_count = 0;
- FT_ULong leaks = 0;
+ FT_MemNode *pnode = table->buckets + i, next, node = *pnode;
- /* remove all blocks from the table, revealing leaked ones */
- for ( i = 0; i < table->size; i++ )
+ while ( node )
{
- FT_MemNode *pnode = table->buckets + i, next, node = *pnode;
+ next = node->link;
+ node->link = 0;
-
- while ( node )
+ if ( node->size > 0 )
{
- next = node->link;
- node->link = 0;
-
- if ( node->size > 0 )
- {
- printf(
- "leaked memory block at address %p, size %8ld in (%s:%ld)\n",
- node->address, node->size,
- FT_FILENAME( node->source->file_name ),
- node->source->line_no );
+ printf(
+ "leaked memory block at address %p, size %8ld in (%s:%ld)\n",
+ node->address, node->size,
+ FT_FILENAME( node->source->file_name ),
+ node->source->line_no );
- leak_count++;
- leaks += node->size;
+ leak_count++;
+ leaks += node->size;
- ft_mem_table_free( table, node->address );
- }
+ ft_mem_table_free( table, node->address );
+ }
- node->address = NULL;
- node->size = 0;
+ node->address = NULL;
+ node->size = 0;
- ft_mem_table_free( table, node );
- node = next;
- }
- table->buckets[i] = 0;
+ ft_mem_table_free( table, node );
+ node = next;
}
+ table->buckets[i] = 0;
+ }
- ft_mem_table_free( table, table->buckets );
- table->buckets = NULL;
-
- table->size = 0;
- table->nodes = 0;
+ ft_mem_table_free( table, table->buckets );
+ table->buckets = NULL;
- /* remove all sources */
- for ( i = 0; i < FT_MEM_SOURCE_BUCKETS; i++ )
- {
- FT_MemSource source, next;
+ table->size = 0;
+ table->nodes = 0;
+ /* remove all sources */
+ for ( i = 0; i < FT_MEM_SOURCE_BUCKETS; i++ )
+ {
+ FT_MemSource source, next;
- for ( source = table->sources[i]; source != NULL; source = next )
- {
- next = source->link;
- ft_mem_table_free( table, source );
- }
- table->sources[i] = NULL;
+ for ( source = table->sources[i]; source != NULL; source = next )
+ {
+ next = source->link;
+ ft_mem_table_free( table, source );
}
- printf(
- "FreeType: total memory allocations = %ld\n", table->alloc_total );
- printf(
- "FreeType: maximum memory footprint = %ld\n", table->alloc_max );
+ table->sources[i] = NULL;
+ }
- ft_mem_table_free( table, table );
+ printf( "FreeType: total memory allocations = %ld\n",
+ table->alloc_total );
+ printf( "FreeType: maximum memory footprint = %ld\n",
+ table->alloc_max );
- if ( leak_count > 0 )
- ft_mem_debug_panic(
- "FreeType: %ld bytes of memory leaked in %ld blocks\n",
- leaks, leak_count );
+ ft_mem_table_free( table, table );
- printf( "FreeType: no memory leaks detected\n" );
- }
+ if ( leak_count > 0 )
+ ft_mem_debug_panic(
+ "FreeType: %ld bytes of memory leaked in %ld blocks\n",
+ leaks, leak_count );
+
+ printf( "FreeType: no memory leaks detected\n" );
}
diff --git a/src/base/ftdebug.c b/src/base/ftdebug.c
index 2adbeab..39ac6ad 100644
--- a/src/base/ftdebug.c
+++ b/src/base/ftdebug.c
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component (body). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2008 by */
+/* Copyright 1996-2001, 2002, 2004, 2008, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -51,7 +51,8 @@
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
- FT_Message( const char* fmt, ... )
+ FT_Message( const char* fmt,
+ ... )
{
va_list ap;
@@ -65,7 +66,8 @@
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
- FT_Panic( const char* fmt, ... )
+ FT_Panic( const char* fmt,
+ ... )
{
va_list ap;
@@ -77,6 +79,21 @@
exit( EXIT_FAILURE );
}
+
+ /* documentation is in ftdebug.h */
+
+ FT_BASE_DEF( int )
+ FT_Throw( FT_Error error,
+ int line,
+ const char* file )
+ {
+ FT_UNUSED( error );
+ FT_UNUSED( line );
+ FT_UNUSED( file );
+
+ return 0;
+ }
+
#endif /* FT_DEBUG_LEVEL_ERROR */
@@ -135,7 +152,7 @@
/* 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 */
+ /* See the file <include/internal/fttrace.h> for details of the */
/* available toggle names. */
/* */
/* The level must be between 0 and 7; 0 means quiet (except for serious */
@@ -164,6 +181,9 @@
while ( *p && *p != ':' )
p++;
+ if ( !*p )
+ break;
+
if ( *p == ':' && p > q )
{
FT_Int n, i, len = (FT_Int)( p - q );
@@ -192,7 +212,7 @@
p++;
if ( *p )
{
- level = *p++ - '0';
+ level = *p - '0';
if ( level < 0 || level > 7 )
level = -1;
}
diff --git a/src/base/ftfstype.c b/src/base/ftfstype.c
index d0ef7b7..6b49ef8 100644
--- a/src/base/ftfstype.c
+++ b/src/base/ftfstype.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file to access FSType data (body). */
/* */
-/* Copyright 2008, 2009 by */
+/* Copyright 2008, 2009, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -51,7 +51,7 @@
/* look at FSType before fsType for Type42 */
- if ( ( os2 = (TT_OS2*)FT_Get_Sfnt_Table( face, ft_sfnt_os2 ) ) != NULL &&
+ if ( ( os2 = (TT_OS2*)FT_Get_Sfnt_Table( face, FT_SFNT_OS2 ) ) != NULL &&
os2->version != 0xFFFFU )
return os2->fsType;
diff --git a/src/base/ftgloadr.c b/src/base/ftgloadr.c
index 8483450..3cc5c7a 100644
--- a/src/base/ftgloadr.c
+++ b/src/base/ftgloadr.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph loader (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2010 by */
+/* Copyright 2002-2006, 2010, 2013 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_DEBUG_H
#include FT_INTERNAL_GLYPH_LOADER_H
#include FT_INTERNAL_MEMORY_H
#include FT_INTERNAL_OBJECTS_H
@@ -219,7 +220,7 @@
new_max = FT_PAD_CEIL( new_max, 8 );
if ( new_max > FT_OUTLINE_POINTS_MAX )
- return FT_Err_Array_Too_Large;
+ return FT_THROW( Array_Too_Large );
if ( FT_RENEW_ARRAY( base->points, old_max, new_max ) ||
FT_RENEW_ARRAY( base->tags, old_max, new_max ) )
@@ -251,7 +252,7 @@
new_max = FT_PAD_CEIL( new_max, 4 );
if ( new_max > FT_OUTLINE_CONTOURS_MAX )
- return FT_Err_Array_Too_Large;
+ return FT_THROW( Array_Too_Large );
if ( FT_RENEW_ARRAY( base->contours, old_max, new_max ) )
goto Exit;
@@ -264,6 +265,9 @@
FT_GlyphLoader_Adjust_Points( loader );
Exit:
+ if ( error )
+ FT_GlyphLoader_Reset( loader );
+
return error;
}
@@ -318,7 +322,7 @@
}
- /* add current glyph to the base image - and prepare for another */
+ /* add current glyph to the base image -- and prepare for another */
FT_BASE_DEF( void )
FT_GlyphLoader_Add( FT_GlyphLoader loader )
{
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index 591b57a..ac178c4 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2007, 2008, 2010 by */
+/* Copyright 1996-2005, 2007, 2008, 2010, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,6 +29,8 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_GLYPH_H
#include FT_OUTLINE_H
#include FT_BITMAP_H
@@ -65,7 +67,7 @@
if ( slot->format != FT_GLYPH_FORMAT_BITMAP )
{
- error = FT_Err_Invalid_Glyph_Format;
+ error = FT_THROW( Invalid_Glyph_Format );
goto Exit;
}
@@ -166,7 +168,7 @@
/* check format in glyph slot */
if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
{
- error = FT_Err_Invalid_Glyph_Format;
+ error = FT_THROW( Invalid_Glyph_Format );
goto Exit;
}
@@ -312,17 +314,17 @@
/* check arguments */
- if ( !target )
+ if ( !target || !source || !source->clazz )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
- *target = 0;
+ *target = NULL;
if ( !source || !source->clazz )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -357,16 +359,16 @@
FT_Error error;
FT_Glyph glyph;
- const FT_Glyph_Class* clazz = 0;
+ const FT_Glyph_Class* clazz = NULL;
if ( !slot )
- return FT_Err_Invalid_Slot_Handle;
+ return FT_THROW( Invalid_Slot_Handle );
library = slot->library;
if ( !aglyph )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* if it is a bitmap, that's easy :-) */
if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
@@ -388,7 +390,7 @@
if ( !clazz )
{
- error = FT_Err_Invalid_Glyph_Format;
+ error = FT_THROW( Invalid_Glyph_Format );
goto Exit;
}
@@ -422,15 +424,16 @@
FT_Matrix* matrix,
FT_Vector* delta )
{
- const FT_Glyph_Class* clazz;
- FT_Error error = FT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( !glyph || !glyph->clazz )
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
else
{
- clazz = glyph->clazz;
+ const FT_Glyph_Class* clazz = glyph->clazz;
+
+
if ( clazz->glyph_transform )
{
/* transform glyph image */
@@ -441,7 +444,7 @@
FT_Vector_Transform( &glyph->advance, matrix );
}
else
- error = FT_Err_Invalid_Glyph_Format;
+ error = FT_THROW( Invalid_Glyph_Format );
}
return error;
}
@@ -464,38 +467,33 @@
if ( !glyph || !glyph->clazz )
return;
- else
+
+ clazz = glyph->clazz;
+ if ( !clazz->glyph_bbox )
+ return;
+
+ /* retrieve bbox in 26.6 coordinates */
+ clazz->glyph_bbox( glyph, acbox );
+
+ /* perform grid fitting if needed */
+ if ( bbox_mode == FT_GLYPH_BBOX_GRIDFIT ||
+ bbox_mode == FT_GLYPH_BBOX_PIXELS )
{
- clazz = glyph->clazz;
- if ( !clazz->glyph_bbox )
- return;
- else
- {
- /* retrieve bbox in 26.6 coordinates */
- clazz->glyph_bbox( glyph, acbox );
-
- /* perform grid fitting if needed */
- if ( bbox_mode == FT_GLYPH_BBOX_GRIDFIT ||
- bbox_mode == FT_GLYPH_BBOX_PIXELS )
- {
- acbox->xMin = FT_PIX_FLOOR( acbox->xMin );
- acbox->yMin = FT_PIX_FLOOR( acbox->yMin );
- acbox->xMax = FT_PIX_CEIL( acbox->xMax );
- acbox->yMax = FT_PIX_CEIL( acbox->yMax );
- }
-
- /* convert to integer pixels if needed */
- if ( bbox_mode == FT_GLYPH_BBOX_TRUNCATE ||
- bbox_mode == FT_GLYPH_BBOX_PIXELS )
- {
- acbox->xMin >>= 6;
- acbox->yMin >>= 6;
- acbox->xMax >>= 6;
- acbox->yMax >>= 6;
- }
- }
+ acbox->xMin = FT_PIX_FLOOR( acbox->xMin );
+ acbox->yMin = FT_PIX_FLOOR( acbox->yMin );
+ acbox->xMax = FT_PIX_CEIL( acbox->xMax );
+ acbox->yMax = FT_PIX_CEIL( acbox->yMax );
+ }
+
+ /* convert to integer pixels if needed */
+ if ( bbox_mode == FT_GLYPH_BBOX_TRUNCATE ||
+ bbox_mode == FT_GLYPH_BBOX_PIXELS )
+ {
+ acbox->xMin >>= 6;
+ acbox->yMin >>= 6;
+ acbox->xMax >>= 6;
+ acbox->yMax >>= 6;
}
- return;
}
@@ -510,11 +508,11 @@
FT_GlyphSlotRec dummy;
FT_GlyphSlot_InternalRec dummy_internal;
FT_Error error = FT_Err_Ok;
- FT_Glyph glyph;
+ FT_Glyph b, glyph;
FT_BitmapGlyph bitmap = NULL;
const FT_Glyph_Class* clazz;
- /* FT_BITMAP_GLYPH_CLASS_GET derefers `library' in PIC mode */
+ /* FT_BITMAP_GLYPH_CLASS_GET dereferences `library' in PIC mode */
FT_Library library;
@@ -547,10 +545,10 @@
dummy.format = clazz->glyph_format;
/* create result bitmap glyph */
- error = ft_new_glyph( library, FT_BITMAP_GLYPH_CLASS_GET,
- (FT_Glyph*)(void*)&bitmap );
+ error = ft_new_glyph( library, FT_BITMAP_GLYPH_CLASS_GET, &b );
if ( error )
goto Exit;
+ bitmap = (FT_BitmapGlyph)b;
#if 1
/* if `origin' is set, translate the glyph image */
@@ -600,7 +598,7 @@
return error;
Bad:
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
diff --git a/src/base/ftgxval.c b/src/base/ftgxval.c
index aeeb8ce..a65f4c8 100644
--- a/src/base/ftgxval.c
+++ b/src/base/ftgxval.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating TrueTyepGX/AAT tables (body). */
/* */
-/* Copyright 2004, 2005, 2006, 2010 by */
+/* Copyright 2004-2006, 2010, 2013, 2014 by */
/* Masatake YAMATO, Redhat K.K, */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -26,6 +26,8 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_GX_VALIDATE_H
@@ -44,13 +46,13 @@
if ( !face )
{
- error = FT_Err_Invalid_Face_Handle;
+ error = FT_THROW( Invalid_Face_Handle );
goto Exit;
}
- if ( tables == NULL )
+ if ( !tables )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -62,7 +64,7 @@
tables,
table_length );
else
- error = FT_Err_Unimplemented_Feature;
+ error = FT_THROW( Unimplemented_Feature );
Exit:
return error;
@@ -96,13 +98,13 @@
if ( !face )
{
- error = FT_Err_Invalid_Face_Handle;
+ error = FT_THROW( Invalid_Face_Handle );
goto Exit;
}
- if ( ckern_table == NULL )
+ if ( !ckern_table )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -113,7 +115,7 @@
validation_flags,
ckern_table );
else
- error = FT_Err_Unimplemented_Feature;
+ error = FT_THROW( Unimplemented_Feature );
Exit:
return error;
diff --git a/src/base/ftinit.c b/src/base/ftinit.c
index 91f8e2a..c4c8820 100644
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -4,7 +4,7 @@
/* */
/* FreeType initialization layer (body). */
/* */
-/* Copyright 1996-2001, 2002, 2005, 2007, 2009, 2012 by */
+/* Copyright 1996-2002, 2005, 2007, 2009, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,8 +23,8 @@
/* FT_Add_Default_Modules(): */
/* This function is used to add the set of default modules to a */
/* fresh new library object. The set is taken from the header file */
- /* `freetype/config/ftmodule.h'. See the document `FreeType 2.0 */
- /* Build System' for more information. */
+ /* `config/ftmodule.h'. See the document `FreeType 2.0 Build */
+ /* System' for more information. */
/* */
/* FT_Init_FreeType(): */
/* This function creates a system object for the current platform, */
@@ -156,7 +156,7 @@
{
FT_Error error;
FT_Memory memory;
- FT_Module_Class* *classes;
+ FT_Module_Class* *classes = NULL;
FT_Module_Class* clazz;
FT_UInt i;
BasePIC* pic_container = (BasePIC*)library->pic_container.base;
@@ -166,7 +166,7 @@
pic_container->default_module_classes = 0;
- if ( FT_ALLOC( classes, sizeof ( FT_Module_Class* ) *
+ if ( FT_ALLOC( classes, sizeof ( FT_Module_Class* ) *
( FT_NUM_MODULE_CLASSES + 1 ) ) )
return error;
@@ -235,6 +235,8 @@
FT_Memory memory;
+ /* check of `alibrary' delayed to `FT_New_Library' */
+
/* First of all, allocate a new system object -- this function is part */
/* of the system-specific component, i.e. `ftsystem.c'. */
@@ -242,7 +244,7 @@
if ( !memory )
{
FT_ERROR(( "FT_Init_FreeType: cannot find memory manager\n" ));
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
/* build a library out of it, then fill it with the set of */
@@ -263,17 +265,19 @@
FT_EXPORT_DEF( FT_Error )
FT_Done_FreeType( FT_Library library )
{
- if ( library )
- {
- FT_Memory memory = library->memory;
+ FT_Memory memory;
+
+ if ( !library )
+ return FT_THROW( Invalid_Library_Handle );
- /* Discard the library object */
- FT_Done_Library( library );
+ memory = library->memory;
- /* discard memory manager */
- FT_Done_Memory( memory );
- }
+ /* Discard the library object */
+ FT_Done_Library( library );
+
+ /* discard memory manager */
+ FT_Done_Memory( memory );
return FT_Err_Ok;
}
diff --git a/src/base/ftlcdfil.c b/src/base/ftlcdfil.c
index 0da4ba1..d8bcbbf 100644
--- a/src/base/ftlcdfil.c
+++ b/src/base/ftlcdfil.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for color filtering of subpixel bitmap glyphs (body). */
/* */
-/* Copyright 2006, 2008, 2009, 2010 by */
+/* Copyright 2006, 2008-2010, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,6 +17,8 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_LCD_FILTER_H
#include FT_IMAGE_H
#include FT_INTERNAL_OBJECTS_H
@@ -44,9 +46,16 @@
FT_Byte* line = bitmap->buffer;
+ /* take care of bitmap flow */
+ if ( bitmap->pitch < 0 )
+ line -= bitmap->pitch * ( bitmap->rows - 1 );
+
+ /* `fir' and `pix' must be at least 32 bit wide, since the sum of */
+ /* the values in `weights' can exceed 0xFF */
+
for ( ; height > 0; height--, line += bitmap->pitch )
{
- FT_UInt fir[5];
+ FT_UInt fir[4]; /* below, `pix' is used as the 5th element */
FT_UInt val1, xx;
@@ -55,7 +64,6 @@
fir[1] = weights[3] * val1;
fir[2] = weights[4] * val1;
fir[3] = 0;
- fir[4] = 0;
val1 = line[1];
fir[0] += weights[1] * val1;
@@ -76,7 +84,7 @@
fir[3] = weights[4] * val;
pix >>= 8;
- pix |= -( pix >> 8 );
+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
line[xx - 2] = (FT_Byte)pix;
}
@@ -85,11 +93,11 @@
pix = fir[0] >> 8;
- pix |= -( pix >> 8 );
+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
line[xx - 2] = (FT_Byte)pix;
pix = fir[1] >> 8;
- pix |= -( pix >> 8 );
+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
line[xx - 1] = (FT_Byte)pix;
}
}
@@ -102,10 +110,14 @@
FT_Int pitch = bitmap->pitch;
+ /* take care of bitmap flow */
+ if ( bitmap->pitch < 0 )
+ column -= bitmap->pitch * ( bitmap->rows - 1 );
+
for ( ; width > 0; width--, column++ )
{
FT_Byte* col = column;
- FT_UInt fir[5];
+ FT_UInt fir[4]; /* below, `pix' is used as the 5th element */
FT_UInt val1, yy;
@@ -114,7 +126,6 @@
fir[1] = weights[3] * val1;
fir[2] = weights[4] * val1;
fir[3] = 0;
- fir[4] = 0;
col += pitch;
val1 = col[0];
@@ -137,7 +148,7 @@
fir[3] = weights[4] * val;
pix >>= 8;
- pix |= -( pix >> 8 );
+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
col[-2 * pitch] = (FT_Byte)pix;
col += pitch;
}
@@ -147,11 +158,11 @@
pix = fir[0] >> 8;
- pix |= -( pix >> 8 );
+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
col[-2 * pitch] = (FT_Byte)pix;
pix = fir[1] >> 8;
- pix |= -( pix >> 8 );
+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 );
col[-pitch] = (FT_Byte)pix;
}
}
@@ -187,6 +198,10 @@
FT_Byte* line = bitmap->buffer;
+ /* take care of bitmap flow */
+ if ( bitmap->pitch < 0 )
+ line -= bitmap->pitch * ( bitmap->rows - 1 );
+
for ( ; height > 0; height--, line += pitch )
{
FT_UInt xx;
@@ -226,6 +241,10 @@
FT_Byte* column = bitmap->buffer;
+ /* take care of bitmap flow */
+ if ( bitmap->pitch < 0 )
+ column -= bitmap->pitch * ( bitmap->rows - 1 );
+
for ( ; width > 0; width--, column++ )
{
FT_Byte* col = column;
@@ -270,8 +289,11 @@
FT_Library_SetLcdFilterWeights( FT_Library library,
unsigned char *weights )
{
- if ( !library || !weights )
- return FT_Err_Invalid_Argument;
+ if ( !library )
+ return FT_THROW( Invalid_Library_Handle );
+
+ if ( !weights )
+ return FT_THROW( Invalid_Argument );
ft_memcpy( library->lcd_weights, weights, 5 );
@@ -292,7 +314,7 @@
if ( !library )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Library_Handle );
switch ( filter )
{
@@ -339,7 +361,7 @@
#endif
default:
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
library->lcd_filter = filter;
@@ -356,7 +378,7 @@
FT_UNUSED( library );
FT_UNUSED( weights );
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
@@ -367,7 +389,7 @@
FT_UNUSED( library );
FT_UNUSED( filter );
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
#endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index f200748..5301ab4 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -8,8 +8,7 @@
/* This file is for Mac OS X only; see builds/mac/ftoldmac.c for */
/* classic platforms built by MPW. */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, */
-/* 2009 by */
+/* Copyright 1996-2009, 2013, 2014 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -131,7 +130,7 @@
FT_UNUSED( pathSpec );
FT_UNUSED( face_index );
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
@@ -190,10 +189,10 @@
CFRelease( cf_fontName );
if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
if ( noErr != FT_ATSFontGetFileReference( ats_font_id, ats_font_ref ) )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
/* face_index calculation by searching preceding fontIDs */
/* with same FSRef */
@@ -228,12 +227,15 @@
FT_Error err;
+ if ( !fontName || !face_index )
+ return FT_THROW( Invalid_Argument) ;
+
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
- if ( FT_Err_Ok != err )
+ if ( err )
return err;
if ( noErr != FSRefMakePath( &ref, path, maxPathSize ) )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
return FT_Err_Ok;
}
@@ -251,19 +253,22 @@
FT_UNUSED( pathSpec );
FT_UNUSED( face_index );
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
#else
FSRef ref;
FT_Error err;
+ if ( !fontName || !face_index )
+ return FT_THROW( Invalid_Argument );
+
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
- if ( FT_Err_Ok != err )
+ if ( err )
return err;
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL,
pathSpec, NULL ) )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
return FT_Err_Ok;
#endif
@@ -279,7 +284,7 @@
if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
/* at present, no support for dfont format */
err = FSOpenResourceFile( &ref, 0, NULL, fsRdPerm, res );
@@ -359,11 +364,9 @@
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 );
@@ -443,9 +446,10 @@
style = (StyleTable*)p;
p += sizeof ( StyleTable );
string_count = EndianS16_BtoN( *(short*)(p) );
+ string_count = FT_MIN( 64, string_count );
p += sizeof ( short );
- for ( i = 0; i < string_count && i < 64; i++ )
+ for ( i = 0; i < string_count; i++ )
{
names[i] = p;
p += names[i][0];
@@ -462,7 +466,7 @@
ps_name[ps_name_len] = 0;
}
if ( style->indexes[face_index] > 1 &&
- style->indexes[face_index] <= FT_MIN( string_count, 64 ) )
+ style->indexes[face_index] <= string_count )
{
unsigned char* suffixes = names[style->indexes[face_index] - 1];
@@ -508,17 +512,17 @@
/* We should not extract parent directory by string manipulation. */
if ( noErr != FSPathMakeRef( path_fond, &ref, FALSE ) )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
NULL, NULL, NULL, &par_ref ) )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( noErr != FSRefMakePath( &par_ref, path_lwfn, path_size ) )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* now we have absolute dirname in path_lwfn */
ft_strcat( (char *)path_lwfn, "/" );
@@ -527,11 +531,11 @@
path_lwfn[dirname_len + base_lwfn[0]] = '\0';
if ( noErr != FSPathMakeRef( path_lwfn, &ref, FALSE ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
NULL, NULL, NULL, NULL ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
return FT_Err_Ok;
}
@@ -557,7 +561,7 @@
{
err = lookup_lwfn_by_fond( pathname, lwfn_file_name,
buff, sizeof ( buff ) );
- if ( FT_Err_Ok == err )
+ if ( !err )
have_lwfn = 1;
}
@@ -620,7 +624,7 @@
/* detect integer overflows */
if ( total_size < old_total_size )
{
- error = FT_Err_Array_Too_Large;
+ error = FT_THROW( Array_Too_Large );
goto Error;
}
@@ -705,7 +709,7 @@
if ( noErr != FT_FSPathMakeRes( pathname, &res ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
pfb_data = NULL;
pfb_size = 0;
@@ -740,7 +744,7 @@
sfnt = GetResource( TTAG_sfnt, sfnt_id );
if ( sfnt == NULL )
- return FT_Err_Invalid_Handle;
+ return FT_THROW( Invalid_Handle );
sfnt_size = (FT_ULong)GetHandleSize( sfnt );
if ( FT_ALLOC( sfnt_data, (FT_Long)sfnt_size ) )
@@ -797,23 +801,26 @@
FT_Long face_index,
FT_Face* aface )
{
- FT_Error error = FT_Err_Cannot_Open_Resource;
+ 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;
+ short num_faces_in_res;
if ( noErr != FT_FSPathMakeRes( pathname, &res_ref ) )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
UseResFile( res_ref );
if ( ResError() )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
num_faces_in_res = 0;
for ( res_index = 1; ; ++res_index )
{
+ short num_faces_in_fond;
+
+
fond = Get1IndResource( TTAG_FOND, res_index );
if ( ResError() )
break;
@@ -828,7 +835,7 @@
}
CloseResFile( res_ref );
- if ( FT_Err_Ok == error && NULL != aface && NULL != *aface )
+ if ( !error && aface && *aface )
(*aface)->num_faces = num_faces_in_res;
return error;
}
@@ -852,9 +859,11 @@
FT_Error error = FT_Err_Ok;
+ /* check of `library' and `aface' delayed to `FT_New_Face_From_XXX' */
+
GetResInfo( fond, &fond_id, &fond_type, fond_name );
if ( ResError() != noErr || fond_type != TTAG_FOND )
- return FT_Err_Invalid_File_Format;
+ return FT_THROW( Invalid_File_Format );
parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, face_index );
@@ -883,7 +892,7 @@
error = lookup_lwfn_by_fond( path_fond, lwfn_file_name,
path_lwfn, sizeof ( path_lwfn ) );
- if ( FT_Err_Ok == error )
+ if ( !error )
have_lwfn = 1;
}
}
@@ -894,10 +903,10 @@
face_index,
aface );
else
- error = FT_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
found_no_lwfn_file:
- if ( have_sfnt && FT_Err_Ok != error )
+ if ( have_sfnt && error )
error = FT_New_Face_From_SFNT( library,
sfnt_id,
face_index,
@@ -961,9 +970,8 @@
/* test for valid `library' and `aface' delayed to FT_Open_Face() */
if ( !pathname )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
- error = FT_Err_Ok;
*aface = NULL;
/* try resourcefork based font: LWFN, FFIL */
@@ -998,16 +1006,20 @@
{
FT_Error error;
FT_Open_Args args;
- OSErr err;
- UInt8 pathname[PATH_MAX];
+ OSErr err;
+ UInt8 pathname[PATH_MAX];
+
+
+ /* check of `library' and `aface' delayed to */
+ /* `FT_New_Face_From_Resource' */
if ( !ref )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
err = FSRefMakePath( ref, pathname, sizeof ( pathname ) );
if ( err )
- error = FT_Err_Cannot_Open_Resource;
+ error = FT_THROW( Cannot_Open_Resource );
error = FT_New_Face_From_Resource( library, pathname, face_index, aface );
if ( error != 0 || *aface != NULL )
@@ -1043,13 +1055,15 @@
FT_UNUSED( face_index );
FT_UNUSED( aface );
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
#else
FSRef ref;
+ /* check of `library' and `aface' delayed to `FT_New_Face_From_FSRef' */
+
if ( !spec || FSpMakeFSRef( spec, &ref ) != noErr )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
else
return FT_New_Face_From_FSRef( library, &ref, face_index, aface );
#endif
diff --git a/src/base/ftmm.c b/src/base/ftmm.c
index 0307729..056680b 100644
--- a/src/base/ftmm.c
+++ b/src/base/ftmm.c
@@ -4,7 +4,7 @@
/* */
/* Multiple Master font support (body). */
/* */
-/* Copyright 1996-2001, 2003, 2004, 2009 by */
+/* Copyright 1996-2001, 2003, 2004, 2009, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,6 +17,8 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_MULTIPLE_MASTERS_H
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_MULTIPLE_MASTERS_H
@@ -42,9 +44,9 @@
*aservice = NULL;
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
- error = FT_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( FT_HAS_MULTIPLE_MASTERS( face ) )
{
@@ -70,10 +72,15 @@
FT_Service_MultiMasters service;
+ /* check of `face' delayed to `ft_face_get_mm_service' */
+
+ if ( !amaster )
+ return FT_THROW( Invalid_Argument );
+
error = ft_face_get_mm_service( face, &service );
if ( !error )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( service->get_mm )
error = service->get_mm( face, amaster );
}
@@ -92,10 +99,15 @@
FT_Service_MultiMasters service;
+ /* check of `face' delayed to `ft_face_get_mm_service' */
+
+ if ( !amaster )
+ return FT_THROW( Invalid_Argument );
+
error = ft_face_get_mm_service( face, &service );
if ( !error )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( service->get_mm_var )
error = service->get_mm_var( face, amaster );
}
@@ -115,10 +127,15 @@
FT_Service_MultiMasters service;
+ /* check of `face' delayed to `ft_face_get_mm_service' */
+
+ if ( !coords )
+ return FT_THROW( Invalid_Argument );
+
error = ft_face_get_mm_service( face, &service );
if ( !error )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( service->set_mm_design )
error = service->set_mm_design( face, num_coords, coords );
}
@@ -138,10 +155,15 @@
FT_Service_MultiMasters service;
+ /* check of `face' delayed to `ft_face_get_mm_service' */
+
+ if ( !coords )
+ return FT_THROW( Invalid_Argument );
+
error = ft_face_get_mm_service( face, &service );
if ( !error )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( service->set_var_design )
error = service->set_var_design( face, num_coords, coords );
}
@@ -161,10 +183,15 @@
FT_Service_MultiMasters service;
+ /* check of `face' delayed to `ft_face_get_mm_service' */
+
+ if ( !coords )
+ return FT_THROW( Invalid_Argument );
+
error = ft_face_get_mm_service( face, &service );
if ( !error )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( service->set_mm_blend )
error = service->set_mm_blend( face, num_coords, coords );
}
@@ -187,10 +214,15 @@
FT_Service_MultiMasters service;
+ /* check of `face' delayed to `ft_face_get_mm_service' */
+
+ if ( !coords )
+ return FT_THROW( Invalid_Argument );
+
error = ft_face_get_mm_service( face, &service );
if ( !error )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( service->set_mm_blend )
error = service->set_mm_blend( face, num_coords, coords );
}
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 36ee797..ee15a01 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (body). */
/* */
-/* Copyright 1996-2012 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,6 +29,7 @@
#include FT_TRUETYPE_TAGS_H
#include FT_TRUETYPE_IDS_H
+#include FT_SERVICE_PROPERTIES_H
#include FT_SERVICE_SFNT_H
#include FT_SERVICE_POSTSCRIPT_NAME_H
#include FT_SERVICE_GLYPH_DICT_H
@@ -40,6 +41,30 @@
#include "ftbase.h"
#endif
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+#include FT_BITMAP_H
+
+#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
+ /* We disable the warning `conversion from XXX to YYY, */
+ /* possible loss of data' in order to compile cleanly with */
+ /* the maximum level of warnings: `md5.c' is non-FreeType */
+ /* code, and it gets used during development builds only. */
+#pragma warning( push )
+#pragma warning( disable : 4244 )
+#endif /* _MSC_VER */
+
+ /* it's easiest to include `md5.c' directly */
+#include "md5.c"
+
+#if defined( _MSC_VER )
+#pragma warning( pop )
+#endif
+
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
+
#define GRID_FIT_METRICS
@@ -136,10 +161,10 @@
*astream = 0;
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
if ( !args )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
memory = library->memory;
@@ -177,7 +202,7 @@
#endif
else
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
if ( error )
FT_FREE( stream );
@@ -383,8 +408,11 @@
FT_GlyphSlot slot = NULL;
- if ( !face || !face->driver )
- return FT_Err_Invalid_Argument;
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
+
+ if ( !face->driver )
+ return FT_THROW( Invalid_Argument );
driver = face->driver;
clazz = driver->clazz;
@@ -483,6 +511,7 @@
internal->transform_matrix.xy = 0;
internal->transform_matrix.yx = 0;
internal->transform_matrix.yy = 0x10000L;
+
matrix = &internal->transform_matrix;
}
else
@@ -498,6 +527,7 @@
{
internal->transform_delta.x = 0;
internal->transform_delta.y = 0;
+
delta = &internal->transform_delta;
}
else
@@ -574,7 +604,7 @@
if ( !face || !face->size || !face->glyph )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
/* The validity test for `glyph_index' is performed by the */
/* font drivers. */
@@ -640,18 +670,25 @@
/* the check for `num_locations' assures that we actually */
/* test for instructions in a TTF and not in a CFF-based OTF */
+ /* */
+ /* since `maxSizeOfInstructions' might be unreliable, we */
+ /* check the size of the `fpgm' and `prep' tables, too -- */
+ /* the assumption is that there don't exist real TTFs where */
+ /* both `fpgm' and `prep' tables are missing */
if ( mode == FT_RENDER_MODE_LIGHT ||
face->internal->ignore_unpatented_hinter ||
( FT_IS_SFNT( face ) &&
ttface->num_locations &&
- ttface->max_profile.maxSizeOfInstructions == 0 ) )
+ ttface->max_profile.maxSizeOfInstructions == 0 &&
+ ttface->font_program_size == 0 &&
+ ttface->cvt_program_size == 0 ) )
autohint = TRUE;
}
}
if ( autohint )
{
- FT_AutoHinter_Service hinting;
+ FT_AutoHinter_Interface hinting;
/* try to load embedded bitmaps first if available */
@@ -680,7 +717,7 @@
internal->transform_flags = 0;
/* load auto-hinted outline */
- hinting = (FT_AutoHinter_Service)hinter->clazz->module_interface;
+ hinting = (FT_AutoHinter_Interface)hinter->clazz->module_interface;
error = hinting->load_glyph( (FT_AutoHinter)hinter,
slot, face->size,
@@ -814,7 +851,7 @@
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
glyph_index = (FT_UInt)char_code;
if ( face->charmap )
@@ -965,7 +1002,7 @@
first = face->charmaps;
if ( !first )
- return FT_Err_Invalid_CharMap_Handle;
+ return FT_THROW( Invalid_CharMap_Handle );
/*
* The original TrueType specification(s) only specified charmap
@@ -1008,14 +1045,6 @@
( 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;
}
@@ -1030,20 +1059,12 @@
{
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;
}
}
- return FT_Err_Invalid_CharMap_Handle;
+ return FT_THROW( Invalid_CharMap_Handle );
}
@@ -1079,17 +1100,7 @@
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;
@@ -1106,7 +1117,8 @@
/* */
static FT_Error
open_face( FT_Driver driver,
- FT_Stream stream,
+ FT_Stream *astream,
+ FT_Bool external_stream,
FT_Long face_index,
FT_Int num_params,
FT_Parameter* params,
@@ -1114,10 +1126,11 @@
{
FT_Memory memory;
FT_Driver_Class clazz;
- FT_Face face = 0;
- FT_Error error, error2;
+ FT_Face face = NULL;
FT_Face_Internal internal = NULL;
+ FT_Error error, error2;
+
clazz = driver->clazz;
memory = driver->root.memory;
@@ -1126,15 +1139,19 @@
if ( FT_ALLOC( face, clazz->face_object_size ) )
goto Fail;
+ face->driver = driver;
+ face->memory = memory;
+ face->stream = *astream;
+
+ /* set the FT_FACE_FLAG_EXTERNAL_STREAM bit for FT_Done_Face */
+ if ( external_stream )
+ face->face_flags |= FT_FACE_FLAG_EXTERNAL_STREAM;
+
if ( FT_NEW( internal ) )
goto Fail;
face->internal = internal;
- face->driver = driver;
- face->memory = memory;
- face->stream = stream;
-
#ifdef FT_CONFIG_OPTION_INCREMENTAL
{
int i;
@@ -1150,11 +1167,12 @@
#endif
if ( clazz->init_face )
- error = clazz->init_face( stream,
+ error = clazz->init_face( *astream,
face,
(FT_Int)face_index,
num_params,
params );
+ *astream = face->stream; /* Stream may have been changed. */
if ( error )
goto Fail;
@@ -1165,7 +1183,7 @@
/* is returned. */
/* no error should happen, but we want to play safe */
- if ( error2 && error2 != FT_Err_Invalid_CharMap_Handle )
+ if ( error2 && FT_ERR_NEQ( error2, Invalid_CharMap_Handle ) )
{
error = error2;
goto Fail;
@@ -1204,9 +1222,9 @@
FT_Open_Args args;
- /* test for valid `library' and `aface' delayed to FT_Open_Face() */
+ /* test for valid `library' and `aface' delayed to `FT_Open_Face' */
if ( !pathname )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
args.flags = FT_OPEN_PATHNAME;
args.pathname = (char*)pathname;
@@ -1230,9 +1248,9 @@
FT_Open_Args args;
- /* test for valid `library' and `face' delayed to FT_Open_Face() */
+ /* test for valid `library' and `face' delayed to `FT_Open_Face' */
if ( !file_base )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
args.flags = FT_OPEN_MEMORY;
args.memory_base = file_base;
@@ -1304,10 +1322,10 @@
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
if ( !base )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
*astream = 0;
memory = library->memory;
@@ -1421,7 +1439,7 @@
if ( FT_READ_ULONG( tag ) )
return error;
if ( tag != TTAG_typ1 )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
if ( FT_READ_USHORT( numTables ) )
return error;
@@ -1458,7 +1476,7 @@
if ( face_index >= 0 && pstable_index == face_index )
return FT_Err_Ok;
}
- return FT_Err_Table_Missing;
+ return FT_THROW( Table_Missing );
}
@@ -1504,7 +1522,7 @@
error = open_face_from_buffer( library,
sfnt_ps,
length,
- face_index < 0 ? face_index : 0,
+ FT_MIN( face_index, 0 ),
is_sfnt_cid ? "cid" : "type1",
aface );
Exit:
@@ -1512,7 +1530,7 @@
FT_Error error1;
- if ( error == FT_Err_Unknown_File_Format )
+ if ( FT_ERR_EQ( error, Unknown_File_Format ) )
{
error1 = FT_Stream_Seek( stream, pos );
if ( error1 )
@@ -1540,13 +1558,13 @@
FT_Long face_index,
FT_Face *aface )
{
- FT_Error error = FT_Err_Cannot_Open_Resource;
+ FT_Error error = FT_ERR( Cannot_Open_Resource );
FT_Memory memory = library->memory;
FT_Byte* pfb_data = NULL;
int i, type, flags;
- FT_Long len;
- FT_Long pfb_len, pfb_pos, pfb_lenpos;
- FT_Long rlen, temp;
+ FT_ULong len;
+ FT_ULong pfb_len, pfb_pos, pfb_lenpos;
+ FT_ULong rlen, temp;
if ( face_index == -1 )
@@ -1562,11 +1580,34 @@
error = FT_Stream_Seek( stream, offsets[i] );
if ( error )
goto Exit;
- if ( FT_READ_LONG( temp ) )
+ if ( FT_READ_ULONG( temp ) )
+ goto Exit;
+
+ /* FT2 allocator takes signed long buffer length,
+ * too large value causing overflow should be checked
+ */
+ FT_TRACE4(( " POST fragment #%d: length=0x%08x\n",
+ i, temp));
+ if ( 0x7FFFFFFFUL < temp || pfb_len + temp + 6 < pfb_len )
+ {
+ FT_TRACE2(( " too long fragment length makes"
+ " pfb_len confused: temp=0x%08x\n", temp ));
+ error = FT_THROW( Invalid_Offset );
goto Exit;
+ }
+
pfb_len += temp + 6;
}
+ FT_TRACE2(( " total buffer size to concatenate %d"
+ " POST fragments: 0x%08x\n",
+ resource_cnt, pfb_len + 2));
+ if ( pfb_len + 2 < 6 ) {
+ FT_TRACE2(( " too long fragment length makes"
+ " pfb_len confused: pfb_len=0x%08x\n", pfb_len ));
+ error = FT_THROW( Array_Too_Large );
+ goto Exit;
+ }
if ( FT_ALLOC( pfb_data, (FT_Long)pfb_len + 2 ) )
goto Exit;
@@ -1586,16 +1627,30 @@
error = FT_Stream_Seek( stream, offsets[i] );
if ( error )
goto Exit2;
- if ( FT_READ_LONG( rlen ) )
- goto Exit;
+ if ( FT_READ_ULONG( rlen ) )
+ goto Exit2;
+
+ /* FT2 allocator takes signed long buffer length,
+ * too large fragment length causing overflow should be checked
+ */
+ if ( 0x7FFFFFFFUL < rlen )
+ {
+ error = FT_THROW( Invalid_Offset );
+ goto Exit2;
+ }
+
if ( FT_READ_USHORT( flags ) )
- goto Exit;
+ goto Exit2;
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ error = FT_ERR( Array_Too_Large );
/* postpone the check of rlen longer than buffer until FT_Stream_Read() */
if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ {
+ FT_TRACE3(( " Skip POST fragment #%d because it is a comment\n", i ));
continue;
+ }
/* the flags are part of the resource, so rlen >= 2. */
/* but some fonts declare rlen = 0 for empty fragment */
@@ -1608,6 +1663,8 @@
len += rlen;
else
{
+ FT_TRACE3(( " Write POST fragment #%d header (4-byte) to buffer"
+ " 0x%p + 0x%08x\n", i, pfb_data, pfb_lenpos ));
if ( pfb_lenpos + 3 > pfb_len + 2 )
goto Exit2;
pfb_data[pfb_lenpos ] = (FT_Byte)( len );
@@ -1618,6 +1675,8 @@
if ( ( flags >> 8 ) == 5 ) /* End of font mark */
break;
+ FT_TRACE3(( " Write POST fragment #%d header (6-byte) to buffer"
+ " 0x%p + 0x%08x\n", i, pfb_data, pfb_pos ));
if ( pfb_pos + 6 > pfb_len + 2 )
goto Exit2;
pfb_data[pfb_pos++] = 0x80;
@@ -1633,16 +1692,18 @@
pfb_data[pfb_pos++] = 0;
}
- error = FT_Err_Cannot_Open_Resource;
if ( pfb_pos > pfb_len || pfb_pos + rlen > pfb_len )
goto Exit2;
+ FT_TRACE3(( " Load POST fragment #%d (%d byte) to buffer"
+ " 0x%p + 0x%08x\n", i, rlen, pfb_data, pfb_pos ));
error = FT_Stream_Read( stream, (FT_Byte *)pfb_data + pfb_pos, rlen );
if ( error )
goto Exit2;
pfb_pos += rlen;
}
+ error = FT_ERR( Array_Too_Large );
if ( pfb_pos + 2 > pfb_len + 2 )
goto Exit2;
pfb_data[pfb_pos++] = 0x80;
@@ -1663,6 +1724,13 @@
aface );
Exit2:
+ if ( error == FT_ERR( Array_Too_Large ) )
+ FT_TRACE2(( " Abort due to too-short buffer to store"
+ " all POST fragments\n" ));
+ else if ( error == FT_ERR( Invalid_Offset ) )
+ FT_TRACE2(( " Abort due to invalid offset in a POST fragment\n" ));
+ if ( error )
+ error = FT_ERR( Cannot_Open_Resource );
FT_FREE( pfb_data );
Exit:
@@ -1695,7 +1763,7 @@
if ( face_index == -1 )
face_index = 0;
if ( face_index >= resource_cnt )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
flag_offset = offsets[face_index];
error = FT_Stream_Seek( stream, flag_offset );
@@ -1705,7 +1773,7 @@
if ( FT_READ_LONG( rlen ) )
goto Exit;
if ( rlen == -1 )
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
error = open_face_PS_from_sfnt_stream( library,
stream,
@@ -1762,9 +1830,10 @@
if ( error )
return error;
+ /* POST resources must be sorted to concatenate properly */
error = FT_Raccess_Get_DataOffsets( library, stream,
map_offset, rdara_pos,
- TTAG_POST,
+ TTAG_POST, TRUE,
&data_offsets, &count );
if ( !error )
{
@@ -1777,9 +1846,11 @@
return error;
}
+ /* sfnt resources should not be sorted to preserve the face order by
+ QuickDraw API */
error = FT_Raccess_Get_DataOffsets( library, stream,
map_offset, rdara_pos,
- TTAG_sfnt,
+ TTAG_sfnt, FALSE,
&data_offsets, &count );
if ( !error )
{
@@ -1812,7 +1883,7 @@
if ( NULL == stream )
- return FT_Err_Invalid_Stream_Operation;
+ return FT_THROW( Invalid_Stream_Operation );
error = FT_Stream_Seek( stream, 0 );
if ( error )
@@ -1829,7 +1900,7 @@
header[ 1] > 33 ||
header[63] != 0 ||
header[2 + header[1]] != 0 )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
dlen = ( header[0x53] << 24 ) |
( header[0x54] << 16 ) |
@@ -1839,7 +1910,7 @@
rlen = ( header[0x57] << 24 ) |
( header[0x58] << 16 ) |
( header[0x59] << 8 ) |
- header[0x5a];
+ header[0x5A];
#endif /* 0 */
offset = 128 + ( ( dlen + 127 ) & ~127 );
@@ -1862,7 +1933,7 @@
#define FT_COMPONENT trace_raccess
FT_Memory memory = library->memory;
- FT_Error error = FT_Err_Unknown_File_Format;
+ FT_Error error = FT_ERR( Unknown_File_Format );
int i;
char * file_names[FT_RACCESS_N_RULES];
@@ -1901,7 +1972,7 @@
i, args2.pathname, offsets[i] ));
error = FT_Stream_New( library, &args2, &stream2 );
- if ( is_darwin_vfs && error == FT_Err_Cannot_Open_Stream )
+ if ( is_darwin_vfs && FT_ERR_EQ( error, Cannot_Open_Stream ) )
vfs_rfork_has_no_font = TRUE;
if ( error )
@@ -1930,7 +2001,7 @@
/* Caller (load_mac_face) requires FT_Err_Unknown_File_Format. */
if ( error )
- error = FT_Err_Unknown_File_Format;
+ error = FT_ERR( Unknown_File_Format );
return error;
@@ -1959,7 +2030,7 @@
error = IsMacBinary( library, stream, face_index, aface );
- if ( FT_ERROR_BASE( error ) == FT_Err_Unknown_File_Format )
+ if ( FT_ERR_EQ( error, Unknown_File_Format ) )
{
#undef FT_COMPONENT
@@ -1976,9 +2047,9 @@
}
- if ( ( FT_ERROR_BASE( error ) == FT_Err_Unknown_File_Format ||
- FT_ERROR_BASE( error ) == FT_Err_Invalid_Stream_Operation ) &&
- ( args->flags & FT_OPEN_PATHNAME ) )
+ if ( ( FT_ERR_EQ( error, Unknown_File_Format ) ||
+ FT_ERR_EQ( error, Invalid_Stream_Operation ) ) &&
+ ( args->flags & FT_OPEN_PATHNAME ) )
error = load_face_in_embedded_rfork( library, stream,
face_index, aface, args );
return error;
@@ -1997,8 +2068,8 @@
FT_Face *aface )
{
FT_Error error;
- FT_Driver driver;
- FT_Memory memory;
+ FT_Driver driver = NULL;
+ FT_Memory memory = NULL;
FT_Stream stream = NULL;
FT_Face face = NULL;
FT_ListNode node = NULL;
@@ -2007,11 +2078,10 @@
FT_Module* limit;
- /* test for valid `library' delayed to */
- /* FT_Stream_New() */
+ /* test for valid `library' delayed to `FT_Stream_New' */
if ( ( !aface && face_index >= 0 ) || !args )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
external_stream = FT_BOOL( ( args->flags & FT_OPEN_STREAM ) &&
args->stream );
@@ -2042,24 +2112,25 @@
params = args->params;
}
- error = open_face( driver, stream, face_index,
+ error = open_face( driver, &stream, external_stream, face_index,
num_params, params, &face );
if ( !error )
goto Success;
}
else
- error = FT_Err_Invalid_Handle;
+ error = FT_THROW( Invalid_Handle );
FT_Stream_Free( stream, external_stream );
goto Fail;
}
else
{
+ error = FT_ERR( Missing_Module );
+
/* check each font driver for an appropriate format */
cur = library->modules;
limit = cur + library->num_modules;
-
for ( ; cur < limit; cur++ )
{
/* not all modules are font drivers, so check... */
@@ -2077,14 +2148,14 @@
params = args->params;
}
- error = open_face( driver, stream, face_index,
+ error = open_face( driver, &stream, external_stream, face_index,
num_params, params, &face );
if ( !error )
goto Success;
#ifdef FT_CONFIG_OPTION_MAC_FONTS
if ( ft_strcmp( cur[0]->clazz->module_name, "truetype" ) == 0 &&
- FT_ERROR_BASE( error ) == FT_Err_Table_Missing )
+ FT_ERR_EQ( error, Table_Missing ) )
{
/* TrueType but essential tables are missing */
if ( FT_Stream_Seek( stream, 0 ) )
@@ -2104,39 +2175,39 @@
}
#endif
- if ( FT_ERROR_BASE( error ) != FT_Err_Unknown_File_Format )
+ if ( FT_ERR_NEQ( error, Unknown_File_Format ) )
goto Fail3;
}
}
- Fail3:
- /* If we are on the mac, and we get an FT_Err_Invalid_Stream_Operation */
- /* it may be because we have an empty data fork, so we need to check */
- /* the resource fork. */
- if ( FT_ERROR_BASE( error ) != FT_Err_Cannot_Open_Stream &&
- FT_ERROR_BASE( error ) != FT_Err_Unknown_File_Format &&
- FT_ERROR_BASE( error ) != FT_Err_Invalid_Stream_Operation )
- goto Fail2;
+ Fail3:
+ /* If we are on the mac, and we get an */
+ /* FT_Err_Invalid_Stream_Operation it may be because we have an */
+ /* empty data fork, so we need to check the resource fork. */
+ if ( FT_ERR_NEQ( error, Cannot_Open_Stream ) &&
+ FT_ERR_NEQ( error, Unknown_File_Format ) &&
+ FT_ERR_NEQ( error, Invalid_Stream_Operation ) )
+ goto Fail2;
#if !defined( FT_MACINTOSH ) && defined( FT_CONFIG_OPTION_MAC_FONTS )
- error = load_mac_face( library, stream, face_index, aface, args );
- if ( !error )
- {
- /* We don't want to go to Success here. We've already done that. */
- /* On the other hand, if we succeeded we still need to close this */
- /* stream (we opened a different stream which extracted the */
- /* interesting information out of this stream here. That stream */
- /* will still be open and the face will point to it). */
- FT_Stream_Free( stream, external_stream );
- return error;
- }
+ error = load_mac_face( library, stream, face_index, aface, args );
+ if ( !error )
+ {
+ /* We don't want to go to Success here. We've already done that. */
+ /* On the other hand, if we succeeded we still need to close this */
+ /* stream (we opened a different stream which extracted the */
+ /* interesting information out of this stream here. That stream */
+ /* will still be open and the face will point to it). */
+ FT_Stream_Free( stream, external_stream );
+ return error;
+ }
- if ( FT_ERROR_BASE( error ) != FT_Err_Unknown_File_Format )
- goto Fail2;
+ if ( FT_ERR_NEQ( error, Unknown_File_Format ) )
+ goto Fail2;
#endif /* !FT_MACINTOSH && FT_CONFIG_OPTION_MAC_FONTS */
/* no driver is able to handle this format */
- error = FT_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
Fail2:
FT_Stream_Free( stream, external_stream );
@@ -2146,10 +2217,6 @@
Success:
FT_TRACE4(( "FT_Open_Face: New face object, adding to list\n" ));
- /* set the FT_FACE_FLAG_EXTERNAL_STREAM bit for FT_Done_Face */
- if ( external_stream )
- face->face_flags |= FT_FACE_FLAG_EXTERNAL_STREAM;
-
/* add the face object to its driver's list */
if ( FT_NEW( node ) )
goto Fail;
@@ -2237,7 +2304,10 @@
goto Exit;
Fail:
- FT_Done_Face( face );
+ if ( node )
+ FT_Done_Face( face ); /* face must be in the driver's list */
+ else if ( face )
+ destroy_face( memory, face, driver );
Exit:
FT_TRACE4(( "FT_Open_Face: Return %d\n", error ));
@@ -2255,10 +2325,10 @@
FT_Open_Args open;
- /* test for valid `face' delayed to FT_Attach_Stream() */
+ /* test for valid `face' delayed to `FT_Attach_Stream' */
if ( !filepathname )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
open.stream = NULL;
open.flags = FT_OPEN_PATHNAME;
@@ -2281,14 +2351,14 @@
FT_Driver_Class clazz;
- /* test for valid `parameters' delayed to FT_Stream_New() */
+ /* test for valid `parameters' delayed to `FT_Stream_New' */
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
driver = face->driver;
if ( !driver )
- return FT_Err_Invalid_Driver_Handle;
+ return FT_THROW( Invalid_Driver_Handle );
error = FT_Stream_New( driver->root.library, parameters, &stream );
if ( error )
@@ -2297,7 +2367,7 @@
/* we implement FT_Attach_Stream in each driver through the */
/* `attach_file' interface */
- error = FT_Err_Unimplemented_Feature;
+ error = FT_ERR( Unimplemented_Feature );
clazz = driver->clazz;
if ( clazz->attach_file )
error = clazz->attach_file( face, stream );
@@ -2317,6 +2387,9 @@
FT_EXPORT_DEF( FT_Error )
FT_Reference_Face( FT_Face face )
{
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
+
face->internal->refcount++;
return FT_Err_Ok;
@@ -2334,7 +2407,7 @@
FT_ListNode node;
- error = FT_Err_Invalid_Face_Handle;
+ error = FT_ERR( Invalid_Face_Handle );
if ( face && face->driver )
{
face->internal->refcount--;
@@ -2380,13 +2453,13 @@
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
if ( !asize )
- return FT_Err_Invalid_Size_Handle;
+ return FT_THROW( Invalid_Argument );
if ( !face->driver )
- return FT_Err_Invalid_Driver_Handle;
+ return FT_THROW( Invalid_Driver_Handle );
*asize = 0;
@@ -2438,15 +2511,15 @@
if ( !size )
- return FT_Err_Invalid_Size_Handle;
+ return FT_THROW( Invalid_Size_Handle );
face = size->face;
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
driver = face->driver;
if ( !driver )
- return FT_Err_Invalid_Driver_Handle;
+ return FT_THROW( Invalid_Driver_Handle );
memory = driver->root.memory;
@@ -2467,7 +2540,7 @@
destroy_size( memory, size, driver );
}
else
- error = FT_Err_Invalid_Size_Handle;
+ error = FT_THROW( Invalid_Size_Handle );
return error;
}
@@ -2486,11 +2559,11 @@
if ( !FT_HAS_FIXED_SIZES( face ) )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
/* FT_Bitmap_Size doesn't provide enough info... */
if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
w = FT_REQUEST_WIDTH ( req );
h = FT_REQUEST_HEIGHT( req );
@@ -2513,6 +2586,8 @@
if ( w == FT_PIX_ROUND( bsize->x_ppem ) || ignore_width )
{
+ FT_TRACE3(( "FT_Match_Size: bitmap strike %d matches\n", i ));
+
if ( size_index )
*size_index = (FT_ULong)i;
@@ -2520,7 +2595,7 @@
}
}
- return FT_Err_Invalid_Pixel_Size;
+ return FT_THROW( Invalid_Pixel_Size );
}
@@ -2763,10 +2838,10 @@
if ( !face || !FT_HAS_FIXED_SIZES( face ) )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
if ( strike_index < 0 || strike_index >= face->num_fixed_sizes )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
clazz = face->driver->clazz;
@@ -2816,11 +2891,11 @@
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
if ( !req || req->width < 0 || req->height < 0 ||
req->type >= FT_SIZE_REQUEST_TYPE_MAX )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
clazz = face->driver->clazz;
@@ -2869,9 +2944,6 @@
if ( error )
return error;
- FT_TRACE3(( "FT_Request_Size: bitmap strike %lu matched\n",
- strike_index ));
-
return FT_Select_Size( face, (FT_Int)strike_index );
}
@@ -2893,6 +2965,8 @@
FT_Size_RequestRec req;
+ /* check of `face' delayed to `FT_Request_Size' */
+
if ( !char_width )
char_width = char_height;
else if ( !char_height )
@@ -2931,6 +3005,8 @@
FT_Size_RequestRec req;
+ /* check of `face' delayed to `FT_Request_Size' */
+
if ( pixel_width == 0 )
pixel_width = pixel_height;
else if ( pixel_height == 0 )
@@ -2971,10 +3047,10 @@
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
if ( !akerning )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
driver = face->driver;
@@ -3030,14 +3106,14 @@
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
if ( !akerning )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
FT_FACE_FIND_SERVICE( face, service, KERNING );
if ( !service )
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
error = service->get_track( face,
point_size,
@@ -3059,10 +3135,10 @@
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
if ( encoding == FT_ENCODING_NONE )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* FT_ENCODING_UNICODE is special. We try to find the `best' Unicode */
/* charmap available, i.e., one with UCS-4 characters, if possible. */
@@ -3073,7 +3149,7 @@
cur = face->charmaps;
if ( !cur )
- return FT_Err_Invalid_CharMap_Handle;
+ return FT_THROW( Invalid_CharMap_Handle );
limit = cur + face->num_charmaps;
@@ -3081,21 +3157,12 @@
{
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;
}
}
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
@@ -3110,13 +3177,14 @@
if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
cur = face->charmaps;
- if ( !cur )
- return FT_Err_Invalid_CharMap_Handle;
+ if ( !cur || !charmap )
+ return FT_THROW( Invalid_CharMap_Handle );
+
if ( FT_Get_CMap_Format( charmap ) == 14 )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
limit = cur + face->num_charmaps;
@@ -3124,20 +3192,12 @@
{
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;
+ return FT_Err_Ok;
}
}
- return FT_Err_Invalid_Argument;
+
+ return FT_THROW( Invalid_Argument );
}
@@ -3158,15 +3218,6 @@
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;
}
@@ -3176,7 +3227,7 @@
{
FT_CMap_Class clazz = cmap->clazz;
FT_Face face = cmap->charmap.face;
- FT_Memory memory = FT_FACE_MEMORY(face);
+ FT_Memory memory = FT_FACE_MEMORY( face );
if ( clazz->done )
@@ -3245,7 +3296,7 @@
if ( clazz == NULL || charmap == NULL || charmap->face == NULL )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
face = charmap->face;
memory = FT_FACE_MEMORY( face );
@@ -3319,6 +3370,7 @@
FT_UInt gindex = 0;
+ /* only do something if we have a charmap, and we have glyphs at all */
if ( face && face->charmap && face->num_glyphs )
{
gindex = FT_Get_Char_Index( face, 0 );
@@ -3350,8 +3402,10 @@
FT_CMap cmap = FT_CMAP( face->charmap );
- do {
+ do
+ {
gindex = cmap->clazz->char_next( cmap, &code );
+
} while ( gindex >= (FT_UInt)face->num_glyphs );
result = ( gindex == 0 ) ? 0 : code;
@@ -3374,8 +3428,9 @@
FT_UInt result = 0;
- if ( face && face->charmap &&
- face->charmap->encoding == FT_ENCODING_UNICODE )
+ if ( face &&
+ face->charmap &&
+ face->charmap->encoding == FT_ENCODING_UNICODE )
{
FT_CharMap charmap = find_variant_selector_charmap( face );
FT_CMap ucmap = FT_CMAP( face->charmap );
@@ -3553,7 +3608,9 @@
FT_UInt result = 0;
- if ( face && FT_HAS_GLYPH_NAMES( face ) )
+ if ( face &&
+ FT_HAS_GLYPH_NAMES( face ) &&
+ glyph_name )
{
FT_Service_GlyphDict service;
@@ -3578,27 +3635,30 @@
FT_Pointer buffer,
FT_UInt buffer_max )
{
- FT_Error error = FT_Err_Invalid_Argument;
+ FT_Error error;
+ FT_Service_GlyphDict service;
- /* clean up buffer */
- if ( buffer && buffer_max > 0 )
- ((FT_Byte*)buffer)[0] = 0;
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
- if ( face &&
- (FT_Long)glyph_index <= face->num_glyphs &&
- FT_HAS_GLYPH_NAMES( face ) )
- {
- FT_Service_GlyphDict service;
+ if ( !buffer || buffer_max == 0 )
+ return FT_THROW( Invalid_Argument );
+ /* clean up buffer */
+ ((FT_Byte*)buffer)[0] = '\0';
- FT_FACE_LOOKUP_SERVICE( face,
- service,
- GLYPH_DICT );
+ if ( (FT_Long)glyph_index >= face->num_glyphs )
+ return FT_THROW( Invalid_Glyph_Index );
- if ( service && service->get_name )
- error = service->get_name( face, glyph_index, buffer, buffer_max );
- }
+ if ( !FT_HAS_GLYPH_NAMES( face ) )
+ return FT_THROW( Invalid_Argument );
+
+ FT_FACE_LOOKUP_SERVICE( face, service, GLYPH_DICT );
+ if ( service && service->get_name )
+ error = service->get_name( face, glyph_index, buffer, buffer_max );
+ else
+ error = FT_THROW( Invalid_Argument );
return error;
}
@@ -3639,7 +3699,7 @@
FT_Get_Sfnt_Table( FT_Face face,
FT_Sfnt_Tag tag )
{
- void* table = 0;
+ void* table = NULL;
FT_Service_SFNT_Table service;
@@ -3667,11 +3727,11 @@
if ( !face || !FT_IS_SFNT( face ) )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );
if ( service == NULL )
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
return service->load_table( face, tag, offset, buffer, length );
}
@@ -3689,12 +3749,14 @@
FT_ULong offset;
+ /* test for valid `length' delayed to `service->table_info' */
+
if ( !face || !FT_IS_SFNT( face ) )
- return FT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );
if ( service == NULL )
- return FT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
return service->table_info( face, table_index, tag, &offset, length );
}
@@ -3756,12 +3818,12 @@
FT_Face face;
- if ( size == NULL )
- return FT_Err_Invalid_Argument;
+ if ( !size )
+ return FT_THROW( Invalid_Size_Handle );
face = size->face;
- if ( face == NULL || face->driver == NULL )
- return FT_Err_Invalid_Argument;
+ if ( !face || !face->driver )
+ return FT_THROW( Invalid_Face_Handle );
/* we don't need anything more complex than that; all size objects */
/* are already listed by the face */
@@ -3903,11 +3965,17 @@
static void
ft_remove_renderer( FT_Module module )
{
- FT_Library library = module->library;
- FT_Memory memory = library->memory;
+ FT_Library library;
+ FT_Memory memory;
FT_ListNode node;
+ library = module->library;
+ if ( !library )
+ return;
+
+ memory = library->memory;
+
node = FT_List_Find( &library->renderers, module );
if ( node )
{
@@ -3934,7 +4002,7 @@
FT_Get_Renderer( FT_Library library,
FT_Glyph_Format format )
{
- /* test for valid `library' delayed to FT_Lookup_Renderer() */
+ /* test for valid `library' delayed to `FT_Lookup_Renderer' */
return FT_Lookup_Renderer( library, format, 0 );
}
@@ -3951,17 +4019,31 @@
FT_ListNode node;
FT_Error error = FT_Err_Ok;
+ FT_Renderer_SetModeFunc set_mode;
+
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ {
+ error = FT_THROW( Invalid_Library_Handle );
+ goto Exit;
+ }
if ( !renderer )
- return FT_Err_Invalid_Argument;
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
+ if ( num_params > 0 && !parameters )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
node = FT_List_Find( &library->renderers, renderer );
if ( !node )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -3970,18 +4052,14 @@
if ( renderer->glyph_format == FT_GLYPH_FORMAT_OUTLINE )
library->cur_renderer = renderer;
- if ( num_params > 0 )
- {
- FT_Renderer_SetModeFunc set_mode = renderer->clazz->set_mode;
-
+ set_mode = renderer->clazz->set_mode;
- for ( ; num_params > 0; num_params-- )
- {
- error = set_mode( renderer, parameters->tag, parameters->data );
- if ( error )
- break;
- parameters++;
- }
+ for ( ; num_params > 0; num_params-- )
+ {
+ error = set_mode( renderer, parameters->tag, parameters->data );
+ if ( error )
+ break;
+ parameters++;
}
Exit:
@@ -4019,12 +4097,12 @@
else
renderer = FT_Lookup_Renderer( library, slot->format, &node );
- error = FT_Err_Unimplemented_Feature;
+ error = FT_ERR( Unimplemented_Feature );
while ( renderer )
{
error = renderer->render( renderer, slot, render_mode, NULL );
- if ( !error ||
- FT_ERROR_BASE( error ) != FT_Err_Cannot_Render_Glyph )
+ if ( !error ||
+ FT_ERR_NEQ( error, Cannot_Render_Glyph ) )
break;
/* FT_Err_Cannot_Render_Glyph is returned if the render mode */
@@ -4040,10 +4118,57 @@
/* if we changed the current renderer for the glyph image format */
/* we need to select it as the next current one */
if ( !error && update && renderer )
- FT_Set_Renderer( library, renderer, 0, 0 );
+ {
+ error = FT_Set_Renderer( library, renderer, 0, 0 );
+ if ( error )
+ break;
+ }
+ }
+ }
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_bitmap
+
+ /* we convert to a single bitmap format for computing the checksum */
+ if ( !error )
+ {
+ FT_Bitmap bitmap;
+ FT_Error err;
+
+
+ FT_Bitmap_New( &bitmap );
+
+ /* this also converts the bitmap flow to `down' (i.e., pitch > 0) */
+ err = FT_Bitmap_Convert( library, &slot->bitmap, &bitmap, 1 );
+ if ( !err )
+ {
+ MD5_CTX ctx;
+ unsigned char md5[16];
+ int i;
+
+
+ MD5_Init( &ctx);
+ MD5_Update( &ctx, bitmap.buffer, bitmap.rows * bitmap.pitch );
+ MD5_Final( md5, &ctx );
+
+ FT_TRACE3(( "MD5 checksum for %dx%d bitmap:\n"
+ " ",
+ bitmap.rows, bitmap.pitch ));
+ for ( i = 0; i < 16; i++ )
+ FT_TRACE3(( "%02X", md5[i] ));
+ FT_TRACE3(( "\n" ));
}
+
+ FT_Bitmap_Done( library, &bitmap );
}
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_objs
+
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
return error;
}
@@ -4058,7 +4183,7 @@
if ( !slot || !slot->face )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
library = FT_FACE_LIBRARY( slot->face );
@@ -4138,14 +4263,14 @@
FREETYPE_MINOR )
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
if ( !clazz )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* check freetype version */
if ( clazz->module_requires > FREETYPE_VER_FIXED )
- return FT_Err_Invalid_Version;
+ return FT_THROW( Invalid_Version );
/* look for a module with the same name in the library's table */
for ( nn = 0; nn < library->num_modules; nn++ )
@@ -4155,7 +4280,7 @@
{
/* this installed module has the same name, compare their versions */
if ( clazz->module_version <= module->clazz->module_version )
- return FT_Err_Lower_Module_Version;
+ return FT_THROW( Lower_Module_Version );
/* remove the module from our list, then exit the loop to replace */
/* it by our new version.. */
@@ -4169,7 +4294,7 @@
if ( library->num_modules >= FT_MAX_MODULES )
{
- error = FT_Err_Too_Many_Drivers;
+ error = FT_THROW( Too_Many_Drivers );
goto Exit;
}
@@ -4240,7 +4365,8 @@
FT_Renderer renderer = FT_RENDERER( module );
- if ( renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
+ if ( renderer->clazz &&
+ renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
renderer->raster )
renderer->clazz->raster_class->raster_done( renderer->raster );
}
@@ -4256,7 +4382,7 @@
FT_Get_Module( FT_Library library,
const char* module_name )
{
- FT_Module result = 0;
+ FT_Module result = NULL;
FT_Module* cur;
FT_Module* limit;
@@ -4301,19 +4427,18 @@
{
FT_Pointer result = NULL;
+
if ( module )
{
FT_ASSERT( module->clazz && module->clazz->get_interface );
- /* first, look for the service in the module
- */
+ /* first, look for the service in the module */
if ( module->clazz->get_interface )
result = module->clazz->get_interface( module, service_id );
if ( result == NULL )
{
- /* we didn't find it, look in all other modules then
- */
+ /* we didn't find it, look in all other modules then */
FT_Library library = module->library;
FT_Module* cur = library->modules;
FT_Module* limit = cur + library->num_modules;
@@ -4349,7 +4474,7 @@
/* try to find the module from the table, then remove it from there */
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
if ( module )
{
@@ -4378,7 +4503,119 @@
}
}
}
- return FT_Err_Invalid_Driver_Handle;
+ return FT_THROW( Invalid_Driver_Handle );
+ }
+
+
+ static FT_Error
+ ft_property_do( FT_Library library,
+ const FT_String* module_name,
+ const FT_String* property_name,
+ void* value,
+ FT_Bool set )
+ {
+ FT_Module* cur;
+ FT_Module* limit;
+ FT_Module_Interface interface;
+
+ FT_Service_Properties service;
+
+#ifdef FT_DEBUG_LEVEL_ERROR
+ const FT_String* set_name = "FT_Property_Set";
+ const FT_String* get_name = "FT_Property_Get";
+ const FT_String* func_name = set ? set_name : get_name;
+#endif
+
+ FT_Bool missing_func;
+
+
+ if ( !library )
+ return FT_THROW( Invalid_Library_Handle );
+
+ if ( !module_name || !property_name || !value )
+ return FT_THROW( Invalid_Argument );
+
+ cur = library->modules;
+ limit = cur + library->num_modules;
+
+ /* search module */
+ for ( ; cur < limit; cur++ )
+ if ( !ft_strcmp( cur[0]->clazz->module_name, module_name ) )
+ break;
+
+ if ( cur == limit )
+ {
+ FT_ERROR(( "%s: can't find module `%s'\n",
+ func_name, module_name ));
+ return FT_THROW( Missing_Module );
+ }
+
+ /* check whether we have a service interface */
+ if ( !cur[0]->clazz->get_interface )
+ {
+ FT_ERROR(( "%s: module `%s' doesn't support properties\n",
+ func_name, module_name ));
+ return FT_THROW( Unimplemented_Feature );
+ }
+
+ /* search property service */
+ interface = cur[0]->clazz->get_interface( cur[0],
+ FT_SERVICE_ID_PROPERTIES );
+ if ( !interface )
+ {
+ FT_ERROR(( "%s: module `%s' doesn't support properties\n",
+ func_name, module_name ));
+ return FT_THROW( Unimplemented_Feature );
+ }
+
+ service = (FT_Service_Properties)interface;
+
+ if ( set )
+ missing_func = (FT_Bool)( !service->set_property );
+ else
+ missing_func = (FT_Bool)( !service->get_property );
+
+ if ( missing_func )
+ {
+ FT_ERROR(( "%s: property service of module `%s' is broken\n",
+ func_name, module_name ));
+ return FT_THROW( Unimplemented_Feature );
+ }
+
+ return set ? service->set_property( cur[0], property_name, value )
+ : service->get_property( cur[0], property_name, value );
+ }
+
+
+ /* documentation is in ftmodapi.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Property_Set( FT_Library library,
+ const FT_String* module_name,
+ const FT_String* property_name,
+ const void* value )
+ {
+ return ft_property_do( library,
+ module_name,
+ property_name,
+ (void*)value,
+ TRUE );
+ }
+
+
+ /* documentation is in ftmodapi.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Property_Get( FT_Library library,
+ const FT_String* module_name,
+ const FT_String* property_name,
+ void* value )
+ {
+ return ft_property_do( library,
+ module_name,
+ property_name,
+ value,
+ FALSE );
}
@@ -4400,6 +4637,9 @@
FT_EXPORT_DEF( FT_Error )
FT_Reference_Library( FT_Library library )
{
+ if ( !library )
+ return FT_THROW( Invalid_Library_Handle );
+
library->refcount++;
return FT_Err_Ok;
@@ -4416,8 +4656,8 @@
FT_Error error;
- if ( !memory )
- return FT_Err_Invalid_Argument;
+ if ( !memory || !alibrary )
+ return FT_THROW( Invalid_Argument );
#ifdef FT_DEBUG_LEVEL_ERROR
/* init debugging support */
@@ -4504,7 +4744,7 @@
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
library->refcount--;
if ( library->refcount > 0 )
@@ -4651,70 +4891,6 @@
}
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- FT_BASE_DEF( FT_Error )
- ft_stub_set_char_sizes( FT_Size size,
- FT_F26Dot6 width,
- FT_F26Dot6 height,
- FT_UInt horz_res,
- FT_UInt vert_res )
- {
- FT_Size_RequestRec req;
- FT_Driver driver = size->face->driver;
-
-
- if ( driver->clazz->request_size )
- {
- req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
- req.width = width;
- req.height = height;
-
- if ( horz_res == 0 )
- horz_res = vert_res;
-
- if ( vert_res == 0 )
- vert_res = horz_res;
-
- if ( horz_res == 0 )
- horz_res = vert_res = 72;
-
- req.horiResolution = horz_res;
- req.vertResolution = vert_res;
-
- return driver->clazz->request_size( size, &req );
- }
-
- return 0;
- }
-
-
- FT_BASE_DEF( FT_Error )
- ft_stub_set_pixel_sizes( FT_Size size,
- FT_UInt width,
- FT_UInt height )
- {
- FT_Size_RequestRec req;
- FT_Driver driver = size->face->driver;
-
-
- if ( driver->clazz->request_size )
- {
- req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
- req.width = width << 6;
- req.height = height << 6;
- req.horiResolution = 0;
- req.vertResolution = 0;
-
- return driver->clazz->request_size( size, &req );
- }
-
- return 0;
- }
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
/* documentation is in freetype.h */
FT_EXPORT_DEF( FT_Error )
@@ -4726,7 +4902,7 @@
FT_Int *p_arg2,
FT_Matrix *p_transform )
{
- FT_Error error = FT_Err_Invalid_Argument;
+ FT_Error error = FT_ERR( Invalid_Argument );
if ( glyph &&
@@ -4742,6 +4918,8 @@
*p_arg1 = subg->arg1;
*p_arg2 = subg->arg2;
*p_transform = subg->transform;
+
+ error = FT_Err_Ok;
}
return error;
diff --git a/src/base/ftotval.c b/src/base/ftotval.c
index 694fd2b..5fc73d7 100644
--- a/src/base/ftotval.c
+++ b/src/base/ftotval.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating OpenType tables (body). */
/* */
-/* Copyright 2004, 2006, 2008, 2010 by */
+/* Copyright 2004, 2006, 2008, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,6 +16,8 @@
/***************************************************************************/
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_OPENTYPE_VALIDATE_H
#include FT_OPENTYPE_VALIDATE_H
@@ -38,7 +40,7 @@
if ( !face )
{
- error = FT_Err_Invalid_Face_Handle;
+ error = FT_THROW( Invalid_Face_Handle );
goto Exit;
}
@@ -48,7 +50,7 @@
GSUB_table &&
JSTF_table ) )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -63,7 +65,7 @@
GSUB_table,
JSTF_table );
else
- error = FT_Err_Unimplemented_Feature;
+ error = FT_THROW( Unimplemented_Feature );
Exit:
return error;
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 9ae276d..8749d64 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -4,7 +4,7 @@
/* */
/* FreeType outline management (body). */
/* */
-/* Copyright 1996-2008, 2010, 2012 by */
+/* Copyright 1996-2008, 2010, 2012-2014 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_OUTLINE_H
#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_CALC_H
#include FT_INTERNAL_DEBUG_H
#include FT_TRIGONOMETRY_H
@@ -72,8 +73,11 @@
FT_Pos delta;
- if ( !outline || !func_interface )
- return FT_Err_Invalid_Argument;
+ if ( !outline )
+ return FT_THROW( Invalid_Outline );
+
+ if ( !func_interface )
+ return FT_THROW( Invalid_Argument );
shift = func_interface->shift;
delta = func_interface->delta;
@@ -127,7 +131,7 @@
v_start.x = ( v_start.x + v_last.x ) / 2;
v_start.y = ( v_start.y + v_last.y ) / 2;
- v_last = v_start;
+ /* v_last = v_start; */
}
point--;
tags--;
@@ -286,7 +290,7 @@
return error;
Invalid_Outline:
- return FT_Err_Invalid_Outline;
+ return FT_THROW( Invalid_Outline );
}
@@ -300,10 +304,17 @@
if ( !anoutline || !memory )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
*anoutline = null_outline;
+ if ( numContours < 0 ||
+ (FT_UInt)numContours > numPoints )
+ return FT_THROW( Invalid_Argument );
+
+ if ( numPoints > FT_OUTLINE_POINTS_MAX )
+ return FT_THROW( Array_Too_Large );
+
if ( FT_NEW_ARRAY( anoutline->points, numPoints ) ||
FT_NEW_ARRAY( anoutline->tags, numPoints ) ||
FT_NEW_ARRAY( anoutline->contours, numContours ) )
@@ -332,7 +343,7 @@
FT_Outline *anoutline )
{
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
return FT_Outline_New_Internal( library->memory, numPoints,
numContours, anoutline );
@@ -354,7 +365,7 @@
/* empty glyph? */
if ( n_points == 0 && n_contours == 0 )
- return 0;
+ return FT_Err_Ok;
/* check point and contour counts */
if ( n_points <= 0 || n_contours <= 0 )
@@ -376,11 +387,11 @@
goto Bad;
/* XXX: check the tags array */
- return 0;
+ return FT_Err_Ok;
}
Bad:
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
@@ -393,10 +404,12 @@
FT_Int is_owner;
- if ( !source || !target ||
- source->n_points != target->n_points ||
+ if ( !source || !target )
+ return FT_THROW( Invalid_Outline );
+
+ if ( source->n_points != target->n_points ||
source->n_contours != target->n_contours )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( source == target )
return FT_Err_Ok;
@@ -422,20 +435,21 @@
FT_Outline_Done_Internal( FT_Memory memory,
FT_Outline* outline )
{
- if ( memory && outline )
- {
- if ( outline->flags & FT_OUTLINE_OWNER )
- {
- FT_FREE( outline->points );
- FT_FREE( outline->tags );
- FT_FREE( outline->contours );
- }
- *outline = null_outline;
+ if ( !outline )
+ return FT_THROW( Invalid_Outline );
- return FT_Err_Ok;
+ if ( !memory )
+ return FT_THROW( Invalid_Argument );
+
+ if ( outline->flags & FT_OUTLINE_OWNER )
+ {
+ FT_FREE( outline->points );
+ FT_FREE( outline->tags );
+ FT_FREE( outline->contours );
}
- else
- return FT_Err_Invalid_Argument;
+ *outline = null_outline;
+
+ return FT_Err_Ok;
}
@@ -448,7 +462,7 @@
/* check for valid `outline' in FT_Outline_Done_Internal() */
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
return FT_Outline_Done_Internal( library->memory, outline );
}
@@ -568,11 +582,13 @@
{
char* p = outline->tags + first;
char* q = outline->tags + last;
- char swap;
while ( p < q )
{
+ char swap;
+
+
swap = *p;
*p = *q;
*q = swap;
@@ -602,21 +618,24 @@
if ( !library )
- return FT_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
- if ( !outline || !params )
- return FT_Err_Invalid_Argument;
+ if ( !outline )
+ return FT_THROW( Invalid_Outline );
+
+ if ( !params )
+ return FT_THROW( Invalid_Argument );
renderer = library->cur_renderer;
node = library->renderers.head;
params->source = (void*)outline;
- error = FT_Err_Cannot_Render_Glyph;
+ error = FT_ERR( Cannot_Render_Glyph );
while ( renderer )
{
error = renderer->raster_render( renderer->raster, params );
- if ( !error || FT_ERROR_BASE( error ) != FT_Err_Cannot_Render_Glyph )
+ if ( !error || FT_ERR_NEQ( error, Cannot_Render_Glyph ) )
break;
/* FT_Err_Cannot_Render_Glyph is returned if the render mode */
@@ -633,7 +652,7 @@
/* if we changed the current renderer for the glyph image format */
/* we need to select it as the next current one */
if ( !error && update && renderer )
- FT_Set_Renderer( library, renderer, 0, 0 );
+ error = FT_Set_Renderer( library, renderer, 0, 0 );
return error;
}
@@ -650,9 +669,9 @@
if ( !abitmap )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
- /* other checks are delayed to FT_Outline_Render() */
+ /* other checks are delayed to `FT_Outline_Render' */
params.target = abitmap;
params.flags = 0;
@@ -713,7 +732,8 @@
#if 0
#define FT_OUTLINE_GET_CONTOUR( outline, c, first, last ) \
- do { \
+ do \
+ { \
(first) = ( c > 0 ) ? (outline)->points + \
(outline)->contours[c - 1] + 1 \
: (outline)->points; \
@@ -882,85 +902,126 @@
FT_Outline_Embolden( FT_Outline* outline,
FT_Pos strength )
{
+ return FT_Outline_EmboldenXY( outline, strength, strength );
+ }
+
+
+ /* documentation is in ftoutln.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Outline_EmboldenXY( FT_Outline* outline,
+ FT_Pos xstrength,
+ FT_Pos ystrength )
+ {
FT_Vector* points;
FT_Vector v_prev, v_first, v_next, v_cur;
- FT_Angle rotate, angle_in, angle_out;
FT_Int c, n, first;
FT_Int orientation;
if ( !outline )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Outline );
- strength /= 2;
- if ( strength == 0 )
+ xstrength /= 2;
+ ystrength /= 2;
+ if ( xstrength == 0 && ystrength == 0 )
return FT_Err_Ok;
orientation = FT_Outline_Get_Orientation( outline );
if ( orientation == FT_ORIENTATION_NONE )
{
if ( outline->n_contours )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
else
return FT_Err_Ok;
}
- if ( orientation == FT_ORIENTATION_TRUETYPE )
- rotate = -FT_ANGLE_PI2;
- else
- rotate = FT_ANGLE_PI2;
-
points = outline->points;
first = 0;
for ( c = 0; c < outline->n_contours; c++ )
{
- int last = outline->contours[c];
+ FT_Vector in, out, shift;
+ FT_Fixed l_in, l_out, l, q, d;
+ int last = outline->contours[c];
v_first = points[first];
v_prev = points[last];
v_cur = v_first;
- for ( n = first; n <= last; n++ )
+ /* compute incoming normalized vector */
+ in.x = v_cur.x - v_prev.x;
+ in.y = v_cur.y - v_prev.y;
+ l_in = FT_Vector_Length( &in );
+ if ( l_in )
{
- FT_Vector in, out;
- FT_Angle angle_diff;
- FT_Pos d;
- FT_Fixed scale;
-
+ in.x = FT_DivFix( in.x, l_in );
+ in.y = FT_DivFix( in.y, l_in );
+ }
+ for ( n = first; n <= last; n++ )
+ {
if ( n < last )
v_next = points[n + 1];
else
v_next = v_first;
- /* compute the in and out vectors */
- in.x = v_cur.x - v_prev.x;
- in.y = v_cur.y - v_prev.y;
-
+ /* compute outgoing normalized vector */
out.x = v_next.x - v_cur.x;
out.y = v_next.y - v_cur.y;
+ l_out = FT_Vector_Length( &out );
+ if ( l_out )
+ {
+ out.x = FT_DivFix( out.x, l_out );
+ out.y = FT_DivFix( out.y, l_out );
+ }
- angle_in = FT_Atan2( in.x, in.y );
- angle_out = FT_Atan2( out.x, out.y );
- angle_diff = FT_Angle_Diff( angle_in, angle_out );
- scale = FT_Cos( angle_diff / 2 );
+ d = FT_MulFix( in.x, out.x ) + FT_MulFix( in.y, out.y );
- if ( scale < 0x4000L && scale > -0x4000L )
- in.x = in.y = 0;
- else
+ /* shift only if turn is less than ~160 degrees */
+ if ( d > -0xF000L )
{
- d = FT_DivFix( strength, scale );
+ d = d + 0x10000L;
+
+ /* shift components are aligned along lateral bisector */
+ /* and directed according to the outline orientation. */
+ shift.x = in.y + out.y;
+ shift.y = in.x + out.x;
+
+ if ( orientation == FT_ORIENTATION_TRUETYPE )
+ shift.x = -shift.x;
+ else
+ shift.y = -shift.y;
+
+ /* restrict shift magnitude to better handle collapsing segments */
+ q = FT_MulFix( out.x, in.y ) - FT_MulFix( out.y, in.x );
+ if ( orientation == FT_ORIENTATION_TRUETYPE )
+ q = -q;
+
+ l = FT_MIN( l_in, l_out );
- FT_Vector_From_Polar( &in, d, angle_in + angle_diff / 2 - rotate );
+ /* non-strict inequalities avoid divide-by-zero when q == l == 0 */
+ if ( FT_MulFix( xstrength, q ) <= FT_MulFix( d, l ) )
+ shift.x = FT_MulDiv( shift.x, xstrength, d );
+ else
+ shift.x = FT_MulDiv( shift.x, l, q );
+
+
+ if ( FT_MulFix( ystrength, q ) <= FT_MulFix( d, l ) )
+ shift.y = FT_MulDiv( shift.y, ystrength, d );
+ else
+ shift.y = FT_MulDiv( shift.y, l, q );
}
+ else
+ shift.x = shift.y = 0;
- outline->points[n].x = v_cur.x + strength + in.x;
- outline->points[n].y = v_cur.y + strength + in.y;
+ outline->points[n].x = v_cur.x + xstrength + shift.x;
+ outline->points[n].y = v_cur.y + ystrength + shift.y;
- v_prev = v_cur;
- v_cur = v_next;
+ in = out;
+ l_in = l_out;
+ v_cur = v_next;
}
first = last + 1;
@@ -975,23 +1036,12 @@
FT_EXPORT_DEF( FT_Orientation )
FT_Outline_Get_Orientation( FT_Outline* outline )
{
- FT_Pos xmin = 32768L;
- FT_Pos xmin_ymin = 32768L;
- FT_Pos xmin_ymax = -32768L;
- FT_Vector* xmin_first = NULL;
- FT_Vector* xmin_last = NULL;
-
- short* contour;
-
- FT_Vector* first;
- FT_Vector* last;
- FT_Vector* prev;
- FT_Vector* point;
-
- int i;
- FT_Pos ray_y[3];
- FT_Orientation result[3] =
- { FT_ORIENTATION_NONE, FT_ORIENTATION_NONE, FT_ORIENTATION_NONE };
+ FT_BBox cbox;
+ FT_Int xshift, yshift;
+ FT_Vector* points;
+ FT_Vector v_prev, v_cur;
+ FT_Int c, n, first;
+ FT_Pos area = 0;
if ( !outline || outline->n_points <= 0 )
@@ -1002,127 +1052,45 @@
/* cubic or quadratic curves, this test deals with the polygon */
/* only which is spanned up by the control points. */
- first = outline->points;
- for ( contour = outline->contours;
- contour < outline->contours + outline->n_contours;
- contour++, first = last + 1 )
- {
- FT_Pos contour_xmin = 32768L;
- FT_Pos contour_xmax = -32768L;
- FT_Pos contour_ymin = 32768L;
- FT_Pos contour_ymax = -32768L;
-
+ FT_Outline_Get_CBox( outline, &cbox );
- last = outline->points + *contour;
+ /* Handle collapsed outlines to avoid undefined FT_MSB. */
+ if ( cbox.xMin == cbox.xMax || cbox.yMin == cbox.yMax )
+ return FT_ORIENTATION_NONE;
- /* skip degenerate contours */
- if ( last < first + 2 )
- continue;
+ xshift = FT_MSB( FT_ABS( cbox.xMax ) | FT_ABS( cbox.xMin ) ) - 14;
+ xshift = FT_MAX( xshift, 0 );
- for ( point = first; point <= last; ++point )
- {
- if ( point->x < contour_xmin )
- contour_xmin = point->x;
+ yshift = FT_MSB( cbox.yMax - cbox.yMin ) - 14;
+ yshift = FT_MAX( yshift, 0 );
- if ( point->x > contour_xmax )
- contour_xmax = point->x;
-
- if ( point->y < contour_ymin )
- contour_ymin = point->y;
-
- if ( point->y > contour_ymax )
- contour_ymax = point->y;
- }
-
- if ( contour_xmin < xmin &&
- contour_xmin != contour_xmax &&
- contour_ymin != contour_ymax )
- {
- xmin = contour_xmin;
- xmin_ymin = contour_ymin;
- xmin_ymax = contour_ymax;
- xmin_first = first;
- xmin_last = last;
- }
- }
-
- if ( xmin == 32768L )
- return FT_ORIENTATION_TRUETYPE;
-
- ray_y[0] = ( xmin_ymin * 3 + xmin_ymax ) >> 2;
- ray_y[1] = ( xmin_ymin + xmin_ymax ) >> 1;
- ray_y[2] = ( xmin_ymin + xmin_ymax * 3 ) >> 2;
+ points = outline->points;
- for ( i = 0; i < 3; i++ )
+ first = 0;
+ for ( c = 0; c < outline->n_contours; c++ )
{
- FT_Pos left_x;
- FT_Pos right_x;
- FT_Vector* left1;
- FT_Vector* left2;
- FT_Vector* right1;
- FT_Vector* right2;
-
+ FT_Int last = outline->contours[c];
- RedoRay:
- left_x = 32768L;
- right_x = -32768L;
- left1 = left2 = right1 = right2 = NULL;
+ v_prev = points[last];
- prev = xmin_last;
- for ( point = xmin_first; point <= xmin_last; prev = point, ++point )
+ for ( n = first; n <= last; n++ )
{
- FT_Pos tmp_x;
-
-
- if ( point->y == ray_y[i] || prev->y == ray_y[i] )
- {
- ray_y[i]++;
- goto RedoRay;
- }
-
- if ( ( point->y < ray_y[i] && prev->y < ray_y[i] ) ||
- ( point->y > ray_y[i] && prev->y > ray_y[i] ) )
- continue;
-
- tmp_x = FT_MulDiv( point->x - prev->x,
- ray_y[i] - prev->y,
- point->y - prev->y ) + prev->x;
-
- if ( tmp_x < left_x )
- {
- left_x = tmp_x;
- left1 = prev;
- left2 = point;
- }
-
- if ( tmp_x > right_x )
- {
- right_x = tmp_x;
- right1 = prev;
- right2 = point;
- }
+ v_cur = points[n];
+ area += ( ( v_cur.y - v_prev.y ) >> yshift ) *
+ ( ( v_cur.x + v_prev.x ) >> xshift );
+ v_prev = v_cur;
}
- if ( left1 && right1 )
- {
- if ( left1->y < left2->y && right1->y > right2->y )
- result[i] = FT_ORIENTATION_TRUETYPE;
- else if ( left1->y > left2->y && right1->y < right2->y )
- result[i] = FT_ORIENTATION_POSTSCRIPT;
- else
- result[i] = FT_ORIENTATION_NONE;
- }
+ first = last + 1;
}
- if ( result[0] != FT_ORIENTATION_NONE &&
- ( result[0] == result[1] || result[0] == result[2] ) )
- return result[0];
-
- if ( result[1] != FT_ORIENTATION_NONE && result[1] == result[2] )
- return result[1];
-
- return FT_ORIENTATION_TRUETYPE;
+ if ( area > 0 )
+ return FT_ORIENTATION_POSTSCRIPT;
+ else if ( area < 0 )
+ return FT_ORIENTATION_TRUETYPE;
+ else
+ return FT_ORIENTATION_NONE;
}
diff --git a/src/base/ftpfr.c b/src/base/ftpfr.c
index 3a0f92d..7425abe 100644
--- a/src/base/ftpfr.c
+++ b/src/base/ftpfr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing PFR-specific data (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2008, 2010 by */
+/* Copyright 2002-2004, 2008, 2010, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,6 +16,8 @@
/***************************************************************************/
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_PFR_H
@@ -48,7 +50,7 @@
if ( !face )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Face_Handle );
service = ft_pfr_check( face );
if ( service )
@@ -84,7 +86,7 @@
if ( ametrics_y_scale )
*ametrics_y_scale = y_scale;
- error = FT_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
}
return error;
@@ -104,7 +106,10 @@
if ( !face )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Face_Handle );
+
+ if ( !avector )
+ return FT_THROW( Invalid_Argument );
service = ft_pfr_check( face );
if ( service )
@@ -128,14 +133,18 @@
FT_Service_PfrMetrics service;
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
+
+ if ( !aadvance )
+ return FT_THROW( Invalid_Argument );
+
service = ft_pfr_check( face );
if ( service )
- {
error = service->get_advance( face, gindex, aadvance );
- }
else
/* XXX: TODO: PROVIDE ADVANCE-LOADING METHOD TO ALL FONT DRIVERS */
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
return error;
}
diff --git a/src/base/ftpic.c b/src/base/ftpic.c
index b74e90d..9bd92f7 100644
--- a/src/base/ftpic.c
+++ b/src/base/ftpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services (body). */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,7 +29,8 @@
ft_pic_container_init( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
+ FT_Error error;
+
FT_MEM_SET( pic_container, 0, sizeof ( *pic_container ) );
diff --git a/src/base/ftrfork.c b/src/base/ftrfork.c
index 01d8625..efe24d6 100644
--- a/src/base/ftrfork.c
+++ b/src/base/ftrfork.c
@@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (body). */
/* */
-/* Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
+/* Copyright 2004-2010, 2013, 2014 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */
@@ -29,6 +29,7 @@
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_RFORK_H
#include "basepic.h"
+#include "ftbase.h"
#undef FT_COMPONENT
#define FT_COMPONENT trace_raccess
@@ -86,7 +87,7 @@
/* map_len = head[12] .. head[15] */
if ( *rdata_pos + rdata_len != map_pos || map_pos == rfork_offset )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
error = FT_Stream_Seek( stream, map_pos );
if ( error )
@@ -108,7 +109,7 @@
allmatch = 0;
}
if ( !allzeros && !allmatch )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
/* If we have reached this point then it is probably a mac resource */
/* file. Now, does it contain any interesting resources? */
@@ -121,7 +122,7 @@
if ( FT_READ_USHORT( type_list ) )
return error;
if ( type_list == -1 )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
error = FT_Stream_Seek( stream, map_pos + type_list );
if ( error )
@@ -151,6 +152,7 @@
FT_Long map_offset,
FT_Long rdata_pos,
FT_Long tag,
+ FT_Bool sort_by_res_id,
FT_Long **offsets,
FT_Long *count )
{
@@ -163,6 +165,7 @@
FT_RFork_Ref *ref = NULL;
+ FT_TRACE3(( "\n" ));
error = FT_Stream_Seek( stream, map_offset );
if ( error )
return error;
@@ -179,10 +182,12 @@
return error;
FT_TRACE2(( "Resource tags: %c%c%c%c\n",
- (char)( 0xff & ( tag_internal >> 24 ) ),
- (char)( 0xff & ( tag_internal >> 16 ) ),
- (char)( 0xff & ( tag_internal >> 8 ) ),
- (char)( 0xff & ( tag_internal >> 0 ) ) ));
+ (char)( 0xFF & ( tag_internal >> 24 ) ),
+ (char)( 0xFF & ( tag_internal >> 16 ) ),
+ (char)( 0xFF & ( tag_internal >> 8 ) ),
+ (char)( 0xFF & ( tag_internal >> 0 ) ) ));
+ FT_TRACE3(( " : subcount=%d, suboffset=0x%04x\n",
+ subcnt, rpos ));
if ( tag_internal == tag )
{
@@ -208,11 +213,24 @@
goto Exit;
ref[j].offset = temp & 0xFFFFFFL;
+ FT_TRACE3(( " [%d]:"
+ " resource_id=0x%04x, offset=0x%08x\n",
+ j, ref[j].res_id, ref[j].offset ));
}
- ft_qsort( ref, *count, sizeof ( FT_RFork_Ref ),
- ( int(*)(const void*, const void*) )
- ft_raccess_sort_ref_by_id );
+ if (sort_by_res_id)
+ {
+ ft_qsort( ref, *count, sizeof ( FT_RFork_Ref ),
+ ( int(*)(const void*, const void*) )
+ ft_raccess_sort_ref_by_id );
+
+ FT_TRACE3(( " -- sort resources by their ids --\n" ));
+ for ( j = 0; j < *count; ++ j ) {
+ FT_TRACE3(( " [%d]:"
+ " resource_id=0x%04x, offset=0x%08x\n",
+ j, ref[j].res_id, ref[j].offset ));
+ }
+ }
if ( FT_NEW_ARRAY( offsets_internal, *count ) )
goto Exit;
@@ -233,7 +251,7 @@
}
}
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
}
@@ -362,7 +380,7 @@
FT_Long *offsets,
FT_Error *errors )
{
- FT_Long i;
+ FT_Int i;
for ( i = 0; i < FT_RACCESS_N_RULES; i++ )
@@ -435,7 +453,7 @@
*result_file_name = NULL;
if ( NULL == stream )
- return FT_Err_Cannot_Open_Stream;
+ return FT_THROW( Cannot_Open_Stream );
return raccess_guess_apple_generic( library, stream, base_file_name,
magic, result_offset );
@@ -457,7 +475,7 @@
*result_file_name = NULL;
if ( NULL == stream )
- return FT_Err_Cannot_Open_Stream;
+ return FT_THROW( Cannot_Open_Stream );
return raccess_guess_apple_generic( library, stream, base_file_name,
magic, result_offset );
@@ -481,7 +499,7 @@
memory = library->memory;
newpath = raccess_make_file_name( memory, base_file_name, "._" );
if ( !newpath )
- return FT_Err_Out_Of_Memory;
+ return FT_THROW( Out_Of_Memory );
error = raccess_guess_linux_double_from_file_name( library, newpath,
result_offset );
@@ -507,7 +525,7 @@
FT_Error error;
char* newpath = NULL;
FT_Memory memory;
- FT_Long base_file_len = ft_strlen( base_file_name );
+ FT_Long base_file_len = (FT_Long)ft_strlen( base_file_name );
FT_UNUSED( stream );
@@ -515,7 +533,7 @@
memory = library->memory;
if ( base_file_len + 6 > FT_INT_MAX )
- return FT_Err_Array_Too_Large;
+ return FT_THROW( Array_Too_Large );
if ( FT_ALLOC( newpath, base_file_len + 6 ) )
return error;
@@ -543,7 +561,7 @@
FT_Error error;
char* newpath = NULL;
FT_Memory memory;
- FT_Long base_file_len = ft_strlen( base_file_name );
+ FT_Long base_file_len = (FT_Long)ft_strlen( base_file_name );
FT_UNUSED( stream );
@@ -551,7 +569,7 @@
memory = library->memory;
if ( base_file_len + 18 > FT_INT_MAX )
- return FT_Err_Array_Too_Large;
+ return FT_THROW( Array_Too_Large );
if ( FT_ALLOC( newpath, base_file_len + 18 ) )
return error;
@@ -584,7 +602,7 @@
newpath = raccess_make_file_name( memory, base_file_name,
"resource.frk/" );
if ( !newpath )
- return FT_Err_Out_Of_Memory;
+ return FT_THROW( Out_Of_Memory );
*result_file_name = newpath;
*result_offset = 0;
@@ -610,7 +628,7 @@
newpath = raccess_make_file_name( memory, base_file_name, ".resource/" );
if ( !newpath )
- return FT_Err_Out_Of_Memory;
+ return FT_THROW( Out_Of_Memory );
*result_file_name = newpath;
*result_offset = 0;
@@ -637,7 +655,7 @@
newpath = raccess_make_file_name( memory, base_file_name, "%" );
if ( !newpath )
- return FT_Err_Out_Of_Memory;
+ return FT_THROW( Out_Of_Memory );
error = raccess_guess_linux_double_from_file_name( library, newpath,
result_offset );
@@ -669,7 +687,7 @@
newpath = raccess_make_file_name( memory, base_file_name,
".AppleDouble/" );
if ( !newpath )
- return FT_Err_Out_Of_Memory;
+ return FT_THROW( Out_Of_Memory );
error = raccess_guess_linux_double_from_file_name( library, newpath,
result_offset );
@@ -708,7 +726,7 @@
if ( FT_READ_LONG( magic_from_stream ) )
return error;
if ( magic_from_stream != magic )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
if ( FT_READ_LONG( version_number ) )
return error;
@@ -721,7 +739,7 @@
if ( FT_READ_USHORT( n_of_entries ) )
return error;
if ( n_of_entries == 0 )
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
for ( i = 0; i < n_of_entries; i++ )
{
@@ -744,7 +762,7 @@
}
}
- return FT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
}
@@ -827,7 +845,7 @@
FT_Long *offsets,
FT_Error *errors )
{
- int i;
+ FT_Int i;
FT_UNUSED( library );
FT_UNUSED( stream );
@@ -838,7 +856,7 @@
{
new_names[i] = NULL;
offsets[i] = 0;
- errors[i] = FT_Err_Unimplemented_Feature;
+ errors[i] = FT_ERR( Unimplemented_Feature );
}
}
diff --git a/src/base/ftsnames.c b/src/base/ftsnames.c
index 3447888..260e91c 100644
--- a/src/base/ftsnames.c
+++ b/src/base/ftsnames.c
@@ -44,7 +44,7 @@
FT_UInt idx,
FT_SfntName *aname )
{
- FT_Error error = FT_Err_Invalid_Argument;
+ FT_Error error = FT_ERR( Invalid_Argument );
if ( aname && face && FT_IS_SFNT( face ) )
diff --git a/src/base/ftstream.c b/src/base/ftstream.c
index fc2868e..759fd8f 100644
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -4,7 +4,7 @@
/* */
/* I/O stream support (body). */
/* */
-/* Copyright 2000-2002, 2004-2006, 2008-2011 by */
+/* Copyright 2000-2002, 2004-2006, 2008-2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -68,7 +68,7 @@
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
pos, stream->size ));
- error = FT_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
}
}
/* note that seeking to the first position after the file is valid */
@@ -78,7 +78,7 @@
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
pos, stream->size ));
- error = FT_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
}
if ( !error )
@@ -93,7 +93,7 @@
FT_Long distance )
{
if ( distance < 0 )
- return FT_Err_Invalid_Stream_Operation;
+ return FT_THROW( Invalid_Stream_Operation );
return FT_Stream_Seek( stream, (FT_ULong)( stream->pos + distance ) );
}
@@ -131,7 +131,7 @@
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
pos, stream->size ));
- return FT_Err_Invalid_Stream_Operation;
+ return FT_THROW( Invalid_Stream_Operation );
}
if ( stream->read )
@@ -153,7 +153,7 @@
" invalid read; expected %lu bytes, got %lu\n",
count, read_bytes ));
- error = FT_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
}
return error;
@@ -254,7 +254,7 @@
" frame size (%lu) larger than stream size (%lu)\n",
count, stream->size ));
- error = FT_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
goto Exit;
}
@@ -277,7 +277,7 @@
count, read_bytes ));
FT_FREE( stream->base );
- error = FT_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
}
stream->cursor = stream->base;
stream->limit = stream->cursor + count;
@@ -293,7 +293,7 @@
" invalid i/o; pos = 0x%lx, count = %lu, size = 0x%lx\n",
stream->pos, count, stream->size ));
- error = FT_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
goto Exit;
}
@@ -474,7 +474,7 @@
return result;
Fail:
- *error = FT_Err_Invalid_Stream_Operation;
+ *error = FT_THROW( Invalid_Stream_Operation );
FT_ERROR(( "FT_Stream_ReadChar:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -521,7 +521,7 @@
return result;
Fail:
- *error = FT_Err_Invalid_Stream_Operation;
+ *error = FT_THROW( Invalid_Stream_Operation );
FT_ERROR(( "FT_Stream_ReadUShort:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -568,7 +568,7 @@
return result;
Fail:
- *error = FT_Err_Invalid_Stream_Operation;
+ *error = FT_THROW( Invalid_Stream_Operation );
FT_ERROR(( "FT_Stream_ReadUShortLE:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -615,7 +615,7 @@
return result;
Fail:
- *error = FT_Err_Invalid_Stream_Operation;
+ *error = FT_THROW( Invalid_Stream_Operation );
FT_ERROR(( "FT_Stream_ReadUOffset:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -662,7 +662,7 @@
return result;
Fail:
- *error = FT_Err_Invalid_Stream_Operation;
+ *error = FT_THROW( Invalid_Stream_Operation );
FT_ERROR(( "FT_Stream_ReadULong:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -709,7 +709,7 @@
return result;
Fail:
- *error = FT_Err_Invalid_Stream_Operation;
+ *error = FT_THROW( Invalid_Stream_Operation );
FT_ERROR(( "FT_Stream_ReadULongLE:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -727,8 +727,12 @@
FT_Bool frame_accessed = 0;
FT_Byte* cursor;
- if ( !fields || !stream )
- return FT_Err_Invalid_Argument;
+
+ if ( !fields )
+ return FT_THROW( Invalid_Argument );
+
+ if ( !stream )
+ return FT_THROW( Invalid_Stream_Handle );
cursor = stream->cursor;
@@ -760,7 +764,7 @@
if ( cursor + len > stream->limit )
{
- error = FT_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
goto Exit;
}
@@ -776,43 +780,43 @@
case ft_frame_byte:
case ft_frame_schar: /* read a single byte */
- value = FT_NEXT_BYTE(cursor);
+ value = FT_NEXT_BYTE( cursor );
sign_shift = 24;
break;
case ft_frame_short_be:
case ft_frame_ushort_be: /* read a 2-byte big-endian short */
- value = FT_NEXT_USHORT(cursor);
+ value = FT_NEXT_USHORT( cursor) ;
sign_shift = 16;
break;
case ft_frame_short_le:
case ft_frame_ushort_le: /* read a 2-byte little-endian short */
- value = FT_NEXT_USHORT_LE(cursor);
+ value = FT_NEXT_USHORT_LE( cursor );
sign_shift = 16;
break;
case ft_frame_long_be:
case ft_frame_ulong_be: /* read a 4-byte big-endian long */
- value = FT_NEXT_ULONG(cursor);
+ value = FT_NEXT_ULONG( cursor );
sign_shift = 0;
break;
case ft_frame_long_le:
case ft_frame_ulong_le: /* read a 4-byte little-endian long */
- value = FT_NEXT_ULONG_LE(cursor);
+ value = FT_NEXT_ULONG_LE( cursor );
sign_shift = 0;
break;
case ft_frame_off3_be:
case ft_frame_uoff3_be: /* read a 3-byte big-endian long */
- value = FT_NEXT_UOFF3(cursor);
+ value = FT_NEXT_UOFF3( cursor );
sign_shift = 8;
break;
case ft_frame_off3_le:
case ft_frame_uoff3_le: /* read a 3-byte little-endian long */
- value = FT_NEXT_UOFF3_LE(cursor);
+ value = FT_NEXT_UOFF3_LE( cursor );
sign_shift = 8;
break;
@@ -831,15 +835,15 @@
p = (FT_Byte*)structure + fields->offset;
switch ( fields->size )
{
- case (8 / FT_CHAR_BIT):
+ case ( 8 / FT_CHAR_BIT ):
*(FT_Byte*)p = (FT_Byte)value;
break;
- case (16 / FT_CHAR_BIT):
+ case ( 16 / FT_CHAR_BIT ):
*(FT_UShort*)p = (FT_UShort)value;
break;
- case (32 / FT_CHAR_BIT):
+ case ( 32 / FT_CHAR_BIT ):
*(FT_UInt32*)p = (FT_UInt32)value;
break;
diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c
index 5399efe..5fc41fc 100644
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -4,7 +4,7 @@
/* */
/* FreeType path stroker (body). */
/* */
-/* Copyright 2002-2006, 2008-2011 by */
+/* Copyright 2002-2006, 2008-2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -789,13 +789,16 @@
FT_Stroker_New( FT_Library library,
FT_Stroker *astroker )
{
- FT_Error error;
+ FT_Error error; /* assigned in FT_NEW */
FT_Memory memory;
FT_Stroker stroker = NULL;
if ( !library )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Library_Handle );
+
+ if ( !astroker )
+ return FT_THROW( Invalid_Argument );
memory = library->memory;
@@ -822,14 +825,17 @@
FT_Stroker_LineJoin line_join,
FT_Fixed miter_limit )
{
+ if ( !stroker )
+ return;
+
stroker->radius = radius;
stroker->line_cap = line_cap;
stroker->line_join = line_join;
stroker->miter_limit = miter_limit;
/* ensure miter limit has sensible value */
- if ( stroker->miter_limit < 0x10000 )
- stroker->miter_limit = 0x10000;
+ if ( stroker->miter_limit < 0x10000L )
+ stroker->miter_limit = 0x10000L;
/* save line join style: */
/* line join style can be temporarily changed when stroking curves */
@@ -1002,7 +1008,8 @@
FT_Tan( theta ) ) );
- intersect = FT_BOOL( stroker->line_length >= min_length &&
+ intersect = FT_BOOL( min_length &&
+ stroker->line_length >= min_length &&
line_length >= min_length );
}
@@ -1126,9 +1133,8 @@
middle.y += stroker->center.y;
/* compute first angle point */
- length = FT_MulFix( radius,
- FT_DivFix( 0x10000L - sigma,
- ft_pos_abs( FT_Sin( theta ) ) ) );
+ length = FT_MulDiv( radius, 0x10000L - sigma,
+ ft_pos_abs( FT_Sin( theta ) ) );
FT_Vector_From_Polar( &delta, length, phi + rotate );
delta.x += middle.x;
@@ -1288,6 +1294,9 @@
FT_Fixed line_length;
+ if ( !stroker || !to )
+ return FT_THROW( Invalid_Argument );
+
delta.x = to->x - stroker->center.x;
delta.y = to->y - stroker->center.y;
@@ -1361,6 +1370,12 @@
FT_Bool first_arc = TRUE;
+ if ( !stroker || !control || !to )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
/* if all control points are coincident, this is a no-op; */
/* avoid creating a spurious corner */
if ( FT_IS_SMALL( stroker->center.x - control->x ) &&
@@ -1495,7 +1510,7 @@
sinA = ft_pos_abs( FT_Sin( alpha1 - gamma ) );
sinB = ft_pos_abs( FT_Sin( beta - gamma ) );
- alen = FT_DivFix( FT_MulFix( blen, sinA ), sinB );
+ alen = FT_MulDiv( blen, sinA, sinB );
FT_Vector_From_Polar( &delta, alen, beta );
delta.x += start.x;
@@ -1557,6 +1572,12 @@
FT_Bool first_arc = TRUE;
+ if ( !stroker || !control1 || !control2 || !to )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
/* if all control points are coincident, this is a no-op; */
/* avoid creating a spurious corner */
if ( FT_IS_SMALL( stroker->center.x - control1->x ) &&
@@ -1702,7 +1723,7 @@
sinA = ft_pos_abs( FT_Sin( alpha1 - gamma ) );
sinB = ft_pos_abs( FT_Sin( beta - gamma ) );
- alen = FT_DivFix( FT_MulFix( blen, sinA ), sinB );
+ alen = FT_MulDiv( blen, sinA, sinB );
FT_Vector_From_Polar( &delta, alen, beta );
delta.x += start.x;
@@ -1759,6 +1780,9 @@
FT_Vector* to,
FT_Bool open )
{
+ if ( !stroker || !to )
+ return FT_THROW( Invalid_Argument );
+
/* We cannot process the first point, because there is not enough */
/* information regarding its corner/cap. The latter will be processed */
/* in the `FT_Stroker_EndSubPath' routine. */
@@ -1859,6 +1883,12 @@
FT_Error error = FT_Err_Ok;
+ if ( !stroker )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
if ( stroker->subpath_open )
{
FT_StrokeBorder right = stroker->borders;
@@ -1955,7 +1985,7 @@
if ( !stroker || border > 1 )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -1984,6 +2014,12 @@
FT_Error error;
+ if ( !stroker )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
error = ft_stroke_border_get_counts( stroker->borders + 0,
&count1, &count2 );
if ( error )
@@ -1998,8 +2034,12 @@
num_contours = count2 + count4;
Exit:
- *anum_points = num_points;
- *anum_contours = num_contours;
+ if ( anum_points )
+ *anum_points = num_points;
+
+ if ( anum_contours )
+ *anum_contours = num_contours;
+
return error;
}
@@ -2011,6 +2051,9 @@
FT_StrokerBorder border,
FT_Outline* outline )
{
+ if ( !stroker || !outline )
+ return;
+
if ( border == FT_STROKER_BORDER_LEFT ||
border == FT_STROKER_BORDER_RIGHT )
{
@@ -2060,8 +2103,11 @@
FT_Int tag; /* current point's state */
- if ( !outline || !stroker )
- return FT_Err_Invalid_Argument;
+ if ( !outline )
+ return FT_THROW( Invalid_Outline );
+
+ if ( !stroker )
+ return FT_THROW( Invalid_Argument );
FT_Stroker_Rewind( stroker );
@@ -2239,7 +2285,7 @@
return error;
Invalid_Outline:
- return FT_Err_Invalid_Outline;
+ return FT_THROW( Invalid_Outline );
}
@@ -2259,18 +2305,20 @@
FT_Stroker stroker,
FT_Bool destroy )
{
- FT_Error error = FT_Err_Invalid_Argument;
- FT_Glyph glyph = NULL;
+ FT_Error error = FT_ERR( Invalid_Argument );
+ FT_Glyph glyph = NULL;
+
+ /* for FT_OUTLINE_GLYPH_CLASS_GET (in PIC mode) */
FT_Library library = stroker->library;
FT_UNUSED( library );
- if ( pglyph == NULL )
+ if ( !pglyph )
goto Exit;
glyph = *pglyph;
- if ( glyph == NULL || glyph->clazz != FT_OUTLINE_GLYPH_CLASS_GET )
+ if ( !glyph || glyph->clazz != FT_OUTLINE_GLYPH_CLASS_GET )
goto Exit;
{
@@ -2294,7 +2342,7 @@
if ( error )
goto Fail;
- (void)FT_Stroker_GetCounts( stroker, &num_points, &num_contours );
+ FT_Stroker_GetCounts( stroker, &num_points, &num_contours );
FT_Outline_Done( glyph->library, outline );
@@ -2335,18 +2383,20 @@
FT_Bool inside,
FT_Bool destroy )
{
- FT_Error error = FT_Err_Invalid_Argument;
- FT_Glyph glyph = NULL;
+ FT_Error error = FT_ERR( Invalid_Argument );
+ FT_Glyph glyph = NULL;
+
+ /* for FT_OUTLINE_GLYPH_CLASS_GET (in PIC mode) */
FT_Library library = stroker->library;
FT_UNUSED( library );
- if ( pglyph == NULL )
+ if ( !pglyph )
goto Exit;
glyph = *pglyph;
- if ( glyph == NULL || glyph->clazz != FT_OUTLINE_GLYPH_CLASS_GET )
+ if ( !glyph || glyph->clazz != FT_OUTLINE_GLYPH_CLASS_GET )
goto Exit;
{
@@ -2380,8 +2430,8 @@
if ( error )
goto Fail;
- (void)FT_Stroker_GetBorderCounts( stroker, border,
- &num_points, &num_contours );
+ FT_Stroker_GetBorderCounts( stroker, border,
+ &num_points, &num_contours );
FT_Outline_Done( glyph->library, outline );
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
index d4ec0da..0567bd5 100644
--- a/src/base/ftsynth.c
+++ b/src/base/ftsynth.c
@@ -4,7 +4,7 @@
/* */
/* FreeType synthesizing code for emboldening and slanting (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2010 by */
+/* Copyright 2000-2006, 2010, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -33,6 +33,7 @@
#undef FT_COMPONENT
#define FT_COMPONENT trace_synth
+
/*************************************************************************/
/*************************************************************************/
/**** ****/
@@ -47,8 +48,13 @@
FT_GlyphSlot_Oblique( FT_GlyphSlot slot )
{
FT_Matrix transform;
- FT_Outline* outline = &slot->outline;
+ FT_Outline* outline;
+
+
+ if ( !slot )
+ return;
+ outline = &slot->outline;
/* only oblique outline glyphs */
if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
@@ -62,7 +68,7 @@
transform.xx = 0x10000L;
transform.yx = 0x00000L;
- transform.xy = 0x06000L;
+ transform.xy = 0x0366AL;
transform.yy = 0x10000L;
FT_Outline_Transform( outline, &transform );
@@ -72,7 +78,7 @@
/*************************************************************************/
/*************************************************************************/
/**** ****/
- /**** EXPERIMENTAL EMBOLDENING/OUTLINING SUPPORT ****/
+ /**** EXPERIMENTAL EMBOLDENING SUPPORT ****/
/**** ****/
/*************************************************************************/
/*************************************************************************/
@@ -83,12 +89,18 @@
FT_EXPORT_DEF( void )
FT_GlyphSlot_Embolden( FT_GlyphSlot slot )
{
- FT_Library library = slot->library;
- FT_Face face = slot->face;
+ FT_Library library;
+ FT_Face face;
FT_Error error;
FT_Pos xstr, ystr;
+ if ( !slot )
+ return;
+
+ library = slot->library;
+ face = slot->face;
+
if ( slot->format != FT_GLYPH_FORMAT_OUTLINE &&
slot->format != FT_GLYPH_FORMAT_BITMAP )
return;
@@ -99,15 +111,8 @@
ystr = xstr;
if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
- {
- /* ignore error */
- (void)FT_Outline_Embolden( &slot->outline, xstr );
+ FT_Outline_EmboldenXY( &slot->outline, xstr, ystr );
- /* 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 /* slot->format == FT_GLYPH_FORMAT_BITMAP */
{
/* round to full pixels */
@@ -145,11 +150,9 @@
slot->metrics.width += xstr;
slot->metrics.height += ystr;
- slot->metrics.horiBearingY += ystr;
slot->metrics.horiAdvance += xstr;
- slot->metrics.vertBearingX -= xstr / 2;
- slot->metrics.vertBearingY += ystr;
slot->metrics.vertAdvance += ystr;
+ slot->metrics.horiBearingY += ystr;
/* XXX: 16-bit overflow case must be excluded before here */
if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c
index 7e203be..2c6ddac 100644
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* ANSI-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2002, 2006, 2008-2011 by */
+/* Copyright 1996-2002, 2006, 2008-2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -228,7 +228,7 @@
if ( !stream )
- return FT_Err_Invalid_Stream_Handle;
+ return FT_THROW( Invalid_Stream_Handle );
stream->descriptor.pointer = NULL;
stream->pathname.pointer = (char*)filepathname;
@@ -243,7 +243,7 @@
FT_ERROR(( "FT_Stream_Open:"
" could not open `%s'\n", filepathname ));
- return FT_Err_Cannot_Open_Resource;
+ return FT_THROW( Cannot_Open_Resource );
}
ft_fseek( file, 0, SEEK_END );
@@ -253,7 +253,7 @@
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " opened `%s' but zero-sized\n", filepathname ));
ft_fclose( file );
- return FT_Err_Cannot_Open_Stream;
+ return FT_THROW( Cannot_Open_Stream );
}
ft_fseek( file, 0, SEEK_SET );
diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c
index fdf433a..22b7ecf 100644
--- a/src/base/fttrigon.c
+++ b/src/base/fttrigon.c
@@ -4,7 +4,7 @@
/* */
/* FreeType trigonometric functions (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 2001-2005, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -15,169 +15,146 @@
/* */
/***************************************************************************/
+ /*************************************************************************/
+ /* */
+ /* This is a fixed-point CORDIC implementation of trigonometric */
+ /* functions as well as transformations between Cartesian and polar */
+ /* coordinates. The angles are represented as 16.16 fixed-point values */
+ /* in degrees, i.e., the angular resolution is 2^-16 degrees. Note that */
+ /* only vectors longer than 2^16*180/pi (or at least 22 bits) on a */
+ /* discrete Cartesian grid can have the same or better angular */
+ /* resolution. Therefore, to maintain this precision, some functions */
+ /* require an interim upscaling of the vectors, whereas others operate */
+ /* with 24-bit long vectors directly. */
+ /* */
+ /*************************************************************************/
#include <ft2build.h>
#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_CALC_H
#include FT_TRIGONOMETRY_H
- /* the following is 0.2715717684432231 * 2^30 */
-#define FT_TRIG_COSCALE 0x11616E8EUL
+ /* the Cordic shrink factor 0.858785336480436 * 2^32 */
+#define FT_TRIG_SCALE 0xDBD95B16UL
+
+ /* the highest bit in overflow-safe vector components, */
+ /* MSB of 0.858785336480436 * sqrt(0.5) * 2^30 */
+#define FT_TRIG_SAFE_MSB 29
/* this table was generated for FT_PI = 180L << 16, i.e. degrees */
#define FT_TRIG_MAX_ITERS 23
- static const FT_Fixed
- ft_trig_arctan_table[24] =
+ static const FT_Angle
+ ft_trig_arctan_table[] =
{
- 4157273L, 2949120L, 1740967L, 919879L, 466945L, 234379L, 117304L,
- 58666L, 29335L, 14668L, 7334L, 3667L, 1833L, 917L, 458L, 229L, 115L,
+ 1740967L, 919879L, 466945L, 234379L, 117304L, 58666L, 29335L,
+ 14668L, 7334L, 3667L, 1833L, 917L, 458L, 229L, 115L,
57L, 29L, 14L, 7L, 4L, 2L, 1L
};
- /* the Cordic shrink factor, multiplied by 2^32 */
-#define FT_TRIG_SCALE 1166391785UL /* 0x4585BA38UL */
-
-#ifdef FT_CONFIG_HAS_INT64
+#ifdef FT_LONG64
/* multiply a given value by the CORDIC shrink factor */
static FT_Fixed
ft_trig_downscale( FT_Fixed val )
{
- FT_Fixed s;
- FT_Int64 v;
+ FT_Int s = 1;
- s = val;
- val = ( val >= 0 ) ? val : -val;
+ if ( val < 0 )
+ {
+ val = -val;
+ s = -1;
+ }
- v = ( val * (FT_Int64)FT_TRIG_SCALE ) + 0x100000000UL;
- val = (FT_Fixed)( v >> 32 );
+ /* 0x40000000 comes from regression analysis between true */
+ /* and CORDIC hypotenuse, so it minimizes the error */
+ val = (FT_Fixed)( ( (FT_Int64)val * FT_TRIG_SCALE + 0x40000000UL ) >> 32 );
- return ( s >= 0 ) ? val : -val;
+ return s < 0 ? -val : val;
}
-#else /* !FT_CONFIG_HAS_INT64 */
+#else /* !FT_LONG64 */
/* multiply a given value by the CORDIC shrink factor */
static FT_Fixed
ft_trig_downscale( FT_Fixed val )
{
- FT_Fixed s;
- FT_UInt32 v1, v2, k1, k2, hi, lo1, lo2, lo3;
+ FT_Int s = 1;
+ FT_UInt32 lo1, hi1, lo2, hi2, lo, hi, i1, i2;
+
+ if ( val < 0 )
+ {
+ val = -val;
+ s = -1;
+ }
+
+ lo1 = val & 0x0000FFFFU;
+ hi1 = val >> 16;
+ lo2 = FT_TRIG_SCALE & 0x0000FFFFU;
+ hi2 = FT_TRIG_SCALE >> 16;
- s = val;
- val = ( val >= 0 ) ? val : -val;
+ lo = lo1 * lo2;
+ i1 = lo1 * hi2;
+ i2 = lo2 * hi1;
+ hi = hi1 * hi2;
- v1 = (FT_UInt32)val >> 16;
- v2 = (FT_UInt32)(val & 0xFFFFL);
+ /* Check carry overflow of i1 + i2 */
+ i1 += i2;
+ hi += (FT_UInt32)( i1 < i2 ) << 16;
- k1 = (FT_UInt32)FT_TRIG_SCALE >> 16; /* constant */
- k2 = (FT_UInt32)(FT_TRIG_SCALE & 0xFFFFL); /* constant */
+ hi += i1 >> 16;
+ i1 = i1 << 16;
- hi = k1 * v1;
- lo1 = k1 * v2 + k2 * v1; /* can't overflow */
+ /* Check carry overflow of i1 + lo */
+ lo += i1;
+ hi += ( lo < i1 );
- lo2 = ( k2 * v2 ) >> 16;
- lo3 = ( lo1 >= lo2 ) ? lo1 : lo2;
- lo1 += lo2;
+ /* 0x40000000 comes from regression analysis between true */
+ /* and CORDIC hypotenuse, so it minimizes the error */
- hi += lo1 >> 16;
- if ( lo1 < lo3 )
- hi += (FT_UInt32)0x10000UL;
+ /* Check carry overflow of lo + 0x40000000 */
+ lo += 0x40000000UL;
+ hi += ( lo < 0x40000000UL );
val = (FT_Fixed)hi;
- return ( s >= 0 ) ? val : -val;
+ return s < 0 ? -val : val;
}
-#endif /* !FT_CONFIG_HAS_INT64 */
+#endif /* !FT_LONG64 */
+ /* undefined and never called for zero vector */
static FT_Int
ft_trig_prenorm( FT_Vector* vec )
{
- FT_Fixed x, y, z;
- FT_Int shift;
+ FT_Pos x, y;
+ FT_Int shift;
x = vec->x;
y = vec->y;
- z = ( ( x >= 0 ) ? x : - x ) | ( (y >= 0) ? y : -y );
- shift = 0;
-
-#if 1
- /* determine msb bit index in `shift' */
- if ( z >= ( 1L << 16 ) )
- {
- z >>= 16;
- shift += 16;
- }
- if ( z >= ( 1L << 8 ) )
- {
- z >>= 8;
- shift += 8;
- }
- if ( z >= ( 1L << 4 ) )
- {
- z >>= 4;
- shift += 4;
- }
- if ( z >= ( 1L << 2 ) )
- {
- z >>= 2;
- shift += 2;
- }
- if ( z >= ( 1L << 1 ) )
- {
- z >>= 1;
- shift += 1;
- }
+ shift = FT_MSB( FT_ABS( x ) | FT_ABS( y ) );
- if ( shift <= 27 )
+ if ( shift <= FT_TRIG_SAFE_MSB )
{
- shift = 27 - shift;
- vec->x = x << shift;
- vec->y = y << shift;
+ shift = FT_TRIG_SAFE_MSB - shift;
+ vec->x = (FT_Pos)( (FT_ULong)x << shift );
+ vec->y = (FT_Pos)( (FT_ULong)y << shift );
}
else
{
- shift -= 27;
+ shift -= FT_TRIG_SAFE_MSB;
vec->x = x >> shift;
vec->y = y >> shift;
shift = -shift;
}
-#else /* 0 */
-
- if ( z < ( 1L << 27 ) )
- {
- do
- {
- shift++;
- z <<= 1;
- } while ( z < ( 1L << 27 ) );
- vec->x = x << shift;
- vec->y = y << shift;
- }
- else if ( z > ( 1L << 28 ) )
- {
- do
- {
- shift++;
- z >>= 1;
- } while ( z > ( 1L << 28 ) );
-
- vec->x = x >> shift;
- vec->y = y >> shift;
- shift = -shift;
- }
-
-#endif /* 0 */
-
return shift;
}
@@ -187,65 +164,50 @@
FT_Angle theta )
{
FT_Int i;
- FT_Fixed x, y, xtemp;
- const FT_Fixed *arctanptr;
+ FT_Fixed x, y, xtemp, b;
+ const FT_Angle *arctanptr;
x = vec->x;
y = vec->y;
- /* Get angle between -90 and 90 degrees */
- while ( theta <= -FT_ANGLE_PI2 )
+ /* Rotate inside [-PI/4,PI/4] sector */
+ while ( theta < -FT_ANGLE_PI4 )
{
- x = -x;
- y = -y;
- theta += FT_ANGLE_PI;
+ xtemp = y;
+ y = -x;
+ x = xtemp;
+ theta += FT_ANGLE_PI2;
}
- while ( theta > FT_ANGLE_PI2 )
+ while ( theta > FT_ANGLE_PI4 )
{
- x = -x;
- y = -y;
- theta -= FT_ANGLE_PI;
+ xtemp = -y;
+ y = x;
+ x = xtemp;
+ theta -= FT_ANGLE_PI2;
}
- /* Initial pseudorotation, with left shift */
arctanptr = ft_trig_arctan_table;
- if ( theta < 0 )
- {
- xtemp = x + ( y << 1 );
- y = y - ( x << 1 );
- x = xtemp;
- theta += *arctanptr++;
- }
- else
- {
- xtemp = x - ( y << 1 );
- y = y + ( x << 1 );
- x = xtemp;
- theta -= *arctanptr++;
- }
-
- /* Subsequent pseudorotations, with right shifts */
- i = 0;
- do
+ /* Pseudorotations, with right shifts */
+ for ( i = 1, b = 1; i < FT_TRIG_MAX_ITERS; b <<= 1, i++ )
{
if ( theta < 0 )
{
- xtemp = x + ( y >> i );
- y = y - ( x >> i );
+ xtemp = x + ( ( y + b ) >> i );
+ y = y - ( ( x + b ) >> i );
x = xtemp;
theta += *arctanptr++;
}
else
{
- xtemp = x - ( y >> i );
- y = y + ( x >> i );
+ xtemp = x - ( ( y + b ) >> i );
+ y = y + ( ( x + b ) >> i );
x = xtemp;
theta -= *arctanptr++;
}
- } while ( ++i < FT_TRIG_MAX_ITERS );
+ }
vec->x = x;
vec->y = y;
@@ -255,72 +217,74 @@
static void
ft_trig_pseudo_polarize( FT_Vector* vec )
{
- FT_Fixed theta;
- FT_Fixed yi, i;
- FT_Fixed x, y;
- const FT_Fixed *arctanptr;
+ FT_Angle theta;
+ FT_Int i;
+ FT_Fixed x, y, xtemp, b;
+ const FT_Angle *arctanptr;
x = vec->x;
y = vec->y;
- /* Get the vector into the right half plane */
- theta = 0;
- if ( x < 0 )
- {
- x = -x;
- y = -y;
- theta = 2 * FT_ANGLE_PI2;
- }
-
- if ( y > 0 )
- theta = - theta;
-
- arctanptr = ft_trig_arctan_table;
-
- if ( y < 0 )
+ /* Get the vector into [-PI/4,PI/4] sector */
+ if ( y > x )
{
- /* Rotate positive */
- yi = y + ( x << 1 );
- x = x - ( y << 1 );
- y = yi;
- theta -= *arctanptr++; /* Subtract angle */
+ if ( y > -x )
+ {
+ theta = FT_ANGLE_PI2;
+ xtemp = y;
+ y = -x;
+ x = xtemp;
+ }
+ else
+ {
+ theta = y > 0 ? FT_ANGLE_PI : -FT_ANGLE_PI;
+ x = -x;
+ y = -y;
+ }
}
else
{
- /* Rotate negative */
- yi = y - ( x << 1 );
- x = x + ( y << 1 );
- y = yi;
- theta += *arctanptr++; /* Add angle */
+ if ( y < -x )
+ {
+ theta = -FT_ANGLE_PI2;
+ xtemp = -y;
+ y = x;
+ x = xtemp;
+ }
+ else
+ {
+ theta = 0;
+ }
}
- i = 0;
- do
+ arctanptr = ft_trig_arctan_table;
+
+ /* Pseudorotations, with right shifts */
+ for ( i = 1, b = 1; i < FT_TRIG_MAX_ITERS; b <<= 1, i++ )
{
- if ( y < 0 )
+ if ( y > 0 )
{
- /* Rotate positive */
- yi = y + ( x >> i );
- x = x - ( y >> i );
- y = yi;
- theta -= *arctanptr++;
+ xtemp = x + ( ( y + b ) >> i );
+ y = y - ( ( x + b ) >> i );
+ x = xtemp;
+ theta += *arctanptr++;
}
else
{
- /* Rotate negative */
- yi = y - ( x >> i );
- x = x + ( y >> i );
- y = yi;
- theta += *arctanptr++;
+ xtemp = x - ( ( y + b ) >> i );
+ y = y + ( ( x + b ) >> i );
+ x = xtemp;
+ theta -= *arctanptr++;
}
- } while ( ++i < FT_TRIG_MAX_ITERS );
+ }
- /* round theta */
+ /* round theta to acknowledge its error that mostly comes */
+ /* from accumulated rounding errors in the arctan table */
if ( theta >= 0 )
- theta = FT_PAD_ROUND( theta, 32 );
+ theta = FT_PAD_ROUND( theta, 16 );
else
- theta = -FT_PAD_ROUND( -theta, 32 );
+ theta = -FT_PAD_ROUND( -theta, 16 );
vec->x = x;
vec->y = theta;
@@ -335,11 +299,11 @@
FT_Vector v;
- v.x = FT_TRIG_COSCALE >> 2;
+ v.x = FT_TRIG_SCALE >> 8;
v.y = 0;
ft_trig_pseudo_rotate( &v, angle );
- return v.x / ( 1 << 12 );
+ return ( v.x + 0x80L ) >> 8;
}
@@ -360,7 +324,7 @@
FT_Vector v;
- v.x = FT_TRIG_COSCALE >> 2;
+ v.x = FT_TRIG_SCALE >> 8;
v.y = 0;
ft_trig_pseudo_rotate( &v, angle );
@@ -395,11 +359,14 @@
FT_Vector_Unit( FT_Vector* vec,
FT_Angle angle )
{
- vec->x = FT_TRIG_COSCALE >> 2;
+ if ( !vec )
+ return;
+
+ vec->x = FT_TRIG_SCALE >> 8;
vec->y = 0;
ft_trig_pseudo_rotate( vec, angle );
- vec->x >>= 12;
- vec->y >>= 12;
+ vec->x = ( vec->x + 0x80L ) >> 8;
+ vec->y = ( vec->y + 0x80L ) >> 8;
}
@@ -421,6 +388,9 @@
FT_Vector v;
+ if ( !vec )
+ return;
+
v.x = vec->x;
v.y = vec->y;
@@ -442,8 +412,8 @@
else
{
shift = -shift;
- vec->x = v.x << shift;
- vec->y = v.y << shift;
+ vec->x = (FT_Pos)( (FT_ULong)v.x << shift );
+ vec->y = (FT_Pos)( (FT_ULong)v.y << shift );
}
}
}
@@ -458,16 +428,19 @@
FT_Vector v;
+ if ( !vec )
+ return 0;
+
v = *vec;
/* handle trivial cases */
if ( v.x == 0 )
{
- return ( v.y >= 0 ) ? v.y : -v.y;
+ return FT_ABS( v.y );
}
else if ( v.y == 0 )
{
- return ( v.x >= 0 ) ? v.x : -v.x;
+ return FT_ABS( v.x );
}
/* general case */
@@ -479,7 +452,7 @@
if ( shift > 0 )
return ( v.x + ( 1 << ( shift - 1 ) ) ) >> shift;
- return v.x << -shift;
+ return (FT_Fixed)( (FT_UInt32)v.x << -shift );
}
@@ -494,6 +467,9 @@
FT_Vector v;
+ if ( !vec || !length || !angle )
+ return;
+
v = *vec;
if ( v.x == 0 && v.y == 0 )
@@ -504,7 +480,8 @@
v.x = ft_trig_downscale( v.x );
- *length = ( shift >= 0 ) ? ( v.x >> shift ) : ( v.x << -shift );
+ *length = shift >= 0 ? ( v.x >> shift )
+ : (FT_Fixed)( (FT_UInt32)v.x << -shift );
*angle = v.y;
}
@@ -516,6 +493,9 @@
FT_Fixed length,
FT_Angle angle )
{
+ if ( !vec )
+ return;
+
vec->x = length;
vec->y = 0;
diff --git a/src/base/fttype1.c b/src/base/fttype1.c
index 885dba5..47af19a 100644
--- a/src/base/fttype1.c
+++ b/src/base/fttype1.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file for PS names support (body). */
/* */
-/* Copyright 2002-2004, 2011 by */
+/* Copyright 2002-2004, 2011, 2014 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_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_SERVICE_H
#include FT_SERVICE_POSTSCRIPT_INFO_H
@@ -28,19 +29,22 @@
FT_Get_PS_Font_Info( FT_Face face,
PS_FontInfoRec* afont_info )
{
- FT_Error error = FT_Err_Invalid_Argument;
+ FT_Error error;
+ FT_Service_PsInfo service;
- if ( face )
- {
- FT_Service_PsInfo service = NULL;
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
+ if ( !afont_info )
+ return FT_THROW( Invalid_Argument );
- FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
+ FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
- if ( service && service->ps_get_font_info )
- error = service->ps_get_font_info( face, afont_info );
- }
+ if ( service && service->ps_get_font_info )
+ error = service->ps_get_font_info( face, afont_info );
+ else
+ error = FT_THROW( Invalid_Argument );
return error;
}
@@ -51,8 +55,8 @@
FT_EXPORT_DEF( FT_Int )
FT_Has_PS_Glyph_Names( FT_Face face )
{
- FT_Int result = 0;
- FT_Service_PsInfo service = NULL;
+ FT_Int result = 0;
+ FT_Service_PsInfo service;
if ( face )
@@ -73,19 +77,22 @@
FT_Get_PS_Font_Private( FT_Face face,
PS_PrivateRec* afont_private )
{
- FT_Error error = FT_Err_Invalid_Argument;
+ FT_Error error;
+ FT_Service_PsInfo service;
- if ( face )
- {
- FT_Service_PsInfo service = NULL;
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
+ if ( !afont_private )
+ return FT_THROW( Invalid_Argument );
- FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
+ FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
- if ( service && service->ps_get_font_private )
- error = service->ps_get_font_private( face, afont_private );
- }
+ if ( service && service->ps_get_font_private )
+ error = service->ps_get_font_private( face, afont_private );
+ else
+ error = FT_THROW( Invalid_Argument );
return error;
}
diff --git a/src/base/ftutil.c b/src/base/ftutil.c
index 5f77be5..56e2800 100644
--- a/src/base/ftutil.c
+++ b/src/base/ftutil.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file for memory and list management (body). */
/* */
-/* Copyright 2002, 2004, 2005, 2006, 2007 by */
+/* Copyright 2002, 2004-2007, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -75,12 +75,12 @@
{
block = memory->alloc( memory, size );
if ( block == NULL )
- error = FT_Err_Out_Of_Memory;
+ error = FT_THROW( Out_Of_Memory );
}
else if ( size < 0 )
{
/* may help catch/prevent security issues */
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
}
*p_error = error;
@@ -98,6 +98,7 @@
{
FT_Error error = FT_Err_Ok;
+
block = ft_mem_qrealloc( memory, item_size,
cur_count, new_count, block, &error );
if ( !error && new_count > cur_count )
@@ -127,7 +128,7 @@
if ( cur_count < 0 || new_count < 0 || item_size < 0 )
{
/* may help catch/prevent nasty security issues */
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
}
else if ( new_count == 0 || item_size == 0 )
{
@@ -136,7 +137,7 @@
}
else if ( new_count > FT_INT_MAX/item_size )
{
- error = FT_Err_Array_Too_Large;
+ error = FT_THROW( Array_Too_Large );
}
else if ( cur_count == 0 )
{
@@ -153,7 +154,7 @@
block2 = memory->realloc( memory, cur_size, new_size, block );
if ( block2 == NULL )
- error = FT_Err_Out_Of_Memory;
+ error = FT_THROW( Out_Of_Memory );
else
block = block2;
}
@@ -244,6 +245,9 @@
FT_ListNode cur;
+ if ( !list )
+ return NULL;
+
cur = list->head;
while ( cur )
{
@@ -253,7 +257,7 @@
cur = cur->next;
}
- return (FT_ListNode)0;
+ return NULL;
}
@@ -263,8 +267,13 @@
FT_List_Add( FT_List list,
FT_ListNode node )
{
- FT_ListNode before = list->tail;
+ FT_ListNode before;
+
+
+ if ( !list || !node )
+ return;
+ before = list->tail;
node->next = 0;
node->prev = before;
@@ -284,8 +293,13 @@
FT_List_Insert( FT_List list,
FT_ListNode node )
{
- FT_ListNode after = list->head;
+ FT_ListNode after;
+
+
+ if ( !list || !node )
+ return;
+ after = list->head;
node->next = after;
node->prev = 0;
@@ -308,6 +322,9 @@
FT_ListNode before, after;
+ if ( !list || !node )
+ return;
+
before = node->prev;
after = node->next;
@@ -332,6 +349,9 @@
FT_ListNode before, after;
+ if ( !list || !node )
+ return;
+
before = node->prev;
after = node->next;
@@ -356,14 +376,19 @@
/* documentation is in ftlist.h */
FT_EXPORT_DEF( FT_Error )
- FT_List_Iterate( FT_List list,
- FT_List_Iterator iterator,
- void* user )
+ FT_List_Iterate( FT_List list,
+ FT_List_Iterator iterator,
+ void* user )
{
- FT_ListNode cur = list->head;
+ FT_ListNode cur;
FT_Error error = FT_Err_Ok;
+ if ( !list || !iterator )
+ return FT_THROW( Invalid_Argument );
+
+ cur = list->head;
+
while ( cur )
{
FT_ListNode next = cur->next;
@@ -391,6 +416,9 @@
FT_ListNode cur;
+ if ( !list || !memory )
+ return;
+
cur = list->head;
while ( cur )
{
@@ -410,92 +438,4 @@
}
- FT_BASE_DEF( FT_UInt32 )
- ft_highpow2( FT_UInt32 value )
- {
- FT_UInt32 value2;
-
-
- /*
- * We simply clear the lowest bit in each iteration. When
- * we reach 0, we know that the previous value was our result.
- */
- for ( ;; )
- {
- value2 = value & (value - 1); /* clear lowest bit */
- if ( value2 == 0 )
- break;
-
- value = value2;
- }
- return value;
- }
-
-
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- FT_BASE_DEF( FT_Error )
- FT_Alloc( FT_Memory memory,
- FT_Long size,
- void* *P )
- {
- FT_Error error;
-
-
- (void)FT_ALLOC( *P, size );
- return error;
- }
-
-
- FT_BASE_DEF( FT_Error )
- FT_QAlloc( FT_Memory memory,
- FT_Long size,
- void* *p )
- {
- FT_Error error;
-
-
- (void)FT_QALLOC( *p, size );
- return error;
- }
-
-
- FT_BASE_DEF( FT_Error )
- FT_Realloc( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* *P )
- {
- FT_Error error;
-
-
- (void)FT_REALLOC( *P, current, size );
- return error;
- }
-
-
- FT_BASE_DEF( FT_Error )
- FT_QRealloc( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* *p )
- {
- FT_Error error;
-
-
- (void)FT_QREALLOC( *p, current, size );
- return error;
- }
-
-
- FT_BASE_DEF( void )
- FT_Free( FT_Memory memory,
- void* *P )
- {
- if ( *P )
- FT_MEM_FREE( *P );
- }
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
/* END */
diff --git a/src/base/ftwinfnt.c b/src/base/ftwinfnt.c
index bc2e90e..8e337fb 100644
--- a/src/base/ftwinfnt.c
+++ b/src/base/ftwinfnt.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing Windows FNT specific info (body). */
/* */
-/* Copyright 2003, 2004 by */
+/* Copyright 2003, 2004, 2014 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_DEBUG_H
#include FT_WINFONTS_H
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_WINFNT_H
@@ -32,17 +33,18 @@
FT_Error error;
- error = FT_Err_Invalid_Argument;
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
- if ( face != NULL )
- {
- FT_FACE_LOOKUP_SERVICE( face, service, WINFNT );
+ if ( !header )
+ return FT_THROW( Invalid_Argument );
- if ( service != NULL )
- {
- error = service->get_header( face, header );
- }
- }
+ FT_FACE_LOOKUP_SERVICE( face, service, WINFNT );
+
+ if ( service )
+ error = service->get_header( face, header );
+ else
+ error = FT_THROW( Invalid_Argument );
return error;
}
diff --git a/src/base/md5.c b/src/base/md5.c
new file mode 100644
index 0000000..52d96ac
--- /dev/null
+++ b/src/base/md5.c
@@ -0,0 +1,296 @@
+/*
+ * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
+ * MD5 Message-Digest Algorithm (RFC 1321).
+ *
+ * Homepage:
+ * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
+ *
+ * Author:
+ * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
+ *
+ * This software was written by Alexander Peslyak in 2001. No copyright is
+ * claimed, and the software is hereby placed in the public domain.
+ * In case this attempt to disclaim copyright and place the software in the
+ * public domain is deemed null and void, then the software is
+ * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
+ * general public under the following terms:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted.
+ *
+ * There's ABSOLUTELY NO WARRANTY, express or implied.
+ *
+ * (This is a heavily cut-down "BSD license".)
+ *
+ * This differs from Colin Plumb's older public domain implementation in that
+ * no exactly 32-bit integer data type is required (any 32-bit or wider
+ * unsigned integer data type will do), there's no compile-time endianness
+ * configuration, and the function prototypes match OpenSSL's. No code from
+ * Colin Plumb's implementation has been reused; this comment merely compares
+ * the properties of the two independent implementations.
+ *
+ * The primary goals of this implementation are portability and ease of use.
+ * It is meant to be fast, but not as fast as possible. Some known
+ * optimizations are not included to reduce source code size and avoid
+ * compile-time configuration.
+ */
+
+#ifndef HAVE_OPENSSL
+
+#include <string.h>
+
+#include "md5.h"
+
+/*
+ * The basic MD5 functions.
+ *
+ * F and G are optimized compared to their RFC 1321 definitions for
+ * architectures that lack an AND-NOT instruction, just like in Colin Plumb's
+ * implementation.
+ */
+#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
+#define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y))))
+#define H(x, y, z) (((x) ^ (y)) ^ (z))
+#define H2(x, y, z) ((x) ^ ((y) ^ (z)))
+#define I(x, y, z) ((y) ^ ((x) | ~(z)))
+
+/*
+ * The MD5 transformation for all four rounds.
+ */
+#define STEP(f, a, b, c, d, x, t, s) \
+ (a) += f((b), (c), (d)) + (x) + (t); \
+ (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
+ (a) += (b);
+
+/*
+ * SET reads 4 input bytes in little-endian byte order and stores them
+ * in a properly aligned word in host byte order.
+ *
+ * The check for little-endian architectures that tolerate unaligned
+ * memory accesses is just an optimization. Nothing will break if it
+ * doesn't work.
+ */
+#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
+#define SET(n) \
+ (*(MD5_u32plus *)&ptr[(n) * 4])
+#define GET(n) \
+ SET(n)
+#else
+#define SET(n) \
+ (ctx->block[(n)] = \
+ (MD5_u32plus)ptr[(n) * 4] | \
+ ((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
+ ((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
+ ((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
+#define GET(n) \
+ (ctx->block[(n)])
+#endif
+
+/*
+ * This processes one or more 64-byte data blocks, but does NOT update
+ * the bit counters. There are no alignment requirements.
+ */
+static const void *body(MD5_CTX *ctx, const void *data, unsigned long size)
+{
+ const unsigned char *ptr;
+ MD5_u32plus a, b, c, d;
+ MD5_u32plus saved_a, saved_b, saved_c, saved_d;
+
+ ptr = (const unsigned char *)data;
+
+ a = ctx->a;
+ b = ctx->b;
+ c = ctx->c;
+ d = ctx->d;
+
+ do {
+ saved_a = a;
+ saved_b = b;
+ saved_c = c;
+ saved_d = d;
+
+/* Round 1 */
+ STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
+ STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)
+ STEP(F, c, d, a, b, SET(2), 0x242070db, 17)
+ STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)
+ STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)
+ STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)
+ STEP(F, c, d, a, b, SET(6), 0xa8304613, 17)
+ STEP(F, b, c, d, a, SET(7), 0xfd469501, 22)
+ STEP(F, a, b, c, d, SET(8), 0x698098d8, 7)
+ STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)
+ STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)
+ STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)
+ STEP(F, a, b, c, d, SET(12), 0x6b901122, 7)
+ STEP(F, d, a, b, c, SET(13), 0xfd987193, 12)
+ STEP(F, c, d, a, b, SET(14), 0xa679438e, 17)
+ STEP(F, b, c, d, a, SET(15), 0x49b40821, 22)
+
+/* Round 2 */
+ STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)
+ STEP(G, d, a, b, c, GET(6), 0xc040b340, 9)
+ STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)
+ STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)
+ STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)
+ STEP(G, d, a, b, c, GET(10), 0x02441453, 9)
+ STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)
+ STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)
+ STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)
+ STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)
+ STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)
+ STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)
+ STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)
+ STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)
+ STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)
+ STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)
+
+/* Round 3 */
+ STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)
+ STEP(H2, d, a, b, c, GET(8), 0x8771f681, 11)
+ STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16)
+ STEP(H2, b, c, d, a, GET(14), 0xfde5380c, 23)
+ STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4)
+ STEP(H2, d, a, b, c, GET(4), 0x4bdecfa9, 11)
+ STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16)
+ STEP(H2, b, c, d, a, GET(10), 0xbebfbc70, 23)
+ STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4)
+ STEP(H2, d, a, b, c, GET(0), 0xeaa127fa, 11)
+ STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16)
+ STEP(H2, b, c, d, a, GET(6), 0x04881d05, 23)
+ STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4)
+ STEP(H2, d, a, b, c, GET(12), 0xe6db99e5, 11)
+ STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16)
+ STEP(H2, b, c, d, a, GET(2), 0xc4ac5665, 23)
+
+/* Round 4 */
+ STEP(I, a, b, c, d, GET(0), 0xf4292244, 6)
+ STEP(I, d, a, b, c, GET(7), 0x432aff97, 10)
+ STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15)
+ STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21)
+ STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6)
+ STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10)
+ STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15)
+ STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21)
+ STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6)
+ STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10)
+ STEP(I, c, d, a, b, GET(6), 0xa3014314, 15)
+ STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21)
+ STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6)
+ STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10)
+ STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15)
+ STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21)
+
+ a += saved_a;
+ b += saved_b;
+ c += saved_c;
+ d += saved_d;
+
+ ptr += 64;
+ } while (size -= 64);
+
+ ctx->a = a;
+ ctx->b = b;
+ ctx->c = c;
+ ctx->d = d;
+
+ return ptr;
+}
+
+void MD5_Init(MD5_CTX *ctx)
+{
+ ctx->a = 0x67452301;
+ ctx->b = 0xefcdab89;
+ ctx->c = 0x98badcfe;
+ ctx->d = 0x10325476;
+
+ ctx->lo = 0;
+ ctx->hi = 0;
+}
+
+void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)
+{
+ MD5_u32plus saved_lo;
+ unsigned long used, available;
+
+ saved_lo = ctx->lo;
+ if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
+ ctx->hi++;
+ ctx->hi += size >> 29;
+
+ used = saved_lo & 0x3f;
+
+ if (used) {
+ available = 64 - used;
+
+ if (size < available) {
+ memcpy(&ctx->buffer[used], data, size);
+ return;
+ }
+
+ memcpy(&ctx->buffer[used], data, available);
+ data = (const unsigned char *)data + available;
+ size -= available;
+ body(ctx, ctx->buffer, 64);
+ }
+
+ if (size >= 64) {
+ data = body(ctx, data, size & ~(unsigned long)0x3f);
+ size &= 0x3f;
+ }
+
+ memcpy(ctx->buffer, data, size);
+}
+
+void MD5_Final(unsigned char *result, MD5_CTX *ctx)
+{
+ unsigned long used, available;
+
+ used = ctx->lo & 0x3f;
+
+ ctx->buffer[used++] = 0x80;
+
+ available = 64 - used;
+
+ if (available < 8) {
+ memset(&ctx->buffer[used], 0, available);
+ body(ctx, ctx->buffer, 64);
+ used = 0;
+ available = 64;
+ }
+
+ memset(&ctx->buffer[used], 0, available - 8);
+
+ ctx->lo <<= 3;
+ ctx->buffer[56] = ctx->lo;
+ ctx->buffer[57] = ctx->lo >> 8;
+ ctx->buffer[58] = ctx->lo >> 16;
+ ctx->buffer[59] = ctx->lo >> 24;
+ ctx->buffer[60] = ctx->hi;
+ ctx->buffer[61] = ctx->hi >> 8;
+ ctx->buffer[62] = ctx->hi >> 16;
+ ctx->buffer[63] = ctx->hi >> 24;
+
+ body(ctx, ctx->buffer, 64);
+
+ result[0] = ctx->a;
+ result[1] = ctx->a >> 8;
+ result[2] = ctx->a >> 16;
+ result[3] = ctx->a >> 24;
+ result[4] = ctx->b;
+ result[5] = ctx->b >> 8;
+ result[6] = ctx->b >> 16;
+ result[7] = ctx->b >> 24;
+ result[8] = ctx->c;
+ result[9] = ctx->c >> 8;
+ result[10] = ctx->c >> 16;
+ result[11] = ctx->c >> 24;
+ result[12] = ctx->d;
+ result[13] = ctx->d >> 8;
+ result[14] = ctx->d >> 16;
+ result[15] = ctx->d >> 24;
+
+ memset(ctx, 0, sizeof(*ctx));
+}
+
+#endif
diff --git a/src/base/md5.h b/src/base/md5.h
new file mode 100644
index 0000000..2da44bf
--- /dev/null
+++ b/src/base/md5.h
@@ -0,0 +1,45 @@
+/*
+ * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
+ * MD5 Message-Digest Algorithm (RFC 1321).
+ *
+ * Homepage:
+ * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
+ *
+ * Author:
+ * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
+ *
+ * This software was written by Alexander Peslyak in 2001. No copyright is
+ * claimed, and the software is hereby placed in the public domain.
+ * In case this attempt to disclaim copyright and place the software in the
+ * public domain is deemed null and void, then the software is
+ * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
+ * general public under the following terms:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted.
+ *
+ * There's ABSOLUTELY NO WARRANTY, express or implied.
+ *
+ * See md5.c for more information.
+ */
+
+#ifdef HAVE_OPENSSL
+#include <openssl/md5.h>
+#elif !defined(_MD5_H)
+#define _MD5_H
+
+/* Any 32-bit or wider unsigned integer data type will do */
+typedef unsigned int MD5_u32plus;
+
+typedef struct {
+ MD5_u32plus lo, hi;
+ MD5_u32plus a, b, c, d;
+ unsigned char buffer[64];
+ MD5_u32plus block[16];
+} MD5_CTX;
+
+extern void MD5_Init(MD5_CTX *ctx);
+extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size);
+extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
+
+#endif
diff --git a/src/base/rules.mk b/src/base/rules.mk
index 10f578a..cbd8107 100644
--- a/src/base/rules.mk
+++ b/src/base/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by
+# Copyright 1996-2000, 2002-2009, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -19,8 +19,8 @@
# 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.
+# in `src/base' which are not compiled within the base
+# layer proper.
BASE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SRC_DIR)/base)
@@ -33,12 +33,14 @@ BASE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SRC_DIR)/base)
# All files listed here should be included in `ftbase.c' (for a `single'
# build).
#
-BASE_SRC := $(BASE_DIR)/ftadvanc.c \
+BASE_SRC := $(BASE_DIR)/basepic.c \
+ $(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)/ftpic.c \
$(BASE_DIR)/ftrfork.c \
$(BASE_DIR)/ftsnames.c \
$(BASE_DIR)/ftstream.c \
@@ -50,7 +52,11 @@ ifneq ($(ftmac_c),)
BASE_SRC += $(BASE_DIR)/$(ftmac_c)
endif
-BASE_H := $(BASE_DIR)/ftbase.h
+# for simplicity, we also handle `md5.c' (which gets included by `ftobjs.h')
+BASE_H := $(BASE_DIR)/basepic.h \
+ $(BASE_DIR)/ftbase.h \
+ $(BASE_DIR)/md5.c \
+ $(BASE_DIR)/md5.h
# Base layer `extensions' sources
#
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index 0edcc77..55a428c 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -2,7 +2,7 @@
FreeType font driver for bdf files
- Copyright (C) 2001-2008, 2011 by
+ Copyright (C) 2001-2008, 2011, 2013, 2014 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -72,7 +72,7 @@ THE SOFTWARE.
cmap->num_encodings = face->bdffont->glyphs_used;
cmap->encodings = face->en_table;
- return BDF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -182,7 +182,7 @@ THE SOFTWARE.
}
- FT_CALLBACK_TABLE_DEF
+ static
const FT_CMap_ClassRec bdf_cmap_class =
{
sizeof ( BDF_CMapRec ),
@@ -198,7 +198,7 @@ THE SOFTWARE.
static FT_Error
bdf_interpret_style( BDF_Face bdf )
{
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Face face = FT_FACE( bdf );
FT_Memory memory = face->memory;
bdf_font_t* font = bdf->bdffont;
@@ -243,8 +243,6 @@ THE SOFTWARE.
!( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
strings[0] = (char *)(prop->value.atom);
- len = 0;
-
for ( len = 0, nn = 0; nn < 4; nn++ )
{
lengths[nn] = 0;
@@ -342,7 +340,7 @@ THE SOFTWARE.
FT_Int num_params,
FT_Parameter* params )
{
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
BDF_Face face = (BDF_Face)bdfface;
FT_Memory memory = FT_FACE_MEMORY( face );
@@ -351,7 +349,6 @@ THE SOFTWARE.
FT_UNUSED( num_params );
FT_UNUSED( params );
- FT_UNUSED( face_index );
FT_TRACE2(( "BDF driver\n" ));
@@ -365,7 +362,7 @@ THE SOFTWARE.
options.font_spacing = BDF_PROPORTIONAL;
error = bdf_load_font( stream, memory, &options, &font );
- if ( error == BDF_Err_Missing_Startfont_Field )
+ if ( FT_ERR_EQ( error, Missing_Startfont_Field ) )
{
FT_TRACE2(( " not a BDF file\n" ));
goto Fail;
@@ -375,6 +372,19 @@ THE SOFTWARE.
/* we have a bdf font: let's construct the face object */
face->bdffont = font;
+
+ /* BDF could not have multiple face in single font file.
+ * XXX: non-zero face_index is already invalid argument, but
+ * Type1, Type42 driver has a convention to return
+ * an invalid argument error when the font could be
+ * opened by the specified driver.
+ */
+ if ( face_index > 0 ) {
+ FT_ERROR(( "BDF_Face_Init: invalid face index\n" ));
+ BDF_Face_Done( bdfface );
+ return FT_THROW( Invalid_Argument );
+ }
+
{
bdf_property_t* prop = NULL;
@@ -388,9 +398,10 @@ THE SOFTWARE.
bdfface->num_faces = 1;
bdfface->face_index = 0;
- bdfface->face_flags = FT_FACE_FLAG_FIXED_SIZES |
- FT_FACE_FLAG_HORIZONTAL |
- FT_FACE_FLAG_FAST_GLYPHS;
+
+ bdfface->face_flags |= FT_FACE_FLAG_FIXED_SIZES |
+ FT_FACE_FLAG_HORIZONTAL |
+ FT_FACE_FLAG_FAST_GLYPHS;
prop = bdf_get_font_property( font, "SPACING" );
if ( prop && prop->format == BDF_ATOM &&
@@ -591,7 +602,7 @@ THE SOFTWARE.
Fail:
BDF_Face_Done( bdfface );
- return BDF_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
}
@@ -608,7 +619,7 @@ THE SOFTWARE.
size->metrics.descender = -bdffont->font_descent << 6;
size->metrics.max_advance = bdffont->bbx.width << 6;
- return BDF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -619,7 +630,7 @@ THE SOFTWARE.
FT_Face face = size->face;
FT_Bitmap_Size* bsize = face->available_sizes;
bdf_font_t* bdffont = ( (BDF_Face)face )->bdffont;
- FT_Error error = BDF_Err_Invalid_Pixel_Size;
+ FT_Error error = FT_ERR( Invalid_Pixel_Size );
FT_Long height;
@@ -630,17 +641,17 @@ THE SOFTWARE.
{
case FT_SIZE_REQUEST_TYPE_NOMINAL:
if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) )
- error = BDF_Err_Ok;
+ error = FT_Err_Ok;
break;
case FT_SIZE_REQUEST_TYPE_REAL_DIM:
if ( height == ( bdffont->font_ascent +
bdffont->font_descent ) )
- error = BDF_Err_Ok;
+ error = FT_Err_Ok;
break;
default:
- error = BDF_Err_Unimplemented_Feature;
+ error = FT_THROW( Unimplemented_Feature );
break;
}
@@ -660,7 +671,7 @@ THE SOFTWARE.
{
BDF_Face bdf = (BDF_Face)FT_SIZE_FACE( size );
FT_Face face = FT_FACE( bdf );
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Bitmap* bitmap = &slot->bitmap;
bdf_glyph_t glyph;
int bpp = bdf->bdffont->bpp;
@@ -668,12 +679,20 @@ THE SOFTWARE.
FT_UNUSED( load_flags );
- if ( !face || glyph_index >= (FT_UInt)face->num_glyphs )
+ if ( !face )
{
- error = BDF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Face_Handle );
goto Exit;
}
+ if ( glyph_index >= (FT_UInt)face->num_glyphs )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
+ FT_TRACE1(( "BDF_Glyph_Load: glyph index %d\n", glyph_index ));
+
/* index 0 is the undefined glyph */
if ( glyph_index == 0 )
glyph_index = bdf->default_glyph;
@@ -786,7 +805,7 @@ THE SOFTWARE.
}
Fail:
- return BDF_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
@@ -864,10 +883,6 @@ THE SOFTWARE.
0, /* FT_Slot_InitFunc */
0, /* FT_Slot_DoneFunc */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- ft_stub_set_char_sizes,
- ft_stub_set_pixel_sizes,
-#endif
BDF_Glyph_Load,
0, /* FT_Face_GetKerningFunc */
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index b7b6857..abcfdee 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1,6 +1,6 @@
/*
* Copyright 2000 Computing Research Labs, New Mexico State University
- * Copyright 2001-2012
+ * Copyright 2001-2014
* Francesco Zappa Nardelli
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -169,6 +169,18 @@
sizeof ( _bdf_properties[0] );
+ /* An auxiliary macro to parse properties, to be used in conditionals. */
+ /* It behaves like `strncmp' but also tests the following character */
+ /* whether it is a whitespace or NULL. */
+ /* `property' is a constant string of length `n' to compare with. */
+#define _bdf_strncmp( name, property, n ) \
+ ( ft_strncmp( name, property, n ) || \
+ !( name[n] == ' ' || \
+ name[n] == '\0' || \
+ name[n] == '\n' || \
+ name[n] == '\r' || \
+ name[n] == '\t' ) )
+
/* Auto correction messages. */
#define ACMSG1 "FONT_ASCENT property missing. " \
"Added `FONT_ASCENT %hd'.\n"
@@ -254,7 +266,7 @@
{
hashnode* obp = ht->table, *bp, *nbp;
int i, sz = ht->size;
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
ht->size <<= 1;
@@ -282,8 +294,8 @@
hash_init( hashtable* ht,
FT_Memory memory )
{
- int sz = INITIAL_HT_SIZE;
- FT_Error error = BDF_Err_Ok;
+ int sz = INITIAL_HT_SIZE;
+ FT_Error error = FT_Err_Ok;
ht->size = sz;
@@ -322,8 +334,9 @@
hashtable* ht,
FT_Memory memory )
{
- hashnode nn, *bp = hash_bucket( key, ht );
- FT_Error error = BDF_Err_Ok;
+ hashnode nn;
+ hashnode* bp = hash_bucket( key, ht );
+ FT_Error error = FT_Err_Ok;
nn = *bp;
@@ -456,7 +469,7 @@
_bdf_list_ensure( _bdf_list_t* list,
unsigned long num_items ) /* same as _bdf_list_t.used */
{
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( num_items > list->size )
@@ -469,7 +482,7 @@
if ( oldsize == bigsize )
{
- error = BDF_Err_Out_Of_Memory;
+ error = FT_THROW( Out_Of_Memory );
goto Exit;
}
else if ( newsize < oldsize || newsize > bigsize )
@@ -519,7 +532,7 @@
unsigned long *alen )
{
unsigned long i, j;
- char *fp, *dp;
+ char* dp;
*alen = 0;
@@ -530,7 +543,9 @@
dp = list->field[0];
for ( i = j = 0; i < list->used; i++ )
{
- fp = list->field[i];
+ char* fp = list->field[i];
+
+
while ( *fp )
dp[j++] = *fp++;
@@ -558,7 +573,7 @@
int mult, final_empty;
char *sp, *ep, *end;
char seps[32];
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
/* Initialize the list. */
@@ -569,6 +584,7 @@
list->field[1] = (char*)empty;
list->field[2] = (char*)empty;
list->field[3] = (char*)empty;
+ list->field[4] = (char*)empty;
}
/* If the line is empty, then simply return. */
@@ -580,7 +596,7 @@
/* this, so an error is signaled. */
if ( separators == 0 || *separators == 0 )
{
- error = BDF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -666,14 +682,14 @@
unsigned long lineno, buf_size;
int refill, hold, to_skip;
ptrdiff_t bytes, start, end, cursor, avail;
- char* buf = 0;
+ char* buf = 0;
FT_Memory memory = stream->memory;
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( callback == 0 )
{
- error = BDF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -687,7 +703,6 @@
lineno = 1;
buf[0] = 0;
start = 0;
- end = 0;
avail = 0;
cursor = 0;
refill = 1;
@@ -737,7 +752,7 @@
if ( buf_size >= 65536UL ) /* limit ourselves to 64KByte */
{
FT_ERROR(( "_bdf_readstream: " ERRMSG6, lineno ));
- error = BDF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -752,7 +767,7 @@
{
bytes = avail - start;
- FT_MEM_COPY( buf, buf + start, bytes );
+ FT_MEM_MOVE( buf, buf + start, bytes );
cursor = bytes;
avail -= bytes;
@@ -766,14 +781,14 @@
hold = buf[end];
buf[end] = 0;
- /* XXX: Use encoding independent value for 0x1a */
- if ( buf[start] != '#' && buf[start] != 0x1a && end > start )
+ /* XXX: Use encoding independent value for 0x1A */
+ if ( buf[start] != '#' && buf[start] != 0x1A && end > start )
{
- error = (*cb)( buf + start, end - start, lineno,
+ error = (*cb)( buf + start, (unsigned long)( 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,
+ error = (*cb)( buf + start, (unsigned long)( end - start ), lineno,
(void*)&cb, client_data );
if ( error )
break;
@@ -808,17 +823,17 @@
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static const unsigned char odigits[32] =
{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -826,7 +841,7 @@
static const unsigned char ddigits[32] =
{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -834,16 +849,13 @@
static const unsigned char hdigits[32] =
{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03,
- 0x7e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,
+ 0x7E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-#define isdigok( m, d ) (m[(d) >> 3] & ( 1 << ( (d) & 7 ) ) )
-
-
/* Routine to convert an ASCII string into an unsigned long integer. */
static unsigned long
_bdf_atoul( char* s,
@@ -881,7 +893,7 @@
s += 2;
}
- for ( v = 0; isdigok( dmap, *s ); s++ )
+ for ( v = 0; sbitset( dmap, *s ); s++ )
v = v * base + a2i[(int)*s];
if ( end != 0 )
@@ -936,7 +948,7 @@
s += 2;
}
- for ( v = 0; isdigok( dmap, *s ); s++ )
+ for ( v = 0; sbitset( dmap, *s ); s++ )
v = v * base + a2i[(int)*s];
if ( end != 0 )
@@ -991,7 +1003,7 @@
s += 2;
}
- for ( v = 0; isdigok( dmap, *s ); s++ )
+ for ( v = 0; sbitset( dmap, *s ); s++ )
v = (short)( v * base + a2i[(int)*s] );
if ( end != 0 )
@@ -1030,7 +1042,7 @@
size_t n;
bdf_property_t* p;
FT_Memory memory = font->memory;
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
/* First check whether the property has */
@@ -1049,7 +1061,7 @@
n = ft_strlen( name ) + 1;
if ( n > FT_ULONG_MAX )
- return BDF_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( FT_NEW_ARRAY( p->name, n ) )
goto Exit;
@@ -1136,7 +1148,7 @@
{
char* cp;
FT_Memory memory = font->memory;
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( FT_RENEW_ARRAY( font->comments,
@@ -1167,12 +1179,14 @@
char name[256];
_bdf_list_t list;
FT_Memory memory;
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
+
+ FT_UNUSED( lineno ); /* only used in debug mode */
if ( font == 0 || font->name == 0 || font->name[0] == 0 )
{
- error = BDF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -1187,13 +1201,13 @@
if ( len >= 256 )
{
FT_ERROR(( "_bdf_set_default_spacing: " ERRMSG7, lineno ));
- error = BDF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
FT_MEM_COPY( name, font->name, len );
- error = _bdf_list_split( &list, (char *)"-", name, len );
+ error = _bdf_list_split( &list, (char *)"-", name, (unsigned long)len );
if ( error )
goto Fail;
@@ -1300,7 +1314,9 @@
hashnode hn;
bdf_property_t *prop, *fp;
FT_Memory memory = font->memory;
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
+
+ FT_UNUSED( lineno ); /* only used in debug mode */
/* First, check whether the property already exists in the font. */
@@ -1404,7 +1420,7 @@
/* 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 ( _bdf_strncmp( name, "COMMENT", 7 ) != 0 )
{
/* Add the property to the font property table. */
error = hash_insert( fp->name,
@@ -1422,18 +1438,18 @@
/* FONT_ASCENT and FONT_DESCENT need to be assigned if they are */
/* present, and the SPACING property should override the default */
/* spacing. */
- if ( ft_memcmp( name, "DEFAULT_CHAR", 12 ) == 0 )
+ if ( _bdf_strncmp( name, "DEFAULT_CHAR", 12 ) == 0 )
font->default_char = fp->value.l;
- else if ( ft_memcmp( name, "FONT_ASCENT", 11 ) == 0 )
+ else if ( _bdf_strncmp( name, "FONT_ASCENT", 11 ) == 0 )
font->font_ascent = fp->value.l;
- else if ( ft_memcmp( name, "FONT_DESCENT", 12 ) == 0 )
+ else if ( _bdf_strncmp( name, "FONT_DESCENT", 12 ) == 0 )
font->font_descent = fp->value.l;
- else if ( ft_memcmp( name, "SPACING", 7 ) == 0 )
+ else if ( _bdf_strncmp( name, "SPACING", 7 ) == 0 )
{
if ( !fp->value.atom )
{
FT_ERROR(( "_bdf_add_property: " ERRMSG8, lineno, "SPACING" ));
- error = BDF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1474,7 +1490,7 @@
bdf_font_t* font;
FT_Memory memory;
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( call_data );
FT_UNUSED( lineno ); /* only used in debug mode */
@@ -1486,7 +1502,7 @@
memory = font->memory;
/* Check for a comment. */
- if ( ft_memcmp( line, "COMMENT", 7 ) == 0 )
+ if ( _bdf_strncmp( line, "COMMENT", 7 ) == 0 )
{
linelen -= 7;
@@ -1503,10 +1519,10 @@
/* The very first thing expected is the number of glyphs. */
if ( !( p->flags & _BDF_GLYPHS ) )
{
- if ( ft_memcmp( line, "CHARS", 5 ) != 0 )
+ if ( _bdf_strncmp( line, "CHARS", 5 ) != 0 )
{
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "CHARS" ));
- error = BDF_Err_Missing_Chars_Field;
+ error = FT_THROW( Missing_Chars_Field );
goto Exit;
}
@@ -1524,7 +1540,7 @@
if ( p->cnt >= 0x110000UL )
{
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG5, lineno, "CHARS" ));
- error = BDF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -1537,8 +1553,16 @@
}
/* Check for the ENDFONT field. */
- if ( ft_memcmp( line, "ENDFONT", 7 ) == 0 )
+ if ( _bdf_strncmp( line, "ENDFONT", 7 ) == 0 )
{
+ if ( p->flags & _BDF_GLYPH_BITS )
+ {
+ /* Missing ENDCHAR field. */
+ FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENDCHAR" ));
+ error = FT_THROW( Corrupted_Font_Glyphs );
+ goto Exit;
+ }
+
/* Sort the glyphs by encoding. */
ft_qsort( (char *)font->glyphs,
font->glyphs_used,
@@ -1551,7 +1575,7 @@
}
/* Check for the ENDCHAR field. */
- if ( ft_memcmp( line, "ENDCHAR", 7 ) == 0 )
+ if ( _bdf_strncmp( line, "ENDCHAR", 7 ) == 0 )
{
p->glyph_enc = 0;
p->flags &= ~_BDF_GLYPH_BITS;
@@ -1567,7 +1591,7 @@
goto Exit;
/* Check for the STARTCHAR field. */
- if ( ft_memcmp( line, "STARTCHAR", 9 ) == 0 )
+ if ( _bdf_strncmp( line, "STARTCHAR", 9 ) == 0 )
{
/* Set the character name in the parse info first until the */
/* encoding can be checked for an unencoded character. */
@@ -1584,7 +1608,7 @@
if ( !s )
{
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG8, lineno, "STARTCHAR" ));
- error = BDF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1601,13 +1625,13 @@
}
/* Check for the ENCODING field. */
- if ( ft_memcmp( line, "ENCODING", 8 ) == 0 )
+ if ( _bdf_strncmp( line, "ENCODING", 8 ) == 0 )
{
if ( !( p->flags & _BDF_GLYPH ) )
{
/* Missing STARTCHAR field. */
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "STARTCHAR" ));
- error = BDF_Err_Missing_Startchar_Field;
+ error = FT_THROW( Missing_Startchar_Field );
goto Exit;
}
@@ -1626,15 +1650,19 @@
if ( p->glyph_enc == -1 && p->list.used > 2 )
p->glyph_enc = _bdf_atol( p->list.field[2], 0, 10 );
+ if ( p->glyph_enc < -1 )
+ p->glyph_enc = -1;
+
FT_TRACE4(( DBGMSG2, p->glyph_enc ));
/* Check that the encoding is in the Unicode range because */
/* otherwise p->have (a bitmap with static size) overflows. */
- if ( p->glyph_enc > 0 &&
- (size_t)p->glyph_enc >= sizeof ( p->have ) * 8 )
+ if ( p->glyph_enc > 0 &&
+ (size_t)p->glyph_enc >= sizeof ( p->have ) /
+ sizeof ( unsigned long ) * 32 )
{
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG5, lineno, "ENCODING" ));
- error = BDF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1746,7 +1774,7 @@
for ( i = 0; i < nibbles; i++ )
{
c = line[i];
- if ( !isdigok( hdigits, c ) )
+ if ( !sbitset( hdigits, c ) )
break;
*bp = (FT_Byte)( ( *bp << 4 ) + a2i[c] );
if ( i + 1 < nibbles && ( i & 1 ) )
@@ -1770,7 +1798,7 @@
/* If any line has extra columns, indicate they have been removed. */
if ( i == nibbles &&
- isdigok( hdigits, line[nibbles] ) &&
+ sbitset( hdigits, line[nibbles] ) &&
!( p->flags & _BDF_GLYPH_WIDTH_CHECK ) )
{
FT_TRACE2(( "_bdf_parse_glyphs: " ACMSG14, glyph->encoding ));
@@ -1783,7 +1811,7 @@
}
/* Expect the SWIDTH (scalable width) field next. */
- if ( ft_memcmp( line, "SWIDTH", 6 ) == 0 )
+ if ( _bdf_strncmp( line, "SWIDTH", 6 ) == 0 )
{
if ( !( p->flags & _BDF_ENCODING ) )
goto Missing_Encoding;
@@ -1799,7 +1827,7 @@
}
/* Expect the DWIDTH (scalable width) field next. */
- if ( ft_memcmp( line, "DWIDTH", 6 ) == 0 )
+ if ( _bdf_strncmp( line, "DWIDTH", 6 ) == 0 )
{
if ( !( p->flags & _BDF_ENCODING ) )
goto Missing_Encoding;
@@ -1827,7 +1855,7 @@
}
/* Expect the BBX field next. */
- if ( ft_memcmp( line, "BBX", 3 ) == 0 )
+ if ( _bdf_strncmp( line, "BBX", 3 ) == 0 )
{
if ( !( p->flags & _BDF_ENCODING ) )
goto Missing_Encoding;
@@ -1895,7 +1923,7 @@
}
/* And finally, gather up the bitmap. */
- if ( ft_memcmp( line, "BITMAP", 6 ) == 0 )
+ if ( _bdf_strncmp( line, "BITMAP", 6 ) == 0 )
{
unsigned long bitmap_size;
@@ -1904,7 +1932,7 @@
{
/* Missing BBX field. */
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "BBX" ));
- error = BDF_Err_Missing_Bbx_Field;
+ error = FT_THROW( Missing_Bbx_Field );
goto Exit;
}
@@ -1915,7 +1943,7 @@
if ( glyph->bpr > 0xFFFFU || bitmap_size > 0xFFFFU )
{
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG4, lineno ));
- error = BDF_Err_Bbx_Too_Big;
+ error = FT_THROW( Bbx_Too_Big );
goto Exit;
}
else
@@ -1931,13 +1959,13 @@
}
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG9, lineno ));
- error = BDF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
Missing_Encoding:
/* Missing ENCODING field. */
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENCODING" ));
- error = BDF_Err_Missing_Encoding_Field;
+ error = FT_THROW( Missing_Encoding_Field );
Exit:
if ( error && ( p->flags & _BDF_GLYPH ) )
@@ -1961,7 +1989,7 @@
char* name;
char* value;
char nbuf[128];
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( lineno );
@@ -1970,7 +1998,7 @@
p = (_bdf_parse_t *) client_data;
/* Check for the end of the properties. */
- if ( ft_memcmp( line, "ENDPROPERTIES", 13 ) == 0 )
+ if ( _bdf_strncmp( line, "ENDPROPERTIES", 13 ) == 0 )
{
/* If the FONT_ASCENT or FONT_DESCENT properties have not been */
/* encountered yet, then make sure they are added as properties and */
@@ -2011,12 +2039,12 @@
}
/* Ignore the _XFREE86_GLYPH_RANGES properties. */
- if ( ft_memcmp( line, "_XFREE86_GLYPH_RANGES", 21 ) == 0 )
+ if ( _bdf_strncmp( line, "_XFREE86_GLYPH_RANGES", 21 ) == 0 )
goto Exit;
/* Handle COMMENT fields and properties in a special way to preserve */
/* the spacing. */
- if ( ft_memcmp( line, "COMMENT", 7 ) == 0 )
+ if ( _bdf_strncmp( line, "COMMENT", 7 ) == 0 )
{
name = value = line;
value += 7;
@@ -2067,7 +2095,7 @@
char *s;
FT_Memory memory = NULL;
- FT_Error error = BDF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( lineno ); /* only used in debug mode */
@@ -2080,7 +2108,7 @@
/* Check for a comment. This is done to handle those fonts that have */
/* comments before the STARTFONT line for some reason. */
- if ( ft_memcmp( line, "COMMENT", 7 ) == 0 )
+ if ( _bdf_strncmp( line, "COMMENT", 7 ) == 0 )
{
if ( p->opts->keep_comments != 0 && p->font != 0 )
{
@@ -2106,11 +2134,11 @@
{
memory = p->memory;
- if ( ft_memcmp( line, "STARTFONT", 9 ) != 0 )
+ if ( _bdf_strncmp( line, "STARTFONT", 9 ) != 0 )
{
/* we don't emit an error message since this code gets */
/* explicitly caught one level higher */
- error = BDF_Err_Missing_Startfont_Field;
+ error = FT_THROW( Missing_Startfont_Field );
goto Exit;
}
@@ -2154,13 +2182,13 @@
}
/* Check for the start of the properties. */
- if ( ft_memcmp( line, "STARTPROPERTIES", 15 ) == 0 )
+ if ( _bdf_strncmp( 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;
+ error = FT_THROW( Missing_Fontboundingbox_Field );
goto Exit;
}
@@ -2171,7 +2199,10 @@
p->cnt = p->font->props_size = _bdf_atoul( p->list.field[1], 0, 10 );
if ( FT_NEW_ARRAY( p->font->props, p->cnt ) )
+ {
+ p->font->props_size = 0;
goto Exit;
+ }
p->flags |= _BDF_PROPS;
*next = _bdf_parse_properties;
@@ -2180,13 +2211,13 @@
}
/* Check for the FONTBOUNDINGBOX field. */
- if ( ft_memcmp( line, "FONTBOUNDINGBOX", 15 ) == 0 )
+ if ( _bdf_strncmp( line, "FONTBOUNDINGBOX", 15 ) == 0 )
{
if ( !( p->flags & _BDF_SIZE ) )
{
/* Missing the SIZE field. */
FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "SIZE" ));
- error = BDF_Err_Missing_Size_Field;
+ error = FT_THROW( Missing_Size_Field );
goto Exit;
}
@@ -2211,7 +2242,7 @@
}
/* The next thing to check for is the FONT field. */
- if ( ft_memcmp( line, "FONT", 4 ) == 0 )
+ if ( _bdf_strncmp( line, "FONT", 4 ) == 0 )
{
error = _bdf_list_split( &p->list, (char *)" +", line, linelen );
if ( error )
@@ -2223,7 +2254,7 @@
if ( !s )
{
FT_ERROR(( "_bdf_parse_start: " ERRMSG8, lineno, "FONT" ));
- error = BDF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -2246,13 +2277,13 @@
}
/* Check for the SIZE field. */
- if ( ft_memcmp( line, "SIZE", 4 ) == 0 )
+ if ( _bdf_strncmp( line, "SIZE", 4 ) == 0 )
{
if ( !( p->flags & _BDF_FONT_NAME ) )
{
/* Missing the FONT field. */
FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "FONT" ));
- error = BDF_Err_Missing_Font_Field;
+ error = FT_THROW( Missing_Font_Field );
goto Exit;
}
@@ -2300,7 +2331,7 @@
}
/* Check for the CHARS field -- font properties are optional */
- if ( ft_memcmp( line, "CHARS", 5 ) == 0 )
+ if ( _bdf_strncmp( line, "CHARS", 5 ) == 0 )
{
char nbuf[128];
@@ -2309,7 +2340,7 @@
{
/* Missing the FONTBOUNDINGBOX field. */
FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "FONTBOUNDINGBOX" ));
- error = BDF_Err_Missing_Fontboundingbox_Field;
+ error = FT_THROW( Missing_Fontboundingbox_Field );
goto Exit;
}
@@ -2341,7 +2372,7 @@
}
FT_ERROR(( "_bdf_parse_start: " ERRMSG9, lineno ));
- error = BDF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
Exit:
return error;
@@ -2364,8 +2395,8 @@
unsigned long lineno = 0; /* make compiler happy */
_bdf_parse_t *p = NULL;
- FT_Memory memory = extmemory;
- FT_Error error = BDF_Err_Ok;
+ FT_Memory memory = extmemory; /* needed for FT_NEW */
+ FT_Error error = FT_Err_Ok;
if ( FT_NEW( p ) )
@@ -2387,7 +2418,6 @@
{
/* If the font is not proportional, set the font's monowidth */
/* field to the width of the font bounding box. */
- memory = p->font->memory;
if ( p->font->spacing != BDF_PROPORTIONAL )
p->font->monowidth = p->font->bbx.width;
@@ -2458,14 +2488,14 @@
{
/* Error happened while parsing header. */
FT_ERROR(( "bdf_load_font: " ERRMSG2, lineno ));
- error = BDF_Err_Corrupted_Font_Header;
+ error = FT_THROW( Corrupted_Font_Header );
goto Exit;
}
else
{
/* Error happened when parsing glyphs. */
FT_ERROR(( "bdf_load_font: " ERRMSG3, lineno ));
- error = BDF_Err_Corrupted_Font_Glyphs;
+ error = FT_THROW( Corrupted_Font_Glyphs );
goto Exit;
}
}
@@ -2485,8 +2515,8 @@
p->font->comments[p->font->comments_len] = 0;
}
}
- else if ( error == BDF_Err_Ok )
- error = BDF_Err_Invalid_File_Format;
+ else if ( error == FT_Err_Ok )
+ error = FT_THROW( Invalid_File_Format );
*font = p->font;
diff --git a/src/bzip2/ftbzip2.c b/src/bzip2/ftbzip2.c
index d60ee3e..7e406b1 100644
--- a/src/bzip2/ftbzip2.c
+++ b/src/bzip2/ftbzip2.c
@@ -8,7 +8,7 @@
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2010, 2012 by */
+/* Copyright 2010, 2012-2014 by */
/* Joel Klinghed. */
/* */
/* Based on src/gzip/ftgzip.c, Copyright 2002 - 2010 by */
@@ -120,7 +120,7 @@
static FT_Error
ft_bzip2_check_header( FT_Stream stream )
{
- FT_Error error = Bzip2_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte head[4];
@@ -131,10 +131,10 @@
/* 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[1] != 0x5A ||
head[2] != 0x68 ) /* only support bzip2 (huffman) */
{
- error = Bzip2_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -149,7 +149,7 @@
FT_Stream source )
{
bz_stream* bzstream = &zip->bzstream;
- FT_Error error = Bzip2_Err_Ok;
+ FT_Error error = FT_Err_Ok;
zip->stream = stream;
@@ -182,7 +182,7 @@
if ( BZ2_bzDecompressInit( bzstream, 0, 0 ) != BZ_OK ||
bzstream->next_in == NULL )
- error = Bzip2_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
Exit:
return error;
@@ -255,7 +255,7 @@
size = stream->read( stream, stream->pos, zip->input,
FT_BZIP2_BUFFER_SIZE );
if ( size == 0 )
- return Bzip2_Err_Invalid_Stream_Operation;
+ return FT_THROW( Invalid_Stream_Operation );
}
else
{
@@ -264,7 +264,7 @@
size = FT_BZIP2_BUFFER_SIZE;
if ( size == 0 )
- return Bzip2_Err_Invalid_Stream_Operation;
+ return FT_THROW( Invalid_Stream_Operation );
FT_MEM_COPY( zip->input, stream->base + stream->pos, size );
}
@@ -273,7 +273,7 @@
bzstream->next_in = (char*)zip->input;
bzstream->avail_in = size;
- return Bzip2_Err_Ok;
+ return FT_Err_Ok;
}
@@ -281,7 +281,7 @@
ft_bzip2_file_fill_output( FT_BZip2File zip )
{
bz_stream* bzstream = &zip->bzstream;
- FT_Error error = Bzip2_Err_Ok;
+ FT_Error error = FT_Err_Ok;
zip->cursor = zip->buffer;
@@ -306,12 +306,12 @@
{
zip->limit = (FT_Byte*)bzstream->next_out;
if ( zip->limit == zip->cursor )
- error = Bzip2_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
break;
}
else if ( err != BZ_OK )
{
- error = Bzip2_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
break;
}
}
@@ -325,7 +325,7 @@
ft_bzip2_file_skip_output( FT_BZip2File zip,
FT_ULong count )
{
- FT_Error error = Bzip2_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_ULong delta;
@@ -456,10 +456,18 @@
FT_Stream source )
{
FT_Error error;
- FT_Memory memory = source->memory;
+ FT_Memory memory;
FT_BZip2File zip = NULL;
+ if ( !stream || !source )
+ {
+ error = FT_THROW( Invalid_Stream_Handle );
+ goto Exit;
+ }
+
+ memory = source->memory;
+
/*
* check the header right now; this prevents allocating unnecessary
* objects when we don't need them
@@ -502,7 +510,7 @@
FT_UNUSED( stream );
FT_UNUSED( source );
- return Bzip2_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
#endif /* !FT_CONFIG_OPTION_USE_BZIP2 */
diff --git a/src/cache/Jamfile b/src/cache/Jamfile
index 340cff7..6563991 100644
--- a/src/cache/Jamfile
+++ b/src/cache/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/cache Jamfile
#
-# Copyright 2001, 2003, 2004 by
+# Copyright 2001, 2003, 2004, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -11,7 +11,7 @@
SubDir FT2_TOP $(FT2_SRC_DIR) cache ;
-# The file <freetype/ftcache.h> contains some macro definitions that are
+# The file <ftcache.h> contains some macro definitions that are
# later used in #include statements related to the cache sub-system. It
# needs to be parsed through a HDRMACRO rule for macro definitions.
#
diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c
index d4fc353..6bad39d 100644
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType basic cache interface (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 by */
+/* Copyright 2003-2007, 2009-2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -30,44 +30,6 @@
#define FT_COMPONENT trace_cache
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- /*
- * These structures correspond to the FTC_Font and FTC_ImageDesc types
- * that were defined in version 2.1.7.
- */
- typedef struct FTC_OldFontRec_
- {
- FTC_FaceID face_id;
- FT_UShort pix_width;
- FT_UShort pix_height;
-
- } FTC_OldFontRec, *FTC_OldFont;
-
-
- typedef struct FTC_OldImageDescRec_
- {
- FTC_OldFontRec font;
- FT_UInt32 flags;
-
- } FTC_OldImageDescRec, *FTC_OldImageDesc;
-
-
- /*
- * Notice that FTC_OldImageDescRec and FTC_ImageTypeRec are nearly
- * identical, bit-wise. The only difference is that the `width' and
- * `height' fields are expressed as 16-bit integers in the old structure,
- * and as normal `int' in the new one.
- *
- * We are going to perform a weird hack to detect which structure is
- * being passed to the image and sbit caches. If the new structure's
- * `width' is larger than 0x10000, we assume that we are really receiving
- * an FTC_OldImageDesc.
- */
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
/*
* Basic Families
*
@@ -148,10 +110,9 @@
return result;
if ( (FT_ULong)face->num_glyphs > FT_UINT_MAX || 0 > face->num_glyphs )
- {
- FT_TRACE1(( "ftc_basic_family_get_count: too large number of glyphs " ));
- FT_TRACE1(( "in this face, truncated\n", face->num_glyphs ));
- }
+ FT_TRACE1(( "ftc_basic_family_get_count:"
+ " too large number of glyphs in this face, truncated\n",
+ face->num_glyphs ));
if ( !error )
result = (FT_UInt)face->num_glyphs;
@@ -226,7 +187,7 @@
}
}
else
- error = FTC_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
}
}
@@ -267,7 +228,7 @@
*
*/
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_IFamilyClassRec ftc_basic_image_family_class =
{
{
@@ -281,7 +242,7 @@
};
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_GCacheClassRec ftc_basic_image_cache_class =
{
{
@@ -325,10 +286,10 @@
FT_PtrDist hash;
- /* some argument checks are delayed to FTC_Cache_Lookup */
+ /* some argument checks are delayed to `FTC_Cache_Lookup' */
if ( !aglyph )
{
- error = FTC_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -336,38 +297,15 @@
if ( anode )
*anode = NULL;
-#if defined( FT_CONFIG_OPTION_OLD_INTERNALS ) && ( FT_INT_MAX > 0xFFFFU )
-
- /*
- * This one is a major hack used to detect whether we are passed a
- * regular FTC_ImageType handle, or a legacy FTC_OldImageDesc one.
- */
- if ( (FT_ULong)type->width >= 0x10000L )
- {
- FTC_OldImageDesc desc = (FTC_OldImageDesc)type;
-
-
- query.attrs.scaler.face_id = desc->font.face_id;
- query.attrs.scaler.width = desc->font.pix_width;
- query.attrs.scaler.height = desc->font.pix_height;
- query.attrs.load_flags = desc->flags;
- }
- else
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
- {
- if ( (FT_ULong)(type->flags - FT_INT_MIN) > FT_UINT_MAX )
- {
- FT_TRACE1(( "FTC_ImageCache_Lookup: higher bits in load_flags" ));
- FT_TRACE1(( "0x%x are dropped\n", (type->flags & ~((FT_ULong)FT_UINT_MAX)) ));
- }
+ if ( (FT_ULong)( type->flags - FT_INT_MIN ) > FT_UINT_MAX )
+ FT_TRACE1(( "FTC_ImageCache_Lookup:"
+ " higher bits in load_flags 0x%x are dropped\n",
+ type->flags & ~((FT_ULong)FT_UINT_MAX) ));
- query.attrs.scaler.face_id = type->face_id;
- query.attrs.scaler.width = type->width;
- query.attrs.scaler.height = type->height;
- query.attrs.load_flags = (FT_UInt)type->flags;
- }
+ query.attrs.scaler.face_id = type->face_id;
+ query.attrs.scaler.width = type->width;
+ query.attrs.scaler.height = type->height;
+ query.attrs.load_flags = (FT_UInt)type->flags;
query.attrs.scaler.pixel = 1;
query.attrs.scaler.x_res = 0; /* make compilers happy */
@@ -421,10 +359,10 @@
FT_PtrDist hash;
- /* some argument checks are delayed to FTC_Cache_Lookup */
+ /* some argument checks are delayed to `FTC_Cache_Lookup' */
if ( !aglyph || !scaler )
{
- error = FTC_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -432,12 +370,11 @@
if ( anode )
*anode = NULL;
- /* FT_Load_Glyph(), FT_Load_Char() take FT_UInt flags */
+ /* `FT_Load_Glyph' and `FT_Load_Char' take FT_UInt flags */
if ( load_flags > FT_UINT_MAX )
- {
- FT_TRACE1(( "FTC_ImageCache_LookupScaler: higher bits in load_flags" ));
- FT_TRACE1(( "0x%x are dropped\n", (load_flags & ~((FT_ULong)FT_UINT_MAX)) ));
- }
+ FT_TRACE1(( "FTC_ImageCache_LookupScaler:"
+ " higher bits in load_flags 0x%x are dropped\n",
+ load_flags & ~((FT_ULong)FT_UINT_MAX) ));
query.attrs.scaler = scaler[0];
query.attrs.load_flags = (FT_UInt)load_flags;
@@ -467,144 +404,13 @@
}
+ /*
+ *
+ * basic small bitmap cache
+ *
+ */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- /* yet another backwards-legacy structure */
- typedef struct FTC_OldImage_Desc_
- {
- FTC_FontRec font;
- FT_UInt image_type;
-
- } FTC_OldImage_Desc;
-
-
-#define FTC_OLD_IMAGE_FORMAT( x ) ( (x) & 7 )
-
-
-#define ftc_old_image_format_bitmap 0x0000
-#define ftc_old_image_format_outline 0x0001
-
-#define ftc_old_image_format_mask 0x000F
-
-#define ftc_old_image_flag_monochrome 0x0010
-#define ftc_old_image_flag_unhinted 0x0020
-#define ftc_old_image_flag_autohinted 0x0040
-#define ftc_old_image_flag_unscaled 0x0080
-#define ftc_old_image_flag_no_sbits 0x0100
-
- /* monochrome bitmap */
-#define ftc_old_image_mono ftc_old_image_format_bitmap | \
- ftc_old_image_flag_monochrome
-
- /* anti-aliased bitmap */
-#define ftc_old_image_grays ftc_old_image_format_bitmap
-
- /* scaled outline */
-#define ftc_old_image_outline ftc_old_image_format_outline
-
-
- static void
- ftc_image_type_from_old_desc( FTC_ImageType typ,
- FTC_OldImage_Desc* desc )
- {
- typ->face_id = desc->font.face_id;
- typ->width = desc->font.pix_width;
- typ->height = desc->font.pix_height;
-
- /* convert image type flags to load flags */
- {
- FT_UInt load_flags = FT_LOAD_DEFAULT;
- FT_UInt type = desc->image_type;
-
-
- /* determine load flags, depending on the font description's */
- /* image type */
-
- if ( FTC_OLD_IMAGE_FORMAT( type ) == ftc_old_image_format_bitmap )
- {
- if ( type & ftc_old_image_flag_monochrome )
- load_flags |= FT_LOAD_MONOCHROME;
-
- /* disable embedded bitmaps loading if necessary */
- if ( type & ftc_old_image_flag_no_sbits )
- load_flags |= FT_LOAD_NO_BITMAP;
- }
- else
- {
- /* we want an outline, don't load embedded bitmaps */
- load_flags |= FT_LOAD_NO_BITMAP;
-
- if ( type & ftc_old_image_flag_unscaled )
- load_flags |= FT_LOAD_NO_SCALE;
- }
-
- /* always render glyphs to bitmaps */
- load_flags |= FT_LOAD_RENDER;
-
- if ( type & ftc_old_image_flag_unhinted )
- load_flags |= FT_LOAD_NO_HINTING;
-
- if ( type & ftc_old_image_flag_autohinted )
- load_flags |= FT_LOAD_FORCE_AUTOHINT;
-
- typ->flags = load_flags;
- }
- }
-
-
- FT_EXPORT( FT_Error )
- FTC_Image_Cache_New( FTC_Manager manager,
- FTC_ImageCache *acache );
-
- FT_EXPORT( FT_Error )
- FTC_Image_Cache_Lookup( FTC_ImageCache icache,
- FTC_OldImage_Desc* desc,
- FT_UInt gindex,
- FT_Glyph *aglyph );
-
-
- FT_EXPORT_DEF( FT_Error )
- FTC_Image_Cache_New( FTC_Manager manager,
- FTC_ImageCache *acache )
- {
- return FTC_ImageCache_New( manager, (FTC_ImageCache*)acache );
- }
-
-
-
- FT_EXPORT_DEF( FT_Error )
- FTC_Image_Cache_Lookup( FTC_ImageCache icache,
- FTC_OldImage_Desc* desc,
- FT_UInt gindex,
- FT_Glyph *aglyph )
- {
- FTC_ImageTypeRec type0;
-
-
- if ( !desc )
- return FTC_Err_Invalid_Argument;
-
- ftc_image_type_from_old_desc( &type0, desc );
-
- return FTC_ImageCache_Lookup( (FTC_ImageCache)icache,
- &type0,
- gindex,
- aglyph,
- NULL );
- }
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
- /*
- *
- * basic small bitmap cache
- *
- */
-
-
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_SFamilyClassRec ftc_basic_sbit_family_class =
{
{
@@ -619,7 +425,7 @@
};
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_GCacheClassRec ftc_basic_sbit_cache_class =
{
{
@@ -666,43 +472,21 @@
if ( anode )
*anode = NULL;
- /* other argument checks delayed to FTC_Cache_Lookup */
+ /* other argument checks delayed to `FTC_Cache_Lookup' */
if ( !ansbit )
- return FTC_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
*ansbit = NULL;
-#if defined( FT_CONFIG_OPTION_OLD_INTERNALS ) && ( FT_INT_MAX > 0xFFFFU )
+ if ( (FT_ULong)( type->flags - FT_INT_MIN ) > FT_UINT_MAX )
+ FT_TRACE1(( "FTC_ImageCache_Lookup:"
+ " higher bits in load_flags 0x%x are dropped\n",
+ type->flags & ~((FT_ULong)FT_UINT_MAX) ));
- /* This one is a major hack used to detect whether we are passed a
- * regular FTC_ImageType handle, or a legacy FTC_OldImageDesc one.
- */
- if ( (FT_ULong)type->width >= 0x10000L )
- {
- FTC_OldImageDesc desc = (FTC_OldImageDesc)type;
-
-
- query.attrs.scaler.face_id = desc->font.face_id;
- query.attrs.scaler.width = desc->font.pix_width;
- query.attrs.scaler.height = desc->font.pix_height;
- query.attrs.load_flags = desc->flags;
- }
- else
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
- {
- if ( (FT_ULong)(type->flags - FT_INT_MIN) > FT_UINT_MAX )
- {
- FT_TRACE1(( "FTC_ImageCache_Lookup: higher bits in load_flags" ));
- FT_TRACE1(( "0x%x are dropped\n", (type->flags & ~((FT_ULong)FT_UINT_MAX)) ));
- }
-
- query.attrs.scaler.face_id = type->face_id;
- query.attrs.scaler.width = type->width;
- query.attrs.scaler.height = type->height;
- query.attrs.load_flags = (FT_UInt)type->flags;
- }
+ query.attrs.scaler.face_id = type->face_id;
+ query.attrs.scaler.width = type->width;
+ query.attrs.scaler.height = type->height;
+ query.attrs.load_flags = (FT_UInt)type->flags;
query.attrs.scaler.pixel = 1;
query.attrs.scaler.x_res = 0; /* make compilers happy */
@@ -763,18 +547,17 @@
if ( anode )
*anode = NULL;
- /* other argument checks delayed to FTC_Cache_Lookup */
+ /* other argument checks delayed to `FTC_Cache_Lookup' */
if ( !ansbit || !scaler )
- return FTC_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
*ansbit = NULL;
- /* FT_Load_Glyph(), FT_Load_Char() take FT_UInt flags */
+ /* `FT_Load_Glyph' and `FT_Load_Char' take FT_UInt flags */
if ( load_flags > FT_UINT_MAX )
- {
- FT_TRACE1(( "FTC_ImageCache_LookupScaler: higher bits in load_flags" ));
- FT_TRACE1(( "0x%x are dropped\n", (load_flags & ~((FT_ULong)FT_UINT_MAX)) ));
- }
+ FT_TRACE1(( "FTC_ImageCache_LookupScaler:"
+ " higher bits in load_flags 0x%x are dropped\n",
+ load_flags & ~((FT_ULong)FT_UINT_MAX) ));
query.attrs.scaler = scaler[0];
query.attrs.load_flags = (FT_UInt)load_flags;
@@ -807,49 +590,4 @@
}
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- FT_EXPORT( FT_Error )
- FTC_SBit_Cache_New( FTC_Manager manager,
- FTC_SBitCache *acache );
-
- FT_EXPORT( FT_Error )
- FTC_SBit_Cache_Lookup( FTC_SBitCache cache,
- FTC_OldImage_Desc* desc,
- FT_UInt gindex,
- FTC_SBit *ansbit );
-
-
- FT_EXPORT_DEF( FT_Error )
- FTC_SBit_Cache_New( FTC_Manager manager,
- FTC_SBitCache *acache )
- {
- return FTC_SBitCache_New( manager, (FTC_SBitCache*)acache );
- }
-
-
- FT_EXPORT_DEF( FT_Error )
- FTC_SBit_Cache_Lookup( FTC_SBitCache cache,
- FTC_OldImage_Desc* desc,
- FT_UInt gindex,
- FTC_SBit *ansbit )
- {
- FTC_ImageTypeRec type0;
-
-
- if ( !desc )
- return FTC_Err_Invalid_Argument;
-
- ftc_image_type_from_old_desc( &type0, desc );
-
- return FTC_SBitCache_Lookup( (FTC_SBitCache)cache,
- &type0,
- gindex,
- ansbit,
- NULL );
- }
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
/* END */
diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c
index f01c403..f20dd45 100644
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -4,8 +4,7 @@
/* */
/* The FreeType internal cache interface (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, */
-/* 2011 by */
+/* Copyright 2000-2007, 2009-2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -270,11 +269,7 @@
/* remove a node from the cache manager */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- FT_BASE_DEF( void )
-#else
FT_LOCAL_DEF( void )
-#endif
ftc_node_destroy( FTC_Node node,
FTC_Manager manager )
{
@@ -493,14 +488,14 @@
FTC_Node* bucket;
FTC_Node* pnode;
FTC_Node node;
- FT_Error error = FTC_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Bool list_changed = FALSE;
FTC_Node_CompareFunc compare = cache->clazz.node_compare;
if ( cache == NULL || anode == NULL )
- return FTC_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* Go to the `top' node of the list sharing same masked hash */
bucket = pnode = FTC_NODE__TOP_FOR_HASH( cache, hash );
diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h
index d60984f..4155f32 100644
--- a/src/cache/ftccache.h
+++ b/src/cache/ftccache.h
@@ -4,8 +4,7 @@
/* */
/* FreeType internal cache interface (specification). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, */
-/* 2011 by */
+/* Copyright 2000-2007, 2009-2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -87,12 +86,6 @@ FT_BEGIN_HEADER
ftc_get_top_node_for_hash( ( cache ), ( hash ) )
#endif
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- FT_BASE( void )
- ftc_node_destroy( FTC_Node node,
- FTC_Manager manager );
-#endif
-
/*************************************************************************/
/*************************************************************************/
@@ -223,7 +216,7 @@ FT_BEGIN_HEADER
FT_Bool _list_changed = FALSE; \
\
\
- error = FTC_Err_Ok; \
+ error = FT_Err_Ok; \
node = NULL; \
\
/* Go to the `top' node of the list sharing same masked hash */ \
@@ -328,7 +321,7 @@ FT_BEGIN_HEADER
#define FTC_CACHE_TRYLOOP_END( list_changed ) \
- if ( !error || error != FTC_Err_Out_Of_Memory ) \
+ if ( !error || FT_ERR_NEQ( error, Out_Of_Memory ) ) \
break; \
\
_try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \
diff --git a/src/cache/ftccback.h b/src/cache/ftccback.h
index 80ec9ce..9528279 100644
--- a/src/cache/ftccback.h
+++ b/src/cache/ftccback.h
@@ -4,7 +4,7 @@
/* */
/* Callback functions of the caching sub-system (specification only). */
/* */
-/* Copyright 2004, 2005, 2006, 2011 by */
+/* Copyright 2004-2006, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -81,11 +81,10 @@
FT_LOCAL( void )
ftc_cache_done( FTC_Cache cache );
-#ifndef FT_CONFIG_OPTION_OLD_INTERNALS
FT_LOCAL( void )
ftc_node_destroy( FTC_Node node,
FTC_Manager manager );
-#endif
+
#endif /* __FTCCBACK_H__ */
diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c
index ad436ef..ab22366 100644
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -4,8 +4,7 @@
/* */
/* FreeType CharMap cache (body) */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
-/* 2010, 2011 by */
+/* Copyright 2000-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -32,43 +31,6 @@
#define FT_COMPONENT trace_cache
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- typedef enum FTC_OldCMapType_
- {
- FTC_OLD_CMAP_BY_INDEX = 0,
- FTC_OLD_CMAP_BY_ENCODING = 1,
- FTC_OLD_CMAP_BY_ID = 2
-
- } FTC_OldCMapType;
-
-
- typedef struct FTC_OldCMapIdRec_
- {
- FT_UInt platform;
- FT_UInt encoding;
-
- } FTC_OldCMapIdRec, *FTC_OldCMapId;
-
-
- typedef struct FTC_OldCMapDescRec_
- {
- FTC_FaceID face_id;
- FTC_OldCMapType type;
-
- union
- {
- FT_UInt index;
- FT_Encoding encoding;
- FTC_OldCMapIdRec id;
-
- } u;
-
- } FTC_OldCMapDescRec, *FTC_OldCMapDesc;
-
-#endif /* FT_CONFIG_OLD_INTERNALS */
-
-
/*************************************************************************/
/* */
/* Each FTC_CMapNode contains a simple array to map a range of character */
@@ -121,7 +83,7 @@
/* if (indices[n] == FTC_CMAP_UNKNOWN), we assume that the corresponding */
/* glyph indices haven't been queried through FT_Get_Glyph_Index() yet */
-#define FTC_CMAP_UNKNOWN ( (FT_UInt16)-1 )
+#define FTC_CMAP_UNKNOWN (FT_UInt16)~0
/*************************************************************************/
@@ -240,7 +202,7 @@
/*************************************************************************/
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_CacheClassRec ftc_cmap_cache_class =
{
ftc_cmap_node_new,
@@ -267,21 +229,6 @@
}
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- /*
- * Unfortunately, it is not possible to support binary backwards
- * compatibility in the cmap cache. The FTC_CMapCache_Lookup signature
- * changes were too deep, and there is no clever hackish way to detect
- * what kind of structure we are being passed.
- *
- * On the other hand it seems that no production code is using this
- * function on Unix distributions.
- */
-
-#endif
-
-
/* documentation is in ftcache.h */
FT_EXPORT_DEF( FT_UInt )
@@ -316,57 +263,12 @@
return 0;
}
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- /*
- * 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 > FT_MAX_CHARMAP_CACHEABLE && !no_cmap_change )
- {
- FTC_OldCMapDesc desc = (FTC_OldCMapDesc) face_id;
-
-
- char_code = (FT_UInt32)cmap_index;
- query.face_id = desc->face_id;
-
-
- switch ( desc->type )
- {
- case FTC_OLD_CMAP_BY_INDEX:
- query.cmap_index = desc->u.index;
- query.char_code = (FT_UInt32)cmap_index;
- break;
-
- case FTC_OLD_CMAP_BY_ENCODING:
- {
- FT_Face face;
-
-
- error = FTC_Manager_LookupFace( cache->manager, desc->face_id,
- &face );
- if ( error )
- return 0;
-
- FT_Select_Charmap( face, desc->u.encoding );
-
- return FT_Get_Char_Index( face, char_code );
- }
-
- default:
- return 0;
- }
- }
- else
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+ if ( !face_id )
+ return 0;
- {
- query.face_id = face_id;
- query.cmap_index = (FT_UInt)cmap_index;
- query.char_code = char_code;
- }
+ query.face_id = face_id;
+ query.cmap_index = (FT_UInt)cmap_index;
+ query.char_code = char_code;
hash = FTC_CMAP_HASH( face_id, cmap_index, char_code );
@@ -402,12 +304,6 @@
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/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 76a510d..fff7a08 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by */
+/* Copyright 2000-2006, 2008-2010, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -151,7 +151,7 @@
}
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_MruListClassRec ftc_size_list_class =
{
sizeof ( FTC_SizeNodeRec ),
@@ -186,13 +186,13 @@
FTC_MruNode mrunode;
- if ( asize == NULL )
- return FTC_Err_Invalid_Argument;
+ if ( !asize || !scaler )
+ return FT_THROW( Invalid_Argument );
*asize = NULL;
if ( !manager )
- return FTC_Err_Invalid_Cache_Handle;
+ return FT_THROW( Invalid_Cache_Handle );
#ifdef FTC_INLINE
@@ -290,7 +290,7 @@
}
- FT_CALLBACK_TABLE_DEF
+ static
const FTC_MruListClassRec ftc_face_list_class =
{
sizeof ( FTC_FaceNodeRec),
@@ -313,13 +313,13 @@
FTC_MruNode mrunode;
- if ( aface == NULL )
- return FTC_Err_Invalid_Argument;
+ if ( !aface || !face_id )
+ return FT_THROW( Invalid_Argument );
*aface = NULL;
if ( !manager )
- return FTC_Err_Invalid_Cache_Handle;
+ return FT_THROW( Invalid_Cache_Handle );
/* we break encapsulation for the sake of speed */
#ifdef FTC_INLINE
@@ -364,7 +364,10 @@
if ( !library )
- return FTC_Err_Invalid_Library_Handle;
+ return FT_THROW( Invalid_Library_Handle );
+
+ if ( !amanager || !requester )
+ return FT_THROW( Invalid_Argument );
memory = library->memory;
@@ -451,12 +454,13 @@
FT_EXPORT_DEF( void )
FTC_Manager_Reset( FTC_Manager manager )
{
- if ( manager )
- {
- FTC_MruList_Reset( &manager->sizes );
- FTC_MruList_Reset( &manager->faces );
- }
- /* XXX: FIXME: flush the caches? */
+ if ( !manager )
+ return;
+
+ FTC_MruList_Reset( &manager->sizes );
+ FTC_MruList_Reset( &manager->faces );
+
+ FTC_Manager_FlushN( manager, manager->num_nodes );
}
@@ -473,7 +477,7 @@
/* check node weights */
if ( first )
{
- FT_ULong weight = 0;
+ FT_Offset weight = 0;
node = first;
@@ -575,7 +579,7 @@
FTC_CacheClass clazz,
FTC_Cache *acache )
{
- FT_Error error = FTC_Err_Invalid_Argument;
+ FT_Error error = FT_ERR( Invalid_Argument );
FTC_Cache cache = NULL;
@@ -586,7 +590,7 @@
if ( manager->num_caches >= FTC_MAX_CACHES )
{
- error = FTC_Err_Too_Many_Caches;
+ error = FT_THROW( Too_Many_Caches );
FT_ERROR(( "FTC_Manager_RegisterCache:"
" too many registered caches\n" ));
goto Exit;
@@ -666,6 +670,10 @@
{
FT_UInt nn;
+
+ if ( !manager || !face_id )
+ return;
+
/* this will remove all FTC_SizeNode that correspond to
* the face_id as well
*/
@@ -684,60 +692,11 @@
FTC_Node_Unref( FTC_Node node,
FTC_Manager manager )
{
- if ( node && (FT_UInt)node->cache_index < manager->num_caches )
+ if ( node &&
+ manager &&
+ (FT_UInt)node->cache_index < manager->num_caches )
node->ref_count--;
}
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- FT_EXPORT_DEF( FT_Error )
- FTC_Manager_Lookup_Face( FTC_Manager manager,
- FTC_FaceID face_id,
- FT_Face *aface )
- {
- return FTC_Manager_LookupFace( manager, face_id, aface );
- }
-
-
- FT_EXPORT( FT_Error )
- FTC_Manager_Lookup_Size( FTC_Manager manager,
- FTC_Font font,
- FT_Face *aface,
- FT_Size *asize )
- {
- FTC_ScalerRec scaler;
- FT_Error error;
- FT_Size size;
- FT_Face face;
-
-
- scaler.face_id = font->face_id;
- scaler.width = font->pix_width;
- scaler.height = font->pix_height;
- scaler.pixel = TRUE;
- scaler.x_res = 0;
- scaler.y_res = 0;
-
- error = FTC_Manager_LookupSize( manager, &scaler, &size );
- if ( error )
- {
- face = NULL;
- size = NULL;
- }
- else
- face = size->face;
-
- if ( aface )
- *aface = face;
-
- if ( asize )
- *asize = size;
-
- return error;
- }
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-
/* END */
diff --git a/src/cache/ftcmanag.h b/src/cache/ftcmanag.h
index d6c8516..0aec33c 100644
--- a/src/cache/ftcmanag.h
+++ b/src/cache/ftcmanag.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2004, 2006, 2010 by */
+/* Copyright 2000-2001, 2003, 2004, 2006, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -94,8 +94,8 @@ FT_BEGIN_HEADER
FT_Memory memory;
FTC_Node nodes_list;
- FT_ULong max_weight;
- FT_ULong cur_weight;
+ FT_Offset max_weight;
+ FT_Offset cur_weight;
FT_UInt num_nodes;
FTC_Cache caches[FTC_MAX_CACHES];
diff --git a/src/cache/ftcmru.h b/src/cache/ftcmru.h
index 8c3797f..6fccf11 100644
--- a/src/cache/ftcmru.h
+++ b/src/cache/ftcmru.h
@@ -4,7 +4,7 @@
/* */
/* Simple MRU list-cache (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2004, 2005, 2006, 2010 by */
+/* Copyright 2000-2001, 2003-2006, 2010, 2013 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 = FTC_Err_Ok; \
+ error = FT_Err_Ok; \
_first = *(_pfirst); \
_node = NULL; \
\
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index 8bf8d60..59727d1 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -4,7 +4,7 @@
/* */
/* FreeType sbits manager (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010, 2011 by */
+/* Copyright 2000-2006, 2009-2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -116,7 +116,7 @@
if ( (FT_UInt)(gindex - gnode->gindex) >= snode->count )
{
FT_ERROR(( "ftc_snode_load: invalid glyph index" ));
- return FTC_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
sbit = snode->sbits + ( gindex - gnode->gindex );
@@ -142,12 +142,12 @@
goto BadGlyph;
}
- /* Check that our values fit into 8-bit containers! */
+ /* Check whether our values fit into 8-bit containers! */
/* If this is not the case, our bitmap is too large */
/* and we will leave it as `missing' with sbit.buffer = 0 */
-#define CHECK_CHAR( d ) ( temp = (FT_Char)d, temp == d )
-#define CHECK_BYTE( d ) ( temp = (FT_Byte)d, temp == d )
+#define CHECK_CHAR( d ) ( temp = (FT_Char)d, (FT_Int) temp == (FT_Int) d )
+#define CHECK_BYTE( d ) ( temp = (FT_Byte)d, (FT_UInt)temp == (FT_UInt)d )
/* horizontal advance in pixels */
xadvance = ( slot->advance.x + 32 ) >> 6;
@@ -189,13 +189,13 @@
/* we mark unloaded glyphs with `sbit.buffer == 0' */
/* and `width == 255', `height == 0' */
/* */
- if ( error && error != FTC_Err_Out_Of_Memory )
+ if ( error && FT_ERR_NEQ( error, Out_Of_Memory ) )
{
BadGlyph:
sbit->width = 255;
sbit->height = 0;
sbit->buffer = NULL;
- error = FTC_Err_Ok;
+ error = FT_Err_Ok;
if ( asize )
*asize = 0;
}
@@ -223,7 +223,7 @@
total = clazz->family_get_count( family, cache->manager );
if ( total == 0 || gindex >= total )
{
- error = FTC_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
diff --git a/src/cff/cf2arrst.c b/src/cff/cf2arrst.c
new file mode 100644
index 0000000..c8d6f13
--- /dev/null
+++ b/src/cff/cf2arrst.c
@@ -0,0 +1,241 @@
+/***************************************************************************/
+/* */
+/* cf2arrst.c */
+/* */
+/* Adobe's code for Array Stacks (body). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#include "cf2ft.h"
+#include FT_INTERNAL_DEBUG_H
+
+#include "cf2glue.h"
+#include "cf2arrst.h"
+
+#include "cf2error.h"
+
+
+ /*
+ * CF2_ArrStack uses an error pointer, to enable shared errors.
+ * Shared errors are necessary when multiple objects allow the program
+ * to continue after detecting errors. Only the first error should be
+ * recorded.
+ */
+
+ FT_LOCAL_DEF( void )
+ cf2_arrstack_init( CF2_ArrStack arrstack,
+ FT_Memory memory,
+ FT_Error* error,
+ size_t sizeItem )
+ {
+ FT_ASSERT( arrstack != NULL );
+
+ /* initialize the structure */
+ arrstack->memory = memory;
+ arrstack->error = error;
+ arrstack->sizeItem = sizeItem;
+ arrstack->allocated = 0;
+ arrstack->chunk = 10; /* chunks of 10 items */
+ arrstack->count = 0;
+ arrstack->totalSize = 0;
+ arrstack->ptr = NULL;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_arrstack_finalize( CF2_ArrStack arrstack )
+ {
+ FT_Memory memory = arrstack->memory; /* for FT_FREE */
+
+
+ FT_ASSERT( arrstack != NULL );
+
+ arrstack->allocated = 0;
+ arrstack->count = 0;
+ arrstack->totalSize = 0;
+
+ /* free the data buffer */
+ FT_FREE( arrstack->ptr );
+ }
+
+
+ /* allocate or reallocate the buffer size; */
+ /* return false on memory error */
+ static FT_Bool
+ cf2_arrstack_setNumElements( CF2_ArrStack arrstack,
+ size_t numElements )
+ {
+ FT_ASSERT( arrstack != NULL );
+
+ {
+ FT_Error error = FT_Err_Ok; /* for FT_REALLOC */
+ FT_Memory memory = arrstack->memory; /* for FT_REALLOC */
+
+ FT_Long newSize = (FT_Long)( numElements * arrstack->sizeItem );
+
+
+ if ( numElements > LONG_MAX / arrstack->sizeItem )
+ goto exit;
+
+
+ FT_ASSERT( newSize > 0 ); /* avoid realloc with zero size */
+
+ if ( !FT_REALLOC( arrstack->ptr, arrstack->totalSize, newSize ) )
+ {
+ arrstack->allocated = numElements;
+ arrstack->totalSize = newSize;
+
+ if ( arrstack->count > numElements )
+ {
+ /* we truncated the list! */
+ CF2_SET_ERROR( arrstack->error, Stack_Overflow );
+ arrstack->count = numElements;
+ return FALSE;
+ }
+
+ return TRUE; /* success */
+ }
+ }
+
+ exit:
+ /* if there's not already an error, store this one */
+ CF2_SET_ERROR( arrstack->error, Out_Of_Memory );
+
+ return FALSE;
+ }
+
+
+ /* set the count, ensuring allocation is sufficient */
+ FT_LOCAL_DEF( void )
+ cf2_arrstack_setCount( CF2_ArrStack arrstack,
+ size_t numElements )
+ {
+ FT_ASSERT( arrstack != NULL );
+
+ if ( numElements > arrstack->allocated )
+ {
+ /* expand the allocation first */
+ if ( !cf2_arrstack_setNumElements( arrstack, numElements ) )
+ return;
+ }
+
+ arrstack->count = numElements;
+ }
+
+
+ /* clear the count */
+ FT_LOCAL_DEF( void )
+ cf2_arrstack_clear( CF2_ArrStack arrstack )
+ {
+ FT_ASSERT( arrstack != NULL );
+
+ arrstack->count = 0;
+ }
+
+
+ /* current number of items */
+ FT_LOCAL_DEF( size_t )
+ cf2_arrstack_size( const CF2_ArrStack arrstack )
+ {
+ FT_ASSERT( arrstack != NULL );
+
+ return arrstack->count;
+ }
+
+
+ FT_LOCAL_DEF( void* )
+ cf2_arrstack_getBuffer( const CF2_ArrStack arrstack )
+ {
+ FT_ASSERT( arrstack != NULL );
+
+ return arrstack->ptr;
+ }
+
+
+ /* return pointer to the given element */
+ FT_LOCAL_DEF( void* )
+ cf2_arrstack_getPointer( const CF2_ArrStack arrstack,
+ size_t idx )
+ {
+ void* newPtr;
+
+
+ FT_ASSERT( arrstack != NULL );
+
+ if ( idx >= arrstack->count )
+ {
+ /* overflow */
+ CF2_SET_ERROR( arrstack->error, Stack_Overflow );
+ idx = 0; /* choose safe default */
+ }
+
+ newPtr = (FT_Byte*)arrstack->ptr + idx * arrstack->sizeItem;
+
+ return newPtr;
+ }
+
+
+ /* push (append) an element at the end of the list; */
+ /* return false on memory error */
+ /* TODO: should there be a length param for extra checking? */
+ FT_LOCAL_DEF( void )
+ cf2_arrstack_push( CF2_ArrStack arrstack,
+ const void* ptr )
+ {
+ FT_ASSERT( arrstack != NULL );
+
+ if ( arrstack->count == arrstack->allocated )
+ {
+ /* grow the buffer by one chunk */
+ if ( !cf2_arrstack_setNumElements(
+ arrstack, arrstack->allocated + arrstack->chunk ) )
+ {
+ /* on error, ignore the push */
+ return;
+ }
+ }
+
+ FT_ASSERT( ptr != NULL );
+
+ {
+ size_t offset = arrstack->count * arrstack->sizeItem;
+ void* newPtr = (FT_Byte*)arrstack->ptr + offset;
+
+
+ FT_MEM_COPY( newPtr, ptr, arrstack->sizeItem );
+ arrstack->count += 1;
+ }
+ }
+
+
+/* END */
diff --git a/src/cff/cf2arrst.h b/src/cff/cf2arrst.h
new file mode 100644
index 0000000..ff5ad8b
--- /dev/null
+++ b/src/cff/cf2arrst.h
@@ -0,0 +1,100 @@
+/***************************************************************************/
+/* */
+/* cf2arrst.h */
+/* */
+/* Adobe's code for Array Stacks (specification). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2ARRST_H__
+#define __CF2ARRST_H__
+
+
+#include "cf2error.h"
+
+
+FT_BEGIN_HEADER
+
+
+ /* need to define the struct here (not opaque) so it can be allocated by */
+ /* clients */
+ typedef struct CF2_ArrStackRec_
+ {
+ FT_Memory memory;
+ FT_Error* error;
+
+ size_t sizeItem; /* bytes per element */
+ size_t allocated; /* items allocated */
+ size_t chunk; /* allocation increment in items */
+ size_t count; /* number of elements allocated */
+ size_t totalSize; /* total bytes allocated */
+
+ void* ptr; /* ptr to data */
+
+ } CF2_ArrStackRec, *CF2_ArrStack;
+
+
+ FT_LOCAL( void )
+ cf2_arrstack_init( CF2_ArrStack arrstack,
+ FT_Memory memory,
+ FT_Error* error,
+ size_t sizeItem );
+ FT_LOCAL( void )
+ cf2_arrstack_finalize( CF2_ArrStack arrstack );
+
+ FT_LOCAL( void )
+ cf2_arrstack_setCount( CF2_ArrStack arrstack,
+ size_t numElements );
+ FT_LOCAL( void )
+ cf2_arrstack_clear( CF2_ArrStack arrstack );
+ FT_LOCAL( size_t )
+ cf2_arrstack_size( const CF2_ArrStack arrstack );
+
+ FT_LOCAL( void* )
+ cf2_arrstack_getBuffer( const CF2_ArrStack arrstack );
+ FT_LOCAL( void* )
+ cf2_arrstack_getPointer( const CF2_ArrStack arrstack,
+ size_t idx );
+
+ FT_LOCAL( void )
+ cf2_arrstack_push( CF2_ArrStack arrstack,
+ const void* ptr );
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2ARRST_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2blues.c b/src/cff/cf2blues.c
new file mode 100644
index 0000000..250f89e
--- /dev/null
+++ b/src/cff/cf2blues.c
@@ -0,0 +1,579 @@
+/***************************************************************************/
+/* */
+/* cf2blues.c */
+/* */
+/* Adobe's code for handling Blue Zones (body). */
+/* */
+/* Copyright 2009-2014 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#include "cf2ft.h"
+#include FT_INTERNAL_DEBUG_H
+
+#include "cf2blues.h"
+#include "cf2hints.h"
+#include "cf2font.h"
+
+
+ /*************************************************************************/
+ /* */
+ /* 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_cf2blues
+
+
+ /*
+ * For blue values, the FreeType parser produces an array of integers,
+ * while the Adobe CFF engine produces an array of fixed.
+ * Define a macro to convert FreeType to fixed.
+ */
+#define cf2_blueToFixed( x ) cf2_intToFixed( x )
+
+
+ FT_LOCAL_DEF( void )
+ cf2_blues_init( CF2_Blues blues,
+ CF2_Font font )
+ {
+ /* pointer to parsed font object */
+ CFF_Decoder* decoder = font->decoder;
+
+ CF2_Fixed zoneHeight;
+ CF2_Fixed maxZoneHeight = 0;
+ CF2_Fixed csUnitsPerPixel;
+
+ size_t numBlueValues;
+ size_t numOtherBlues;
+ size_t numFamilyBlues;
+ size_t numFamilyOtherBlues;
+
+ FT_Pos* blueValues;
+ FT_Pos* otherBlues;
+ FT_Pos* familyBlues;
+ FT_Pos* familyOtherBlues;
+
+ size_t i;
+ CF2_Fixed emBoxBottom, emBoxTop;
+
+#if 0
+ CF2_Int unitsPerEm = font->unitsPerEm;
+
+
+ if ( unitsPerEm == 0 )
+ unitsPerEm = 1000;
+#endif
+
+ FT_ZERO( blues );
+ blues->scale = font->innerTransform.d;
+
+ cf2_getBlueMetrics( decoder,
+ &blues->blueScale,
+ &blues->blueShift,
+ &blues->blueFuzz );
+
+ cf2_getBlueValues( decoder, &numBlueValues, &blueValues );
+ cf2_getOtherBlues( decoder, &numOtherBlues, &otherBlues );
+ cf2_getFamilyBlues( decoder, &numFamilyBlues, &familyBlues );
+ cf2_getFamilyOtherBlues( decoder, &numFamilyOtherBlues, &familyOtherBlues );
+
+ /*
+ * synthetic em box hint heuristic
+ *
+ * Apply this when ideographic dictionary (LanguageGroup 1) has no
+ * real alignment zones. Adobe tools generate dummy zones at -250 and
+ * 1100 for a 1000 unit em. Fonts with ICF-based alignment zones
+ * should not enable the heuristic. When the heuristic is enabled,
+ * the font's blue zones are ignored.
+ *
+ */
+
+ /* get em box from OS/2 typoAscender/Descender */
+ /* TODO: FreeType does not parse these metrics. Skip them for now. */
+#if 0
+ FCM_getHorizontalLineMetrics( &e,
+ font->font,
+ &ascender,
+ &descender,
+ &linegap );
+ if ( ascender - descender == unitsPerEm )
+ {
+ emBoxBottom = cf2_intToFixed( descender );
+ emBoxTop = cf2_intToFixed( ascender );
+ }
+ else
+#endif
+ {
+ emBoxBottom = CF2_ICF_Bottom;
+ emBoxTop = CF2_ICF_Top;
+ }
+
+ if ( cf2_getLanguageGroup( decoder ) == 1 &&
+ ( numBlueValues == 0 ||
+ ( numBlueValues == 4 &&
+ cf2_blueToFixed( blueValues[0] ) < emBoxBottom &&
+ cf2_blueToFixed( blueValues[1] ) < emBoxBottom &&
+ cf2_blueToFixed( blueValues[2] ) > emBoxTop &&
+ cf2_blueToFixed( blueValues[3] ) > emBoxTop ) ) )
+ {
+ /*
+ * Construct hint edges suitable for synthetic ghost hints at top
+ * and bottom of em box. +-CF2_MIN_COUNTER allows for unhinted
+ * features above or below the last hinted edge. This also gives a
+ * net 1 pixel boost to the height of ideographic glyphs.
+ *
+ * Note: Adjust synthetic hints outward by epsilon (0x.0001) to
+ * avoid interference. E.g., some fonts have real hints at
+ * 880 and -120.
+ */
+
+ blues->emBoxBottomEdge.csCoord = emBoxBottom - CF2_FIXED_EPSILON;
+ blues->emBoxBottomEdge.dsCoord = cf2_fixedRound(
+ FT_MulFix(
+ blues->emBoxBottomEdge.csCoord,
+ blues->scale ) ) -
+ CF2_MIN_COUNTER;
+ blues->emBoxBottomEdge.scale = blues->scale;
+ blues->emBoxBottomEdge.flags = CF2_GhostBottom |
+ CF2_Locked |
+ CF2_Synthetic;
+
+ blues->emBoxTopEdge.csCoord = emBoxTop + CF2_FIXED_EPSILON +
+ 2 * font->darkenY;
+ blues->emBoxTopEdge.dsCoord = cf2_fixedRound(
+ FT_MulFix(
+ blues->emBoxTopEdge.csCoord,
+ blues->scale ) ) +
+ CF2_MIN_COUNTER;
+ blues->emBoxTopEdge.scale = blues->scale;
+ blues->emBoxTopEdge.flags = CF2_GhostTop |
+ CF2_Locked |
+ CF2_Synthetic;
+
+ blues->doEmBoxHints = TRUE; /* enable the heuristic */
+
+ return;
+ }
+
+ /* copy `BlueValues' and `OtherBlues' to a combined array of top and */
+ /* bottom zones */
+ for ( i = 0; i < numBlueValues; i += 2 )
+ {
+ blues->zone[blues->count].csBottomEdge =
+ cf2_blueToFixed( blueValues[i] );
+ blues->zone[blues->count].csTopEdge =
+ cf2_blueToFixed( blueValues[i + 1] );
+
+ zoneHeight = blues->zone[blues->count].csTopEdge -
+ blues->zone[blues->count].csBottomEdge;
+
+ if ( zoneHeight < 0 )
+ {
+ FT_TRACE4(( "cf2_blues_init: ignoring negative zone height\n" ));
+ continue; /* reject this zone */
+ }
+
+ if ( zoneHeight > maxZoneHeight )
+ {
+ /* take maximum before darkening adjustment */
+ /* so overshoot suppression point doesn't change */
+ maxZoneHeight = zoneHeight;
+ }
+
+ /* adjust both edges of top zone upward by twice darkening amount */
+ if ( i != 0 )
+ {
+ blues->zone[blues->count].csTopEdge += 2 * font->darkenY;
+ blues->zone[blues->count].csBottomEdge += 2 * font->darkenY;
+ }
+
+ /* first `BlueValue' is bottom zone; others are top */
+ if ( i == 0 )
+ {
+ blues->zone[blues->count].bottomZone =
+ TRUE;
+ blues->zone[blues->count].csFlatEdge =
+ blues->zone[blues->count].csTopEdge;
+ }
+ else
+ {
+ blues->zone[blues->count].bottomZone =
+ FALSE;
+ blues->zone[blues->count].csFlatEdge =
+ blues->zone[blues->count].csBottomEdge;
+ }
+
+ blues->count += 1;
+ }
+
+ for ( i = 0; i < numOtherBlues; i += 2 )
+ {
+ blues->zone[blues->count].csBottomEdge =
+ cf2_blueToFixed( otherBlues[i] );
+ blues->zone[blues->count].csTopEdge =
+ cf2_blueToFixed( otherBlues[i + 1] );
+
+ zoneHeight = blues->zone[blues->count].csTopEdge -
+ blues->zone[blues->count].csBottomEdge;
+
+ if ( zoneHeight < 0 )
+ {
+ FT_TRACE4(( "cf2_blues_init: ignoring negative zone height\n" ));
+ continue; /* reject this zone */
+ }
+
+ if ( zoneHeight > maxZoneHeight )
+ {
+ /* take maximum before darkening adjustment */
+ /* so overshoot suppression point doesn't change */
+ maxZoneHeight = zoneHeight;
+ }
+
+ /* Note: bottom zones are not adjusted for darkening amount */
+
+ /* all OtherBlues are bottom zone */
+ blues->zone[blues->count].bottomZone =
+ TRUE;
+ blues->zone[blues->count].csFlatEdge =
+ blues->zone[blues->count].csTopEdge;
+
+ blues->count += 1;
+ }
+
+ /* Adjust for FamilyBlues */
+
+ /* Search for the nearest flat edge in `FamilyBlues' or */
+ /* `FamilyOtherBlues'. According to the Black Book, any matching edge */
+ /* must be within one device pixel */
+
+ csUnitsPerPixel = FT_DivFix( cf2_intToFixed( 1 ), blues->scale );
+
+ /* loop on all zones in this font */
+ for ( i = 0; i < blues->count; i++ )
+ {
+ size_t j;
+ CF2_Fixed minDiff;
+ CF2_Fixed flatFamilyEdge, diff;
+ /* value for this font */
+ CF2_Fixed flatEdge = blues->zone[i].csFlatEdge;
+
+
+ if ( blues->zone[i].bottomZone )
+ {
+ /* In a bottom zone, the top edge is the flat edge. */
+ /* Search `FamilyOtherBlues' for bottom zones; look for closest */
+ /* Family edge that is within the one pixel threshold. */
+
+ minDiff = CF2_FIXED_MAX;
+
+ for ( j = 0; j < numFamilyOtherBlues; j += 2 )
+ {
+ /* top edge */
+ flatFamilyEdge = cf2_blueToFixed( familyOtherBlues[j + 1] );
+
+ diff = cf2_fixedAbs( flatEdge - flatFamilyEdge );
+
+ if ( diff < minDiff && diff < csUnitsPerPixel )
+ {
+ blues->zone[i].csFlatEdge = flatFamilyEdge;
+ minDiff = diff;
+
+ if ( diff == 0 )
+ break;
+ }
+ }
+
+ /* check the first member of FamilyBlues, which is a bottom zone */
+ if ( numFamilyBlues >= 2 )
+ {
+ /* top edge */
+ flatFamilyEdge = cf2_blueToFixed( familyBlues[1] );
+
+ diff = cf2_fixedAbs( flatEdge - flatFamilyEdge );
+
+ if ( diff < minDiff && diff < csUnitsPerPixel )
+ blues->zone[i].csFlatEdge = flatFamilyEdge;
+ }
+ }
+ else
+ {
+ /* In a top zone, the bottom edge is the flat edge. */
+ /* Search `FamilyBlues' for top zones; skip first zone, which is a */
+ /* bottom zone; look for closest Family edge that is within the */
+ /* one pixel threshold */
+
+ minDiff = CF2_FIXED_MAX;
+
+ for ( j = 2; j < numFamilyBlues; j += 2 )
+ {
+ /* bottom edge */
+ flatFamilyEdge = cf2_blueToFixed( familyBlues[j] );
+
+ /* adjust edges of top zone upward by twice darkening amount */
+ flatFamilyEdge += 2 * font->darkenY; /* bottom edge */
+
+ diff = cf2_fixedAbs( flatEdge - flatFamilyEdge );
+
+ if ( diff < minDiff && diff < csUnitsPerPixel )
+ {
+ blues->zone[i].csFlatEdge = flatFamilyEdge;
+ minDiff = diff;
+
+ if ( diff == 0 )
+ break;
+ }
+ }
+ }
+ }
+
+ /* TODO: enforce separation of zones, including BlueFuzz */
+
+ /* Adjust BlueScale; similar to AdjustBlueScale() in coretype */
+ /* `bcsetup.c'. */
+
+ if ( maxZoneHeight > 0 )
+ {
+ if ( blues->blueScale > FT_DivFix( cf2_intToFixed( 1 ),
+ maxZoneHeight ) )
+ {
+ /* clamp at maximum scale */
+ blues->blueScale = FT_DivFix( cf2_intToFixed( 1 ),
+ maxZoneHeight );
+ }
+
+ /*
+ * TODO: Revisit the bug fix for 613448. The minimum scale
+ * requirement catches a number of library fonts. For
+ * example, with default BlueScale (.039625) and 0.4 minimum,
+ * the test below catches any font with maxZoneHeight < 10.1.
+ * There are library fonts ranging from 2 to 10 that get
+ * caught, including e.g., Eurostile LT Std Medium with
+ * maxZoneHeight of 6.
+ *
+ */
+#if 0
+ if ( blueScale < .4 / maxZoneHeight )
+ {
+ tetraphilia_assert( 0 );
+ /* clamp at minimum scale, per bug 0613448 fix */
+ blueScale = .4 / maxZoneHeight;
+ }
+#endif
+
+ }
+
+ /*
+ * Suppress overshoot and boost blue zones at small sizes. Boost
+ * amount varies linearly from 0.5 pixel near 0 to 0 pixel at
+ * blueScale cutoff.
+ * Note: This boost amount is different from the coretype heuristic.
+ *
+ */
+
+ if ( blues->scale < blues->blueScale )
+ {
+ blues->suppressOvershoot = TRUE;
+
+ /* Change rounding threshold for `dsFlatEdge'. */
+ /* Note: constant changed from 0.5 to 0.6 to avoid a problem with */
+ /* 10ppem Arial */
+
+ blues->boost = cf2_floatToFixed( .6 ) -
+ FT_MulDiv( cf2_floatToFixed ( .6 ),
+ blues->scale,
+ blues->blueScale );
+ if ( blues->boost > 0x7FFF )
+ {
+ /* boost must remain less than 0.5, or baseline could go negative */
+ blues->boost = 0x7FFF;
+ }
+ }
+
+ /* boost and darkening have similar effects; don't do both */
+ if ( font->stemDarkened )
+ blues->boost = 0;
+
+ /* set device space alignment for each zone; */
+ /* apply boost amount before rounding flat edge */
+
+ for ( i = 0; i < blues->count; i++ )
+ {
+ if ( blues->zone[i].bottomZone )
+ blues->zone[i].dsFlatEdge = cf2_fixedRound(
+ FT_MulFix(
+ blues->zone[i].csFlatEdge,
+ blues->scale ) -
+ blues->boost );
+ else
+ blues->zone[i].dsFlatEdge = cf2_fixedRound(
+ FT_MulFix(
+ blues->zone[i].csFlatEdge,
+ blues->scale ) +
+ blues->boost );
+ }
+ }
+
+
+ /*
+ * Check whether `stemHint' is captured by one of the blue zones.
+ *
+ * Zero, one or both edges may be valid; only valid edges can be
+ * captured. For compatibility with CoolType, search top and bottom
+ * zones in the same pass (see `BlueLock'). If a hint is captured,
+ * return true and position the edge(s) in one of 3 ways:
+ *
+ * 1) If `BlueScale' suppresses overshoot, position the captured edge
+ * at the flat edge of the zone.
+ * 2) If overshoot is not suppressed and `BlueShift' requires
+ * overshoot, position the captured edge a minimum of 1 device pixel
+ * from the flat edge.
+ * 3) If overshoot is not suppressed or required, position the captured
+ * edge at the nearest device pixel.
+ *
+ */
+ FT_LOCAL_DEF( FT_Bool )
+ cf2_blues_capture( const CF2_Blues blues,
+ CF2_Hint bottomHintEdge,
+ CF2_Hint topHintEdge )
+ {
+ /* TODO: validate? */
+ CF2_Fixed csFuzz = blues->blueFuzz;
+
+ /* new position of captured edge */
+ CF2_Fixed dsNew;
+
+ /* amount that hint is moved when positioned */
+ CF2_Fixed dsMove = 0;
+
+ FT_Bool captured = FALSE;
+ CF2_UInt i;
+
+
+ /* assert edge flags are consistent */
+ FT_ASSERT( !cf2_hint_isTop( bottomHintEdge ) &&
+ !cf2_hint_isBottom( topHintEdge ) );
+
+ /* TODO: search once without blue fuzz for compatibility with coretype? */
+ for ( i = 0; i < blues->count; i++ )
+ {
+ if ( blues->zone[i].bottomZone &&
+ cf2_hint_isBottom( bottomHintEdge ) )
+ {
+ if ( ( blues->zone[i].csBottomEdge - csFuzz ) <=
+ bottomHintEdge->csCoord &&
+ bottomHintEdge->csCoord <=
+ ( blues->zone[i].csTopEdge + csFuzz ) )
+ {
+ /* bottom edge captured by bottom zone */
+
+ if ( blues->suppressOvershoot )
+ dsNew = blues->zone[i].dsFlatEdge;
+
+ else if ( ( blues->zone[i].csTopEdge - bottomHintEdge->csCoord ) >=
+ blues->blueShift )
+ {
+ /* guarantee minimum of 1 pixel overshoot */
+ dsNew = FT_MIN(
+ cf2_fixedRound( bottomHintEdge->dsCoord ),
+ blues->zone[i].dsFlatEdge - cf2_intToFixed( 1 ) );
+ }
+
+ else
+ {
+ /* simply round captured edge */
+ dsNew = cf2_fixedRound( bottomHintEdge->dsCoord );
+ }
+
+ dsMove = dsNew - bottomHintEdge->dsCoord;
+ captured = TRUE;
+
+ break;
+ }
+ }
+
+ if ( !blues->zone[i].bottomZone && cf2_hint_isTop( topHintEdge ) )
+ {
+ if ( ( blues->zone[i].csBottomEdge - csFuzz ) <=
+ topHintEdge->csCoord &&
+ topHintEdge->csCoord <=
+ ( blues->zone[i].csTopEdge + csFuzz ) )
+ {
+ /* top edge captured by top zone */
+
+ if ( blues->suppressOvershoot )
+ dsNew = blues->zone[i].dsFlatEdge;
+
+ else if ( ( topHintEdge->csCoord - blues->zone[i].csBottomEdge ) >=
+ blues->blueShift )
+ {
+ /* guarantee minimum of 1 pixel overshoot */
+ dsNew = FT_MAX(
+ cf2_fixedRound( topHintEdge->dsCoord ),
+ blues->zone[i].dsFlatEdge + cf2_intToFixed( 1 ) );
+ }
+
+ else
+ {
+ /* simply round captured edge */
+ dsNew = cf2_fixedRound( topHintEdge->dsCoord );
+ }
+
+ dsMove = dsNew - topHintEdge->dsCoord;
+ captured = TRUE;
+
+ break;
+ }
+ }
+ }
+
+ if ( captured )
+ {
+ /* move both edges and flag them `locked' */
+ if ( cf2_hint_isValid( bottomHintEdge ) )
+ {
+ bottomHintEdge->dsCoord += dsMove;
+ cf2_hint_lock( bottomHintEdge );
+ }
+
+ if ( cf2_hint_isValid( topHintEdge ) )
+ {
+ topHintEdge->dsCoord += dsMove;
+ cf2_hint_lock( topHintEdge );
+ }
+ }
+
+ return captured;
+ }
+
+
+/* END */
diff --git a/src/cff/cf2blues.h b/src/cff/cf2blues.h
new file mode 100644
index 0000000..2f38fca
--- /dev/null
+++ b/src/cff/cf2blues.h
@@ -0,0 +1,185 @@
+/***************************************************************************/
+/* */
+/* cf2blues.h */
+/* */
+/* Adobe's code for handling Blue Zones (specification). */
+/* */
+/* Copyright 2009-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+ /*
+ * A `CF2_Blues' object stores the blue zones (horizontal alignment
+ * zones) of a font. These are specified in the CFF private dictionary
+ * by `BlueValues', `OtherBlues', `FamilyBlues', and `FamilyOtherBlues'.
+ * Each zone is defined by a top and bottom edge in character space.
+ * Further, each zone is either a top zone or a bottom zone, as recorded
+ * by `bottomZone'.
+ *
+ * The maximum number of `BlueValues' and `FamilyBlues' is 7 each.
+ * However, these are combined to produce a total of 7 zones.
+ * Similarly, the maximum number of `OtherBlues' and `FamilyOtherBlues'
+ * is 5 and these are combined to produce an additional 5 zones.
+ *
+ * Blue zones are used to `capture' hints and force them to a common
+ * alignment point. This alignment is recorded in device space in
+ * `dsFlatEdge'. Except for this value, a `CF2_Blues' object could be
+ * constructed independently of scaling. Construction may occur once
+ * the matrix is known. Other features implemented in the Capture
+ * method are overshoot suppression, overshoot enforcement, and Blue
+ * Boost.
+ *
+ * Capture is determined by `BlueValues' and `OtherBlues', but the
+ * alignment point may be adjusted to the scaled flat edge of
+ * `FamilyBlues' or `FamilyOtherBlues'. No alignment is done to the
+ * curved edge of a zone.
+ *
+ */
+
+
+#ifndef __CF2BLUES_H__
+#define __CF2BLUES_H__
+
+
+#include "cf2glue.h"
+
+
+FT_BEGIN_HEADER
+
+
+ /*
+ * `CF2_Hint' is shared by `cf2hints.h' and
+ * `cf2blues.h', but `cf2blues.h' depends on
+ * `cf2hints.h', so define it here. Note: The typedef is in
+ * `cf2glue.h'.
+ *
+ */
+ enum
+ {
+ CF2_GhostBottom = 0x1, /* a single bottom edge */
+ CF2_GhostTop = 0x2, /* a single top edge */
+ CF2_PairBottom = 0x4, /* the bottom edge of a stem hint */
+ CF2_PairTop = 0x8, /* the top edge of a stem hint */
+ CF2_Locked = 0x10, /* this edge has been aligned */
+ /* by a blue zone */
+ CF2_Synthetic = 0x20 /* this edge was synthesized */
+ };
+
+
+ /*
+ * Default value for OS/2 typoAscender/Descender when their difference
+ * is not equal to `unitsPerEm'. The default is based on -250 and 1100
+ * in `CF2_Blues', assuming 1000 units per em here.
+ *
+ */
+ enum
+ {
+ CF2_ICF_Top = cf2_intToFixed( 880 ),
+ CF2_ICF_Bottom = cf2_intToFixed( -120 )
+ };
+
+
+ /*
+ * Constant used for hint adjustment and for synthetic em box hint
+ * placement.
+ */
+#define CF2_MIN_COUNTER cf2_floatToFixed( 0.5 )
+
+
+ /* shared typedef is in cf2glue.h */
+ struct CF2_HintRec_
+ {
+ CF2_UInt flags; /* attributes of the edge */
+ size_t index; /* index in original stem hint array */
+ /* (if not synthetic) */
+ CF2_Fixed csCoord;
+ CF2_Fixed dsCoord;
+ CF2_Fixed scale;
+ };
+
+
+ typedef struct CF2_BlueRec_
+ {
+ CF2_Fixed csBottomEdge;
+ CF2_Fixed csTopEdge;
+ CF2_Fixed csFlatEdge; /* may be from either local or Family zones */
+ CF2_Fixed dsFlatEdge; /* top edge of bottom zone or bottom edge */
+ /* of top zone (rounded) */
+ FT_Bool bottomZone;
+
+ } CF2_BlueRec;
+
+
+ /* max total blue zones is 12 */
+ enum
+ {
+ CF2_MAX_BLUES = 7,
+ CF2_MAX_OTHERBLUES = 5
+ };
+
+
+ typedef struct CF2_BluesRec_
+ {
+ CF2_Fixed scale;
+ CF2_UInt count;
+ FT_Bool suppressOvershoot;
+ FT_Bool doEmBoxHints;
+
+ CF2_Fixed blueScale;
+ CF2_Fixed blueShift;
+ CF2_Fixed blueFuzz;
+
+ CF2_Fixed boost;
+
+ CF2_HintRec emBoxTopEdge;
+ CF2_HintRec emBoxBottomEdge;
+
+ CF2_BlueRec zone[CF2_MAX_BLUES + CF2_MAX_OTHERBLUES];
+
+ } CF2_BluesRec, *CF2_Blues;
+
+
+ FT_LOCAL( void )
+ cf2_blues_init( CF2_Blues blues,
+ CF2_Font font );
+ FT_LOCAL( FT_Bool )
+ cf2_blues_capture( const CF2_Blues blues,
+ CF2_Hint bottomHintEdge,
+ CF2_Hint topHintEdge );
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2BLUES_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2error.c b/src/cff/cf2error.c
new file mode 100644
index 0000000..b5595a3
--- /dev/null
+++ b/src/cff/cf2error.c
@@ -0,0 +1,52 @@
+/***************************************************************************/
+/* */
+/* cf2error.c */
+/* */
+/* Adobe's code for error handling (body). */
+/* */
+/* Copyright 2006-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#include "cf2ft.h"
+#include "cf2error.h"
+
+
+ FT_LOCAL_DEF( void )
+ cf2_setError( FT_Error* error,
+ FT_Error value )
+ {
+ if ( error && *error == 0 )
+ *error = value;
+ }
+
+
+/* END */
diff --git a/src/cff/cf2error.h b/src/cff/cf2error.h
new file mode 100644
index 0000000..6453ebc
--- /dev/null
+++ b/src/cff/cf2error.h
@@ -0,0 +1,119 @@
+/***************************************************************************/
+/* */
+/* cf2error.h */
+/* */
+/* Adobe's code for error handling (specification). */
+/* */
+/* Copyright 2006-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2ERROR_H__
+#define __CF2ERROR_H__
+
+
+#include FT_MODULE_ERRORS_H
+
+#undef __FTERRORS_H__
+
+#undef FT_ERR_PREFIX
+#define FT_ERR_PREFIX CF2_Err_
+#define FT_ERR_BASE FT_Mod_Err_CF2
+
+
+#include FT_ERRORS_H
+#include "cf2ft.h"
+
+
+FT_BEGIN_HEADER
+
+
+ /*
+ * A poor-man error facility.
+ *
+ * This code being written in vanilla C, doesn't have the luxury of a
+ * language-supported exception mechanism such as the one available in
+ * Java. Instead, we are stuck with using error codes that must be
+ * carefully managed and preserved. However, it is convenient for us to
+ * model our error mechanism on a Java-like exception mechanism.
+ * When we assign an error code we are thus `throwing' an error.
+ *
+ * The perservation of an error code is done by coding convention.
+ * Upon a function call if the error code is anything other than
+ * `FT_Err_Ok', which is guaranteed to be zero, we
+ * will return without altering that error. This will allow the
+ * error to propogate and be handled at the appropriate location in
+ * the code.
+ *
+ * This allows a style of code where the error code is initialized
+ * up front and a block of calls are made with the error code only
+ * being checked after the block. If a new error occurs, the original
+ * error will be preserved and a functional no-op should result in any
+ * subsequent function that has an initial error code not equal to
+ * `FT_Err_Ok'.
+ *
+ * Errors are encoded by calling the `FT_THROW' macro. For example,
+ *
+ * {
+ * FT_Error e;
+ *
+ *
+ * ...
+ * e = FT_THROW( Out_Of_Memory );
+ * }
+ *
+ */
+
+
+ /* Set error code to a particular value. */
+ FT_LOCAL( void )
+ cf2_setError( FT_Error* error,
+ FT_Error value );
+
+
+ /*
+ * A macro that conditionally sets an error code.
+ *
+ * This macro will first check whether `error' is set;
+ * if not, it will set it to `e'.
+ *
+ */
+#define CF2_SET_ERROR( error, e ) \
+ cf2_setError( error, FT_THROW( e ) )
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2ERROR_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2fixed.h b/src/cff/cf2fixed.h
new file mode 100644
index 0000000..ed1452a
--- /dev/null
+++ b/src/cff/cf2fixed.h
@@ -0,0 +1,95 @@
+/***************************************************************************/
+/* */
+/* cf2fixed.h */
+/* */
+/* Adobe's code for Fixed Point Mathematics (specification only). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2FIXED_H__
+#define __CF2FIXED_H__
+
+
+FT_BEGIN_HEADER
+
+
+ /* rasterizer integer and fixed point arithmetic must be 32-bit */
+
+#define CF2_Fixed CF2_F16Dot16
+ typedef FT_Int32 CF2_Frac; /* 2.30 fixed point */
+
+
+#define CF2_FIXED_MAX ( (CF2_Fixed)0x7FFFFFFFL )
+#define CF2_FIXED_MIN ( (CF2_Fixed)0x80000000L )
+#define CF2_FIXED_ONE 0x10000L
+#define CF2_FIXED_EPSILON 0x0001
+
+ /* in C 89, left and right shift of negative numbers is */
+ /* implementation specific behaviour in the general case */
+
+#define cf2_intToFixed( i ) \
+ ( (CF2_Fixed)( (FT_UInt32)(i) << 16 ) )
+#define cf2_fixedToInt( x ) \
+ ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )
+#define cf2_fixedRound( x ) \
+ ( (CF2_Fixed)( ( (x) + 0x8000 ) & 0xFFFF0000L ) )
+#define cf2_floatToFixed( f ) \
+ ( (CF2_Fixed)( (f) * 65536.0 + 0.5 ) )
+#define cf2_fixedAbs( x ) \
+ ( (x) < 0 ? -(x) : (x) )
+#define cf2_fixedFloor( x ) \
+ ( (CF2_Fixed)( (x) & 0xFFFF0000L ) )
+#define cf2_fixedFraction( x ) \
+ ( (x) - cf2_fixedFloor( x ) )
+#define cf2_fracToFixed( x ) \
+ ( (x) < 0 ? -( ( -(x) + 0x2000 ) >> 14 ) \
+ : ( ( (x) + 0x2000 ) >> 14 ) )
+
+
+ /* signed numeric types */
+ typedef enum CF2_NumberType_
+ {
+ CF2_NumberFixed, /* 16.16 */
+ CF2_NumberFrac, /* 2.30 */
+ CF2_NumberInt /* 32.0 */
+
+ } CF2_NumberType;
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2FIXED_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2font.c b/src/cff/cf2font.c
new file mode 100644
index 0000000..83fd348
--- /dev/null
+++ b/src/cff/cf2font.c
@@ -0,0 +1,512 @@
+/***************************************************************************/
+/* */
+/* cf2font.c */
+/* */
+/* Adobe's code for font instances (body). */
+/* */
+/* Copyright 2007-2014 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_CALC_H
+
+#include "cf2ft.h"
+
+#include "cf2glue.h"
+#include "cf2font.h"
+#include "cf2error.h"
+#include "cf2intrp.h"
+
+
+ /* Compute a stem darkening amount in character space. */
+ static void
+ cf2_computeDarkening( CF2_Fixed emRatio,
+ CF2_Fixed ppem,
+ CF2_Fixed stemWidth,
+ CF2_Fixed* darkenAmount,
+ CF2_Fixed boldenAmount,
+ FT_Bool stemDarkened,
+ FT_Int* darkenParams )
+ {
+ /*
+ * Total darkening amount is computed in 1000 unit character space
+ * using the modified 5 part curve as Adobe's Avalon rasterizer.
+ * The darkening amount is smaller for thicker stems.
+ * It becomes zero when the stem is thicker than 2.333 pixels.
+ *
+ * By default, we use
+ *
+ * darkenAmount = 0.4 pixels if scaledStem <= 0.5 pixels,
+ * darkenAmount = 0.275 pixels if 1 <= scaledStem <= 1.667 pixels,
+ * darkenAmount = 0 pixel if scaledStem >= 2.333 pixels,
+ *
+ * and piecewise linear in-between:
+ *
+ *
+ * darkening
+ * ^
+ * |
+ * | (x1,y1)
+ * |--------+
+ * | \
+ * | \
+ * | \ (x3,y3)
+ * | +----------+
+ * | (x2,y2) \
+ * | \
+ * | \
+ * | +-----------------
+ * | (x4,y4)
+ * +---------------------------------------------> stem
+ * thickness
+ *
+ *
+ * This corresponds to the following values for the
+ * `darkening-parameters' property:
+ *
+ * (x1, y1) = (500, 400)
+ * (x2, y2) = (1000, 275)
+ * (x3, y3) = (1667, 275)
+ * (x4, y4) = (2333, 0)
+ *
+ */
+
+ /* Internal calculations are done in units per thousand for */
+ /* convenience. The x axis is scaled stem width in */
+ /* thousandths of a pixel. That is, 1000 is 1 pixel. */
+ /* The y axis is darkening amount in thousandths of a pixel.*/
+ /* In the code, below, dividing by ppem and */
+ /* adjusting for emRatio converts darkenAmount to character */
+ /* space (font units). */
+ CF2_Fixed stemWidthPer1000, scaledStem;
+ FT_Int logBase2;
+
+
+ *darkenAmount = 0;
+
+ if ( boldenAmount == 0 && !stemDarkened )
+ return;
+
+ /* protect against range problems and divide by zero */
+ if ( emRatio < cf2_floatToFixed( .01 ) )
+ return;
+
+ if ( stemDarkened )
+ {
+ FT_Int x1 = darkenParams[0];
+ FT_Int y1 = darkenParams[1];
+ FT_Int x2 = darkenParams[2];
+ FT_Int y2 = darkenParams[3];
+ FT_Int x3 = darkenParams[4];
+ FT_Int y3 = darkenParams[5];
+ FT_Int x4 = darkenParams[6];
+ FT_Int y4 = darkenParams[7];
+
+
+ /* convert from true character space to 1000 unit character space; */
+ /* add synthetic emboldening effect */
+
+ /* `stemWidthPer1000' will not overflow for a legitimate font */
+
+ stemWidthPer1000 = FT_MulFix( stemWidth + boldenAmount, emRatio );
+
+ /* `scaledStem' can easily overflow, so we must clamp its maximum */
+ /* value; the test doesn't need to be precise, but must be */
+ /* conservative. The clamp value (default 2333) where */
+ /* `darkenAmount' is zero is well below the overflow value of */
+ /* 32767. */
+ /* */
+ /* FT_MSB computes the integer part of the base 2 logarithm. The */
+ /* number of bits for the product is 1 or 2 more than the sum of */
+ /* logarithms; remembering that the 16 lowest bits of the fraction */
+ /* are dropped this is correct to within a factor of almost 4. */
+ /* For example, 0x80.0000 * 0x80.0000 = 0x4000.0000 is 23+23 and */
+ /* is flagged as possible overflow because 0xFF.FFFF * 0xFF.FFFF = */
+ /* 0xFFFF.FE00 is also 23+23. */
+
+ logBase2 = FT_MSB( (FT_UInt32)stemWidthPer1000 ) +
+ FT_MSB( (FT_UInt32)ppem );
+
+ if ( logBase2 >= 46 )
+ /* possible overflow */
+ scaledStem = cf2_intToFixed( x4 );
+ else
+ scaledStem = FT_MulFix( stemWidthPer1000, ppem );
+
+ /* now apply the darkening parameters */
+
+ if ( scaledStem < cf2_intToFixed( x1 ) )
+ *darkenAmount = FT_DivFix( cf2_intToFixed( y1 ), ppem );
+
+ else if ( scaledStem < cf2_intToFixed( x2 ) )
+ {
+ FT_Int xdelta = x2 - x1;
+ FT_Int ydelta = y2 - y1;
+ FT_Int x = stemWidthPer1000 -
+ FT_DivFix( cf2_intToFixed( x1 ), ppem );
+
+
+ if ( !xdelta )
+ goto Try_x3;
+
+ *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) +
+ FT_DivFix( cf2_intToFixed( y1 ), ppem );
+ }
+
+ else if ( scaledStem < cf2_intToFixed( x3 ) )
+ {
+ Try_x3:
+ {
+ FT_Int xdelta = x3 - x2;
+ FT_Int ydelta = y3 - y2;
+ FT_Int x = stemWidthPer1000 -
+ FT_DivFix( cf2_intToFixed( x2 ), ppem );
+
+
+ if ( !xdelta )
+ goto Try_x4;
+
+ *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) +
+ FT_DivFix( cf2_intToFixed( y2 ), ppem );
+ }
+ }
+
+ else if ( scaledStem < cf2_intToFixed( x4 ) )
+ {
+ Try_x4:
+ {
+ FT_Int xdelta = x4 - x3;
+ FT_Int ydelta = y4 - y3;
+ FT_Int x = stemWidthPer1000 -
+ FT_DivFix( cf2_intToFixed( x3 ), ppem );
+
+
+ if ( !xdelta )
+ goto Use_y4;
+
+ *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) +
+ FT_DivFix( cf2_intToFixed( y3 ), ppem );
+ }
+ }
+
+ else
+ {
+ Use_y4:
+ *darkenAmount = FT_DivFix( cf2_intToFixed( y4 ), ppem );
+ }
+
+ /* use half the amount on each side and convert back to true */
+ /* character space */
+ *darkenAmount = FT_DivFix( *darkenAmount, 2 * emRatio );
+ }
+
+ /* add synthetic emboldening effect in character space */
+ *darkenAmount += boldenAmount / 2;
+ }
+
+
+ /* set up values for the current FontDict and matrix */
+
+ /* caller's transform is adjusted for subpixel positioning */
+ static void
+ cf2_font_setup( CF2_Font font,
+ const CF2_Matrix* transform )
+ {
+ /* pointer to parsed font object */
+ CFF_Decoder* decoder = font->decoder;
+
+ FT_Bool needExtraSetup = FALSE;
+
+ /* character space units */
+ CF2_Fixed boldenX = font->syntheticEmboldeningAmountX;
+ CF2_Fixed boldenY = font->syntheticEmboldeningAmountY;
+
+ CFF_SubFont subFont;
+ CF2_Fixed ppem;
+
+
+ /* clear previous error */
+ font->error = FT_Err_Ok;
+
+ /* if a CID fontDict has changed, we need to recompute some cached */
+ /* data */
+ subFont = cf2_getSubfont( decoder );
+ if ( font->lastSubfont != subFont )
+ {
+ font->lastSubfont = subFont;
+ needExtraSetup = TRUE;
+ }
+
+ /* if ppem has changed, we need to recompute some cached data */
+ /* note: because of CID font matrix concatenation, ppem and transform */
+ /* do not necessarily track. */
+ ppem = cf2_getPpemY( decoder );
+ if ( font->ppem != ppem )
+ {
+ font->ppem = ppem;
+ needExtraSetup = TRUE;
+ }
+
+ /* copy hinted flag on each call */
+ font->hinted = (FT_Bool)( font->renderingFlags & CF2_FlagsHinted );
+
+ /* determine if transform has changed; */
+ /* include Fontmatrix but ignore translation */
+ if ( ft_memcmp( transform,
+ &font->currentTransform,
+ 4 * sizeof ( CF2_Fixed ) ) != 0 )
+ {
+ /* save `key' information for `cache of one' matrix data; */
+ /* save client transform, without the translation */
+ font->currentTransform = *transform;
+ font->currentTransform.tx =
+ font->currentTransform.ty = cf2_intToFixed( 0 );
+
+ /* TODO: FreeType transform is simple scalar; for now, use identity */
+ /* for outer */
+ font->innerTransform = *transform;
+ font->outerTransform.a =
+ font->outerTransform.d = cf2_intToFixed( 1 );
+ font->outerTransform.b =
+ font->outerTransform.c = cf2_intToFixed( 0 );
+
+ needExtraSetup = TRUE;
+ }
+
+ /*
+ * font->darkened is set to true if there is a stem darkening request or
+ * the font is synthetic emboldened.
+ * font->darkened controls whether to adjust blue zones, winding order,
+ * and hinting.
+ *
+ */
+ if ( font->stemDarkened != ( font->renderingFlags & CF2_FlagsDarkened ) )
+ {
+ font->stemDarkened =
+ (FT_Bool)( font->renderingFlags & CF2_FlagsDarkened );
+
+ /* blue zones depend on darkened flag */
+ needExtraSetup = TRUE;
+ }
+
+ /* recompute variables that are dependent on transform or FontDict or */
+ /* darken flag */
+ if ( needExtraSetup )
+ {
+ /* StdVW is found in the private dictionary; */
+ /* recompute darkening amounts whenever private dictionary or */
+ /* transform change */
+ /* Note: a rendering flag turns darkening on or off, so we want to */
+ /* store the `on' amounts; */
+ /* darkening amount is computed in character space */
+ /* TODO: testing size-dependent darkening here; */
+ /* what to do for rotations? */
+
+ CF2_Fixed emRatio;
+ CF2_Fixed stdHW;
+ CF2_Int unitsPerEm = font->unitsPerEm;
+
+
+ if ( unitsPerEm == 0 )
+ unitsPerEm = 1000;
+
+ ppem = FT_MAX( cf2_intToFixed( 4 ),
+ font->ppem ); /* use minimum ppem of 4 */
+
+#if 0
+ /* since vstem is measured in the x-direction, we use the `a' member */
+ /* of the fontMatrix */
+ emRatio = cf2_fixedFracMul( cf2_intToFixed( 1000 ), fontMatrix->a );
+#endif
+
+ /* Freetype does not preserve the fontMatrix when parsing; use */
+ /* unitsPerEm instead. */
+ /* TODO: check precision of this */
+ emRatio = cf2_intToFixed( 1000 ) / unitsPerEm;
+ font->stdVW = cf2_getStdVW( decoder );
+
+ if ( font->stdVW <= 0 )
+ font->stdVW = FT_DivFix( cf2_intToFixed( 75 ), emRatio );
+
+ if ( boldenX > 0 )
+ {
+ /* Ensure that boldenX is at least 1 pixel for synthetic bold font */
+ /* (similar to what Avalon does) */
+ boldenX = FT_MAX( boldenX,
+ FT_DivFix( cf2_intToFixed( unitsPerEm ), ppem ) );
+
+ /* Synthetic emboldening adds at least 1 pixel to darkenX, while */
+ /* stem darkening adds at most half pixel. Since the purpose of */
+ /* stem darkening (readability at small sizes) is met with */
+ /* synthetic emboldening, no need to add stem darkening for a */
+ /* synthetic bold font. */
+ cf2_computeDarkening( emRatio,
+ ppem,
+ font->stdVW,
+ &font->darkenX,
+ boldenX,
+ FALSE,
+ font->darkenParams );
+ }
+ else
+ cf2_computeDarkening( emRatio,
+ ppem,
+ font->stdVW,
+ &font->darkenX,
+ 0,
+ font->stemDarkened,
+ font->darkenParams );
+
+#if 0
+ /* since hstem is measured in the y-direction, we use the `d' member */
+ /* of the fontMatrix */
+ /* TODO: use the same units per em as above; check this */
+ emRatio = cf2_fixedFracMul( cf2_intToFixed( 1000 ), fontMatrix->d );
+#endif
+
+ /* set the default stem width, because it must be the same for all */
+ /* family members; */
+ /* choose a constant for StdHW that depends on font contrast */
+ stdHW = cf2_getStdHW( decoder );
+
+ if ( stdHW > 0 && font->stdVW > 2 * stdHW )
+ font->stdHW = FT_DivFix( cf2_intToFixed( 75 ), emRatio );
+ else
+ {
+ /* low contrast font gets less hstem darkening */
+ font->stdHW = FT_DivFix( cf2_intToFixed( 110 ), emRatio );
+ }
+
+ cf2_computeDarkening( emRatio,
+ ppem,
+ font->stdHW,
+ &font->darkenY,
+ boldenY,
+ font->stemDarkened,
+ font->darkenParams );
+
+ if ( font->darkenX != 0 || font->darkenY != 0 )
+ font->darkened = TRUE;
+ else
+ font->darkened = FALSE;
+
+ font->reverseWinding = FALSE; /* initial expectation is CCW */
+
+ /* compute blue zones for this instance */
+ cf2_blues_init( &font->blues, font );
+ }
+ }
+
+
+ /* equivalent to AdobeGetOutline */
+ FT_LOCAL_DEF( FT_Error )
+ cf2_getGlyphOutline( CF2_Font font,
+ CF2_Buffer charstring,
+ const CF2_Matrix* transform,
+ CF2_F16Dot16* glyphWidth )
+ {
+ FT_Error lastError = FT_Err_Ok;
+
+ FT_Vector translation;
+
+#if 0
+ FT_Vector advancePoint;
+#endif
+
+ CF2_Fixed advWidth = 0;
+ FT_Bool needWinding;
+
+
+ /* Note: use both integer and fraction for outlines. This allows bbox */
+ /* to come out directly. */
+
+ translation.x = transform->tx;
+ translation.y = transform->ty;
+
+ /* set up values based on transform */
+ cf2_font_setup( font, transform );
+ if ( font->error )
+ goto exit; /* setup encountered an error */
+
+ /* reset darken direction */
+ font->reverseWinding = FALSE;
+
+ /* winding order only affects darkening */
+ needWinding = font->darkened;
+
+ while ( 1 )
+ {
+ /* reset output buffer */
+ cf2_outline_reset( &font->outline );
+
+ /* build the outline, passing the full translation */
+ cf2_interpT2CharString( font,
+ charstring,
+ (CF2_OutlineCallbacks)&font->outline,
+ &translation,
+ FALSE,
+ 0,
+ 0,
+ &advWidth );
+
+ if ( font->error )
+ goto exit;
+
+ if ( !needWinding )
+ break;
+
+ /* check winding order */
+ if ( font->outline.root.windingMomentum >= 0 ) /* CFF is CCW */
+ break;
+
+ /* invert darkening and render again */
+ /* TODO: this should be a parameter to getOutline-computeOffset */
+ font->reverseWinding = TRUE;
+
+ needWinding = FALSE; /* exit after next iteration */
+ }
+
+ /* finish storing client outline */
+ cf2_outline_close( &font->outline );
+
+ exit:
+ /* FreeType just wants the advance width; there is no translation */
+ *glyphWidth = advWidth;
+
+ /* free resources and collect errors from objects we've used */
+ cf2_setError( &font->error, lastError );
+
+ return font->error;
+ }
+
+
+/* END */
diff --git a/src/cff/cf2font.h b/src/cff/cf2font.h
new file mode 100644
index 0000000..d8860ce
--- /dev/null
+++ b/src/cff/cf2font.h
@@ -0,0 +1,116 @@
+/***************************************************************************/
+/* */
+/* cf2font.h */
+/* */
+/* Adobe's code for font instances (specification). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2FONT_H__
+#define __CF2FONT_H__
+
+
+#include "cf2ft.h"
+#include "cf2blues.h"
+
+
+FT_BEGIN_HEADER
+
+
+#define CF2_OPERAND_STACK_SIZE 48
+#define CF2_MAX_SUBR 10 /* maximum subroutine nesting */
+
+
+ /* typedef is in `cf2glue.h' */
+ struct CF2_FontRec_
+ {
+ FT_Memory memory;
+ FT_Error error; /* shared error for this instance */
+
+ CF2_RenderingFlags renderingFlags;
+
+ /* variables that depend on Transform: */
+ /* the following have zero translation; */
+ /* inner * outer = font * original */
+
+ CF2_Matrix currentTransform; /* original client matrix */
+ CF2_Matrix innerTransform; /* for hinting; erect, scaled */
+ CF2_Matrix outerTransform; /* post hinting; includes rotations */
+ CF2_Fixed ppem; /* transform-dependent */
+
+ CF2_Int unitsPerEm;
+
+ CF2_Fixed syntheticEmboldeningAmountX; /* character space units */
+ CF2_Fixed syntheticEmboldeningAmountY; /* character space units */
+
+ /* FreeType related members */
+ CF2_OutlineRec outline; /* freetype glyph outline functions */
+ CFF_Decoder* decoder;
+ CFF_SubFont lastSubfont; /* FreeType parsed data; */
+ /* top font or subfont */
+
+ /* these flags can vary from one call to the next */
+ FT_Bool hinted;
+ FT_Bool darkened; /* true if stemDarkened or synthetic bold */
+ /* i.e. darkenX != 0 || darkenY != 0 */
+ FT_Bool stemDarkened;
+
+ FT_Int darkenParams[8]; /* 1000 unit character space */
+
+ /* variables that depend on both FontDict and Transform */
+ CF2_Fixed stdVW; /* in character space; depends on dict entry */
+ CF2_Fixed stdHW; /* in character space; depends on dict entry */
+ CF2_Fixed darkenX; /* character space units */
+ CF2_Fixed darkenY; /* depends on transform */
+ /* and private dict (StdVW) */
+ FT_Bool reverseWinding; /* darken assuming */
+ /* counterclockwise winding */
+
+ CF2_BluesRec blues; /* computed zone data */
+ };
+
+
+ FT_LOCAL( FT_Error )
+ cf2_getGlyphOutline( CF2_Font font,
+ CF2_Buffer charstring,
+ const CF2_Matrix* transform,
+ CF2_F16Dot16* glyphWidth );
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2FONT_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2ft.c b/src/cff/cf2ft.c
new file mode 100644
index 0000000..ebba469
--- /dev/null
+++ b/src/cff/cf2ft.c
@@ -0,0 +1,691 @@
+/***************************************************************************/
+/* */
+/* cf2ft.c */
+/* */
+/* FreeType Glue Component to Adobe's Interpreter (body). */
+/* */
+/* Copyright 2013-2014 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#include "cf2ft.h"
+#include FT_INTERNAL_DEBUG_H
+
+#include "cf2font.h"
+#include "cf2error.h"
+
+
+#define CF2_MAX_SIZE cf2_intToFixed( 2000 ) /* max ppem */
+
+
+ /*
+ * This check should avoid most internal overflow cases. Clients should
+ * generally respond to `Glyph_Too_Big' by getting a glyph outline
+ * at EM size, scaling it and filling it as a graphics operation.
+ *
+ */
+ static FT_Error
+ cf2_checkTransform( const CF2_Matrix* transform,
+ CF2_Int unitsPerEm )
+ {
+ CF2_Fixed maxScale;
+
+
+ FT_ASSERT( unitsPerEm > 0 );
+
+ if ( transform->a <= 0 || transform->d <= 0 )
+ return FT_THROW( Invalid_Size_Handle );
+
+ FT_ASSERT( transform->b == 0 && transform->c == 0 );
+ FT_ASSERT( transform->tx == 0 && transform->ty == 0 );
+
+ if ( unitsPerEm > 0x7FFF )
+ return FT_THROW( Glyph_Too_Big );
+
+ maxScale = FT_DivFix( CF2_MAX_SIZE, cf2_intToFixed( unitsPerEm ) );
+
+ if ( transform->a > maxScale || transform->d > maxScale )
+ return FT_THROW( Glyph_Too_Big );
+
+ return FT_Err_Ok;
+ }
+
+
+ static void
+ cf2_setGlyphWidth( CF2_Outline outline,
+ CF2_Fixed width )
+ {
+ CFF_Decoder* decoder = outline->decoder;
+
+
+ FT_ASSERT( decoder );
+
+ decoder->glyph_width = cf2_fixedToInt( width );
+ }
+
+
+ /* Clean up font instance. */
+ static void
+ cf2_free_instance( void* ptr )
+ {
+ CF2_Font font = (CF2_Font)ptr;
+
+
+ if ( font )
+ {
+ FT_Memory memory = font->memory;
+
+
+ (void)memory;
+ }
+ }
+
+
+ /********************************************/
+ /* */
+ /* functions for handling client outline; */
+ /* FreeType uses coordinates in 26.6 format */
+ /* */
+ /********************************************/
+
+ static void
+ cf2_builder_moveTo( CF2_OutlineCallbacks callbacks,
+ const CF2_CallbackParams params )
+ {
+ /* downcast the object pointer */
+ CF2_Outline outline = (CF2_Outline)callbacks;
+ CFF_Builder* builder;
+
+ (void)params; /* only used in debug mode */
+
+
+ FT_ASSERT( outline && outline->decoder );
+ FT_ASSERT( params->op == CF2_PathOpMoveTo );
+
+ builder = &outline->decoder->builder;
+
+ /* note: two successive moves simply close the contour twice */
+ cff_builder_close_contour( builder );
+ builder->path_begun = 0;
+ }
+
+
+ static void
+ cf2_builder_lineTo( CF2_OutlineCallbacks callbacks,
+ const CF2_CallbackParams params )
+ {
+ FT_Error error;
+
+ /* downcast the object pointer */
+ CF2_Outline outline = (CF2_Outline)callbacks;
+ CFF_Builder* builder;
+
+
+ FT_ASSERT( outline && outline->decoder );
+ FT_ASSERT( params->op == CF2_PathOpLineTo );
+
+ builder = &outline->decoder->builder;
+
+ if ( !builder->path_begun )
+ {
+ /* record the move before the line; also check points and set */
+ /* `path_begun' */
+ error = cff_builder_start_point( builder,
+ params->pt0.x,
+ params->pt0.y );
+ if ( error )
+ {
+ if ( !*callbacks->error )
+ *callbacks->error = error;
+ return;
+ }
+ }
+
+ /* `cff_builder_add_point1' includes a check_points call for one point */
+ error = cff_builder_add_point1( builder,
+ params->pt1.x,
+ params->pt1.y );
+ if ( error )
+ {
+ if ( !*callbacks->error )
+ *callbacks->error = error;
+ return;
+ }
+ }
+
+
+ static void
+ cf2_builder_cubeTo( CF2_OutlineCallbacks callbacks,
+ const CF2_CallbackParams params )
+ {
+ FT_Error error;
+
+ /* downcast the object pointer */
+ CF2_Outline outline = (CF2_Outline)callbacks;
+ CFF_Builder* builder;
+
+
+ FT_ASSERT( outline && outline->decoder );
+ FT_ASSERT( params->op == CF2_PathOpCubeTo );
+
+ builder = &outline->decoder->builder;
+
+ if ( !builder->path_begun )
+ {
+ /* record the move before the line; also check points and set */
+ /* `path_begun' */
+ error = cff_builder_start_point( builder,
+ params->pt0.x,
+ params->pt0.y );
+ if ( error )
+ {
+ if ( !*callbacks->error )
+ *callbacks->error = error;
+ return;
+ }
+ }
+
+ /* prepare room for 3 points: 2 off-curve, 1 on-curve */
+ error = cff_check_points( builder, 3 );
+ if ( error )
+ {
+ if ( !*callbacks->error )
+ *callbacks->error = error;
+ return;
+ }
+
+ cff_builder_add_point( builder,
+ params->pt1.x,
+ params->pt1.y, 0 );
+ cff_builder_add_point( builder,
+ params->pt2.x,
+ params->pt2.y, 0 );
+ cff_builder_add_point( builder,
+ params->pt3.x,
+ params->pt3.y, 1 );
+ }
+
+
+ static void
+ cf2_outline_init( CF2_Outline outline,
+ FT_Memory memory,
+ FT_Error* error )
+ {
+ FT_MEM_ZERO( outline, sizeof ( CF2_OutlineRec ) );
+
+ outline->root.memory = memory;
+ outline->root.error = error;
+
+ outline->root.moveTo = cf2_builder_moveTo;
+ outline->root.lineTo = cf2_builder_lineTo;
+ outline->root.cubeTo = cf2_builder_cubeTo;
+ }
+
+
+ /* get scaling and hint flag from GlyphSlot */
+ static void
+ cf2_getScaleAndHintFlag( CFF_Decoder* decoder,
+ CF2_Fixed* x_scale,
+ CF2_Fixed* y_scale,
+ FT_Bool* hinted,
+ FT_Bool* scaled )
+ {
+ FT_ASSERT( decoder && decoder->builder.glyph );
+
+ /* note: FreeType scale includes a factor of 64 */
+ *hinted = decoder->builder.glyph->hint;
+ *scaled = decoder->builder.glyph->scaled;
+
+ if ( *hinted )
+ {
+ *x_scale = ( decoder->builder.glyph->x_scale + 32 ) / 64;
+ *y_scale = ( decoder->builder.glyph->y_scale + 32 ) / 64;
+ }
+ else
+ {
+ /* for unhinted outlines, `cff_slot_load' does the scaling, */
+ /* thus render at `unity' scale */
+
+ *x_scale = 0x0400; /* 1/64 as 16.16 */
+ *y_scale = 0x0400;
+ }
+ }
+
+
+ /* get units per em from `FT_Face' */
+ /* TODO: should handle font matrix concatenation? */
+ static FT_UShort
+ cf2_getUnitsPerEm( CFF_Decoder* decoder )
+ {
+ FT_ASSERT( decoder && decoder->builder.face );
+ FT_ASSERT( decoder->builder.face->root.units_per_EM );
+
+ return decoder->builder.face->root.units_per_EM;
+ }
+
+
+ /* Main entry point: Render one glyph. */
+ FT_LOCAL_DEF( FT_Error )
+ cf2_decoder_parse_charstrings( CFF_Decoder* decoder,
+ FT_Byte* charstring_base,
+ FT_ULong charstring_len )
+ {
+ FT_Memory memory;
+ FT_Error error = FT_Err_Ok;
+ CF2_Font font;
+
+
+ FT_ASSERT( decoder && decoder->cff );
+
+ memory = decoder->builder.memory;
+
+ /* CF2 data is saved here across glyphs */
+ font = (CF2_Font)decoder->cff->cf2_instance.data;
+
+ /* on first glyph, allocate instance structure */
+ if ( decoder->cff->cf2_instance.data == NULL )
+ {
+ decoder->cff->cf2_instance.finalizer =
+ (FT_Generic_Finalizer)cf2_free_instance;
+
+ if ( FT_ALLOC( decoder->cff->cf2_instance.data,
+ sizeof ( CF2_FontRec ) ) )
+ return FT_THROW( Out_Of_Memory );
+
+ font = (CF2_Font)decoder->cff->cf2_instance.data;
+
+ font->memory = memory;
+
+ /* initialize a client outline, to be shared by each glyph rendered */
+ cf2_outline_init( &font->outline, font->memory, &font->error );
+ }
+
+ /* save decoder; it is a stack variable and will be different on each */
+ /* call */
+ font->decoder = decoder;
+ font->outline.decoder = decoder;
+
+ {
+ /* build parameters for Adobe engine */
+
+ CFF_Builder* builder = &decoder->builder;
+ CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face );
+
+ /* local error */
+ FT_Error error2 = FT_Err_Ok;
+ CF2_BufferRec buf;
+ CF2_Matrix transform;
+ CF2_F16Dot16 glyphWidth;
+
+ FT_Bool hinted;
+ FT_Bool scaled;
+
+
+ /* FreeType has already looked up the GID; convert to */
+ /* `RegionBuffer', assuming that the input has been validated */
+ FT_ASSERT( charstring_base + charstring_len >= charstring_base );
+
+ FT_ZERO( &buf );
+ buf.start =
+ buf.ptr = charstring_base;
+ buf.end = charstring_base + charstring_len;
+
+ FT_ZERO( &transform );
+
+ cf2_getScaleAndHintFlag( decoder,
+ &transform.a,
+ &transform.d,
+ &hinted,
+ &scaled );
+
+ font->renderingFlags = 0;
+ if ( hinted )
+ font->renderingFlags |= CF2_FlagsHinted;
+ if ( scaled && !driver->no_stem_darkening )
+ font->renderingFlags |= CF2_FlagsDarkened;
+
+ font->darkenParams[0] = driver->darken_params[0];
+ font->darkenParams[1] = driver->darken_params[1];
+ font->darkenParams[2] = driver->darken_params[2];
+ font->darkenParams[3] = driver->darken_params[3];
+ font->darkenParams[4] = driver->darken_params[4];
+ font->darkenParams[5] = driver->darken_params[5];
+ font->darkenParams[6] = driver->darken_params[6];
+ font->darkenParams[7] = driver->darken_params[7];
+
+ /* now get an outline for this glyph; */
+ /* also get units per em to validate scale */
+ font->unitsPerEm = (CF2_Int)cf2_getUnitsPerEm( decoder );
+
+ if ( scaled )
+ {
+ error2 = cf2_checkTransform( &transform, font->unitsPerEm );
+ if ( error2 )
+ return error2;
+ }
+
+ error2 = cf2_getGlyphOutline( font, &buf, &transform, &glyphWidth );
+ if ( error2 )
+ return FT_ERR( Invalid_File_Format );
+
+ cf2_setGlyphWidth( &font->outline, glyphWidth );
+
+ return FT_Err_Ok;
+ }
+ }
+
+
+ /* get pointer to current FreeType subfont (based on current glyphID) */
+ FT_LOCAL_DEF( CFF_SubFont )
+ cf2_getSubfont( CFF_Decoder* decoder )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ return decoder->current_subfont;
+ }
+
+
+ /* get `y_ppem' from `CFF_Size' */
+ FT_LOCAL_DEF( CF2_Fixed )
+ cf2_getPpemY( CFF_Decoder* decoder )
+ {
+ FT_ASSERT( decoder &&
+ decoder->builder.face &&
+ decoder->builder.face->root.size );
+
+ /*
+ * Note that `y_ppem' can be zero if there wasn't a call to
+ * `FT_Set_Char_Size' or something similar. However, this isn't a
+ * problem since we come to this place in the code only if
+ * FT_LOAD_NO_SCALE is set (the other case gets caught by
+ * `cf2_checkTransform'). The ppem value is needed to compute the stem
+ * darkening, which is disabled for getting the unscaled outline.
+ *
+ */
+ return cf2_intToFixed(
+ decoder->builder.face->root.size->metrics.y_ppem );
+ }
+
+
+ /* get standard stem widths for the current subfont; */
+ /* FreeType stores these as integer font units */
+ /* (note: variable names seem swapped) */
+ FT_LOCAL_DEF( CF2_Fixed )
+ cf2_getStdVW( CFF_Decoder* decoder )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ return cf2_intToFixed(
+ decoder->current_subfont->private_dict.standard_height );
+ }
+
+
+ FT_LOCAL_DEF( CF2_Fixed )
+ cf2_getStdHW( CFF_Decoder* decoder )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ return cf2_intToFixed(
+ decoder->current_subfont->private_dict.standard_width );
+ }
+
+
+ /* note: FreeType stores 1000 times the actual value for `BlueScale' */
+ FT_LOCAL_DEF( void )
+ cf2_getBlueMetrics( CFF_Decoder* decoder,
+ CF2_Fixed* blueScale,
+ CF2_Fixed* blueShift,
+ CF2_Fixed* blueFuzz )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ *blueScale = FT_DivFix(
+ decoder->current_subfont->private_dict.blue_scale,
+ cf2_intToFixed( 1000 ) );
+ *blueShift = cf2_intToFixed(
+ decoder->current_subfont->private_dict.blue_shift );
+ *blueFuzz = cf2_intToFixed(
+ decoder->current_subfont->private_dict.blue_fuzz );
+ }
+
+
+ /* get blue values counts and arrays; the FreeType parser has validated */
+ /* the counts and verified that each is an even number */
+ FT_LOCAL_DEF( void )
+ cf2_getBlueValues( CFF_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ *count = decoder->current_subfont->private_dict.num_blue_values;
+ *data = (FT_Pos*)
+ &decoder->current_subfont->private_dict.blue_values;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_getOtherBlues( CFF_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ *count = decoder->current_subfont->private_dict.num_other_blues;
+ *data = (FT_Pos*)
+ &decoder->current_subfont->private_dict.other_blues;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_getFamilyBlues( CFF_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ *count = decoder->current_subfont->private_dict.num_family_blues;
+ *data = (FT_Pos*)
+ &decoder->current_subfont->private_dict.family_blues;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_getFamilyOtherBlues( CFF_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ *count = decoder->current_subfont->private_dict.num_family_other_blues;
+ *data = (FT_Pos*)
+ &decoder->current_subfont->private_dict.family_other_blues;
+ }
+
+
+ FT_LOCAL_DEF( CF2_Int )
+ cf2_getLanguageGroup( CFF_Decoder* decoder )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ return decoder->current_subfont->private_dict.language_group;
+ }
+
+
+ /* convert unbiased subroutine index to `CF2_Buffer' and */
+ /* return 0 on success */
+ FT_LOCAL_DEF( CF2_Int )
+ cf2_initGlobalRegionBuffer( CFF_Decoder* decoder,
+ CF2_UInt idx,
+ CF2_Buffer buf )
+ {
+ FT_ASSERT( decoder );
+
+ FT_ZERO( buf );
+
+ idx += decoder->globals_bias;
+ if ( idx >= decoder->num_globals )
+ return TRUE; /* error */
+
+ FT_ASSERT( decoder->globals );
+
+ buf->start =
+ buf->ptr = decoder->globals[idx];
+ buf->end = decoder->globals[idx + 1];
+
+ return FALSE; /* success */
+ }
+
+
+ /* convert AdobeStandardEncoding code to CF2_Buffer; */
+ /* used for seac component */
+ FT_LOCAL_DEF( FT_Error )
+ cf2_getSeacComponent( CFF_Decoder* decoder,
+ CF2_UInt code,
+ CF2_Buffer buf )
+ {
+ CF2_Int gid;
+ FT_Byte* charstring;
+ FT_ULong len;
+ FT_Error error;
+
+
+ FT_ASSERT( decoder );
+
+ FT_ZERO( buf );
+
+ gid = cff_lookup_glyph_by_stdcharcode( decoder->cff, code );
+ if ( gid < 0 )
+ return FT_THROW( Invalid_Glyph_Format );
+
+ error = cff_get_glyph_data( decoder->builder.face,
+ gid,
+ &charstring,
+ &len );
+ /* TODO: for now, just pass the FreeType error through */
+ if ( error )
+ return error;
+
+ /* assume input has been validated */
+ FT_ASSERT( charstring + len >= charstring );
+
+ buf->start = charstring;
+ buf->end = charstring + len;
+ buf->ptr = buf->start;
+
+ return FT_Err_Ok;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_freeSeacComponent( CFF_Decoder* decoder,
+ CF2_Buffer buf )
+ {
+ FT_ASSERT( decoder );
+
+ cff_free_glyph_data( decoder->builder.face,
+ (FT_Byte**)&buf->start,
+ (FT_ULong)( buf->end - buf->start ) );
+ }
+
+
+ FT_LOCAL_DEF( CF2_Int )
+ cf2_initLocalRegionBuffer( CFF_Decoder* decoder,
+ CF2_UInt idx,
+ CF2_Buffer buf )
+ {
+ FT_ASSERT( decoder );
+
+ FT_ZERO( buf );
+
+ idx += decoder->locals_bias;
+ if ( idx >= decoder->num_locals )
+ return TRUE; /* error */
+
+ FT_ASSERT( decoder->locals );
+
+ buf->start =
+ buf->ptr = decoder->locals[idx];
+ buf->end = decoder->locals[idx + 1];
+
+ return FALSE; /* success */
+ }
+
+
+ FT_LOCAL_DEF( CF2_Fixed )
+ cf2_getDefaultWidthX( CFF_Decoder* decoder )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ return cf2_intToFixed(
+ decoder->current_subfont->private_dict.default_width );
+ }
+
+
+ FT_LOCAL_DEF( CF2_Fixed )
+ cf2_getNominalWidthX( CFF_Decoder* decoder )
+ {
+ FT_ASSERT( decoder && decoder->current_subfont );
+
+ return cf2_intToFixed(
+ decoder->current_subfont->private_dict.nominal_width );
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_outline_reset( CF2_Outline outline )
+ {
+ CFF_Decoder* decoder = outline->decoder;
+
+
+ FT_ASSERT( decoder );
+
+ outline->root.windingMomentum = 0;
+
+ FT_GlyphLoader_Rewind( decoder->builder.loader );
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_outline_close( CF2_Outline outline )
+ {
+ CFF_Decoder* decoder = outline->decoder;
+
+
+ FT_ASSERT( decoder );
+
+ cff_builder_close_contour( &decoder->builder );
+
+ FT_GlyphLoader_Add( decoder->builder.loader );
+ }
+
+
+/* END */
diff --git a/src/cff/cf2ft.h b/src/cff/cf2ft.h
new file mode 100644
index 0000000..731da3c
--- /dev/null
+++ b/src/cff/cf2ft.h
@@ -0,0 +1,147 @@
+/***************************************************************************/
+/* */
+/* cf2ft.h */
+/* */
+/* FreeType Glue Component to Adobe's Interpreter (specification). */
+/* */
+/* Copyright 2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2FT_H__
+#define __CF2FT_H__
+
+
+#include "cf2types.h"
+
+
+ /* TODO: disable asserts for now */
+#define CF2_NDEBUG
+
+
+#include FT_SYSTEM_H
+
+#include "cf2glue.h"
+#include "cffgload.h" /* for CFF_Decoder */
+
+
+FT_BEGIN_HEADER
+
+
+ FT_LOCAL( FT_Error )
+ cf2_decoder_parse_charstrings( CFF_Decoder* decoder,
+ FT_Byte* charstring_base,
+ FT_ULong charstring_len );
+
+ FT_LOCAL( CFF_SubFont )
+ cf2_getSubfont( CFF_Decoder* decoder );
+
+
+ FT_LOCAL( CF2_Fixed )
+ cf2_getPpemY( CFF_Decoder* decoder );
+ FT_LOCAL( CF2_Fixed )
+ cf2_getStdVW( CFF_Decoder* decoder );
+ FT_LOCAL( CF2_Fixed )
+ cf2_getStdHW( CFF_Decoder* decoder );
+
+ FT_LOCAL( void )
+ cf2_getBlueMetrics( CFF_Decoder* decoder,
+ CF2_Fixed* blueScale,
+ CF2_Fixed* blueShift,
+ CF2_Fixed* blueFuzz );
+ FT_LOCAL( void )
+ cf2_getBlueValues( CFF_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data );
+ FT_LOCAL( void )
+ cf2_getOtherBlues( CFF_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data );
+ FT_LOCAL( void )
+ cf2_getFamilyBlues( CFF_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data );
+ FT_LOCAL( void )
+ cf2_getFamilyOtherBlues( CFF_Decoder* decoder,
+ size_t* count,
+ FT_Pos* *data );
+
+ FT_LOCAL( CF2_Int )
+ cf2_getLanguageGroup( CFF_Decoder* decoder );
+
+ FT_LOCAL( CF2_Int )
+ cf2_initGlobalRegionBuffer( CFF_Decoder* decoder,
+ CF2_UInt idx,
+ CF2_Buffer buf );
+ FT_LOCAL( FT_Error )
+ cf2_getSeacComponent( CFF_Decoder* decoder,
+ CF2_UInt code,
+ CF2_Buffer buf );
+ FT_LOCAL( void )
+ cf2_freeSeacComponent( CFF_Decoder* decoder,
+ CF2_Buffer buf );
+ FT_LOCAL( CF2_Int )
+ cf2_initLocalRegionBuffer( CFF_Decoder* decoder,
+ CF2_UInt idx,
+ CF2_Buffer buf );
+
+ FT_LOCAL( CF2_Fixed )
+ cf2_getDefaultWidthX( CFF_Decoder* decoder );
+ FT_LOCAL( CF2_Fixed )
+ cf2_getNominalWidthX( CFF_Decoder* decoder );
+
+
+ /*
+ * FreeType client outline
+ *
+ * process output from the charstring interpreter
+ */
+ typedef struct CF2_OutlineRec_
+ {
+ CF2_OutlineCallbacksRec root; /* base class must be first */
+ CFF_Decoder* decoder;
+
+ } CF2_OutlineRec, *CF2_Outline;
+
+
+ FT_LOCAL( void )
+ cf2_outline_reset( CF2_Outline outline );
+ FT_LOCAL( void )
+ cf2_outline_close( CF2_Outline outline );
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2FT_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2glue.h b/src/cff/cf2glue.h
new file mode 100644
index 0000000..a24da39
--- /dev/null
+++ b/src/cff/cf2glue.h
@@ -0,0 +1,144 @@
+/***************************************************************************/
+/* */
+/* cf2glue.h */
+/* */
+/* Adobe's code for shared stuff (specification only). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2GLUE_H__
+#define __CF2GLUE_H__
+
+
+/* common includes for other modules */
+#include "cf2error.h"
+#include "cf2fixed.h"
+#include "cf2arrst.h"
+#include "cf2read.h"
+
+
+FT_BEGIN_HEADER
+
+
+ /* rendering parameters */
+
+ /* apply hints to rendered glyphs */
+#define CF2_FlagsHinted 1
+ /* for testing */
+#define CF2_FlagsDarkened 2
+
+ /* type for holding the flags */
+ typedef CF2_Int CF2_RenderingFlags;
+
+
+ /* elements of a glyph outline */
+ typedef enum CF2_PathOp_
+ {
+ CF2_PathOpMoveTo = 1, /* change the current point */
+ CF2_PathOpLineTo = 2, /* line */
+ CF2_PathOpQuadTo = 3, /* quadratic curve */
+ CF2_PathOpCubeTo = 4 /* cubic curve */
+
+ } CF2_PathOp;
+
+
+ /* a matrix of fixed point values */
+ typedef struct CF2_Matrix_
+ {
+ CF2_F16Dot16 a;
+ CF2_F16Dot16 b;
+ CF2_F16Dot16 c;
+ CF2_F16Dot16 d;
+ CF2_F16Dot16 tx;
+ CF2_F16Dot16 ty;
+
+ } CF2_Matrix;
+
+
+ /* these typedefs are needed by more than one header file */
+ /* and gcc compiler doesn't allow redefinition */
+ typedef struct CF2_FontRec_ CF2_FontRec, *CF2_Font;
+ typedef struct CF2_HintRec_ CF2_HintRec, *CF2_Hint;
+
+
+ /* A common structure for all callback parameters. */
+ /* */
+ /* Some members may be unused. For example, `pt0' is not used for */
+ /* `moveTo' and `pt3' is not used for `quadTo'. The initial point `pt0' */
+ /* is included for each path element for generality; curve conversions */
+ /* need it. The `op' parameter allows one function to handle multiple */
+ /* element types. */
+
+ typedef struct CF2_CallbackParamsRec_
+ {
+ FT_Vector pt0;
+ FT_Vector pt1;
+ FT_Vector pt2;
+ FT_Vector pt3;
+
+ CF2_Int op;
+
+ } CF2_CallbackParamsRec, *CF2_CallbackParams;
+
+
+ /* forward reference */
+ typedef struct CF2_OutlineCallbacksRec_ CF2_OutlineCallbacksRec,
+ *CF2_OutlineCallbacks;
+
+ /* callback function pointers */
+ typedef void
+ (*CF2_Callback_Type)( CF2_OutlineCallbacks callbacks,
+ const CF2_CallbackParams params );
+
+
+ struct CF2_OutlineCallbacksRec_
+ {
+ CF2_Callback_Type moveTo;
+ CF2_Callback_Type lineTo;
+ CF2_Callback_Type quadTo;
+ CF2_Callback_Type cubeTo;
+
+ CF2_Int windingMomentum; /* for winding order detection */
+
+ FT_Memory memory;
+ FT_Error* error;
+ };
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2GLUE_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2hints.c b/src/cff/cf2hints.c
new file mode 100644
index 0000000..040d193
--- /dev/null
+++ b/src/cff/cf2hints.c
@@ -0,0 +1,1847 @@
+/***************************************************************************/
+/* */
+/* cf2hints.c */
+/* */
+/* Adobe's code for handling CFF hints (body). */
+/* */
+/* Copyright 2007-2014 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#include "cf2ft.h"
+#include FT_INTERNAL_DEBUG_H
+
+#include "cf2glue.h"
+#include "cf2font.h"
+#include "cf2hints.h"
+#include "cf2intrp.h"
+
+
+ /*************************************************************************/
+ /* */
+ /* 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_cf2hints
+
+
+ typedef struct CF2_HintMoveRec_
+ {
+ size_t j; /* index of upper hint map edge */
+ CF2_Fixed moveUp; /* adjustment to optimum position */
+
+ } CF2_HintMoveRec, *CF2_HintMove;
+
+
+ /* Compute angular momentum for winding order detection. It is called */
+ /* for all lines and curves, but not necessarily in element order. */
+ static CF2_Int
+ cf2_getWindingMomentum( CF2_Fixed x1,
+ CF2_Fixed y1,
+ CF2_Fixed x2,
+ CF2_Fixed y2 )
+ {
+ /* cross product of pt1 position from origin with pt2 position from */
+ /* pt1; we reduce the precision so that the result fits into 32 bits */
+
+ return ( x1 >> 16 ) * ( ( y2 - y1 ) >> 16 ) -
+ ( y1 >> 16 ) * ( ( x2 - x1 ) >> 16 );
+ }
+
+
+ /*
+ * Construct from a StemHint; this is used as a parameter to
+ * `cf2_blues_capture'.
+ * `hintOrigin' is the character space displacement of a seac accent.
+ * Adjust stem hint for darkening here.
+ *
+ */
+ static void
+ cf2_hint_init( CF2_Hint hint,
+ const CF2_ArrStack stemHintArray,
+ size_t indexStemHint,
+ const CF2_Font font,
+ CF2_Fixed hintOrigin,
+ CF2_Fixed scale,
+ FT_Bool bottom )
+ {
+ CF2_Fixed width;
+ const CF2_StemHintRec* stemHint;
+
+
+ FT_ZERO( hint );
+
+ stemHint = (const CF2_StemHintRec*)cf2_arrstack_getPointer(
+ stemHintArray,
+ indexStemHint );
+
+ width = stemHint->max - stemHint->min;
+
+ if ( width == cf2_intToFixed( -21 ) )
+ {
+ /* ghost bottom */
+
+ if ( bottom )
+ {
+ hint->csCoord = stemHint->max;
+ hint->flags = CF2_GhostBottom;
+ }
+ else
+ hint->flags = 0;
+ }
+
+ else if ( width == cf2_intToFixed( -20 ) )
+ {
+ /* ghost top */
+
+ if ( bottom )
+ hint->flags = 0;
+ else
+ {
+ hint->csCoord = stemHint->min;
+ hint->flags = CF2_GhostTop;
+ }
+ }
+
+ else if ( width < 0 )
+ {
+ /* inverted pair */
+
+ /*
+ * Hints with negative widths were produced by an early version of a
+ * non-Adobe font tool. The Type 2 spec allows edge (ghost) hints
+ * with negative widths, but says
+ *
+ * All other negative widths have undefined meaning.
+ *
+ * CoolType has a silent workaround that negates the hint width; for
+ * permissive mode, we do the same here.
+ *
+ * Note: Such fonts cannot use ghost hints, but should otherwise work.
+ * Note: Some poor hints in our faux fonts can produce negative
+ * widths at some blends. For example, see a light weight of
+ * `u' in ASerifMM.
+ *
+ */
+ if ( bottom )
+ {
+ hint->csCoord = stemHint->max;
+ hint->flags = CF2_PairBottom;
+ }
+ else
+ {
+ hint->csCoord = stemHint->min;
+ hint->flags = CF2_PairTop;
+ }
+ }
+
+ else
+ {
+ /* normal pair */
+
+ if ( bottom )
+ {
+ hint->csCoord = stemHint->min;
+ hint->flags = CF2_PairBottom;
+ }
+ else
+ {
+ hint->csCoord = stemHint->max;
+ hint->flags = CF2_PairTop;
+ }
+ }
+
+ /* Now that ghost hints have been detected, adjust this edge for */
+ /* darkening. Bottoms are not changed; tops are incremented by twice */
+ /* `darkenY'. */
+ if ( cf2_hint_isTop( hint ) )
+ hint->csCoord += 2 * font->darkenY;
+
+ hint->csCoord += hintOrigin;
+ hint->scale = scale;
+ hint->index = indexStemHint; /* index in original stem hint array */
+
+ /* if original stem hint has been used, use the same position */
+ if ( hint->flags != 0 && stemHint->used )
+ {
+ if ( cf2_hint_isTop( hint ) )
+ hint->dsCoord = stemHint->maxDS;
+ else
+ hint->dsCoord = stemHint->minDS;
+
+ cf2_hint_lock( hint );
+ }
+ else
+ hint->dsCoord = FT_MulFix( hint->csCoord, scale );
+ }
+
+
+ /* initialize an invalid hint map element */
+ static void
+ cf2_hint_initZero( CF2_Hint hint )
+ {
+ FT_ZERO( hint );
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ cf2_hint_isValid( const CF2_Hint hint )
+ {
+ return (FT_Bool)( hint->flags != 0 );
+ }
+
+
+ static FT_Bool
+ cf2_hint_isPair( const CF2_Hint hint )
+ {
+ return (FT_Bool)( ( hint->flags &
+ ( CF2_PairBottom | CF2_PairTop ) ) != 0 );
+ }
+
+
+ static FT_Bool
+ cf2_hint_isPairTop( const CF2_Hint hint )
+ {
+ return (FT_Bool)( ( hint->flags & CF2_PairTop ) != 0 );
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ cf2_hint_isTop( const CF2_Hint hint )
+ {
+ return (FT_Bool)( ( hint->flags &
+ ( CF2_PairTop | CF2_GhostTop ) ) != 0 );
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ cf2_hint_isBottom( const CF2_Hint hint )
+ {
+ return (FT_Bool)( ( hint->flags &
+ ( CF2_PairBottom | CF2_GhostBottom ) ) != 0 );
+ }
+
+
+ static FT_Bool
+ cf2_hint_isLocked( const CF2_Hint hint )
+ {
+ return (FT_Bool)( ( hint->flags & CF2_Locked ) != 0 );
+ }
+
+
+ static FT_Bool
+ cf2_hint_isSynthetic( const CF2_Hint hint )
+ {
+ return (FT_Bool)( ( hint->flags & CF2_Synthetic ) != 0 );
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_hint_lock( CF2_Hint hint )
+ {
+ hint->flags |= CF2_Locked;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_hintmap_init( CF2_HintMap hintmap,
+ CF2_Font font,
+ CF2_HintMap initialMap,
+ CF2_ArrStack hintMoves,
+ CF2_Fixed scale )
+ {
+ FT_ZERO( hintmap );
+
+ /* copy parameters from font instance */
+ hintmap->hinted = font->hinted;
+ hintmap->scale = scale;
+ hintmap->font = font;
+ hintmap->initialHintMap = initialMap;
+ /* will clear in `cf2_hintmap_adjustHints' */
+ hintmap->hintMoves = hintMoves;
+ }
+
+
+ static FT_Bool
+ cf2_hintmap_isValid( const CF2_HintMap hintmap )
+ {
+ return hintmap->isValid;
+ }
+
+
+ /* transform character space coordinate to device space using hint map */
+ static CF2_Fixed
+ cf2_hintmap_map( CF2_HintMap hintmap,
+ CF2_Fixed csCoord )
+ {
+ if ( hintmap->count == 0 || ! hintmap->hinted )
+ {
+ /* there are no hints; use uniform scale and zero offset */
+ return FT_MulFix( csCoord, hintmap->scale );
+ }
+ else
+ {
+ /* start linear search from last hit */
+ CF2_UInt i = hintmap->lastIndex;
+
+ FT_ASSERT( hintmap->lastIndex < CF2_MAX_HINT_EDGES );
+
+ /* search up */
+ while ( i < hintmap->count - 1 &&
+ csCoord >= hintmap->edge[i + 1].csCoord )
+ i += 1;
+
+ /* search down */
+ while ( i > 0 && csCoord < hintmap->edge[i].csCoord )
+ i -= 1;
+
+ hintmap->lastIndex = i;
+
+ if ( i == 0 && csCoord < hintmap->edge[0].csCoord )
+ {
+ /* special case for points below first edge: use uniform scale */
+ return FT_MulFix( csCoord - hintmap->edge[0].csCoord,
+ hintmap->scale ) +
+ hintmap->edge[0].dsCoord;
+ }
+ else
+ {
+ /*
+ * Note: entries with duplicate csCoord are allowed.
+ * Use edge[i], the highest entry where csCoord >= entry[i].csCoord
+ */
+ return FT_MulFix( csCoord - hintmap->edge[i].csCoord,
+ hintmap->edge[i].scale ) +
+ hintmap->edge[i].dsCoord;
+ }
+ }
+ }
+
+
+ /*
+ * This hinting policy moves a hint pair in device space so that one of
+ * its two edges is on a device pixel boundary (its fractional part is
+ * zero). `cf2_hintmap_insertHint' guarantees no overlap in CS
+ * space. Ensure here that there is no overlap in DS.
+ *
+ * In the first pass, edges are adjusted relative to adjacent hints.
+ * Those that are below have already been adjusted. Those that are
+ * above have not yet been adjusted. If a hint above blocks an
+ * adjustment to an optimal position, we will try again in a second
+ * pass. The second pass is top-down.
+ *
+ */
+
+ static void
+ cf2_hintmap_adjustHints( CF2_HintMap hintmap )
+ {
+ size_t i, j;
+
+
+ cf2_arrstack_clear( hintmap->hintMoves ); /* working storage */
+
+ /*
+ * First pass is bottom-up (font hint order) without look-ahead.
+ * Locked edges are already adjusted.
+ * Unlocked edges begin with dsCoord from `initialHintMap'.
+ * Save edges that are not optimally adjusted in `hintMoves' array,
+ * and process them in second pass.
+ */
+
+ for ( i = 0; i < hintmap->count; i++ )
+ {
+ FT_Bool isPair = cf2_hint_isPair( &hintmap->edge[i] );
+
+
+ /* index of upper edge (same value for ghost hint) */
+ j = isPair ? i + 1 : i;
+
+ FT_ASSERT( j < hintmap->count );
+ FT_ASSERT( cf2_hint_isValid( &hintmap->edge[i] ) );
+ FT_ASSERT( cf2_hint_isValid( &hintmap->edge[j] ) );
+ FT_ASSERT( cf2_hint_isLocked( &hintmap->edge[i] ) ==
+ cf2_hint_isLocked( &hintmap->edge[j] ) );
+
+ if ( !cf2_hint_isLocked( &hintmap->edge[i] ) )
+ {
+ /* hint edge is not locked, we can adjust it */
+ CF2_Fixed fracDown = cf2_fixedFraction( hintmap->edge[i].dsCoord );
+ CF2_Fixed fracUp = cf2_fixedFraction( hintmap->edge[j].dsCoord );
+
+ /* calculate all four possibilities; moves down are negative */
+ CF2_Fixed downMoveDown = 0 - fracDown;
+ CF2_Fixed upMoveDown = 0 - fracUp;
+ CF2_Fixed downMoveUp = fracDown == 0
+ ? 0
+ : cf2_intToFixed( 1 ) - fracDown;
+ CF2_Fixed upMoveUp = fracUp == 0
+ ? 0
+ : cf2_intToFixed( 1 ) - fracUp;
+
+ /* smallest move up */
+ CF2_Fixed moveUp = FT_MIN( downMoveUp, upMoveUp );
+ /* smallest move down */
+ CF2_Fixed moveDown = FT_MAX( downMoveDown, upMoveDown );
+
+ /* final amount to move edge or edge pair */
+ CF2_Fixed move;
+
+ CF2_Fixed downMinCounter = CF2_MIN_COUNTER;
+ CF2_Fixed upMinCounter = CF2_MIN_COUNTER;
+ FT_Bool saveEdge = FALSE;
+
+
+ /* minimum counter constraint doesn't apply when adjacent edges */
+ /* are synthetic */
+ /* TODO: doesn't seem a big effect; for now, reduce the code */
+#if 0
+ if ( i == 0 ||
+ cf2_hint_isSynthetic( &hintmap->edge[i - 1] ) )
+ downMinCounter = 0;
+
+ if ( j >= hintmap->count - 1 ||
+ cf2_hint_isSynthetic( &hintmap->edge[j + 1] ) )
+ upMinCounter = 0;
+#endif
+
+ /* is there room to move up? */
+ /* there is if we are at top of array or the next edge is at or */
+ /* beyond proposed move up? */
+ if ( j >= hintmap->count - 1 ||
+ hintmap->edge[j + 1].dsCoord >=
+ hintmap->edge[j].dsCoord + moveUp + upMinCounter )
+ {
+ /* there is room to move up; is there also room to move down? */
+ if ( i == 0 ||
+ hintmap->edge[i - 1].dsCoord <=
+ hintmap->edge[i].dsCoord + moveDown - downMinCounter )
+ {
+ /* move smaller absolute amount */
+ move = ( -moveDown < moveUp ) ? moveDown : moveUp; /* optimum */
+ }
+ else
+ move = moveUp;
+ }
+ else
+ {
+ /* is there room to move down? */
+ if ( i == 0 ||
+ hintmap->edge[i - 1].dsCoord <=
+ hintmap->edge[i].dsCoord + moveDown - downMinCounter )
+ {
+ move = moveDown;
+ /* true if non-optimum move */
+ saveEdge = (FT_Bool)( moveUp < -moveDown );
+ }
+ else
+ {
+ /* no room to move either way without overlapping or reducing */
+ /* the counter too much */
+ move = 0;
+ saveEdge = TRUE;
+ }
+ }
+
+ /* Identify non-moves and moves down that aren't optimal, and save */
+ /* them for second pass. */
+ /* Do this only if there is an unlocked edge above (which could */
+ /* possibly move). */
+ if ( saveEdge &&
+ j < hintmap->count - 1 &&
+ !cf2_hint_isLocked( &hintmap->edge[j + 1] ) )
+ {
+ CF2_HintMoveRec savedMove;
+
+
+ savedMove.j = j;
+ /* desired adjustment in second pass */
+ savedMove.moveUp = moveUp - move;
+
+ cf2_arrstack_push( hintmap->hintMoves, &savedMove );
+ }
+
+ /* move the edge(s) */
+ hintmap->edge[i].dsCoord += move;
+ if ( isPair )
+ hintmap->edge[j].dsCoord += move;
+ }
+
+ /* assert there are no overlaps in device space */
+ FT_ASSERT( i == 0 ||
+ hintmap->edge[i - 1].dsCoord <= hintmap->edge[i].dsCoord );
+ FT_ASSERT( i < j ||
+ hintmap->edge[i].dsCoord <= hintmap->edge[j].dsCoord );
+
+ /* adjust the scales, avoiding divide by zero */
+ if ( i > 0 )
+ {
+ if ( hintmap->edge[i].csCoord != hintmap->edge[i - 1].csCoord )
+ hintmap->edge[i - 1].scale =
+ FT_DivFix(
+ hintmap->edge[i].dsCoord - hintmap->edge[i - 1].dsCoord,
+ hintmap->edge[i].csCoord - hintmap->edge[i - 1].csCoord );
+ }
+
+ if ( isPair )
+ {
+ if ( hintmap->edge[j].csCoord != hintmap->edge[j - 1].csCoord )
+ hintmap->edge[j - 1].scale =
+ FT_DivFix(
+ hintmap->edge[j].dsCoord - hintmap->edge[j - 1].dsCoord,
+ hintmap->edge[j].csCoord - hintmap->edge[j - 1].csCoord );
+
+ i += 1; /* skip upper edge on next loop */
+ }
+ }
+
+ /* second pass tries to move non-optimal hints up, in case there is */
+ /* room now */
+ for ( i = cf2_arrstack_size( hintmap->hintMoves ); i > 0; i-- )
+ {
+ CF2_HintMove hintMove = (CF2_HintMove)
+ cf2_arrstack_getPointer( hintmap->hintMoves, i - 1 );
+
+
+ j = hintMove->j;
+
+ /* this was tested before the push, above */
+ FT_ASSERT( j < hintmap->count - 1 );
+
+ /* is there room to move up? */
+ if ( hintmap->edge[j + 1].dsCoord >=
+ hintmap->edge[j].dsCoord + hintMove->moveUp + CF2_MIN_COUNTER )
+ {
+ /* there is more room now, move edge up */
+ hintmap->edge[j].dsCoord += hintMove->moveUp;
+
+ if ( cf2_hint_isPair( &hintmap->edge[j] ) )
+ {
+ FT_ASSERT( j > 0 );
+ hintmap->edge[j - 1].dsCoord += hintMove->moveUp;
+ }
+ }
+ }
+ }
+
+
+ /* insert hint edges into map, sorted by csCoord */
+ static void
+ cf2_hintmap_insertHint( CF2_HintMap hintmap,
+ CF2_Hint bottomHintEdge,
+ CF2_Hint topHintEdge )
+ {
+ CF2_UInt indexInsert;
+
+ /* set default values, then check for edge hints */
+ FT_Bool isPair = TRUE;
+ CF2_Hint firstHintEdge = bottomHintEdge;
+ CF2_Hint secondHintEdge = topHintEdge;
+
+
+ /* one or none of the input params may be invalid when dealing with */
+ /* edge hints; at least one edge must be valid */
+ FT_ASSERT( cf2_hint_isValid( bottomHintEdge ) ||
+ cf2_hint_isValid( topHintEdge ) );
+
+ /* determine how many and which edges to insert */
+ if ( !cf2_hint_isValid( bottomHintEdge ) )
+ {
+ /* insert only the top edge */
+ firstHintEdge = topHintEdge;
+ isPair = FALSE;
+ }
+ else if ( !cf2_hint_isValid( topHintEdge ) )
+ {
+ /* insert only the bottom edge */
+ isPair = FALSE;
+ }
+
+ /* paired edges must be in proper order */
+ FT_ASSERT( !isPair ||
+ topHintEdge->csCoord >= bottomHintEdge->csCoord );
+
+ /* linear search to find index value of insertion point */
+ indexInsert = 0;
+ for ( ; indexInsert < hintmap->count; indexInsert++ )
+ {
+ if ( hintmap->edge[indexInsert].csCoord >= firstHintEdge->csCoord )
+ break;
+ }
+
+ /*
+ * Discard any hints that overlap in character space. Most often, this
+ * is while building the initial map, where captured hints from all
+ * zones are combined. Define overlap to include hints that `touch'
+ * (overlap zero). Hiragino Sans/Gothic fonts have numerous hints that
+ * touch. Some fonts have non-ideographic glyphs that overlap our
+ * synthetic hints.
+ *
+ * Overlap also occurs when darkening stem hints that are close.
+ *
+ */
+ if ( indexInsert < hintmap->count )
+ {
+ /* we are inserting before an existing edge: */
+ /* verify that an existing edge is not the same */
+ if ( hintmap->edge[indexInsert].csCoord == firstHintEdge->csCoord )
+ return; /* ignore overlapping stem hint */
+
+ /* verify that a new pair does not straddle the next edge */
+ if ( isPair &&
+ hintmap->edge[indexInsert].csCoord <= secondHintEdge->csCoord )
+ return; /* ignore overlapping stem hint */
+
+ /* verify that we are not inserting between paired edges */
+ if ( cf2_hint_isPairTop( &hintmap->edge[indexInsert] ) )
+ return; /* ignore overlapping stem hint */
+ }
+
+ /* recompute device space locations using initial hint map */
+ if ( cf2_hintmap_isValid( hintmap->initialHintMap ) &&
+ !cf2_hint_isLocked( firstHintEdge ) )
+ {
+ if ( isPair )
+ {
+ /* Use hint map to position the center of stem, and nominal scale */
+ /* to position the two edges. This preserves the stem width. */
+ CF2_Fixed midpoint = cf2_hintmap_map(
+ hintmap->initialHintMap,
+ ( secondHintEdge->csCoord +
+ firstHintEdge->csCoord ) / 2 );
+ CF2_Fixed halfWidth = FT_MulFix(
+ ( secondHintEdge->csCoord -
+ firstHintEdge->csCoord ) / 2,
+ hintmap->scale );
+
+
+ firstHintEdge->dsCoord = midpoint - halfWidth;
+ secondHintEdge->dsCoord = midpoint + halfWidth;
+ }
+ else
+ firstHintEdge->dsCoord = cf2_hintmap_map( hintmap->initialHintMap,
+ firstHintEdge->csCoord );
+ }
+
+ /*
+ * Discard any hints that overlap in device space; this can occur
+ * because locked hints have been moved to align with blue zones.
+ *
+ * TODO: Although we might correct this later during adjustment, we
+ * don't currently have a way to delete a conflicting hint once it has
+ * been inserted. See v2.030 MinionPro-Regular, 12 ppem darkened,
+ * initial hint map for second path, glyph 945 (the perispomeni (tilde)
+ * in U+1F6E, Greek omega with psili and perispomeni). Darkening is
+ * 25. Pair 667,747 initially conflicts in design space with top edge
+ * 660. This is because 667 maps to 7.87, and the top edge was
+ * captured by a zone at 8.0. The pair is later successfully inserted
+ * in a zone without the top edge. In this zone it is adjusted to 8.0,
+ * and no longer conflicts with the top edge in design space. This
+ * means it can be included in yet a later zone which does have the top
+ * edge hint. This produces a small mismatch between the first and
+ * last points of this path, even though the hint masks are the same.
+ * The density map difference is tiny (1/256).
+ *
+ */
+
+ if ( indexInsert > 0 )
+ {
+ /* we are inserting after an existing edge */
+ if ( firstHintEdge->dsCoord < hintmap->edge[indexInsert - 1].dsCoord )
+ return;
+ }
+
+ if ( indexInsert < hintmap->count )
+ {
+ /* we are inserting before an existing edge */
+ if ( isPair )
+ {
+ if ( secondHintEdge->dsCoord > hintmap->edge[indexInsert].dsCoord )
+ return;
+ }
+ else
+ {
+ if ( firstHintEdge->dsCoord > hintmap->edge[indexInsert].dsCoord )
+ return;
+ }
+ }
+
+ /* make room to insert */
+ {
+ CF2_Int iSrc = hintmap->count - 1;
+ CF2_Int iDst = isPair ? hintmap->count + 1 : hintmap->count;
+
+ CF2_Int count = hintmap->count - indexInsert;
+
+
+ if ( iDst >= CF2_MAX_HINT_EDGES )
+ {
+ FT_TRACE4(( "cf2_hintmap_insertHint: too many hintmaps\n" ));
+ return;
+ }
+
+ while ( count-- )
+ hintmap->edge[iDst--] = hintmap->edge[iSrc--];
+
+ /* insert first edge */
+ hintmap->edge[indexInsert] = *firstHintEdge; /* copy struct */
+ hintmap->count += 1;
+
+ if ( isPair )
+ {
+ /* insert second edge */
+ hintmap->edge[indexInsert + 1] = *secondHintEdge; /* copy struct */
+ hintmap->count += 1;
+ }
+ }
+
+ return;
+ }
+
+
+ /*
+ * Build a map from hints and mask.
+ *
+ * This function may recur one level if `hintmap->initialHintMap' is not yet
+ * valid.
+ * If `initialMap' is true, simply build initial map.
+ *
+ * Synthetic hints are used in two ways. A hint at zero is inserted, if
+ * needed, in the initial hint map, to prevent translations from
+ * propagating across the origin. If synthetic em box hints are enabled
+ * for ideographic dictionaries, then they are inserted in all hint
+ * maps, including the initial one.
+ *
+ */
+ FT_LOCAL_DEF( void )
+ cf2_hintmap_build( CF2_HintMap hintmap,
+ CF2_ArrStack hStemHintArray,
+ CF2_ArrStack vStemHintArray,
+ CF2_HintMask hintMask,
+ CF2_Fixed hintOrigin,
+ FT_Bool initialMap )
+ {
+ FT_Byte* maskPtr;
+
+ CF2_Font font = hintmap->font;
+ CF2_HintMaskRec tempHintMask;
+
+ size_t bitCount, i;
+ FT_Byte maskByte;
+
+
+ /* check whether initial map is constructed */
+ if ( !initialMap && !cf2_hintmap_isValid( hintmap->initialHintMap ) )
+ {
+ /* make recursive call with initialHintMap and temporary mask; */
+ /* temporary mask will get all bits set, below */
+ cf2_hintmask_init( &tempHintMask, hintMask->error );
+ cf2_hintmap_build( hintmap->initialHintMap,
+ hStemHintArray,
+ vStemHintArray,
+ &tempHintMask,
+ hintOrigin,
+ TRUE );
+ }
+
+ if ( !cf2_hintmask_isValid( hintMask ) )
+ {
+ /* without a hint mask, assume all hints are active */
+ cf2_hintmask_setAll( hintMask,
+ cf2_arrstack_size( hStemHintArray ) +
+ cf2_arrstack_size( vStemHintArray ) );
+ if ( !cf2_hintmask_isValid( hintMask ) )
+ return; /* too many stem hints */
+ }
+
+ /* begin by clearing the map */
+ hintmap->count = 0;
+ hintmap->lastIndex = 0;
+
+ /* make a copy of the hint mask so we can modify it */
+ tempHintMask = *hintMask;
+ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask );
+
+ /* use the hStem hints only, which are first in the mask */
+ bitCount = cf2_arrstack_size( hStemHintArray );
+
+ /* Defense-in-depth. Should never return here. */
+ if ( bitCount > hintMask->bitCount )
+ return;
+
+ /* synthetic embox hints get highest priority */
+ if ( font->blues.doEmBoxHints )
+ {
+ CF2_HintRec dummy;
+
+
+ cf2_hint_initZero( &dummy ); /* invalid hint map element */
+
+ /* ghost bottom */
+ cf2_hintmap_insertHint( hintmap,
+ &font->blues.emBoxBottomEdge,
+ &dummy );
+ /* ghost top */
+ cf2_hintmap_insertHint( hintmap,
+ &dummy,
+ &font->blues.emBoxTopEdge );
+ }
+
+ /* insert hints captured by a blue zone or already locked (higher */
+ /* priority) */
+ for ( i = 0, maskByte = 0x80; i < bitCount; i++ )
+ {
+ if ( maskByte & *maskPtr )
+ {
+ /* expand StemHint into two `CF2_Hint' elements */
+ CF2_HintRec bottomHintEdge, topHintEdge;
+
+
+ cf2_hint_init( &bottomHintEdge,
+ hStemHintArray,
+ i,
+ font,
+ hintOrigin,
+ hintmap->scale,
+ TRUE /* bottom */ );
+ cf2_hint_init( &topHintEdge,
+ hStemHintArray,
+ i,
+ font,
+ hintOrigin,
+ hintmap->scale,
+ FALSE /* top */ );
+
+ if ( cf2_hint_isLocked( &bottomHintEdge ) ||
+ cf2_hint_isLocked( &topHintEdge ) ||
+ cf2_blues_capture( &font->blues,
+ &bottomHintEdge,
+ &topHintEdge ) )
+ {
+ /* insert captured hint into map */
+ cf2_hintmap_insertHint( hintmap, &bottomHintEdge, &topHintEdge );
+
+ *maskPtr &= ~maskByte; /* turn off the bit for this hint */
+ }
+ }
+
+ if ( ( i & 7 ) == 7 )
+ {
+ /* move to next mask byte */
+ maskPtr++;
+ maskByte = 0x80;
+ }
+ else
+ maskByte >>= 1;
+ }
+
+ /* initial hint map includes only captured hints plus maybe one at 0 */
+
+ /*
+ * TODO: There is a problem here because we are trying to build a
+ * single hint map containing all captured hints. It is
+ * possible for there to be conflicts between captured hints,
+ * either because of darkening or because the hints are in
+ * separate hint zones (we are ignoring hint zones for the
+ * initial map). An example of the latter is MinionPro-Regular
+ * v2.030 glyph 883 (Greek Capital Alpha with Psili) at 15ppem.
+ * A stem hint for the psili conflicts with the top edge hint
+ * for the base character. The stem hint gets priority because
+ * of its sort order. In glyph 884 (Greek Capital Alpha with
+ * Psili and Oxia), the top of the base character gets a stem
+ * hint, and the psili does not. This creates different initial
+ * maps for the two glyphs resulting in different renderings of
+ * the base character. Will probably defer this either as not
+ * worth the cost or as a font bug. I don't think there is any
+ * good reason for an accent to be captured by an alignment
+ * zone. -darnold 2/12/10
+ */
+
+ if ( initialMap )
+ {
+ /* Apply a heuristic that inserts a point for (0,0), unless it's */
+ /* already covered by a mapping. This locks the baseline for glyphs */
+ /* that have no baseline hints. */
+
+ if ( hintmap->count == 0 ||
+ hintmap->edge[0].csCoord > 0 ||
+ hintmap->edge[hintmap->count - 1].csCoord < 0 )
+ {
+ /* all edges are above 0 or all edges are below 0; */
+ /* construct a locked edge hint at 0 */
+
+ CF2_HintRec edge, invalid;
+
+
+ cf2_hint_initZero( &edge );
+
+ edge.flags = CF2_GhostBottom |
+ CF2_Locked |
+ CF2_Synthetic;
+ edge.scale = hintmap->scale;
+
+ cf2_hint_initZero( &invalid );
+ cf2_hintmap_insertHint( hintmap, &edge, &invalid );
+ }
+ }
+ else
+ {
+ /* insert remaining hints */
+
+ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask );
+
+ for ( i = 0, maskByte = 0x80; i < bitCount; i++ )
+ {
+ if ( maskByte & *maskPtr )
+ {
+ CF2_HintRec bottomHintEdge, topHintEdge;
+
+
+ cf2_hint_init( &bottomHintEdge,
+ hStemHintArray,
+ i,
+ font,
+ hintOrigin,
+ hintmap->scale,
+ TRUE /* bottom */ );
+ cf2_hint_init( &topHintEdge,
+ hStemHintArray,
+ i,
+ font,
+ hintOrigin,
+ hintmap->scale,
+ FALSE /* top */ );
+
+ cf2_hintmap_insertHint( hintmap, &bottomHintEdge, &topHintEdge );
+ }
+
+ if ( ( i & 7 ) == 7 )
+ {
+ /* move to next mask byte */
+ maskPtr++;
+ maskByte = 0x80;
+ }
+ else
+ maskByte >>= 1;
+ }
+ }
+
+ /*
+ * Note: The following line is a convenient place to break when
+ * debugging hinting. Examine `hintmap->edge' for the list of
+ * enabled hints, then step over the call to see the effect of
+ * adjustment. We stop here first on the recursive call that
+ * creates the initial map, and then on each counter group and
+ * hint zone.
+ */
+
+ /* adjust positions of hint edges that are not locked to blue zones */
+ cf2_hintmap_adjustHints( hintmap );
+
+ /* save the position of all hints that were used in this hint map; */
+ /* if we use them again, we'll locate them in the same position */
+ if ( !initialMap )
+ {
+ for ( i = 0; i < hintmap->count; i++ )
+ {
+ if ( !cf2_hint_isSynthetic( &hintmap->edge[i] ) )
+ {
+ /* Note: include both valid and invalid edges */
+ /* Note: top and bottom edges are copied back separately */
+ CF2_StemHint stemhint = (CF2_StemHint)
+ cf2_arrstack_getPointer( hStemHintArray,
+ hintmap->edge[i].index );
+
+
+ if ( cf2_hint_isTop( &hintmap->edge[i] ) )
+ stemhint->maxDS = hintmap->edge[i].dsCoord;
+ else
+ stemhint->minDS = hintmap->edge[i].dsCoord;
+
+ stemhint->used = TRUE;
+ }
+ }
+ }
+
+ /* hint map is ready to use */
+ hintmap->isValid = TRUE;
+
+ /* remember this mask has been used */
+ cf2_hintmask_setNew( hintMask, FALSE );
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_glyphpath_init( CF2_GlyphPath glyphpath,
+ CF2_Font font,
+ CF2_OutlineCallbacks callbacks,
+ CF2_Fixed scaleY,
+ /* CF2_Fixed hShift, */
+ CF2_ArrStack hStemHintArray,
+ CF2_ArrStack vStemHintArray,
+ CF2_HintMask hintMask,
+ CF2_Fixed hintOriginY,
+ const CF2_Blues blues,
+ const FT_Vector* fractionalTranslation )
+ {
+ FT_ZERO( glyphpath );
+
+ glyphpath->font = font;
+ glyphpath->callbacks = callbacks;
+
+ cf2_arrstack_init( &glyphpath->hintMoves,
+ font->memory,
+ &font->error,
+ sizeof ( CF2_HintMoveRec ) );
+
+ cf2_hintmap_init( &glyphpath->initialHintMap,
+ font,
+ &glyphpath->initialHintMap,
+ &glyphpath->hintMoves,
+ scaleY );
+ cf2_hintmap_init( &glyphpath->firstHintMap,
+ font,
+ &glyphpath->initialHintMap,
+ &glyphpath->hintMoves,
+ scaleY );
+ cf2_hintmap_init( &glyphpath->hintMap,
+ font,
+ &glyphpath->initialHintMap,
+ &glyphpath->hintMoves,
+ scaleY );
+
+ glyphpath->scaleX = font->innerTransform.a;
+ glyphpath->scaleC = font->innerTransform.c;
+ glyphpath->scaleY = font->innerTransform.d;
+
+ glyphpath->fractionalTranslation = *fractionalTranslation;
+
+#if 0
+ glyphpath->hShift = hShift; /* for fauxing */
+#endif
+
+ glyphpath->hStemHintArray = hStemHintArray;
+ glyphpath->vStemHintArray = vStemHintArray;
+ glyphpath->hintMask = hintMask; /* ptr to current mask */
+ glyphpath->hintOriginY = hintOriginY;
+ glyphpath->blues = blues;
+ glyphpath->darken = font->darkened; /* TODO: should we make copies? */
+ glyphpath->xOffset = font->darkenX;
+ glyphpath->yOffset = font->darkenY;
+ glyphpath->miterLimit = 2 * FT_MAX(
+ cf2_fixedAbs( glyphpath->xOffset ),
+ cf2_fixedAbs( glyphpath->yOffset ) );
+
+ /* .1 character space unit */
+ glyphpath->snapThreshold = cf2_floatToFixed( 0.1f );
+
+ glyphpath->moveIsPending = TRUE;
+ glyphpath->pathIsOpen = FALSE;
+ glyphpath->pathIsClosing = FALSE;
+ glyphpath->elemIsQueued = FALSE;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_glyphpath_finalize( CF2_GlyphPath glyphpath )
+ {
+ cf2_arrstack_finalize( &glyphpath->hintMoves );
+ }
+
+
+ /*
+ * Hint point in y-direction and apply outerTransform.
+ * Input `current' hint map (which is actually delayed by one element).
+ * Input x,y point in Character Space.
+ * Output x,y point in Device Space, including translation.
+ */
+ static void
+ cf2_glyphpath_hintPoint( CF2_GlyphPath glyphpath,
+ CF2_HintMap hintmap,
+ FT_Vector* ppt,
+ CF2_Fixed x,
+ CF2_Fixed y )
+ {
+ FT_Vector pt; /* hinted point in upright DS */
+
+
+ pt.x = FT_MulFix( glyphpath->scaleX, x ) +
+ FT_MulFix( glyphpath->scaleC, y );
+ pt.y = cf2_hintmap_map( hintmap, y );
+
+ ppt->x = FT_MulFix( glyphpath->font->outerTransform.a, pt.x ) +
+ FT_MulFix( glyphpath->font->outerTransform.c, pt.y ) +
+ glyphpath->fractionalTranslation.x;
+ ppt->y = FT_MulFix( glyphpath->font->outerTransform.b, pt.x ) +
+ FT_MulFix( glyphpath->font->outerTransform.d, pt.y ) +
+ glyphpath->fractionalTranslation.y;
+ }
+
+
+ /*
+ * From two line segments, (u1,u2) and (v1,v2), compute a point of
+ * intersection on the corresponding lines.
+ * Return false if no intersection is found, or if the intersection is
+ * too far away from the ends of the line segments, u2 and v1.
+ *
+ */
+ static FT_Bool
+ cf2_glyphpath_computeIntersection( CF2_GlyphPath glyphpath,
+ const FT_Vector* u1,
+ const FT_Vector* u2,
+ const FT_Vector* v1,
+ const FT_Vector* v2,
+ FT_Vector* intersection )
+ {
+ /*
+ * Let `u' be a zero-based vector from the first segment, `v' from the
+ * second segment.
+ * Let `w 'be the zero-based vector from `u1' to `v1'.
+ * `perp' is the `perpendicular dot product'; see
+ * http://mathworld.wolfram.com/PerpDotProduct.html.
+ * `s' is the parameter for the parametric line for the first segment
+ * (`u').
+ *
+ * See notation in
+ * http://softsurfer.com/Archive/algorithm_0104/algorithm_0104B.htm.
+ * Calculations are done in 16.16, but must handle the squaring of
+ * line lengths in character space. We scale all vectors by 1/32 to
+ * avoid overflow. This allows values up to 4095 to be squared. The
+ * scale factor cancels in the divide.
+ *
+ * TODO: the scale factor could be computed from UnitsPerEm.
+ *
+ */
+
+#define cf2_perp( a, b ) \
+ ( FT_MulFix( a.x, b.y ) - FT_MulFix( a.y, b.x ) )
+
+ /* round and divide by 32 */
+#define CF2_CS_SCALE( x ) \
+ ( ( (x) + 0x10 ) >> 5 )
+
+ FT_Vector u, v, w; /* scaled vectors */
+ CF2_Fixed denominator, s;
+
+
+ u.x = CF2_CS_SCALE( u2->x - u1->x );
+ u.y = CF2_CS_SCALE( u2->y - u1->y );
+ v.x = CF2_CS_SCALE( v2->x - v1->x );
+ v.y = CF2_CS_SCALE( v2->y - v1->y );
+ w.x = CF2_CS_SCALE( v1->x - u1->x );
+ w.y = CF2_CS_SCALE( v1->y - u1->y );
+
+ denominator = cf2_perp( u, v );
+
+ if ( denominator == 0 )
+ return FALSE; /* parallel or coincident lines */
+
+ s = FT_DivFix( cf2_perp( w, v ), denominator );
+
+ intersection->x = u1->x + FT_MulFix( s, u2->x - u1->x );
+ intersection->y = u1->y + FT_MulFix( s, u2->y - u1->y );
+
+ /*
+ * Special case snapping for horizontal and vertical lines.
+ * This cleans up intersections and reduces problems with winding
+ * order detection.
+ * Sample case is sbc cd KozGoPr6N-Medium.otf 20 16685.
+ * Note: these calculations are in character space.
+ *
+ */
+
+ if ( u1->x == u2->x &&
+ cf2_fixedAbs( intersection->x - u1->x ) < glyphpath->snapThreshold )
+ intersection->x = u1->x;
+ if ( u1->y == u2->y &&
+ cf2_fixedAbs( intersection->y - u1->y ) < glyphpath->snapThreshold )
+ intersection->y = u1->y;
+
+ if ( v1->x == v2->x &&
+ cf2_fixedAbs( intersection->x - v1->x ) < glyphpath->snapThreshold )
+ intersection->x = v1->x;
+ if ( v1->y == v2->y &&
+ cf2_fixedAbs( intersection->y - v1->y ) < glyphpath->snapThreshold )
+ intersection->y = v1->y;
+
+ /* limit the intersection distance from midpoint of u2 and v1 */
+ if ( cf2_fixedAbs( intersection->x - ( u2->x + v1->x ) / 2 ) >
+ glyphpath->miterLimit ||
+ cf2_fixedAbs( intersection->y - ( u2->y + v1->y ) / 2 ) >
+ glyphpath->miterLimit )
+ return FALSE;
+
+ return TRUE;
+ }
+
+
+ /*
+ * Push the cached element (glyphpath->prevElem*) to the outline
+ * consumer. When a darkening offset is used, the end point of the
+ * cached element may be adjusted to an intersection point or we may
+ * synthesize a connecting line to the current element. If we are
+ * closing a subpath, we may also generate a connecting line to the start
+ * point.
+ *
+ * This is where Character Space (CS) is converted to Device Space (DS)
+ * using a hint map. This calculation must use a HintMap that was valid
+ * at the time the element was saved. For the first point in a subpath,
+ * that is a saved HintMap. For most elements, it just means the caller
+ * has delayed building a HintMap from the current HintMask.
+ *
+ * Transform each point with outerTransform and call the outline
+ * callbacks. This is a general 3x3 transform:
+ *
+ * x' = a*x + c*y + tx, y' = b*x + d*y + ty
+ *
+ * but it uses 4 elements from CF2_Font and the translation part
+ * from CF2_GlyphPath.
+ *
+ */
+ static void
+ cf2_glyphpath_pushPrevElem( CF2_GlyphPath glyphpath,
+ CF2_HintMap hintmap,
+ FT_Vector* nextP0,
+ FT_Vector nextP1,
+ FT_Bool close )
+ {
+ CF2_CallbackParamsRec params;
+
+ FT_Vector* prevP0;
+ FT_Vector* prevP1;
+
+ FT_Vector intersection = { 0, 0 };
+ FT_Bool useIntersection = FALSE;
+
+
+ FT_ASSERT( glyphpath->prevElemOp == CF2_PathOpLineTo ||
+ glyphpath->prevElemOp == CF2_PathOpCubeTo );
+
+ if ( glyphpath->prevElemOp == CF2_PathOpLineTo )
+ {
+ prevP0 = &glyphpath->prevElemP0;
+ prevP1 = &glyphpath->prevElemP1;
+ }
+ else
+ {
+ prevP0 = &glyphpath->prevElemP2;
+ prevP1 = &glyphpath->prevElemP3;
+ }
+
+ /* optimization: if previous and next elements are offset by the same */
+ /* amount, then there will be no gap, and no need to compute an */
+ /* intersection. */
+ if ( prevP1->x != nextP0->x || prevP1->y != nextP0->y )
+ {
+ /* previous element does not join next element: */
+ /* adjust end point of previous element to the intersection */
+ useIntersection = cf2_glyphpath_computeIntersection( glyphpath,
+ prevP0,
+ prevP1,
+ nextP0,
+ &nextP1,
+ &intersection );
+ if ( useIntersection )
+ {
+ /* modify the last point of the cached element (either line or */
+ /* curve) */
+ *prevP1 = intersection;
+ }
+ }
+
+ params.pt0 = glyphpath->currentDS;
+
+ switch( glyphpath->prevElemOp )
+ {
+ case CF2_PathOpLineTo:
+ params.op = CF2_PathOpLineTo;
+
+ /* note: pt2 and pt3 are unused */
+
+ if ( close )
+ {
+ /* use first hint map if closing */
+ cf2_glyphpath_hintPoint( glyphpath,
+ &glyphpath->firstHintMap,
+ &params.pt1,
+ glyphpath->prevElemP1.x,
+ glyphpath->prevElemP1.y );
+ }
+ else
+ {
+ cf2_glyphpath_hintPoint( glyphpath,
+ hintmap,
+ &params.pt1,
+ glyphpath->prevElemP1.x,
+ glyphpath->prevElemP1.y );
+ }
+
+ /* output only non-zero length lines */
+ if ( params.pt0.x != params.pt1.x || params.pt0.y != params.pt1.y )
+ {
+ glyphpath->callbacks->lineTo( glyphpath->callbacks, &params );
+
+ glyphpath->currentDS = params.pt1;
+ }
+ break;
+
+ case CF2_PathOpCubeTo:
+ params.op = CF2_PathOpCubeTo;
+
+ /* TODO: should we intersect the interior joins (p1-p2 and p2-p3)? */
+ cf2_glyphpath_hintPoint( glyphpath,
+ hintmap,
+ &params.pt1,
+ glyphpath->prevElemP1.x,
+ glyphpath->prevElemP1.y );
+ cf2_glyphpath_hintPoint( glyphpath,
+ hintmap,
+ &params.pt2,
+ glyphpath->prevElemP2.x,
+ glyphpath->prevElemP2.y );
+ cf2_glyphpath_hintPoint( glyphpath,
+ hintmap,
+ &params.pt3,
+ glyphpath->prevElemP3.x,
+ glyphpath->prevElemP3.y );
+
+ glyphpath->callbacks->cubeTo( glyphpath->callbacks, &params );
+
+ glyphpath->currentDS = params.pt3;
+
+ break;
+ }
+
+ if ( !useIntersection || close )
+ {
+ /* insert connecting line between end of previous element and start */
+ /* of current one */
+ /* note: at the end of a subpath, we might do both, so use `nextP0' */
+ /* before we change it, below */
+
+ if ( close )
+ {
+ /* if we are closing the subpath, then nextP0 is in the first */
+ /* hint zone */
+ cf2_glyphpath_hintPoint( glyphpath,
+ &glyphpath->firstHintMap,
+ &params.pt1,
+ nextP0->x,
+ nextP0->y );
+ }
+ else
+ {
+ cf2_glyphpath_hintPoint( glyphpath,
+ hintmap,
+ &params.pt1,
+ nextP0->x,
+ nextP0->y );
+ }
+
+ if ( params.pt1.x != glyphpath->currentDS.x ||
+ params.pt1.y != glyphpath->currentDS.y )
+ {
+ /* length is nonzero */
+ params.op = CF2_PathOpLineTo;
+ params.pt0 = glyphpath->currentDS;
+
+ /* note: pt2 and pt3 are unused */
+ glyphpath->callbacks->lineTo( glyphpath->callbacks, &params );
+
+ glyphpath->currentDS = params.pt1;
+ }
+ }
+
+ if ( useIntersection )
+ {
+ /* return intersection point to caller */
+ *nextP0 = intersection;
+ }
+ }
+
+
+ /* push a MoveTo element based on current point and offset of current */
+ /* element */
+ static void
+ cf2_glyphpath_pushMove( CF2_GlyphPath glyphpath,
+ FT_Vector start )
+ {
+ CF2_CallbackParamsRec params;
+
+
+ params.op = CF2_PathOpMoveTo;
+ params.pt0 = glyphpath->currentDS;
+
+ /* Test if move has really happened yet; it would have called */
+ /* `cf2_hintmap_build' to set `isValid'. */
+ if ( !cf2_hintmap_isValid( &glyphpath->hintMap ) )
+ {
+ /* we are here iff first subpath is missing a moveto operator: */
+ /* synthesize first moveTo to finish initialization of hintMap */
+ cf2_glyphpath_moveTo( glyphpath,
+ glyphpath->start.x,
+ glyphpath->start.y );
+ }
+
+ cf2_glyphpath_hintPoint( glyphpath,
+ &glyphpath->hintMap,
+ &params.pt1,
+ start.x,
+ start.y );
+
+ /* note: pt2 and pt3 are unused */
+ glyphpath->callbacks->moveTo( glyphpath->callbacks, &params );
+
+ glyphpath->currentDS = params.pt1;
+ glyphpath->offsetStart0 = start;
+ }
+
+
+ /*
+ * All coordinates are in character space.
+ * On input, (x1, y1) and (x2, y2) give line segment.
+ * On output, (x, y) give offset vector.
+ * We use a piecewise approximation to trig functions.
+ *
+ * TODO: Offset true perpendicular and proper length
+ * supply the y-translation for hinting here, too,
+ * that adds yOffset unconditionally to *y.
+ */
+ static void
+ cf2_glyphpath_computeOffset( CF2_GlyphPath glyphpath,
+ CF2_Fixed x1,
+ CF2_Fixed y1,
+ CF2_Fixed x2,
+ CF2_Fixed y2,
+ CF2_Fixed* x,
+ CF2_Fixed* y )
+ {
+ CF2_Fixed dx = x2 - x1;
+ CF2_Fixed dy = y2 - y1;
+
+
+ /* note: negative offsets don't work here; negate deltas to change */
+ /* quadrants, below */
+ if ( glyphpath->font->reverseWinding )
+ {
+ dx = -dx;
+ dy = -dy;
+ }
+
+ *x = *y = 0;
+
+ if ( !glyphpath->darken )
+ return;
+
+ /* add momentum for this path element */
+ glyphpath->callbacks->windingMomentum +=
+ cf2_getWindingMomentum( x1, y1, x2, y2 );
+
+ /* note: allow mixed integer and fixed multiplication here */
+ if ( dx >= 0 )
+ {
+ if ( dy >= 0 )
+ {
+ /* first quadrant, +x +y */
+
+ if ( dx > 2 * dy )
+ {
+ /* +x */
+ *x = 0;
+ *y = 0;
+ }
+ else if ( dy > 2 * dx )
+ {
+ /* +y */
+ *x = glyphpath->xOffset;
+ *y = glyphpath->yOffset;
+ }
+ else
+ {
+ /* +x +y */
+ *x = FT_MulFix( cf2_floatToFixed( 0.7 ),
+ glyphpath->xOffset );
+ *y = FT_MulFix( cf2_floatToFixed( 1.0 - 0.7 ),
+ glyphpath->yOffset );
+ }
+ }
+ else
+ {
+ /* fourth quadrant, +x -y */
+
+ if ( dx > -2 * dy )
+ {
+ /* +x */
+ *x = 0;
+ *y = 0;
+ }
+ else if ( -dy > 2 * dx )
+ {
+ /* -y */
+ *x = -glyphpath->xOffset;
+ *y = glyphpath->yOffset;
+ }
+ else
+ {
+ /* +x -y */
+ *x = FT_MulFix( cf2_floatToFixed( -0.7 ),
+ glyphpath->xOffset );
+ *y = FT_MulFix( cf2_floatToFixed( 1.0 - 0.7 ),
+ glyphpath->yOffset );
+ }
+ }
+ }
+ else
+ {
+ if ( dy >= 0 )
+ {
+ /* second quadrant, -x +y */
+
+ if ( -dx > 2 * dy )
+ {
+ /* -x */
+ *x = 0;
+ *y = 2 * glyphpath->yOffset;
+ }
+ else if ( dy > -2 * dx )
+ {
+ /* +y */
+ *x = glyphpath->xOffset;
+ *y = glyphpath->yOffset;
+ }
+ else
+ {
+ /* -x +y */
+ *x = FT_MulFix( cf2_floatToFixed( 0.7 ),
+ glyphpath->xOffset );
+ *y = FT_MulFix( cf2_floatToFixed( 1.0 + 0.7 ),
+ glyphpath->yOffset );
+ }
+ }
+ else
+ {
+ /* third quadrant, -x -y */
+
+ if ( -dx > -2 * dy )
+ {
+ /* -x */
+ *x = 0;
+ *y = 2 * glyphpath->yOffset;
+ }
+ else if ( -dy > -2 * dx )
+ {
+ /* -y */
+ *x = -glyphpath->xOffset;
+ *y = glyphpath->yOffset;
+ }
+ else
+ {
+ /* -x -y */
+ *x = FT_MulFix( cf2_floatToFixed( -0.7 ),
+ glyphpath->xOffset );
+ *y = FT_MulFix( cf2_floatToFixed( 1.0 + 0.7 ),
+ glyphpath->yOffset );
+ }
+ }
+ }
+ }
+
+
+ /*
+ * The functions cf2_glyphpath_{moveTo,lineTo,curveTo,closeOpenPath} are
+ * called by the interpreter with Character Space (CS) coordinates. Each
+ * path element is placed into a queue of length one to await the
+ * calculation of the following element. At that time, the darkening
+ * offset of the following element is known and joins can be computed,
+ * including possible modification of this element, before mapping to
+ * Device Space (DS) and passing it on to the outline consumer.
+ *
+ */
+ FT_LOCAL_DEF( void )
+ cf2_glyphpath_moveTo( CF2_GlyphPath glyphpath,
+ CF2_Fixed x,
+ CF2_Fixed y )
+ {
+ cf2_glyphpath_closeOpenPath( glyphpath );
+
+ /* save the parameters of the move for later, when we'll know how to */
+ /* offset it; */
+ /* also save last move point */
+ glyphpath->currentCS.x = glyphpath->start.x = x;
+ glyphpath->currentCS.y = glyphpath->start.y = y;
+
+ glyphpath->moveIsPending = TRUE;
+
+ /* ensure we have a valid map with current mask */
+ if ( !cf2_hintmap_isValid( &glyphpath->hintMap ) ||
+ cf2_hintmask_isNew( glyphpath->hintMask ) )
+ cf2_hintmap_build( &glyphpath->hintMap,
+ glyphpath->hStemHintArray,
+ glyphpath->vStemHintArray,
+ glyphpath->hintMask,
+ glyphpath->hintOriginY,
+ FALSE );
+
+ /* save a copy of current HintMap to use when drawing initial point */
+ glyphpath->firstHintMap = glyphpath->hintMap; /* structure copy */
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_glyphpath_lineTo( CF2_GlyphPath glyphpath,
+ CF2_Fixed x,
+ CF2_Fixed y )
+ {
+ CF2_Fixed xOffset, yOffset;
+ FT_Vector P0, P1;
+ FT_Bool newHintMap;
+
+ /*
+ * New hints will be applied after cf2_glyphpath_pushPrevElem has run.
+ * In case this is a synthesized closing line, any new hints should be
+ * delayed until this path is closed (`cf2_hintmask_isNew' will be
+ * called again before the next line or curve).
+ */
+
+ /* true if new hint map not on close */
+ newHintMap = cf2_hintmask_isNew( glyphpath->hintMask ) &&
+ !glyphpath->pathIsClosing;
+
+ /*
+ * Zero-length lines may occur in the charstring. Because we cannot
+ * compute darkening offsets or intersections from zero-length lines,
+ * it is best to remove them and avoid artifacts. However, zero-length
+ * lines in CS at the start of a new hint map can generate non-zero
+ * lines in DS due to hint substitution. We detect a change in hint
+ * map here and pass those zero-length lines along.
+ */
+
+ /*
+ * Note: Find explicitly closed paths here with a conditional
+ * breakpoint using
+ *
+ * !gp->pathIsClosing && gp->start.x == x && gp->start.y == y
+ *
+ */
+
+ if ( glyphpath->currentCS.x == x &&
+ glyphpath->currentCS.y == y &&
+ !newHintMap )
+ /*
+ * Ignore zero-length lines in CS where the hint map is the same
+ * because the line in DS will also be zero length.
+ *
+ * Ignore zero-length lines when we synthesize a closing line because
+ * the close will be handled in cf2_glyphPath_pushPrevElem.
+ */
+ return;
+
+ cf2_glyphpath_computeOffset( glyphpath,
+ glyphpath->currentCS.x,
+ glyphpath->currentCS.y,
+ x,
+ y,
+ &xOffset,
+ &yOffset );
+
+ /* construct offset points */
+ P0.x = glyphpath->currentCS.x + xOffset;
+ P0.y = glyphpath->currentCS.y + yOffset;
+ P1.x = x + xOffset;
+ P1.y = y + yOffset;
+
+ if ( glyphpath->moveIsPending )
+ {
+ /* emit offset 1st point as MoveTo */
+ cf2_glyphpath_pushMove( glyphpath, P0 );
+
+ glyphpath->moveIsPending = FALSE; /* adjust state machine */
+ glyphpath->pathIsOpen = TRUE;
+
+ glyphpath->offsetStart1 = P1; /* record second point */
+ }
+
+ if ( glyphpath->elemIsQueued )
+ {
+ FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) ||
+ glyphpath->hintMap.count == 0 );
+
+ cf2_glyphpath_pushPrevElem( glyphpath,
+ &glyphpath->hintMap,
+ &P0,
+ P1,
+ FALSE );
+ }
+
+ /* queue the current element with offset points */
+ glyphpath->elemIsQueued = TRUE;
+ glyphpath->prevElemOp = CF2_PathOpLineTo;
+ glyphpath->prevElemP0 = P0;
+ glyphpath->prevElemP1 = P1;
+
+ /* update current map */
+ if ( newHintMap )
+ cf2_hintmap_build( &glyphpath->hintMap,
+ glyphpath->hStemHintArray,
+ glyphpath->vStemHintArray,
+ glyphpath->hintMask,
+ glyphpath->hintOriginY,
+ FALSE );
+
+ glyphpath->currentCS.x = x; /* pre-offset current point */
+ glyphpath->currentCS.y = y;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_glyphpath_curveTo( CF2_GlyphPath glyphpath,
+ CF2_Fixed x1,
+ CF2_Fixed y1,
+ CF2_Fixed x2,
+ CF2_Fixed y2,
+ CF2_Fixed x3,
+ CF2_Fixed y3 )
+ {
+ CF2_Fixed xOffset1, yOffset1, xOffset3, yOffset3;
+ FT_Vector P0, P1, P2, P3;
+
+
+ /* TODO: ignore zero length portions of curve?? */
+ cf2_glyphpath_computeOffset( glyphpath,
+ glyphpath->currentCS.x,
+ glyphpath->currentCS.y,
+ x1,
+ y1,
+ &xOffset1,
+ &yOffset1 );
+ cf2_glyphpath_computeOffset( glyphpath,
+ x2,
+ y2,
+ x3,
+ y3,
+ &xOffset3,
+ &yOffset3 );
+
+ /* add momentum from the middle segment */
+ glyphpath->callbacks->windingMomentum +=
+ cf2_getWindingMomentum( x1, y1, x2, y2 );
+
+ /* construct offset points */
+ P0.x = glyphpath->currentCS.x + xOffset1;
+ P0.y = glyphpath->currentCS.y + yOffset1;
+ P1.x = x1 + xOffset1;
+ P1.y = y1 + yOffset1;
+ /* note: preserve angle of final segment by using offset3 at both ends */
+ P2.x = x2 + xOffset3;
+ P2.y = y2 + yOffset3;
+ P3.x = x3 + xOffset3;
+ P3.y = y3 + yOffset3;
+
+ if ( glyphpath->moveIsPending )
+ {
+ /* emit offset 1st point as MoveTo */
+ cf2_glyphpath_pushMove( glyphpath, P0 );
+
+ glyphpath->moveIsPending = FALSE;
+ glyphpath->pathIsOpen = TRUE;
+
+ glyphpath->offsetStart1 = P1; /* record second point */
+ }
+
+ if ( glyphpath->elemIsQueued )
+ {
+ FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) ||
+ glyphpath->hintMap.count == 0 );
+
+ cf2_glyphpath_pushPrevElem( glyphpath,
+ &glyphpath->hintMap,
+ &P0,
+ P1,
+ FALSE );
+ }
+
+ /* queue the current element with offset points */
+ glyphpath->elemIsQueued = TRUE;
+ glyphpath->prevElemOp = CF2_PathOpCubeTo;
+ glyphpath->prevElemP0 = P0;
+ glyphpath->prevElemP1 = P1;
+ glyphpath->prevElemP2 = P2;
+ glyphpath->prevElemP3 = P3;
+
+ /* update current map */
+ if ( cf2_hintmask_isNew( glyphpath->hintMask ) )
+ cf2_hintmap_build( &glyphpath->hintMap,
+ glyphpath->hStemHintArray,
+ glyphpath->vStemHintArray,
+ glyphpath->hintMask,
+ glyphpath->hintOriginY,
+ FALSE );
+
+ glyphpath->currentCS.x = x3; /* pre-offset current point */
+ glyphpath->currentCS.y = y3;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_glyphpath_closeOpenPath( CF2_GlyphPath glyphpath )
+ {
+ if ( glyphpath->pathIsOpen )
+ {
+ /*
+ * A closing line in Character Space line is always generated below
+ * with `cf2_glyphPath_lineTo'. It may be ignored later if it turns
+ * out to be zero length in Device Space.
+ */
+ glyphpath->pathIsClosing = TRUE;
+
+ cf2_glyphpath_lineTo( glyphpath,
+ glyphpath->start.x,
+ glyphpath->start.y );
+
+ /* empty the final element from the queue and close the path */
+ if ( glyphpath->elemIsQueued )
+ cf2_glyphpath_pushPrevElem( glyphpath,
+ &glyphpath->hintMap,
+ &glyphpath->offsetStart0,
+ glyphpath->offsetStart1,
+ TRUE );
+
+ /* reset state machine */
+ glyphpath->moveIsPending = TRUE;
+ glyphpath->pathIsOpen = FALSE;
+ glyphpath->pathIsClosing = FALSE;
+ glyphpath->elemIsQueued = FALSE;
+ }
+ }
+
+
+/* END */
diff --git a/src/cff/cf2hints.h b/src/cff/cf2hints.h
new file mode 100644
index 0000000..f25d91b
--- /dev/null
+++ b/src/cff/cf2hints.h
@@ -0,0 +1,289 @@
+/***************************************************************************/
+/* */
+/* cf2hints.h */
+/* */
+/* Adobe's code for handling CFF hints (body). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2HINTS_H__
+#define __CF2HINTS_H__
+
+
+FT_BEGIN_HEADER
+
+
+ enum
+ {
+ CF2_MAX_HINTS = 96 /* maximum # of hints */
+ };
+
+
+ /*
+ * A HintMask object stores a bit mask that specifies which hints in the
+ * charstring are active at a given time. Hints in CFF must be declared
+ * at the start, before any drawing operators, with horizontal hints
+ * preceding vertical hints. The HintMask is ordered the same way, with
+ * horizontal hints immediately followed by vertical hints. Clients are
+ * responsible for knowing how many of each type are present.
+ *
+ * The maximum total number of hints is 96, as specified by the CFF
+ * specification.
+ *
+ * A HintMask is built 0 or more times while interpreting a charstring, by
+ * the HintMask operator. There is only one HintMask, but it is built or
+ * rebuilt each time there is a hint substitution (HintMask operator) in
+ * the charstring. A default HintMask with all bits set is built if there
+ * has been no HintMask operator prior to the first drawing operator.
+ *
+ */
+
+ typedef struct CF2_HintMaskRec_
+ {
+ FT_Error* error;
+
+ FT_Bool isValid;
+ FT_Bool isNew;
+
+ size_t bitCount;
+ size_t byteCount;
+
+ FT_Byte mask[( CF2_MAX_HINTS + 7 ) / 8];
+
+ } CF2_HintMaskRec, *CF2_HintMask;
+
+
+ typedef struct CF2_StemHintRec_
+ {
+ FT_Bool used; /* DS positions are valid */
+
+ CF2_Fixed min; /* original character space value */
+ CF2_Fixed max;
+
+ CF2_Fixed minDS; /* DS position after first use */
+ CF2_Fixed maxDS;
+
+ } CF2_StemHintRec, *CF2_StemHint;
+
+
+ /*
+ * A HintMap object stores a piecewise linear function for mapping
+ * y-coordinates from character space to device space, providing
+ * appropriate pixel alignment to stem edges.
+ *
+ * The map is implemented as an array of `CF2_Hint' elements, each
+ * representing an edge. When edges are paired, as from stem hints, the
+ * bottom edge must immediately precede the top edge in the array.
+ * Element character space AND device space positions must both increase
+ * monotonically in the array. `CF2_Hint' elements are also used as
+ * parameters to `cf2_blues_capture'.
+ *
+ * The `cf2_hintmap_build' method must be called before any drawing
+ * operation (beginning with a Move operator) and at each hint
+ * substitution (HintMask operator).
+ *
+ * The `cf2_hintmap_map' method is called to transform y-coordinates at
+ * each drawing operation (move, line, curve).
+ *
+ */
+
+ /* TODO: make this a CF2_ArrStack and add a deep copy method */
+ enum
+ {
+ CF2_MAX_HINT_EDGES = CF2_MAX_HINTS * 2
+ };
+
+
+ typedef struct CF2_HintMapRec_
+ {
+ CF2_Font font;
+
+ /* initial map based on blue zones */
+ struct CF2_HintMapRec_* initialHintMap;
+
+ /* working storage for 2nd pass adjustHints */
+ CF2_ArrStack hintMoves;
+
+ FT_Bool isValid;
+ FT_Bool hinted;
+
+ CF2_Fixed scale;
+ CF2_UInt count;
+
+ /* start search from this index */
+ CF2_UInt lastIndex;
+
+ CF2_HintRec edge[CF2_MAX_HINT_EDGES]; /* 192 */
+
+ } CF2_HintMapRec, *CF2_HintMap;
+
+
+ FT_LOCAL( FT_Bool )
+ cf2_hint_isValid( const CF2_Hint hint );
+ FT_LOCAL( FT_Bool )
+ cf2_hint_isTop( const CF2_Hint hint );
+ FT_LOCAL( FT_Bool )
+ cf2_hint_isBottom( const CF2_Hint hint );
+ FT_LOCAL( void )
+ cf2_hint_lock( CF2_Hint hint );
+
+
+ FT_LOCAL( void )
+ cf2_hintmap_init( CF2_HintMap hintmap,
+ CF2_Font font,
+ CF2_HintMap initialMap,
+ CF2_ArrStack hintMoves,
+ CF2_Fixed scale );
+ FT_LOCAL( void )
+ cf2_hintmap_build( CF2_HintMap hintmap,
+ CF2_ArrStack hStemHintArray,
+ CF2_ArrStack vStemHintArray,
+ CF2_HintMask hintMask,
+ CF2_Fixed hintOrigin,
+ FT_Bool initialMap );
+
+
+ /*
+ * GlyphPath is a wrapper for drawing operations that scales the
+ * coordinates according to the render matrix and HintMap. It also tracks
+ * open paths to control ClosePath and to insert MoveTo for broken fonts.
+ *
+ */
+ typedef struct CF2_GlyphPathRec_
+ {
+ /* TODO: gather some of these into a hinting context */
+
+ CF2_Font font; /* font instance */
+ CF2_OutlineCallbacks callbacks; /* outline consumer */
+
+
+ CF2_HintMapRec hintMap; /* current hint map */
+ CF2_HintMapRec firstHintMap; /* saved copy */
+ CF2_HintMapRec initialHintMap; /* based on all captured hints */
+
+ CF2_ArrStackRec hintMoves; /* list of hint moves for 2nd pass */
+
+ CF2_Fixed scaleX; /* matrix a */
+ CF2_Fixed scaleC; /* matrix c */
+ CF2_Fixed scaleY; /* matrix d */
+
+ FT_Vector fractionalTranslation; /* including deviceXScale */
+#if 0
+ CF2_Fixed hShift; /* character space horizontal shift */
+ /* (for fauxing) */
+#endif
+
+ FT_Bool pathIsOpen; /* true after MoveTo */
+ FT_Bool pathIsClosing; /* true when synthesizing closepath line */
+ FT_Bool darken; /* true if stem darkening */
+ FT_Bool moveIsPending; /* true between MoveTo and offset MoveTo */
+
+ /* references used to call `cf2_hintmap_build', if necessary */
+ CF2_ArrStack hStemHintArray;
+ CF2_ArrStack vStemHintArray;
+ CF2_HintMask hintMask; /* ptr to the current mask */
+ CF2_Fixed hintOriginY; /* copy of current origin */
+ const CF2_BluesRec* blues;
+
+ CF2_Fixed xOffset; /* character space offsets */
+ CF2_Fixed yOffset;
+
+ /* character space miter limit threshold */
+ CF2_Fixed miterLimit;
+ /* vertical/horzizontal snap distance in character space */
+ CF2_Fixed snapThreshold;
+
+ FT_Vector offsetStart0; /* first and second points of first */
+ FT_Vector offsetStart1; /* element with offset applied */
+
+ /* current point, character space, before offset */
+ FT_Vector currentCS;
+ /* current point, device space */
+ FT_Vector currentDS;
+ /* start point of subpath, character space */
+ FT_Vector start;
+
+ /* the following members constitute the `queue' of one element */
+ FT_Bool elemIsQueued;
+ CF2_Int prevElemOp;
+
+ FT_Vector prevElemP0;
+ FT_Vector prevElemP1;
+ FT_Vector prevElemP2;
+ FT_Vector prevElemP3;
+
+ } CF2_GlyphPathRec, *CF2_GlyphPath;
+
+
+ FT_LOCAL( void )
+ cf2_glyphpath_init( CF2_GlyphPath glyphpath,
+ CF2_Font font,
+ CF2_OutlineCallbacks callbacks,
+ CF2_Fixed scaleY,
+ /* CF2_Fixed hShift, */
+ CF2_ArrStack hStemHintArray,
+ CF2_ArrStack vStemHintArray,
+ CF2_HintMask hintMask,
+ CF2_Fixed hintOrigin,
+ const CF2_Blues blues,
+ const FT_Vector* fractionalTranslation );
+ FT_LOCAL( void )
+ cf2_glyphpath_finalize( CF2_GlyphPath glyphpath );
+
+ FT_LOCAL( void )
+ cf2_glyphpath_moveTo( CF2_GlyphPath glyphpath,
+ CF2_Fixed x,
+ CF2_Fixed y );
+ FT_LOCAL( void )
+ cf2_glyphpath_lineTo( CF2_GlyphPath glyphpath,
+ CF2_Fixed x,
+ CF2_Fixed y );
+ FT_LOCAL( void )
+ cf2_glyphpath_curveTo( CF2_GlyphPath glyphpath,
+ CF2_Fixed x1,
+ CF2_Fixed y1,
+ CF2_Fixed x2,
+ CF2_Fixed y2,
+ CF2_Fixed x3,
+ CF2_Fixed y3 );
+ FT_LOCAL( void )
+ cf2_glyphpath_closeOpenPath( CF2_GlyphPath glyphpath );
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2HINTS_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2intrp.c b/src/cff/cf2intrp.c
new file mode 100644
index 0000000..a269606
--- /dev/null
+++ b/src/cff/cf2intrp.c
@@ -0,0 +1,1545 @@
+/***************************************************************************/
+/* */
+/* cf2intrp.c */
+/* */
+/* Adobe's CFF Interpreter (body). */
+/* */
+/* Copyright 2007-2014 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#include "cf2ft.h"
+#include FT_INTERNAL_DEBUG_H
+
+#include "cf2glue.h"
+#include "cf2font.h"
+#include "cf2stack.h"
+#include "cf2hints.h"
+
+#include "cf2error.h"
+
+
+ /*************************************************************************/
+ /* */
+ /* 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_cf2interp
+
+
+ /* some operators are not implemented yet */
+#define CF2_FIXME FT_TRACE4(( "cf2_interpT2CharString:" \
+ " operator not implemented yet\n" ))
+
+
+
+ FT_LOCAL_DEF( void )
+ cf2_hintmask_init( CF2_HintMask hintmask,
+ FT_Error* error )
+ {
+ FT_ZERO( hintmask );
+
+ hintmask->error = error;
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ cf2_hintmask_isValid( const CF2_HintMask hintmask )
+ {
+ return hintmask->isValid;
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ cf2_hintmask_isNew( const CF2_HintMask hintmask )
+ {
+ return hintmask->isNew;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_hintmask_setNew( CF2_HintMask hintmask,
+ FT_Bool val )
+ {
+ hintmask->isNew = val;
+ }
+
+
+ /* clients call `getMaskPtr' in order to iterate */
+ /* through hint mask */
+
+ FT_LOCAL_DEF( FT_Byte* )
+ cf2_hintmask_getMaskPtr( CF2_HintMask hintmask )
+ {
+ return hintmask->mask;
+ }
+
+
+ static size_t
+ cf2_hintmask_setCounts( CF2_HintMask hintmask,
+ size_t bitCount )
+ {
+ if ( bitCount > CF2_MAX_HINTS )
+ {
+ /* total of h and v stems must be <= 96 */
+ CF2_SET_ERROR( hintmask->error, Invalid_Glyph_Format );
+ return 0;
+ }
+
+ hintmask->bitCount = bitCount;
+ hintmask->byteCount = ( hintmask->bitCount + 7 ) / 8;
+
+ hintmask->isValid = TRUE;
+ hintmask->isNew = TRUE;
+
+ return bitCount;
+ }
+
+
+ /* consume the hintmask bytes from the charstring, advancing the src */
+ /* pointer */
+ static void
+ cf2_hintmask_read( CF2_HintMask hintmask,
+ CF2_Buffer charstring,
+ size_t bitCount )
+ {
+ size_t i;
+
+#ifndef CF2_NDEBUG
+ /* these are the bits in the final mask byte that should be zero */
+ /* Note: this variable is only used in an assert expression below */
+ /* and then only if CF2_NDEBUG is not defined */
+ CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1;
+#endif
+
+
+ /* initialize counts and isValid */
+ if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 )
+ return;
+
+ FT_ASSERT( hintmask->byteCount > 0 );
+
+ FT_TRACE4(( " (maskbytes:" ));
+
+ /* set mask and advance interpreter's charstring pointer */
+ for ( i = 0; i < hintmask->byteCount; i++ )
+ {
+ hintmask->mask[i] = (FT_Byte)cf2_buf_readByte( charstring );
+ FT_TRACE4(( " 0x%02X", hintmask->mask[i] ));
+ }
+
+ FT_TRACE4(( ")\n" ));
+
+ /* assert any unused bits in last byte are zero unless there's a prior */
+ /* error */
+ /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */
+#ifndef CF2_NDEBUG
+ FT_ASSERT( ( hintmask->mask[hintmask->byteCount - 1] & mask ) == 0 ||
+ *hintmask->error );
+#endif
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_hintmask_setAll( CF2_HintMask hintmask,
+ size_t bitCount )
+ {
+ size_t i;
+ CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1;
+
+
+ /* initialize counts and isValid */
+ if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 )
+ return;
+
+ FT_ASSERT( hintmask->byteCount > 0 );
+ FT_ASSERT( hintmask->byteCount <
+ sizeof ( hintmask->mask ) / sizeof ( hintmask->mask[0] ) );
+
+ /* set mask to all ones */
+ for ( i = 0; i < hintmask->byteCount; i++ )
+ hintmask->mask[i] = 0xFF;
+
+ /* clear unused bits */
+ /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */
+ hintmask->mask[hintmask->byteCount - 1] &= ~mask;
+ }
+
+
+ /* Type2 charstring opcodes */
+ enum
+ {
+ cf2_cmdRESERVED_0, /* 0 */
+ cf2_cmdHSTEM, /* 1 */
+ cf2_cmdRESERVED_2, /* 2 */
+ cf2_cmdVSTEM, /* 3 */
+ cf2_cmdVMOVETO, /* 4 */
+ cf2_cmdRLINETO, /* 5 */
+ cf2_cmdHLINETO, /* 6 */
+ cf2_cmdVLINETO, /* 7 */
+ cf2_cmdRRCURVETO, /* 8 */
+ cf2_cmdRESERVED_9, /* 9 */
+ cf2_cmdCALLSUBR, /* 10 */
+ cf2_cmdRETURN, /* 11 */
+ cf2_cmdESC, /* 12 */
+ cf2_cmdRESERVED_13, /* 13 */
+ cf2_cmdENDCHAR, /* 14 */
+ cf2_cmdRESERVED_15, /* 15 */
+ cf2_cmdRESERVED_16, /* 16 */
+ cf2_cmdRESERVED_17, /* 17 */
+ cf2_cmdHSTEMHM, /* 18 */
+ cf2_cmdHINTMASK, /* 19 */
+ cf2_cmdCNTRMASK, /* 20 */
+ cf2_cmdRMOVETO, /* 21 */
+ cf2_cmdHMOVETO, /* 22 */
+ cf2_cmdVSTEMHM, /* 23 */
+ cf2_cmdRCURVELINE, /* 24 */
+ cf2_cmdRLINECURVE, /* 25 */
+ cf2_cmdVVCURVETO, /* 26 */
+ cf2_cmdHHCURVETO, /* 27 */
+ cf2_cmdEXTENDEDNMBR, /* 28 */
+ cf2_cmdCALLGSUBR, /* 29 */
+ cf2_cmdVHCURVETO, /* 30 */
+ cf2_cmdHVCURVETO /* 31 */
+ };
+
+ enum
+ {
+ cf2_escDOTSECTION, /* 0 */
+ cf2_escRESERVED_1, /* 1 */
+ cf2_escRESERVED_2, /* 2 */
+ cf2_escAND, /* 3 */
+ cf2_escOR, /* 4 */
+ cf2_escNOT, /* 5 */
+ cf2_escRESERVED_6, /* 6 */
+ cf2_escRESERVED_7, /* 7 */
+ cf2_escRESERVED_8, /* 8 */
+ cf2_escABS, /* 9 */
+ cf2_escADD, /* 10 like otherADD */
+ cf2_escSUB, /* 11 like otherSUB */
+ cf2_escDIV, /* 12 */
+ cf2_escRESERVED_13, /* 13 */
+ cf2_escNEG, /* 14 */
+ cf2_escEQ, /* 15 */
+ cf2_escRESERVED_16, /* 16 */
+ cf2_escRESERVED_17, /* 17 */
+ cf2_escDROP, /* 18 */
+ cf2_escRESERVED_19, /* 19 */
+ cf2_escPUT, /* 20 like otherPUT */
+ cf2_escGET, /* 21 like otherGET */
+ cf2_escIFELSE, /* 22 like otherIFELSE */
+ cf2_escRANDOM, /* 23 like otherRANDOM */
+ cf2_escMUL, /* 24 like otherMUL */
+ cf2_escRESERVED_25, /* 25 */
+ cf2_escSQRT, /* 26 */
+ cf2_escDUP, /* 27 like otherDUP */
+ cf2_escEXCH, /* 28 like otherEXCH */
+ cf2_escINDEX, /* 29 */
+ cf2_escROLL, /* 30 */
+ cf2_escRESERVED_31, /* 31 */
+ cf2_escRESERVED_32, /* 32 */
+ cf2_escRESERVED_33, /* 33 */
+ cf2_escHFLEX, /* 34 */
+ cf2_escFLEX, /* 35 */
+ cf2_escHFLEX1, /* 36 */
+ cf2_escFLEX1 /* 37 */
+ };
+
+
+ /* `stemHintArray' does not change once we start drawing the outline. */
+ static void
+ cf2_doStems( const CF2_Font font,
+ CF2_Stack opStack,
+ CF2_ArrStack stemHintArray,
+ CF2_Fixed* width,
+ FT_Bool* haveWidth,
+ CF2_Fixed hintOffset )
+ {
+ CF2_UInt i;
+ CF2_UInt count = cf2_stack_count( opStack );
+ FT_Bool hasWidthArg = (FT_Bool)( count & 1 );
+
+ /* variable accumulates delta values from operand stack */
+ CF2_Fixed position = hintOffset;
+
+ if ( hasWidthArg && ! *haveWidth )
+ *width = cf2_stack_getReal( opStack, 0 ) +
+ cf2_getNominalWidthX( font->decoder );
+
+ if ( font->decoder->width_only )
+ goto exit;
+
+ for ( i = hasWidthArg ? 1 : 0; i < count; i += 2 )
+ {
+ /* construct a CF2_StemHint and push it onto the list */
+ CF2_StemHintRec stemhint;
+
+
+ stemhint.min =
+ position += cf2_stack_getReal( opStack, i );
+ stemhint.max =
+ position += cf2_stack_getReal( opStack, i + 1 );
+
+ stemhint.used = FALSE;
+ stemhint.maxDS =
+ stemhint.minDS = 0;
+
+ cf2_arrstack_push( stemHintArray, &stemhint ); /* defer error check */
+ }
+
+ cf2_stack_clear( opStack );
+
+ exit:
+ /* cf2_doStems must define a width (may be default) */
+ *haveWidth = TRUE;
+ }
+
+
+ static void
+ cf2_doFlex( CF2_Stack opStack,
+ CF2_Fixed* curX,
+ CF2_Fixed* curY,
+ CF2_GlyphPath glyphPath,
+ const FT_Bool* readFromStack,
+ FT_Bool doConditionalLastRead )
+ {
+ CF2_Fixed vals[14];
+ CF2_UInt index;
+ FT_Bool isHFlex;
+ CF2_Int top, i, j;
+
+
+ vals[0] = *curX;
+ vals[1] = *curY;
+ index = 0;
+ isHFlex = readFromStack[9] == FALSE;
+ top = isHFlex ? 9 : 10;
+
+ for ( i = 0; i < top; i++ )
+ {
+ vals[i + 2] = vals[i];
+ if ( readFromStack[i] )
+ vals[i + 2] += cf2_stack_getReal( opStack, index++ );
+ }
+
+ if ( isHFlex )
+ vals[9 + 2] = *curY;
+
+ if ( doConditionalLastRead )
+ {
+ FT_Bool lastIsX = (FT_Bool)( cf2_fixedAbs( vals[10] - *curX ) >
+ cf2_fixedAbs( vals[11] - *curY ) );
+ CF2_Fixed lastVal = cf2_stack_getReal( opStack, index );
+
+
+ if ( lastIsX )
+ {
+ vals[12] = vals[10] + lastVal;
+ vals[13] = *curY;
+ }
+ else
+ {
+ vals[12] = *curX;
+ vals[13] = vals[11] + lastVal;
+ }
+ }
+ else
+ {
+ if ( readFromStack[10] )
+ vals[12] = vals[10] + cf2_stack_getReal( opStack, index++ );
+ else
+ vals[12] = *curX;
+
+ if ( readFromStack[11] )
+ vals[13] = vals[11] + cf2_stack_getReal( opStack, index );
+ else
+ vals[13] = *curY;
+ }
+
+ for ( j = 0; j < 2; j++ )
+ cf2_glyphpath_curveTo( glyphPath, vals[j * 6 + 2],
+ vals[j * 6 + 3],
+ vals[j * 6 + 4],
+ vals[j * 6 + 5],
+ vals[j * 6 + 6],
+ vals[j * 6 + 7] );
+
+ cf2_stack_clear( opStack );
+
+ *curX = vals[12];
+ *curY = vals[13];
+ }
+
+
+ /*
+ * `error' is a shared error code used by many objects in this
+ * routine. Before the code continues from an error, it must check and
+ * record the error in `*error'. The idea is that this shared
+ * error code will record the first error encountered. If testing
+ * for an error anyway, the cost of `goto exit' is small, so we do it,
+ * even if continuing would be safe. In this case, `lastError' is
+ * set, so the testing and storing can be done in one place, at `exit'.
+ *
+ * Continuing after an error is intended for objects which do their own
+ * testing of `*error', e.g., array stack functions. This allows us to
+ * avoid an extra test after the call.
+ *
+ * Unimplemented opcodes are ignored.
+ *
+ */
+ FT_LOCAL_DEF( void )
+ cf2_interpT2CharString( CF2_Font font,
+ CF2_Buffer buf,
+ CF2_OutlineCallbacks callbacks,
+ const FT_Vector* translation,
+ FT_Bool doingSeac,
+ CF2_Fixed curX,
+ CF2_Fixed curY,
+ CF2_Fixed* width )
+ {
+ /* lastError is used for errors that are immediately tested */
+ FT_Error lastError = FT_Err_Ok;
+
+ /* pointer to parsed font object */
+ CFF_Decoder* decoder = font->decoder;
+
+ FT_Error* error = &font->error;
+ FT_Memory memory = font->memory;
+
+ CF2_Fixed scaleY = font->innerTransform.d;
+ CF2_Fixed nominalWidthX = cf2_getNominalWidthX( decoder );
+
+ /* save this for hinting seac accents */
+ CF2_Fixed hintOriginY = curY;
+
+ CF2_Stack opStack = NULL;
+ FT_Byte op1; /* first opcode byte */
+
+ /* instruction limit; 20,000,000 matches Avalon */
+ FT_UInt32 instructionLimit = 20000000UL;
+
+ CF2_ArrStackRec subrStack;
+
+ FT_Bool haveWidth;
+ CF2_Buffer charstring = NULL;
+
+ CF2_Int charstringIndex = -1; /* initialize to empty */
+
+ /* TODO: placeholders for hint structures */
+
+ /* objects used for hinting */
+ CF2_ArrStackRec hStemHintArray;
+ CF2_ArrStackRec vStemHintArray;
+
+ CF2_HintMaskRec hintMask;
+ CF2_GlyphPathRec glyphPath;
+
+
+ /* initialize the remaining objects */
+ cf2_arrstack_init( &subrStack,
+ memory,
+ error,
+ sizeof ( CF2_BufferRec ) );
+ cf2_arrstack_init( &hStemHintArray,
+ memory,
+ error,
+ sizeof ( CF2_StemHintRec ) );
+ cf2_arrstack_init( &vStemHintArray,
+ memory,
+ error,
+ sizeof ( CF2_StemHintRec ) );
+
+ /* initialize CF2_StemHint arrays */
+ cf2_hintmask_init( &hintMask, error );
+
+ /* initialize path map to manage drawing operations */
+
+ /* Note: last 4 params are used to handle `MoveToPermissive', which */
+ /* may need to call `hintMap.Build' */
+ /* TODO: MoveToPermissive is gone; are these still needed? */
+ cf2_glyphpath_init( &glyphPath,
+ font,
+ callbacks,
+ scaleY,
+ /* hShift, */
+ &hStemHintArray,
+ &vStemHintArray,
+ &hintMask,
+ hintOriginY,
+ &font->blues,
+ translation );
+
+ /*
+ * Initialize state for width parsing. From the CFF Spec:
+ *
+ * The first stack-clearing operator, which must be one of hstem,
+ * hstemhm, vstem, vstemhm, cntrmask, hintmask, hmoveto, vmoveto,
+ * rmoveto, or endchar, takes an additional argument - the width (as
+ * described earlier), which may be expressed as zero or one numeric
+ * argument.
+ *
+ * What we implement here uses the first validly specified width, but
+ * does not detect errors for specifying more than one width.
+ *
+ * If one of the above operators occurs without explicitly specifying
+ * a width, we assume the default width.
+ *
+ */
+ haveWidth = FALSE;
+ *width = cf2_getDefaultWidthX( decoder );
+
+ /*
+ * Note: at this point, all pointers to resources must be NULL
+ * and all local objects must be initialized.
+ * There must be no branches to exit: above this point.
+ *
+ */
+
+ /* allocate an operand stack */
+ opStack = cf2_stack_init( memory, error );
+ if ( !opStack )
+ {
+ lastError = FT_THROW( Out_Of_Memory );
+ goto exit;
+ }
+
+ /* initialize subroutine stack by placing top level charstring as */
+ /* first element (max depth plus one for the charstring) */
+ /* Note: Caller owns and must finalize the first charstring. */
+ /* Our copy of it does not change that requirement. */
+ cf2_arrstack_setCount( &subrStack, CF2_MAX_SUBR + 1 );
+
+ charstring = (CF2_Buffer)cf2_arrstack_getBuffer( &subrStack );
+ *charstring = *buf; /* structure copy */
+
+ charstringIndex = 0; /* entry is valid now */
+
+ /* catch errors so far */
+ if ( *error )
+ goto exit;
+
+ /* main interpreter loop */
+ while ( 1 )
+ {
+ if ( cf2_buf_isEnd( charstring ) )
+ {
+ /* If we've reached the end of the charstring, simulate a */
+ /* cf2_cmdRETURN or cf2_cmdENDCHAR. */
+ if ( charstringIndex )
+ op1 = cf2_cmdRETURN; /* end of buffer for subroutine */
+ else
+ op1 = cf2_cmdENDCHAR; /* end of buffer for top level charstring */
+ }
+ else
+ op1 = (FT_Byte)cf2_buf_readByte( charstring );
+
+ /* check for errors once per loop */
+ if ( *error )
+ goto exit;
+
+ instructionLimit--;
+ if ( instructionLimit == 0 )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit;
+ }
+
+ switch( op1 )
+ {
+ case cf2_cmdRESERVED_0:
+ case cf2_cmdRESERVED_2:
+ case cf2_cmdRESERVED_9:
+ case cf2_cmdRESERVED_13:
+ case cf2_cmdRESERVED_15:
+ case cf2_cmdRESERVED_16:
+ case cf2_cmdRESERVED_17:
+ /* we may get here if we have a prior error */
+ FT_TRACE4(( " unknown op (%d)\n", op1 ));
+ break;
+
+ case cf2_cmdHSTEMHM:
+ case cf2_cmdHSTEM:
+ FT_TRACE4(( op1 == cf2_cmdHSTEMHM ? " hstemhm\n" : " hstem\n" ));
+
+ /* never add hints after the mask is computed */
+ if ( cf2_hintmask_isValid( &hintMask ) )
+ {
+ FT_TRACE4(( "cf2_interpT2CharString:"
+ " invalid horizontal hint mask\n" ));
+ break;
+ }
+
+ cf2_doStems( font,
+ opStack,
+ &hStemHintArray,
+ width,
+ &haveWidth,
+ 0 );
+
+ if ( font->decoder->width_only )
+ goto exit;
+
+ break;
+
+ case cf2_cmdVSTEMHM:
+ case cf2_cmdVSTEM:
+ FT_TRACE4(( op1 == cf2_cmdVSTEMHM ? " vstemhm\n" : " vstem\n" ));
+
+ /* never add hints after the mask is computed */
+ if ( cf2_hintmask_isValid( &hintMask ) )
+ {
+ FT_TRACE4(( "cf2_interpT2CharString:"
+ " invalid vertical hint mask\n" ));
+ break;
+ }
+
+ cf2_doStems( font,
+ opStack,
+ &vStemHintArray,
+ width,
+ &haveWidth,
+ 0 );
+
+ if ( font->decoder->width_only )
+ goto exit;
+
+ break;
+
+ case cf2_cmdVMOVETO:
+ FT_TRACE4(( " vmoveto\n" ));
+
+ if ( cf2_stack_count( opStack ) > 1 && !haveWidth )
+ *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;
+
+ /* width is defined or default after this */
+ haveWidth = TRUE;
+
+ if ( font->decoder->width_only )
+ goto exit;
+
+ curY += cf2_stack_popFixed( opStack );
+
+ cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+
+ break;
+
+ case cf2_cmdRLINETO:
+ {
+ CF2_UInt index;
+ CF2_UInt count = cf2_stack_count( opStack );
+
+
+ FT_TRACE4(( " rlineto\n" ));
+
+ for ( index = 0; index < count; index += 2 )
+ {
+ curX += cf2_stack_getReal( opStack, index + 0 );
+ curY += cf2_stack_getReal( opStack, index + 1 );
+
+ cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdHLINETO:
+ case cf2_cmdVLINETO:
+ {
+ CF2_UInt index;
+ CF2_UInt count = cf2_stack_count( opStack );
+
+ FT_Bool isX = op1 == cf2_cmdHLINETO;
+
+
+ FT_TRACE4(( isX ? " hlineto\n" : " vlineto\n" ));
+
+ for ( index = 0; index < count; index++ )
+ {
+ CF2_Fixed v = cf2_stack_getReal( opStack, index );
+
+
+ if ( isX )
+ curX += v;
+ else
+ curY += v;
+
+ isX = !isX;
+
+ cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue;
+
+ case cf2_cmdRCURVELINE:
+ case cf2_cmdRRCURVETO:
+ {
+ CF2_UInt count = cf2_stack_count( opStack );
+ CF2_UInt index = 0;
+
+
+ FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? " rcurveline\n"
+ : " rrcurveto\n" ));
+
+ while ( index + 6 <= count )
+ {
+ CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
+ CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY;
+ CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1;
+ CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1;
+ CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
+ CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2;
+
+
+ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+
+ curX = x3;
+ curY = y3;
+ index += 6;
+ }
+
+ if ( op1 == cf2_cmdRCURVELINE )
+ {
+ curX += cf2_stack_getReal( opStack, index + 0 );
+ curY += cf2_stack_getReal( opStack, index + 1 );
+
+ cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdCALLGSUBR:
+ case cf2_cmdCALLSUBR:
+ {
+ CF2_UInt subrIndex;
+
+
+ FT_TRACE4(( op1 == cf2_cmdCALLGSUBR ? " callgsubr"
+ : " callsubr" ));
+
+ if ( charstringIndex > CF2_MAX_SUBR )
+ {
+ /* max subr plus one for charstring */
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* overflow of stack */
+ }
+
+ /* push our current CFF charstring region on subrStack */
+ charstring = (CF2_Buffer)
+ cf2_arrstack_getPointer( &subrStack,
+ charstringIndex + 1 );
+
+ /* set up the new CFF region and pointer */
+ subrIndex = cf2_stack_popInt( opStack );
+
+ switch ( op1 )
+ {
+ case cf2_cmdCALLGSUBR:
+ FT_TRACE4(( "(%d)\n", subrIndex + decoder->globals_bias ));
+
+ if ( cf2_initGlobalRegionBuffer( decoder,
+ subrIndex,
+ charstring ) )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* subroutine lookup or stream error */
+ }
+ break;
+
+ default:
+ /* cf2_cmdCALLSUBR */
+ FT_TRACE4(( "(%d)\n", subrIndex + decoder->locals_bias ));
+
+ if ( cf2_initLocalRegionBuffer( decoder,
+ subrIndex,
+ charstring ) )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* subroutine lookup or stream error */
+ }
+ }
+
+ charstringIndex += 1; /* entry is valid now */
+ }
+ continue; /* do not clear the stack */
+
+ case cf2_cmdRETURN:
+ FT_TRACE4(( " return\n" ));
+
+ if ( charstringIndex < 1 )
+ {
+ /* Note: cannot return from top charstring */
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* underflow of stack */
+ }
+
+ /* restore position in previous charstring */
+ charstring = (CF2_Buffer)
+ cf2_arrstack_getPointer( &subrStack,
+ --charstringIndex );
+ continue; /* do not clear the stack */
+
+ case cf2_cmdESC:
+ {
+ FT_Byte op2 = (FT_Byte)cf2_buf_readByte( charstring );
+
+
+ switch ( op2 )
+ {
+ case cf2_escDOTSECTION:
+ /* something about `flip type of locking' -- ignore it */
+ FT_TRACE4(( " dotsection\n" ));
+
+ break;
+
+ /* TODO: should these operators be supported? */
+ case cf2_escAND: /* in spec */
+ FT_TRACE4(( " and\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escOR: /* in spec */
+ FT_TRACE4(( " or\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escNOT: /* in spec */
+ FT_TRACE4(( " not\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escABS: /* in spec */
+ FT_TRACE4(( " abs\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escADD: /* in spec */
+ FT_TRACE4(( " add\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escSUB: /* in spec */
+ FT_TRACE4(( " sub\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escDIV: /* in spec */
+ FT_TRACE4(( " div\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escNEG: /* in spec */
+ FT_TRACE4(( " neg\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escEQ: /* in spec */
+ FT_TRACE4(( " eq\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escDROP: /* in spec */
+ FT_TRACE4(( " drop\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escPUT: /* in spec */
+ FT_TRACE4(( " put\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escGET: /* in spec */
+ FT_TRACE4(( " get\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escIFELSE: /* in spec */
+ FT_TRACE4(( " ifelse\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escRANDOM: /* in spec */
+ FT_TRACE4(( " random\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escMUL: /* in spec */
+ FT_TRACE4(( " mul\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escSQRT: /* in spec */
+ FT_TRACE4(( " sqrt\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escDUP: /* in spec */
+ FT_TRACE4(( " dup\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escEXCH: /* in spec */
+ FT_TRACE4(( " exch\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escINDEX: /* in spec */
+ FT_TRACE4(( " index\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escROLL: /* in spec */
+ FT_TRACE4(( " roll\n" ));
+
+ CF2_FIXME;
+ break;
+
+ case cf2_escHFLEX:
+ {
+ static const FT_Bool readFromStack[12] =
+ {
+ TRUE /* dx1 */, FALSE /* dy1 */,
+ TRUE /* dx2 */, TRUE /* dy2 */,
+ TRUE /* dx3 */, FALSE /* dy3 */,
+ TRUE /* dx4 */, FALSE /* dy4 */,
+ TRUE /* dx5 */, FALSE /* dy5 */,
+ TRUE /* dx6 */, FALSE /* dy6 */
+ };
+
+
+ FT_TRACE4(( " hflex\n" ));
+
+ cf2_doFlex( opStack,
+ &curX,
+ &curY,
+ &glyphPath,
+ readFromStack,
+ FALSE /* doConditionalLastRead */ );
+ }
+ continue;
+
+ case cf2_escFLEX:
+ {
+ static const FT_Bool readFromStack[12] =
+ {
+ TRUE /* dx1 */, TRUE /* dy1 */,
+ TRUE /* dx2 */, TRUE /* dy2 */,
+ TRUE /* dx3 */, TRUE /* dy3 */,
+ TRUE /* dx4 */, TRUE /* dy4 */,
+ TRUE /* dx5 */, TRUE /* dy5 */,
+ TRUE /* dx6 */, TRUE /* dy6 */
+ };
+
+
+ FT_TRACE4(( " flex\n" ));
+
+ cf2_doFlex( opStack,
+ &curX,
+ &curY,
+ &glyphPath,
+ readFromStack,
+ FALSE /* doConditionalLastRead */ );
+ }
+ break; /* TODO: why is this not a continue? */
+
+ case cf2_escHFLEX1:
+ {
+ static const FT_Bool readFromStack[12] =
+ {
+ TRUE /* dx1 */, TRUE /* dy1 */,
+ TRUE /* dx2 */, TRUE /* dy2 */,
+ TRUE /* dx3 */, FALSE /* dy3 */,
+ TRUE /* dx4 */, FALSE /* dy4 */,
+ TRUE /* dx5 */, TRUE /* dy5 */,
+ TRUE /* dx6 */, FALSE /* dy6 */
+ };
+
+
+ FT_TRACE4(( " hflex1\n" ));
+
+ cf2_doFlex( opStack,
+ &curX,
+ &curY,
+ &glyphPath,
+ readFromStack,
+ FALSE /* doConditionalLastRead */ );
+ }
+ continue;
+
+ case cf2_escFLEX1:
+ {
+ static const FT_Bool readFromStack[12] =
+ {
+ TRUE /* dx1 */, TRUE /* dy1 */,
+ TRUE /* dx2 */, TRUE /* dy2 */,
+ TRUE /* dx3 */, TRUE /* dy3 */,
+ TRUE /* dx4 */, TRUE /* dy4 */,
+ TRUE /* dx5 */, TRUE /* dy5 */,
+ FALSE /* dx6 */, FALSE /* dy6 */
+ };
+
+
+ FT_TRACE4(( " flex1\n" ));
+
+ cf2_doFlex( opStack,
+ &curX,
+ &curY,
+ &glyphPath,
+ readFromStack,
+ TRUE /* doConditionalLastRead */ );
+ }
+ continue;
+
+ case cf2_escRESERVED_1:
+ case cf2_escRESERVED_2:
+ case cf2_escRESERVED_6:
+ case cf2_escRESERVED_7:
+ case cf2_escRESERVED_8:
+ case cf2_escRESERVED_13:
+ case cf2_escRESERVED_16:
+ case cf2_escRESERVED_17:
+ case cf2_escRESERVED_19:
+ case cf2_escRESERVED_25:
+ case cf2_escRESERVED_31:
+ case cf2_escRESERVED_32:
+ case cf2_escRESERVED_33:
+ default:
+ FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+
+ }; /* end of switch statement checking `op2' */
+
+ } /* case cf2_cmdESC */
+ break;
+
+ case cf2_cmdENDCHAR:
+ FT_TRACE4(( " endchar\n" ));
+
+ if ( cf2_stack_count( opStack ) == 1 ||
+ cf2_stack_count( opStack ) == 5 )
+ {
+ if ( !haveWidth )
+ *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;
+ }
+
+ /* width is defined or default after this */
+ haveWidth = TRUE;
+
+ if ( font->decoder->width_only )
+ goto exit;
+
+ /* close path if still open */
+ cf2_glyphpath_closeOpenPath( &glyphPath );
+
+ if ( cf2_stack_count( opStack ) > 1 )
+ {
+ /* must be either 4 or 5 -- */
+ /* this is a (deprecated) implied `seac' operator */
+
+ CF2_UInt achar;
+ CF2_UInt bchar;
+ CF2_BufferRec component;
+ CF2_Fixed dummyWidth; /* ignore component width */
+ FT_Error error2;
+
+
+ if ( doingSeac )
+ {
+ lastError = FT_THROW( Invalid_Glyph_Format );
+ goto exit; /* nested seac */
+ }
+
+ achar = cf2_stack_popInt( opStack );
+ bchar = cf2_stack_popInt( opStack );
+
+ curY = cf2_stack_popFixed( opStack );
+ curX = cf2_stack_popFixed( opStack );
+
+ error2 = cf2_getSeacComponent( decoder, achar, &component );
+ if ( error2 )
+ {
+ lastError = error2; /* pass FreeType error through */
+ goto exit;
+ }
+ cf2_interpT2CharString( font,
+ &component,
+ callbacks,
+ translation,
+ TRUE,
+ curX,
+ curY,
+ &dummyWidth );
+ cf2_freeSeacComponent( decoder, &component );
+
+ error2 = cf2_getSeacComponent( decoder, bchar, &component );
+ if ( error2 )
+ {
+ lastError = error2; /* pass FreeType error through */
+ goto exit;
+ }
+ cf2_interpT2CharString( font,
+ &component,
+ callbacks,
+ translation,
+ TRUE,
+ 0,
+ 0,
+ &dummyWidth );
+ cf2_freeSeacComponent( decoder, &component );
+ }
+ goto exit;
+
+ case cf2_cmdCNTRMASK:
+ case cf2_cmdHINTMASK:
+ /* the final \n in the tracing message gets added in */
+ /* `cf2_hintmask_read' (which also traces the mask bytes) */
+ FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" ));
+
+ /* never add hints after the mask is computed */
+ if ( cf2_stack_count( opStack ) > 1 &&
+ cf2_hintmask_isValid( &hintMask ) )
+ {
+ FT_TRACE4(( "cf2_interpT2CharString: invalid hint mask\n" ));
+ break;
+ }
+
+ /* if there are arguments on the stack, there this is an */
+ /* implied cf2_cmdVSTEMHM */
+ cf2_doStems( font,
+ opStack,
+ &vStemHintArray,
+ width,
+ &haveWidth,
+ 0 );
+
+ if ( font->decoder->width_only )
+ goto exit;
+
+ if ( op1 == cf2_cmdHINTMASK )
+ {
+ /* consume the hint mask bytes which follow the operator */
+ cf2_hintmask_read( &hintMask,
+ charstring,
+ cf2_arrstack_size( &hStemHintArray ) +
+ cf2_arrstack_size( &vStemHintArray ) );
+ }
+ else
+ {
+ /*
+ * Consume the counter mask bytes which follow the operator:
+ * Build a temporary hint map, just to place and lock those
+ * stems participating in the counter mask. These are most
+ * likely the dominant hstems, and are grouped together in a
+ * few counter groups, not necessarily in correspondence
+ * with the hint groups. This reduces the chances of
+ * conflicts between hstems that are initially placed in
+ * separate hint groups and then brought together. The
+ * positions are copied back to `hStemHintArray', so we can
+ * discard `counterMask' and `counterHintMap'.
+ *
+ */
+ CF2_HintMapRec counterHintMap;
+ CF2_HintMaskRec counterMask;
+
+
+ cf2_hintmap_init( &counterHintMap,
+ font,
+ &glyphPath.initialHintMap,
+ &glyphPath.hintMoves,
+ scaleY );
+ cf2_hintmask_init( &counterMask, error );
+
+ cf2_hintmask_read( &counterMask,
+ charstring,
+ cf2_arrstack_size( &hStemHintArray ) +
+ cf2_arrstack_size( &vStemHintArray ) );
+ cf2_hintmap_build( &counterHintMap,
+ &hStemHintArray,
+ &vStemHintArray,
+ &counterMask,
+ 0,
+ FALSE );
+ }
+ break;
+
+ case cf2_cmdRMOVETO:
+ FT_TRACE4(( " rmoveto\n" ));
+
+ if ( cf2_stack_count( opStack ) > 2 && !haveWidth )
+ *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;
+
+ /* width is defined or default after this */
+ haveWidth = TRUE;
+
+ if ( font->decoder->width_only )
+ goto exit;
+
+ curY += cf2_stack_popFixed( opStack );
+ curX += cf2_stack_popFixed( opStack );
+
+ cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+
+ break;
+
+ case cf2_cmdHMOVETO:
+ FT_TRACE4(( " hmoveto\n" ));
+
+ if ( cf2_stack_count( opStack ) > 1 && !haveWidth )
+ *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;
+
+ /* width is defined or default after this */
+ haveWidth = TRUE;
+
+ if ( font->decoder->width_only )
+ goto exit;
+
+ curX += cf2_stack_popFixed( opStack );
+
+ cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+
+ break;
+
+ case cf2_cmdRLINECURVE:
+ {
+ CF2_UInt count = cf2_stack_count( opStack );
+ CF2_UInt index = 0;
+
+
+ FT_TRACE4(( " rlinecurve\n" ));
+
+ while ( index + 6 < count )
+ {
+ curX += cf2_stack_getReal( opStack, index + 0 );
+ curY += cf2_stack_getReal( opStack, index + 1 );
+
+ cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+ index += 2;
+ }
+
+ while ( index < count )
+ {
+ CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
+ CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY;
+ CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1;
+ CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1;
+ CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
+ CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2;
+
+
+ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+
+ curX = x3;
+ curY = y3;
+ index += 6;
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdVVCURVETO:
+ {
+ CF2_UInt count = cf2_stack_count( opStack );
+ CF2_UInt index = 0;
+
+
+ FT_TRACE4(( " vvcurveto\n" ));
+
+ while ( index < count )
+ {
+ CF2_Fixed x1, y1, x2, y2, x3, y3;
+
+
+ if ( ( count - index ) & 1 )
+ {
+ x1 = cf2_stack_getReal( opStack, index ) + curX;
+
+ ++index;
+ }
+ else
+ x1 = curX;
+
+ y1 = cf2_stack_getReal( opStack, index + 0 ) + curY;
+ x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
+ y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
+ x3 = x2;
+ y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;
+
+ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+
+ curX = x3;
+ curY = y3;
+ index += 4;
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdHHCURVETO:
+ {
+ CF2_UInt count = cf2_stack_count( opStack );
+ CF2_UInt index = 0;
+
+
+ FT_TRACE4(( " hhcurveto\n" ));
+
+ while ( index < count )
+ {
+ CF2_Fixed x1, y1, x2, y2, x3, y3;
+
+
+ if ( ( count - index ) & 1 )
+ {
+ y1 = cf2_stack_getReal( opStack, index ) + curY;
+
+ ++index;
+ }
+ else
+ y1 = curY;
+
+ x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
+ x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
+ y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
+ x3 = cf2_stack_getReal( opStack, index + 3 ) + x2;
+ y3 = y2;
+
+ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+
+ curX = x3;
+ curY = y3;
+ index += 4;
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdVHCURVETO:
+ case cf2_cmdHVCURVETO:
+ {
+ CF2_UInt count = cf2_stack_count( opStack );
+ CF2_UInt index = 0;
+
+ FT_Bool alternate = op1 == cf2_cmdHVCURVETO;
+
+
+ FT_TRACE4(( alternate ? " hvcurveto\n" : " vhcurveto\n" ));
+
+ while ( index < count )
+ {
+ CF2_Fixed x1, x2, x3, y1, y2, y3;
+
+
+ if ( alternate )
+ {
+ x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
+ y1 = curY;
+ x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
+ y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
+ y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;
+
+ if ( count - index == 5 )
+ {
+ x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
+
+ ++index;
+ }
+ else
+ x3 = x2;
+
+ alternate = FALSE;
+ }
+ else
+ {
+ x1 = curX;
+ y1 = cf2_stack_getReal( opStack, index + 0 ) + curY;
+ x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
+ y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
+ x3 = cf2_stack_getReal( opStack, index + 3 ) + x2;
+
+ if ( count - index == 5 )
+ {
+ y3 = cf2_stack_getReal( opStack, index + 4 ) + y2;
+
+ ++index;
+ }
+ else
+ y3 = y2;
+
+ alternate = TRUE;
+ }
+
+ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+
+ curX = x3;
+ curY = y3;
+ index += 4;
+ }
+
+ cf2_stack_clear( opStack );
+ }
+ continue; /* no need to clear stack again */
+
+ case cf2_cmdEXTENDEDNMBR:
+ {
+ CF2_Int v;
+
+
+ v = (FT_Short)( ( cf2_buf_readByte( charstring ) << 8 ) |
+ cf2_buf_readByte( charstring ) );
+
+ FT_TRACE4(( " %d", v ));
+
+ cf2_stack_pushInt( opStack, v );
+ }
+ continue;
+
+ default:
+ /* numbers */
+ {
+ if ( /* op1 >= 32 && */ op1 <= 246 )
+ {
+ CF2_Int v;
+
+
+ v = op1 - 139;
+
+ FT_TRACE4(( " %d", v ));
+
+ /* -107 .. 107 */
+ cf2_stack_pushInt( opStack, v );
+ }
+
+ else if ( /* op1 >= 247 && */ op1 <= 250 )
+ {
+ CF2_Int v;
+
+
+ v = op1;
+ v -= 247;
+ v *= 256;
+ v += cf2_buf_readByte( charstring );
+ v += 108;
+
+ FT_TRACE4(( " %d", v ));
+
+ /* 108 .. 1131 */
+ cf2_stack_pushInt( opStack, v );
+ }
+
+ else if ( /* op1 >= 251 && */ op1 <= 254 )
+ {
+ CF2_Int v;
+
+
+ v = op1;
+ v -= 251;
+ v *= 256;
+ v += cf2_buf_readByte( charstring );
+ v = -v - 108;
+
+ FT_TRACE4(( " %d", v ));
+
+ /* -1131 .. -108 */
+ cf2_stack_pushInt( opStack, v );
+ }
+
+ else /* op1 == 255 */
+ {
+ CF2_Fixed v;
+
+
+ v = (CF2_Fixed)
+ ( ( (FT_UInt32)cf2_buf_readByte( charstring ) << 24 ) |
+ ( (FT_UInt32)cf2_buf_readByte( charstring ) << 16 ) |
+ ( (FT_UInt32)cf2_buf_readByte( charstring ) << 8 ) |
+ (FT_UInt32)cf2_buf_readByte( charstring ) );
+
+ FT_TRACE4(( " %.2f", v / 65536.0 ));
+
+ cf2_stack_pushFixed( opStack, v );
+ }
+ }
+ continue; /* don't clear stack */
+
+ } /* end of switch statement checking `op1' */
+
+ cf2_stack_clear( opStack );
+
+ } /* end of main interpreter loop */
+
+ /* we get here if the charstring ends without cf2_cmdENDCHAR */
+ FT_TRACE4(( "cf2_interpT2CharString:"
+ " charstring ends without ENDCHAR\n" ));
+
+ exit:
+ /* check whether last error seen is also the first one */
+ cf2_setError( error, lastError );
+
+ /* free resources from objects we've used */
+ cf2_glyphpath_finalize( &glyphPath );
+ cf2_arrstack_finalize( &vStemHintArray );
+ cf2_arrstack_finalize( &hStemHintArray );
+ cf2_arrstack_finalize( &subrStack );
+ cf2_stack_free( opStack );
+
+ FT_TRACE4(( "\n" ));
+
+ return;
+ }
+
+
+/* END */
diff --git a/src/cff/cf2intrp.h b/src/cff/cf2intrp.h
new file mode 100644
index 0000000..b5d8947
--- /dev/null
+++ b/src/cff/cf2intrp.h
@@ -0,0 +1,83 @@
+/***************************************************************************/
+/* */
+/* cf2font.h */
+/* */
+/* Adobe's CFF Interpreter (specification). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2INTRP_H__
+#define __CF2INTRP_H__
+
+
+#include "cf2ft.h"
+#include "cf2hints.h"
+
+
+FT_BEGIN_HEADER
+
+
+ FT_LOCAL( void )
+ cf2_hintmask_init( CF2_HintMask hintmask,
+ FT_Error* error );
+ FT_LOCAL( FT_Bool )
+ cf2_hintmask_isValid( const CF2_HintMask hintmask );
+ FT_LOCAL( FT_Bool )
+ cf2_hintmask_isNew( const CF2_HintMask hintmask );
+ FT_LOCAL( void )
+ cf2_hintmask_setNew( CF2_HintMask hintmask,
+ FT_Bool val );
+ FT_LOCAL( FT_Byte* )
+ cf2_hintmask_getMaskPtr( CF2_HintMask hintmask );
+ FT_LOCAL( void )
+ cf2_hintmask_setAll( CF2_HintMask hintmask,
+ size_t bitCount );
+
+ FT_LOCAL( void )
+ cf2_interpT2CharString( CF2_Font font,
+ CF2_Buffer charstring,
+ CF2_OutlineCallbacks callbacks,
+ const FT_Vector* translation,
+ FT_Bool doingSeac,
+ CF2_Fixed curX,
+ CF2_Fixed curY,
+ CF2_Fixed* width );
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2INTRP_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2read.c b/src/cff/cf2read.c
new file mode 100644
index 0000000..2b429e3
--- /dev/null
+++ b/src/cff/cf2read.c
@@ -0,0 +1,112 @@
+/***************************************************************************/
+/* */
+/* cf2read.c */
+/* */
+/* Adobe's code for stream handling (body). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#include "cf2ft.h"
+#include FT_INTERNAL_DEBUG_H
+
+#include "cf2glue.h"
+
+#include "cf2error.h"
+
+
+ /* Define CF2_IO_FAIL as 1 to enable random errors and random */
+ /* value errors in I/O. */
+#define CF2_IO_FAIL 0
+
+
+#if CF2_IO_FAIL
+
+ /* set the .00 value to a nonzero probability */
+ static int
+ randomError2( void )
+ {
+ /* for region buffer ReadByte (interp) function */
+ return (double)rand() / RAND_MAX < .00;
+ }
+
+ /* set the .00 value to a nonzero probability */
+ static CF2_Int
+ randomValue()
+ {
+ return (double)rand() / RAND_MAX < .00 ? rand() : 0;
+ }
+
+#endif /* CF2_IO_FAIL */
+
+
+ /* Region Buffer */
+ /* */
+ /* Can be constructed from a copied buffer managed by */
+ /* `FCM_getDatablock'. */
+ /* Reads bytes with check for end of buffer. */
+
+ /* reading past the end of the buffer sets error and returns zero */
+ FT_LOCAL_DEF( CF2_Int )
+ cf2_buf_readByte( CF2_Buffer buf )
+ {
+ if ( buf->ptr < buf->end )
+ {
+#if CF2_IO_FAIL
+ if ( randomError2() )
+ {
+ CF2_SET_ERROR( buf->error, Invalid_Stream_Operation );
+ return 0;
+ }
+
+ return *(buf->ptr)++ + randomValue();
+#else
+ return *(buf->ptr)++;
+#endif
+ }
+ else
+ {
+ CF2_SET_ERROR( buf->error, Invalid_Stream_Operation );
+ return 0;
+ }
+ }
+
+
+ /* note: end condition can occur without error */
+ FT_LOCAL_DEF( FT_Bool )
+ cf2_buf_isEnd( CF2_Buffer buf )
+ {
+ return (FT_Bool)( buf->ptr >= buf->end );
+ }
+
+
+/* END */
diff --git a/src/cff/cf2read.h b/src/cff/cf2read.h
new file mode 100644
index 0000000..7ef7c8c
--- /dev/null
+++ b/src/cff/cf2read.h
@@ -0,0 +1,68 @@
+/***************************************************************************/
+/* */
+/* cf2read.h */
+/* */
+/* Adobe's code for stream handling (specification). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2READ_H__
+#define __CF2READ_H__
+
+
+FT_BEGIN_HEADER
+
+
+ typedef struct CF2_BufferRec_
+ {
+ FT_Error* error;
+ const FT_Byte* start;
+ const FT_Byte* end;
+ const FT_Byte* ptr;
+
+ } CF2_BufferRec, *CF2_Buffer;
+
+
+ FT_LOCAL( CF2_Int )
+ cf2_buf_readByte( CF2_Buffer buf );
+ FT_LOCAL( FT_Bool )
+ cf2_buf_isEnd( CF2_Buffer buf );
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2READ_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2stack.c b/src/cff/cf2stack.c
new file mode 100644
index 0000000..8332b5d
--- /dev/null
+++ b/src/cff/cf2stack.c
@@ -0,0 +1,205 @@
+/***************************************************************************/
+/* */
+/* cf2stack.c */
+/* */
+/* Adobe's code for emulating a CFF stack (body). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#include "cf2ft.h"
+#include FT_INTERNAL_DEBUG_H
+
+#include "cf2glue.h"
+#include "cf2font.h"
+#include "cf2stack.h"
+
+#include "cf2error.h"
+
+
+ /* Allocate and initialize an instance of CF2_Stack. */
+ /* Note: This function returns NULL on error (does not set */
+ /* `error'). */
+ FT_LOCAL_DEF( CF2_Stack )
+ cf2_stack_init( FT_Memory memory,
+ FT_Error* e )
+ {
+ FT_Error error = FT_Err_Ok; /* for FT_QNEW */
+
+ CF2_Stack stack = NULL;
+
+
+ if ( !FT_QNEW( stack ) )
+ {
+ /* initialize the structure; FT_QNEW zeroes it */
+ stack->memory = memory;
+ stack->error = e;
+ stack->top = &stack->buffer[0]; /* empty stack */
+ }
+
+ return stack;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_stack_free( CF2_Stack stack )
+ {
+ if ( stack )
+ {
+ FT_Memory memory = stack->memory;
+
+
+ /* free the main structure */
+ FT_FREE( stack );
+ }
+ }
+
+
+ FT_LOCAL_DEF( CF2_UInt )
+ cf2_stack_count( CF2_Stack stack )
+ {
+ return (CF2_UInt)( stack->top - &stack->buffer[0] );
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_stack_pushInt( CF2_Stack stack,
+ CF2_Int val )
+ {
+ if ( stack->top == &stack->buffer[CF2_OPERAND_STACK_SIZE] )
+ {
+ CF2_SET_ERROR( stack->error, Stack_Overflow );
+ return; /* stack overflow */
+ }
+
+ stack->top->u.i = val;
+ stack->top->type = CF2_NumberInt;
+ ++stack->top;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_stack_pushFixed( CF2_Stack stack,
+ CF2_Fixed val )
+ {
+ if ( stack->top == &stack->buffer[CF2_OPERAND_STACK_SIZE] )
+ {
+ CF2_SET_ERROR( stack->error, Stack_Overflow );
+ return; /* stack overflow */
+ }
+
+ stack->top->u.r = val;
+ stack->top->type = CF2_NumberFixed;
+ ++stack->top;
+ }
+
+
+ /* this function is only allowed to pop an integer type */
+ FT_LOCAL_DEF( CF2_Int )
+ cf2_stack_popInt( CF2_Stack stack )
+ {
+ if ( stack->top == &stack->buffer[0] )
+ {
+ CF2_SET_ERROR( stack->error, Stack_Underflow );
+ return 0; /* underflow */
+ }
+ if ( stack->top[-1].type != CF2_NumberInt )
+ {
+ CF2_SET_ERROR( stack->error, Syntax_Error );
+ return 0; /* type mismatch */
+ }
+
+ --stack->top;
+
+ return stack->top->u.i;
+ }
+
+
+ /* Note: type mismatch is silently cast */
+ /* TODO: check this */
+ FT_LOCAL_DEF( CF2_Fixed )
+ cf2_stack_popFixed( CF2_Stack stack )
+ {
+ if ( stack->top == &stack->buffer[0] )
+ {
+ CF2_SET_ERROR( stack->error, Stack_Underflow );
+ return cf2_intToFixed( 0 ); /* underflow */
+ }
+
+ --stack->top;
+
+ switch ( stack->top->type )
+ {
+ case CF2_NumberInt:
+ return cf2_intToFixed( stack->top->u.i );
+ case CF2_NumberFrac:
+ return cf2_fracToFixed( stack->top->u.f );
+ default:
+ return stack->top->u.r;
+ }
+ }
+
+
+ /* Note: type mismatch is silently cast */
+ /* TODO: check this */
+ FT_LOCAL_DEF( CF2_Fixed )
+ cf2_stack_getReal( CF2_Stack stack,
+ CF2_UInt idx )
+ {
+ FT_ASSERT( cf2_stack_count( stack ) <= CF2_OPERAND_STACK_SIZE );
+
+ if ( idx >= cf2_stack_count( stack ) )
+ {
+ CF2_SET_ERROR( stack->error, Stack_Overflow );
+ return cf2_intToFixed( 0 ); /* bounds error */
+ }
+
+ switch ( stack->buffer[idx].type )
+ {
+ case CF2_NumberInt:
+ return cf2_intToFixed( stack->buffer[idx].u.i );
+ case CF2_NumberFrac:
+ return cf2_fracToFixed( stack->buffer[idx].u.f );
+ default:
+ return stack->buffer[idx].u.r;
+ }
+ }
+
+
+ FT_LOCAL_DEF( void )
+ cf2_stack_clear( CF2_Stack stack )
+ {
+ stack->top = &stack->buffer[0];
+ }
+
+
+/* END */
diff --git a/src/cff/cf2stack.h b/src/cff/cf2stack.h
new file mode 100644
index 0000000..7d6d196
--- /dev/null
+++ b/src/cff/cf2stack.h
@@ -0,0 +1,106 @@
+/***************************************************************************/
+/* */
+/* cf2stack.h */
+/* */
+/* Adobe's code for emulating a CFF stack (specification). */
+/* */
+/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2STACK_H__
+#define __CF2STACK_H__
+
+
+FT_BEGIN_HEADER
+
+
+ /* CFF operand stack; specified maximum of 48 or 192 values */
+ typedef struct CF2_StackNumber_
+ {
+ union
+ {
+ CF2_Fixed r; /* 16.16 fixed point */
+ CF2_Frac f; /* 2.30 fixed point (for font matrix) */
+ CF2_Int i;
+ } u;
+
+ CF2_NumberType type;
+
+ } CF2_StackNumber;
+
+
+ typedef struct CF2_StackRec_
+ {
+ FT_Memory memory;
+ FT_Error* error;
+ CF2_StackNumber buffer[CF2_OPERAND_STACK_SIZE];
+ CF2_StackNumber* top;
+
+ } CF2_StackRec, *CF2_Stack;
+
+
+ FT_LOCAL( CF2_Stack )
+ cf2_stack_init( FT_Memory memory,
+ FT_Error* error );
+ FT_LOCAL( void )
+ cf2_stack_free( CF2_Stack stack );
+
+ FT_LOCAL( CF2_UInt )
+ cf2_stack_count( CF2_Stack stack );
+
+ FT_LOCAL( void )
+ cf2_stack_pushInt( CF2_Stack stack,
+ CF2_Int val );
+ FT_LOCAL( void )
+ cf2_stack_pushFixed( CF2_Stack stack,
+ CF2_Fixed val );
+
+ FT_LOCAL( CF2_Int )
+ cf2_stack_popInt( CF2_Stack stack );
+ FT_LOCAL( CF2_Fixed )
+ cf2_stack_popFixed( CF2_Stack stack );
+
+ FT_LOCAL( CF2_Fixed )
+ cf2_stack_getReal( CF2_Stack stack,
+ CF2_UInt idx );
+
+ FT_LOCAL( void )
+ cf2_stack_clear( CF2_Stack stack );
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2STACK_H__ */
+
+
+/* END */
diff --git a/src/cff/cf2types.h b/src/cff/cf2types.h
new file mode 100644
index 0000000..ac6a022
--- /dev/null
+++ b/src/cff/cf2types.h
@@ -0,0 +1,78 @@
+/***************************************************************************/
+/* */
+/* cf2types.h */
+/* */
+/* Adobe's code for defining data types (specification only). */
+/* */
+/* Copyright 2011-2013 Adobe Systems Incorporated. */
+/* */
+/* This software, and all works of authorship, whether in source or */
+/* object code form as indicated by the copyright notice(s) included */
+/* herein (collectively, the "Work") is made available, and may only be */
+/* used, modified, and distributed under the FreeType Project License, */
+/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
+/* FreeType Project License, each contributor to the Work hereby grants */
+/* to any individual or legal entity exercising permissions granted by */
+/* the FreeType Project License and this section (hereafter, "You" or */
+/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
+/* royalty-free, irrevocable (except as stated in this section) patent */
+/* license to make, have made, use, offer to sell, sell, import, and */
+/* otherwise transfer the Work, where such license applies only to those */
+/* patent claims licensable by such contributor that are necessarily */
+/* infringed by their contribution(s) alone or by combination of their */
+/* contribution(s) with the Work to which such contribution(s) was */
+/* submitted. If You institute patent litigation against any entity */
+/* (including a cross-claim or counterclaim in a lawsuit) alleging that */
+/* the Work or a contribution incorporated within the Work constitutes */
+/* direct or contributory patent infringement, then any patent licenses */
+/* granted to You under this License for that Work shall terminate as of */
+/* the date such litigation is filed. */
+/* */
+/* By using, modifying, or distributing the Work you indicate that you */
+/* have read and understood the terms and conditions of the */
+/* FreeType Project License as well as those provided in this section, */
+/* and you accept them fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CF2TYPES_H__
+#define __CF2TYPES_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+ /*
+ * The data models that we expect to support are as follows:
+ *
+ * name char short int long long-long pointer example
+ * -----------------------------------------------------
+ * ILP32 8 16 32 32 64* 32 32-bit MacOS, x86
+ * LLP64 8 16 32 32 64 64 x64
+ * LP64 8 16 32 64 64 64 64-bit MacOS
+ *
+ * *) type may be supported by emulation on a 32-bit architecture
+ *
+ */
+
+
+ /* integers at least 32 bits wide */
+#define CF2_UInt FT_UFast
+#define CF2_Int FT_Fast
+
+
+ /* fixed-float numbers */
+ typedef FT_Int32 CF2_F16Dot16;
+
+
+FT_END_HEADER
+
+
+#endif /* __CF2TYPES_H__ */
+
+
+/* END */
diff --git a/src/cff/cff.c b/src/cff/cff.c
index fccfd44..c3840b5 100644
--- a/src/cff/cff.c
+++ b/src/cff/cff.c
@@ -4,7 +4,7 @@
/* */
/* FreeType OpenType driver component (body only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2013 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 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
+
#include "cffpic.c"
#include "cffdrivr.c"
#include "cffparse.c"
@@ -27,4 +28,14 @@
#include "cffgload.c"
#include "cffcmap.c"
+#include "cf2arrst.c"
+#include "cf2blues.c"
+#include "cf2error.c"
+#include "cf2font.c"
+#include "cf2ft.c"
+#include "cf2hints.c"
+#include "cf2intrp.c"
+#include "cf2read.c"
+#include "cf2stack.c"
+
/* END */
diff --git a/src/cff/cffcmap.c b/src/cff/cffcmap.c
index 1298371..52248b2 100644
--- a/src/cff/cffcmap.c
+++ b/src/cff/cffcmap.c
@@ -4,7 +4,7 @@
/* */
/* CFF character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */
+/* Copyright 2002-2007, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,6 +16,8 @@
/***************************************************************************/
+#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
#include "cffcmap.h"
#include "cffload.h"
@@ -31,12 +33,15 @@
/*************************************************************************/
FT_CALLBACK_DEF( FT_Error )
- cff_cmap_encoding_init( CFF_CMapStd cmap )
+ cff_cmap_encoding_init( CFF_CMapStd cmap,
+ FT_Pointer pointer )
{
TT_Face face = (TT_Face)FT_CMAP_FACE( cmap );
CFF_Font cff = (CFF_Font)face->extra.data;
CFF_Encoding encoding = &cff->encoding;
+ FT_UNUSED( pointer );
+
cmap->gids = encoding->codes;
@@ -133,7 +138,8 @@
FT_CALLBACK_DEF( FT_Error )
- cff_cmap_unicode_init( PS_Unicodes unicodes )
+ cff_cmap_unicode_init( PS_Unicodes unicodes,
+ FT_Pointer pointer )
{
TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes );
FT_Memory memory = FT_FACE_MEMORY( face );
@@ -141,11 +147,13 @@
CFF_Charset charset = &cff->charset;
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
+ FT_UNUSED( pointer );
+
/* can't build Unicode map for CID-keyed font */
/* because we don't know glyph names. */
if ( !charset->sids )
- return CFF_Err_No_Unicode_Glyph_Name;
+ return FT_THROW( No_Unicode_Glyph_Name );
return psnames->unicodes_init( memory,
unicodes,
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index eb4c14e..3e8898e 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -4,7 +4,7 @@
/* */
/* OpenType font driver implementation (body). */
/* */
-/* Copyright 1996-2012 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -37,6 +37,8 @@
#include FT_SERVICE_XFREE86_NAME_H
#include FT_SERVICE_GLYPH_DICT_H
+#include FT_SERVICE_PROPERTIES_H
+#include FT_CFF_DRIVER_H
/*************************************************************************/
@@ -115,7 +117,7 @@
if ( sfnt )
kerning->x = sfnt->get_kerning( face, left_glyph, right_glyph );
- return CFF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -160,7 +162,9 @@
if ( !slot )
- return CFF_Err_Invalid_Slot_Handle;
+ return FT_THROW( Invalid_Slot_Handle );
+
+ FT_TRACE1(( "cff_glyph_load: glyph index %d\n", glyph_index ));
/* check whether we want a scaled outline or bitmap */
if ( !size )
@@ -174,7 +178,7 @@
{
/* these two objects must have the same parent */
if ( cffsize->face != cffslot->face )
- return CFF_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
}
/* now load the glyph outline if necessary */
@@ -195,7 +199,7 @@
FT_Fixed* advances )
{
FT_UInt nn;
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_GlyphSlot slot = face->glyph;
@@ -239,7 +243,7 @@
" cannot get glyph name from CFF & CEF fonts\n"
" "
" without the `PSNames' module\n" ));
- error = CFF_Err_Missing_Module;
+ error = FT_THROW( Missing_Module );
goto Exit;
}
@@ -252,7 +256,7 @@
if ( gname )
FT_STRCPYN( buffer, gname, buffer_max );
- error = CFF_Err_Ok;
+ error = FT_Err_Ok;
Exit:
return error;
@@ -298,7 +302,8 @@
}
- FT_DEFINE_SERVICE_GLYPHDICTREC(cff_service_glyph_dict,
+ FT_DEFINE_SERVICE_GLYPHDICTREC(
+ cff_service_glyph_dict,
(FT_GlyphDict_GetNameFunc) cff_get_glyph_name,
(FT_GlyphDict_NameIndexFunc)cff_get_name_index
)
@@ -321,7 +326,7 @@
PS_FontInfoRec* afont_info )
{
CFF_Font cff = (CFF_Font)face->extra.data;
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( cff && cff->font_info == NULL )
@@ -360,7 +365,8 @@
}
- FT_DEFINE_SERVICE_PSINFOREC(cff_service_ps_info,
+ FT_DEFINE_SERVICE_PSINFOREC(
+ cff_service_ps_info,
(PS_GetFontInfoFunc) cff_ps_get_font_info,
(PS_GetFontExtraFunc) NULL,
(PS_HasGlyphNamesFunc) cff_ps_has_glyph_names,
@@ -384,7 +390,8 @@
}
- FT_DEFINE_SERVICE_PSFONTNAMEREC(cff_service_ps_name,
+ FT_DEFINE_SERVICE_PSFONTNAMEREC(
+ cff_service_ps_name,
(FT_PsName_GetFunc)cff_get_ps_name
)
@@ -404,16 +411,17 @@
TT_CMapInfo *cmap_info )
{
FT_CMap cmap = FT_CMAP( charmap );
- FT_Error error = CFF_Err_Ok;
- FT_Face face = FT_CMAP_FACE( cmap );
- FT_Library library = FT_FACE_LIBRARY( face );
+ FT_Error error = FT_Err_Ok;
+
+ FT_Face face = FT_CMAP_FACE( cmap );
+ FT_Library library = FT_FACE_LIBRARY( face );
cmap_info->language = 0;
cmap_info->format = 0;
- if ( cmap->clazz != &FT_CFF_CMAP_ENCODING_CLASS_REC_GET &&
- cmap->clazz != &FT_CFF_CMAP_UNICODE_CLASS_REC_GET )
+ if ( cmap->clazz != &CFF_CMAP_ENCODING_CLASS_REC_GET &&
+ cmap->clazz != &CFF_CMAP_UNICODE_CLASS_REC_GET )
{
FT_Module sfnt = FT_Get_Module( library, "sfnt" );
FT_Service_TTCMaps service =
@@ -429,7 +437,8 @@
}
- FT_DEFINE_SERVICE_TTCMAPSREC(cff_service_get_cmap_info,
+ FT_DEFINE_SERVICE_TTCMAPSREC(
+ cff_service_get_cmap_info,
(TT_CMap_Info_GetFunc)cff_get_cmap_info
)
@@ -444,7 +453,7 @@
const char* *ordering,
FT_Int *supplement )
{
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
CFF_Font cff = (CFF_Font)face->extra.data;
@@ -455,7 +464,7 @@
if ( dict->cid_registry == 0xFFFFU )
{
- error = CFF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Fail;
}
@@ -499,7 +508,7 @@
cff_get_is_cid( CFF_Face face,
FT_Bool *is_cid )
{
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
CFF_Font cff = (CFF_Font)face->extra.data;
@@ -523,7 +532,7 @@
FT_UInt glyph_index,
FT_UInt *cid )
{
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
CFF_Font cff;
@@ -537,13 +546,13 @@
if ( dict->cid_registry == 0xFFFFU )
{
- error = CFF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Fail;
}
if ( glyph_index > cff->num_glyphs )
{
- error = CFF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Fail;
}
@@ -558,13 +567,147 @@
}
- FT_DEFINE_SERVICE_CIDREC(cff_service_cid_info,
+ FT_DEFINE_SERVICE_CIDREC(
+ cff_service_cid_info,
(FT_CID_GetRegistryOrderingSupplementFunc)cff_get_ros,
(FT_CID_GetIsInternallyCIDKeyedFunc) cff_get_is_cid,
(FT_CID_GetCIDFromGlyphIndexFunc) cff_get_cid_from_glyph_index
)
+ /*
+ * PROPERTY SERVICE
+ *
+ */
+ static FT_Error
+ cff_property_set( FT_Module module, /* CFF_Driver */
+ const char* property_name,
+ const void* value )
+ {
+ FT_Error error = FT_Err_Ok;
+ CFF_Driver driver = (CFF_Driver)module;
+
+
+ if ( !ft_strcmp( property_name, "darkening-parameters" ) )
+ {
+ FT_Int* darken_params = (FT_Int*)value;
+
+ FT_Int x1 = darken_params[0];
+ FT_Int y1 = darken_params[1];
+ FT_Int x2 = darken_params[2];
+ FT_Int y2 = darken_params[3];
+ FT_Int x3 = darken_params[4];
+ FT_Int y3 = darken_params[5];
+ FT_Int x4 = darken_params[6];
+ FT_Int y4 = darken_params[7];
+
+
+ if ( x1 < 0 || x2 < 0 || x3 < 0 || x4 < 0 ||
+ y1 < 0 || y2 < 0 || y3 < 0 || y4 < 0 ||
+ x1 > x2 || x2 > x3 || x3 > x4 ||
+ y1 > 500 || y2 > 500 || y3 > 500 || y4 > 500 )
+ return FT_THROW( Invalid_Argument );
+
+ driver->darken_params[0] = x1;
+ driver->darken_params[1] = y1;
+ driver->darken_params[2] = x2;
+ driver->darken_params[3] = y2;
+ driver->darken_params[4] = x3;
+ driver->darken_params[5] = y3;
+ driver->darken_params[6] = x4;
+ driver->darken_params[7] = y4;
+
+ return error;
+ }
+ else if ( !ft_strcmp( property_name, "hinting-engine" ) )
+ {
+ FT_UInt* hinting_engine = (FT_UInt*)value;
+
+
+#ifndef CFF_CONFIG_OPTION_OLD_ENGINE
+ if ( *hinting_engine != FT_CFF_HINTING_ADOBE )
+ error = FT_ERR( Unimplemented_Feature );
+ else
+#endif
+ driver->hinting_engine = *hinting_engine;
+
+ return error;
+ }
+ else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
+ {
+ FT_Bool* no_stem_darkening = (FT_Bool*)value;
+
+
+ driver->no_stem_darkening = *no_stem_darkening;
+
+ return error;
+ }
+
+ FT_TRACE0(( "cff_property_set: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ static FT_Error
+ cff_property_get( FT_Module module, /* CFF_Driver */
+ const char* property_name,
+ const void* value )
+ {
+ FT_Error error = FT_Err_Ok;
+ CFF_Driver driver = (CFF_Driver)module;
+
+
+ if ( !ft_strcmp( property_name, "darkening-parameters" ) )
+ {
+ FT_Int* darken_params = driver->darken_params;
+ FT_Int* val = (FT_Int*)value;
+
+
+ val[0] = darken_params[0];
+ val[1] = darken_params[1];
+ val[2] = darken_params[2];
+ val[3] = darken_params[3];
+ val[4] = darken_params[4];
+ val[5] = darken_params[5];
+ val[6] = darken_params[6];
+ val[7] = darken_params[7];
+
+ return error;
+ }
+ else if ( !ft_strcmp( property_name, "hinting-engine" ) )
+ {
+ FT_UInt hinting_engine = driver->hinting_engine;
+ FT_UInt* val = (FT_UInt*)value;
+
+
+ *val = hinting_engine;
+
+ return error;
+ }
+ else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
+ {
+ FT_Bool no_stem_darkening = driver->no_stem_darkening;
+ FT_Bool* val = (FT_Bool*)value;
+
+
+ *val = no_stem_darkening;
+
+ return error;
+ }
+
+ FT_TRACE0(( "cff_property_get: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ FT_DEFINE_SERVICE_PROPERTIESREC(
+ cff_service_properties,
+ (FT_Properties_SetFunc)cff_property_set,
+ (FT_Properties_GetFunc)cff_property_get )
+
+
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -576,25 +719,31 @@
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
+
#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
- FT_DEFINE_SERVICEDESCREC6(cff_services,
+ FT_DEFINE_SERVICEDESCREC7(
+ cff_services,
FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_CFF,
- FT_SERVICE_ID_POSTSCRIPT_INFO, &FT_CFF_SERVICE_PS_INFO_GET,
- FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_CFF_SERVICE_PS_NAME_GET,
- FT_SERVICE_ID_GLYPH_DICT, &FT_CFF_SERVICE_GLYPH_DICT_GET,
- FT_SERVICE_ID_TT_CMAP, &FT_CFF_SERVICE_GET_CMAP_INFO_GET,
- FT_SERVICE_ID_CID, &FT_CFF_SERVICE_CID_INFO_GET
+ FT_SERVICE_ID_POSTSCRIPT_INFO, &CFF_SERVICE_PS_INFO_GET,
+ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
+ FT_SERVICE_ID_GLYPH_DICT, &CFF_SERVICE_GLYPH_DICT_GET,
+ FT_SERVICE_ID_TT_CMAP, &CFF_SERVICE_GET_CMAP_INFO_GET,
+ FT_SERVICE_ID_CID, &CFF_SERVICE_CID_INFO_GET,
+ FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET
)
#else
- FT_DEFINE_SERVICEDESCREC5(cff_services,
+ FT_DEFINE_SERVICEDESCREC6(
+ cff_services,
FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_CFF,
- FT_SERVICE_ID_POSTSCRIPT_INFO, &FT_CFF_SERVICE_PS_INFO_GET,
- FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_CFF_SERVICE_PS_NAME_GET,
- FT_SERVICE_ID_TT_CMAP, &FT_CFF_SERVICE_GET_CMAP_INFO_GET,
- FT_SERVICE_ID_CID, &FT_CFF_SERVICE_CID_INFO_GET
+ FT_SERVICE_ID_POSTSCRIPT_INFO, &CFF_SERVICE_PS_INFO_GET,
+ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
+ FT_SERVICE_ID_TT_CMAP, &CFF_SERVICE_GET_CMAP_INFO_GET,
+ FT_SERVICE_ID_CID, &CFF_SERVICE_CID_INFO_GET,
+ FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET
)
#endif
+
FT_CALLBACK_DEF( FT_Module_Interface )
cff_get_interface( FT_Module driver, /* CFF_Driver */
const char* module_interface )
@@ -604,7 +753,7 @@
FT_Module_Interface result;
- /* FT_CFF_SERVICES_GET derefers `library' in PIC mode */
+ /* CFF_SERVICES_GET dereferences `library' in PIC mode */
#ifdef FT_CONFIG_OPTION_PIC
if ( !driver )
return NULL;
@@ -613,7 +762,7 @@
return NULL;
#endif
- result = ft_service_list_lookup( FT_CFF_SERVICES_GET, module_interface );
+ result = ft_service_list_lookup( CFF_SERVICES_GET, module_interface );
if ( result != NULL )
return result;
@@ -641,7 +790,8 @@
#define CFF_SIZE_SELECT 0
#endif
- FT_DEFINE_DRIVER( cff_driver_class,
+ FT_DEFINE_DRIVER(
+ cff_driver_class,
FT_MODULE_FONT_DRIVER |
FT_MODULE_DRIVER_SCALABLE |
@@ -670,9 +820,6 @@
cff_slot_init,
cff_slot_done,
- ft_stub_set_char_sizes, /* FT_CONFIG_OPTION_OLD_INTERNALS */
- ft_stub_set_pixel_sizes, /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
cff_glyph_load,
cff_get_kerning,
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 84847fd..758a3d3 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -4,7 +4,7 @@
/* */
/* OpenType Glyph Loader (body). */
/* */
-/* Copyright 1996-2012 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,10 +21,12 @@
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include FT_OUTLINE_H
+#include FT_CFF_DRIVER_H
#include "cffobjs.h"
#include "cffload.h"
#include "cffgload.h"
+#include "cf2ft.h" /* for cf2_decoder_parse_charstrings */
#include "cfferrs.h"
@@ -39,6 +41,8 @@
#define FT_COMPONENT trace_cffgload
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+
typedef enum CFF_Operator_
{
cff_op_unknown = 0,
@@ -209,6 +213,8 @@
2 /* setcurrentpoint */
};
+#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */
+
/*************************************************************************/
/*************************************************************************/
@@ -412,7 +418,7 @@
CFF_Builder *builder = &decoder->builder;
CFF_Font cff = (CFF_Font)builder->face->extra.data;
CFF_SubFont sub = &cff->top_font;
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
/* manage CID fonts */
@@ -424,11 +430,11 @@
if ( fd_index >= cff->num_subfonts )
{
FT_TRACE4(( "cff_decoder_prepare: invalid CID subfont index\n" ));
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
- FT_TRACE3(( "glyph index %d (subfont %d):\n", glyph_index, fd_index ));
+ FT_TRACE3(( " in subfont %d:\n", fd_index ));
sub = cff->subfonts[fd_index];
@@ -441,10 +447,6 @@
builder->hints_globals = (void *)internal->subfonts[fd_index];
}
}
-#ifdef FT_DEBUG_LEVEL_TRACE
- else
- FT_TRACE3(( "glyph index %d:\n", glyph_index ));
-#endif
decoder->num_locals = sub->local_subrs_index.count;
decoder->locals = sub->local_subrs;
@@ -455,22 +457,24 @@
decoder->glyph_width = sub->private_dict.default_width;
decoder->nominal_width = sub->private_dict.nominal_width;
+ decoder->current_subfont = sub; /* for Adobe's CFF handler */
+
Exit:
return error;
}
/* check that there is enough space for `count' more points */
- static FT_Error
- check_points( CFF_Builder* builder,
- FT_Int count )
+ FT_LOCAL_DEF( FT_Error )
+ cff_check_points( CFF_Builder* builder,
+ FT_Int count )
{
return FT_GLYPHLOADER_CHECK_POINTS( builder->loader, count, 0 );
}
/* add a new point, do not check space */
- static void
+ FT_LOCAL_DEF( void )
cff_builder_add_point( CFF_Builder* builder,
FT_Pos x,
FT_Pos y,
@@ -484,9 +488,22 @@
FT_Vector* point = outline->points + outline->n_points;
FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points;
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face );
+
- point->x = x >> 16;
- point->y = y >> 16;
+ if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE )
+ {
+ point->x = x >> 16;
+ point->y = y >> 16;
+ }
+ else
+#endif
+ {
+ /* cf2_decoder_parse_charstrings uses 16.16 coordinates */
+ point->x = x >> 10;
+ point->y = y >> 10;
+ }
*control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );
}
@@ -495,7 +512,7 @@
/* check space for a new on-curve point, then add it */
- static FT_Error
+ FT_LOCAL_DEF( FT_Error )
cff_builder_add_point1( CFF_Builder* builder,
FT_Pos x,
FT_Pos y )
@@ -503,7 +520,7 @@
FT_Error error;
- error = check_points( builder, 1 );
+ error = cff_check_points( builder, 1 );
if ( !error )
cff_builder_add_point( builder, x, y, 1 );
@@ -522,7 +539,7 @@
if ( !builder->load_points )
{
outline->n_contours++;
- return CFF_Err_Ok;
+ return FT_Err_Ok;
}
error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 );
@@ -540,12 +557,12 @@
/* if a path was begun, add its first on-curve point */
- static FT_Error
+ FT_LOCAL_DEF( FT_Error )
cff_builder_start_point( CFF_Builder* builder,
FT_Pos x,
FT_Pos y )
{
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
/* test whether we are building a new contour */
@@ -562,7 +579,7 @@
/* close the current contour */
- static void
+ FT_LOCAL_DEF( void )
cff_builder_close_contour( CFF_Builder* builder )
{
FT_Outline* outline = builder->current;
@@ -607,7 +624,7 @@
}
- static FT_Int
+ FT_LOCAL_DEF( FT_Int )
cff_lookup_glyph_by_stdcharcode( CFF_Font cff,
FT_Int charcode )
{
@@ -636,7 +653,7 @@
}
- static FT_Error
+ FT_LOCAL_DEF( FT_Error )
cff_get_glyph_data( TT_Face face,
FT_UInt glyph_index,
FT_Byte** pointer,
@@ -672,7 +689,7 @@
}
- static void
+ FT_LOCAL_DEF( void )
cff_free_glyph_data( TT_Face face,
FT_Byte** pointer,
FT_ULong length )
@@ -686,7 +703,7 @@
/* callback function. */
if ( face->root.internal->incremental_interface )
{
- FT_Data data;
+ FT_Data data;
data.pointer = *pointer;
@@ -707,6 +724,8 @@
}
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+
static FT_Error
cff_operator_seac( CFF_Decoder* decoder,
FT_Pos asb,
@@ -728,7 +747,7 @@
if ( decoder->seac )
{
FT_ERROR(( "cff_operator_seac: invalid nested seac\n" ));
- return CFF_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
}
adx += decoder->builder.left_bearing.x;
@@ -756,7 +775,7 @@
{
FT_ERROR(( "cff_operator_seac:"
" invalid seac character code arguments\n" ));
- return CFF_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
}
/* If we are trying to load a composite glyph, do not load the */
@@ -925,7 +944,7 @@
limit = zone->limit = charstring_base + charstring_len;
ip = zone->cursor = zone->base;
- error = CFF_Err_Ok;
+ error = FT_Err_Ok;
x = builder->pos_x;
y = builder->pos_y;
@@ -953,11 +972,14 @@
/* this is an operand, push it on the stack */
+
+ /* if we use shifts, all computations are done with unsigned */
+ /* values; the conversion to a signed value is the last step */
if ( v == 28 )
{
if ( ip + 1 >= limit )
goto Syntax_Error;
- val = (FT_Short)( ( (FT_Short)ip[0] << 8 ) | ip[1] );
+ val = (FT_Short)( ( (FT_UShort)ip[0] << 8 ) | ip[1] );
ip += 2;
}
else if ( v < 247 )
@@ -978,10 +1000,10 @@
{
if ( ip + 3 >= limit )
goto Syntax_Error;
- val = ( (FT_Int32)ip[0] << 24 ) |
- ( (FT_Int32)ip[1] << 16 ) |
- ( (FT_Int32)ip[2] << 8 ) |
- ip[3];
+ val = (FT_Int32)( ( (FT_UInt32)ip[0] << 24 ) |
+ ( (FT_UInt32)ip[1] << 16 ) |
+ ( (FT_UInt32)ip[2] << 8 ) |
+ (FT_UInt32)ip[3] );
ip += 4;
if ( charstring_type == 2 )
shift = 0;
@@ -989,12 +1011,12 @@
if ( decoder->top - stack >= CFF_MAX_OPERANDS )
goto Stack_Overflow;
- val <<= shift;
+ val = (FT_Int32)( (FT_UInt32)val << shift );
*decoder->top++ = val;
#ifdef FT_DEBUG_LEVEL_TRACE
if ( !( val & 0xFFFFL ) )
- FT_TRACE4(( " %ld", (FT_Int32)( val >> 16 ) ));
+ FT_TRACE4(( " %hd", (FT_Short)( (FT_UInt32)val >> 16 ) ));
else
FT_TRACE4(( " %.2f", val / 65536.0 ));
#endif
@@ -1411,8 +1433,8 @@
case cff_op_rlineto:
FT_TRACE4(( " rlineto\n" ));
- if ( cff_builder_start_point ( builder, x, y ) ||
- check_points( builder, num_args / 2 ) )
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, num_args / 2 ) )
goto Fail;
if ( num_args < 2 )
@@ -1446,8 +1468,8 @@
if ( num_args == 0 )
break;
- if ( cff_builder_start_point ( builder, x, y ) ||
- check_points( builder, num_args ) )
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, num_args ) )
goto Fail;
args = stack;
@@ -1480,8 +1502,8 @@
nargs = num_args - num_args % 6;
- if ( cff_builder_start_point ( builder, x, y ) ||
- check_points( builder, nargs / 2 ) )
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, nargs / 2 ) )
goto Fail;
args -= nargs;
@@ -1529,7 +1551,7 @@
nargs--;
}
- if ( check_points( builder, 3 * ( nargs / 4 ) ) )
+ if ( cff_check_points( builder, 3 * ( nargs / 4 ) ) )
goto Fail;
while ( args < decoder->top )
@@ -1573,7 +1595,7 @@
nargs--;
}
- if ( check_points( builder, 3 * ( nargs / 4 ) ) )
+ if ( cff_check_points( builder, 3 * ( nargs / 4 ) ) )
goto Fail;
while ( args < decoder->top )
@@ -1613,7 +1635,7 @@
nargs = num_args & ~2;
args -= nargs;
- if ( check_points( builder, ( nargs / 4 ) * 3 ) )
+ if ( cff_check_points( builder, ( nargs / 4 ) * 3 ) )
goto Stack_Underflow;
phase = ( op == cff_op_hvcurveto );
@@ -1666,8 +1688,8 @@
nargs = num_args & ~1;
num_lines = ( nargs - 6 ) / 2;
- if ( cff_builder_start_point( builder, x, y ) ||
- check_points( builder, num_lines + 3 ) )
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, num_lines + 3 ) )
goto Fail;
args -= nargs;
@@ -1711,8 +1733,8 @@
nargs = nargs - nargs % 6 + 2;
num_curves = ( nargs - 2 ) / 6;
- if ( cff_builder_start_point ( builder, x, y ) ||
- check_points( builder, num_curves * 3 + 2 ) )
+ if ( cff_builder_start_point( builder, x, y ) ||
+ cff_check_points( builder, num_curves * 3 + 2 ) )
goto Fail;
args -= nargs;
@@ -1752,7 +1774,7 @@
/* -- make sure we have enough space for the start point if it */
/* needs to be added */
if ( cff_builder_start_point( builder, x, y ) ||
- check_points( builder, 6 ) )
+ cff_check_points( builder, 6 ) )
goto Fail;
/* record the starting point's y position for later use */
@@ -1801,7 +1823,7 @@
/* adding six more points; 4 control points, 2 on-curve points */
if ( cff_builder_start_point( builder, x, y ) ||
- check_points( builder, 6 ) )
+ cff_check_points( builder, 6 ) )
goto Fail;
/* record the starting point's y-position for later use */
@@ -1854,7 +1876,7 @@
/* adding six more points; 4 control points, 2 on-curve points */
if ( cff_builder_start_point( builder, x, y ) ||
- check_points( builder, 6 ) )
+ cff_check_points( builder, 6 ) )
goto Fail;
/* record the starting point's x, y position for later use */
@@ -1917,7 +1939,7 @@
FT_TRACE4(( " flex\n" ));
if ( cff_builder_start_point( builder, x, y ) ||
- check_points( builder, 6 ) )
+ cff_check_points( builder, 6 ) )
goto Fail;
for ( count = 6; count > 0; count-- )
@@ -1967,9 +1989,6 @@
}
else
{
- if ( !error )
- error = CFF_Err_Ok;
-
cff_builder_close_contour( builder );
/* close hints recording session */
@@ -1980,10 +1999,12 @@
goto Syntax_Error;
/* apply hints to the loaded glyph outline now */
- hinter->apply( hinter->hints,
- builder->current,
- (PSH_Globals)builder->hints_globals,
- decoder->hint_mode );
+ error = hinter->apply( hinter->hints,
+ builder->current,
+ (PSH_Globals)builder->hints_globals,
+ decoder->hint_mode );
+ if ( error )
+ goto Fail;
}
/* add current outline to the glyph slot */
@@ -2470,7 +2491,7 @@
FT_ERROR(( " %d", ip[0] ));
FT_ERROR(( "\n" ));
- return CFF_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
decoder->top = args;
@@ -2489,17 +2510,19 @@
Syntax_Error:
FT_TRACE4(( "cff_decoder_parse_charstrings: syntax error\n" ));
- return CFF_Err_Invalid_File_Format;
+ return FT_THROW( Invalid_File_Format );
Stack_Underflow:
FT_TRACE4(( "cff_decoder_parse_charstrings: stack underflow\n" ));
- return CFF_Err_Too_Few_Arguments;
+ return FT_THROW( Too_Few_Arguments );
Stack_Overflow:
FT_TRACE4(( "cff_decoder_parse_charstrings: stack overflow\n" ));
- return CFF_Err_Stack_Overflow;
+ return FT_THROW( Stack_Overflow );
}
+#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */
+
/*************************************************************************/
/*************************************************************************/
@@ -2526,7 +2549,7 @@
cff_compute_max_advance( TT_Face face,
FT_Int* max_advance )
{
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
CFF_Decoder decoder;
FT_Int glyph_index;
CFF_Font cff = (CFF_Font)face->other;
@@ -2564,12 +2587,12 @@
}
/* ignore the error if one has occurred -- skip to next glyph */
- error = CFF_Err_Ok;
+ error = FT_Err_Ok;
}
*max_advance = decoder.builder.advance.x;
- return CFF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -2585,7 +2608,7 @@
FT_Error error;
CFF_Decoder decoder;
TT_Face face = (TT_Face)glyph->root.face;
- FT_Bool hinting, force_scaling;
+ FT_Bool hinting, scaled, force_scaling;
CFF_Font cff = (CFF_Font)face->extra.data;
FT_Matrix font_matrix;
@@ -2606,11 +2629,11 @@
glyph_index = cff_charset_cid_to_gindex( &cff->charset,
glyph_index );
if ( glyph_index == 0 )
- return CFF_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
}
else if ( glyph_index >= cff->num_glyphs )
- return CFF_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( load_flags & FT_LOAD_NO_RECURSE )
load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
@@ -2653,6 +2676,11 @@
if ( !error )
{
+ FT_Bool has_vertical_info;
+ FT_UShort advance;
+ FT_Short dummy;
+
+
glyph->root.outline.n_points = 0;
glyph->root.outline.n_contours = 0;
@@ -2679,6 +2707,39 @@
glyph->root.bitmap_left = metrics.horiBearingX;
glyph->root.bitmap_top = metrics.horiBearingY;
}
+
+ /* compute linear advance widths */
+
+ (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 0,
+ glyph_index,
+ &dummy,
+ &advance );
+ glyph->root.linearHoriAdvance = advance;
+
+ has_vertical_info = FT_BOOL(
+ face->vertical_info &&
+ face->vertical.number_Of_VMetrics > 0 );
+
+ /* get the vertical metrics from the vtmx table if we have one */
+ if ( has_vertical_info )
+ {
+ (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1,
+ glyph_index,
+ &dummy,
+ &advance );
+ glyph->root.linearVertAdvance = advance;
+ }
+ else
+ {
+ /* make up vertical ones */
+ if ( face->os2.version != 0xFFFFU )
+ glyph->root.linearVertAdvance = (FT_Pos)
+ ( face->os2.sTypoAscender - face->os2.sTypoDescender );
+ else
+ glyph->root.linearVertAdvance = (FT_Pos)
+ ( face->horizontal.Ascender - face->horizontal.Descender );
+ }
+
return error;
}
}
@@ -2688,7 +2749,7 @@
/* return immediately if we only want the embedded bitmaps */
if ( load_flags & FT_LOAD_SBITS_ONLY )
- return CFF_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* if we have a CID subfont, use its matrix (which has already */
/* been multiplied with the root matrix) */
@@ -2700,6 +2761,7 @@
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 );
@@ -2727,12 +2789,21 @@
glyph->root.outline.n_points = 0;
glyph->root.outline.n_contours = 0;
- hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
- ( load_flags & FT_LOAD_NO_HINTING ) == 0 );
+ /* top-level code ensures that FT_LOAD_NO_HINTING is set */
+ /* if FT_LOAD_NO_SCALE is active */
+ hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_HINTING ) == 0 );
+ scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 );
+ glyph->hint = hinting;
+ glyph->scaled = scaled;
glyph->root.format = FT_GLYPH_FORMAT_OUTLINE; /* by default */
{
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( face );
+#endif
+
+
FT_Byte* charstring;
FT_ULong charstring_len;
@@ -2756,9 +2827,35 @@
if ( error )
goto Glyph_Build_Finished;
- error = cff_decoder_parse_charstrings( &decoder,
- charstring,
- charstring_len );
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ /* choose which CFF renderer to use */
+ if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE )
+ error = cff_decoder_parse_charstrings( &decoder,
+ charstring,
+ charstring_len );
+ else
+#endif
+ {
+ error = cf2_decoder_parse_charstrings( &decoder,
+ charstring,
+ charstring_len );
+
+ /* Adobe's engine uses 16.16 numbers everywhere; */
+ /* as a consequence, glyphs larger than 2000ppem get rejected */
+ if ( FT_ERR_EQ( error, Glyph_Too_Big ) )
+ {
+ /* this time, we retry unhinted and scale up the glyph later on */
+ /* (the engine uses and sets the hardcoded value 0x10000 / 64 = */
+ /* 0x400 for both `x_scale' and `y_scale' in this case) */
+ hinting = FALSE;
+ force_scaling = TRUE;
+ glyph->hint = hinting;
+
+ error = cf2_decoder_parse_charstrings( &decoder,
+ charstring,
+ charstring_len );
+ }
+ }
cff_free_glyph_data( face, &charstring, charstring_len );
@@ -2856,14 +2953,8 @@
glyph->root.linearHoriAdvance = decoder.glyph_width;
glyph->root.internal->glyph_transformed = 0;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- has_vertical_info = FT_BOOL( face->vertical_info &&
- face->vertical.number_Of_VMetrics > 0 &&
- face->vertical.long_metrics );
-#else
has_vertical_info = FT_BOOL( face->vertical_info &&
face->vertical.number_Of_VMetrics > 0 );
-#endif
/* get the vertical metrics from the vtmx table if we have one */
if ( has_vertical_info )
@@ -2872,10 +2963,10 @@
FT_UShort vertAdvance = 0;
- ( (SFNT_Service)face->sfnt )->get_metrics( face, 1,
- glyph_index,
- &vertBearingY,
- &vertAdvance );
+ (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1,
+ glyph_index,
+ &vertBearingY,
+ &vertAdvance );
metrics->vertBearingY = vertBearingY;
metrics->vertAdvance = vertAdvance;
}
diff --git a/src/cff/cffgload.h b/src/cff/cffgload.h
index 38937be..41df7db 100644
--- a/src/cff/cffgload.h
+++ b/src/cff/cffgload.h
@@ -4,7 +4,7 @@
/* */
/* OpenType Glyph Loader (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2004, 2006-2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -106,6 +106,41 @@ FT_BEGIN_HEADER
} CFF_Builder;
+ FT_LOCAL( FT_Error )
+ cff_check_points( CFF_Builder* builder,
+ FT_Int count );
+
+ FT_LOCAL( void )
+ cff_builder_add_point( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y,
+ FT_Byte flag );
+ FT_LOCAL( FT_Error )
+ cff_builder_add_point1( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y );
+ FT_LOCAL( FT_Error )
+ cff_builder_start_point( CFF_Builder* builder,
+ FT_Pos x,
+ FT_Pos y );
+ FT_LOCAL( void )
+ cff_builder_close_contour( CFF_Builder* builder );
+
+
+ FT_LOCAL( FT_Int )
+ cff_lookup_glyph_by_stdcharcode( CFF_Font cff,
+ FT_Int charcode );
+ FT_LOCAL( FT_Error )
+ cff_get_glyph_data( TT_Face face,
+ FT_UInt glyph_index,
+ FT_Byte** pointer,
+ FT_ULong* length );
+ FT_LOCAL( void )
+ cff_free_glyph_data( TT_Face face,
+ FT_Byte** pointer,
+ FT_ULong length );
+
+
/* execution context charstring zone */
typedef struct CFF_Decoder_Zone_
@@ -156,6 +191,8 @@ FT_BEGIN_HEADER
FT_Bool seac;
+ CFF_SubFont current_subfont; /* for current glyph_index */
+
} CFF_Decoder;
@@ -181,10 +218,12 @@ FT_BEGIN_HEADER
#endif /* 0 */
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
FT_LOCAL( FT_Error )
cff_decoder_parse_charstrings( CFF_Decoder* decoder,
FT_Byte* charstring_base,
FT_ULong charstring_len );
+#endif
FT_LOCAL( FT_Error )
cff_slot_load( CFF_GlyphSlot glyph,
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index 2be6ba0..d9bec59 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -4,7 +4,7 @@
/* */
/* OpenType and CFF data/program tables loader (body). */
/* */
-/* Copyright 1996-2011 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -250,7 +250,7 @@
if ( offsize < 1 || offsize > 4 )
{
- error = CFF_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
@@ -269,7 +269,7 @@
if ( size == 0 )
{
- error = CFF_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
@@ -318,7 +318,7 @@
static FT_Error
cff_index_load_offsets( CFF_Index idx )
{
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Stream stream = idx->stream;
FT_Memory memory = stream->memory;
@@ -384,9 +384,10 @@
FT_Byte*** table,
FT_Byte** pool )
{
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Memory memory = idx->stream->memory;
- FT_Byte** t = NULL;
+
+ FT_Byte** t = NULL;
FT_Byte* new_bytes = NULL;
@@ -413,7 +414,7 @@
cur_offset = idx->offsets[0] - 1;
/* sanity check */
- if ( cur_offset >= idx->data_size )
+ if ( cur_offset != 0 )
{
FT_TRACE0(( "cff_index_get_pointers:"
" invalid first offset value %d set to zero\n",
@@ -431,11 +432,11 @@
FT_ULong next_offset = idx->offsets[n] - 1;
- /* 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 ) )
+ /* two sanity checks for invalid offset tables */
+ if ( next_offset < cur_offset )
next_offset = cur_offset;
+ else if ( next_offset > idx->data_size )
+ next_offset = idx->data_size;
if ( !pool )
t[n] = org_bytes + next_offset;
@@ -471,7 +472,7 @@
FT_Byte** pbytes,
FT_ULong* pbyte_len )
{
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( idx && idx->count > element )
@@ -556,7 +557,7 @@
}
}
else
- error = CFF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
Exit:
return error;
@@ -688,6 +689,13 @@
if ( FT_READ_USHORT( num_ranges ) )
goto Exit;
+ if ( !num_ranges )
+ {
+ FT_TRACE0(( "CFF_Load_FD_Select: empty FDSelect array\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
+
fdselect->data_size = num_ranges * 3 + 2;
Load_Data:
@@ -696,7 +704,7 @@
break;
default: /* hmm... that's wrong */
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
}
Exit:
@@ -718,7 +726,7 @@
break;
case 3:
- /* first, compare to cache */
+ /* first, compare to the cache */
if ( (FT_UInt)( glyph_index - fdselect->cache_first ) <
fdselect->cache_count )
{
@@ -726,7 +734,7 @@
break;
}
- /* then, lookup the ranges array */
+ /* then, look up the ranges array */
{
FT_Byte* p = fdselect->data;
FT_Byte* p_limit = p + fdselect->data_size;
@@ -749,7 +757,7 @@
/* update cache */
fdselect->cache_first = first;
- fdselect->cache_count = limit-first;
+ fdselect->cache_count = limit - first;
fdselect->cache_fd = fd2;
break;
}
@@ -780,7 +788,7 @@
FT_UInt num_glyphs,
FT_Memory memory )
{
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UInt i;
FT_Long j;
FT_UShort max_cid = 0;
@@ -859,7 +867,7 @@
FT_Bool invert )
{
FT_Memory memory = stream->memory;
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UShort glyph_sid;
@@ -943,7 +951,7 @@
default:
FT_ERROR(( "cff_charset_load: invalid table format\n" ));
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
}
@@ -966,7 +974,7 @@
{
FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
"predefined charset (Adobe ISO-Latin)\n" ));
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -984,7 +992,7 @@
{
FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
"predefined charset (Adobe Expert)\n" ));
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1002,7 +1010,7 @@
{
FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
"predefined charset (Adobe Expert Subset)\n" ));
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1016,7 +1024,7 @@
break;
default:
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
}
@@ -1057,7 +1065,7 @@
FT_ULong base_offset,
FT_ULong offset )
{
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UInt count;
FT_UInt j;
FT_UShort glyph_sid;
@@ -1067,7 +1075,7 @@
/* Check for charset->sids. If we do not have this, we fail. */
if ( !charset->sids )
{
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1187,7 +1195,7 @@
default:
FT_ERROR(( "cff_encoding_load: invalid table format\n" ));
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1280,7 +1288,7 @@
default:
FT_ERROR(( "cff_encoding_load: invalid table format\n" ));
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
}
@@ -1313,7 +1321,7 @@
/* set defaults */
FT_MEM_ZERO( top, sizeof ( *top ) );
- top->underline_position = -100L << 16;
+ top->underline_position = -( 100L << 16 );
top->underline_thickness = 50L << 16;
top->charstring_type = 2;
top->font_matrix.xx = 0x10000L;
@@ -1439,6 +1447,7 @@
FT_ULong base_offset;
CFF_FontRecDict dict;
CFF_IndexRec string_index;
+ FT_Int subfont_index;
FT_ZERO( font );
@@ -1459,7 +1468,7 @@
font->absolute_offsize > 4 )
{
FT_TRACE2(( " not a CFF font header\n" ));
- error = CFF_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -1483,13 +1492,35 @@
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 )
+ if ( pure_cff )
+ {
+ /* well, we don't really forget the `disabled' fonts... */
+ subfont_index = face_index;
+
+ if ( subfont_index >= (FT_Int)font->name_index.count )
+ {
+ FT_ERROR(( "cff_font_load:"
+ " invalid subfont index for pure CFF font (%d)\n",
+ subfont_index ));
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
+ font->num_faces = font->name_index.count;
+ }
+ else
{
- FT_ERROR(( "cff_font_load: incorrect face index = %d\n",
- face_index ));
- error = CFF_Err_Invalid_Argument;
+ subfont_index = 0;
+
+ if ( font->name_index.count > 1 )
+ {
+ FT_ERROR(( "cff_font_load:"
+ " invalid CFF font with multiple subfonts\n"
+ " "
+ " in SFNT wrapper\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
}
/* in case of a font format check, simply exit now */
@@ -1500,7 +1531,7 @@
FT_TRACE4(( "parsing top-level\n" ));
error = cff_subfont_load( &font->top_font,
&font->font_dict_index,
- face_index,
+ subfont_index,
stream,
base_offset,
library );
@@ -1576,7 +1607,7 @@
if ( dict->charstrings_offset == 0 )
{
FT_ERROR(( "cff_font_load: no charstrings offset\n" ));
- error = CFF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1615,7 +1646,7 @@
/* get the font name (/CIDFontName for CID-keyed fonts, */
/* /FontName otherwise) */
- font->font_name = cff_index_get_name( font, face_index );
+ font->font_name = cff_index_get_name( font, subfont_index );
Exit:
cff_index_done( &string_index );
@@ -1660,6 +1691,12 @@
FT_FREE( font->global_subrs );
FT_FREE( font->strings );
FT_FREE( font->string_pool );
+
+ if ( font->cf2_instance.finalizer )
+ {
+ font->cf2_instance.finalizer( font->cf2_instance.data );
+ FT_FREE( font->cf2_instance.data );
+ }
}
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 6ad0e50..da3d019 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (body). */
/* */
-/* Copyright 1996-2012 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,6 +17,7 @@
#include <ft2build.h>
+
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_CALC_H
#include FT_INTERNAL_STREAM_H
@@ -24,12 +25,15 @@
#include FT_TRUETYPE_IDS_H
#include FT_TRUETYPE_TAGS_H
#include FT_INTERNAL_SFNT_H
+#include FT_CFF_DRIVER_H
+
#include "cffobjs.h"
#include "cffload.h"
#include "cffcmap.h"
-#include "cfferrs.h"
#include "cffpic.h"
+#include "cfferrs.h"
+
/*************************************************************************/
/* */
@@ -153,7 +157,7 @@
cff_size_init( FT_Size cffsize ) /* CFF_Size */
{
CFF_Size size = (CFF_Size)cffsize;
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PSH_Globals_Funcs funcs = cff_size_get_globals_funcs( size );
@@ -253,7 +257,7 @@
}
}
- return CFF_Err_Ok;
+ return FT_Err_Ok;
}
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -325,7 +329,7 @@
}
}
- return CFF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -367,7 +371,7 @@
}
}
- return CFF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -401,7 +405,7 @@
remove_subset_prefix( FT_String* name )
{
FT_Int32 idx = 0;
- FT_Int32 length = strlen( name ) + 1;
+ FT_Int32 length = (FT_Int32)strlen( name ) + 1;
FT_Bool continue_search = 1;
@@ -438,8 +442,8 @@
FT_Int32 family_name_length, style_name_length;
- family_name_length = strlen( family_name );
- style_name_length = strlen( style_name );
+ family_name_length = (FT_Int32)strlen( family_name );
+ style_name_length = (FT_Int32)strlen( style_name );
if ( family_name_length > style_name_length )
{
@@ -496,7 +500,7 @@
if ( !sfnt )
{
FT_ERROR(( "cff_face_init: cannot access `sfnt' module\n" ));
- error = CFF_Err_Missing_Module;
+ error = FT_THROW( Missing_Module );
goto Exit;
}
@@ -518,21 +522,13 @@
if ( face->format_tag != TTAG_OTTO ) /* `OTTO'; OpenType/CFF font */
{
FT_TRACE2(( " not an OpenType/CFF font\n" ));
- error = CFF_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
/* if we are performing a simple font format check, exit immediately */
if ( face_index < 0 )
- return CFF_Err_Ok;
-
- /* UNDOCUMENTED! A CFF in an SFNT can have only a single font. */
- if ( face_index > 0 )
- {
- FT_ERROR(( "cff_face_init: invalid face index\n" ));
- error = CFF_Err_Invalid_Argument;
- goto Exit;
- }
+ return FT_Err_Ok;
sfnt_format = 1;
@@ -544,7 +540,8 @@
pure_cff = 0;
/* load font directory */
- error = sfnt->load_face( stream, face, 0, num_params, params );
+ error = sfnt->load_face( stream, face, face_index,
+ num_params, params );
if ( error )
goto Exit;
}
@@ -554,10 +551,6 @@
error = sfnt->load_cmap( face, stream );
if ( error )
goto Exit;
-
- /* XXX: we don't load the GPOS table, as OpenType Layout */
- /* support will be added later to a layout library on top of */
- /* FreeType 2 */
}
/* now load the CFF part of the file */
@@ -570,7 +563,7 @@
/* rewind to start of file; we are going to load a pure-CFF font */
if ( FT_STREAM_SEEK( 0 ) )
goto Exit;
- error = CFF_Err_Ok;
+ error = FT_Err_Ok;
}
/* now load and parse the CFF table in the file */
@@ -611,7 +604,7 @@
" cannot open CFF & CEF fonts\n"
" "
" without the `PSNames' module\n" ));
- error = CFF_Err_Missing_Module;
+ error = FT_THROW( Missing_Module );
goto Exit;
}
@@ -873,7 +866,7 @@
flags |= FT_FACE_FLAG_KERNING;
#endif
- cffface->face_flags = flags;
+ cffface->face_flags |= flags;
/*******************************************************************/
/* */
@@ -950,16 +943,6 @@
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 = TT_PLATFORM_MICROSOFT;
@@ -968,9 +951,10 @@
nn = (FT_UInt)cffface->num_charmaps;
- error = FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL,
+ error = FT_CMap_New( &CFF_CMAP_UNICODE_CLASS_REC_GET, NULL,
&cmaprec, NULL );
- if ( error && FT_Err_No_Unicode_Glyph_Name != error )
+ if ( error &&
+ FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
goto Exit;
error = FT_Err_Ok;
@@ -979,15 +963,6 @@
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;
@@ -1000,19 +975,19 @@
{
cmaprec.encoding_id = TT_ADOBE_ID_STANDARD;
cmaprec.encoding = FT_ENCODING_ADOBE_STANDARD;
- clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET;
+ clazz = &CFF_CMAP_ENCODING_CLASS_REC_GET;
}
else if ( encoding->offset == 1 )
{
cmaprec.encoding_id = TT_ADOBE_ID_EXPERT;
cmaprec.encoding = FT_ENCODING_ADOBE_EXPERT;
- clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET;
+ clazz = &CFF_CMAP_ENCODING_CLASS_REC_GET;
}
else
{
cmaprec.encoding_id = TT_ADOBE_ID_CUSTOM;
cmaprec.encoding = FT_ENCODING_ADOBE_CUSTOM;
- clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET;
+ clazz = &CFF_CMAP_ENCODING_CLASS_REC_GET;
}
error = FT_CMap_New( clazz, NULL, &cmaprec, NULL );
@@ -1056,16 +1031,35 @@
FT_LOCAL_DEF( FT_Error )
- cff_driver_init( FT_Module module )
+ cff_driver_init( FT_Module module ) /* CFF_Driver */
{
- FT_UNUSED( module );
+ CFF_Driver driver = (CFF_Driver)module;
+
+
+ /* set default property values, cf. `ftcffdrv.h' */
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+ driver->hinting_engine = FT_CFF_HINTING_FREETYPE;
+#else
+ driver->hinting_engine = FT_CFF_HINTING_ADOBE;
+#endif
+
+ driver->no_stem_darkening = FALSE;
+
+ driver->darken_params[0] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1;
+ driver->darken_params[1] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1;
+ driver->darken_params[2] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2;
+ driver->darken_params[3] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2;
+ driver->darken_params[4] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3;
+ driver->darken_params[5] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3;
+ driver->darken_params[6] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4;
+ driver->darken_params[7] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4;
- return CFF_Err_Ok;
+ return FT_Err_Ok;
}
FT_LOCAL_DEF( void )
- cff_driver_done( FT_Module module )
+ cff_driver_done( FT_Module module ) /* CFF_Driver */
{
FT_UNUSED( module );
}
diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h
index 3c81cee..dfbf9a9 100644
--- a/src/cff/cffobjs.h
+++ b/src/cff/cffobjs.h
@@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008 by */
+/* Copyright 1996-2004, 2006-2008, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -112,12 +112,16 @@ FT_BEGIN_HEADER
/***********************************************************************/
/* */
- /* TrueType driver class. */
+ /* CFF driver class. */
/* */
typedef struct CFF_DriverRec_
{
FT_DriverRec root;
- void* extension_component;
+
+ FT_UInt hinting_engine;
+ FT_Bool no_stem_darkening;
+
+ FT_Int darken_params[8];
} CFF_DriverRec;
@@ -167,10 +171,10 @@ FT_BEGIN_HEADER
/* Driver functions */
/* */
FT_LOCAL( FT_Error )
- cff_driver_init( FT_Module module );
+ cff_driver_init( FT_Module module ); /* CFF_Driver */
FT_LOCAL( void )
- cff_driver_done( FT_Module module );
+ cff_driver_done( FT_Module module ); /* CFF_Driver */
FT_END_HEADER
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index 61fa87c..c79ab62 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -4,7 +4,7 @@
/* */
/* CFF token stream parser (body) */
/* */
-/* Copyright 1996-2004, 2007-2011 by */
+/* Copyright 1996-2004, 2007-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -65,19 +65,17 @@
if ( p + 2 > limit )
goto Bad;
- val = (FT_Short)( ( (FT_Int)p[0] << 8 ) | p[1] );
- p += 2;
+ val = (FT_Short)( ( (FT_UShort)p[0] << 8 ) | p[1] );
}
else if ( v == 29 )
{
if ( p + 4 > limit )
goto Bad;
- val = ( (FT_Long)p[0] << 24 ) |
- ( (FT_Long)p[1] << 16 ) |
- ( (FT_Long)p[2] << 8 ) |
- p[3];
- p += 4;
+ val = (FT_Long)( ( (FT_ULong)p[0] << 24 ) |
+ ( (FT_ULong)p[1] << 16 ) |
+ ( (FT_ULong)p[2] << 8 ) |
+ (FT_ULong)p[3] );
}
else if ( v < 247 )
{
@@ -89,7 +87,6 @@
goto Bad;
val = ( v - 247 ) * 256 + p[0] + 108;
- p++;
}
else
{
@@ -97,7 +94,6 @@
goto Bad;
val = -( v - 251 ) * 256 - p[0] - 108;
- p++;
}
Exit:
@@ -105,6 +101,7 @@
Bad:
val = 0;
+ FT_TRACE4(( "!!!END OF DATA:!!!" ));
goto Exit;
}
@@ -136,7 +133,7 @@
FT_UInt phase;
FT_Long result, number, exponent;
- FT_Int sign = 0, exponent_sign = 0;
+ FT_Int sign = 0, exponent_sign = 0, have_overflow = 0;
FT_Long exponent_add, integer_length, fraction_length;
@@ -165,7 +162,7 @@
/* Make sure we don't read past the end. */
if ( p >= limit )
- goto Exit;
+ goto Bad;
}
/* Get the nibble. */
@@ -191,7 +188,7 @@
}
/* Read fraction part, if any. */
- if ( nib == 0xa )
+ if ( nib == 0xA )
for (;;)
{
/* If we entered this iteration with phase == 4, we need */
@@ -202,7 +199,7 @@
/* Make sure we don't read past the end. */
if ( p >= limit )
- goto Exit;
+ goto Bad;
}
/* Get the nibble. */
@@ -241,7 +238,7 @@
/* Make sure we don't read past the end. */
if ( p >= limit )
- goto Exit;
+ goto Bad;
}
/* Get the nibble. */
@@ -250,17 +247,28 @@
if ( nib >= 10 )
break;
- exponent = exponent * 10 + nib;
-
/* Arbitrarily limit exponent. */
if ( exponent > 1000 )
- goto Exit;
+ have_overflow = 1;
+ else
+ exponent = exponent * 10 + nib;
}
if ( exponent_sign )
exponent = -exponent;
}
+ if ( !number )
+ goto Exit;
+
+ if ( have_overflow )
+ {
+ if ( exponent_sign )
+ goto Underflow;
+ else
+ goto Overflow;
+ }
+
/* We don't check `power_ten' and `exponent_add'. */
exponent += power_ten + exponent_add;
@@ -286,20 +294,25 @@
/* Make `scaling' as small as possible. */
new_fraction_length = FT_MIN( exponent, 5 );
- exponent -= new_fraction_length;
shift = new_fraction_length - fraction_length;
- number *= power_tens[shift];
- if ( number > 0x7FFFL )
+ if ( shift > 0 )
{
- number /= 10;
- exponent += 1;
+ exponent -= new_fraction_length;
+ number *= power_tens[shift];
+ if ( number > 0x7FFFL )
+ {
+ number /= 10;
+ exponent += 1;
+ }
}
+ else
+ exponent -= fraction_length;
}
else
exponent -= fraction_length;
- result = number << 16;
+ result = (FT_Long)( (FT_ULong)number << 16 );
*scaling = exponent;
}
}
@@ -322,9 +335,10 @@
integer_length += exponent;
fraction_length -= exponent;
- /* Check for overflow and underflow. */
- if ( FT_ABS( integer_length ) > 5 )
- goto Exit;
+ if ( integer_length > 5 )
+ goto Overflow;
+ if ( integer_length < -5 )
+ goto Underflow;
/* Remove non-significant digits. */
if ( integer_length < 0 )
@@ -353,17 +367,32 @@
number *= power_tens[-fraction_length];
if ( number > 0x7FFFL )
- goto Exit;
+ goto Overflow;
- result = number << 16;
+ result = (FT_Long)( (FT_ULong)number << 16 );
}
}
+ Exit:
if ( sign )
result = -result;
- Exit:
return result;
+
+ Overflow:
+ result = 0x7FFFFFFFL;
+ FT_TRACE4(( "!!!OVERFLOW:!!!" ));
+ goto Exit;
+
+ Underflow:
+ result = 0;
+ FT_TRACE4(( "!!!UNDERFLOW:!!!" ));
+ goto Exit;
+
+ Bad:
+ result = 0;
+ FT_TRACE4(( "!!!END OF DATA:!!!" ));
+ goto Exit;
}
@@ -378,10 +407,44 @@
/* read a floating point number, either integer or real */
static FT_Fixed
+ do_fixed( FT_Byte** d,
+ FT_Long scaling )
+ {
+ if ( **d == 30 )
+ return cff_parse_real( d[0], d[1], scaling, NULL );
+ else
+ {
+ FT_Long val = cff_parse_integer( d[0], d[1] );
+
+
+ if ( scaling )
+ val *= power_tens[scaling];
+
+ if ( val > 0x7FFF )
+ {
+ val = 0x7FFFFFFFL;
+ goto Overflow;
+ }
+ else if ( val < -0x7FFF )
+ {
+ val = -0x7FFFFFFFL;
+ goto Overflow;
+ }
+
+ return (FT_Long)( (FT_ULong)val << 16 );
+
+ Overflow:
+ FT_TRACE4(( "!!!OVERFLOW:!!!" ));
+ return val;
+ }
+ }
+
+
+ /* read a floating point number, either integer or real */
+ static FT_Fixed
cff_parse_fixed( FT_Byte** d )
{
- return **d == 30 ? cff_parse_real( d[0], d[1], 0, NULL )
- : cff_parse_integer( d[0], d[1] ) << 16;
+ return do_fixed( d, 0 );
}
@@ -391,9 +454,7 @@
cff_parse_fixed_scaled( FT_Byte** d,
FT_Long scaling )
{
- return **d == 30 ? cff_parse_real( d[0], d[1], scaling, NULL )
- : ( cff_parse_integer( d[0], d[1] ) *
- power_tens[scaling] ) << 16;
+ return do_fixed( d, scaling );
}
@@ -436,7 +497,7 @@
else
{
*scaling = 0;
- return number << 16;
+ return (FT_Long)( (FT_ULong)number << 16 );
}
}
}
@@ -450,7 +511,7 @@
FT_Vector* offset = &dict->font_offset;
FT_ULong* upm = &dict->units_per_em;
FT_Byte** data = parser->stack;
- FT_Error error = CFF_Err_Stack_Underflow;
+ FT_Error error = FT_ERR( Stack_Underflow );
if ( parser->top >= parser->stack + 6 )
@@ -458,7 +519,7 @@
FT_Long scaling;
- error = CFF_Err_Ok;
+ error = FT_Err_Ok;
dict->has_font_matrix = TRUE;
@@ -523,7 +584,7 @@
FT_Error error;
- error = CFF_Err_Stack_Underflow;
+ error = FT_ERR( Stack_Underflow );
if ( parser->top >= parser->stack + 4 )
{
@@ -531,7 +592,7 @@
bbox->yMin = FT_RoundFix( cff_parse_fixed( data++ ) );
bbox->xMax = FT_RoundFix( cff_parse_fixed( data++ ) );
bbox->yMax = FT_RoundFix( cff_parse_fixed( data ) );
- error = CFF_Err_Ok;
+ error = FT_Err_Ok;
FT_TRACE4(( " [%d %d %d %d]\n",
bbox->xMin / 65536,
@@ -552,7 +613,7 @@
FT_Error error;
- error = CFF_Err_Stack_Underflow;
+ error = FT_ERR( Stack_Underflow );
if ( parser->top >= parser->stack + 2 )
{
@@ -561,7 +622,7 @@
FT_TRACE4(( " %lu %lu\n",
dict->private_size, dict->private_offset ));
- error = CFF_Err_Ok;
+ error = FT_Err_Ok;
}
return error;
@@ -576,7 +637,7 @@
FT_Error error;
- error = CFF_Err_Stack_Underflow;
+ error = FT_ERR( Stack_Underflow );
if ( parser->top >= parser->stack + 3 )
{
@@ -588,7 +649,7 @@
if ( dict->cid_supplement < 0 )
FT_TRACE1(( "cff_parse_cid_ros: negative supplement %d is found\n",
dict->cid_supplement ));
- error = CFF_Err_Ok;
+ error = FT_Err_Ok;
FT_TRACE4(( " %d %d %d\n",
dict->cid_registry,
@@ -730,7 +791,7 @@
FT_Create_Class_cff_field_handlers( FT_Library library,
CFF_Field_Handler** output_class )
{
- CFF_Field_Handler* clazz;
+ CFF_Field_Handler* clazz = NULL;
FT_Error error;
FT_Memory memory = library->memory;
@@ -857,7 +918,7 @@
*output_class = clazz;
- return CFF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -870,7 +931,7 @@
FT_Byte* limit )
{
FT_Byte* p = start;
- FT_Error error = CFF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Library library = parser->library;
FT_UNUSED( library );
@@ -944,7 +1005,7 @@
}
code = code | parser->object_code;
- for ( field = FT_CFF_FIELD_HANDLERS_GET; field->kind; field++ )
+ for ( field = CFF_FIELD_HANDLERS_GET; field->kind; field++ )
{
if ( field->code == (FT_Int)code )
{
@@ -1096,15 +1157,15 @@
return error;
Stack_Overflow:
- error = CFF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
Stack_Underflow:
- error = CFF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
Syntax_Error:
- error = CFF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
diff --git a/src/cff/cffpic.c b/src/cff/cffpic.c
index 1c19d58..f22e4f0 100644
--- a/src/cff/cffpic.c
+++ b/src/cff/cffpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for cff module. */
/* */
-/* Copyright 2009, 2010 by */
+/* Copyright 2009, 2010, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,65 +23,51 @@
#include "cffpic.h"
#include "cfferrs.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from cffdrivr.c */
FT_Error
- FT_Create_Class_cff_services(
- FT_Library library,
- FT_ServiceDescRec** output_class );
-
+ FT_Create_Class_cff_services( FT_Library library,
+ FT_ServiceDescRec** output_class );
void
- FT_Destroy_Class_cff_services(
- FT_Library library,
- FT_ServiceDescRec* clazz );
-
+ FT_Destroy_Class_cff_services( FT_Library library,
+ FT_ServiceDescRec* clazz );
void
- FT_Init_Class_cff_service_ps_info(
- FT_Library library,
- FT_Service_PsInfoRec* clazz );
-
+ FT_Init_Class_cff_service_ps_info( FT_Library library,
+ FT_Service_PsInfoRec* clazz );
void
- FT_Init_Class_cff_service_glyph_dict(
- FT_Library library,
- FT_Service_GlyphDictRec* clazz );
-
+ FT_Init_Class_cff_service_glyph_dict( FT_Library library,
+ FT_Service_GlyphDictRec* clazz );
void
- FT_Init_Class_cff_service_ps_name(
- FT_Library library,
- FT_Service_PsFontNameRec* clazz );
-
+ FT_Init_Class_cff_service_ps_name( FT_Library library,
+ FT_Service_PsFontNameRec* clazz );
void
- FT_Init_Class_cff_service_get_cmap_info(
- FT_Library library,
- FT_Service_TTCMapsRec* clazz );
-
+ FT_Init_Class_cff_service_get_cmap_info( FT_Library library,
+ FT_Service_TTCMapsRec* clazz );
void
- FT_Init_Class_cff_service_cid_info(
- FT_Library library,
- FT_Service_CIDRec* clazz );
+ FT_Init_Class_cff_service_cid_info( FT_Library library,
+ FT_Service_CIDRec* clazz );
/* forward declaration of PIC init functions from cffparse.c */
FT_Error
- FT_Create_Class_cff_field_handlers(
- FT_Library library,
- CFF_Field_Handler** output_class );
-
+ FT_Create_Class_cff_field_handlers( FT_Library library,
+ CFF_Field_Handler** output_class );
void
- FT_Destroy_Class_cff_field_handlers(
- FT_Library library,
- CFF_Field_Handler* clazz );
+ FT_Destroy_Class_cff_field_handlers( FT_Library library,
+ CFF_Field_Handler* clazz );
+
void
cff_driver_class_pic_free( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Memory memory = library->memory;
+ FT_Memory memory = library->memory;
if ( pic_container->cff )
{
- CffModulePIC* container = ( CffModulePIC* )pic_container->cff;
+ CffModulePIC* container = (CffModulePIC*)pic_container->cff;
if ( container->cff_services )
@@ -102,8 +88,8 @@
cff_driver_class_pic_init( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = CFF_Err_Ok;
- CffModulePIC* container;
+ FT_Error error = FT_Err_Ok;
+ CffModulePIC* container = NULL;
FT_Memory memory = library->memory;
@@ -113,15 +99,18 @@
FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->cff = 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 */
error = FT_Create_Class_cff_services( library,
&container->cff_services );
if ( error )
goto Exit;
+
error = FT_Create_Class_cff_field_handlers(
library, &container->cff_field_handlers );
if ( error )
goto Exit;
+
FT_Init_Class_cff_service_ps_info(
library, &container->cff_service_ps_info );
FT_Init_Class_cff_service_glyph_dict(
@@ -136,7 +125,8 @@
library, &container->cff_cmap_encoding_class_rec );
FT_Init_Class_cff_cmap_unicode_class_rec(
library, &container->cff_cmap_unicode_class_rec );
-Exit:
+
+ Exit:
if ( error )
cff_driver_class_pic_free( library );
return error;
diff --git a/src/cff/cffpic.h b/src/cff/cffpic.h
index 342edd8..50bab4c 100644
--- a/src/cff/cffpic.h
+++ b/src/cff/cffpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for cff module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,16 +24,19 @@ FT_BEGIN_HEADER
#include FT_INTERNAL_PIC_H
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_CFF_SERVICE_PS_INFO_GET cff_service_ps_info
-#define FT_CFF_SERVICE_GLYPH_DICT_GET cff_service_glyph_dict
-#define FT_CFF_SERVICE_PS_NAME_GET cff_service_ps_name
-#define FT_CFF_SERVICE_GET_CMAP_INFO_GET cff_service_get_cmap_info
-#define FT_CFF_SERVICE_CID_INFO_GET cff_service_cid_info
-#define FT_CFF_SERVICES_GET cff_services
-#define FT_CFF_CMAP_ENCODING_CLASS_REC_GET cff_cmap_encoding_class_rec
-#define FT_CFF_CMAP_UNICODE_CLASS_REC_GET cff_cmap_unicode_class_rec
-#define FT_CFF_FIELD_HANDLERS_GET cff_field_handlers
+
+#define CFF_SERVICE_PS_INFO_GET cff_service_ps_info
+#define CFF_SERVICE_GLYPH_DICT_GET cff_service_glyph_dict
+#define CFF_SERVICE_PS_NAME_GET cff_service_ps_name
+#define CFF_SERVICE_GET_CMAP_INFO_GET cff_service_get_cmap_info
+#define CFF_SERVICE_CID_INFO_GET cff_service_cid_info
+#define CFF_SERVICE_PROPERTIES_GET cff_service_properties
+#define CFF_SERVICES_GET cff_services
+#define CFF_CMAP_ENCODING_CLASS_REC_GET cff_cmap_encoding_class_rec
+#define CFF_CMAP_UNICODE_CLASS_REC_GET cff_cmap_unicode_class_rec
+#define CFF_FIELD_HANDLERS_GET cff_field_handlers
#else /* FT_CONFIG_OPTION_PIC */
@@ -43,30 +46,48 @@ FT_BEGIN_HEADER
#include FT_SERVICE_POSTSCRIPT_NAME_H
#include FT_SERVICE_TT_CMAP_H
#include FT_SERVICE_CID_H
+#include FT_SERVICE_PROPERTIES_H
+
- typedef struct CffModulePIC_
+ typedef struct CffModulePIC_
{
- FT_ServiceDescRec* cff_services;
- CFF_Field_Handler* cff_field_handlers;
- FT_Service_PsInfoRec cff_service_ps_info;
- FT_Service_GlyphDictRec cff_service_glyph_dict;
- FT_Service_PsFontNameRec cff_service_ps_name;
- FT_Service_TTCMapsRec cff_service_get_cmap_info;
- FT_Service_CIDRec cff_service_cid_info;
- FT_CMap_ClassRec cff_cmap_encoding_class_rec;
- FT_CMap_ClassRec cff_cmap_unicode_class_rec;
+ FT_ServiceDescRec* cff_services;
+ CFF_Field_Handler* cff_field_handlers;
+ FT_Service_PsInfoRec cff_service_ps_info;
+ FT_Service_GlyphDictRec cff_service_glyph_dict;
+ FT_Service_PsFontNameRec cff_service_ps_name;
+ FT_Service_TTCMapsRec cff_service_get_cmap_info;
+ FT_Service_CIDRec cff_service_cid_info;
+ FT_Service_PropertiesRec cff_service_properties;
+ FT_CMap_ClassRec cff_cmap_encoding_class_rec;
+ FT_CMap_ClassRec cff_cmap_unicode_class_rec;
+
} CffModulePIC;
-#define GET_PIC(lib) ((CffModulePIC*)((lib)->pic_container.cff))
-#define FT_CFF_SERVICE_PS_INFO_GET (GET_PIC(library)->cff_service_ps_info)
-#define FT_CFF_SERVICE_GLYPH_DICT_GET (GET_PIC(library)->cff_service_glyph_dict)
-#define FT_CFF_SERVICE_PS_NAME_GET (GET_PIC(library)->cff_service_ps_name)
-#define FT_CFF_SERVICE_GET_CMAP_INFO_GET (GET_PIC(library)->cff_service_get_cmap_info)
-#define FT_CFF_SERVICE_CID_INFO_GET (GET_PIC(library)->cff_service_cid_info)
-#define FT_CFF_SERVICES_GET (GET_PIC(library)->cff_services)
-#define FT_CFF_CMAP_ENCODING_CLASS_REC_GET (GET_PIC(library)->cff_cmap_encoding_class_rec)
-#define FT_CFF_CMAP_UNICODE_CLASS_REC_GET (GET_PIC(library)->cff_cmap_unicode_class_rec)
-#define FT_CFF_FIELD_HANDLERS_GET (GET_PIC(library)->cff_field_handlers)
+
+#define GET_PIC( lib ) \
+ ( (CffModulePIC*)( (lib)->pic_container.cff ) )
+
+#define CFF_SERVICE_PS_INFO_GET \
+ ( GET_PIC( library )->cff_service_ps_info )
+#define CFF_SERVICE_GLYPH_DICT_GET \
+ ( GET_PIC( library )->cff_service_glyph_dict )
+#define CFF_SERVICE_PS_NAME_GET \
+ ( GET_PIC( library )->cff_service_ps_name )
+#define CFF_SERVICE_GET_CMAP_INFO_GET \
+ ( GET_PIC( library )->cff_service_get_cmap_info )
+#define CFF_SERVICE_CID_INFO_GET \
+ ( GET_PIC( library )->cff_service_cid_info )
+#define CFF_SERVICE_PROPERTIES_GET \
+ ( GET_PIC( library )->cff_service_properties )
+#define CFF_SERVICES_GET \
+ ( GET_PIC( library )->cff_services )
+#define CFF_CMAP_ENCODING_CLASS_REC_GET \
+ ( GET_PIC( library )->cff_cmap_encoding_class_rec )
+#define CFF_CMAP_UNICODE_CLASS_REC_GET \
+ ( GET_PIC( library )->cff_cmap_unicode_class_rec )
+#define CFF_FIELD_HANDLERS_GET \
+ ( GET_PIC( library )->cff_field_handlers )
/* see cffpic.c for the implementation */
void
diff --git a/src/cff/cfftypes.h b/src/cff/cfftypes.h
index 7c99036..8727446 100644
--- a/src/cff/cfftypes.h
+++ b/src/cff/cfftypes.h
@@ -5,7 +5,7 @@
/* Basic OpenType/CFF type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2003, 2006-2008, 2010-2011 by */
+/* Copyright 1996-2003, 2006-2008, 2010-2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -270,6 +270,9 @@ FT_BEGIN_HEADER
FT_String* registry;
FT_String* ordering;
+ /* since version 2.4.12 */
+ FT_Generic cf2_instance;
+
} CFF_FontRec, *CFF_Font;
diff --git a/src/cff/rules.mk b/src/cff/rules.mk
index ca7aa5d..13115c2 100644
--- a/src/cff/rules.mk
+++ b/src/cff/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001, 2003, 2011 by
+# Copyright 1996-2001, 2003, 2011, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -29,14 +29,27 @@ CFF_DRV_SRC := $(CFF_DIR)/cffcmap.c \
$(CFF_DIR)/cffload.c \
$(CFF_DIR)/cffobjs.c \
$(CFF_DIR)/cffparse.c \
- $(CFF_DIR)/cffpic.c
+ $(CFF_DIR)/cffpic.c \
+ $(CFF_DIR)/cf2arrst.c \
+ $(CFF_DIR)/cf2blues.c \
+ $(CFF_DIR)/cf2error.c \
+ $(CFF_DIR)/cf2font.c \
+ $(CFF_DIR)/cf2ft.c \
+ $(CFF_DIR)/cf2hints.c \
+ $(CFF_DIR)/cf2intrp.c \
+ $(CFF_DIR)/cf2read.c \
+ $(CFF_DIR)/cf2stack.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_DIR)/cfftypes.h \
+ $(CFF_DIR)/cf2fixed.h \
+ $(CFF_DIR)/cf2glue.h \
+ $(CFF_DIR)/cf2types.h
# CFF driver object(s)
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index bd84023..7febab8 100644
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */
+/* Copyright 1996-2007, 2009, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -46,7 +46,7 @@
FT_Byte* p;
FT_UInt fd_select;
FT_Stream stream = face->cid_stream;
- FT_Error error = CID_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte* charstring = 0;
FT_Memory memory = face->root.memory;
FT_ULong glyph_length = 0;
@@ -58,7 +58,7 @@
#endif
- FT_TRACE4(( "cid_load_glyph: glyph index %d\n", glyph_index ));
+ FT_TRACE1(( "cid_load_glyph: glyph index %d\n", glyph_index ));
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -117,7 +117,7 @@
if ( fd_select >= (FT_UInt)cid->num_dicts )
{
- error = CID_Err_Invalid_Offset;
+ error = FT_THROW( Invalid_Offset );
goto Exit;
}
if ( glyph_length == 0 )
@@ -258,7 +258,7 @@
psaux->t1_decoder_funcs->done( &decoder );
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
@@ -284,7 +284,7 @@
if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
{
- error = CID_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index 3b840b7..1cda0ee 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 font loader (body). */
/* */
-/* Copyright 1996-2006, 2009, 2011-2012 by */
+/* Copyright 1996-2006, 2009, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -42,7 +42,7 @@
cid_get_offset( FT_Byte* *start,
FT_Byte offsize )
{
- FT_Long result;
+ FT_ULong result;
FT_Byte* p = *start;
@@ -53,7 +53,7 @@
}
*start = p;
- return result;
+ return (FT_Long)result;
}
@@ -114,7 +114,7 @@
{
FT_ERROR(( "cid_load_keyword: invalid use of `%s'\n",
keyword->ident ));
- error = CID_Err_Syntax_Error;
+ error = FT_THROW( Syntax_Error );
goto Exit;
}
@@ -150,8 +150,6 @@
cid_parse_font_matrix( CID_Face face,
CID_Parser* parser )
{
- FT_Matrix* matrix;
- FT_Vector* offset;
CID_FaceDict dict;
FT_Face root = (FT_Face)&face->root;
FT_Fixed temp[6];
@@ -160,19 +158,33 @@
if ( parser->num_dict >= 0 && parser->num_dict < face->cid.num_dicts )
{
+ FT_Matrix* matrix;
+ FT_Vector* offset;
+ FT_Int result;
+
+
dict = face->cid.font_dicts + parser->num_dict;
matrix = &dict->font_matrix;
offset = &dict->font_offset;
- (void)cid_parser_to_fixed_array( parser, 6, temp, 3 );
+ result = cid_parser_to_fixed_array( parser, 6, temp, 3 );
+
+ if ( result < 6 )
+ return FT_THROW( Invalid_File_Format );
temp_scale = FT_ABS( temp[3] );
- /* Set units per EM based on FontMatrix values. We set the value to */
- /* `1000/temp_scale', because temp_scale was already multiplied by */
- /* 1000 (in `t1_tofixed', from psobjs.c). */
- root->units_per_EM = (FT_UShort)( FT_DivFix( 0x10000L,
- FT_DivFix( temp_scale, 1000 ) ) );
+ if ( temp_scale == 0 )
+ {
+ FT_ERROR(( "cid_parse_font_matrix: invalid font matrix\n" ));
+ return FT_THROW( Invalid_File_Format );
+ }
+
+ /* Set Units per EM based on FontMatrix values. We set the value to */
+ /* 1000 / temp_scale, because temp_scale was already multiplied by */
+ /* 1000 (in t1_tofixed, from psobjs.c). */
+
+ root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale );
/* we need to scale the values by 1.0/temp[3] */
if ( temp_scale != 0x10000L )
@@ -182,7 +194,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];
@@ -195,8 +207,7 @@
offset->y = temp[5] >> 16;
}
- return CID_Err_Ok; /* this is a callback function; */
- /* we must return an error code */
+ return FT_Err_Ok;
}
@@ -206,7 +217,7 @@
{
CID_FaceInfo cid = &face->cid;
FT_Memory memory = face->root.memory;
- FT_Error error = CID_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Long num_dicts;
@@ -257,7 +268,7 @@
dict->private_dict.expansion_factor = dict->expansion_factor;
}
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
@@ -286,7 +297,7 @@
parser->root.cursor = base;
parser->root.limit = base + size;
- parser->root.error = CID_Err_Ok;
+ parser->root.error = FT_Err_Ok;
{
FT_Byte* cur = base;
@@ -416,7 +427,7 @@
/* Check for possible overflow. */
if ( num_subrs == FT_UINT_MAX )
{
- error = CID_Err_Syntax_Error;
+ error = FT_THROW( Syntax_Error );
goto Fail;
}
@@ -428,7 +439,7 @@
if ( new_max <= max_offsets )
{
- error = CID_Err_Syntax_Error;
+ error = FT_THROW( Syntax_Error );
goto Fail;
}
@@ -571,7 +582,7 @@
if ( size == 0 )
{
- error = CID_Err_Syntax_Error;
+ error = FT_THROW( Syntax_Error );
goto Exit;
}
@@ -604,7 +615,7 @@
}
else
{
- error = CID_Err_Syntax_Error;
+ error = FT_THROW( Syntax_Error );
goto Exit;
}
@@ -624,7 +635,7 @@
p++;
}
- error = CID_Err_Ok;
+ error = FT_Err_Ok;
Exit:
return error;
diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c
index cc2a200..5932ffa 100644
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -4,7 +4,7 @@
/* */
/* CID objects manager (body). */
/* */
-/* Copyright 1996-2006, 2008, 2010-2011 by */
+/* Copyright 1996-2006, 2008, 2010-2011, 2013 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 = CID_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );
@@ -169,7 +169,7 @@
size->metrics.y_scale,
0, 0 );
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
@@ -302,7 +302,7 @@
if ( !psaux )
{
FT_ERROR(( "cid_face_init: cannot access `psaux' module\n" ));
- error = CID_Err_Missing_Module;
+ error = FT_THROW( Missing_Module );
goto Exit;
}
@@ -337,7 +337,7 @@
if ( face_index != 0 )
{
FT_ERROR(( "cid_face_init: invalid face index\n" ));
- error = CID_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -355,9 +355,10 @@
cidface->num_charmaps = 0;
cidface->face_index = face_index;
- cidface->face_flags = FT_FACE_FLAG_SCALABLE | /* scalable outlines */
- FT_FACE_FLAG_HORIZONTAL | /* horizontal data */
- FT_FACE_FLAG_HINTER; /* has native hinter */
+
+ cidface->face_flags |= FT_FACE_FLAG_SCALABLE | /* scalable outlines */
+ FT_FACE_FLAG_HORIZONTAL | /* horizontal data */
+ FT_FACE_FLAG_HINTER; /* has native hinter */
if ( info->is_fixed_pitch )
cidface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
@@ -466,7 +467,7 @@
{
FT_UNUSED( driver );
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c
index 4d21160..d8476cd 100644
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 parser (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 1996-2007, 2009, 2013, 2014 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 @@
"%!PS-Adobe-3.0 Resource-CIDFont", 31 ) )
{
FT_TRACE2(( " not a CID-keyed font\n" ));
- error = CID_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
}
FT_FRAME_EXIT();
@@ -99,7 +99,7 @@
if ( stream_len == 0 )
{
FT_TRACE2(( "cid_parser_new: no `StartData' keyword found\n" ));
- error = CID_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -117,12 +117,12 @@
if ( p[0] == 'S' && ft_strncmp( (char*)p, "StartData", 9 ) == 0 )
{
/* save offset of binary data after `StartData' */
- offset += p - buffer + 10;
+ offset += (FT_ULong)( p - buffer + 10 );
goto Found;
}
else if ( p[1] == 's' && ft_strncmp( (char*)p, "/sfnts", 6 ) == 0 )
{
- offset += p - buffer + 7;
+ offset += (FT_ULong)( p - buffer + 7 );
goto Found;
}
}
@@ -178,14 +178,12 @@
if ( ft_strncmp( (char*)arg1, "(Hex)", 5 ) == 0 )
parser->binary_length = ft_atol( (const char *)arg2 );
- limit = parser->root.limit;
- cur = parser->root.cursor;
goto Exit;
}
else if ( cur[1] == 's' && ft_strncmp( (char*)cur, "/sfnts", 6 ) == 0 )
{
FT_TRACE2(( "cid_parser_new: cannot handle Type 11 fonts\n" ));
- error = CID_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
diff --git a/src/cid/cidparse.h b/src/cid/cidparse.h
index ca37dea..f27be65 100644
--- a/src/cid/cidparse.h
+++ b/src/cid/cidparse.h
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 parser (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004 by */
+/* Copyright 1996-2004, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -92,26 +92,26 @@ FT_BEGIN_HEADER
/* */
/*************************************************************************/
-#define cid_parser_skip_spaces( p ) \
+#define cid_parser_skip_spaces( p ) \
(p)->root.funcs.skip_spaces( &(p)->root )
-#define cid_parser_skip_PS_token( p ) \
+#define cid_parser_skip_PS_token( p ) \
(p)->root.funcs.skip_PS_token( &(p)->root )
-#define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root )
-#define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
+#define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root )
+#define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
-#define cid_parser_to_coord_array( p, m, c ) \
+#define cid_parser_to_coord_array( p, m, c ) \
(p)->root.funcs.to_coord_array( &(p)->root, m, c )
-#define cid_parser_to_fixed_array( p, m, f, t ) \
+#define cid_parser_to_fixed_array( p, m, f, t ) \
(p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
-#define cid_parser_to_token( p, t ) \
+#define cid_parser_to_token( p, t ) \
(p)->root.funcs.to_token( &(p)->root, t )
-#define cid_parser_to_token_array( p, t, m, c ) \
+#define cid_parser_to_token_array( p, t, m, c ) \
(p)->root.funcs.to_token_array( &(p)->root, t, m, c )
-#define cid_parser_load_field( p, f, o ) \
+#define cid_parser_load_field( p, f, o ) \
(p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )
-#define cid_parser_load_field_table( p, f, o ) \
+#define cid_parser_load_field_table( p, f, o ) \
(p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )
diff --git a/src/cid/cidriver.c b/src/cid/cidriver.c
index 694070a..6132a27 100644
--- a/src/cid/cidriver.c
+++ b/src/cid/cidriver.c
@@ -4,7 +4,7 @@
/* */
/* CID driver interface (body). */
/* */
-/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */
+/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -74,7 +74,7 @@
{
*afont_info = ((CID_Face)face)->cid.font_info;
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
static FT_Error
@@ -83,7 +83,7 @@
{
*afont_extra = ((CID_Face)face)->font_extra;
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
static const FT_Service_PsInfoRec cid_service_ps_info =
@@ -118,7 +118,7 @@
if ( supplement )
*supplement = cid->supplement;
- return CID_Err_Ok;
+ return FT_Err_Ok;
}
@@ -126,7 +126,7 @@
cid_get_is_cid( CID_Face face,
FT_Bool *is_cid )
{
- FT_Error error = CID_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( face );
@@ -142,7 +142,7 @@
FT_UInt glyph_index,
FT_UInt *cid )
{
- FT_Error error = CID_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( face );
@@ -221,11 +221,6 @@
cid_slot_init,
cid_slot_done,
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- ft_stub_set_char_sizes,
- ft_stub_set_pixel_sizes,
-#endif
-
cid_slot_load_glyph,
0, /* FT_Face_GetKerningFunc */
diff --git a/src/gxvalid/gxvbsln.c b/src/gxvalid/gxvbsln.c
index 3d10031..d165118 100644
--- a/src/gxvalid/gxvbsln.c
+++ b/src/gxvalid/gxvbsln.c
@@ -72,10 +72,10 @@
static void
gxv_bsln_LookupValue_validate( FT_UShort glyph,
GXV_LookupValueCPtr value_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
- FT_UShort v = value_p->u;
- FT_UShort* ctlPoints;
+ FT_UShort v = value_p->u;
+ FT_UShort* ctlPoints;
FT_UNUSED( glyph );
@@ -124,7 +124,7 @@
gxv_bsln_LookupFmt4_transit( FT_UShort relative_gindex,
GXV_LookupValueCPtr base_value_p,
FT_Bytes lookuptbl_limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p;
FT_Bytes limit;
@@ -135,7 +135,7 @@
offset = (FT_UShort)( base_value_p->u +
( relative_gindex * sizeof ( FT_UShort ) ) );
- p = valid->lookuptbl_head + offset;
+ p = gxvalid->lookuptbl_head + offset;
limit = lookuptbl_limit;
GXV_LIMIT_CHECK( 2 );
@@ -148,7 +148,7 @@
static void
gxv_bsln_parts_fmt0_validate( FT_Bytes tables,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = tables;
@@ -158,7 +158,7 @@
/* deltas */
GXV_LIMIT_CHECK( 2 * GXV_BSLN_VALUE_COUNT );
- valid->table_data = NULL; /* No ctlPoints here. */
+ gxvalid->table_data = NULL; /* No ctlPoints here. */
GXV_EXIT;
}
@@ -167,7 +167,7 @@
static void
gxv_bsln_parts_fmt1_validate( FT_Bytes tables,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = tables;
@@ -175,15 +175,15 @@
GXV_NAME_ENTER( "parts format 1" );
/* deltas */
- gxv_bsln_parts_fmt0_validate( p, limit, valid );
+ gxv_bsln_parts_fmt0_validate( p, limit, gxvalid );
/* mappingData */
- valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
- valid->lookupval_func = gxv_bsln_LookupValue_validate;
- valid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit;
+ gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+ gxvalid->lookupval_func = gxv_bsln_LookupValue_validate;
+ gxvalid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit;
gxv_LookupTable_validate( p + 2 * GXV_BSLN_VALUE_COUNT,
limit,
- valid );
+ gxvalid );
GXV_EXIT;
}
@@ -192,7 +192,7 @@
static void
gxv_bsln_parts_fmt2_validate( FT_Bytes tables,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = tables;
@@ -211,7 +211,7 @@
stdGlyph = FT_NEXT_USHORT( p );
GXV_TRACE(( " (stdGlyph = %u)\n", stdGlyph ));
- gxv_glyphid_validate( stdGlyph, valid );
+ gxv_glyphid_validate( stdGlyph, gxvalid );
/* Record the position of ctlPoints */
GXV_BSLN_DATA( ctlPoints_p ) = p;
@@ -226,7 +226,7 @@
FT_INVALID_DATA;
}
else
- gxv_ctlPoint_validate( stdGlyph, (FT_Short)ctlPoint, valid );
+ gxv_ctlPoint_validate( stdGlyph, (FT_Short)ctlPoint, gxvalid );
}
GXV_EXIT;
@@ -236,7 +236,7 @@
static void
gxv_bsln_parts_fmt3_validate( FT_Bytes tables,
FT_Bytes limit,
- GXV_Validator valid)
+ GXV_Validator gxvalid)
{
FT_Bytes p = tables;
@@ -244,15 +244,15 @@
GXV_NAME_ENTER( "parts format 3" );
/* stdGlyph + ctlPoints */
- gxv_bsln_parts_fmt2_validate( p, limit, valid );
+ gxv_bsln_parts_fmt2_validate( p, limit, gxvalid );
/* mappingData */
- valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
- valid->lookupval_func = gxv_bsln_LookupValue_validate;
- valid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit;
+ gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+ gxvalid->lookupval_func = gxv_bsln_LookupValue_validate;
+ gxvalid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit;
gxv_LookupTable_validate( p + ( 2 + 2 * GXV_BSLN_VALUE_COUNT ),
limit,
- valid );
+ gxvalid );
GXV_EXIT;
}
@@ -271,8 +271,8 @@
FT_Face face,
FT_Validator ftvalid )
{
- GXV_ValidatorRec validrec;
- GXV_Validator valid = &validrec;
+ GXV_ValidatorRec gxvalidrec;
+ GXV_Validator gxvalid = &gxvalidrec;
GXV_bsln_DataRec bslnrec;
GXV_bsln_Data bsln = &bslnrec;
@@ -293,9 +293,9 @@
};
- valid->root = ftvalid;
- valid->table_data = bsln;
- valid->face = face;
+ gxvalid->root = ftvalid;
+ gxvalid->table_data = bsln;
+ gxvalid->face = face;
FT_TRACE3(( "validating `bsln' table\n" ));
GXV_INIT;
@@ -320,7 +320,7 @@
bsln->defaultBaseline = defaultBaseline;
- fmt_funcs_table[format]( p, limit, valid );
+ fmt_funcs_table[format]( p, limit, gxvalid );
FT_TRACE4(( "\n" ));
}
diff --git a/src/gxvalid/gxvcommn.c b/src/gxvalid/gxvcommn.c
index 72efd6f..8e72a72 100644
--- a/src/gxvalid/gxvcommn.c
+++ b/src/gxvalid/gxvcommn.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT common tables validation (body). */
/* */
-/* Copyright 2004, 2005, 2009, 2010 */
+/* Copyright 2004, 2005, 2009, 2010, 2013 */
/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -65,7 +65,7 @@
FT_UShort* buff,
FT_UInt nmemb,
FT_UShort limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UInt i;
@@ -130,7 +130,7 @@
FT_ULong* buff,
FT_UInt nmemb,
FT_ULong limit,
- GXV_Validator valid)
+ GXV_Validator gxvalid)
{
FT_UInt i;
@@ -182,7 +182,7 @@
FT_Bytes limit,
FT_Byte* min,
FT_Byte* max,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -202,7 +202,7 @@
*max = (FT_Byte)FT_MAX( *max, val );
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
}
@@ -211,7 +211,7 @@
FT_Bytes limit,
FT_UShort* min,
FT_UShort* max,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -231,7 +231,7 @@
*max = (FT_Byte)FT_MAX( *max, val );
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
}
@@ -256,7 +256,7 @@
static void
gxv_BinSrchHeader_check_consistency( GXV_BinSrchHeader* binSrchHeader,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UShort searchRange;
FT_UShort entrySelector;
@@ -329,7 +329,7 @@
FT_Bytes limit,
FT_UShort* unitSize_p,
FT_UShort* nUnits_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
GXV_BinSrchHeader binSrchHeader;
@@ -359,7 +359,7 @@
binSrchHeader.rangeShift = FT_NEXT_USHORT( p );
GXV_TRACE(( "nUnits %d\n", binSrchHeader.nUnits ));
- gxv_BinSrchHeader_check_consistency( &binSrchHeader, valid );
+ gxv_BinSrchHeader_check_consistency( &binSrchHeader, gxvalid );
if ( *unitSize_p == 0 )
*unitSize_p = binSrchHeader.unitSize;
@@ -367,7 +367,7 @@
if ( *nUnits_p == 0 )
*nUnits_p = binSrchHeader.nUnits;
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -422,7 +422,7 @@
static void
gxv_LookupTable_fmt0_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort i;
@@ -432,24 +432,24 @@
GXV_NAME_ENTER( "LookupTable format 0" );
- GXV_LIMIT_CHECK( 2 * valid->face->num_glyphs );
+ GXV_LIMIT_CHECK( 2 * gxvalid->face->num_glyphs );
- for ( i = 0; i < valid->face->num_glyphs; i++ )
+ for ( i = 0; i < gxvalid->face->num_glyphs; i++ )
{
GXV_LIMIT_CHECK( 2 );
if ( p + 2 >= limit ) /* some fonts have too-short fmt0 array */
{
GXV_TRACE(( "too short, glyphs %d - %d are missing\n",
- i, valid->face->num_glyphs ));
+ i, gxvalid->face->num_glyphs ));
GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
break;
}
- value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign );
- valid->lookupval_func( i, &value, valid );
+ value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );
+ gxvalid->lookupval_func( i, &value, gxvalid );
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -473,12 +473,12 @@
static void
gxv_LookupTable_fmt2_skip_endmarkers( FT_Bytes table,
FT_UShort unitSize,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
- while ( ( p + 4 ) < valid->root->limit )
+ while ( ( p + 4 ) < gxvalid->root->limit )
{
if ( p[0] != 0xFF || p[1] != 0xFF || /* lastGlyph */
p[2] != 0xFF || p[3] != 0xFF ) /* firstGlyph */
@@ -486,14 +486,14 @@
p += unitSize;
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
}
static void
gxv_LookupTable_fmt2_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort gid;
@@ -509,8 +509,8 @@
GXV_NAME_ENTER( "LookupTable format 2" );
unitSize = nUnits = 0;
- gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, valid );
- p += valid->subtable_length;
+ gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid );
+ p += gxvalid->subtable_length;
GXV_UNITSIZE_VALIDATE( "format2", unitSize, nUnits, 6 );
@@ -519,10 +519,10 @@
GXV_LIMIT_CHECK( 2 + 2 + 2 );
lastGlyph = FT_NEXT_USHORT( p );
firstGlyph = FT_NEXT_USHORT( p );
- value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign );
+ value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );
- gxv_glyphid_validate( firstGlyph, valid );
- gxv_glyphid_validate( lastGlyph, valid );
+ gxv_glyphid_validate( firstGlyph, gxvalid );
+ gxv_glyphid_validate( lastGlyph, gxvalid );
if ( lastGlyph < gid )
{
@@ -539,7 +539,7 @@
unit, lastGlyph, firstGlyph ));
GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
- if ( valid->root->level == FT_VALIDATE_TIGHT )
+ if ( gxvalid->root->level == FT_VALIDATE_TIGHT )
continue; /* ftxvalidator silently skips such an entry */
FT_TRACE4(( "continuing with exchanged values\n" ));
@@ -549,13 +549,13 @@
}
for ( gid = firstGlyph; gid <= lastGlyph; gid++ )
- valid->lookupval_func( gid, &value, valid );
+ gxvalid->lookupval_func( gid, &value, gxvalid );
}
- gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, valid );
- p += valid->subtable_length;
+ gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, gxvalid );
+ p += gxvalid->subtable_length;
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -564,7 +564,7 @@
static void
gxv_LookupTable_fmt4_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort unit;
@@ -581,8 +581,8 @@
GXV_NAME_ENTER( "LookupTable format 4" );
unitSize = nUnits = 0;
- gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, valid );
- p += valid->subtable_length;
+ gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid );
+ p += gxvalid->subtable_length;
GXV_UNITSIZE_VALIDATE( "format4", unitSize, nUnits, 6 );
@@ -592,8 +592,8 @@
lastGlyph = FT_NEXT_USHORT( p );
firstGlyph = FT_NEXT_USHORT( p );
- gxv_glyphid_validate( firstGlyph, valid );
- gxv_glyphid_validate( lastGlyph, valid );
+ gxv_glyphid_validate( firstGlyph, gxvalid );
+ gxv_glyphid_validate( lastGlyph, gxvalid );
if ( lastGlyph < gid )
{
@@ -610,7 +610,7 @@
unit, lastGlyph, firstGlyph ));
GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
- if ( valid->root->level == FT_VALIDATE_TIGHT )
+ if ( gxvalid->root->level == FT_VALIDATE_TIGHT )
continue; /* ftxvalidator silently skips such an entry */
FT_TRACE4(( "continuing with exchanged values\n" ));
@@ -624,19 +624,19 @@
for ( gid = firstGlyph; gid <= lastGlyph; gid++ )
{
- value = valid->lookupfmt4_trans( (FT_UShort)( gid - firstGlyph ),
+ value = gxvalid->lookupfmt4_trans( (FT_UShort)( gid - firstGlyph ),
&base_value,
limit,
- valid );
+ gxvalid );
- valid->lookupval_func( gid, &value, valid );
+ gxvalid->lookupval_func( gid, &value, gxvalid );
}
}
- gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, valid );
- p += valid->subtable_length;
+ gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, gxvalid );
+ p += gxvalid->subtable_length;
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -645,26 +645,26 @@
static void
gxv_LookupTable_fmt6_skip_endmarkers( FT_Bytes table,
FT_UShort unitSize,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
- while ( p < valid->root->limit )
+ while ( p < gxvalid->root->limit )
{
if ( p[0] != 0xFF || p[1] != 0xFF )
break;
p += unitSize;
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
}
static void
gxv_LookupTable_fmt6_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort unit;
@@ -679,8 +679,8 @@
GXV_NAME_ENTER( "LookupTable format 6" );
unitSize = nUnits = 0;
- gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, valid );
- p += valid->subtable_length;
+ gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid );
+ p += gxvalid->subtable_length;
GXV_UNITSIZE_VALIDATE( "format6", unitSize, nUnits, 4 );
@@ -688,9 +688,9 @@
{
GXV_LIMIT_CHECK( 2 + 2 );
glyph = FT_NEXT_USHORT( p );
- value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign );
+ value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );
- if ( gxv_glyphid_validate( glyph, valid ) )
+ if ( gxv_glyphid_validate( glyph, gxvalid ) )
GXV_TRACE(( " endmarker found within defined range"
" (entry %d < nUnits=%d)\n",
unit, nUnits ));
@@ -703,13 +703,13 @@
}
prev_glyph = glyph;
- valid->lookupval_func( glyph, &value, valid );
+ gxvalid->lookupval_func( glyph, &value, gxvalid );
}
- gxv_LookupTable_fmt6_skip_endmarkers( p, unitSize, valid );
- p += valid->subtable_length;
+ gxv_LookupTable_fmt6_skip_endmarkers( p, unitSize, gxvalid );
+ p += gxvalid->subtable_length;
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -718,7 +718,7 @@
static void
gxv_LookupTable_fmt8_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort i;
@@ -735,18 +735,18 @@
firstGlyph = FT_NEXT_USHORT( p );
glyphCount = FT_NEXT_USHORT( p );
- gxv_glyphid_validate( firstGlyph, valid );
- gxv_glyphid_validate( (FT_UShort)( firstGlyph + glyphCount ), valid );
+ gxv_glyphid_validate( firstGlyph, gxvalid );
+ gxv_glyphid_validate( (FT_UShort)( firstGlyph + glyphCount ), gxvalid );
/* valueArray */
for ( i = 0; i < glyphCount; i++ )
{
GXV_LIMIT_CHECK( 2 );
- value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign );
- valid->lookupval_func( (FT_UShort)( firstGlyph + i ), &value, valid );
+ value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );
+ gxvalid->lookupval_func( (FT_UShort)( firstGlyph + i ), &value, gxvalid );
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -754,7 +754,7 @@
FT_LOCAL_DEF( void )
gxv_LookupTable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort format;
@@ -778,7 +778,7 @@
GXV_NAME_ENTER( "LookupTable" );
/* lookuptbl_head may be used in fmt4 transit function. */
- valid->lookuptbl_head = table;
+ gxvalid->lookuptbl_head = table;
/* format */
GXV_LIMIT_CHECK( 2 );
@@ -792,10 +792,10 @@
if ( func == NULL )
FT_INVALID_FORMAT;
- func( p, limit, valid );
- p += valid->subtable_length;
+ func( p, limit, gxvalid );
+ p += gxvalid->subtable_length;
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -811,7 +811,7 @@
FT_LOCAL_DEF( FT_Int )
gxv_glyphid_validate( FT_UShort gid,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Face face;
@@ -822,7 +822,7 @@
return 1;
}
- face = valid->face;
+ face = gxvalid->face;
if ( face->num_glyphs < gid )
{
GXV_TRACE(( " gxv_glyphid_check() gid overflow: num_glyphs %d < %d\n",
@@ -845,7 +845,7 @@
FT_LOCAL_DEF( void )
gxv_ctlPoint_validate( FT_UShort gid,
FT_Short ctl_point,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Face face;
FT_Error error;
@@ -855,7 +855,7 @@
short n_points;
- face = valid->face;
+ face = gxvalid->face;
error = FT_Load_Glyph( face,
gid,
@@ -885,7 +885,7 @@
gxv_sfntName_validate( FT_UShort name_index,
FT_UShort min_index,
FT_UShort max_index,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_SfntName name;
FT_UInt i;
@@ -897,10 +897,10 @@
if ( name_index < min_index || max_index < name_index )
FT_INVALID_FORMAT;
- nnames = FT_Get_Sfnt_Name_Count( valid->face );
+ nnames = FT_Get_Sfnt_Name_Count( gxvalid->face );
for ( i = 0; i < nnames; i++ )
{
- if ( FT_Get_Sfnt_Name( valid->face, i, &name ) != GXV_Err_Ok )
+ if ( FT_Get_Sfnt_Name( gxvalid->face, i, &name ) != FT_Err_Ok )
continue ;
if ( name.name_id == name_index )
@@ -944,7 +944,7 @@
FT_UShort* length_p,
FT_UShort stateSize,
FT_Byte* maxClassID_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_Bytes limit = table + *length_p;
@@ -965,7 +965,7 @@
if ( !nGlyphs )
goto Out;
- gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs ), valid );
+ gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs ), gxvalid );
{
FT_Byte nGlyphInClass[256];
@@ -1022,9 +1022,9 @@
FT_UShort stateSize,
FT_Byte* maxState_p,
FT_Byte* maxEntry_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
- FT_Bytes p = table;
+ FT_Bytes p = table;
FT_Bytes limit = table + *length_p;
FT_Byte clazz;
FT_Byte entry;
@@ -1076,7 +1076,7 @@
FT_Byte maxClassID,
FT_Bytes statetable_table,
FT_Bytes statetable_limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_Bytes limit = table + *length_p;
@@ -1166,13 +1166,13 @@
goto Exit;
}
- if ( NULL != valid->statetable.entry_validate_func )
- valid->statetable.entry_validate_func( state,
- flags,
- &glyphOffset,
- statetable_table,
- statetable_limit,
- valid );
+ if ( NULL != gxvalid->statetable.entry_validate_func )
+ gxvalid->statetable.entry_validate_func( state,
+ flags,
+ &glyphOffset,
+ statetable_table,
+ statetable_limit,
+ gxvalid );
}
Exit:
@@ -1192,7 +1192,7 @@
FT_UShort* classTable_length_p,
FT_UShort* stateArray_length_p,
FT_UShort* entryTable_length_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UShort o[3];
FT_UShort* l[3];
@@ -1206,14 +1206,14 @@
l[1] = stateArray_length_p;
l[2] = entryTable_length_p;
- gxv_set_length_by_ushort_offset( o, l, buff, 3, table_size, valid );
+ gxv_set_length_by_ushort_offset( o, l, buff, 3, table_size, gxvalid );
}
FT_LOCAL_DEF( void )
gxv_StateTable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UShort stateSize;
FT_UShort classTable; /* offset to Class(Sub)Table */
@@ -1250,11 +1250,11 @@
if ( stateSize > 0xFF )
FT_INVALID_DATA;
- if ( valid->statetable.optdata_load_func != NULL )
- valid->statetable.optdata_load_func( p, limit, valid );
+ if ( gxvalid->statetable.optdata_load_func != NULL )
+ gxvalid->statetable.optdata_load_func( p, limit, gxvalid );
- if ( valid->statetable.subtable_setup_func != NULL)
- setup_func = valid->statetable.subtable_setup_func;
+ if ( gxvalid->statetable.subtable_setup_func != NULL)
+ setup_func = gxvalid->statetable.subtable_setup_func;
else
setup_func = gxv_StateTable_subtable_setup;
@@ -1265,7 +1265,7 @@
&classTable_length,
&stateArray_length,
&entryTable_length,
- valid );
+ gxvalid );
GXV_TRACE(( "StateTable Subtables\n" ));
@@ -1274,7 +1274,7 @@
&classTable_length,
stateSize,
&maxClassID,
- valid );
+ gxvalid );
else
maxClassID = (FT_Byte)( stateSize - 1 );
@@ -1285,10 +1285,12 @@
stateSize,
&maxState,
&maxEntry,
- valid );
+ gxvalid );
else
{
+#if 0
maxState = 1; /* 0:start of text, 1:start of line are predefined */
+#endif
maxEntry = 0;
}
@@ -1304,7 +1306,7 @@
maxClassID,
table,
limit,
- valid );
+ gxvalid );
GXV_EXIT;
}
@@ -1320,7 +1322,7 @@
FT_ULong* classTable_length_p,
FT_ULong* stateArray_length_p,
FT_ULong* entryTable_length_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_ULong o[3];
FT_ULong* l[3];
@@ -1334,21 +1336,21 @@
l[1] = stateArray_length_p;
l[2] = entryTable_length_p;
- gxv_set_length_by_ulong_offset( o, l, buff, 3, table_size, valid );
+ gxv_set_length_by_ulong_offset( o, l, buff, 3, table_size, gxvalid );
}
static void
gxv_XClassTable_lookupval_validate( FT_UShort glyph,
GXV_LookupValueCPtr value_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UNUSED( glyph );
- if ( value_p->u >= valid->xstatetable.nClasses )
+ if ( value_p->u >= gxvalid->xstatetable.nClasses )
FT_INVALID_DATA;
- if ( value_p->u > valid->xstatetable.maxClassID )
- valid->xstatetable.maxClassID = value_p->u;
+ if ( value_p->u > gxvalid->xstatetable.maxClassID )
+ gxvalid->xstatetable.maxClassID = value_p->u;
}
@@ -1382,7 +1384,7 @@
gxv_XClassTable_lookupfmt4_transit( FT_UShort relative_gindex,
GXV_LookupValueCPtr base_value_p,
FT_Bytes lookuptbl_limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p;
FT_Bytes limit;
@@ -1393,7 +1395,7 @@
offset = (FT_UShort)( base_value_p->u +
relative_gindex * sizeof ( FT_UShort ) );
- p = valid->lookuptbl_head + offset;
+ p = gxvalid->lookuptbl_head + offset;
limit = lookuptbl_limit;
GXV_LIMIT_CHECK ( 2 );
@@ -1410,7 +1412,7 @@
FT_ULong stateSize,
FT_UShort* maxState_p,
FT_UShort* maxEntry_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_Bytes limit = table + *length_p;
@@ -1461,7 +1463,7 @@
FT_UShort maxClassID,
FT_Bytes xstatetable_table,
FT_Bytes xstatetable_limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_Bytes limit = table + *length_p;
@@ -1538,13 +1540,13 @@
goto Exit;
}
- if ( NULL != valid->xstatetable.entry_validate_func )
- valid->xstatetable.entry_validate_func( state,
- flags,
- &glyphOffset,
- xstatetable_table,
- xstatetable_limit,
- valid );
+ if ( NULL != gxvalid->xstatetable.entry_validate_func )
+ gxvalid->xstatetable.entry_validate_func( state,
+ flags,
+ &glyphOffset,
+ xstatetable_table,
+ xstatetable_limit,
+ gxvalid );
}
Exit:
@@ -1557,7 +1559,7 @@
FT_LOCAL_DEF( void )
gxv_XStateTable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
/* StateHeader members */
FT_ULong classTable; /* offset to Class(Sub)Table */
@@ -1580,26 +1582,26 @@
GXV_TRACE(( "XStateTable header\n" ));
GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 );
- valid->xstatetable.nClasses = FT_NEXT_ULONG( p );
+ gxvalid->xstatetable.nClasses = FT_NEXT_ULONG( p );
classTable = FT_NEXT_ULONG( p );
stateArray = FT_NEXT_ULONG( p );
entryTable = FT_NEXT_ULONG( p );
- GXV_TRACE(( "nClasses =0x%08x\n", valid->xstatetable.nClasses ));
+ GXV_TRACE(( "nClasses =0x%08x\n", gxvalid->xstatetable.nClasses ));
GXV_TRACE(( "offset to classTable=0x%08x\n", classTable ));
GXV_TRACE(( "offset to stateArray=0x%08x\n", stateArray ));
GXV_TRACE(( "offset to entryTable=0x%08x\n", entryTable ));
- if ( valid->xstatetable.nClasses > 0xFFFFU )
+ if ( gxvalid->xstatetable.nClasses > 0xFFFFU )
FT_INVALID_DATA;
GXV_TRACE(( "StateTable Subtables\n" ));
- if ( valid->xstatetable.optdata_load_func != NULL )
- valid->xstatetable.optdata_load_func( p, limit, valid );
+ if ( gxvalid->xstatetable.optdata_load_func != NULL )
+ gxvalid->xstatetable.optdata_load_func( p, limit, gxvalid );
- if ( valid->xstatetable.subtable_setup_func != NULL )
- setup_func = valid->xstatetable.subtable_setup_func;
+ if ( gxvalid->xstatetable.subtable_setup_func != NULL )
+ setup_func = gxvalid->xstatetable.subtable_setup_func;
else
setup_func = gxv_XStateTable_subtable_setup;
@@ -1610,38 +1612,42 @@
&classTable_length,
&stateArray_length,
&entryTable_length,
- valid );
+ gxvalid );
if ( classTable != 0 )
{
- valid->xstatetable.maxClassID = 0;
- valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
- valid->lookupval_func = gxv_XClassTable_lookupval_validate;
- valid->lookupfmt4_trans = gxv_XClassTable_lookupfmt4_transit;
+ gxvalid->xstatetable.maxClassID = 0;
+ gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+ gxvalid->lookupval_func = gxv_XClassTable_lookupval_validate;
+ gxvalid->lookupfmt4_trans = gxv_XClassTable_lookupfmt4_transit;
gxv_LookupTable_validate( table + classTable,
table + classTable + classTable_length,
- valid );
- if ( valid->subtable_length < classTable_length )
- classTable_length = valid->subtable_length;
+ gxvalid );
+#if 0
+ if ( gxvalid->subtable_length < classTable_length )
+ classTable_length = gxvalid->subtable_length;
+#endif
}
else
{
/* XXX: check range? */
- valid->xstatetable.maxClassID =
- (FT_UShort)( valid->xstatetable.nClasses - 1 );
+ gxvalid->xstatetable.maxClassID =
+ (FT_UShort)( gxvalid->xstatetable.nClasses - 1 );
}
if ( stateArray != 0 )
gxv_XStateArray_validate( table + stateArray,
&stateArray_length,
- valid->xstatetable.maxClassID,
- valid->xstatetable.nClasses,
+ gxvalid->xstatetable.maxClassID,
+ gxvalid->xstatetable.nClasses,
&maxState,
&maxEntry,
- valid );
+ gxvalid );
else
{
+#if 0
maxState = 1; /* 0:start of text, 1:start of line are predefined */
+#endif
maxEntry = 0;
}
@@ -1653,10 +1659,10 @@
&entryTable_length,
maxEntry,
stateArray_length,
- valid->xstatetable.maxClassID,
+ gxvalid->xstatetable.maxClassID,
table,
limit,
- valid );
+ gxvalid );
GXV_EXIT;
}
@@ -1713,7 +1719,7 @@
FT_LOCAL_DEF( void )
gxv_odtect_validate( GXV_odtect_Range odtect,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UInt i, j;
@@ -1727,6 +1733,7 @@
odtect->range[j].start,
odtect->range[j].length ) )
{
+#ifdef FT_DEBUG_LEVEL_TRACE
if ( odtect->range[i].name || odtect->range[j].name )
GXV_TRACE(( "found overlap between range %d and range %d\n",
i, j ));
@@ -1734,6 +1741,7 @@
GXV_TRACE(( "found overlap between `%s' and `%s\'\n",
odtect->range[i].name,
odtect->range[j].name ));
+#endif
FT_INVALID_OFFSET;
}
diff --git a/src/gxvalid/gxvcommn.h b/src/gxvalid/gxvcommn.h
index 1ff87e4..f114345 100644
--- a/src/gxvalid/gxvcommn.h
+++ b/src/gxvalid/gxvcommn.h
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT common tables validation (specification). */
/* */
-/* Copyright 2004, 2005, 2012 */
+/* Copyright 2004, 2005, 2012, 2014 */
/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -62,7 +62,7 @@ FT_BEGIN_HEADER
#undef GXV_LOAD_UNUSED_VARS /* debug purpose */
-#define IS_PARANOID_VALIDATION ( valid->root->level >= FT_VALIDATE_PARANOID )
+#define IS_PARANOID_VALIDATION ( gxvalid->root->level >= FT_VALIDATE_PARANOID )
#define GXV_SET_ERR_IF_PARANOID( err ) { if ( IS_PARANOID_VALIDATION ) ( err ); }
/*************************************************************************/
@@ -81,7 +81,7 @@ FT_BEGIN_HEADER
typedef void
(*GXV_Validate_Func)( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
/* ====================== LookupTable Validator ======================== */
@@ -106,13 +106,13 @@ FT_BEGIN_HEADER
typedef void
(*GXV_Lookup_Value_Validate_Func)( FT_UShort glyph,
GXV_LookupValueCPtr value_p,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
typedef GXV_LookupValueDesc
(*GXV_Lookup_Fmt4_Transit_Func)( FT_UShort relative_gindex,
GXV_LookupValueCPtr base_value_p,
FT_Bytes lookuptbl_limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
/* ====================== StateTable Validator ========================= */
@@ -131,10 +131,10 @@ FT_BEGIN_HEADER
#define GXV_GLYPHOFFSET_FMT( table ) \
- ( valid->table.entry_glyphoffset_fmt )
+ ( gxvalid->table.entry_glyphoffset_fmt )
#define GXV_GLYPHOFFSET_SIZE( table ) \
- ( valid->table.entry_glyphoffset_fmt / 2 )
+ ( gxvalid->table.entry_glyphoffset_fmt / 2 )
/* ----------------------- 16bit StateTable ---------------------------- */
@@ -160,7 +160,7 @@ FT_BEGIN_HEADER
FT_UShort* classTable_length_p,
FT_UShort* stateArray_length_p,
FT_UShort* entryTable_length_p,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
typedef void
(*GXV_StateTable_Entry_Validate_Func)(
@@ -169,12 +169,12 @@ FT_BEGIN_HEADER
GXV_StateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes statetable_table,
FT_Bytes statetable_limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
typedef void
(*GXV_StateTable_OptData_Load_Func)( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
typedef struct GXV_StateTable_ValidatorRec_
{
@@ -202,7 +202,7 @@ FT_BEGIN_HEADER
FT_ULong* classTable_length_p,
FT_ULong* stateArray_length_p,
FT_ULong* entryTable_length_p,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
typedef void
(*GXV_XStateTable_Entry_Validate_Func)(
@@ -211,7 +211,7 @@ FT_BEGIN_HEADER
GXV_StateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes xstatetable_table,
FT_Bytes xstatetable_limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
typedef GXV_StateTable_OptData_Load_Func GXV_XStateTable_OptData_Load_Func;
@@ -263,35 +263,35 @@ FT_BEGIN_HEADER
#define GXV_TABLE_DATA( tag, field ) \
- ( ( (GXV_ ## tag ## _Data)valid->table_data )->field )
+ ( ( (GXV_ ## tag ## _Data)gxvalid->table_data )->field )
#undef FT_INVALID_
-#define FT_INVALID_( _prefix, _error ) \
- ft_validator_error( valid->root, _prefix ## _error )
+#define FT_INVALID_( _error ) \
+ ft_validator_error( gxvalid->root, FT_THROW( _error ) )
#define GXV_LIMIT_CHECK( _count ) \
FT_BEGIN_STMNT \
- if ( p + _count > ( limit? limit : valid->root->limit ) ) \
+ if ( p + _count > ( limit? limit : gxvalid->root->limit ) ) \
FT_INVALID_TOO_SHORT; \
FT_END_STMNT
#ifdef FT_DEBUG_LEVEL_TRACE
-#define GXV_INIT valid->debug_indent = 0
+#define GXV_INIT gxvalid->debug_indent = 0
#define GXV_NAME_ENTER( name ) \
FT_BEGIN_STMNT \
- valid->debug_indent += 2; \
- FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \
+ gxvalid->debug_indent += 2; \
+ FT_TRACE4(( "%*.s", gxvalid->debug_indent, 0 )); \
FT_TRACE4(( "%s table\n", name )); \
FT_END_STMNT
-#define GXV_EXIT valid->debug_indent -= 2
+#define GXV_EXIT gxvalid->debug_indent -= 2
#define GXV_TRACE( s ) \
FT_BEGIN_STMNT \
- FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \
+ FT_TRACE4(( "%*.s", gxvalid->debug_indent, 0 )); \
FT_TRACE4( s ); \
FT_END_STMNT
@@ -318,7 +318,7 @@ FT_BEGIN_HEADER
FT_BEGIN_STMNT \
{ \
if ( (a) & 3 ) \
- FT_INVALID_OFFSET ; \
+ FT_INVALID_OFFSET; \
} \
FT_END_STMNT
@@ -349,7 +349,7 @@ FT_BEGIN_HEADER
\
\
for ( b = p; b < (FT_Bytes)p + len; b++ ) \
- if ( 0x40 < *b && *b < 0x7e ) \
+ if ( 0x40 < *b && *b < 0x7E ) \
FT_TRACE1(("%c", *b)) ; \
else \
FT_TRACE1(("\\x%02x", *b)) ; \
@@ -373,12 +373,12 @@ FT_BEGIN_HEADER
FT_Bytes limit,
FT_UShort* unitSize_p,
FT_UShort* nUnits_p,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_LookupTable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
/*************************************************************************/
@@ -391,7 +391,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Int )
gxv_glyphid_validate( FT_UShort gid,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
/*************************************************************************/
@@ -405,7 +405,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
gxv_ctlPoint_validate( FT_UShort gid,
FT_Short ctl_point,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
/*************************************************************************/
@@ -420,7 +420,7 @@ FT_BEGIN_HEADER
gxv_sfntName_validate( FT_UShort name_index,
FT_UShort min_index,
FT_UShort max_index,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
/*************************************************************************/
@@ -439,7 +439,7 @@ FT_BEGIN_HEADER
FT_UShort* classTable_length_p,
FT_UShort* stateArray_length_p,
FT_UShort* entryTable_length_p,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_XStateTable_subtable_setup( FT_ULong table_size,
@@ -449,17 +449,17 @@ FT_BEGIN_HEADER
FT_ULong* classTable_length_p,
FT_ULong* stateArray_length_p,
FT_ULong* entryTable_length_p,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_StateTable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_XStateTable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
/*************************************************************************/
@@ -475,14 +475,14 @@ FT_BEGIN_HEADER
FT_Bytes limit,
FT_Byte* min,
FT_Byte* max,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_array_getlimits_ushort( FT_Bytes table,
FT_Bytes limit,
FT_UShort* min,
FT_UShort* max,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_set_length_by_ushort_offset( FT_UShort* offset,
@@ -490,7 +490,7 @@ FT_BEGIN_HEADER
FT_UShort* buff,
FT_UInt nmemb,
FT_UShort limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_set_length_by_ulong_offset( FT_ULong* offset,
@@ -498,19 +498,19 @@ FT_BEGIN_HEADER
FT_ULong* buff,
FT_UInt nmemb,
FT_ULong limit,
- GXV_Validator valid);
+ GXV_Validator gxvalid);
#define GXV_SUBTABLE_OFFSET_CHECK( _offset ) \
FT_BEGIN_STMNT \
- if ( (_offset) > valid->subtable_length ) \
+ if ( (_offset) > gxvalid->subtable_length ) \
FT_INVALID_OFFSET; \
FT_END_STMNT
#define GXV_SUBTABLE_LIMIT_CHECK( _count ) \
FT_BEGIN_STMNT \
- if ( ( p + (_count) - valid->subtable_start ) > \
- valid->subtable_length ) \
+ if ( ( p + (_count) - gxvalid->subtable_start ) > \
+ gxvalid->subtable_length ) \
FT_INVALID_TOO_SHORT; \
FT_END_STMNT
@@ -556,7 +556,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
gxv_odtect_validate( GXV_odtect_Range odtect,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
#define GXV_ODTECT( n, odtect ) \
diff --git a/src/gxvalid/gxverror.h b/src/gxvalid/gxverror.h
index 7d2ef78..c573b72 100644
--- a/src/gxvalid/gxverror.h
+++ b/src/gxvalid/gxverror.h
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT validation module error codes (specification only). */
/* */
-/* Copyright 2004, 2005, 2012 */
+/* Copyright 2004, 2005, 2012-2013 */
/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -41,9 +41,7 @@
#undef FT_ERR_PREFIX
#define FT_ERR_PREFIX GXV_Err_
-#define FT_ERR_BASE FT_Mod_Err_GXV
-
-#define FT_KEEP_ERR_PREFIX
+#define FT_ERR_BASE FT_Mod_Err_GXvalid
#include FT_ERRORS_H
diff --git a/src/gxvalid/gxvfeat.c b/src/gxvalid/gxvfeat.c
index 6f75650..69298b2 100644
--- a/src/gxvalid/gxvfeat.c
+++ b/src/gxvalid/gxvfeat.c
@@ -82,7 +82,7 @@
gxv_feat_registry_validate( FT_UShort feature,
FT_UShort nSettings,
FT_Bool exclusive,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
GXV_NAME_ENTER( "feature in registry" );
@@ -108,7 +108,7 @@
{
/* Don't use here. Apple is reserved. */
GXV_TRACE(( "feature number %d is reserved by Apple\n", feature ));
- if ( valid->root->level >= FT_VALIDATE_TIGHT )
+ if ( gxvalid->root->level >= FT_VALIDATE_TIGHT )
FT_INVALID_DATA;
}
@@ -117,7 +117,7 @@
GXV_TRACE(( "feature %d: nSettings %d != defined nSettings %d\n",
feature, nSettings,
gxv_feat_registry[feature].nSettings ));
- if ( valid->root->level >= FT_VALIDATE_TIGHT )
+ if ( gxvalid->root->level >= FT_VALIDATE_TIGHT )
FT_INVALID_DATA;
}
@@ -125,7 +125,7 @@
{
GXV_TRACE(( "exclusive flag %d differs from predefined value\n",
exclusive ));
- if ( valid->root->level >= FT_VALIDATE_TIGHT )
+ if ( gxvalid->root->level >= FT_VALIDATE_TIGHT )
FT_INVALID_DATA;
}
@@ -137,7 +137,7 @@
static void
gxv_feat_name_index_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -153,7 +153,7 @@
gxv_sfntName_validate( (FT_UShort)nameIndex,
255,
32768U,
- valid );
+ gxvalid );
GXV_EXIT;
}
@@ -163,7 +163,7 @@
gxv_feat_setting_validate( FT_Bytes table,
FT_Bytes limit,
FT_Bool exclusive,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort setting;
@@ -179,7 +179,7 @@
if ( exclusive && ( setting & 1 ) == 0 )
FT_INVALID_DATA;
- gxv_feat_name_index_validate( p, limit, valid );
+ gxv_feat_name_index_validate( p, limit, gxvalid );
GXV_FEAT_DATA( setting ) = setting;
@@ -190,7 +190,7 @@
static void
gxv_feat_name_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UInt reserved_size = GXV_FEAT_DATA( reserved_size );
@@ -240,14 +240,14 @@
FT_INVALID_FORMAT;
}
- gxv_feat_registry_validate( feature, nSettings, exclusive, valid );
+ gxv_feat_registry_validate( feature, nSettings, exclusive, gxvalid );
- gxv_feat_name_index_validate( p, limit, valid );
+ gxv_feat_name_index_validate( p, limit, gxvalid );
- p = valid->root->base + settingTable;
+ p = gxvalid->root->base + settingTable;
for ( last_setting = -1, i = 0; i < nSettings; i++ )
{
- gxv_feat_setting_validate( p, limit, exclusive, valid );
+ gxv_feat_setting_validate( p, limit, exclusive, gxvalid );
if ( (FT_Int)GXV_FEAT_DATA( setting ) <= last_setting )
GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );
@@ -274,8 +274,8 @@
FT_Face face,
FT_Validator ftvalid )
{
- GXV_ValidatorRec validrec;
- GXV_Validator valid = &validrec;
+ GXV_ValidatorRec gxvalidrec;
+ GXV_Validator gxvalid = &gxvalidrec;
GXV_feat_DataRec featrec;
GXV_feat_Data feat = &featrec;
@@ -289,9 +289,9 @@
FT_Int last_feature;
- valid->root = ftvalid;
- valid->table_data = feat;
- valid->face = face;
+ gxvalid->root = ftvalid;
+ gxvalid->table_data = feat;
+ gxvalid->face = face;
FT_TRACE3(( "validating `feat' table\n" ));
GXV_INIT;
@@ -323,7 +323,7 @@
for ( last_feature = -1, i = 0; i < featureNameCount; i++ )
{
- gxv_feat_name_validate( p, limit, valid );
+ gxv_feat_name_validate( p, limit, gxvalid );
if ( (FT_Int)GXV_FEAT_DATA( feature ) <= last_feature )
GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );
diff --git a/src/gxvalid/gxvjust.c b/src/gxvalid/gxvjust.c
index 7816e0b..24c26a5 100644
--- a/src/gxvalid/gxvjust.c
+++ b/src/gxvalid/gxvjust.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT just table validation (body). */
/* */
-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
+/* Copyright 2005, 2014 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, */
@@ -69,14 +69,14 @@
static void
gxv_just_check_max_gid( FT_UShort gid,
const FT_String* msg_tag,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
- if ( gid < valid->face->num_glyphs )
+ if ( gid < gxvalid->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 ));
+ msg_tag, gid, gxvalid->face->num_glyphs ));
GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
@@ -84,7 +84,7 @@
static void
gxv_just_wdp_entry_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_ULong justClass;
@@ -112,7 +112,7 @@
#endif
/* According to Apple spec, only 7bits in justClass is used */
- if ( ( justClass & 0xFFFFFF80 ) != 0 )
+ if ( ( justClass & 0xFFFFFF80UL ) != 0 )
{
GXV_TRACE(( "just table includes non-zero value"
" in unused justClass higher bits"
@@ -120,14 +120,14 @@
GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
}
static void
gxv_just_wdc_entry_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_ULong count, i;
@@ -138,18 +138,18 @@
for ( i = 0; i < count; i++ )
{
GXV_TRACE(( "validating wdc pair %d/%d\n", i + 1, count ));
- gxv_just_wdp_entry_validate( p, limit, valid );
- p += valid->subtable_length;
+ gxv_just_wdp_entry_validate( p, limit, gxvalid );
+ p += gxvalid->subtable_length;
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
}
static void
gxv_just_widthDeltaClusters_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table ;
FT_Bytes wdc_end = table + GXV_JUST_DATA( wdc_offset_max );
@@ -163,11 +163,11 @@
for ( i = 0; p <= wdc_end; i++ )
{
- gxv_just_wdc_entry_validate( p, limit, valid );
- p += valid->subtable_length;
+ gxv_just_wdc_entry_validate( p, limit, gxvalid );
+ p += gxvalid->subtable_length;
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -176,7 +176,7 @@
static void
gxv_just_actSubrecord_type0_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -214,17 +214,17 @@
GXV_LIMIT_CHECK( 2 );
glyphs = FT_NEXT_USHORT( p );
- gxv_just_check_max_gid( glyphs, "type0:glyphs", valid );
+ gxv_just_check_max_gid( glyphs, "type0:glyphs", gxvalid );
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
}
static void
gxv_just_actSubrecord_type1_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort addGlyph;
@@ -233,20 +233,20 @@
GXV_LIMIT_CHECK( 2 );
addGlyph = FT_NEXT_USHORT( p );
- gxv_just_check_max_gid( addGlyph, "type1:addGlyph", valid );
+ gxv_just_check_max_gid( addGlyph, "type1:addGlyph", gxvalid );
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
}
static void
gxv_just_actSubrecord_type2_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
#ifdef GXV_LOAD_UNUSED_VARS
- FT_Fixed substThreshhold; /* Apple misspelled "Threshhold" */
+ FT_Fixed substThreshhold; /* Apple misspelled "Threshhold" */
#endif
FT_UShort addGlyph;
FT_UShort substGlyph;
@@ -262,18 +262,18 @@
substGlyph = FT_NEXT_USHORT( p );
if ( addGlyph != 0xFFFF )
- gxv_just_check_max_gid( addGlyph, "type2:addGlyph", valid );
+ gxv_just_check_max_gid( addGlyph, "type2:addGlyph", gxvalid );
- gxv_just_check_max_gid( substGlyph, "type2:substGlyph", valid );
+ gxv_just_check_max_gid( substGlyph, "type2:substGlyph", gxvalid );
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
}
static void
gxv_just_actSubrecord_type4_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_ULong variantsAxis;
@@ -288,9 +288,9 @@
noStretchValue = FT_NEXT_ULONG( p );
maximumLimit = FT_NEXT_ULONG( p );
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
- if ( variantsAxis != 0x64756374 ) /* 'duct' */
+ if ( variantsAxis != 0x64756374L ) /* 'duct' */
GXV_TRACE(( "variantsAxis 0x%08x is non default value",
variantsAxis ));
@@ -310,7 +310,7 @@
static void
gxv_just_actSubrecord_type5_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort flags;
@@ -324,9 +324,9 @@
if ( flags )
GXV_TRACE(( "type5: nonzero value 0x%04x in unused flags\n",
flags ));
- gxv_just_check_max_gid( glyph, "type5:glyph", valid );
+ gxv_just_check_max_gid( glyph, "type5:glyph", gxvalid );
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
}
@@ -334,7 +334,7 @@
static void
gxv_just_actSubrecord_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort actionClass;
@@ -354,21 +354,21 @@
GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
if ( actionType == 0 )
- gxv_just_actSubrecord_type0_validate( p, limit, valid );
+ gxv_just_actSubrecord_type0_validate( p, limit, gxvalid );
else if ( actionType == 1 )
- gxv_just_actSubrecord_type1_validate( p, limit, valid );
+ gxv_just_actSubrecord_type1_validate( p, limit, gxvalid );
else if ( actionType == 2 )
- gxv_just_actSubrecord_type2_validate( p, limit, valid );
+ gxv_just_actSubrecord_type2_validate( p, limit, gxvalid );
else if ( actionType == 3 )
; /* Stretch glyph action: no actionData */
else if ( actionType == 4 )
- gxv_just_actSubrecord_type4_validate( p, limit, valid );
+ gxv_just_actSubrecord_type4_validate( p, limit, gxvalid );
else if ( actionType == 5 )
- gxv_just_actSubrecord_type5_validate( p, limit, valid );
+ gxv_just_actSubrecord_type5_validate( p, limit, gxvalid );
else
FT_INVALID_DATA;
- valid->subtable_length = actionLength;
+ gxvalid->subtable_length = actionLength;
GXV_EXIT;
}
@@ -377,7 +377,7 @@
static void
gxv_just_pcActionRecord_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_ULong actionCount;
@@ -390,11 +390,11 @@
for ( i = 0; i < actionCount; i++ )
{
- gxv_just_actSubrecord_validate( p, limit, valid );
- p += valid->subtable_length;
+ gxv_just_actSubrecord_validate( p, limit, gxvalid );
+ p += gxvalid->subtable_length;
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -403,7 +403,7 @@
static void
gxv_just_pcTable_LookupValue_entry_validate( FT_UShort glyph,
GXV_LookupValueCPtr value_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UNUSED( glyph );
@@ -417,19 +417,19 @@
static void
gxv_just_pcLookupTable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
- FT_Bytes p = table;
+ FT_Bytes p = table;
GXV_NAME_ENTER( "just pcLookupTable" );
GXV_JUST_DATA( pc_offset_max ) = 0x0000;
GXV_JUST_DATA( pc_offset_min ) = 0xFFFFU;
- valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
- valid->lookupval_func = gxv_just_pcTable_LookupValue_entry_validate;
+ gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+ gxvalid->lookupval_func = gxv_just_pcTable_LookupValue_entry_validate;
- gxv_LookupTable_validate( p, limit, valid );
+ gxv_LookupTable_validate( p, limit, gxvalid );
/* subtable_length is set by gxv_LookupTable_validate() */
@@ -440,20 +440,20 @@
static void
gxv_just_postcompTable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
GXV_NAME_ENTER( "just postcompTable" );
- gxv_just_pcLookupTable_validate( p, limit, valid );
- p += valid->subtable_length;
+ gxv_just_pcLookupTable_validate( p, limit, gxvalid );
+ p += gxvalid->subtable_length;
- gxv_just_pcActionRecord_validate( p, limit, valid );
- p += valid->subtable_length;
+ gxv_just_pcActionRecord_validate( p, limit, gxvalid );
+ p += gxvalid->subtable_length;
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -466,7 +466,7 @@
GXV_StateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
#ifdef GXV_LOAD_UNUSED_VARS
/* TODO: validate markClass & currentClass */
@@ -480,7 +480,7 @@
FT_UNUSED( glyphOffset_p );
FT_UNUSED( table );
FT_UNUSED( limit );
- FT_UNUSED( valid );
+ FT_UNUSED( gxvalid );
#ifndef GXV_LOAD_UNUSED_VARS
FT_UNUSED( flags );
@@ -496,7 +496,7 @@
static void
gxv_just_justClassTable_validate ( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort length;
@@ -521,14 +521,14 @@
GXV_TRACE(( " justClassTable: nonzero value (0x%08x)"
" in unused subFeatureFlags\n", subFeatureFlags ));
- valid->statetable.optdata = NULL;
- valid->statetable.optdata_load_func = NULL;
- valid->statetable.subtable_setup_func = NULL;
- valid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
- valid->statetable.entry_validate_func =
+ gxvalid->statetable.optdata = NULL;
+ gxvalid->statetable.optdata_load_func = NULL;
+ gxvalid->statetable.subtable_setup_func = NULL;
+ gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
+ gxvalid->statetable.entry_validate_func =
gxv_just_classTable_entry_validate;
- gxv_StateTable_validate( p, table + length, valid );
+ gxv_StateTable_validate( p, table + length, gxvalid );
/* subtable_length is set by gxv_LookupTable_validate() */
@@ -539,7 +539,7 @@
static void
gxv_just_wdcTable_LookupValue_validate( FT_UShort glyph,
GXV_LookupValueCPtr value_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UNUSED( glyph );
@@ -553,7 +553,7 @@
static void
gxv_just_justData_lookuptable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -561,10 +561,10 @@
GXV_JUST_DATA( wdc_offset_max ) = 0x0000;
GXV_JUST_DATA( wdc_offset_min ) = 0xFFFFU;
- valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
- valid->lookupval_func = gxv_just_wdcTable_LookupValue_validate;
+ gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+ gxvalid->lookupval_func = gxv_just_wdcTable_LookupValue_validate;
- gxv_LookupTable_validate( p, limit, valid );
+ gxv_LookupTable_validate( p, limit, gxvalid );
/* subtable_length is set by gxv_LookupTable_validate() */
@@ -578,7 +578,7 @@
static void
gxv_just_justData_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
/*
* following 3 offsets are measured from the start of `just'
@@ -604,36 +604,36 @@
GXV_TRACE(( " (wdcTableOffset = 0x%04x)\n", wdcTableOffset ));
GXV_TRACE(( " (pcTableOffset = 0x%04x)\n", pcTableOffset ));
- gxv_just_justData_lookuptable_validate( p, limit, valid );
- gxv_odtect_add_range( p, valid->subtable_length,
+ gxv_just_justData_lookuptable_validate( p, limit, gxvalid );
+ gxv_odtect_add_range( p, gxvalid->subtable_length,
"just_LookupTable", odtect );
if ( wdcTableOffset )
{
gxv_just_widthDeltaClusters_validate(
- valid->root->base + wdcTableOffset, limit, valid );
- gxv_odtect_add_range( valid->root->base + wdcTableOffset,
- valid->subtable_length, "just_wdcTable", odtect );
+ gxvalid->root->base + wdcTableOffset, limit, gxvalid );
+ gxv_odtect_add_range( gxvalid->root->base + wdcTableOffset,
+ gxvalid->subtable_length, "just_wdcTable", odtect );
}
if ( pcTableOffset )
{
- gxv_just_postcompTable_validate( valid->root->base + pcTableOffset,
- limit, valid );
- gxv_odtect_add_range( valid->root->base + pcTableOffset,
- valid->subtable_length, "just_pcTable", odtect );
+ gxv_just_postcompTable_validate( gxvalid->root->base + pcTableOffset,
+ limit, gxvalid );
+ gxv_odtect_add_range( gxvalid->root->base + pcTableOffset,
+ gxvalid->subtable_length, "just_pcTable", odtect );
}
if ( justClassTableOffset )
{
gxv_just_justClassTable_validate(
- valid->root->base + justClassTableOffset, limit, valid );
- gxv_odtect_add_range( valid->root->base + justClassTableOffset,
- valid->subtable_length, "just_justClassTable",
+ gxvalid->root->base + justClassTableOffset, limit, gxvalid );
+ gxv_odtect_add_range( gxvalid->root->base + justClassTableOffset,
+ gxvalid->subtable_length, "just_justClassTable",
odtect );
}
- gxv_odtect_validate( odtect, valid );
+ gxv_odtect_validate( odtect, gxvalid );
GXV_EXIT;
}
@@ -647,8 +647,8 @@
FT_Bytes p = table;
FT_Bytes limit = 0;
- GXV_ValidatorRec validrec;
- GXV_Validator valid = &validrec;
+ GXV_ValidatorRec gxvalidrec;
+ GXV_Validator gxvalid = &gxvalidrec;
GXV_just_DataRec justrec;
GXV_just_Data just = &justrec;
@@ -662,14 +662,14 @@
GXV_ODTECT_INIT( odtect );
- valid->root = ftvalid;
- valid->table_data = just;
- valid->face = face;
+ gxvalid->root = ftvalid;
+ gxvalid->table_data = just;
+ gxvalid->face = face;
FT_TRACE3(( "validating `just' table\n" ));
GXV_INIT;
- limit = valid->root->limit;
+ limit = gxvalid->root->limit;
GXV_LIMIT_CHECK( 4 + 2 + 2 + 2 );
version = FT_NEXT_ULONG( p );
@@ -696,19 +696,19 @@
/* validate justData */
if ( 0 < horizOffset )
{
- gxv_just_justData_validate( table + horizOffset, limit, valid );
- gxv_odtect_add_range( table + horizOffset, valid->subtable_length,
+ gxv_just_justData_validate( table + horizOffset, limit, gxvalid );
+ gxv_odtect_add_range( table + horizOffset, gxvalid->subtable_length,
"horizJustData", odtect );
}
if ( 0 < vertOffset )
{
- gxv_just_justData_validate( table + vertOffset, limit, valid );
- gxv_odtect_add_range( table + vertOffset, valid->subtable_length,
+ gxv_just_justData_validate( table + vertOffset, limit, gxvalid );
+ gxv_odtect_add_range( table + vertOffset, gxvalid->subtable_length,
"vertJustData", odtect );
}
- gxv_odtect_validate( odtect, valid );
+ gxv_odtect_validate( odtect, gxvalid );
FT_TRACE4(( "\n" ));
}
diff --git a/src/gxvalid/gxvkern.c b/src/gxvalid/gxvkern.c
index 0ec978f..787e3db 100644
--- a/src/gxvalid/gxvkern.c
+++ b/src/gxvalid/gxvkern.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT kern table validation (body). */
/* */
-/* Copyright 2004, 2005, 2006, 2007 */
+/* Copyright 2004-2007, 2013 */
/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -79,20 +79,20 @@
#define GXV_KERN_DATA( field ) GXV_TABLE_DATA( kern, field )
-#define KERN_IS_CLASSIC( valid ) \
+#define KERN_IS_CLASSIC( gxvalid ) \
( KERN_VERSION_CLASSIC == GXV_KERN_DATA( version ) )
-#define KERN_IS_NEW( valid ) \
+#define KERN_IS_NEW( gxvalid ) \
( KERN_VERSION_NEW == GXV_KERN_DATA( version ) )
-#define KERN_DIALECT( valid ) \
+#define KERN_DIALECT( gxvalid ) \
GXV_KERN_DATA( dialect_request )
-#define KERN_ALLOWS_MS( valid ) \
- ( KERN_DIALECT( valid ) & KERN_DIALECT_MS )
-#define KERN_ALLOWS_APPLE( valid ) \
- ( KERN_DIALECT( valid ) & KERN_DIALECT_APPLE )
+#define KERN_ALLOWS_MS( gxvalid ) \
+ ( KERN_DIALECT( gxvalid ) & KERN_DIALECT_MS )
+#define KERN_ALLOWS_APPLE( gxvalid ) \
+ ( KERN_DIALECT( gxvalid ) & KERN_DIALECT_APPLE )
-#define GXV_KERN_HEADER_SIZE ( KERN_IS_NEW( valid ) ? 8 : 4 )
-#define GXV_KERN_SUBTABLE_HEADER_SIZE ( KERN_IS_NEW( valid ) ? 8 : 6 )
+#define GXV_KERN_HEADER_SIZE ( KERN_IS_NEW( gxvalid ) ? 8 : 4 )
+#define GXV_KERN_SUBTABLE_HEADER_SIZE ( KERN_IS_NEW( gxvalid ) ? 8 : 6 )
/*************************************************************************/
@@ -110,7 +110,7 @@
gxv_kern_subtable_fmt0_pairs_validate( FT_Bytes table,
FT_Bytes limit,
FT_UShort nPairs,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort i;
@@ -134,11 +134,11 @@
/* left */
gid_left = FT_NEXT_USHORT( p );
- gxv_glyphid_validate( gid_left, valid );
+ gxv_glyphid_validate( gid_left, gxvalid );
/* right */
gid_right = FT_NEXT_USHORT( p );
- gxv_glyphid_validate( gid_right, valid );
+ gxv_glyphid_validate( gid_right, gxvalid );
/* Pairs of left and right GIDs must be unique and sorted. */
GXV_TRACE(( "left gid = %u, right gid = %u\n", gid_left, gid_right ));
@@ -171,7 +171,7 @@
static void
gxv_kern_subtable_fmt0_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table + GXV_KERN_SUBTABLE_HEADER_SIZE;
@@ -186,10 +186,10 @@
/* nPairs, searchRange, entrySelector, rangeShift */
GXV_LIMIT_CHECK( 2 + 2 + 2 + 2 );
- gxv_BinSrchHeader_validate( p, limit, &unitSize, &nPairs, valid );
+ gxv_BinSrchHeader_validate( p, limit, &unitSize, &nPairs, gxvalid );
p += 2 + 2 + 2 + 2;
- gxv_kern_subtable_fmt0_pairs_validate( p, limit, nPairs, valid );
+ gxv_kern_subtable_fmt0_pairs_validate( p, limit, nPairs, gxvalid );
GXV_EXIT;
}
@@ -209,11 +209,11 @@
static void
gxv_kern_subtable_fmt1_valueTable_load( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
GXV_kern_fmt1_StateOptRecData optdata =
- (GXV_kern_fmt1_StateOptRecData)valid->statetable.optdata;
+ (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata;
GXV_LIMIT_CHECK( 2 );
@@ -232,14 +232,14 @@
FT_UShort* classTable_length_p,
FT_UShort* stateArray_length_p,
FT_UShort* entryTable_length_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UShort o[4];
FT_UShort *l[4];
FT_UShort buff[5];
GXV_kern_fmt1_StateOptRecData optdata =
- (GXV_kern_fmt1_StateOptRecData)valid->statetable.optdata;
+ (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata;
o[0] = classTable;
@@ -251,7 +251,7 @@
l[2] = entryTable_length_p;
l[3] = &(optdata->valueTable_length);
- gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, valid );
+ gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, gxvalid );
}
@@ -265,7 +265,7 @@
GXV_StateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort push;
@@ -289,7 +289,7 @@
{
GXV_kern_fmt1_StateOptRecData vt_rec =
- (GXV_kern_fmt1_StateOptRecData)valid->statetable.optdata;
+ (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata;
FT_Bytes p;
@@ -303,8 +303,6 @@
#ifdef GXV_LOAD_UNUSED_VARS
kernAction = FT_NEXT_USHORT( p );
kernValue = FT_NEXT_USHORT( p );
-#else
- p += 4;
#endif
}
}
@@ -313,7 +311,7 @@
static void
gxv_kern_subtable_fmt1_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
GXV_kern_fmt1_StateOptRec vt_rec;
@@ -321,18 +319,18 @@
GXV_NAME_ENTER( "kern subtable format 1" );
- valid->statetable.optdata =
+ gxvalid->statetable.optdata =
&vt_rec;
- valid->statetable.optdata_load_func =
+ gxvalid->statetable.optdata_load_func =
gxv_kern_subtable_fmt1_valueTable_load;
- valid->statetable.subtable_setup_func =
+ gxvalid->statetable.subtable_setup_func =
gxv_kern_subtable_fmt1_subtable_setup;
- valid->statetable.entry_glyphoffset_fmt =
+ gxvalid->statetable.entry_glyphoffset_fmt =
GXV_GLYPHOFFSET_NONE;
- valid->statetable.entry_validate_func =
+ gxvalid->statetable.entry_validate_func =
gxv_kern_subtable_fmt1_entry_validate;
- gxv_StateTable_validate( p, limit, valid );
+ gxv_StateTable_validate( p, limit, gxvalid );
GXV_EXIT;
}
@@ -375,7 +373,7 @@
gxv_kern_subtable_fmt2_clstbl_validate( FT_Bytes table,
FT_Bytes limit,
GXV_kern_ClassSpec spec,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
const FT_String* tag = GXV_KERN_FMT2_DATA( class_tag[spec] );
GXV_odtect_Range odtect = GXV_KERN_FMT2_DATA( odtect );
@@ -393,13 +391,13 @@
GXV_TRACE(( " %s firstGlyph=%d, nGlyphs=%d\n",
tag, firstGlyph, nGlyphs ));
- gxv_glyphid_validate( firstGlyph, valid );
- gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs - 1 ), valid );
+ gxv_glyphid_validate( firstGlyph, gxvalid );
+ gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs - 1 ), gxvalid );
gxv_array_getlimits_ushort( p, p + ( 2 * nGlyphs ),
&( GXV_KERN_FMT2_DATA( offset_min[spec] ) ),
&( GXV_KERN_FMT2_DATA( offset_max[spec] ) ),
- valid );
+ gxvalid );
gxv_odtect_add_range( table, 2 * nGlyphs, tag, odtect );
@@ -410,7 +408,7 @@
static void
gxv_kern_subtable_fmt2_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
GXV_ODTECT( 3, odtect );
GXV_kern_subtable_fmt2_DataRec fmt2_rec =
@@ -441,10 +439,10 @@
GXV_LIMIT_CHECK( GXV_KERN_FMT2_DATA( array ) );
gxv_kern_subtable_fmt2_clstbl_validate( table + leftOffsetTable, limit,
- GXV_KERN_CLS_L, valid );
+ GXV_KERN_CLS_L, gxvalid );
gxv_kern_subtable_fmt2_clstbl_validate( table + rightOffsetTable, limit,
- GXV_KERN_CLS_R, valid );
+ GXV_KERN_CLS_R, gxvalid );
if ( GXV_KERN_FMT2_DATA( offset_min[GXV_KERN_CLS_L] ) +
GXV_KERN_FMT2_DATA( offset_min[GXV_KERN_CLS_R] )
@@ -457,7 +455,7 @@
- GXV_KERN_FMT2_DATA( array ),
"array", odtect );
- gxv_odtect_validate( odtect, valid );
+ gxv_odtect_validate( odtect, gxvalid );
GXV_EXIT;
}
@@ -468,7 +466,7 @@
static void
gxv_kern_subtable_fmt3_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table + GXV_KERN_SUBTABLE_HEADER_SIZE;
FT_UShort glyphCount;
@@ -487,10 +485,10 @@
rightClassCount = FT_NEXT_BYTE( p );
flags = FT_NEXT_BYTE( p );
- if ( valid->face->num_glyphs != glyphCount )
+ if ( gxvalid->face->num_glyphs != glyphCount )
{
GXV_TRACE(( "maxGID=%d, but glyphCount=%d\n",
- valid->face->num_glyphs, glyphCount ));
+ gxvalid->face->num_glyphs, glyphCount ));
GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
@@ -511,8 +509,8 @@
GXV_LIMIT_CHECK( glyphCount );
- gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, valid );
- p += valid->subtable_length;
+ gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, gxvalid );
+ p += gxvalid->subtable_length;
if ( leftClassCount < max )
FT_INVALID_DATA;
@@ -526,8 +524,8 @@
GXV_LIMIT_CHECK( glyphCount );
- gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, valid );
- p += valid->subtable_length;
+ gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, gxvalid );
+ p += gxvalid->subtable_length;
if ( rightClassCount < max )
FT_INVALID_DATA;
@@ -551,7 +549,7 @@
}
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -560,7 +558,7 @@
static FT_Bool
gxv_kern_coverage_new_apple_validate( FT_UShort coverage,
FT_UShort* format,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
/* new Apple-dialect */
#ifdef GXV_LOAD_TRACE_VARS
@@ -569,7 +567,7 @@
FT_Bool kernVariation;
#endif
- FT_UNUSED( valid );
+ FT_UNUSED( gxvalid );
/* reserved bits = 0 */
@@ -597,7 +595,7 @@
static FT_Bool
gxv_kern_coverage_classic_apple_validate( FT_UShort coverage,
FT_UShort* format,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
/* classic Apple-dialect */
#ifdef GXV_LOAD_TRACE_VARS
@@ -607,7 +605,7 @@
/* check expected flags, but don't check if MS-dialect is impossible */
- if ( !( coverage & 0xFD00 ) && KERN_ALLOWS_MS( valid ) )
+ if ( !( coverage & 0xFD00 ) && KERN_ALLOWS_MS( gxvalid ) )
return FALSE;
/* reserved bits = 0 */
@@ -638,7 +636,7 @@
static FT_Bool
gxv_kern_coverage_classic_microsoft_validate( FT_UShort coverage,
FT_UShort* format,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
/* classic Microsoft-dialect */
#ifdef GXV_LOAD_TRACE_VARS
@@ -648,7 +646,7 @@
FT_Bool override;
#endif
- FT_UNUSED( valid );
+ FT_UNUSED( gxvalid );
/* reserved bits = 0 */
@@ -688,7 +686,7 @@
static GXV_kern_Dialect
gxv_kern_coverage_validate( FT_UShort coverage,
FT_UShort* format,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
GXV_kern_Dialect result = KERN_DIALECT_UNKNOWN;
@@ -697,33 +695,33 @@
GXV_TRACE(( "interprete coverage 0x%04x by Apple style\n", coverage ));
- if ( KERN_IS_NEW( valid ) )
+ if ( KERN_IS_NEW( gxvalid ) )
{
if ( gxv_kern_coverage_new_apple_validate( coverage,
format,
- valid ) )
+ gxvalid ) )
{
result = KERN_DIALECT_APPLE;
goto Exit;
}
}
- if ( KERN_IS_CLASSIC( valid ) && KERN_ALLOWS_APPLE( valid ) )
+ if ( KERN_IS_CLASSIC( gxvalid ) && KERN_ALLOWS_APPLE( gxvalid ) )
{
if ( gxv_kern_coverage_classic_apple_validate( coverage,
format,
- valid ) )
+ gxvalid ) )
{
result = KERN_DIALECT_APPLE;
goto Exit;
}
}
- if ( KERN_IS_CLASSIC( valid ) && KERN_ALLOWS_MS( valid ) )
+ if ( KERN_IS_CLASSIC( gxvalid ) && KERN_ALLOWS_MS( gxvalid ) )
{
if ( gxv_kern_coverage_classic_microsoft_validate( coverage,
format,
- valid ) )
+ gxvalid ) )
{
result = KERN_DIALECT_MS;
goto Exit;
@@ -741,7 +739,7 @@
static void
gxv_kern_subtable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
#ifdef GXV_LOAD_TRACE_VARS
@@ -763,7 +761,7 @@
u16[1] = FT_NEXT_USHORT( p ); /* Apple: length_lo MS: length */
coverage = FT_NEXT_USHORT( p );
- switch ( gxv_kern_coverage_validate( coverage, &format, valid ) )
+ switch ( gxv_kern_coverage_validate( coverage, &format, gxvalid ) )
{
case KERN_DIALECT_MS:
#ifdef GXV_LOAD_TRACE_VARS
@@ -787,7 +785,7 @@
#endif
GXV_TRACE(( "Subtable length = %d\n", length ));
- if ( KERN_IS_NEW( valid ) )
+ if ( KERN_IS_NEW( gxvalid ) )
{
GXV_LIMIT_CHECK( 2 );
#ifdef GXV_LOAD_TRACE_VARS
@@ -808,18 +806,18 @@
/* formats 1, 2, 3 require the position of the start of this subtable */
if ( format == 0 )
- gxv_kern_subtable_fmt0_validate( table, table + length, valid );
+ gxv_kern_subtable_fmt0_validate( table, table + length, gxvalid );
else if ( format == 1 )
- gxv_kern_subtable_fmt1_validate( table, table + length, valid );
+ gxv_kern_subtable_fmt1_validate( table, table + length, gxvalid );
else if ( format == 2 )
- gxv_kern_subtable_fmt2_validate( table, table + length, valid );
+ gxv_kern_subtable_fmt2_validate( table, table + length, gxvalid );
else if ( format == 3 )
- gxv_kern_subtable_fmt3_validate( table, table + length, valid );
+ gxv_kern_subtable_fmt3_validate( table, table + length, gxvalid );
else
FT_INVALID_DATA;
Exit:
- valid->subtable_length = length;
+ gxvalid->subtable_length = length;
GXV_EXIT;
}
@@ -839,8 +837,8 @@
GXV_kern_Dialect dialect_request,
FT_Validator ftvalid )
{
- GXV_ValidatorRec validrec;
- GXV_Validator valid = &validrec;
+ GXV_ValidatorRec gxvalidrec;
+ GXV_Validator gxvalid = &gxvalidrec;
GXV_kern_DataRec kernrec;
GXV_kern_Data kern = &kernrec;
@@ -852,13 +850,13 @@
FT_UInt i;
- valid->root = ftvalid;
- valid->table_data = kern;
- valid->face = face;
+ gxvalid->root = ftvalid;
+ gxvalid->table_data = kern;
+ gxvalid->face = face;
FT_TRACE3(( "validating `kern' table\n" ));
GXV_INIT;
- KERN_DIALECT( valid ) = dialect_request;
+ KERN_DIALECT( gxvalid ) = dialect_request;
GXV_LIMIT_CHECK( 2 );
GXV_KERN_DATA( version ) = (GXV_kern_Version)FT_NEXT_USHORT( p );
@@ -867,12 +865,12 @@
if ( 0x0001 < GXV_KERN_DATA( version ) )
FT_INVALID_FORMAT;
- else if ( KERN_IS_CLASSIC( valid ) )
+ else if ( KERN_IS_CLASSIC( gxvalid ) )
{
GXV_LIMIT_CHECK( 2 );
nTables = FT_NEXT_USHORT( p );
}
- else if ( KERN_IS_NEW( valid ) )
+ else if ( KERN_IS_NEW( gxvalid ) )
{
if ( classic_only )
FT_INVALID_FORMAT;
@@ -888,8 +886,8 @@
{
GXV_TRACE(( "validating subtable %d/%d\n", i, nTables ));
/* p should be 32bit-aligned? */
- gxv_kern_subtable_validate( p, 0, valid );
- p += valid->subtable_length;
+ gxv_kern_subtable_validate( p, 0, gxvalid );
+ p += gxvalid->subtable_length;
}
FT_TRACE4(( "\n" ));
diff --git a/src/gxvalid/gxvlcar.c b/src/gxvalid/gxvlcar.c
index f14fa5b..48308b0 100644
--- a/src/gxvalid/gxvlcar.c
+++ b/src/gxvalid/gxvlcar.c
@@ -67,14 +67,14 @@
static void
gxv_lcar_partial_validate( FT_UShort partial,
FT_UShort glyph,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
GXV_NAME_ENTER( "partial" );
if ( GXV_LCAR_DATA( format ) != 1 )
goto Exit;
- gxv_ctlPoint_validate( glyph, partial, valid );
+ gxv_ctlPoint_validate( glyph, partial, gxvalid );
Exit:
GXV_EXIT;
@@ -84,10 +84,10 @@
static void
gxv_lcar_LookupValue_validate( FT_UShort glyph,
GXV_LookupValueCPtr value_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
- FT_Bytes p = valid->root->base + value_p->u;
- FT_Bytes limit = valid->root->limit;
+ FT_Bytes p = gxvalid->root->base + value_p->u;
+ FT_Bytes limit = gxvalid->root->limit;
FT_UShort count;
FT_Short partial;
FT_UShort i;
@@ -102,7 +102,7 @@
for ( i = 0; i < count; i++ )
{
partial = FT_NEXT_SHORT( p );
- gxv_lcar_partial_validate( partial, glyph, valid );
+ gxv_lcar_partial_validate( partial, glyph, gxvalid );
}
GXV_EXIT;
@@ -148,7 +148,7 @@
gxv_lcar_LookupFmt4_transit( FT_UShort relative_gindex,
GXV_LookupValueCPtr base_value_p,
FT_Bytes lookuptbl_limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p;
FT_Bytes limit;
@@ -160,8 +160,8 @@
/* XXX: check range? */
offset = (FT_UShort)( base_value_p->u +
relative_gindex * sizeof ( FT_UShort ) );
- p = valid->root->base + offset;
- limit = valid->root->limit;
+ p = gxvalid->root->base + offset;
+ limit = gxvalid->root->limit;
GXV_LIMIT_CHECK ( 2 );
value.u = FT_NEXT_USHORT( p );
@@ -185,8 +185,8 @@
{
FT_Bytes p = table;
FT_Bytes limit = 0;
- GXV_ValidatorRec validrec;
- GXV_Validator valid = &validrec;
+ GXV_ValidatorRec gxvalidrec;
+ GXV_Validator gxvalid = &gxvalidrec;
GXV_lcar_DataRec lcarrec;
GXV_lcar_Data lcar = &lcarrec;
@@ -194,9 +194,9 @@
FT_Fixed version;
- valid->root = ftvalid;
- valid->table_data = lcar;
- valid->face = face;
+ gxvalid->root = ftvalid;
+ gxvalid->table_data = lcar;
+ gxvalid->face = face;
FT_TRACE3(( "validating `lcar' table\n" ));
GXV_INIT;
@@ -211,10 +211,10 @@
if ( GXV_LCAR_DATA( format ) > 1 )
FT_INVALID_FORMAT;
- valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
- valid->lookupval_func = gxv_lcar_LookupValue_validate;
- valid->lookupfmt4_trans = gxv_lcar_LookupFmt4_transit;
- gxv_LookupTable_validate( p, limit, valid );
+ gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+ gxvalid->lookupval_func = gxv_lcar_LookupValue_validate;
+ gxvalid->lookupfmt4_trans = gxv_lcar_LookupFmt4_transit;
+ gxv_LookupTable_validate( p, limit, gxvalid );
FT_TRACE4(( "\n" ));
}
diff --git a/src/gxvalid/gxvmod.c b/src/gxvalid/gxvmod.c
index 502fe5d..278d476 100644
--- a/src/gxvalid/gxvmod.c
+++ b/src/gxvalid/gxvmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType's TrueTypeGX/AAT validation module implementation (body). */
/* */
-/* Copyright 2004, 2005, 2006 */
+/* Copyright 2004-2006, 2013 */
/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -58,8 +58,8 @@
error = FT_Load_Sfnt_Table( face, tag, 0, NULL, table_len );
- if ( error == GXV_Err_Table_Missing )
- return GXV_Err_Ok;
+ if ( FT_ERR_EQ( error, Table_Missing ) )
+ return FT_Err_Ok;
if ( error )
goto Exit;
@@ -112,7 +112,7 @@
{
FT_Memory volatile memory = FT_FACE_MEMORY( face );
- FT_Error error = GXV_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_ValidatorRec volatile valid;
FT_UInt i;
@@ -200,7 +200,7 @@
/* without volatile on `error' GCC 4.1.1. emits: */
/* warning: variable 'error' might be clobbered by 'longjmp' or 'vfork' */
/* this warning seems spurious but --- */
- FT_Error volatile error = GXV_Err_Ok;
+ FT_Error volatile error;
FT_ValidatorRec volatile valid;
diff --git a/src/gxvalid/gxvmort.c b/src/gxvalid/gxvmort.c
index 465462a..55ff5a8 100644
--- a/src/gxvalid/gxvmort.c
+++ b/src/gxvalid/gxvmort.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT mort table validation (body). */
/* */
-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
+/* Copyright 2005, 2013 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, */
@@ -40,7 +40,7 @@
static void
gxv_mort_feature_validate( GXV_mort_feature f,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
if ( f->featureType >= gxv_feat_registry_length )
{
@@ -89,7 +89,7 @@
gxv_mort_featurearray_validate( FT_Bytes table,
FT_Bytes limit,
FT_ULong nFeatureFlags,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_ULong i;
@@ -106,23 +106,24 @@
f.enableFlags = FT_NEXT_ULONG( p );
f.disableFlags = FT_NEXT_ULONG( p );
- gxv_mort_feature_validate( &f, valid );
+ gxv_mort_feature_validate( &f, gxvalid );
}
if ( !IS_GXV_MORT_FEATURE_OFF( f ) )
FT_INVALID_DATA;
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
FT_LOCAL_DEF( void )
gxv_mort_coverage_validate( FT_UShort coverage,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
- FT_UNUSED( valid );
+ FT_UNUSED( gxvalid );
+#ifdef FT_DEBUG_LEVEL_TRACE
if ( coverage & 0x8000U )
GXV_TRACE(( " this subtable is for vertical text only\n" ));
else
@@ -141,6 +142,7 @@
if ( coverage & 0x1FF8 )
GXV_TRACE(( " coverage has non-zero bits in reserved area\n" ));
+#endif
}
@@ -148,7 +150,7 @@
gxv_mort_subtables_validate( FT_Bytes table,
FT_Bytes limit,
FT_UShort nSubtables,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -163,14 +165,15 @@
};
- GXV_Validate_Func func;
- FT_UShort i;
+ FT_UShort i;
GXV_NAME_ENTER( "subtables in a chain" );
for ( i = 0; i < nSubtables; i++ )
{
+ GXV_Validate_Func func;
+
FT_UShort length;
FT_UShort coverage;
#ifdef GXV_LOAD_UNUSED_VARS
@@ -195,7 +198,7 @@
rest = length - ( 2 + 2 + 4 );
GXV_LIMIT_CHECK( rest );
- gxv_mort_coverage_validate( coverage, valid );
+ gxv_mort_coverage_validate( coverage, gxvalid );
if ( type > 5 )
FT_INVALID_FORMAT;
@@ -204,13 +207,13 @@
if ( func == NULL )
GXV_TRACE(( "morx type %d is reserved\n", type ));
- func( p, p + rest, valid );
+ func( p, p + rest, gxvalid );
p += rest;
/* TODO: validate subFeatureFlags */
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -219,7 +222,7 @@
static void
gxv_mort_chain_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
#ifdef GXV_LOAD_UNUSED_VARS
@@ -243,10 +246,10 @@
nSubtables = FT_NEXT_USHORT( p );
gxv_mort_featurearray_validate( p, table + chainLength,
- nFeatureFlags, valid );
- p += valid->subtable_length;
- gxv_mort_subtables_validate( p, table + chainLength, nSubtables, valid );
- valid->subtable_length = chainLength;
+ nFeatureFlags, gxvalid );
+ p += gxvalid->subtable_length;
+ gxv_mort_subtables_validate( p, table + chainLength, nSubtables, gxvalid );
+ gxvalid->subtable_length = chainLength;
/* TODO: validate defaultFlags */
GXV_EXIT;
@@ -258,8 +261,8 @@
FT_Face face,
FT_Validator ftvalid )
{
- GXV_ValidatorRec validrec;
- GXV_Validator valid = &validrec;
+ GXV_ValidatorRec gxvalidrec;
+ GXV_Validator gxvalid = &gxvalidrec;
FT_Bytes p = table;
FT_Bytes limit = 0;
FT_ULong version;
@@ -267,9 +270,9 @@
FT_ULong i;
- valid->root = ftvalid;
- valid->face = face;
- limit = valid->root->limit;
+ gxvalid->root = ftvalid;
+ gxvalid->face = face;
+ limit = gxvalid->root->limit;
FT_TRACE3(( "validating `mort' table\n" ));
GXV_INIT;
@@ -285,8 +288,8 @@
{
GXV_TRACE(( "validating chain %d/%d\n", i + 1, nChains ));
GXV_32BIT_ALIGNMENT_VALIDATE( p - table );
- gxv_mort_chain_validate( p, limit, valid );
- p += valid->subtable_length;
+ gxv_mort_chain_validate( p, limit, gxvalid );
+ p += gxvalid->subtable_length;
}
FT_TRACE4(( "\n" ));
diff --git a/src/gxvalid/gxvmort.h b/src/gxvalid/gxvmort.h
index 1e5a1f5..8e62e52 100644
--- a/src/gxvalid/gxvmort.h
+++ b/src/gxvalid/gxvmort.h
@@ -55,36 +55,36 @@
gxv_mort_featurearray_validate( FT_Bytes table,
FT_Bytes limit,
FT_ULong nFeatureFlags,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_mort_coverage_validate( FT_UShort coverage,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_mort_subtable_type0_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_mort_subtable_type1_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_mort_subtable_type2_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_mort_subtable_type4_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_mort_subtable_type5_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
#endif /* __GXVMORT_H__ */
diff --git a/src/gxvalid/gxvmort0.c b/src/gxvalid/gxvmort0.c
index b136ced..f19016e 100644
--- a/src/gxvalid/gxvmort0.c
+++ b/src/gxvalid/gxvmort0.c
@@ -67,7 +67,7 @@
GXV_StateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UShort markFirst;
FT_UShort dontAdvance;
@@ -125,7 +125,7 @@
FT_LOCAL_DEF( void )
gxv_mort_subtable_type0_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -135,14 +135,14 @@
GXV_LIMIT_CHECK( GXV_STATETABLE_HEADER_SIZE );
- valid->statetable.optdata = NULL;
- valid->statetable.optdata_load_func = NULL;
- valid->statetable.subtable_setup_func = NULL;
- valid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
- valid->statetable.entry_validate_func =
+ gxvalid->statetable.optdata = NULL;
+ gxvalid->statetable.optdata_load_func = NULL;
+ gxvalid->statetable.subtable_setup_func = NULL;
+ gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
+ gxvalid->statetable.entry_validate_func =
gxv_mort_subtable_type0_entry_validate;
- gxv_StateTable_validate( p, limit, valid );
+ gxv_StateTable_validate( p, limit, gxvalid );
GXV_EXIT;
}
diff --git a/src/gxvalid/gxvmort1.c b/src/gxvalid/gxvmort1.c
index 1c17a5d..0189504 100644
--- a/src/gxvalid/gxvmort1.c
+++ b/src/gxvalid/gxvmort1.c
@@ -53,12 +53,12 @@
static void
gxv_mort_subtable_type1_substitutionTable_load( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
GXV_mort_subtable_type1_StateOptRecData optdata =
- (GXV_mort_subtable_type1_StateOptRecData)valid->statetable.optdata;
+ (GXV_mort_subtable_type1_StateOptRecData)gxvalid->statetable.optdata;
GXV_LIMIT_CHECK( 2 );
@@ -74,14 +74,14 @@
FT_UShort* classTable_length_p,
FT_UShort* stateArray_length_p,
FT_UShort* entryTable_length_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UShort o[4];
FT_UShort *l[4];
FT_UShort buff[5];
GXV_mort_subtable_type1_StateOptRecData optdata =
- (GXV_mort_subtable_type1_StateOptRecData)valid->statetable.optdata;
+ (GXV_mort_subtable_type1_StateOptRecData)gxvalid->statetable.optdata;
o[0] = classTable;
@@ -93,7 +93,7 @@
l[2] = entryTable_length_p;
l[3] = &( optdata->substitutionTable_length );
- gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, valid );
+ gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, gxvalid );
}
@@ -102,7 +102,7 @@
FT_Short wordOffset,
const FT_String* tag,
FT_Byte state,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UShort substTable;
FT_UShort substTable_limit;
@@ -113,16 +113,16 @@
substTable =
((GXV_mort_subtable_type1_StateOptRec *)
- (valid->statetable.optdata))->substitutionTable;
+ (gxvalid->statetable.optdata))->substitutionTable;
substTable_limit =
(FT_UShort)( substTable +
((GXV_mort_subtable_type1_StateOptRec *)
- (valid->statetable.optdata))->substitutionTable_length );
+ (gxvalid->statetable.optdata))->substitutionTable_length );
- 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 ) );
+ gxvalid->min_gid = (FT_UShort)( ( substTable - wordOffset * 2 ) / 2 );
+ gxvalid->max_gid = (FT_UShort)( ( substTable_limit - wordOffset * 2 ) / 2 );
+ gxvalid->max_gid = (FT_UShort)( FT_MAX( gxvalid->max_gid,
+ gxvalid->face->num_glyphs ) );
/* XXX: check range? */
@@ -137,7 +137,7 @@
GXV_StateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort setMark;
@@ -169,24 +169,24 @@
gxv_mort_subtable_type1_offset_to_subst_validate( markOffset,
"markOffset",
state,
- valid );
+ gxvalid );
gxv_mort_subtable_type1_offset_to_subst_validate( currentOffset,
"currentOffset",
state,
- valid );
+ gxvalid );
}
static void
gxv_mort_subtable_type1_substTable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort num_gids = (FT_UShort)(
((GXV_mort_subtable_type1_StateOptRec *)
- (valid->statetable.optdata))->substitutionTable_length / 2 );
+ (gxvalid->statetable.optdata))->substitutionTable_length / 2 );
FT_UShort i;
@@ -202,11 +202,11 @@
if ( dst_gid >= 0xFFFFU )
continue;
- if ( dst_gid < valid->min_gid || valid->max_gid < dst_gid )
+ if ( dst_gid < gxvalid->min_gid || gxvalid->max_gid < dst_gid )
{
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 ));
+ i, dst_gid, gxvalid->min_gid, gxvalid->max_gid ));
GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
}
@@ -223,7 +223,7 @@
FT_LOCAL_DEF( void )
gxv_mort_subtable_type1_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -234,23 +234,23 @@
GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE );
- valid->statetable.optdata =
+ gxvalid->statetable.optdata =
&st_rec;
- valid->statetable.optdata_load_func =
+ gxvalid->statetable.optdata_load_func =
gxv_mort_subtable_type1_substitutionTable_load;
- valid->statetable.subtable_setup_func =
+ gxvalid->statetable.subtable_setup_func =
gxv_mort_subtable_type1_subtable_setup;
- valid->statetable.entry_glyphoffset_fmt =
+ gxvalid->statetable.entry_glyphoffset_fmt =
GXV_GLYPHOFFSET_ULONG;
- valid->statetable.entry_validate_func =
+ gxvalid->statetable.entry_validate_func =
gxv_mort_subtable_type1_entry_validate;
- gxv_StateTable_validate( p, limit, valid );
+ gxv_StateTable_validate( p, limit, gxvalid );
gxv_mort_subtable_type1_substTable_validate(
table + st_rec.substitutionTable,
table + st_rec.substitutionTable + st_rec.substitutionTable_length,
- valid );
+ gxvalid );
GXV_EXIT;
}
diff --git a/src/gxvalid/gxvmort2.c b/src/gxvalid/gxvmort2.c
index 9e08fb7..099ffd4 100644
--- a/src/gxvalid/gxvmort2.c
+++ b/src/gxvalid/gxvmort2.c
@@ -57,11 +57,11 @@
static void
gxv_mort_subtable_type2_opttable_load( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
- FT_Bytes p = table;
+ FT_Bytes p = table;
GXV_mort_subtable_type2_StateOptRecData optdata =
- (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata;
+ (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;
GXV_LIMIT_CHECK( 2 + 2 + 2 );
@@ -86,14 +86,14 @@
FT_UShort *classTable_length_p,
FT_UShort *stateArray_length_p,
FT_UShort *entryTable_length_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UShort o[6];
FT_UShort *l[6];
FT_UShort buff[7];
GXV_mort_subtable_type2_StateOptRecData optdata =
- (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata;
+ (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;
GXV_NAME_ENTER( "subtable boundaries setup" );
@@ -111,7 +111,7 @@
l[4] = &(optdata->componentTable_length);
l[5] = &(optdata->ligatureTable_length);
- gxv_set_length_by_ushort_offset( o, l, buff, 6, table_size, valid );
+ gxv_set_length_by_ushort_offset( o, l, buff, 6, table_size, gxvalid );
GXV_TRACE(( "classTable: offset=0x%04x length=0x%04x\n",
classTable, *classTable_length_p ));
@@ -137,11 +137,11 @@
gxv_mort_subtable_type2_ligActionOffset_validate(
FT_Bytes table,
FT_UShort ligActionOffset,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
/* access ligActionTable */
GXV_mort_subtable_type2_StateOptRecData optdata =
- (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata;
+ (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;
FT_Bytes lat_base = table + optdata->ligActionTable;
FT_Bytes p = table + ligActionOffset;
@@ -214,7 +214,7 @@
GXV_StateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort setComponent;
@@ -236,16 +236,16 @@
if ( 0 < offset )
gxv_mort_subtable_type2_ligActionOffset_validate( table, offset,
- valid );
+ gxvalid );
}
static void
gxv_mort_subtable_type2_ligatureTable_validate( FT_Bytes table,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
GXV_mort_subtable_type2_StateOptRecData optdata =
- (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata;
+ (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;
FT_Bytes p = table + optdata->ligatureTable;
FT_Bytes limit = table + optdata->ligatureTable
@@ -264,7 +264,7 @@
GXV_LIMIT_CHECK( 2 );
lig_gid = FT_NEXT_USHORT( p );
- if ( valid->face->num_glyphs < lig_gid )
+ if ( gxvalid->face->num_glyphs < lig_gid )
GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
}
@@ -275,7 +275,7 @@
FT_LOCAL_DEF( void )
gxv_mort_subtable_type2_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -286,23 +286,23 @@
GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE );
- valid->statetable.optdata =
+ gxvalid->statetable.optdata =
&lig_rec;
- valid->statetable.optdata_load_func =
+ gxvalid->statetable.optdata_load_func =
gxv_mort_subtable_type2_opttable_load;
- valid->statetable.subtable_setup_func =
+ gxvalid->statetable.subtable_setup_func =
gxv_mort_subtable_type2_subtable_setup;
- valid->statetable.entry_glyphoffset_fmt =
+ gxvalid->statetable.entry_glyphoffset_fmt =
GXV_GLYPHOFFSET_NONE;
- valid->statetable.entry_validate_func =
+ gxvalid->statetable.entry_validate_func =
gxv_mort_subtable_type2_entry_validate;
- gxv_StateTable_validate( p, limit, valid );
+ gxv_StateTable_validate( p, limit, gxvalid );
- p += valid->subtable_length;
- gxv_mort_subtable_type2_ligatureTable_validate( table, valid );
+ p += gxvalid->subtable_length;
+ gxv_mort_subtable_type2_ligatureTable_validate( table, gxvalid );
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
diff --git a/src/gxvalid/gxvmort4.c b/src/gxvalid/gxvmort4.c
index 8347098..9e86af4 100644
--- a/src/gxvalid/gxvmort4.c
+++ b/src/gxvalid/gxvmort4.c
@@ -41,11 +41,11 @@
static void
gxv_mort_subtable_type4_lookupval_validate( FT_UShort glyph,
GXV_LookupValueCPtr value_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UNUSED( glyph );
- gxv_glyphid_validate( value_p->u, valid );
+ gxv_glyphid_validate( value_p->u, gxvalid );
}
/*
@@ -80,7 +80,7 @@
FT_UShort relative_gindex,
GXV_LookupValueCPtr base_value_p,
FT_Bytes lookuptbl_limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p;
FT_Bytes limit;
@@ -91,7 +91,7 @@
offset = (FT_UShort)( base_value_p->u +
relative_gindex * sizeof ( FT_UShort ) );
- p = valid->lookuptbl_head + offset;
+ p = gxvalid->lookuptbl_head + offset;
limit = lookuptbl_limit;
GXV_LIMIT_CHECK( 2 );
@@ -104,7 +104,7 @@
FT_LOCAL_DEF( void )
gxv_mort_subtable_type4_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -112,11 +112,11 @@
GXV_NAME_ENTER( "mort chain subtable type4 "
"(Non-Contextual Glyph Substitution)" );
- valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
- valid->lookupval_func = gxv_mort_subtable_type4_lookupval_validate;
- valid->lookupfmt4_trans = gxv_mort_subtable_type4_lookupfmt4_transit;
+ gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+ gxvalid->lookupval_func = gxv_mort_subtable_type4_lookupval_validate;
+ gxvalid->lookupfmt4_trans = gxv_mort_subtable_type4_lookupfmt4_transit;
- gxv_LookupTable_validate( p, limit, valid );
+ gxv_LookupTable_validate( p, limit, gxvalid );
GXV_EXIT;
}
diff --git a/src/gxvalid/gxvmort5.c b/src/gxvalid/gxvmort5.c
index 32cfb03..9498b10 100644
--- a/src/gxvalid/gxvmort5.c
+++ b/src/gxvalid/gxvmort5.c
@@ -70,10 +70,10 @@
FT_UShort* classTable_length_p,
FT_UShort* stateArray_length_p,
FT_UShort* entryTable_length_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
GXV_mort_subtable_type5_StateOptRecData optdata =
- (GXV_mort_subtable_type5_StateOptRecData)valid->statetable.optdata;
+ (GXV_mort_subtable_type5_StateOptRecData)gxvalid->statetable.optdata;
gxv_StateTable_subtable_setup( table_size,
@@ -83,7 +83,7 @@
classTable_length_p,
stateArray_length_p,
entryTable_length_p,
- valid );
+ gxvalid );
optdata->classTable = classTable;
optdata->stateArray = stateArray;
@@ -100,7 +100,7 @@
FT_UShort count,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
/*
* We don't know the range of insertion-glyph-list.
@@ -109,7 +109,7 @@
FT_Bytes p = table + offset;
GXV_mort_subtable_type5_StateOptRecData optdata =
- (GXV_mort_subtable_type5_StateOptRecData)valid->statetable.optdata;
+ (GXV_mort_subtable_type5_StateOptRecData)gxvalid->statetable.optdata;
if ( optdata->classTable < offset &&
offset < optdata->classTable + *(optdata->classTable_length_p) )
@@ -145,7 +145,7 @@
GXV_StateTable_GlyphOffsetCPtr glyphOffset,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
#ifdef GXV_LOAD_UNUSED_VARS
FT_Bool setMark;
@@ -184,7 +184,7 @@
currentInsertCount,
table,
limit,
- valid );
+ gxvalid );
}
if ( 0 != markedInsertList && 0 != markedInsertCount )
@@ -193,7 +193,7 @@
markedInsertCount,
table,
limit,
- valid );
+ gxvalid );
}
}
@@ -201,7 +201,7 @@
FT_LOCAL_DEF( void )
gxv_mort_subtable_type5_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -213,18 +213,18 @@
GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE );
- valid->statetable.optdata =
+ gxvalid->statetable.optdata =
et;
- valid->statetable.optdata_load_func =
+ gxvalid->statetable.optdata_load_func =
NULL;
- valid->statetable.subtable_setup_func =
+ gxvalid->statetable.subtable_setup_func =
gxv_mort_subtable_type5_subtable_setup;
- valid->statetable.entry_glyphoffset_fmt =
+ gxvalid->statetable.entry_glyphoffset_fmt =
GXV_GLYPHOFFSET_ULONG;
- valid->statetable.entry_validate_func =
+ gxvalid->statetable.entry_validate_func =
gxv_mort_subtable_type5_entry_validate;
- gxv_StateTable_validate( p, limit, valid );
+ gxv_StateTable_validate( p, limit, gxvalid );
GXV_EXIT;
}
diff --git a/src/gxvalid/gxvmorx.c b/src/gxvalid/gxvmorx.c
index 4b1dd00..96dba63 100644
--- a/src/gxvalid/gxvmorx.c
+++ b/src/gxvalid/gxvmorx.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT morx table validation (body). */
/* */
-/* Copyright 2005, 2008 by */
+/* Copyright 2005, 2008, 2013 by */
/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -42,7 +42,7 @@
gxv_morx_subtables_validate( FT_Bytes table,
FT_Bytes limit,
FT_UShort nSubtables,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -57,8 +57,6 @@
};
- GXV_Validate_Func func;
-
FT_UShort i;
@@ -66,6 +64,8 @@
for ( i = 0; i < nSubtables; i++ )
{
+ GXV_Validate_Func func;
+
FT_ULong length;
FT_ULong coverage;
#ifdef GXV_LOAD_UNUSED_VARS
@@ -93,7 +93,7 @@
/* morx coverage consists of mort_coverage & 16bit padding */
gxv_mort_coverage_validate( (FT_UShort)( ( coverage >> 16 ) | coverage ),
- valid );
+ gxvalid );
if ( type > 5 )
FT_INVALID_FORMAT;
@@ -101,13 +101,13 @@
if ( func == NULL )
GXV_TRACE(( "morx type %d is reserved\n", type ));
- func( p, p + rest, valid );
+ func( p, p + rest, gxvalid );
/* TODO: subFeatureFlags should be unique in a table? */
p += rest;
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -116,7 +116,7 @@
static void
gxv_morx_chain_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
#ifdef GXV_LOAD_UNUSED_VARS
@@ -140,16 +140,16 @@
nSubtables = FT_NEXT_ULONG( p );
/* feature-array of morx is same with that of mort */
- gxv_mort_featurearray_validate( p, limit, nFeatureFlags, valid );
- p += valid->subtable_length;
+ gxv_mort_featurearray_validate( p, limit, nFeatureFlags, gxvalid );
+ p += gxvalid->subtable_length;
if ( nSubtables >= 0x10000L )
FT_INVALID_DATA;
gxv_morx_subtables_validate( p, table + chainLength,
- (FT_UShort)nSubtables, valid );
+ (FT_UShort)nSubtables, gxvalid );
- valid->subtable_length = chainLength;
+ gxvalid->subtable_length = chainLength;
/* TODO: defaultFlags should be compared with the flags in tables */
@@ -162,8 +162,8 @@
FT_Face face,
FT_Validator ftvalid )
{
- GXV_ValidatorRec validrec;
- GXV_Validator valid = &validrec;
+ GXV_ValidatorRec gxvalidrec;
+ GXV_Validator gxvalid = &gxvalidrec;
FT_Bytes p = table;
FT_Bytes limit = 0;
FT_ULong version;
@@ -171,8 +171,8 @@
FT_ULong i;
- valid->root = ftvalid;
- valid->face = face;
+ gxvalid->root = ftvalid;
+ gxvalid->face = face;
FT_TRACE3(( "validating `morx' table\n" ));
GXV_INIT;
@@ -188,8 +188,8 @@
{
GXV_TRACE(( "validating chain %d/%d\n", i + 1, nChains ));
GXV_32BIT_ALIGNMENT_VALIDATE( p - table );
- gxv_morx_chain_validate( p, limit, valid );
- p += valid->subtable_length;
+ gxv_morx_chain_validate( p, limit, gxvalid );
+ p += gxvalid->subtable_length;
}
FT_TRACE4(( "\n" ));
diff --git a/src/gxvalid/gxvmorx.h b/src/gxvalid/gxvmorx.h
index 28c1a44..9ed907a 100644
--- a/src/gxvalid/gxvmorx.h
+++ b/src/gxvalid/gxvmorx.h
@@ -38,27 +38,27 @@
FT_LOCAL( void )
gxv_morx_subtable_type0_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_morx_subtable_type1_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_morx_subtable_type2_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_morx_subtable_type4_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
FT_LOCAL( void )
gxv_morx_subtable_type5_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid );
+ GXV_Validator gxvalid );
#endif /* __GXVMORX_H__ */
diff --git a/src/gxvalid/gxvmorx0.c b/src/gxvalid/gxvmorx0.c
index 6a736c1..db165f4 100644
--- a/src/gxvalid/gxvmorx0.c
+++ b/src/gxvalid/gxvmorx0.c
@@ -45,7 +45,7 @@
GXV_XStateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort markFirst;
@@ -85,7 +85,7 @@
FT_LOCAL_DEF( void )
gxv_morx_subtable_type0_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -95,14 +95,14 @@
GXV_LIMIT_CHECK( GXV_STATETABLE_HEADER_SIZE );
- valid->xstatetable.optdata = NULL;
- valid->xstatetable.optdata_load_func = NULL;
- valid->xstatetable.subtable_setup_func = NULL;
- valid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
- valid->xstatetable.entry_validate_func =
+ gxvalid->xstatetable.optdata = NULL;
+ gxvalid->xstatetable.optdata_load_func = NULL;
+ gxvalid->xstatetable.subtable_setup_func = NULL;
+ gxvalid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
+ gxvalid->xstatetable.entry_validate_func =
gxv_morx_subtable_type0_entry_validate;
- gxv_XStateTable_validate( p, limit, valid );
+ gxv_XStateTable_validate( p, limit, gxvalid );
GXV_EXIT;
}
diff --git a/src/gxvalid/gxvmorx1.c b/src/gxvalid/gxvmorx1.c
index ce0009a..49f53d1 100644
--- a/src/gxvalid/gxvmorx1.c
+++ b/src/gxvalid/gxvmorx1.c
@@ -55,12 +55,12 @@
static void
gxv_morx_subtable_type1_substitutionTable_load( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
GXV_morx_subtable_type1_StateOptRecData optdata =
- (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata;
+ (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;
GXV_LIMIT_CHECK( 2 );
@@ -76,14 +76,14 @@
FT_ULong* classTable_length_p,
FT_ULong* stateArray_length_p,
FT_ULong* entryTable_length_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_ULong o[4];
FT_ULong *l[4];
FT_ULong buff[5];
GXV_morx_subtable_type1_StateOptRecData optdata =
- (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata;
+ (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;
o[0] = classTable;
@@ -95,7 +95,7 @@
l[2] = entryTable_length_p;
l[3] = &(optdata->substitutionTable_length);
- gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, valid );
+ gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, gxvalid );
}
@@ -106,7 +106,7 @@
GXV_StateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
#ifdef GXV_LOAD_TRACE_VARS
FT_UShort setMark;
@@ -117,7 +117,7 @@
FT_Short currentIndex;
GXV_morx_subtable_type1_StateOptRecData optdata =
- (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata;
+ (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;
FT_UNUSED( state );
FT_UNUSED( table );
@@ -159,13 +159,13 @@
static void
gxv_morx_subtable_type1_LookupValue_validate( FT_UShort glyph,
GXV_LookupValueCPtr value_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_UNUSED( glyph ); /* for the non-debugging case */
GXV_TRACE(( "morx subtable type1 subst.: %d -> %d\n", glyph, value_p->u ));
- if ( value_p->u > valid->face->num_glyphs )
+ if ( value_p->u > gxvalid->face->num_glyphs )
FT_INVALID_GLYPH_ID;
}
@@ -175,7 +175,7 @@
FT_UShort relative_gindex,
GXV_LookupValueCPtr base_value_p,
FT_Bytes lookuptbl_limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p;
FT_Bytes limit;
@@ -186,7 +186,7 @@
offset = (FT_UShort)( base_value_p->u +
relative_gindex * sizeof ( FT_UShort ) );
- p = valid->lookuptbl_head + offset;
+ p = gxvalid->lookuptbl_head + offset;
limit = lookuptbl_limit;
GXV_LIMIT_CHECK ( 2 );
@@ -202,19 +202,19 @@
static void
gxv_morx_subtable_type1_substitutionTable_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort i;
GXV_morx_subtable_type1_StateOptRecData optdata =
- (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata;
+ (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;
/* TODO: calculate offset/length for each lookupTables */
- valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
- valid->lookupval_func = gxv_morx_subtable_type1_LookupValue_validate;
- valid->lookupfmt4_trans = gxv_morx_subtable_type1_LookupFmt4_transit;
+ gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+ gxvalid->lookupval_func = gxv_morx_subtable_type1_LookupValue_validate;
+ gxvalid->lookupfmt4_trans = gxv_morx_subtable_type1_LookupFmt4_transit;
for ( i = 0; i < optdata->substitutionTable_num_lookupTables; i++ )
{
@@ -224,7 +224,7 @@
GXV_LIMIT_CHECK( 4 );
offset = FT_NEXT_ULONG( p );
- gxv_LookupTable_validate( table + offset, limit, valid );
+ gxv_LookupTable_validate( table + offset, limit, gxvalid );
}
/* TODO: overlapping of lookupTables in substitutionTable */
@@ -239,7 +239,7 @@
FT_LOCAL_DEF( void )
gxv_morx_subtable_type1_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -252,23 +252,23 @@
st_rec.substitutionTable_num_lookupTables = 0;
- valid->xstatetable.optdata =
+ gxvalid->xstatetable.optdata =
&st_rec;
- valid->xstatetable.optdata_load_func =
+ gxvalid->xstatetable.optdata_load_func =
gxv_morx_subtable_type1_substitutionTable_load;
- valid->xstatetable.subtable_setup_func =
+ gxvalid->xstatetable.subtable_setup_func =
gxv_morx_subtable_type1_subtable_setup;
- valid->xstatetable.entry_glyphoffset_fmt =
+ gxvalid->xstatetable.entry_glyphoffset_fmt =
GXV_GLYPHOFFSET_ULONG;
- valid->xstatetable.entry_validate_func =
+ gxvalid->xstatetable.entry_validate_func =
gxv_morx_subtable_type1_entry_validate;
- gxv_XStateTable_validate( p, limit, valid );
+ gxv_XStateTable_validate( p, limit, gxvalid );
gxv_morx_subtable_type1_substitutionTable_validate(
table + st_rec.substitutionTable,
table + st_rec.substitutionTable + st_rec.substitutionTable_length,
- valid );
+ gxvalid );
GXV_EXIT;
}
diff --git a/src/gxvalid/gxvmorx2.c b/src/gxvalid/gxvmorx2.c
index 9d2b0bc..e44445d 100644
--- a/src/gxvalid/gxvmorx2.c
+++ b/src/gxvalid/gxvmorx2.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT morx table validation */
/* body for type2 (Ligature Substitution) subtable. */
/* */
-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
+/* Copyright 2005, 2013 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, */
@@ -58,12 +58,12 @@
static void
gxv_morx_subtable_type2_opttable_load( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
GXV_morx_subtable_type2_StateOptRecData optdata =
- (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata;
+ (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;
GXV_LIMIT_CHECK( 4 + 4 + 4 );
@@ -88,14 +88,14 @@
FT_ULong* classTable_length_p,
FT_ULong* stateArray_length_p,
FT_ULong* entryTable_length_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_ULong o[6];
FT_ULong* l[6];
FT_ULong buff[7];
GXV_morx_subtable_type2_StateOptRecData optdata =
- (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata;
+ (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;
GXV_NAME_ENTER( "subtable boundaries setup" );
@@ -113,7 +113,7 @@
l[4] = &(optdata->componentTable_length);
l[5] = &(optdata->ligatureTable_length);
- gxv_set_length_by_ulong_offset( o, l, buff, 6, table_size, valid );
+ gxv_set_length_by_ulong_offset( o, l, buff, 6, table_size, gxvalid );
GXV_TRACE(( "classTable: offset=0x%08x length=0x%08x\n",
classTable, *classTable_length_p ));
@@ -142,11 +142,11 @@
gxv_morx_subtable_type2_ligActionIndex_validate(
FT_Bytes table,
FT_UShort ligActionIndex,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
/* access ligActionTable */
GXV_morx_subtable_type2_StateOptRecData optdata =
- (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata;
+ (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;
FT_Bytes lat_base = table + optdata->ligActionTable;
FT_Bytes p = lat_base +
@@ -188,7 +188,7 @@
/* it is different from the location offset in mort */
if ( ( offset & 0x3FFF0000UL ) == 0x3FFF0000UL )
{ /* negative offset */
- gid_limit = valid->face->num_glyphs - ( offset & 0x0000FFFFUL );
+ gid_limit = gxvalid->face->num_glyphs - ( offset & 0x0000FFFFUL );
if ( gid_limit > 0 )
return;
@@ -198,9 +198,9 @@
offset & 0xFFFFU ));
GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
}
- else if ( ( offset & 0x3FFF0000UL ) == 0x0000000UL )
+ else if ( ( offset & 0x3FFF0000UL ) == 0x00000000UL )
{ /* positive offset */
- if ( (FT_Long)offset < valid->face->num_glyphs )
+ if ( (FT_Long)offset < gxvalid->face->num_glyphs )
return;
GXV_TRACE(( "ligature action table includes"
@@ -225,7 +225,7 @@
GXV_StateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort setComponent;
@@ -253,16 +253,16 @@
if ( 0 < ligActionIndex )
gxv_morx_subtable_type2_ligActionIndex_validate(
- table, ligActionIndex, valid );
+ table, ligActionIndex, gxvalid );
}
static void
gxv_morx_subtable_type2_ligatureTable_validate( FT_Bytes table,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
GXV_morx_subtable_type2_StateOptRecData optdata =
- (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata;
+ (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;
FT_Bytes p = table + optdata->ligatureTable;
FT_Bytes limit = table + optdata->ligatureTable
@@ -281,7 +281,7 @@
GXV_LIMIT_CHECK( 2 );
lig_gid = FT_NEXT_USHORT( p );
- if ( lig_gid < valid->face->num_glyphs )
+ if ( lig_gid < gxvalid->face->num_glyphs )
GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
}
@@ -293,7 +293,7 @@
FT_LOCAL_DEF( void )
gxv_morx_subtable_type2_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -304,21 +304,23 @@
GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE2_HEADER_SIZE );
- valid->xstatetable.optdata =
+ gxvalid->xstatetable.optdata =
&lig_rec;
- valid->xstatetable.optdata_load_func =
+ gxvalid->xstatetable.optdata_load_func =
gxv_morx_subtable_type2_opttable_load;
- valid->xstatetable.subtable_setup_func =
+ gxvalid->xstatetable.subtable_setup_func =
gxv_morx_subtable_type2_subtable_setup;
- valid->xstatetable.entry_glyphoffset_fmt =
+ gxvalid->xstatetable.entry_glyphoffset_fmt =
GXV_GLYPHOFFSET_USHORT;
- valid->xstatetable.entry_validate_func =
+ gxvalid->xstatetable.entry_validate_func =
gxv_morx_subtable_type2_entry_validate;
- gxv_XStateTable_validate( p, limit, valid );
+ gxv_XStateTable_validate( p, limit, gxvalid );
- p += valid->subtable_length;
- gxv_morx_subtable_type2_ligatureTable_validate( table, valid );
+#if 0
+ p += gxvalid->subtable_length;
+#endif
+ gxv_morx_subtable_type2_ligatureTable_validate( table, gxvalid );
GXV_EXIT;
}
diff --git a/src/gxvalid/gxvmorx4.c b/src/gxvalid/gxvmorx4.c
index c0d2f78..68ab678 100644
--- a/src/gxvalid/gxvmorx4.c
+++ b/src/gxvalid/gxvmorx4.c
@@ -41,12 +41,12 @@
FT_LOCAL_DEF( void )
gxv_morx_subtable_type4_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
GXV_NAME_ENTER( "morx chain subtable type4 "
"(Non-Contextual Glyph Substitution)" );
- gxv_mort_subtable_type4_validate( table, limit, valid );
+ gxv_mort_subtable_type4_validate( table, limit, gxvalid );
GXV_EXIT;
}
diff --git a/src/gxvalid/gxvmorx5.c b/src/gxvalid/gxvmorx5.c
index d8cf700..5e095dd 100644
--- a/src/gxvalid/gxvmorx5.c
+++ b/src/gxvalid/gxvmorx5.c
@@ -64,12 +64,12 @@
static void
gxv_morx_subtable_type5_insertionGlyphList_load( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
GXV_morx_subtable_type5_StateOptRecData optdata =
- (GXV_morx_subtable_type5_StateOptRecData)valid->xstatetable.optdata;
+ (GXV_morx_subtable_type5_StateOptRecData)gxvalid->xstatetable.optdata;
GXV_LIMIT_CHECK( 4 );
@@ -85,14 +85,14 @@
FT_ULong* classTable_length_p,
FT_ULong* stateArray_length_p,
FT_ULong* entryTable_length_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_ULong o[4];
FT_ULong* l[4];
FT_ULong buff[5];
GXV_morx_subtable_type5_StateOptRecData optdata =
- (GXV_morx_subtable_type5_StateOptRecData)valid->xstatetable.optdata;
+ (GXV_morx_subtable_type5_StateOptRecData)gxvalid->xstatetable.optdata;
o[0] = classTable;
@@ -104,7 +104,7 @@
l[2] = entryTable_length_p;
l[3] = &(optdata->insertionGlyphList_length);
- gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, valid );
+ gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, gxvalid );
}
@@ -113,9 +113,9 @@
FT_UShort count,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
- FT_Bytes p = table + table_index * 2;
+ FT_Bytes p = table + table_index * 2;
#ifndef GXV_LOAD_TRACE_VARS
@@ -143,7 +143,7 @@
GXV_StateTable_GlyphOffsetCPtr glyphOffset_p,
FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
#ifdef GXV_LOAD_UNUSED_VARS
FT_Bool setMark;
@@ -180,20 +180,20 @@
gxv_morx_subtable_type5_InsertList_validate( currentInsertList,
currentInsertCount,
table, limit,
- valid );
+ gxvalid );
if ( markedInsertList && 0 != markedInsertCount )
gxv_morx_subtable_type5_InsertList_validate( markedInsertList,
markedInsertCount,
table, limit,
- valid );
+ gxvalid );
}
FT_LOCAL_DEF( void )
gxv_morx_subtable_type5_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
@@ -205,18 +205,18 @@
GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE5_HEADER_SIZE );
- valid->xstatetable.optdata =
+ gxvalid->xstatetable.optdata =
et;
- valid->xstatetable.optdata_load_func =
+ gxvalid->xstatetable.optdata_load_func =
gxv_morx_subtable_type5_insertionGlyphList_load;
- valid->xstatetable.subtable_setup_func =
+ gxvalid->xstatetable.subtable_setup_func =
gxv_morx_subtable_type5_subtable_setup;
- valid->xstatetable.entry_glyphoffset_fmt =
+ gxvalid->xstatetable.entry_glyphoffset_fmt =
GXV_GLYPHOFFSET_ULONG;
- valid->xstatetable.entry_validate_func =
+ gxvalid->xstatetable.entry_validate_func =
gxv_morx_subtable_type5_entry_validate;
- gxv_XStateTable_validate( p, limit, valid );
+ gxv_XStateTable_validate( p, limit, gxvalid );
GXV_EXIT;
}
diff --git a/src/gxvalid/gxvopbd.c b/src/gxvalid/gxvopbd.c
index e125060..ab0cd72 100644
--- a/src/gxvalid/gxvopbd.c
+++ b/src/gxvalid/gxvopbd.c
@@ -68,11 +68,11 @@
static void
gxv_opbd_LookupValue_validate( FT_UShort glyph,
GXV_LookupValueCPtr value_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
/* offset in LookupTable is measured from the head of opbd table */
- FT_Bytes p = valid->root->base + value_p->u;
- FT_Bytes limit = valid->root->limit;
+ FT_Bytes p = gxvalid->root->base + value_p->u;
+ FT_Bytes limit = gxvalid->root->limit;
FT_Short delta_value;
int i;
@@ -90,7 +90,7 @@
if ( delta_value == -1 )
continue;
- gxv_ctlPoint_validate( glyph, delta_value, valid );
+ gxv_ctlPoint_validate( glyph, delta_value, gxvalid );
}
else /* format 0, value is distance */
continue;
@@ -134,12 +134,12 @@
gxv_opbd_LookupFmt4_transit( FT_UShort relative_gindex,
GXV_LookupValueCPtr base_value_p,
FT_Bytes lookuptbl_limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
GXV_LookupValueDesc value;
FT_UNUSED( lookuptbl_limit );
- FT_UNUSED( valid );
+ FT_UNUSED( gxvalid );
/* XXX: check range? */
value.u = (FT_UShort)( base_value_p->u +
@@ -162,8 +162,8 @@
FT_Face face,
FT_Validator ftvalid )
{
- GXV_ValidatorRec validrec;
- GXV_Validator valid = &validrec;
+ GXV_ValidatorRec gxvalidrec;
+ GXV_Validator gxvalid = &gxvalidrec;
GXV_opbd_DataRec opbdrec;
GXV_opbd_Data opbd = &opbdrec;
FT_Bytes p = table;
@@ -172,9 +172,9 @@
FT_ULong version;
- valid->root = ftvalid;
- valid->table_data = opbd;
- valid->face = face;
+ gxvalid->root = ftvalid;
+ gxvalid->table_data = opbd;
+ gxvalid->face = face;
FT_TRACE3(( "validating `opbd' table\n" ));
GXV_INIT;
@@ -196,12 +196,12 @@
if ( 0x0001 < GXV_OPBD_DATA( format ) )
FT_INVALID_FORMAT;
- valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
- valid->lookupval_func = gxv_opbd_LookupValue_validate;
- valid->lookupfmt4_trans = gxv_opbd_LookupFmt4_transit;
+ gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+ gxvalid->lookupval_func = gxv_opbd_LookupValue_validate;
+ gxvalid->lookupfmt4_trans = gxv_opbd_LookupFmt4_transit;
- gxv_LookupTable_validate( p, limit, valid );
- p += valid->subtable_length;
+ gxv_LookupTable_validate( p, limit, gxvalid );
+ p += gxvalid->subtable_length;
if ( p > table + GXV_OPBD_DATA( valueOffset_min ) )
{
diff --git a/src/gxvalid/gxvprop.c b/src/gxvalid/gxvprop.c
index 0be2133..aa5c8ee 100644
--- a/src/gxvalid/gxvprop.c
+++ b/src/gxvalid/gxvprop.c
@@ -75,7 +75,7 @@
static void
gxv_prop_zero_advance_validate( FT_UShort gid,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Face face;
FT_Error error;
@@ -84,7 +84,7 @@
GXV_NAME_ENTER( "zero advance" );
- face = valid->face;
+ face = gxvalid->face;
error = FT_Load_Glyph( face,
gid,
@@ -109,10 +109,10 @@
static void
gxv_prop_property_validate( FT_UShort property,
FT_UShort glyph,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
if ( glyph != 0 && ( property & GXV_PROP_FLOATER ) )
- gxv_prop_zero_advance_validate( glyph, valid );
+ gxv_prop_zero_advance_validate( glyph, gxvalid );
if ( property & GXV_PROP_USE_COMPLEMENTARY_BRACKET )
{
@@ -145,7 +145,7 @@
else
{
/* The gid for complement must be the face. */
- gxv_glyphid_validate( (FT_UShort)( glyph + complement ), valid );
+ gxv_glyphid_validate( (FT_UShort)( glyph + complement ), gxvalid );
}
}
else
@@ -187,9 +187,9 @@
static void
gxv_prop_LookupValue_validate( FT_UShort glyph,
GXV_LookupValueCPtr value_p,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
- gxv_prop_property_validate( value_p->u, glyph, valid );
+ gxv_prop_property_validate( value_p->u, glyph, gxvalid );
}
@@ -224,7 +224,7 @@
gxv_prop_LookupFmt4_transit( FT_UShort relative_gindex,
GXV_LookupValueCPtr base_value_p,
FT_Bytes lookuptbl_limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p;
FT_Bytes limit;
@@ -234,7 +234,7 @@
/* XXX: check range? */
offset = (FT_UShort)( base_value_p->u +
relative_gindex * sizeof ( FT_UShort ) );
- p = valid->lookuptbl_head + offset;
+ p = gxvalid->lookuptbl_head + offset;
limit = lookuptbl_limit;
GXV_LIMIT_CHECK ( 2 );
@@ -259,8 +259,8 @@
{
FT_Bytes p = table;
FT_Bytes limit = 0;
- GXV_ValidatorRec validrec;
- GXV_Validator valid = &validrec;
+ GXV_ValidatorRec gxvalidrec;
+ GXV_Validator gxvalid = &gxvalidrec;
GXV_prop_DataRec proprec;
GXV_prop_Data prop = &proprec;
@@ -270,9 +270,9 @@
FT_UShort defaultProp;
- valid->root = ftvalid;
- valid->table_data = prop;
- valid->face = face;
+ gxvalid->root = ftvalid;
+ gxvalid->table_data = prop;
+ gxvalid->face = face;
FT_TRACE3(( "validating `prop' table\n" ));
GXV_INIT;
@@ -303,7 +303,7 @@
FT_INVALID_FORMAT;
}
- gxv_prop_property_validate( defaultProp, 0, valid );
+ gxv_prop_property_validate( defaultProp, 0, gxvalid );
if ( format == 0 )
{
@@ -315,11 +315,11 @@
/* format == 1 */
GXV_PROP_DATA( version ) = version;
- valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
- valid->lookupval_func = gxv_prop_LookupValue_validate;
- valid->lookupfmt4_trans = gxv_prop_LookupFmt4_transit;
+ gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+ gxvalid->lookupval_func = gxv_prop_LookupValue_validate;
+ gxvalid->lookupfmt4_trans = gxv_prop_LookupFmt4_transit;
- gxv_LookupTable_validate( p, limit, valid );
+ gxv_LookupTable_validate( p, limit, gxvalid );
Exit:
FT_TRACE4(( "\n" ));
diff --git a/src/gxvalid/gxvtrak.c b/src/gxvalid/gxvtrak.c
index 11fbd7c..3ec1a56 100644
--- a/src/gxvalid/gxvtrak.c
+++ b/src/gxvalid/gxvtrak.c
@@ -93,9 +93,9 @@
gxv_trak_trackTable_validate( FT_Bytes table,
FT_Bytes limit,
FT_UShort nTracks,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
- FT_Bytes p = table;
+ FT_Bytes p = table;
FT_Fixed track, t;
FT_UShort nameIndex;
@@ -122,7 +122,7 @@
if ( offset > GXV_TRAK_DATA( trackValueOffset_max ) )
GXV_TRAK_DATA( trackValueOffset_max ) = offset;
- gxv_sfntName_validate( nameIndex, 256, 32767, valid );
+ gxv_sfntName_validate( nameIndex, 256, 32767, gxvalid );
for ( j = i; j < nTracks; j ++ )
{
@@ -134,7 +134,7 @@
}
}
- valid->subtable_length = p - table;
+ gxvalid->subtable_length = p - table;
GXV_EXIT;
}
@@ -142,7 +142,7 @@
static void
gxv_trak_trackData_validate( FT_Bytes table,
FT_Bytes limit,
- GXV_Validator valid )
+ GXV_Validator gxvalid )
{
FT_Bytes p = table;
FT_UShort nTracks;
@@ -164,31 +164,31 @@
gxv_odtect_add_range( table, p - table, "trackData header", odtect );
/* validate trackTable */
- gxv_trak_trackTable_validate( p, limit, nTracks, valid );
- gxv_odtect_add_range( p, valid->subtable_length,
+ gxv_trak_trackTable_validate( p, limit, nTracks, gxvalid );
+ gxv_odtect_add_range( p, gxvalid->subtable_length,
"trackTable", odtect );
/* sizeTable is array of FT_Fixed, don't check contents */
- p = valid->root->base + sizeTableOffset;
+ p = gxvalid->root->base + sizeTableOffset;
GXV_LIMIT_CHECK( nSizes * 4 );
gxv_odtect_add_range( p, nSizes * 4, "sizeTable", odtect );
/* validate trackValueOffet */
- p = valid->root->base + GXV_TRAK_DATA( trackValueOffset_min );
+ p = gxvalid->root->base + GXV_TRAK_DATA( trackValueOffset_min );
if ( limit - p < nTracks * nSizes * 2 )
GXV_TRACE(( "too short trackValue array\n" ));
- p = valid->root->base + GXV_TRAK_DATA( trackValueOffset_max );
+ p = gxvalid->root->base + GXV_TRAK_DATA( trackValueOffset_max );
GXV_LIMIT_CHECK( nSizes * 2 );
- gxv_odtect_add_range( valid->root->base
+ gxv_odtect_add_range( gxvalid->root->base
+ GXV_TRAK_DATA( trackValueOffset_min ),
GXV_TRAK_DATA( trackValueOffset_max )
- GXV_TRAK_DATA( trackValueOffset_min )
+ nSizes * 2,
"trackValue array", odtect );
- gxv_odtect_validate( odtect, valid );
+ gxv_odtect_validate( odtect, gxvalid );
GXV_EXIT;
}
@@ -210,8 +210,8 @@
FT_Bytes p = table;
FT_Bytes limit = 0;
- GXV_ValidatorRec validrec;
- GXV_Validator valid = &validrec;
+ GXV_ValidatorRec gxvalidrec;
+ GXV_Validator gxvalid = &gxvalidrec;
GXV_trak_DataRec trakrec;
GXV_trak_Data trak = &trakrec;
@@ -225,11 +225,11 @@
GXV_ODTECT( 3, odtect );
GXV_ODTECT_INIT( odtect );
- valid->root = ftvalid;
- valid->table_data = trak;
- valid->face = face;
+ gxvalid->root = ftvalid;
+ gxvalid->table_data = trak;
+ gxvalid->face = face;
- limit = valid->root->limit;
+ limit = gxvalid->root->limit;
FT_TRACE3(( "validating `trak' table\n" ));
GXV_INIT;
@@ -265,19 +265,19 @@
/* validate trackData */
if ( 0 < horizOffset )
{
- gxv_trak_trackData_validate( table + horizOffset, limit, valid );
- gxv_odtect_add_range( table + horizOffset, valid->subtable_length,
+ gxv_trak_trackData_validate( table + horizOffset, limit, gxvalid );
+ gxv_odtect_add_range( table + horizOffset, gxvalid->subtable_length,
"horizJustData", odtect );
}
if ( 0 < vertOffset )
{
- gxv_trak_trackData_validate( table + vertOffset, limit, valid );
- gxv_odtect_add_range( table + vertOffset, valid->subtable_length,
+ gxv_trak_trackData_validate( table + vertOffset, limit, gxvalid );
+ gxv_odtect_add_range( table + vertOffset, gxvalid->subtable_length,
"vertJustData", odtect );
}
- gxv_odtect_validate( odtect, valid );
+ gxv_odtect_validate( odtect, gxvalid );
FT_TRACE4(( "\n" ));
}
diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c
index f3d2ef9..2d4200d 100644
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -8,7 +8,7 @@
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2002-2006, 2009-2012 by */
+/* Copyright 2002-2006, 2009-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -68,6 +68,15 @@
#undef SLOW
#define SLOW 1 /* we can't use asm-optimized sources here! */
+#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
+ /* We disable the warning `conversion from XXX to YYY, */
+ /* possible loss of data' in order to compile cleanly with */
+ /* the maximum level of warnings: zlib is non-FreeType */
+ /* code. */
+#pragma warning( push )
+#pragma warning( disable : 4244 )
+#endif /* _MSC_VER */
+
/* Urgh. `inflate_mask' must not be declared twice -- C++ doesn't like
this. We temporarily disable it and load all necessary header files. */
#define NO_INFLATE_MASK
@@ -87,6 +96,10 @@
#include "inflate.c"
#include "adler32.c"
+#if defined( _MSC_VER )
+#pragma warning( pop )
+#endif
+
#endif /* !FT_CONFIG_OPTION_SYSTEM_ZLIB */
@@ -195,12 +208,12 @@
/* head[0] && head[1] are the magic numbers; */
/* head[2] is the method, and head[3] the flags */
- if ( head[0] != 0x1f ||
- head[1] != 0x8b ||
+ if ( head[0] != 0x1F ||
+ head[1] != 0x8B ||
head[2] != Z_DEFLATED ||
(head[3] & FT_GZIP_RESERVED) )
{
- error = Gzip_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -262,7 +275,7 @@
FT_Stream source )
{
z_stream* zstream = &zip->zstream;
- FT_Error error = Gzip_Err_Ok;
+ FT_Error error = FT_Err_Ok;
zip->stream = stream;
@@ -294,7 +307,7 @@
if ( inflateInit2( zstream, -MAX_WBITS ) != Z_OK ||
zstream->next_in == NULL )
- error = Gzip_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
Exit:
return error;
@@ -365,7 +378,7 @@
size = stream->read( stream, stream->pos, zip->input,
FT_GZIP_BUFFER_SIZE );
if ( size == 0 )
- return Gzip_Err_Invalid_Stream_Operation;
+ return FT_THROW( Invalid_Stream_Operation );
}
else
{
@@ -374,7 +387,7 @@
size = FT_GZIP_BUFFER_SIZE;
if ( size == 0 )
- return Gzip_Err_Invalid_Stream_Operation;
+ return FT_THROW( Invalid_Stream_Operation );
FT_MEM_COPY( zip->input, stream->base + stream->pos, size );
}
@@ -383,7 +396,7 @@
zstream->next_in = zip->input;
zstream->avail_in = size;
- return Gzip_Err_Ok;
+ return FT_Err_Ok;
}
@@ -391,7 +404,7 @@
ft_gzip_file_fill_output( FT_GZipFile zip )
{
z_stream* zstream = &zip->zstream;
- FT_Error error = Gzip_Err_Ok;
+ FT_Error error = FT_Err_Ok;
zip->cursor = zip->buffer;
@@ -416,12 +429,12 @@
{
zip->limit = zstream->next_out;
if ( zip->limit == zip->cursor )
- error = Gzip_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
break;
}
else if ( err != Z_OK )
{
- error = Gzip_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
break;
}
}
@@ -435,7 +448,7 @@
ft_gzip_file_skip_output( FT_GZipFile zip,
FT_ULong count )
{
- FT_Error error = Gzip_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_ULong delta;
@@ -583,15 +596,25 @@
}
+ /* documentation is in ftgzip.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Stream_OpenGzip( FT_Stream stream,
FT_Stream source )
{
FT_Error error;
- FT_Memory memory = source->memory;
+ FT_Memory memory;
FT_GZipFile zip = NULL;
+ if ( !stream || !source )
+ {
+ error = FT_THROW( Invalid_Stream_Handle );
+ goto Exit;
+ }
+
+ memory = source->memory;
+
/*
* check the header right now; this prevents allocating un-necessary
* objects when we don't need them
@@ -657,7 +680,7 @@
ft_gzip_file_io( zip, 0, NULL, 0 );
FT_FREE( zip_buff );
}
- error = Gzip_Err_Ok;
+ error = FT_Err_Ok;
}
}
@@ -671,7 +694,69 @@
return error;
}
-#else /* !FT_CONFIG_OPTION_USE_ZLIB */
+
+ /* documentation is in ftgzip.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Gzip_Uncompress( FT_Memory memory,
+ FT_Byte* output,
+ FT_ULong* output_len,
+ const FT_Byte* input,
+ FT_ULong input_len )
+ {
+ z_stream stream;
+ int err;
+
+
+ /* check for `input' delayed to `inflate' */
+
+ if ( !memory || ! output_len || !output )
+ return FT_THROW( Invalid_Argument );
+
+ /* this function is modeled after zlib's `uncompress' function */
+
+ stream.next_in = (Bytef*)input;
+ stream.avail_in = (uInt)input_len;
+
+ stream.next_out = output;
+ stream.avail_out = (uInt)*output_len;
+
+ stream.zalloc = (alloc_func)ft_gzip_alloc;
+ stream.zfree = (free_func) ft_gzip_free;
+ stream.opaque = memory;
+
+ err = inflateInit2( &stream, MAX_WBITS );
+ if ( err != Z_OK )
+ return FT_THROW( Invalid_Argument );
+
+ err = inflate( &stream, Z_FINISH );
+ if ( err != Z_STREAM_END )
+ {
+ inflateEnd( &stream );
+ if ( err == Z_OK )
+ err = Z_BUF_ERROR;
+ }
+ else
+ {
+ *output_len = stream.total_out;
+
+ err = inflateEnd( &stream );
+ }
+
+ if ( err == Z_MEM_ERROR )
+ return FT_THROW( Out_Of_Memory );
+
+ if ( err == Z_BUF_ERROR )
+ return FT_THROW( Array_Too_Large );
+
+ if ( err == Z_DATA_ERROR )
+ return FT_THROW( Invalid_Table );
+
+ return FT_Err_Ok;
+ }
+
+
+#else /* !FT_CONFIG_OPTION_USE_ZLIB */
FT_EXPORT_DEF( FT_Error )
FT_Stream_OpenGzip( FT_Stream stream,
@@ -680,7 +765,24 @@
FT_UNUSED( stream );
FT_UNUSED( source );
- return Gzip_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Gzip_Uncompress( FT_Memory memory,
+ FT_Byte* output,
+ FT_ULong* output_len,
+ const FT_Byte* input,
+ FT_ULong input_len )
+ {
+ FT_UNUSED( memory );
+ FT_UNUSED( output );
+ FT_UNUSED( output_len );
+ FT_UNUSED( input );
+ FT_UNUSED( input_len );
+
+ return FT_THROW( Unimplemented_Feature );
}
#endif /* !FT_CONFIG_OPTION_USE_ZLIB */
diff --git a/src/gzip/inftrees.c b/src/gzip/inftrees.c
index ef53652..56f52b1 100644
--- a/src/gzip/inftrees.c
+++ b/src/gzip/inftrees.c
@@ -115,16 +115,16 @@ uIntf *v /* working area: values in order of bit length */
uInt f; /* i repeats in table every f entries */
int g; /* maximum code length */
int h; /* table level */
- register uInt i; /* counter, current code */
- register uInt j; /* counter */
- register int k; /* number of bits in current code */
+ uInt i; /* counter, current code */
+ uInt j; /* counter */
+ int k; /* number of bits in current code */
int l; /* bits per table (returned in m) */
uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */
- register uIntf *p; /* pointer into c[], b[], or v[] */
+ uIntf *p; /* pointer into c[], b[], or v[] */
inflate_huft *q; /* points to current table */
struct inflate_huft_s r; /* table entry for structure assignment */
inflate_huft *u[BMAX]; /* table stack */
- register int w; /* bits before this table == (l * h) */
+ int w; /* bits before this table == (l * h) */
uInt x[BMAX+1]; /* bit offsets, then code stack */
uIntf *xp; /* pointer into x */
int y; /* number of dummy codes added */
diff --git a/src/gzip/rules.mk b/src/gzip/rules.mk
index d2a43a6..37cd991 100644
--- a/src/gzip/rules.mk
+++ b/src/gzip/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2002, 2003 by
+# Copyright 2002, 2003, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -27,49 +27,52 @@ else
endif
-# gzip support sources (i.e., C files)
+# gzip support sources
#
-GZIP_DRV_SRC := $(GZIP_DIR)/ftgzip.c
-
-# gzip support headers
+# All source and header files get loaded by `ftgzip.c' only if SYTEM_ZLIB is
+# not defined (regardless whether we have a `single' or a `multi' build).
+# However, it doesn't harm if we add everything as a dependency
+# unconditionally.
#
-GZIP_DRV_H :=
+GZIP_DRV_SRCS := $(GZIP_DIR)/adler32.c \
+ $(GZIP_DIR)/infblock.c \
+ $(GZIP_DIR)/infblock.h \
+ $(GZIP_DIR)/infcodes.c \
+ $(GZIP_DIR)/infcodes.h \
+ $(GZIP_DIR)/inffixed.h \
+ $(GZIP_DIR)/inflate.c \
+ $(GZIP_DIR)/inftrees.c \
+ $(GZIP_DIR)/inftrees.h \
+ $(GZIP_DIR)/infutil.c \
+ $(GZIP_DIR)/infutil.h \
+ $(GZIP_DIR)/zconf.h \
+ $(GZIP_DIR)/zlib.h \
+ $(GZIP_DIR)/zutil.c \
+ $(GZIP_DIR)/zutil.h
# 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_OBJ is used during both `single' and `multi' builds
#
-GZIP_DRV_SRC_S := $(GZIP_DIR)/ftgzip.c
+GZIP_DRV_OBJ := $(OBJ_DIR)/ftgzip.$O
-# gzip support - single object
+# gzip main source file
#
-$(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_DRV_SRC := $(GZIP_DIR)/ftgzip.c
-# gzip support - multiple objects
+# gzip support - object
#
-$(OBJ_DIR)/%.$O: $(GZIP_DIR)/%.c $(FREETYPE_H) $(GZIP_DRV_H)
- $(GZIP_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+$(GZIP_DRV_OBJ): $(GZIP_DRV_SRC) $(GZIP_DRV_SRCS) $(FREETYPE_H)
+ $(GZIP_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(GZIP_DRV_SRC))
# update main driver object lists
#
-DRV_OBJS_S += $(GZIP_DRV_OBJ_S)
-DRV_OBJS_M += $(GZIP_DRV_OBJ_M)
+DRV_OBJS_S += $(GZIP_DRV_OBJ)
+DRV_OBJS_M += $(GZIP_DRV_OBJ)
# EOF
diff --git a/src/lzw/ftlzw.c b/src/lzw/ftlzw.c
index 35e392b..e1b3564 100644
--- a/src/lzw/ftlzw.c
+++ b/src/lzw/ftlzw.c
@@ -8,7 +8,7 @@
/* be used to parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2004-2006, 2009, 2010, 2012 by */
+/* Copyright 2004-2006, 2009, 2010, 2012-2014 by */
/* Albert Chin-A-Young. */
/* */
/* Based on code in src/gzip/ftgzip.c, Copyright 2004 by */
@@ -96,9 +96,9 @@
goto Exit;
/* head[0] && head[1] are the magic numbers */
- if ( head[0] != 0x1f ||
- head[1] != 0x9d )
- error = LZW_Err_Invalid_File_Format;
+ if ( head[0] != 0x1F ||
+ head[1] != 0x9D )
+ error = FT_THROW( Invalid_File_Format );
Exit:
return error;
@@ -111,7 +111,7 @@
FT_Stream source )
{
FT_LzwState lzw = &zip->lzw;
- FT_Error error = LZW_Err_Ok;
+ FT_Error error;
zip->stream = stream;
@@ -172,7 +172,7 @@
{
FT_LzwState lzw = &zip->lzw;
FT_ULong count;
- FT_Error error = LZW_Err_Ok;
+ FT_Error error = FT_Err_Ok;
zip->cursor = zip->buffer;
@@ -182,7 +182,7 @@
zip->limit = zip->cursor + count;
if ( count == 0 )
- error = LZW_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
return error;
}
@@ -193,7 +193,7 @@
ft_lzw_file_skip_output( FT_LZWFile zip,
FT_ULong count )
{
- FT_Error error = LZW_Err_Ok;
+ FT_Error error = FT_Err_Ok;
/* first, we skip what we can from the output buffer */
@@ -224,7 +224,7 @@
if ( numread < delta )
{
/* not enough bytes */
- error = LZW_Err_Invalid_Stream_Operation;
+ error = FT_THROW( Invalid_Stream_Operation );
break;
}
@@ -349,10 +349,18 @@
FT_Stream source )
{
FT_Error error;
- FT_Memory memory = source->memory;
+ FT_Memory memory;
FT_LZWFile zip = NULL;
+ if ( !stream || !source )
+ {
+ error = FT_THROW( Invalid_Stream_Handle );
+ goto Exit;
+ }
+
+ memory = source->memory;
+
/*
* Check the header right now; this prevents allocation of a huge
* LZWFile object (400 KByte of heap memory) if not necessary.
@@ -403,7 +411,7 @@
FT_UNUSED( stream );
FT_UNUSED( source );
- return LZW_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
diff --git a/src/lzw/ftzopen.h b/src/lzw/ftzopen.h
index f7d2936..cdc8fd7 100644
--- a/src/lzw/ftzopen.h
+++ b/src/lzw/ftzopen.h
@@ -41,7 +41,7 @@
#define LZW_CLEAR 256
#define LZW_FIRST 257
-#define LZW_BIT_MASK 0x1f
+#define LZW_BIT_MASK 0x1F
#define LZW_BLOCK_MASK 0x80
#define LZW_MASK( n ) ( ( 1U << (n) ) - 1U )
diff --git a/src/otvalid/otvbase.c b/src/otvalid/otvbase.c
index d742d2d..4f9d2fa 100644
--- a/src/otvalid/otvbase.c
+++ b/src/otvalid/otvbase.c
@@ -32,7 +32,7 @@
static void
otv_BaseCoord_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt BaseCoordFormat;
@@ -58,7 +58,7 @@
case 3: /* BaseCoordFormat3 */
OTV_LIMIT_CHECK( 2 );
/* DeviceTable */
- otv_Device_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_Device_validate( table + FT_NEXT_USHORT( p ), otvalid );
break;
default:
@@ -71,7 +71,7 @@
static void
otv_BaseTagList_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt BaseTagCount;
@@ -93,7 +93,7 @@
static void
otv_BaseValues_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt BaseCoordCount;
@@ -112,7 +112,7 @@
/* BaseCoord */
for ( ; BaseCoordCount > 0; BaseCoordCount-- )
- otv_BaseCoord_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_BaseCoord_validate( table + FT_NEXT_USHORT( p ), otvalid );
OTV_EXIT;
}
@@ -120,7 +120,7 @@
static void
otv_MinMax_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt table_size;
@@ -144,11 +144,11 @@
OTV_SIZE_CHECK( MinCoord );
if ( MinCoord )
- otv_BaseCoord_validate( table + MinCoord, valid );
+ otv_BaseCoord_validate( table + MinCoord, otvalid );
OTV_SIZE_CHECK( MaxCoord );
if ( MaxCoord )
- otv_BaseCoord_validate( table + MaxCoord, valid );
+ otv_BaseCoord_validate( table + MaxCoord, otvalid );
OTV_LIMIT_CHECK( FeatMinMaxCount * 8 );
@@ -162,11 +162,11 @@
OTV_SIZE_CHECK( MinCoord );
if ( MinCoord )
- otv_BaseCoord_validate( table + MinCoord, valid );
+ otv_BaseCoord_validate( table + MinCoord, otvalid );
OTV_SIZE_CHECK( MaxCoord );
if ( MaxCoord )
- otv_BaseCoord_validate( table + MaxCoord, valid );
+ otv_BaseCoord_validate( table + MaxCoord, otvalid );
}
OTV_EXIT;
@@ -175,7 +175,7 @@
static void
otv_BaseScript_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt table_size;
@@ -198,11 +198,11 @@
OTV_SIZE_CHECK( BaseValues );
if ( BaseValues )
- otv_BaseValues_validate( table + BaseValues, valid );
+ otv_BaseValues_validate( table + BaseValues, otvalid );
OTV_SIZE_CHECK( DefaultMinMax );
if ( DefaultMinMax )
- otv_MinMax_validate( table + DefaultMinMax, valid );
+ otv_MinMax_validate( table + DefaultMinMax, otvalid );
OTV_LIMIT_CHECK( BaseLangSysCount * 6 );
@@ -211,7 +211,7 @@
{
p += 4; /* skip BaseLangSysTag */
- otv_MinMax_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_MinMax_validate( table + FT_NEXT_USHORT( p ), otvalid );
}
OTV_EXIT;
@@ -220,7 +220,7 @@
static void
otv_BaseScriptList_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt BaseScriptCount;
@@ -241,7 +241,7 @@
p += 4; /* skip BaseScriptTag */
/* BaseScript */
- otv_BaseScript_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_BaseScript_validate( table + FT_NEXT_USHORT( p ), otvalid );
}
OTV_EXIT;
@@ -250,7 +250,7 @@
static void
otv_Axis_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt table_size;
@@ -267,10 +267,10 @@
OTV_SIZE_CHECK( BaseTagList );
if ( BaseTagList )
- otv_BaseTagList_validate( table + BaseTagList, valid );
+ otv_BaseTagList_validate( table + BaseTagList, otvalid );
/* BaseScriptList */
- otv_BaseScriptList_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_BaseScriptList_validate( table + FT_NEXT_USHORT( p ), otvalid );
OTV_EXIT;
}
@@ -280,16 +280,16 @@
otv_BASE_validate( FT_Bytes table,
FT_Validator ftvalid )
{
- OTV_ValidatorRec validrec;
- OTV_Validator valid = &validrec;
- FT_Bytes p = table;
+ OTV_ValidatorRec otvalidrec;
+ OTV_Validator otvalid = &otvalidrec;
+ FT_Bytes p = table;
FT_UInt table_size;
OTV_OPTIONAL_TABLE( HorizAxis );
OTV_OPTIONAL_TABLE( VertAxis );
- valid->root = ftvalid;
+ otvalid->root = ftvalid;
FT_TRACE3(( "validating BASE table\n" ));
OTV_INIT;
@@ -304,12 +304,12 @@
OTV_OPTIONAL_OFFSET( HorizAxis );
OTV_SIZE_CHECK( HorizAxis );
if ( HorizAxis )
- otv_Axis_validate( table + HorizAxis, valid );
+ otv_Axis_validate( table + HorizAxis, otvalid );
OTV_OPTIONAL_OFFSET( VertAxis );
OTV_SIZE_CHECK( VertAxis );
if ( VertAxis )
- otv_Axis_validate( table + VertAxis, valid );
+ otv_Axis_validate( table + VertAxis, otvalid );
FT_TRACE4(( "\n" ));
}
diff --git a/src/otvalid/otvcommn.c b/src/otvalid/otvcommn.c
index a4f885b..3c3de63 100644
--- a/src/otvalid/otvcommn.c
+++ b/src/otvalid/otvcommn.c
@@ -39,7 +39,7 @@
FT_LOCAL_DEF( void )
otv_Coverage_validate( FT_Bytes table,
- OTV_Validator valid,
+ OTV_Validator otvalid,
FT_Int expected_count )
{
FT_Bytes p = table;
@@ -74,7 +74,7 @@
gid = FT_NEXT_USHORT( p );
- if ( gid >= valid->glyph_count )
+ if ( gid >= otvalid->glyph_count )
FT_INVALID_GLYPH_ID;
}
@@ -104,7 +104,7 @@
if ( Start > End || StartCoverageIndex != total )
FT_INVALID_DATA;
- if ( End >= valid->glyph_count )
+ if ( End >= otvalid->glyph_count )
FT_INVALID_GLYPH_ID;
if ( n > 0 && Start <= last )
@@ -219,7 +219,7 @@
FT_LOCAL_DEF( void )
otv_ClassDef_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt ClassFormat;
@@ -249,7 +249,7 @@
OTV_LIMIT_CHECK( GlyphCount * 2 ); /* ClassValueArray */
- if ( StartGlyph + GlyphCount - 1 >= valid->glyph_count )
+ if ( StartGlyph + GlyphCount - 1 >= otvalid->glyph_count )
FT_INVALID_GLYPH_ID;
}
break;
@@ -276,7 +276,7 @@
if ( Start > End || ( n > 0 && Start <= last ) )
FT_INVALID_DATA;
- if ( End >= valid->glyph_count )
+ if ( End >= otvalid->glyph_count )
FT_INVALID_GLYPH_ID;
last = End;
@@ -305,7 +305,7 @@
FT_LOCAL_DEF( void )
otv_Device_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt StartSize, EndSize, DeltaFormat, count;
@@ -339,12 +339,12 @@
/*************************************************************************/
/*************************************************************************/
- /* uses valid->type_count */
- /* uses valid->type_funcs */
+ /* uses otvalid->type_count */
+ /* uses otvalid->type_funcs */
FT_LOCAL_DEF( void )
otv_Lookup_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt LookupType, SubTableCount;
@@ -360,10 +360,10 @@
OTV_TRACE(( " (type %d)\n", LookupType ));
- if ( LookupType == 0 || LookupType > valid->type_count )
+ if ( LookupType == 0 || LookupType > otvalid->type_count )
FT_INVALID_DATA;
- validate = valid->type_funcs[LookupType - 1];
+ validate = otvalid->type_funcs[LookupType - 1];
OTV_TRACE(( " (SubTableCount = %d)\n", SubTableCount ));
@@ -371,7 +371,7 @@
/* SubTable */
for ( ; SubTableCount > 0; SubTableCount-- )
- validate( table + FT_NEXT_USHORT( p ), valid );
+ validate( table + FT_NEXT_USHORT( p ), otvalid );
OTV_EXIT;
}
@@ -381,7 +381,7 @@
FT_LOCAL_DEF( void )
otv_LookupList_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt LookupCount;
@@ -396,11 +396,11 @@
OTV_LIMIT_CHECK( LookupCount * 2 );
- valid->lookup_count = LookupCount;
+ otvalid->lookup_count = LookupCount;
/* Lookup */
for ( ; LookupCount > 0; LookupCount-- )
- otv_Lookup_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_Lookup_validate( table + FT_NEXT_USHORT( p ), otvalid );
OTV_EXIT;
}
@@ -421,11 +421,11 @@
/*************************************************************************/
/*************************************************************************/
- /* uses valid->lookup_count */
+ /* uses otvalid->lookup_count */
FT_LOCAL_DEF( void )
otv_Feature_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt LookupCount;
@@ -443,7 +443,7 @@
/* LookupListIndex */
for ( ; LookupCount > 0; LookupCount-- )
- if ( FT_NEXT_USHORT( p ) >= valid->lookup_count )
+ if ( FT_NEXT_USHORT( p ) >= otvalid->lookup_count )
FT_INVALID_DATA;
OTV_EXIT;
@@ -457,12 +457,12 @@
}
- /* sets valid->lookup_count */
+ /* sets otvalid->lookup_count */
FT_LOCAL_DEF( void )
otv_FeatureList_validate( FT_Bytes table,
FT_Bytes lookups,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt FeatureCount;
@@ -477,7 +477,7 @@
OTV_LIMIT_CHECK( FeatureCount * 2 );
- valid->lookup_count = otv_LookupList_get_count( lookups );
+ otvalid->lookup_count = otv_LookupList_get_count( lookups );
/* FeatureRecord */
for ( ; FeatureCount > 0; FeatureCount-- )
@@ -485,7 +485,7 @@
p += 4; /* skip FeatureTag */
/* Feature */
- otv_Feature_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_Feature_validate( table + FT_NEXT_USHORT( p ), otvalid );
}
OTV_EXIT;
@@ -501,11 +501,11 @@
/*************************************************************************/
- /* uses valid->extra1 (number of features) */
+ /* uses otvalid->extra1 (number of features) */
FT_LOCAL_DEF( void )
otv_LangSys_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt ReqFeatureIndex;
@@ -522,14 +522,14 @@
OTV_TRACE(( " (ReqFeatureIndex = %d)\n", ReqFeatureIndex ));
OTV_TRACE(( " (FeatureCount = %d)\n", FeatureCount ));
- if ( ReqFeatureIndex != 0xFFFFU && ReqFeatureIndex >= valid->extra1 )
+ if ( ReqFeatureIndex != 0xFFFFU && ReqFeatureIndex >= otvalid->extra1 )
FT_INVALID_DATA;
OTV_LIMIT_CHECK( FeatureCount * 2 );
/* FeatureIndex */
for ( ; FeatureCount > 0; FeatureCount-- )
- if ( FT_NEXT_USHORT( p ) >= valid->extra1 )
+ if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 )
FT_INVALID_DATA;
OTV_EXIT;
@@ -546,7 +546,7 @@
FT_LOCAL_DEF( void )
otv_Script_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_UInt DefaultLangSys, LangSysCount;
FT_Bytes p = table;
@@ -561,7 +561,7 @@
OTV_TRACE(( " (LangSysCount = %d)\n", LangSysCount ));
if ( DefaultLangSys != 0 )
- otv_LangSys_validate( table + DefaultLangSys, valid );
+ otv_LangSys_validate( table + DefaultLangSys, otvalid );
OTV_LIMIT_CHECK( LangSysCount * 6 );
@@ -571,19 +571,19 @@
p += 4; /* skip LangSysTag */
/* LangSys */
- otv_LangSys_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_LangSys_validate( table + FT_NEXT_USHORT( p ), otvalid );
}
OTV_EXIT;
}
- /* sets valid->extra1 (number of features) */
+ /* sets otvalid->extra1 (number of features) */
FT_LOCAL_DEF( void )
otv_ScriptList_validate( FT_Bytes table,
FT_Bytes features,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_UInt ScriptCount;
FT_Bytes p = table;
@@ -598,14 +598,14 @@
OTV_LIMIT_CHECK( ScriptCount * 6 );
- valid->extra1 = otv_Feature_get_count( features );
+ otvalid->extra1 = otv_Feature_get_count( features );
/* ScriptRecord */
for ( ; ScriptCount > 0; ScriptCount-- )
{
p += 4; /* skip ScriptTag */
- otv_Script_validate( table + FT_NEXT_USHORT( p ), valid ); /* Script */
+ otv_Script_validate( table + FT_NEXT_USHORT( p ), otvalid ); /* Script */
}
OTV_EXIT;
@@ -640,7 +640,7 @@
FT_LOCAL_DEF( void )
otv_x_Ox( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt Count;
@@ -656,13 +656,13 @@
OTV_LIMIT_CHECK( Count * 2 );
- valid->nesting_level++;
- func = valid->func[valid->nesting_level];
+ otvalid->nesting_level++;
+ func = otvalid->func[otvalid->nesting_level];
for ( ; Count > 0; Count-- )
- func( table + FT_NEXT_USHORT( p ), valid );
+ func( table + FT_NEXT_USHORT( p ), otvalid );
- valid->nesting_level--;
+ otvalid->nesting_level--;
OTV_EXIT;
}
@@ -670,7 +670,7 @@
FT_LOCAL_DEF( void )
otv_u_C_x_Ox( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt Count, Coverage;
@@ -687,27 +687,27 @@
OTV_TRACE(( " (Count = %d)\n", Count ));
- otv_Coverage_validate( table + Coverage, valid, Count );
+ otv_Coverage_validate( table + Coverage, otvalid, Count );
OTV_LIMIT_CHECK( Count * 2 );
- valid->nesting_level++;
- func = valid->func[valid->nesting_level];
+ otvalid->nesting_level++;
+ func = otvalid->func[otvalid->nesting_level];
for ( ; Count > 0; Count-- )
- func( table + FT_NEXT_USHORT( p ), valid );
+ func( table + FT_NEXT_USHORT( p ), otvalid );
- valid->nesting_level--;
+ otvalid->nesting_level--;
OTV_EXIT;
}
- /* uses valid->extra1 (if > 0: array value limit) */
+ /* uses otvalid->extra1 (if > 0: array value limit) */
FT_LOCAL_DEF( void )
otv_x_ux( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt Count;
@@ -722,10 +722,10 @@
OTV_LIMIT_CHECK( Count * 2 );
- if ( valid->extra1 )
+ if ( otvalid->extra1 )
{
for ( ; Count > 0; Count-- )
- if ( FT_NEXT_USHORT( p ) >= valid->extra1 )
+ if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 )
FT_INVALID_DATA;
}
@@ -736,11 +736,11 @@
/* `ux' in the function's name is not really correct since only x-1 */
/* elements are tested */
- /* uses valid->extra1 (array value limit) */
+ /* uses otvalid->extra1 (array value limit) */
FT_LOCAL_DEF( void )
otv_x_y_ux_sy( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt Count1, Count2;
@@ -766,7 +766,7 @@
if ( FT_NEXT_USHORT( p ) >= Count1 )
FT_INVALID_DATA;
- if ( FT_NEXT_USHORT( p ) >= valid->extra1 )
+ if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 )
FT_INVALID_DATA;
}
@@ -777,11 +777,11 @@
/* `uy' in the function's name is not really correct since only y-1 */
/* elements are tested */
- /* uses valid->extra1 (array value limit) */
+ /* uses otvalid->extra1 (array value limit) */
FT_LOCAL_DEF( void )
otv_x_ux_y_uy_z_uz_p_sp( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt BacktrackCount, InputCount, LookaheadCount;
@@ -825,7 +825,7 @@
if ( FT_NEXT_USHORT( p ) >= InputCount )
FT_INVALID_DATA;
- if ( FT_NEXT_USHORT( p ) >= valid->extra1 )
+ if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 )
FT_INVALID_DATA;
}
@@ -833,11 +833,11 @@
}
- /* sets valid->extra1 (valid->lookup_count) */
+ /* sets otvalid->extra1 (valid->lookup_count) */
FT_LOCAL_DEF( void )
otv_u_O_O_x_Onx( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt Coverage, ClassDef, ClassSetCount;
@@ -855,14 +855,14 @@
OTV_TRACE(( " (ClassSetCount = %d)\n", ClassSetCount ));
- otv_Coverage_validate( table + Coverage, valid, -1 );
- otv_ClassDef_validate( table + ClassDef, valid );
+ otv_Coverage_validate( table + Coverage, otvalid, -1 );
+ otv_ClassDef_validate( table + ClassDef, otvalid );
OTV_LIMIT_CHECK( ClassSetCount * 2 );
- valid->nesting_level++;
- func = valid->func[valid->nesting_level];
- valid->extra1 = valid->lookup_count;
+ otvalid->nesting_level++;
+ func = otvalid->func[otvalid->nesting_level];
+ otvalid->extra1 = otvalid->lookup_count;
for ( ; ClassSetCount > 0; ClassSetCount-- )
{
@@ -870,20 +870,20 @@
if ( offset )
- func( table + offset, valid );
+ func( table + offset, otvalid );
}
- valid->nesting_level--;
+ otvalid->nesting_level--;
OTV_EXIT;
}
- /* uses valid->lookup_count */
+ /* uses otvalid->lookup_count */
FT_LOCAL_DEF( void )
otv_u_x_y_Ox_sy( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt GlyphCount, Count, count1;
@@ -903,14 +903,14 @@
OTV_LIMIT_CHECK( GlyphCount * 2 + Count * 4 );
for ( count1 = GlyphCount; count1 > 0; count1-- )
- otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 );
+ otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );
for ( ; Count > 0; Count-- )
{
if ( FT_NEXT_USHORT( p ) >= GlyphCount )
FT_INVALID_DATA;
- if ( FT_NEXT_USHORT( p ) >= valid->lookup_count )
+ if ( FT_NEXT_USHORT( p ) >= otvalid->lookup_count )
FT_INVALID_DATA;
}
@@ -918,11 +918,11 @@
}
- /* sets valid->extra1 (valid->lookup_count) */
+ /* sets otvalid->extra1 (valid->lookup_count) */
FT_LOCAL_DEF( void )
otv_u_O_O_O_O_x_Onx( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt Coverage;
@@ -944,17 +944,17 @@
OTV_TRACE(( " (ChainClassSetCount = %d)\n", ChainClassSetCount ));
- otv_Coverage_validate( table + Coverage, valid, -1 );
+ otv_Coverage_validate( table + Coverage, otvalid, -1 );
- otv_ClassDef_validate( table + BacktrackClassDef, valid );
- otv_ClassDef_validate( table + InputClassDef, valid );
- otv_ClassDef_validate( table + LookaheadClassDef, valid );
+ otv_ClassDef_validate( table + BacktrackClassDef, otvalid );
+ otv_ClassDef_validate( table + InputClassDef, otvalid );
+ otv_ClassDef_validate( table + LookaheadClassDef, otvalid );
OTV_LIMIT_CHECK( ChainClassSetCount * 2 );
- valid->nesting_level++;
- func = valid->func[valid->nesting_level];
- valid->extra1 = valid->lookup_count;
+ otvalid->nesting_level++;
+ func = otvalid->func[otvalid->nesting_level];
+ otvalid->extra1 = otvalid->lookup_count;
for ( ; ChainClassSetCount > 0; ChainClassSetCount-- )
{
@@ -962,20 +962,20 @@
if ( offset )
- func( table + offset, valid );
+ func( table + offset, otvalid );
}
- valid->nesting_level--;
+ otvalid->nesting_level--;
OTV_EXIT;
}
- /* uses valid->lookup_count */
+ /* uses otvalid->lookup_count */
FT_LOCAL_DEF( void )
otv_u_x_Ox_y_Oy_z_Oz_p_sp( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt BacktrackGlyphCount, InputGlyphCount, LookaheadGlyphCount;
@@ -994,7 +994,7 @@
OTV_LIMIT_CHECK( BacktrackGlyphCount * 2 + 2 );
for ( ; BacktrackGlyphCount > 0; BacktrackGlyphCount-- )
- otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 );
+ otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );
InputGlyphCount = FT_NEXT_USHORT( p );
@@ -1003,7 +1003,7 @@
OTV_LIMIT_CHECK( InputGlyphCount * 2 + 2 );
for ( count1 = InputGlyphCount; count1 > 0; count1-- )
- otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 );
+ otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );
LookaheadGlyphCount = FT_NEXT_USHORT( p );
@@ -1012,7 +1012,7 @@
OTV_LIMIT_CHECK( LookaheadGlyphCount * 2 + 2 );
for ( ; LookaheadGlyphCount > 0; LookaheadGlyphCount-- )
- otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 );
+ otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );
count2 = FT_NEXT_USHORT( p );
@@ -1025,7 +1025,7 @@
if ( FT_NEXT_USHORT( p ) >= InputGlyphCount )
FT_INVALID_DATA;
- if ( FT_NEXT_USHORT( p ) >= valid->lookup_count )
+ if ( FT_NEXT_USHORT( p ) >= otvalid->lookup_count )
FT_INVALID_DATA;
}
diff --git a/src/otvalid/otvcommn.h b/src/otvalid/otvcommn.h
index 898887f..5c93ba7 100644
--- a/src/otvalid/otvcommn.h
+++ b/src/otvalid/otvcommn.h
@@ -4,7 +4,7 @@
/* */
/* OpenType common tables validation (specification). */
/* */
-/* Copyright 2004, 2005, 2007, 2009 by */
+/* Copyright 2004, 2005, 2007, 2009, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -39,7 +39,7 @@ FT_BEGIN_HEADER
typedef struct OTV_ValidatorRec_* OTV_Validator;
typedef void (*OTV_Validate_Func)( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
typedef struct OTV_ValidatorRec_
{
@@ -67,8 +67,8 @@ FT_BEGIN_HEADER
#undef FT_INVALID_
-#define FT_INVALID_( _prefix, _error ) \
- ft_validator_error( valid->root, _prefix ## _error )
+#define FT_INVALID_( _error ) \
+ ft_validator_error( otvalid->root, FT_THROW( _error ) )
#define OTV_OPTIONAL_TABLE( _table ) FT_UShort _table; \
FT_Bytes _table ## _p
@@ -81,7 +81,7 @@ FT_BEGIN_HEADER
#define OTV_LIMIT_CHECK( _count ) \
FT_BEGIN_STMNT \
- if ( p + (_count) > valid->root->limit ) \
+ if ( p + (_count) > otvalid->root->limit ) \
FT_INVALID_TOO_SHORT; \
FT_END_STMNT
@@ -89,7 +89,7 @@ FT_BEGIN_HEADER
FT_BEGIN_STMNT \
if ( _size > 0 && _size < table_size ) \
{ \
- if ( valid->root->level == FT_VALIDATE_PARANOID ) \
+ if ( otvalid->root->level == FT_VALIDATE_PARANOID ) \
FT_INVALID_OFFSET; \
else \
{ \
@@ -117,79 +117,79 @@ FT_BEGIN_HEADER
#ifdef FT_DEBUG_LEVEL_TRACE
-#define OTV_NEST1( x ) \
- FT_BEGIN_STMNT \
- valid->nesting_level = 0; \
- valid->func[0] = OTV_FUNC( x ); \
- valid->debug_function_name[0] = OTV_NAME( x ); \
+#define OTV_NEST1( x ) \
+ FT_BEGIN_STMNT \
+ otvalid->nesting_level = 0; \
+ otvalid->func[0] = OTV_FUNC( x ); \
+ otvalid->debug_function_name[0] = OTV_NAME( x ); \
FT_END_STMNT
-#define OTV_NEST2( x, y ) \
- FT_BEGIN_STMNT \
- valid->nesting_level = 0; \
- valid->func[0] = OTV_FUNC( x ); \
- valid->func[1] = OTV_FUNC( y ); \
- valid->debug_function_name[0] = OTV_NAME( x ); \
- valid->debug_function_name[1] = OTV_NAME( y ); \
+#define OTV_NEST2( x, y ) \
+ FT_BEGIN_STMNT \
+ otvalid->nesting_level = 0; \
+ otvalid->func[0] = OTV_FUNC( x ); \
+ otvalid->func[1] = OTV_FUNC( y ); \
+ otvalid->debug_function_name[0] = OTV_NAME( x ); \
+ otvalid->debug_function_name[1] = OTV_NAME( y ); \
FT_END_STMNT
-#define OTV_NEST3( x, y, z ) \
- FT_BEGIN_STMNT \
- valid->nesting_level = 0; \
- valid->func[0] = OTV_FUNC( x ); \
- valid->func[1] = OTV_FUNC( y ); \
- valid->func[2] = OTV_FUNC( z ); \
- valid->debug_function_name[0] = OTV_NAME( x ); \
- valid->debug_function_name[1] = OTV_NAME( y ); \
- valid->debug_function_name[2] = OTV_NAME( z ); \
+#define OTV_NEST3( x, y, z ) \
+ FT_BEGIN_STMNT \
+ otvalid->nesting_level = 0; \
+ otvalid->func[0] = OTV_FUNC( x ); \
+ otvalid->func[1] = OTV_FUNC( y ); \
+ otvalid->func[2] = OTV_FUNC( z ); \
+ otvalid->debug_function_name[0] = OTV_NAME( x ); \
+ otvalid->debug_function_name[1] = OTV_NAME( y ); \
+ otvalid->debug_function_name[2] = OTV_NAME( z ); \
FT_END_STMNT
-#define OTV_INIT valid->debug_indent = 0
+#define OTV_INIT otvalid->debug_indent = 0
-#define OTV_ENTER \
- FT_BEGIN_STMNT \
- valid->debug_indent += 2; \
- FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \
- FT_TRACE4(( "%s table\n", \
- valid->debug_function_name[valid->nesting_level] )); \
+#define OTV_ENTER \
+ FT_BEGIN_STMNT \
+ otvalid->debug_indent += 2; \
+ FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \
+ FT_TRACE4(( "%s table\n", \
+ otvalid->debug_function_name[otvalid->nesting_level] )); \
FT_END_STMNT
-#define OTV_NAME_ENTER( name ) \
- FT_BEGIN_STMNT \
- valid->debug_indent += 2; \
- FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \
- FT_TRACE4(( "%s table\n", name )); \
+#define OTV_NAME_ENTER( name ) \
+ FT_BEGIN_STMNT \
+ otvalid->debug_indent += 2; \
+ FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \
+ FT_TRACE4(( "%s table\n", name )); \
FT_END_STMNT
-#define OTV_EXIT valid->debug_indent -= 2
+#define OTV_EXIT otvalid->debug_indent -= 2
-#define OTV_TRACE( s ) \
- FT_BEGIN_STMNT \
- FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \
- FT_TRACE4( s ); \
+#define OTV_TRACE( s ) \
+ FT_BEGIN_STMNT \
+ FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \
+ FT_TRACE4( s ); \
FT_END_STMNT
#else /* !FT_DEBUG_LEVEL_TRACE */
-#define OTV_NEST1( x ) \
- FT_BEGIN_STMNT \
- valid->nesting_level = 0; \
- valid->func[0] = OTV_FUNC( x ); \
+#define OTV_NEST1( x ) \
+ FT_BEGIN_STMNT \
+ otvalid->nesting_level = 0; \
+ otvalid->func[0] = OTV_FUNC( x ); \
FT_END_STMNT
-#define OTV_NEST2( x, y ) \
- FT_BEGIN_STMNT \
- valid->nesting_level = 0; \
- valid->func[0] = OTV_FUNC( x ); \
- valid->func[1] = OTV_FUNC( y ); \
+#define OTV_NEST2( x, y ) \
+ FT_BEGIN_STMNT \
+ otvalid->nesting_level = 0; \
+ otvalid->func[0] = OTV_FUNC( x ); \
+ otvalid->func[1] = OTV_FUNC( y ); \
FT_END_STMNT
-#define OTV_NEST3( x, y, z ) \
- FT_BEGIN_STMNT \
- valid->nesting_level = 0; \
- valid->func[0] = OTV_FUNC( x ); \
- valid->func[1] = OTV_FUNC( y ); \
- valid->func[2] = OTV_FUNC( z ); \
+#define OTV_NEST3( x, y, z ) \
+ FT_BEGIN_STMNT \
+ otvalid->nesting_level = 0; \
+ otvalid->func[0] = OTV_FUNC( x ); \
+ otvalid->func[1] = OTV_FUNC( y ); \
+ otvalid->func[2] = OTV_FUNC( z ); \
FT_END_STMNT
#define OTV_INIT do { } while ( 0 )
@@ -202,7 +202,7 @@ FT_BEGIN_HEADER
#endif /* !FT_DEBUG_LEVEL_TRACE */
-#define OTV_RUN valid->func[0]
+#define OTV_RUN otvalid->func[0]
/*************************************************************************/
@@ -215,7 +215,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_Coverage_validate( FT_Bytes table,
- OTV_Validator valid,
+ OTV_Validator otvalid,
FT_Int expected_count );
/* return first covered glyph */
@@ -241,7 +241,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_ClassDef_validate( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
/*************************************************************************/
@@ -254,7 +254,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_Device_validate( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
/*************************************************************************/
@@ -267,11 +267,11 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_Lookup_validate( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
FT_LOCAL( void )
otv_LookupList_validate( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
/*************************************************************************/
@@ -284,13 +284,13 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_Feature_validate( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
/* lookups must already be validated */
FT_LOCAL( void )
otv_FeatureList_validate( FT_Bytes table,
FT_Bytes lookups,
- OTV_Validator valid );
+ OTV_Validator otvalid );
/*************************************************************************/
@@ -303,7 +303,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_LangSys_validate( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
/*************************************************************************/
@@ -316,13 +316,13 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_Script_validate( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
/* features must already be validated */
FT_LOCAL( void )
otv_ScriptList_validate( FT_Bytes table,
FT_Bytes features,
- OTV_Validator valid );
+ OTV_Validator otvalid );
/*************************************************************************/
@@ -349,7 +349,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_x_Ox ( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
#define AlternateSubstFormat1Func otv_u_C_x_Ox
#define ChainContextPosFormat1Func otv_u_C_x_Ox
@@ -361,7 +361,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_u_C_x_Ox( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
#define AlternateSetFunc otv_x_ux
#define AttachPointFunc otv_x_ux
@@ -372,7 +372,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_x_ux( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
#define PosClassRuleFunc otv_x_y_ux_sy
#define PosRuleFunc otv_x_y_ux_sy
@@ -381,7 +381,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_x_y_ux_sy( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
#define ChainPosClassRuleFunc otv_x_ux_y_uy_z_uz_p_sp
#define ChainPosRuleFunc otv_x_ux_y_uy_z_uz_p_sp
@@ -390,35 +390,35 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
otv_x_ux_y_uy_z_uz_p_sp( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
#define ContextPosFormat2Func otv_u_O_O_x_Onx
#define ContextSubstFormat2Func otv_u_O_O_x_Onx
FT_LOCAL( void )
otv_u_O_O_x_Onx( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
#define ContextPosFormat3Func otv_u_x_y_Ox_sy
#define ContextSubstFormat3Func otv_u_x_y_Ox_sy
FT_LOCAL( void )
otv_u_x_y_Ox_sy( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
#define ChainContextPosFormat2Func otv_u_O_O_O_O_x_Onx
#define ChainContextSubstFormat2Func otv_u_O_O_O_O_x_Onx
FT_LOCAL( void )
otv_u_O_O_O_O_x_Onx( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
#define ChainContextPosFormat3Func otv_u_x_Ox_y_Oy_z_Oz_p_sp
#define ChainContextSubstFormat3Func otv_u_x_Ox_y_Oy_z_Oz_p_sp
FT_LOCAL( void )
otv_u_x_Ox_y_Oy_z_Oz_p_sp( FT_Bytes table,
- OTV_Validator valid );
+ OTV_Validator otvalid );
FT_LOCAL( FT_UInt )
diff --git a/src/otvalid/otverror.h b/src/otvalid/otverror.h
index 522f4a2..b6f00c9 100644
--- a/src/otvalid/otverror.h
+++ b/src/otvalid/otverror.h
@@ -4,7 +4,7 @@
/* */
/* OpenType validation module error codes (specification only). */
/* */
-/* Copyright 2004, 2005, 2012 by */
+/* Copyright 2004, 2005, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -34,8 +34,6 @@
#define FT_ERR_PREFIX OTV_Err_
#define FT_ERR_BASE FT_Mod_Err_OTvalid
-#define FT_KEEP_ERR_PREFIX
-
#include FT_ERRORS_H
#endif /* __OTVERROR_H__ */
diff --git a/src/otvalid/otvgdef.c b/src/otvalid/otvgdef.c
index 3633ad0..e60ef36 100644
--- a/src/otvalid/otvgdef.c
+++ b/src/otvalid/otvgdef.c
@@ -45,7 +45,7 @@
static void
otv_O_x_Ox( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_Bytes Coverage;
@@ -61,20 +61,20 @@
OTV_TRACE(( " (GlyphCount = %d)\n", GlyphCount ));
- otv_Coverage_validate( Coverage, valid, GlyphCount );
+ otv_Coverage_validate( Coverage, otvalid, GlyphCount );
if ( GlyphCount != otv_Coverage_get_count( Coverage ) )
FT_INVALID_DATA;
OTV_LIMIT_CHECK( GlyphCount * 2 );
- valid->nesting_level++;
- func = valid->func[valid->nesting_level];
- valid->extra1 = 0;
+ otvalid->nesting_level++;
+ func = otvalid->func[otvalid->nesting_level];
+ otvalid->extra1 = 0;
for ( ; GlyphCount > 0; GlyphCount-- )
- func( table + FT_NEXT_USHORT( p ), valid );
+ func( table + FT_NEXT_USHORT( p ), otvalid );
- valid->nesting_level--;
+ otvalid->nesting_level--;
OTV_EXIT;
}
@@ -92,7 +92,7 @@
static void
otv_CaretValue_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt CaretValueFormat;
@@ -122,7 +122,7 @@
OTV_LIMIT_CHECK( 2 );
/* DeviceTable */
- otv_Device_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_Device_validate( table + FT_NEXT_USHORT( p ), otvalid );
break;
default:
@@ -141,7 +141,7 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->glyph_count */
+ /* sets otvalid->glyph_count */
FT_LOCAL_DEF( void )
otv_GDEF_validate( FT_Bytes table,
@@ -150,8 +150,8 @@
FT_UInt glyph_count,
FT_Validator ftvalid )
{
- OTV_ValidatorRec validrec;
- OTV_Validator valid = &validrec;
+ OTV_ValidatorRec otvalidrec;
+ OTV_Validator otvalid = &otvalidrec;
FT_Bytes p = table;
FT_UInt table_size;
FT_Bool need_MarkAttachClassDef;
@@ -162,7 +162,7 @@
OTV_OPTIONAL_TABLE( MarkAttachClassDef );
- valid->root = ftvalid;
+ otvalid->root = ftvalid;
FT_TRACE3(( "validating GDEF table\n" ));
OTV_INIT;
@@ -186,19 +186,19 @@
else
table_size = 10; /* OpenType < 1.2 */
- valid->glyph_count = glyph_count;
+ otvalid->glyph_count = glyph_count;
OTV_OPTIONAL_OFFSET( GlyphClassDef );
OTV_SIZE_CHECK( GlyphClassDef );
if ( GlyphClassDef )
- otv_ClassDef_validate( table + GlyphClassDef, valid );
+ otv_ClassDef_validate( table + GlyphClassDef, otvalid );
OTV_OPTIONAL_OFFSET( AttachListOffset );
OTV_SIZE_CHECK( AttachListOffset );
if ( AttachListOffset )
{
OTV_NEST2( AttachList, AttachPoint );
- OTV_RUN( table + AttachListOffset, valid );
+ OTV_RUN( table + AttachListOffset, otvalid );
}
OTV_OPTIONAL_OFFSET( LigCaretListOffset );
@@ -206,7 +206,7 @@
if ( LigCaretListOffset )
{
OTV_NEST3( LigCaretList, LigGlyph, CaretValue );
- OTV_RUN( table + LigCaretListOffset, valid );
+ OTV_RUN( table + LigCaretListOffset, otvalid );
}
if ( need_MarkAttachClassDef )
@@ -214,7 +214,7 @@
OTV_OPTIONAL_OFFSET( MarkAttachClassDef );
OTV_SIZE_CHECK( MarkAttachClassDef );
if ( MarkAttachClassDef )
- otv_ClassDef_validate( table + MarkAttachClassDef, valid );
+ otv_ClassDef_validate( table + MarkAttachClassDef, otvalid );
}
FT_TRACE4(( "\n" ));
diff --git a/src/otvalid/otvgpos.c b/src/otvalid/otvgpos.c
index 49b4618..1a9dbaa 100644
--- a/src/otvalid/otvgpos.c
+++ b/src/otvalid/otvgpos.c
@@ -57,7 +57,7 @@
static void
otv_x_sxy( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt Count, count1, table_size;
@@ -71,26 +71,26 @@
OTV_TRACE(( " (Count = %d)\n", Count ));
- OTV_LIMIT_CHECK( Count * valid->extra1 * 2 );
+ OTV_LIMIT_CHECK( Count * otvalid->extra1 * 2 );
- table_size = Count * valid->extra1 * 2 + 2;
+ table_size = Count * otvalid->extra1 * 2 + 2;
for ( ; Count > 0; Count-- )
- for ( count1 = valid->extra1; count1 > 0; count1-- )
+ for ( count1 = otvalid->extra1; count1 > 0; count1-- )
{
OTV_OPTIONAL_TABLE( anchor_offset );
OTV_OPTIONAL_OFFSET( anchor_offset );
- if ( valid->extra2 )
+ if ( otvalid->extra2 )
{
OTV_SIZE_CHECK( anchor_offset );
if ( anchor_offset )
- otv_Anchor_validate( table + anchor_offset, valid );
+ otv_Anchor_validate( table + anchor_offset, otvalid );
}
else
- otv_Anchor_validate( table + anchor_offset, valid );
+ otv_Anchor_validate( table + anchor_offset, otvalid );
}
OTV_EXIT;
@@ -101,11 +101,11 @@
#define MarkLigPosFormat1Func otv_u_O_O_u_O_O
#define MarkMarkPosFormat1Func otv_u_O_O_u_O_O
- /* sets valid->extra1 (class count) */
+ /* sets otvalid->extra1 (class count) */
static void
otv_u_O_O_u_O_O( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt Coverage1, Coverage2, ClassCount;
@@ -124,18 +124,18 @@
Array1 = FT_NEXT_USHORT( p );
Array2 = FT_NEXT_USHORT( p );
- otv_Coverage_validate( table + Coverage1, valid, -1 );
- otv_Coverage_validate( table + Coverage2, valid, -1 );
+ otv_Coverage_validate( table + Coverage1, otvalid, -1 );
+ otv_Coverage_validate( table + Coverage2, otvalid, -1 );
- otv_MarkArray_validate( table + Array1, valid );
+ otv_MarkArray_validate( table + Array1, otvalid );
- valid->nesting_level++;
- func = valid->func[valid->nesting_level];
- valid->extra1 = ClassCount;
+ otvalid->nesting_level++;
+ func = otvalid->func[otvalid->nesting_level];
+ otvalid->extra1 = ClassCount;
- func( table + Array2, valid );
+ func( table + Array2, otvalid );
- valid->nesting_level--;
+ otvalid->nesting_level--;
OTV_EXIT;
}
@@ -163,12 +163,12 @@
}
- /* uses valid->extra3 (pointer to base table) */
+ /* uses otvalid->extra3 (pointer to base table) */
static void
otv_ValueRecord_validate( FT_Bytes table,
FT_UInt format,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt count;
@@ -222,11 +222,11 @@
/* ValueRecord is part of an array -- getting the correct table */
/* size is probably not worth the trouble */
- table_size = p - valid->extra3;
+ table_size = p - otvalid->extra3;
OTV_SIZE_CHECK( device );
if ( device )
- otv_Device_validate( valid->extra3 + device, valid );
+ otv_Device_validate( otvalid->extra3 + device, otvalid );
}
format >>= 1;
}
@@ -245,7 +245,7 @@
static void
otv_Anchor_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt AnchorFormat;
@@ -285,11 +285,11 @@
OTV_SIZE_CHECK( XDeviceTable );
if ( XDeviceTable )
- otv_Device_validate( table + XDeviceTable, valid );
+ otv_Device_validate( table + XDeviceTable, otvalid );
OTV_SIZE_CHECK( YDeviceTable );
if ( YDeviceTable )
- otv_Device_validate( table + YDeviceTable, valid );
+ otv_Device_validate( table + YDeviceTable, otvalid );
}
break;
@@ -311,7 +311,7 @@
static void
otv_MarkArray_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt MarkCount;
@@ -331,7 +331,7 @@
{
p += 2; /* skip Class */
/* MarkAnchor */
- otv_Anchor_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_Anchor_validate( table + FT_NEXT_USHORT( p ), otvalid );
}
OTV_EXIT;
@@ -346,11 +346,11 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->extra3 (pointer to base table) */
+ /* sets otvalid->extra3 (pointer to base table) */
static void
otv_SinglePos_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt PosFormat;
@@ -363,7 +363,7 @@
OTV_TRACE(( " (format %d)\n", PosFormat ));
- valid->extra3 = table;
+ otvalid->extra3 = table;
switch ( PosFormat )
{
@@ -376,8 +376,8 @@
Coverage = FT_NEXT_USHORT( p );
ValueFormat = FT_NEXT_USHORT( p );
- otv_Coverage_validate( table + Coverage, valid, -1 );
- otv_ValueRecord_validate( p, ValueFormat, valid ); /* Value */
+ otv_Coverage_validate( table + Coverage, otvalid, -1 );
+ otv_ValueRecord_validate( p, ValueFormat, otvalid ); /* Value */
}
break;
@@ -395,14 +395,14 @@
len_value = otv_value_length( ValueFormat );
- otv_Coverage_validate( table + Coverage, valid, ValueCount );
+ otv_Coverage_validate( table + Coverage, otvalid, ValueCount );
OTV_LIMIT_CHECK( ValueCount * len_value );
/* Value */
for ( ; ValueCount > 0; ValueCount-- )
{
- otv_ValueRecord_validate( p, ValueFormat, valid );
+ otv_ValueRecord_validate( p, ValueFormat, otvalid );
p += len_value;
}
}
@@ -428,7 +428,7 @@
otv_PairSet_validate( FT_Bytes table,
FT_UInt format1,
FT_UInt format2,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt value_len1, value_len2, PairValueCount;
@@ -452,11 +452,11 @@
p += 2; /* skip SecondGlyph */
if ( format1 )
- otv_ValueRecord_validate( p, format1, valid ); /* Value1 */
+ otv_ValueRecord_validate( p, format1, otvalid ); /* Value1 */
p += value_len1;
if ( format2 )
- otv_ValueRecord_validate( p, format2, valid ); /* Value2 */
+ otv_ValueRecord_validate( p, format2, otvalid ); /* Value2 */
p += value_len2;
}
@@ -464,11 +464,11 @@
}
- /* sets valid->extra3 (pointer to base table) */
+ /* sets otvalid->extra3 (pointer to base table) */
static void
otv_PairPos_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt PosFormat;
@@ -481,7 +481,7 @@
OTV_TRACE(( " (format %d)\n", PosFormat ));
- valid->extra3 = table;
+ otvalid->extra3 = table;
switch ( PosFormat )
{
@@ -498,14 +498,14 @@
OTV_TRACE(( " (PairSetCount = %d)\n", PairSetCount ));
- otv_Coverage_validate( table + Coverage, valid, -1 );
+ otv_Coverage_validate( table + Coverage, otvalid, -1 );
OTV_LIMIT_CHECK( PairSetCount * 2 );
/* PairSetOffset */
for ( ; PairSetCount > 0; PairSetCount-- )
otv_PairSet_validate( table + FT_NEXT_USHORT( p ),
- ValueFormat1, ValueFormat2, valid );
+ ValueFormat1, ValueFormat2, otvalid );
}
break;
@@ -530,9 +530,9 @@
len_value1 = otv_value_length( ValueFormat1 );
len_value2 = otv_value_length( ValueFormat2 );
- otv_Coverage_validate( table + Coverage, valid, -1 );
- otv_ClassDef_validate( table + ClassDef1, valid );
- otv_ClassDef_validate( table + ClassDef2, valid );
+ otv_Coverage_validate( table + Coverage, otvalid, -1 );
+ otv_ClassDef_validate( table + ClassDef1, otvalid );
+ otv_ClassDef_validate( table + ClassDef2, otvalid );
OTV_LIMIT_CHECK( ClassCount1 * ClassCount2 *
( len_value1 + len_value2 ) );
@@ -545,12 +545,12 @@
{
if ( ValueFormat1 )
/* Value1 */
- otv_ValueRecord_validate( p, ValueFormat1, valid );
+ otv_ValueRecord_validate( p, ValueFormat1, otvalid );
p += len_value1;
if ( ValueFormat2 )
/* Value2 */
- otv_ValueRecord_validate( p, ValueFormat2, valid );
+ otv_ValueRecord_validate( p, ValueFormat2, otvalid );
p += len_value2;
}
}
@@ -575,7 +575,7 @@
static void
otv_CursivePos_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt PosFormat;
@@ -605,7 +605,7 @@
OTV_TRACE(( " (EntryExitCount = %d)\n", EntryExitCount ));
- otv_Coverage_validate( table + Coverage, valid, EntryExitCount );
+ otv_Coverage_validate( table + Coverage, otvalid, EntryExitCount );
OTV_LIMIT_CHECK( EntryExitCount * 4 );
@@ -619,11 +619,11 @@
OTV_SIZE_CHECK( EntryAnchor );
if ( EntryAnchor )
- otv_Anchor_validate( table + EntryAnchor, valid );
+ otv_Anchor_validate( table + EntryAnchor, otvalid );
OTV_SIZE_CHECK( ExitAnchor );
if ( ExitAnchor )
- otv_Anchor_validate( table + ExitAnchor, valid );
+ otv_Anchor_validate( table + ExitAnchor, otvalid );
}
}
break;
@@ -647,11 +647,11 @@
/* UNDOCUMENTED (in OpenType 1.5): */
/* BaseRecord tables can contain NULL pointers. */
- /* sets valid->extra2 (1) */
+ /* sets otvalid->extra2 (1) */
static void
otv_MarkBasePos_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt PosFormat;
@@ -667,9 +667,9 @@
switch ( PosFormat )
{
case 1:
- valid->extra2 = 1;
+ otvalid->extra2 = 1;
OTV_NEST2( MarkBasePosFormat1, BaseArray );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
default:
@@ -688,11 +688,11 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->extra2 (1) */
+ /* sets otvalid->extra2 (1) */
static void
otv_MarkLigPos_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt PosFormat;
@@ -708,9 +708,9 @@
switch ( PosFormat )
{
case 1:
- valid->extra2 = 1;
+ otvalid->extra2 = 1;
OTV_NEST3( MarkLigPosFormat1, LigatureArray, LigatureAttach );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
default:
@@ -729,11 +729,11 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->extra2 (0) */
+ /* sets otvalid->extra2 (0) */
static void
otv_MarkMarkPos_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt PosFormat;
@@ -749,9 +749,9 @@
switch ( PosFormat )
{
case 1:
- valid->extra2 = 0;
+ otvalid->extra2 = 0;
OTV_NEST2( MarkMarkPosFormat1, Mark2Array );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
default:
@@ -770,11 +770,11 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->extra1 (lookup count) */
+ /* sets otvalid->extra1 (lookup count) */
static void
otv_ContextPos_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt PosFormat;
@@ -794,9 +794,9 @@
/* context rules since even invalid glyph indices/classes return */
/* meaningful results */
- valid->extra1 = valid->lookup_count;
+ otvalid->extra1 = otvalid->lookup_count;
OTV_NEST3( ContextPosFormat1, PosRuleSet, PosRule );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
case 2:
@@ -805,12 +805,12 @@
/* meaningful results */
OTV_NEST3( ContextPosFormat2, PosClassSet, PosClassRule );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
case 3:
OTV_NEST1( ContextPosFormat3 );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
default:
@@ -829,11 +829,11 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->extra1 (lookup count) */
+ /* sets otvalid->extra1 (lookup count) */
static void
otv_ChainContextPos_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt PosFormat;
@@ -853,10 +853,10 @@
/* context rules since even invalid glyph indices/classes return */
/* meaningful results */
- valid->extra1 = valid->lookup_count;
+ otvalid->extra1 = otvalid->lookup_count;
OTV_NEST3( ChainContextPosFormat1,
ChainPosRuleSet, ChainPosRule );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
case 2:
@@ -866,12 +866,12 @@
OTV_NEST3( ChainContextPosFormat2,
ChainPosClassSet, ChainPosClassRule );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
case 3:
OTV_NEST1( ChainContextPosFormat3 );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
default:
@@ -890,11 +890,11 @@
/*************************************************************************/
/*************************************************************************/
- /* uses valid->type_funcs */
+ /* uses otvalid->type_funcs */
static void
otv_ExtensionPos_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt PosFormat;
@@ -923,8 +923,8 @@
if ( ExtensionLookupType == 0 || ExtensionLookupType >= 9 )
FT_INVALID_DATA;
- validate = valid->type_funcs[ExtensionLookupType - 1];
- validate( table + ExtensionOffset, valid );
+ validate = otvalid->type_funcs[ExtensionLookupType - 1];
+ validate( table + ExtensionOffset, otvalid );
}
break;
@@ -950,17 +950,17 @@
};
- /* sets valid->type_count */
- /* sets valid->type_funcs */
+ /* sets otvalid->type_count */
+ /* sets otvalid->type_funcs */
FT_LOCAL_DEF( void )
otv_GPOS_subtable_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
- valid->type_count = 9;
- valid->type_funcs = (OTV_Validate_Func*)otv_gpos_validate_funcs;
+ otvalid->type_count = 9;
+ otvalid->type_funcs = (OTV_Validate_Func*)otv_gpos_validate_funcs;
- otv_Lookup_validate( table, valid );
+ otv_Lookup_validate( table, otvalid );
}
@@ -972,7 +972,7 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->glyph_count */
+ /* sets otvalid->glyph_count */
FT_LOCAL_DEF( void )
otv_GPOS_validate( FT_Bytes table,
@@ -980,12 +980,12 @@
FT_Validator ftvalid )
{
OTV_ValidatorRec validrec;
- OTV_Validator valid = &validrec;
+ OTV_Validator otvalid = &validrec;
FT_Bytes p = table;
FT_UInt ScriptList, FeatureList, LookupList;
- valid->root = ftvalid;
+ otvalid->root = ftvalid;
FT_TRACE3(( "validating GPOS table\n" ));
OTV_INIT;
@@ -999,16 +999,16 @@
FeatureList = FT_NEXT_USHORT( p );
LookupList = FT_NEXT_USHORT( p );
- valid->type_count = 9;
- valid->type_funcs = (OTV_Validate_Func*)otv_gpos_validate_funcs;
- valid->glyph_count = glyph_count;
+ otvalid->type_count = 9;
+ otvalid->type_funcs = (OTV_Validate_Func*)otv_gpos_validate_funcs;
+ otvalid->glyph_count = glyph_count;
otv_LookupList_validate( table + LookupList,
- valid );
+ otvalid );
otv_FeatureList_validate( table + FeatureList, table + LookupList,
- valid );
+ otvalid );
otv_ScriptList_validate( table + ScriptList, table + FeatureList,
- valid );
+ otvalid );
FT_TRACE4(( "\n" ));
}
diff --git a/src/otvalid/otvgsub.c b/src/otvalid/otvgsub.c
index ed499d1..024b8ca 100644
--- a/src/otvalid/otvgsub.c
+++ b/src/otvalid/otvgsub.c
@@ -38,11 +38,11 @@
/*************************************************************************/
/*************************************************************************/
- /* uses valid->glyph_count */
+ /* uses otvalid->glyph_count */
static void
otv_SingleSubst_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt SubstFormat;
@@ -68,14 +68,14 @@
Coverage = table + FT_NEXT_USHORT( p );
DeltaGlyphID = FT_NEXT_SHORT( p );
- otv_Coverage_validate( Coverage, valid, -1 );
+ otv_Coverage_validate( Coverage, otvalid, -1 );
idx = otv_Coverage_get_first( Coverage ) + DeltaGlyphID;
if ( idx < 0 )
FT_INVALID_DATA;
idx = otv_Coverage_get_last( Coverage ) + DeltaGlyphID;
- if ( (FT_UInt)idx >= valid->glyph_count )
+ if ( (FT_UInt)idx >= otvalid->glyph_count )
FT_INVALID_DATA;
}
break;
@@ -91,13 +91,13 @@
OTV_TRACE(( " (GlyphCount = %d)\n", GlyphCount ));
- otv_Coverage_validate( table + Coverage, valid, GlyphCount );
+ otv_Coverage_validate( table + Coverage, otvalid, GlyphCount );
OTV_LIMIT_CHECK( GlyphCount * 2 );
/* Substitute */
for ( ; GlyphCount > 0; GlyphCount-- )
- if ( FT_NEXT_USHORT( p ) >= valid->glyph_count )
+ if ( FT_NEXT_USHORT( p ) >= otvalid->glyph_count )
FT_INVALID_GLYPH_ID;
}
break;
@@ -118,11 +118,11 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->extra1 (glyph count) */
+ /* sets otvalid->extra1 (glyph count) */
static void
otv_MultipleSubst_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt SubstFormat;
@@ -138,9 +138,9 @@
switch ( SubstFormat )
{
case 1:
- valid->extra1 = valid->glyph_count;
+ otvalid->extra1 = otvalid->glyph_count;
OTV_NEST2( MultipleSubstFormat1, Sequence );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
default:
@@ -159,11 +159,11 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->extra1 (glyph count) */
+ /* sets otvalid->extra1 (glyph count) */
static void
otv_AlternateSubst_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt SubstFormat;
@@ -179,9 +179,9 @@
switch ( SubstFormat )
{
case 1:
- valid->extra1 = valid->glyph_count;
+ otvalid->extra1 = otvalid->glyph_count;
OTV_NEST2( AlternateSubstFormat1, AlternateSet );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
default:
@@ -202,11 +202,11 @@
#define LigatureFunc otv_Ligature_validate
- /* uses valid->glyph_count */
+ /* uses otvalid->glyph_count */
static void
otv_Ligature_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt LigatureGlyph, CompCount;
@@ -216,7 +216,7 @@
OTV_LIMIT_CHECK( 4 );
LigatureGlyph = FT_NEXT_USHORT( p );
- if ( LigatureGlyph >= valid->glyph_count )
+ if ( LigatureGlyph >= otvalid->glyph_count )
FT_INVALID_DATA;
CompCount = FT_NEXT_USHORT( p );
@@ -238,7 +238,7 @@
static void
otv_LigatureSubst_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt SubstFormat;
@@ -255,7 +255,7 @@
{
case 1:
OTV_NEST3( LigatureSubstFormat1, LigatureSet, Ligature );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
default:
@@ -274,11 +274,11 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->extra1 (lookup count) */
+ /* sets otvalid->extra1 (lookup count) */
static void
otv_ContextSubst_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt SubstFormat;
@@ -298,9 +298,9 @@
/* context rules since even invalid glyph indices/classes return */
/* meaningful results */
- valid->extra1 = valid->lookup_count;
+ otvalid->extra1 = otvalid->lookup_count;
OTV_NEST3( ContextSubstFormat1, SubRuleSet, SubRule );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
case 2:
@@ -309,12 +309,12 @@
/* meaningful results */
OTV_NEST3( ContextSubstFormat2, SubClassSet, SubClassRule );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
case 3:
OTV_NEST1( ContextSubstFormat3 );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
default:
@@ -333,11 +333,11 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->extra1 (lookup count) */
+ /* sets otvalid->extra1 (lookup count) */
static void
otv_ChainContextSubst_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt SubstFormat;
@@ -357,10 +357,10 @@
/* context rules since even invalid glyph indices/classes return */
/* meaningful results */
- valid->extra1 = valid->lookup_count;
+ otvalid->extra1 = otvalid->lookup_count;
OTV_NEST3( ChainContextSubstFormat1,
ChainSubRuleSet, ChainSubRule );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
case 2:
@@ -370,12 +370,12 @@
OTV_NEST3( ChainContextSubstFormat2,
ChainSubClassSet, ChainSubClassRule );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
case 3:
OTV_NEST1( ChainContextSubstFormat3 );
- OTV_RUN( table, valid );
+ OTV_RUN( table, otvalid );
break;
default:
@@ -394,11 +394,11 @@
/*************************************************************************/
/*************************************************************************/
- /* uses valid->type_funcs */
+ /* uses otvalid->type_funcs */
static void
otv_ExtensionSubst_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt SubstFormat;
@@ -429,8 +429,8 @@
ExtensionLookupType > 8 )
FT_INVALID_DATA;
- validate = valid->type_funcs[ExtensionLookupType - 1];
- validate( table + ExtensionOffset, valid );
+ validate = otvalid->type_funcs[ExtensionLookupType - 1];
+ validate( table + ExtensionOffset, otvalid );
}
break;
@@ -450,11 +450,11 @@
/*************************************************************************/
/*************************************************************************/
- /* uses valid->glyph_count */
+ /* uses otvalid->glyph_count */
static void
otv_ReverseChainSingleSubst_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table, Coverage;
FT_UInt SubstFormat;
@@ -477,12 +477,12 @@
OTV_TRACE(( " (BacktrackGlyphCount = %d)\n", BacktrackGlyphCount ));
- otv_Coverage_validate( Coverage, valid, -1 );
+ otv_Coverage_validate( Coverage, otvalid, -1 );
OTV_LIMIT_CHECK( BacktrackGlyphCount * 2 + 2 );
for ( ; BacktrackGlyphCount > 0; BacktrackGlyphCount-- )
- otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 );
+ otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );
LookaheadGlyphCount = FT_NEXT_USHORT( p );
@@ -491,7 +491,7 @@
OTV_LIMIT_CHECK( LookaheadGlyphCount * 2 + 2 );
for ( ; LookaheadGlyphCount > 0; LookaheadGlyphCount-- )
- otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 );
+ otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 );
GlyphCount = FT_NEXT_USHORT( p );
@@ -504,7 +504,7 @@
/* Substitute */
for ( ; GlyphCount > 0; GlyphCount-- )
- if ( FT_NEXT_USHORT( p ) >= valid->glyph_count )
+ if ( FT_NEXT_USHORT( p ) >= otvalid->glyph_count )
FT_INVALID_DATA;
break;
@@ -538,22 +538,22 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->type_count */
- /* sets valid->type_funcs */
- /* sets valid->glyph_count */
+ /* sets otvalid->type_count */
+ /* sets otvalid->type_funcs */
+ /* sets otvalid->glyph_count */
FT_LOCAL_DEF( void )
otv_GSUB_validate( FT_Bytes table,
FT_UInt glyph_count,
FT_Validator ftvalid )
{
- OTV_ValidatorRec validrec;
- OTV_Validator valid = &validrec;
- FT_Bytes p = table;
+ OTV_ValidatorRec otvalidrec;
+ OTV_Validator otvalid = &otvalidrec;
+ FT_Bytes p = table;
FT_UInt ScriptList, FeatureList, LookupList;
- valid->root = ftvalid;
+ otvalid->root = ftvalid;
FT_TRACE3(( "validating GSUB table\n" ));
OTV_INIT;
@@ -567,16 +567,16 @@
FeatureList = FT_NEXT_USHORT( p );
LookupList = FT_NEXT_USHORT( p );
- valid->type_count = 8;
- valid->type_funcs = (OTV_Validate_Func*)otv_gsub_validate_funcs;
- valid->glyph_count = glyph_count;
+ otvalid->type_count = 8;
+ otvalid->type_funcs = (OTV_Validate_Func*)otv_gsub_validate_funcs;
+ otvalid->glyph_count = glyph_count;
otv_LookupList_validate( table + LookupList,
- valid );
+ otvalid );
otv_FeatureList_validate( table + FeatureList, table + LookupList,
- valid );
+ otvalid );
otv_ScriptList_validate( table + ScriptList, table + FeatureList,
- valid );
+ otvalid );
FT_TRACE4(( "\n" ));
}
diff --git a/src/otvalid/otvjstf.c b/src/otvalid/otvjstf.c
index a616a23..f273be8 100644
--- a/src/otvalid/otvjstf.c
+++ b/src/otvalid/otvjstf.c
@@ -34,13 +34,13 @@
#define JstfPriorityFunc otv_JstfPriority_validate
#define JstfLookupFunc otv_GPOS_subtable_validate
- /* uses valid->extra1 (GSUB lookup count) */
- /* uses valid->extra2 (GPOS lookup count) */
- /* sets valid->extra1 (counter) */
+ /* uses otvalid->extra1 (GSUB lookup count) */
+ /* uses otvalid->extra2 (GPOS lookup count) */
+ /* sets otvalid->extra1 (counter) */
static void
otv_JstfPriority_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt table_size;
@@ -63,34 +63,34 @@
OTV_LIMIT_CHECK( 20 );
- gsub_lookup_count = valid->extra1;
- gpos_lookup_count = valid->extra2;
+ gsub_lookup_count = otvalid->extra1;
+ gpos_lookup_count = otvalid->extra2;
table_size = 20;
- valid->extra1 = gsub_lookup_count;
+ otvalid->extra1 = gsub_lookup_count;
OTV_OPTIONAL_OFFSET( ShrinkageEnableGSUB );
OTV_SIZE_CHECK( ShrinkageEnableGSUB );
if ( ShrinkageEnableGSUB )
- otv_x_ux( table + ShrinkageEnableGSUB, valid );
+ otv_x_ux( table + ShrinkageEnableGSUB, otvalid );
OTV_OPTIONAL_OFFSET( ShrinkageDisableGSUB );
OTV_SIZE_CHECK( ShrinkageDisableGSUB );
if ( ShrinkageDisableGSUB )
- otv_x_ux( table + ShrinkageDisableGSUB, valid );
+ otv_x_ux( table + ShrinkageDisableGSUB, otvalid );
- valid->extra1 = gpos_lookup_count;
+ otvalid->extra1 = gpos_lookup_count;
OTV_OPTIONAL_OFFSET( ShrinkageEnableGPOS );
OTV_SIZE_CHECK( ShrinkageEnableGPOS );
if ( ShrinkageEnableGPOS )
- otv_x_ux( table + ShrinkageEnableGPOS, valid );
+ otv_x_ux( table + ShrinkageEnableGPOS, otvalid );
OTV_OPTIONAL_OFFSET( ShrinkageDisableGPOS );
OTV_SIZE_CHECK( ShrinkageDisableGPOS );
if ( ShrinkageDisableGPOS )
- otv_x_ux( table + ShrinkageDisableGPOS, valid );
+ otv_x_ux( table + ShrinkageDisableGPOS, otvalid );
OTV_OPTIONAL_OFFSET( ShrinkageJstfMax );
OTV_SIZE_CHECK( ShrinkageJstfMax );
@@ -98,32 +98,32 @@
{
/* XXX: check lookup types? */
OTV_NEST2( JstfMax, JstfLookup );
- OTV_RUN( table + ShrinkageJstfMax, valid );
+ OTV_RUN( table + ShrinkageJstfMax, otvalid );
}
- valid->extra1 = gsub_lookup_count;
+ otvalid->extra1 = gsub_lookup_count;
OTV_OPTIONAL_OFFSET( ExtensionEnableGSUB );
OTV_SIZE_CHECK( ExtensionEnableGSUB );
if ( ExtensionEnableGSUB )
- otv_x_ux( table + ExtensionEnableGSUB, valid );
+ otv_x_ux( table + ExtensionEnableGSUB, otvalid );
OTV_OPTIONAL_OFFSET( ExtensionDisableGSUB );
OTV_SIZE_CHECK( ExtensionDisableGSUB );
if ( ExtensionDisableGSUB )
- otv_x_ux( table + ExtensionDisableGSUB, valid );
+ otv_x_ux( table + ExtensionDisableGSUB, otvalid );
- valid->extra1 = gpos_lookup_count;
+ otvalid->extra1 = gpos_lookup_count;
OTV_OPTIONAL_OFFSET( ExtensionEnableGPOS );
OTV_SIZE_CHECK( ExtensionEnableGPOS );
if ( ExtensionEnableGPOS )
- otv_x_ux( table + ExtensionEnableGPOS, valid );
+ otv_x_ux( table + ExtensionEnableGPOS, otvalid );
OTV_OPTIONAL_OFFSET( ExtensionDisableGPOS );
OTV_SIZE_CHECK( ExtensionDisableGPOS );
if ( ExtensionDisableGPOS )
- otv_x_ux( table + ExtensionDisableGPOS, valid );
+ otv_x_ux( table + ExtensionDisableGPOS, otvalid );
OTV_OPTIONAL_OFFSET( ExtensionJstfMax );
OTV_SIZE_CHECK( ExtensionJstfMax );
@@ -131,22 +131,22 @@
{
/* XXX: check lookup types? */
OTV_NEST2( JstfMax, JstfLookup );
- OTV_RUN( table + ExtensionJstfMax, valid );
+ OTV_RUN( table + ExtensionJstfMax, otvalid );
}
- valid->extra1 = gsub_lookup_count;
- valid->extra2 = gpos_lookup_count;
+ otvalid->extra1 = gsub_lookup_count;
+ otvalid->extra2 = gpos_lookup_count;
OTV_EXIT;
}
- /* sets valid->extra (glyph count) */
- /* sets valid->func1 (otv_JstfPriority_validate) */
+ /* sets otvalid->extra (glyph count) */
+ /* sets otvalid->func1 (otv_JstfPriority_validate) */
static void
otv_JstfScript_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt table_size;
@@ -170,16 +170,16 @@
OTV_SIZE_CHECK( ExtGlyph );
if ( ExtGlyph )
{
- valid->extra1 = valid->glyph_count;
+ otvalid->extra1 = otvalid->glyph_count;
OTV_NEST1( ExtenderGlyph );
- OTV_RUN( table + ExtGlyph, valid );
+ OTV_RUN( table + ExtGlyph, otvalid );
}
OTV_SIZE_CHECK( DefJstfLangSys );
if ( DefJstfLangSys )
{
OTV_NEST2( JstfLangSys, JstfPriority );
- OTV_RUN( table + DefJstfLangSys, valid );
+ OTV_RUN( table + DefJstfLangSys, otvalid );
}
OTV_LIMIT_CHECK( 6 * JstfLangSysCount );
@@ -190,16 +190,16 @@
{
p += 4; /* skip JstfLangSysTag */
- OTV_RUN( table + FT_NEXT_USHORT( p ), valid );
+ OTV_RUN( table + FT_NEXT_USHORT( p ), otvalid );
}
OTV_EXIT;
}
- /* sets valid->extra1 (GSUB lookup count) */
- /* sets valid->extra2 (GPOS lookup count) */
- /* sets valid->glyph_count */
+ /* sets otvalid->extra1 (GSUB lookup count) */
+ /* sets otvalid->extra2 (GPOS lookup count) */
+ /* sets otvalid->glyph_count */
FT_LOCAL_DEF( void )
otv_JSTF_validate( FT_Bytes table,
@@ -208,13 +208,14 @@
FT_UInt glyph_count,
FT_Validator ftvalid )
{
- OTV_ValidatorRec validrec;
- OTV_Validator valid = &validrec;
+ OTV_ValidatorRec otvalidrec;
+ OTV_Validator otvalid = &otvalidrec;
FT_Bytes p = table;
FT_UInt JstfScriptCount;
- valid->root = ftvalid;
+ otvalid->root = ftvalid;
+
FT_TRACE3(( "validating JSTF table\n" ));
OTV_INIT;
@@ -231,16 +232,16 @@
OTV_LIMIT_CHECK( JstfScriptCount * 6 );
if ( gsub )
- valid->extra1 = otv_GSUBGPOS_get_Lookup_count( gsub );
+ otvalid->extra1 = otv_GSUBGPOS_get_Lookup_count( gsub );
else
- valid->extra1 = 0;
+ otvalid->extra1 = 0;
if ( gpos )
- valid->extra2 = otv_GSUBGPOS_get_Lookup_count( gpos );
+ otvalid->extra2 = otv_GSUBGPOS_get_Lookup_count( gpos );
else
- valid->extra2 = 0;
+ otvalid->extra2 = 0;
- valid->glyph_count = glyph_count;
+ otvalid->glyph_count = glyph_count;
/* JstfScriptRecord */
for ( ; JstfScriptCount > 0; JstfScriptCount-- )
@@ -248,7 +249,7 @@
p += 4; /* skip JstfScriptTag */
/* JstfScript */
- otv_JstfScript_validate( table + FT_NEXT_USHORT( p ), valid );
+ otv_JstfScript_validate( table + FT_NEXT_USHORT( p ), otvalid );
}
FT_TRACE4(( "\n" ));
diff --git a/src/otvalid/otvmath.c b/src/otvalid/otvmath.c
index 96f841f..d1791f8 100644
--- a/src/otvalid/otvmath.c
+++ b/src/otvalid/otvmath.c
@@ -44,7 +44,7 @@
static void
otv_MathConstants_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt i;
@@ -66,7 +66,7 @@
OTV_OPTIONAL_OFFSET( DeviceTableOffset );
OTV_SIZE_CHECK( DeviceTableOffset );
if ( DeviceTableOffset )
- otv_Device_validate( table + DeviceTableOffset, valid );
+ otv_Device_validate( table + DeviceTableOffset, otvalid );
}
OTV_EXIT;
@@ -84,7 +84,7 @@
static void
otv_MathItalicsCorrectionInfo_validate( FT_Bytes table,
- OTV_Validator valid,
+ OTV_Validator otvalid,
FT_Int isItalic )
{
FT_Bytes p = table;
@@ -108,7 +108,7 @@
table_size = 4 + 4 * cnt;
OTV_SIZE_CHECK( Coverage );
- otv_Coverage_validate( table + Coverage, valid, cnt );
+ otv_Coverage_validate( table + Coverage, otvalid, cnt );
for ( i = 0; i < cnt; ++i )
{
@@ -116,7 +116,7 @@
OTV_OPTIONAL_OFFSET( DeviceTableOffset );
OTV_SIZE_CHECK( DeviceTableOffset );
if ( DeviceTableOffset )
- otv_Device_validate( table + DeviceTableOffset, valid );
+ otv_Device_validate( table + DeviceTableOffset, otvalid );
}
OTV_EXIT;
@@ -133,7 +133,7 @@
static void
otv_MathKern_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt i, cnt, table_size;
@@ -157,7 +157,7 @@
OTV_OPTIONAL_OFFSET( DeviceTableOffset );
OTV_SIZE_CHECK( DeviceTableOffset );
if ( DeviceTableOffset )
- otv_Device_validate( table + DeviceTableOffset, valid );
+ otv_Device_validate( table + DeviceTableOffset, otvalid );
}
/* One more Kerning value */
@@ -167,7 +167,7 @@
OTV_OPTIONAL_OFFSET( DeviceTableOffset );
OTV_SIZE_CHECK( DeviceTableOffset );
if ( DeviceTableOffset )
- otv_Device_validate( table + DeviceTableOffset, valid );
+ otv_Device_validate( table + DeviceTableOffset, otvalid );
}
OTV_EXIT;
@@ -176,7 +176,7 @@
static void
otv_MathKernInfo_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt i, j, cnt, table_size;
@@ -196,7 +196,7 @@
table_size = 4 + 8 * cnt;
OTV_SIZE_CHECK( Coverage );
- otv_Coverage_validate( table + Coverage, valid, cnt );
+ otv_Coverage_validate( table + Coverage, otvalid, cnt );
for ( i = 0; i < cnt; ++i )
{
@@ -205,7 +205,7 @@
OTV_OPTIONAL_OFFSET( MKRecordOffset );
OTV_SIZE_CHECK( MKRecordOffset );
if ( MKRecordOffset )
- otv_MathKern_validate( table + MKRecordOffset, valid );
+ otv_MathKern_validate( table + MKRecordOffset, otvalid );
}
}
@@ -223,7 +223,7 @@
static void
otv_MathGlyphInfo_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt MathItalicsCorrectionInfo, MathTopAccentAttachment;
@@ -241,22 +241,22 @@
if ( MathItalicsCorrectionInfo )
otv_MathItalicsCorrectionInfo_validate(
- table + MathItalicsCorrectionInfo, valid, TRUE );
+ table + MathItalicsCorrectionInfo, otvalid, TRUE );
/* Italic correction and Top Accent Attachment have the same format */
if ( MathTopAccentAttachment )
otv_MathItalicsCorrectionInfo_validate(
- table + MathTopAccentAttachment, valid, FALSE );
+ table + MathTopAccentAttachment, otvalid, FALSE );
if ( ExtendedShapeCoverage )
{
OTV_NAME_ENTER( "ExtendedShapeCoverage" );
- otv_Coverage_validate( table + ExtendedShapeCoverage, valid, -1 );
+ otv_Coverage_validate( table + ExtendedShapeCoverage, otvalid, -1 );
OTV_EXIT;
}
if ( MathKernInfo )
- otv_MathKernInfo_validate( table + MathKernInfo, valid );
+ otv_MathKernInfo_validate( table + MathKernInfo, otvalid );
OTV_EXIT;
}
@@ -272,7 +272,7 @@
static void
otv_GlyphAssembly_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt pcnt, table_size;
@@ -294,7 +294,7 @@
OTV_SIZE_CHECK( DeviceTableOffset );
if ( DeviceTableOffset )
- otv_Device_validate( table + DeviceTableOffset, valid );
+ otv_Device_validate( table + DeviceTableOffset, otvalid );
for ( i = 0; i < pcnt; ++i )
{
@@ -302,7 +302,7 @@
gid = FT_NEXT_USHORT( p );
- if ( gid >= valid->glyph_count )
+ if ( gid >= otvalid->glyph_count )
FT_INVALID_GLYPH_ID;
p += 2*4; /* skip the Start, End, Full, and Flags fields */
}
@@ -313,7 +313,7 @@
static void
otv_MathGlyphConstruction_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt vcnt, table_size;
@@ -338,14 +338,14 @@
gid = FT_NEXT_USHORT( p );
- if ( gid >= valid->glyph_count )
+ if ( gid >= otvalid->glyph_count )
FT_INVALID_GLYPH_ID;
p += 2; /* skip the size */
}
OTV_SIZE_CHECK( GlyphAssembly );
if ( GlyphAssembly )
- otv_GlyphAssembly_validate( table+GlyphAssembly, valid );
+ otv_GlyphAssembly_validate( table+GlyphAssembly, otvalid );
/* OTV_EXIT; */
}
@@ -353,7 +353,7 @@
static void
otv_MathVariants_validate( FT_Bytes table,
- OTV_Validator valid )
+ OTV_Validator otvalid )
{
FT_Bytes p = table;
FT_UInt vcnt, hcnt, i, table_size;
@@ -378,24 +378,24 @@
OTV_SIZE_CHECK( VCoverage );
if ( VCoverage )
- otv_Coverage_validate( table + VCoverage, valid, vcnt );
+ otv_Coverage_validate( table + VCoverage, otvalid, vcnt );
OTV_SIZE_CHECK( HCoverage );
if ( HCoverage )
- otv_Coverage_validate( table + HCoverage, valid, hcnt );
+ otv_Coverage_validate( table + HCoverage, otvalid, hcnt );
for ( i = 0; i < vcnt; ++i )
{
OTV_OPTIONAL_OFFSET( Offset );
OTV_SIZE_CHECK( Offset );
- otv_MathGlyphConstruction_validate( table + Offset, valid );
+ otv_MathGlyphConstruction_validate( table + Offset, otvalid );
}
for ( i = 0; i < hcnt; ++i )
{
OTV_OPTIONAL_OFFSET( Offset );
OTV_SIZE_CHECK( Offset );
- otv_MathGlyphConstruction_validate( table + Offset, valid );
+ otv_MathGlyphConstruction_validate( table + Offset, otvalid );
}
OTV_EXIT;
@@ -410,20 +410,20 @@
/*************************************************************************/
/*************************************************************************/
- /* sets valid->glyph_count */
+ /* sets otvalid->glyph_count */
FT_LOCAL_DEF( void )
otv_MATH_validate( FT_Bytes table,
FT_UInt glyph_count,
FT_Validator ftvalid )
{
- OTV_ValidatorRec validrec;
- OTV_Validator valid = &validrec;
- FT_Bytes p = table;
+ OTV_ValidatorRec otvalidrec;
+ OTV_Validator otvalid = &otvalidrec;
+ FT_Bytes p = table;
FT_UInt MathConstants, MathGlyphInfo, MathVariants;
- valid->root = ftvalid;
+ otvalid->root = ftvalid;
FT_TRACE3(( "validating MATH table\n" ));
OTV_INIT;
@@ -437,14 +437,14 @@
MathGlyphInfo = FT_NEXT_USHORT( p );
MathVariants = FT_NEXT_USHORT( p );
- valid->glyph_count = glyph_count;
+ otvalid->glyph_count = glyph_count;
otv_MathConstants_validate( table + MathConstants,
- valid );
+ otvalid );
otv_MathGlyphInfo_validate( table + MathGlyphInfo,
- valid );
+ otvalid );
otv_MathVariants_validate ( table + MathVariants,
- valid );
+ otvalid );
FT_TRACE4(( "\n" ));
}
diff --git a/src/otvalid/otvmod.c b/src/otvalid/otvmod.c
index acf213f..37c6e86 100644
--- a/src/otvalid/otvmod.c
+++ b/src/otvalid/otvmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType's OpenType validation module implementation (body). */
/* */
-/* Copyright 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 2004-2008, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -49,8 +49,8 @@
error = FT_Load_Sfnt_Table( face, tag, 0, NULL, table_len );
- if ( error == OTV_Err_Table_Missing )
- return OTV_Err_Ok;
+ if ( FT_ERR_EQ( error, Table_Missing ) )
+ return FT_Err_Ok;
if ( error )
goto Exit;
@@ -73,7 +73,7 @@
FT_Bytes *ot_gsub,
FT_Bytes *ot_jstf )
{
- FT_Error error = OTV_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte* volatile base;
FT_Byte* volatile gdef;
FT_Byte* volatile gpos;
diff --git a/src/pcf/README b/src/pcf/README
index 8858d68..10eff15 100644
--- a/src/pcf/README
+++ b/src/pcf/README
@@ -33,7 +33,7 @@ Encodings
Use `FT_Get_BDF_Charset_ID' to access the encoding and registry.
-The driver always exports `ft_encoding_none' as face->charmap.encoding.
+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.
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index ba54488..96f6912 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -2,7 +2,7 @@
FreeType font driver for pcf files
- Copyright (C) 2000-2004, 2006-2011 by
+ Copyright (C) 2000-2004, 2006-2011, 2013, 2014 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -83,7 +83,7 @@ THE SOFTWARE.
cmap->num_encodings = (FT_UInt)face->nencodings;
cmap->encodings = face->encodings;
- return PCF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -189,7 +189,7 @@ THE SOFTWARE.
}
- FT_CALLBACK_TABLE_DEF
+ static
const FT_CMap_ClassRec pcf_cmap_class =
{
sizeof ( PCF_CMapRec ),
@@ -218,25 +218,24 @@ THE SOFTWARE.
FT_FREE( face->metrics );
/* free properties */
+ if ( face->properties )
{
- PCF_Property prop;
- FT_Int i;
+ FT_Int i;
- if ( face->properties )
+ for ( i = 0; i < face->nprops; i++ )
{
- for ( i = 0; i < face->nprops; i++ )
+ PCF_Property prop = &face->properties[i];
+
+
+ if ( prop )
{
- prop = &face->properties[i];
-
- if ( prop )
- {
- FT_FREE( prop->name );
- if ( prop->isString )
- FT_FREE( prop->value.atom );
- }
+ FT_FREE( prop->name );
+ if ( prop->isString )
+ FT_FREE( prop->value.atom );
}
}
+
FT_FREE( face->properties );
}
@@ -264,11 +263,10 @@ THE SOFTWARE.
FT_Parameter* params )
{
PCF_Face face = (PCF_Face)pcfface;
- FT_Error error = PCF_Err_Ok;
+ FT_Error error;
FT_UNUSED( num_params );
FT_UNUSED( params );
- FT_UNUSED( face_index );
FT_TRACE2(( "PCF driver\n" ));
@@ -289,7 +287,7 @@ THE SOFTWARE.
/* this didn't work, try gzip support! */
error2 = FT_Stream_OpenGzip( &face->comp_stream, stream );
- if ( FT_ERROR_BASE( error2 ) == FT_Err_Unimplemented_Feature )
+ if ( FT_ERR_EQ( error2, Unimplemented_Feature ) )
goto Fail;
error = error2;
@@ -304,7 +302,7 @@ THE SOFTWARE.
/* this didn't work, try LZW support! */
error3 = FT_Stream_OpenLZW( &face->comp_stream, stream );
- if ( FT_ERROR_BASE( error3 ) == FT_Err_Unimplemented_Feature )
+ if ( FT_ERR_EQ( error3, Unimplemented_Feature ) )
goto Fail;
error = error3;
@@ -319,7 +317,7 @@ THE SOFTWARE.
/* this didn't work, try Bzip2 support! */
error4 = FT_Stream_OpenBzip2( &face->comp_stream, stream );
- if ( FT_ERROR_BASE( error4 ) == FT_Err_Unimplemented_Feature )
+ if ( FT_ERR_EQ( error4, Unimplemented_Feature ) )
goto Fail;
error = error4;
@@ -347,6 +345,18 @@ THE SOFTWARE.
#endif
}
+ /* PCF could not have multiple face in single font file.
+ * XXX: non-zero face_index is already invalid argument, but
+ * Type1, Type42 driver has a convention to return
+ * an invalid argument error when the font could be
+ * opened by the specified driver.
+ */
+ if ( face_index > 0 ) {
+ FT_ERROR(( "PCF_Face_Init: invalid face index\n" ));
+ PCF_Face_Done( pcfface );
+ return FT_THROW( Invalid_Argument );
+ }
+
/* set up charmap */
{
FT_String *charset_registry = face->charset_registry;
@@ -406,7 +416,7 @@ THE SOFTWARE.
Fail:
FT_TRACE2(( " not a PCF file\n" ));
PCF_Face_Done( pcfface );
- error = PCF_Err_Unknown_File_Format; /* error */
+ error = FT_THROW( Unknown_File_Format ); /* error */
goto Exit;
}
@@ -424,7 +434,7 @@ THE SOFTWARE.
size->metrics.descender = -accel->fontDescent << 6;
size->metrics.max_advance = accel->maxbounds.characterWidth << 6;
- return PCF_Err_Ok;
+ return FT_Err_Ok;
}
@@ -434,7 +444,7 @@ THE SOFTWARE.
{
PCF_Face face = (PCF_Face)size->face;
FT_Bitmap_Size* bsize = size->face->available_sizes;
- FT_Error error = PCF_Err_Invalid_Pixel_Size;
+ FT_Error error = FT_ERR( Invalid_Pixel_Size );
FT_Long height;
@@ -445,17 +455,17 @@ THE SOFTWARE.
{
case FT_SIZE_REQUEST_TYPE_NOMINAL:
if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) )
- error = PCF_Err_Ok;
+ error = FT_Err_Ok;
break;
case FT_SIZE_REQUEST_TYPE_REAL_DIM:
if ( height == ( face->accel.fontAscent +
face->accel.fontDescent ) )
- error = PCF_Err_Ok;
+ error = FT_Err_Ok;
break;
default:
- error = PCF_Err_Unimplemented_Feature;
+ error = FT_THROW( Unimplemented_Feature );
break;
}
@@ -474,7 +484,7 @@ THE SOFTWARE.
{
PCF_Face face = (PCF_Face)FT_SIZE_FACE( size );
FT_Stream stream;
- FT_Error error = PCF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Bitmap* bitmap = &slot->bitmap;
PCF_Metric metric;
FT_Offset bytes;
@@ -482,11 +492,17 @@ THE SOFTWARE.
FT_UNUSED( load_flags );
- FT_TRACE4(( "load_glyph %d ---", glyph_index ));
+ FT_TRACE1(( "PCF_Glyph_Load: glyph index %d\n", glyph_index ));
- if ( !face || glyph_index >= (FT_UInt)face->root.num_glyphs )
+ if ( !face )
{
- error = PCF_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Face_Handle );
+ goto Exit;
+ }
+
+ if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
+ {
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -526,13 +542,13 @@ THE SOFTWARE.
break;
default:
- return PCF_Err_Invalid_File_Format;
+ return FT_THROW( Invalid_File_Format );
}
/* XXX: to do: are there cases that need repadding the bitmap? */
bytes = bitmap->pitch * bitmap->rows;
- error = ft_glyphslot_alloc_bitmap( slot, bytes );
+ error = ft_glyphslot_alloc_bitmap( slot, (FT_ULong)bytes );
if ( error )
goto Exit;
@@ -576,8 +592,6 @@ THE SOFTWARE.
( face->accel.fontAscent +
face->accel.fontDescent ) << 6 );
- FT_TRACE4(( " --- ok\n" ));
-
Exit:
return error;
}
@@ -622,7 +636,7 @@ THE SOFTWARE.
return 0;
}
- return PCF_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
@@ -699,10 +713,6 @@ THE SOFTWARE.
0, /* FT_Slot_InitFunc */
0, /* FT_Slot_DoneFunc */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- ft_stub_set_char_sizes,
- ft_stub_set_pixel_sizes,
-#endif
PCF_Glyph_Load,
0, /* FT_Face_GetKerningFunc */
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index d9914c0..a29a9e3 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
- Copyright 2000-2010, 2012 by
+ Copyright 2000-2010, 2012-2014 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -78,7 +78,7 @@ THE SOFTWARE.
FT_FRAME_START( 16 ),
FT_FRAME_ULONG_LE( type ),
FT_FRAME_ULONG_LE( format ),
- FT_FRAME_ULONG_LE( size ),
+ FT_FRAME_ULONG_LE( size ), /* rounded up to a multiple of 4 */
FT_FRAME_ULONG_LE( offset ),
FT_FRAME_END
};
@@ -92,21 +92,23 @@ THE SOFTWARE.
PCF_Toc toc = &face->toc;
PCF_Table tables;
- FT_Memory memory = FT_FACE(face)->memory;
+ FT_Memory memory = FT_FACE( face )->memory;
FT_UInt n;
+ FT_ULong size;
- if ( FT_STREAM_SEEK ( 0 ) ||
- FT_STREAM_READ_FIELDS ( pcf_toc_header, toc ) )
- return PCF_Err_Cannot_Open_Resource;
+
+ if ( FT_STREAM_SEEK( 0 ) ||
+ FT_STREAM_READ_FIELDS( pcf_toc_header, toc ) )
+ return FT_THROW( Cannot_Open_Resource );
if ( toc->version != PCF_FILE_VERSION ||
toc->count > FT_ARRAY_MAX( face->toc.tables ) ||
toc->count == 0 )
- return PCF_Err_Invalid_File_Format;
+ return FT_THROW( Invalid_File_Format );
if ( FT_NEW_ARRAY( face->toc.tables, toc->count ) )
- return PCF_Err_Out_Of_Memory;
+ return FT_THROW( Out_Of_Memory );
tables = face->toc.tables;
for ( n = 0; n < toc->count; n++ )
@@ -144,13 +146,62 @@ THE SOFTWARE.
if ( ( tables[i].size > tables[i + 1].offset ) ||
( tables[i].offset > tables[i + 1].offset - tables[i].size ) )
- return PCF_Err_Invalid_Offset;
+ {
+ error = FT_THROW( Invalid_Offset );
+ goto Exit;
+ }
}
if ( !have_change )
break;
}
+ /*
+ * We now check whether the `size' and `offset' values are reasonable:
+ * `offset' + `size' must not exceed the stream size.
+ *
+ * Note, however, that X11's `pcfWriteFont' routine (used by the
+ * `bdftopcf' program to create PDF font files) has two special
+ * features.
+ *
+ * - It always assigns the accelerator table a size of 100 bytes in the
+ * TOC, regardless of its real size, which can vary between 34 and 72
+ * bytes.
+ *
+ * - Due to the way the routine is designed, it ships out the last font
+ * table with its real size, ignoring the TOC's size value. Since
+ * the TOC size values are always rounded up to a multiple of 4, the
+ * difference can be up to three bytes for all tables except the
+ * accelerator table, for which the difference can be as large as 66
+ * bytes.
+ *
+ */
+
+ tables = face->toc.tables;
+ size = stream->size;
+
+ for ( n = 0; n < toc->count - 1; n++ )
+ {
+ /* we need two checks to avoid overflow */
+ if ( ( tables->size > size ) ||
+ ( tables->offset > size - tables->size ) )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+ tables++;
+ }
+
+ /* only check `tables->offset' for last table element ... */
+ if ( ( tables->offset > size ) )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+ /* ... and adjust `tables->size' to the real value if necessary */
+ if ( tables->size > size - tables->offset )
+ tables->size = size - tables->offset;
+
#ifdef FT_DEBUG_LEVEL_TRACE
{
@@ -181,7 +232,7 @@ THE SOFTWARE.
#endif
- return PCF_Err_Ok;
+ return FT_Err_Ok;
Exit:
FT_FREE( face->toc.tables );
@@ -248,7 +299,7 @@ THE SOFTWARE.
FT_ULong format,
PCF_Metric metric )
{
- FT_Error error = PCF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
@@ -294,7 +345,7 @@ THE SOFTWARE.
FT_ULong *aformat,
FT_ULong *asize )
{
- FT_Error error = PCF_Err_Invalid_File_Format;
+ FT_Error error = FT_ERR( Invalid_File_Format );
FT_ULong i;
@@ -303,20 +354,20 @@ THE SOFTWARE.
{
if ( stream->pos > tables[i].offset )
{
- error = PCF_Err_Invalid_Stream_Skip;
+ error = FT_THROW( Invalid_Stream_Skip );
goto Fail;
}
if ( FT_STREAM_SKIP( tables[i].offset - stream->pos ) )
{
- error = PCF_Err_Invalid_Stream_Skip;
+ error = FT_THROW( Invalid_Stream_Skip );
goto Fail;
}
*asize = tables[i].size;
*aformat = tables[i].format;
- return PCF_Err_Ok;
+ return FT_Err_Ok;
}
Fail:
@@ -402,7 +453,7 @@ THE SOFTWARE.
FT_ULong nprops, i;
FT_ULong format, size;
FT_Error error;
- FT_Memory memory = FT_FACE(face)->memory;
+ FT_Memory memory = FT_FACE( face )->memory;
FT_ULong string_size;
FT_String* strings = 0;
@@ -441,7 +492,7 @@ THE SOFTWARE.
/* rough estimate */
if ( nprops > size / PCF_PROPERTY_SIZE )
{
- error = PCF_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Bail;
}
@@ -474,7 +525,7 @@ THE SOFTWARE.
i = 4 - ( nprops & 3 );
if ( FT_STREAM_SKIP( i ) )
{
- error = PCF_Err_Invalid_Stream_Skip;
+ error = FT_THROW( Invalid_Stream_Skip );
goto Bail;
}
}
@@ -491,7 +542,7 @@ THE SOFTWARE.
/* rough estimate */
if ( string_size > size - nprops * PCF_PROPERTY_SIZE )
{
- error = PCF_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Bail;
}
@@ -516,7 +567,7 @@ THE SOFTWARE.
if ( ( name_offset < 0 ) ||
( (FT_ULong)name_offset > string_size ) )
{
- error = PCF_Err_Invalid_Offset;
+ error = FT_THROW( Invalid_Offset );
goto Bail;
}
@@ -535,7 +586,7 @@ THE SOFTWARE.
if ( ( value_offset < 0 ) ||
( (FT_ULong)value_offset > string_size ) )
{
- error = PCF_Err_Invalid_Offset;
+ error = FT_THROW( Invalid_Offset );
goto Bail;
}
@@ -552,7 +603,7 @@ THE SOFTWARE.
}
}
- error = PCF_Err_Ok;
+ error = FT_Err_Ok;
Bail:
FT_FREE( props );
@@ -566,10 +617,10 @@ THE SOFTWARE.
pcf_get_metrics( FT_Stream stream,
PCF_Face face )
{
- FT_Error error = PCF_Err_Ok;
- FT_Memory memory = FT_FACE(face)->memory;
+ FT_Error error;
+ FT_Memory memory = FT_FACE( face )->memory;
FT_ULong format, size;
- PCF_Metric metrics = 0;
+ PCF_Metric metrics = 0;
FT_ULong nmetrics, i;
@@ -587,7 +638,7 @@ THE SOFTWARE.
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) &&
!PCF_FORMAT_MATCH( format, PCF_COMPRESSED_METRICS ) )
- return PCF_Err_Invalid_File_Format;
+ return FT_THROW( Invalid_File_Format );
if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
{
@@ -604,12 +655,12 @@ THE SOFTWARE.
(void)FT_READ_USHORT_LE( nmetrics );
}
if ( error )
- return PCF_Err_Invalid_File_Format;
+ return FT_THROW( Invalid_File_Format );
face->nmetrics = nmetrics;
if ( !nmetrics )
- return PCF_Err_Invalid_Table;
+ return FT_THROW( Invalid_Table );
FT_TRACE4(( "pcf_get_metrics:\n" ));
@@ -619,36 +670,52 @@ THE SOFTWARE.
if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
{
if ( nmetrics > size / PCF_METRIC_SIZE )
- return PCF_Err_Invalid_Table;
+ return FT_THROW( Invalid_Table );
}
else
{
if ( nmetrics > size / PCF_COMPRESSED_METRIC_SIZE )
- return PCF_Err_Invalid_Table;
+ return FT_THROW( Invalid_Table );
}
if ( FT_NEW_ARRAY( face->metrics, nmetrics ) )
- return PCF_Err_Out_Of_Memory;
+ return FT_THROW( Out_Of_Memory );
metrics = face->metrics;
- for ( i = 0; i < nmetrics; i++ )
+ for ( i = 0; i < nmetrics; i++, metrics++ )
{
- error = pcf_get_metric( stream, format, metrics + i );
+ error = pcf_get_metric( stream, format, metrics );
- metrics[i].bits = 0;
+ metrics->bits = 0;
FT_TRACE5(( " idx %d: width=%d, "
"lsb=%d, rsb=%d, ascent=%d, descent=%d, swidth=%d\n",
i,
- ( metrics + i )->characterWidth,
- ( metrics + i )->leftSideBearing,
- ( metrics + i )->rightSideBearing,
- ( metrics + i )->ascent,
- ( metrics + i )->descent,
- ( metrics + i )->attributes ));
+ metrics->characterWidth,
+ metrics->leftSideBearing,
+ metrics->rightSideBearing,
+ metrics->ascent,
+ metrics->descent,
+ metrics->attributes ));
if ( error )
break;
+
+ /* sanity checks -- those values are used in `PCF_Glyph_Load' to */
+ /* compute a glyph's bitmap dimensions, thus setting them to zero in */
+ /* case of an error disables this particular glyph only */
+ if ( metrics->rightSideBearing < metrics->leftSideBearing ||
+ metrics->ascent + metrics->descent < 0 )
+ {
+ metrics->characterWidth = 0;
+ metrics->leftSideBearing = 0;
+ metrics->rightSideBearing = 0;
+ metrics->ascent = 0;
+ metrics->descent = 0;
+
+ FT_TRACE0(( "pcf_get_metrics:"
+ " invalid metrics for glyph %d\n", i ));
+ }
}
if ( error )
@@ -663,8 +730,8 @@ 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_Error error;
+ FT_Memory memory = FT_FACE( face )->memory;
FT_Long* offsets = NULL;
FT_Long bitmapSizes[GLYPHPADOPTIONS];
FT_ULong format, size;
@@ -693,15 +760,15 @@ THE SOFTWARE.
FT_Stream_ExitFrame( stream );
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
- return PCF_Err_Invalid_File_Format;
+ return FT_THROW( Invalid_File_Format );
FT_TRACE4(( "pcf_get_bitmaps:\n" ));
FT_TRACE4(( " number of bitmaps: %d\n", nbitmaps ));
- /* XXX: PCF_Face->nmetrics is singed FT_Long, see pcf.h */
- if ( face->nmetrics < 0 || nbitmaps != ( FT_ULong )face->nmetrics )
- return PCF_Err_Invalid_File_Format;
+ /* XXX: PCF_Face->nmetrics is signed FT_Long, see pcf.h */
+ if ( face->nmetrics < 0 || nbitmaps != (FT_ULong)face->nmetrics )
+ return FT_THROW( Invalid_File_Format );
if ( FT_NEW_ARRAY( offsets, nbitmaps ) )
return error;
@@ -765,14 +832,14 @@ THE SOFTWARE.
pcf_get_encodings( FT_Stream stream,
PCF_Face face )
{
- FT_Error error = PCF_Err_Ok;
- FT_Memory memory = FT_FACE(face)->memory;
+ FT_Error error;
+ FT_Memory memory = FT_FACE( face )->memory;
FT_ULong format, size;
int firstCol, lastCol;
int firstRow, lastRow;
int nencoding, encodingOffset;
- int i, j;
- PCF_Encoding tmpEncoding = NULL, encoding = 0;
+ int i, j, k;
+ PCF_Encoding encoding = NULL;
error = pcf_seek_to_table_type( stream,
@@ -810,7 +877,16 @@ THE SOFTWARE.
FT_Stream_ExitFrame( stream );
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
- return PCF_Err_Invalid_File_Format;
+ return FT_THROW( Invalid_File_Format );
+
+ /* sanity checks */
+ if ( firstCol < 0 ||
+ firstCol > lastCol ||
+ lastCol > 0xFF ||
+ firstRow < 0 ||
+ firstRow > lastRow ||
+ lastRow > 0xFF )
+ return FT_THROW( Invalid_Table );
FT_TRACE4(( "pdf_get_encodings:\n" ));
@@ -819,56 +895,47 @@ THE SOFTWARE.
nencoding = ( lastCol - firstCol + 1 ) * ( lastRow - firstRow + 1 );
- if ( FT_NEW_ARRAY( tmpEncoding, nencoding ) )
- return PCF_Err_Out_Of_Memory;
+ if ( FT_NEW_ARRAY( encoding, nencoding ) )
+ return FT_THROW( Out_Of_Memory );
error = FT_Stream_EnterFrame( stream, 2 * nencoding );
if ( error )
goto Bail;
- for ( i = 0, j = 0 ; i < nencoding; i++ )
+ k = 0;
+ for ( i = firstRow; i <= lastRow; i++ )
{
- if ( PCF_BYTE_ORDER( format ) == MSBFirst )
- encodingOffset = FT_GET_SHORT();
- else
- encodingOffset = FT_GET_SHORT_LE();
-
- if ( encodingOffset != -1 )
+ for ( j = firstCol; j <= lastCol; j++ )
{
- tmpEncoding[j].enc = ( ( ( i / ( lastCol - firstCol + 1 ) ) +
- firstRow ) * 256 ) +
- ( ( i % ( lastCol - firstCol + 1 ) ) +
- firstCol );
+ if ( PCF_BYTE_ORDER( format ) == MSBFirst )
+ encodingOffset = FT_GET_SHORT();
+ else
+ encodingOffset = FT_GET_SHORT_LE();
- tmpEncoding[j].glyph = (FT_Short)encodingOffset;
+ if ( encodingOffset != -1 )
+ {
+ encoding[k].enc = i * 256 + j;
+ encoding[k].glyph = (FT_Short)encodingOffset;
- FT_TRACE5(( " code %d (0x%04X): idx %d\n",
- tmpEncoding[j].enc, tmpEncoding[j].enc,
- tmpEncoding[j].glyph ));
+ FT_TRACE5(( " code %d (0x%04X): idx %d\n",
+ encoding[k].enc, encoding[k].enc, encoding[k].glyph ));
- j++;
+ k++;
+ }
}
}
FT_Stream_ExitFrame( stream );
- if ( FT_NEW_ARRAY( encoding, j ) )
+ if ( FT_RENEW_ARRAY( encoding, nencoding, k ) )
goto Bail;
- for ( i = 0; i < j; i++ )
- {
- encoding[i].enc = tmpEncoding[i].enc;
- encoding[i].glyph = tmpEncoding[i].glyph;
- }
-
- face->nencodings = j;
+ face->nencodings = k;
face->encodings = encoding;
- FT_FREE( tmpEncoding );
return error;
Bail:
FT_FREE( encoding );
- FT_FREE( tmpEncoding );
return error;
}
@@ -923,7 +990,7 @@ THE SOFTWARE.
FT_ULong type )
{
FT_ULong format, size;
- FT_Error error = PCF_Err_Ok;
+ FT_Error error;
PCF_Accel accel = &face->accel;
@@ -994,7 +1061,7 @@ THE SOFTWARE.
static FT_Error
pcf_interpret_style( PCF_Face pcf )
{
- FT_Error error = PCF_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Face face = FT_FACE( pcf );
FT_Memory memory = face->memory;
@@ -1023,20 +1090,20 @@ THE SOFTWARE.
( *(prop->value.atom) == 'B' || *(prop->value.atom) == 'b' ) )
{
face->style_flags |= FT_STYLE_FLAG_BOLD;
- strings[1] = (char *)"Bold";
+ strings[1] = (char*)"Bold";
}
prop = pcf_find_property( pcf, "SETWIDTH_NAME" );
if ( prop && prop->isString &&
*(prop->value.atom) &&
!( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
- strings[3] = (char *)(prop->value.atom);
+ strings[3] = (char*)( prop->value.atom );
prop = pcf_find_property( pcf, "ADD_STYLE_NAME" );
if ( prop && prop->isString &&
*(prop->value.atom) &&
!( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
- strings[0] = (char *)(prop->value.atom);
+ strings[0] = (char*)( prop->value.atom );
for ( len = 0, nn = 0; nn < 4; nn++ )
{
@@ -1050,7 +1117,7 @@ THE SOFTWARE.
if ( len == 0 )
{
- strings[0] = (char *)"Regular";
+ strings[0] = (char*)"Regular";
lengths[0] = ft_strlen( strings[0] );
len = lengths[0] + 1;
}
@@ -1088,7 +1155,7 @@ THE SOFTWARE.
for ( mm = 0; mm < len; mm++ )
- if (s[mm] == ' ')
+ if ( s[mm] == ' ' )
s[mm] = '-';
}
@@ -1105,8 +1172,8 @@ THE SOFTWARE.
pcf_load_font( FT_Stream stream,
PCF_Face face )
{
- FT_Error error = PCF_Err_Ok;
- FT_Memory memory = FT_FACE(face)->memory;
+ FT_Error error;
+ FT_Memory memory = FT_FACE( face )->memory;
FT_Bool hasBDFAccelerators;
@@ -1162,9 +1229,10 @@ THE SOFTWARE.
root->num_faces = 1;
root->face_index = 0;
- root->face_flags = FT_FACE_FLAG_FIXED_SIZES |
- FT_FACE_FLAG_HORIZONTAL |
- FT_FACE_FLAG_FAST_GLYPHS;
+
+ root->face_flags |= FT_FACE_FLAG_FIXED_SIZES |
+ FT_FACE_FLAG_HORIZONTAL |
+ FT_FACE_FLAG_FAST_GLYPHS;
if ( face->accel.constantWidth )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
@@ -1268,7 +1336,7 @@ THE SOFTWARE.
{
/* This is done to respect the behaviour of the original */
/* PCF font driver. */
- error = PCF_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
}
return error;
diff --git a/src/pcf/pcfutil.c b/src/pcf/pcfutil.c
index b91274f..0451ee8 100644
--- a/src/pcf/pcfutil.c
+++ b/src/pcf/pcfutil.c
@@ -66,11 +66,11 @@ in this Software without prior written authorization from The Open Group.
TwoByteSwap( unsigned char* buf,
size_t nbytes )
{
- unsigned char c;
-
-
for ( ; nbytes >= 2; nbytes -= 2, buf += 2 )
{
+ unsigned char c;
+
+
c = buf[0];
buf[0] = buf[1];
buf[1] = c;
@@ -85,11 +85,11 @@ in this Software without prior written authorization from The Open Group.
FourByteSwap( unsigned char* buf,
size_t nbytes )
{
- unsigned char c;
-
-
for ( ; nbytes >= 4; nbytes -= 4, buf += 4 )
{
+ unsigned char c;
+
+
c = buf[0];
buf[0] = buf[3];
buf[3] = c;
diff --git a/src/pfr/pfrcmap.c b/src/pfr/pfrcmap.c
index 9c8f9ed..90ba010 100644
--- a/src/pfr/pfrcmap.c
+++ b/src/pfr/pfrcmap.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR cmap handling (body). */
/* */
-/* Copyright 2002, 2007, 2009 by */
+/* Copyright 2002, 2007, 2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,6 +16,8 @@
/***************************************************************************/
+#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
#include "pfrcmap.h"
#include "pfrobjs.h"
@@ -23,11 +25,14 @@
FT_CALLBACK_DEF( FT_Error )
- pfr_cmap_init( PFR_CMap cmap )
+ pfr_cmap_init( PFR_CMap cmap,
+ FT_Pointer pointer )
{
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PFR_Face face = (PFR_Face)FT_CMAP_FACE( cmap );
+ FT_UNUSED( pointer );
+
cmap->num_chars = face->phy_font.num_chars;
cmap->chars = face->phy_font.chars;
@@ -42,7 +47,7 @@
{
if ( cmap->chars[n - 1].char_code >= cmap->chars[n].char_code )
{
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
}
@@ -65,14 +70,16 @@
pfr_cmap_char_index( PFR_CMap cmap,
FT_UInt32 char_code )
{
- FT_UInt min = 0;
- FT_UInt max = cmap->num_chars;
- FT_UInt mid;
- PFR_Char gchar;
+ FT_UInt min = 0;
+ FT_UInt max = cmap->num_chars;
while ( min < max )
{
+ PFR_Char gchar;
+ FT_UInt mid;
+
+
mid = min + ( max - min ) / 2;
gchar = cmap->chars + mid;
diff --git a/src/pfr/pfrdrivr.c b/src/pfr/pfrdrivr.c
index c59d8ae..db66281 100644
--- a/src/pfr/pfrdrivr.c
+++ b/src/pfr/pfrdrivr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR driver interface (body). */
/* */
-/* Copyright 2002-2004, 2006, 2008, 2010, 2011 by */
+/* Copyright 2002-2004, 2006, 2008, 2010, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -37,7 +37,7 @@
PFR_PhyFont phys = &face->phy_font;
- pfr_face_get_kerning( pfrface, left, right, avector );
+ (void)pfr_face_get_kerning( pfrface, left, right, avector );
/* convert from metrics to outline units when necessary */
if ( phys->outline_resolution != phys->metrics_resolution )
@@ -51,7 +51,7 @@
phys->metrics_resolution );
}
- return PFR_Err_Ok;
+ return FT_Err_Ok;
}
@@ -66,7 +66,7 @@
FT_Pos *anadvance )
{
PFR_Face face = (PFR_Face)pfrface;
- FT_Error error = PFR_Err_Invalid_Argument;
+ FT_Error error = FT_ERR( Invalid_Argument );
*anadvance = 0;
@@ -84,7 +84,7 @@
if ( gindex < phys->num_chars )
{
*anadvance = phys->chars[gindex].advance;
- error = PFR_Err_Ok;
+ error = FT_Err_Ok;
}
}
@@ -130,11 +130,11 @@
if ( ametrics_y_scale )
*ametrics_y_scale = y_scale;
- return PFR_Err_Ok;
+ return FT_Err_Ok;
}
- FT_CALLBACK_TABLE_DEF
+ static
const FT_Service_PfrMetricsRec pfr_metrics_service_rec =
{
pfr_get_metrics,
@@ -197,10 +197,6 @@
pfr_slot_init,
pfr_slot_done,
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- ft_stub_set_char_sizes,
- ft_stub_set_pixel_sizes,
-#endif
pfr_slot_load,
pfr_get_kerning,
diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c
index 6f65b01..2ce0937 100644
--- a/src/pfr/pfrgload.c
+++ b/src/pfr/pfrgload.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR glyph loader (body). */
/* */
-/* Copyright 2002, 2003, 2005, 2007, 2010 by */
+/* Copyright 2002, 2003, 2005, 2007, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -135,7 +135,7 @@
/* check that we have begun a new path */
if ( !glyph->path_begun )
{
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
FT_ERROR(( "pfr_glyph_line_to: invalid glyph data\n" ));
goto Exit;
}
@@ -171,7 +171,7 @@
/* check that we have begun a new path */
if ( !glyph->path_begun )
{
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
FT_ERROR(( "pfr_glyph_line_to: invalid glyph data\n" ));
goto Exit;
}
@@ -248,7 +248,7 @@
FT_Byte* p,
FT_Byte* limit )
{
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Memory memory = glyph->loader->memory;
FT_UInt flags, x_count, y_count, i, count, mask;
FT_Int x;
@@ -546,7 +546,7 @@
Failure:
Too_Short:
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
FT_ERROR(( "pfr_glyph_load_simple: invalid glyph data\n" ));
goto Exit;
}
@@ -558,7 +558,7 @@
FT_Byte* p,
FT_Byte* limit )
{
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_GlyphLoader loader = glyph->loader;
FT_Memory memory = loader->memory;
PFR_SubGlyph subglyph;
@@ -602,7 +602,7 @@
/* to avoid endless recursion */
if ( new_max > 64 )
{
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
FT_ERROR(( "pfr_glyph_load_compound:"
" too many compound glyphs components\n" ));
goto Exit;
@@ -709,7 +709,7 @@
Failure:
Too_Short:
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
FT_ERROR(( "pfr_glyph_load_compound: invalid glyph data\n" ));
goto Exit;
}
@@ -763,7 +763,7 @@
PFR_SubGlyph subglyph;
- FT_TRACE4(( "subglyph %d:\n", n ));
+ FT_TRACE4(( " subglyph %d:\n", n ));
subglyph = glyph->subs + old_count + n;
old_points = base->n_points;
diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c
index 325322e..f68d016 100644
--- a/src/pfr/pfrload.c
+++ b/src/pfr/pfrload.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR loader (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2007, 2009, 2010 by */
+/* Copyright 2002-2005, 2007, 2009, 2010, 2013, 2014 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 = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte* p = *pp;
FT_UInt num_items, item_type, item_size;
@@ -91,7 +91,7 @@
Too_Short:
FT_ERROR(( "pfr_extra_items_parse: invalid extra items table\n" ));
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
@@ -179,7 +179,7 @@
if ( header->signature != 0x50465230L || /* "PFR0" */
header->version > 4 ||
header->header_size < 58 ||
- header->signature2 != 0x0d0a ) /* CR/LF */
+ header->signature2 != 0x0D0A ) /* CR/LF */
{
result = 0;
}
@@ -236,7 +236,7 @@
goto Exit;
if ( idx >= num_log_fonts )
- return PFR_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( FT_STREAM_SKIP( idx * 5 ) ||
FT_READ_USHORT( size ) ||
@@ -329,7 +329,7 @@
Too_Short:
FT_ERROR(( "pfr_log_font_load: invalid logical font table\n" ));
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Fail;
}
@@ -353,7 +353,7 @@
PFR_Strike strike;
FT_UInt flags0;
FT_UInt n, count, size1;
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PFR_CHECK( 5 );
@@ -427,7 +427,7 @@
return error;
Too_Short:
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
FT_ERROR(( "pfr_extra_item_load_bitmap_info:"
" invalid bitmap info table\n" ));
goto Exit;
@@ -449,7 +449,7 @@
FT_Byte* limit,
PFR_PhyFont phy_font )
{
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Memory memory = phy_font->memory;
FT_PtrDist len = limit - p;
@@ -477,7 +477,7 @@
{
FT_UInt count, num_vert, num_horz;
FT_Int* snaps = NULL;
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Memory memory = phy_font->memory;
@@ -506,7 +506,7 @@
return error;
Too_Short:
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
FT_ERROR(( "pfr_exta_item_load_stem_snaps:"
" invalid stem snaps table\n" ));
goto Exit;
@@ -521,7 +521,7 @@
PFR_PhyFont phy_font )
{
PFR_KernItem item = NULL;
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Memory memory = phy_font->memory;
@@ -604,7 +604,7 @@
Too_Short:
FT_FREE( item );
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
FT_ERROR(( "pfr_extra_item_load_kerning_pairs:"
" invalid kerning pairs table\n" ));
goto Exit;
@@ -631,7 +631,7 @@
FT_Memory memory,
FT_String* *astring )
{
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_String* result = NULL;
FT_UInt n, ok;
@@ -813,7 +813,6 @@
phy_font->ascent = PFR_NEXT_SHORT( q );
phy_font->descent = PFR_NEXT_SHORT( q );
phy_font->leading = PFR_NEXT_SHORT( q );
- q += 16;
break;
case 3:
@@ -932,7 +931,7 @@
return error;
Too_Short:
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
FT_ERROR(( "pfr_phy_font_load: invalid physical font table\n" ));
goto Fail;
}
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index c65cf29..0c89242 100644
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR object methods (body). */
/* */
-/* Copyright 2002-2008, 2010-2011 by */
+/* Copyright 2002-2008, 2010-2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,6 +23,7 @@
#include "pfrsbit.h"
#include FT_OUTLINE_H
#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_CALC_H
#include FT_TRUETYPE_IDS_H
#include "pfrerror.h"
@@ -87,7 +88,7 @@
if ( !pfr_header_check( &face->header ) )
{
FT_TRACE2(( " not a PFR font\n" ));
- error = PFR_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -111,7 +112,7 @@
if ( face_index >= pfrface->num_faces )
{
FT_ERROR(( "pfr_face_init: invalid face index\n" ));
- error = PFR_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -137,7 +138,8 @@
pfrface->face_index = face_index;
pfrface->num_glyphs = phy_font->num_chars + 1;
- pfrface->face_flags = FT_FACE_FLAG_SCALABLE;
+
+ pfrface->face_flags |= FT_FACE_FLAG_SCALABLE;
/* if all characters point to the same gps_offset 0, we */
/* assume that the font only contains bitmaps */
@@ -156,7 +158,7 @@
else
{
FT_ERROR(( "pfr_face_init: font doesn't contain glyphs\n" ));
- error = PFR_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
}
@@ -324,12 +326,14 @@
FT_ULong gps_offset;
+ FT_TRACE1(( "pfr_slot_load: glyph index %d\n", gindex ));
+
if ( gindex > 0 )
gindex--;
if ( !face || gindex >= face->phy_font.num_chars )
{
- error = PFR_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -343,7 +347,7 @@
if ( load_flags & FT_LOAD_SBITS_ONLY )
{
- error = PFR_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -468,7 +472,7 @@
FT_Vector* kerning )
{
PFR_Face face = (PFR_Face)pfrface;
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PFR_PhyFont phy_font = &face->phy_font;
FT_UInt32 code1, code2, pair;
@@ -512,7 +516,7 @@
{
FT_UInt count = item->pair_count;
FT_UInt size = item->pair_size;
- FT_UInt power = (FT_UInt)ft_highpow2( (FT_UInt32)count );
+ FT_UInt power = 1 << FT_MSB( count );
FT_UInt probe = power * size;
FT_UInt extra = count - power;
FT_Byte* base = stream->cursor;
diff --git a/src/pfr/pfrsbit.c b/src/pfr/pfrsbit.c
index 52bc2c8..979bf78 100644
--- a/src/pfr/pfrsbit.c
+++ b/src/pfr/pfrsbit.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR bitmap loader (body). */
/* */
-/* Copyright 2002, 2003, 2006, 2009, 2010 by */
+/* Copyright 2002, 2003, 2006, 2009, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -59,7 +59,7 @@
if ( !decreasing )
{
- writer->line += writer->pitch * ( target->rows-1 );
+ writer->line += writer->pitch * ( target->rows - 1 );
writer->pitch = -writer->pitch;
}
}
@@ -353,7 +353,7 @@
FT_Long *aadvance,
FT_UInt *aformat )
{
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte flags;
FT_Char b;
FT_Byte* p = *pdata;
@@ -471,7 +471,7 @@
return error;
Too_Short:
- error = PFR_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
FT_ERROR(( "pfr_load_bitmap_metrics: invalid glyph data\n" ));
goto Exit;
}
@@ -484,7 +484,7 @@
FT_Bool decreasing,
FT_Bitmap* target )
{
- FT_Error error = PFR_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PFR_BitWriterRec writer;
@@ -508,7 +508,7 @@
default:
FT_ERROR(( "pfr_read_bitmap_data: invalid image type\n" ));
- error = PFR_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
}
}
@@ -560,7 +560,7 @@
}
/* couldn't find it */
- return PFR_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
Found_Strike:
@@ -593,7 +593,7 @@
if ( gps_size == 0 )
{
/* Could not find a bitmap program string for this glyph */
- error = PFR_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
}
@@ -636,12 +636,14 @@
* which causes a size truncation, because truncated
* size properties makes bitmap glyph broken.
*/
- if ( xpos > FT_INT_MAX || ( ypos + ysize ) > FT_INT_MAX )
+ if ( xpos > FT_INT_MAX || xpos < FT_INT_MIN ||
+ ysize > FT_INT_MAX || ypos + ysize > FT_INT_MAX ||
+ ypos + (FT_Long)ysize < FT_INT_MIN )
{
FT_TRACE1(( "pfr_slot_load_bitmap:" ));
FT_TRACE1(( "huge bitmap glyph %dx%d over FT_GlyphSlot\n",
xpos, ypos ));
- error = PFR_Err_Invalid_Pixel_Size;
+ error = FT_THROW( Invalid_Pixel_Size );
}
if ( !error )
diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c
index 5f3f9e6..6a40e11 100644
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -4,7 +4,7 @@
/* */
/* AFM parser (body). */
/* */
-/* Copyright 2006-2010, 2012 by */
+/* Copyright 2006-2010, 2012, 2013 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_FREETYPE_H
+#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
#include "afmparse.h"
@@ -119,7 +120,6 @@
afm_stream_read_one( AFM_Stream stream )
{
char* str;
- int ch;
afm_stream_skip_spaces( stream );
@@ -130,7 +130,9 @@
while ( 1 )
{
- ch = AFM_GETC();
+ int ch = AFM_GETC();
+
+
if ( AFM_IS_SPACE( ch ) )
break;
else if ( AFM_IS_NEWLINE( ch ) )
@@ -159,7 +161,6 @@
afm_stream_read_string( AFM_Stream stream )
{
char* str;
- int ch;
afm_stream_skip_spaces( stream );
@@ -171,7 +172,9 @@
/* scan to eol */
while ( 1 )
{
- ch = AFM_GETC();
+ int ch = AFM_GETC();
+
+
if ( AFM_IS_NEWLINE( ch ) )
{
stream->status = AFM_STREAM_STATUS_EOL;
@@ -545,7 +548,7 @@
parser->FontInfo = NULL;
parser->get_index = NULL;
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
}
@@ -572,10 +575,10 @@
{
*aint = val.u.i;
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
}
else
- return PSaux_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
}
@@ -637,7 +640,7 @@
case AFM_TOKEN_ENDKERNDATA:
case AFM_TOKEN_ENDFONTMETRICS:
fi->NumTrackKern = n + 1;
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
case AFM_TOKEN_UNKNOWN:
break;
@@ -648,7 +651,7 @@
}
Fail:
- return PSaux_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
}
@@ -753,7 +756,7 @@
ft_qsort( fi->KernPairs, fi->NumKernPair,
sizeof ( AFM_KernPairRec ),
afm_compare_kern_pairs );
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
case AFM_TOKEN_UNKNOWN:
break;
@@ -764,7 +767,7 @@
}
Fail:
- return PSaux_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
}
@@ -795,7 +798,7 @@
case AFM_TOKEN_ENDKERNDATA:
case AFM_TOKEN_ENDFONTMETRICS:
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
case AFM_TOKEN_UNKNOWN:
break;
@@ -806,7 +809,7 @@
}
Fail:
- return PSaux_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
}
@@ -832,11 +835,11 @@
if ( token == end_section || token == AFM_TOKEN_ENDFONTMETRICS )
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
}
Fail:
- return PSaux_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
}
@@ -845,19 +848,19 @@
{
FT_Memory memory = parser->memory;
AFM_FontInfo fi = parser->FontInfo;
- FT_Error error = PSaux_Err_Syntax_Error;
+ FT_Error error = FT_ERR( Syntax_Error );
char* key;
FT_Offset len;
FT_Int metrics_sets = 0;
if ( !fi )
- return PSaux_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
key = afm_parser_next_key( parser, 1, &len );
if ( !key || len != 16 ||
ft_strncmp( key, "StartFontMetrics", 16 ) != 0 )
- return PSaux_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
while ( ( key = afm_parser_next_key( parser, 1, &len ) ) != 0 )
{
@@ -872,7 +875,7 @@
if ( metrics_sets != 0 && metrics_sets != 2 )
{
- error = PSaux_Err_Unimplemented_Feature;
+ error = FT_THROW( Unimplemented_Feature );
goto Fail;
}
@@ -938,7 +941,7 @@
/* fall through since we only support kern data */
case AFM_TOKEN_ENDFONTMETRICS:
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
default:
break;
diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c
index 9ea7fb9..22e8cf2 100644
--- a/src/psaux/psconv.c
+++ b/src/psaux/psconv.c
@@ -4,7 +4,7 @@
/* */
/* Some convenience conversions (body). */
/* */
-/* Copyright 2006, 2008, 2009, 2012 by */
+/* Copyright 2006, 2008, 2009, 2012-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,11 +18,22 @@
#include <ft2build.h>
#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include FT_INTERNAL_DEBUG_H
#include "psconv.h"
#include "psauxerr.h"
+ /*************************************************************************/
+ /* */
+ /* 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_psconv
+
+
/* The following array is used by various functions to quickly convert */
/* digits (both decimal and non-decimal) into numbers. */
@@ -69,18 +80,29 @@
#endif /* 'A' == 193 */
- FT_LOCAL_DEF( FT_Int )
+ FT_LOCAL_DEF( FT_Long )
PS_Conv_Strtol( FT_Byte** cursor,
FT_Byte* limit,
- FT_Int base )
+ FT_Long base )
{
FT_Byte* p = *cursor;
- FT_Int num = 0;
- FT_Bool sign = 0;
+ FT_Long num = 0;
+ FT_Bool sign = 0;
+ FT_Bool have_overflow = 0;
+
+ FT_Long num_limit;
+ FT_Char c_limit;
+
+
+ if ( p >= limit )
+ goto Bad;
- if ( p >= limit || base < 2 || base > 36 )
+ if ( base < 2 || base > 36 )
+ {
+ FT_TRACE4(( "!!!INVALID BASE:!!!" ));
return 0;
+ }
if ( *p == '-' || *p == '+' )
{
@@ -88,9 +110,12 @@
p++;
if ( p == limit )
- return 0;
+ goto Bad;
}
+ num_limit = 0x7FFFFFFFL / base;
+ c_limit = (FT_Char)( 0x7FFFFFFFL % base );
+
for ( ; p < limit; p++ )
{
FT_Char c;
@@ -99,59 +124,89 @@
if ( IS_PS_SPACE( *p ) || *p OP 0x80 )
break;
- c = ft_char_table[*p & 0x7f];
+ c = ft_char_table[*p & 0x7F];
if ( c < 0 || c >= base )
break;
- num = num * base + c;
+ if ( num > num_limit || ( num == num_limit && c > c_limit ) )
+ have_overflow = 1;
+ else
+ num = num * base + c;
+ }
+
+ *cursor = p;
+
+ if ( have_overflow )
+ {
+ num = 0x7FFFFFFFL;
+ FT_TRACE4(( "!!!OVERFLOW:!!!" ));
}
if ( sign )
num = -num;
- *cursor = p;
-
return num;
+
+ Bad:
+ FT_TRACE4(( "!!!END OF DATA:!!!" ));
+ return 0;
}
- FT_LOCAL_DEF( FT_Int )
+ FT_LOCAL_DEF( FT_Long )
PS_Conv_ToInt( FT_Byte** cursor,
FT_Byte* limit )
{
- FT_Byte* p;
- FT_Int num;
+ FT_Byte* p = *cursor;
+ FT_Byte* curp;
+
+ FT_Long num;
- num = PS_Conv_Strtol( cursor, limit, 10 );
- p = *cursor;
+ curp = p;
+ num = PS_Conv_Strtol( &p, limit, 10 );
+
+ if ( p == curp )
+ return 0;
if ( p < limit && *p == '#' )
{
- *cursor = p + 1;
+ p++;
+
+ curp = p;
+ num = PS_Conv_Strtol( &p, limit, num );
- return PS_Conv_Strtol( cursor, limit, num );
+ if ( p == curp )
+ return 0;
}
- else
- return num;
+
+ *cursor = p;
+
+ return num;
}
FT_LOCAL_DEF( FT_Fixed )
PS_Conv_ToFixed( FT_Byte** cursor,
FT_Byte* limit,
- FT_Int power_ten )
+ FT_Long power_ten )
{
FT_Byte* p = *cursor;
- FT_Fixed integral;
- FT_Long decimal = 0, divider = 1;
- FT_Bool sign = 0;
+ FT_Byte* curp;
+
+ FT_Fixed integral = 0;
+ FT_Long decimal = 0;
+ FT_Long divider = 1;
+
+ FT_Bool sign = 0;
+ FT_Bool have_overflow = 0;
+ FT_Bool have_underflow = 0;
if ( p >= limit )
- return 0;
+ goto Bad;
if ( *p == '-' || *p == '+' )
{
@@ -159,13 +214,23 @@
p++;
if ( p == limit )
- return 0;
+ goto Bad;
}
+ /* read the integer part */
if ( *p != '.' )
- integral = PS_Conv_ToInt( &p, limit ) << 16;
- else
- integral = 0;
+ {
+ curp = p;
+ integral = PS_Conv_ToInt( &p, limit );
+
+ if ( p == curp )
+ return 0;
+
+ if ( integral > 0x7FFF )
+ have_overflow = 1;
+ else
+ integral = (FT_Fixed)( (FT_UInt32)integral << 16 );
+ }
/* read the decimal part */
if ( p < limit && *p == '.' )
@@ -180,23 +245,20 @@
if ( IS_PS_SPACE( *p ) || *p OP 0x80 )
break;
- c = ft_char_table[*p & 0x7f];
+ c = ft_char_table[*p & 0x7F];
if ( c < 0 || c >= 10 )
break;
- if ( !integral && power_ten > 0 )
+ /* only add digit if we don't overflow */
+ if ( divider < 0xCCCCCCCL && decimal < 0xCCCCCCCL )
{
- power_ten--;
decimal = decimal * 10 + c;
- }
- else
- {
- if ( divider < 10000000L )
- {
- decimal = decimal * 10 + c;
+
+ if ( !integral && power_ten > 0 )
+ power_ten--;
+ else
divider *= 10;
- }
}
}
}
@@ -204,33 +266,94 @@
/* read exponent, if any */
if ( p + 1 < limit && ( *p == 'e' || *p == 'E' ) )
{
+ FT_Long exponent;
+
+
p++;
- power_ten += PS_Conv_ToInt( &p, limit );
+
+ curp = p;
+ exponent = PS_Conv_ToInt( &p, limit );
+
+ if ( curp == p )
+ return 0;
+
+ /* arbitrarily limit exponent */
+ if ( exponent > 1000 )
+ have_overflow = 1;
+ else if ( exponent < -1000 )
+ have_underflow = 1;
+ else
+ power_ten += exponent;
}
+ *cursor = p;
+
+ if ( !integral && !decimal )
+ return 0;
+
+ if ( have_overflow )
+ goto Overflow;
+ if ( have_underflow )
+ goto Underflow;
+
while ( power_ten > 0 )
{
+ if ( integral >= 0xCCCCCCCL )
+ goto Overflow;
integral *= 10;
- decimal *= 10;
+
+ if ( decimal >= 0xCCCCCCCL )
+ {
+ if ( divider == 1 )
+ goto Overflow;
+ divider /= 10;
+ }
+ else
+ decimal *= 10;
+
power_ten--;
}
while ( power_ten < 0 )
{
integral /= 10;
- divider *= 10;
+ if ( divider < 0xCCCCCCCL )
+ divider *= 10;
+ else
+ decimal /= 10;
+
+ if ( !integral && !decimal )
+ goto Underflow;
+
power_ten++;
}
if ( decimal )
- integral += FT_DivFix( decimal, divider );
+ {
+ decimal = FT_DivFix( decimal, divider );
+ /* it's not necessary to check this addition for overflow */
+ /* due to the structure of the real number representation */
+ integral += decimal;
+ }
+ Exit:
if ( sign )
integral = -integral;
- *cursor = p;
-
return integral;
+
+ Bad:
+ FT_TRACE4(( "!!!END OF DATA:!!!" ));
+ return 0;
+
+ Overflow:
+ integral = 0x7FFFFFFFL;
+ FT_TRACE4(( "!!!OVERFLOW:!!!" ));
+ goto Exit;
+
+ Underflow:
+ FT_TRACE4(( "!!!UNDERFLOW:!!!" ));
+ return 0;
}
@@ -398,7 +521,7 @@
if ( *p OP 0x80 )
break;
- c = ft_char_table[*p & 0x7f];
+ c = ft_char_table[*p & 0x7F];
if ( (unsigned)c >= 16 )
break;
diff --git a/src/psaux/psconv.h b/src/psaux/psconv.h
index 84854ba..d91c762 100644
--- a/src/psaux/psconv.h
+++ b/src/psaux/psconv.h
@@ -4,7 +4,7 @@
/* */
/* Some convenience conversions (specification). */
/* */
-/* Copyright 2006 by */
+/* Copyright 2006, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,20 +26,20 @@
FT_BEGIN_HEADER
- FT_LOCAL( FT_Int )
+ FT_LOCAL( FT_Long )
PS_Conv_Strtol( FT_Byte** cursor,
FT_Byte* limit,
- FT_Int base );
+ FT_Long base );
- FT_LOCAL( FT_Int )
+ FT_LOCAL( FT_Long )
PS_Conv_ToInt( FT_Byte** cursor,
FT_Byte* limit );
FT_LOCAL( FT_Fixed )
PS_Conv_ToFixed( FT_Byte** cursor,
FT_Byte* limit,
- FT_Int power_ten );
+ FT_Long power_ten );
#if 0
FT_LOCAL( FT_UInt )
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 06df6e6..7ec3b4c 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2012 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -113,8 +113,8 @@
static FT_Error
- reallocate_t1_table( PS_Table table,
- FT_Long new_size )
+ reallocate_t1_table( PS_Table table,
+ FT_Offset new_size )
{
FT_Memory memory = table->memory;
FT_Byte* old_base = table->block;
@@ -138,7 +138,7 @@
table->capacity = new_size;
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
}
@@ -173,13 +173,13 @@
if ( idx < 0 || idx >= table->max_elems )
{
FT_ERROR(( "ps_table_add: invalid index\n" ));
- return PSaux_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
if ( length < 0 )
{
FT_ERROR(( "ps_table_add: invalid length\n" ));
- return PSaux_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
/* grow the base block if needed */
@@ -216,7 +216,7 @@
FT_MEM_COPY( table->block + table->cursor, object, length );
table->cursor += length;
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
}
@@ -341,7 +341,7 @@
{
FT_Byte* cur = *acur;
FT_Int embed = 0;
- FT_Error error = PSaux_Err_Invalid_File_Format;
+ FT_Error error = FT_ERR( Invalid_File_Format );
unsigned int i;
@@ -397,7 +397,7 @@
embed--;
if ( embed == 0 )
{
- error = PSaux_Err_Ok;
+ error = FT_Err_Ok;
break;
}
}
@@ -416,7 +416,7 @@
FT_Byte* limit )
{
FT_Byte* cur = *acur;
- FT_Error err = PSaux_Err_Ok;
+ FT_Error err = FT_Err_Ok;
while ( ++cur < limit )
@@ -433,7 +433,7 @@
if ( cur < limit && *cur != '>' )
{
FT_ERROR(( "skip_string: missing closing delimiter `>'\n" ));
- err = PSaux_Err_Invalid_File_Format;
+ err = FT_THROW( Invalid_File_Format );
}
else
cur++;
@@ -456,12 +456,12 @@
{
FT_Byte* cur;
FT_Int embed = 0;
- FT_Error error = PSaux_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_ASSERT( **acur == '{' );
- for ( cur = *acur; cur < limit && error == PSaux_Err_Ok; ++cur )
+ for ( cur = *acur; cur < limit && error == FT_Err_Ok; ++cur )
{
switch ( *cur )
{
@@ -494,7 +494,7 @@
end:
if ( embed != 0 )
- error = PSaux_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
*acur = cur;
@@ -519,7 +519,7 @@
FT_Byte* cur = parser->cursor;
FT_Byte* limit = parser->limit;
- FT_Error error = PSaux_Err_Ok;
+ FT_Error error = FT_Err_Ok;
skip_spaces( &cur, limit ); /* this also skips comments */
@@ -567,7 +567,7 @@
{
FT_ERROR(( "ps_parser_skip_PS_token:"
" unexpected closing delimiter `>'\n" ));
- error = PSaux_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
cur++;
@@ -597,7 +597,7 @@
" but invalid at this point\n",
*cur ));
- error = PSaux_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
}
parser->error = error;
@@ -644,7 +644,7 @@
token->type = T1_TOKEN_TYPE_STRING;
token->start = cur;
- if ( skip_literal_string( &cur, limit ) == PSaux_Err_Ok )
+ if ( skip_literal_string( &cur, limit ) == FT_Err_Ok )
token->limit = cur;
break;
@@ -653,7 +653,7 @@
token->type = T1_TOKEN_TYPE_ARRAY;
token->start = cur;
- if ( skip_procedure( &cur, limit ) == PSaux_Err_Ok )
+ if ( skip_procedure( &cur, limit ) == FT_Err_Ok )
token->limit = cur;
break;
@@ -847,6 +847,8 @@
/* first character must be a delimiter or a part of a number */
/* NB: `values' can be NULL if we just want to skip the */
/* array; in this case we ignore `max_values' */
+ /* */
+ /* return number of successfully parsed values */
static FT_Int
ps_tofixedarray( FT_Byte* *acur,
@@ -1027,12 +1029,13 @@
FT_UInt max_objects,
FT_ULong* pflags )
{
- T1_TokenRec token;
- FT_Byte* cur;
- FT_Byte* limit;
- FT_UInt count;
- FT_UInt idx;
- FT_Error error;
+ T1_TokenRec token;
+ FT_Byte* cur;
+ FT_Byte* limit;
+ FT_UInt count;
+ FT_UInt idx;
+ FT_Error error;
+ T1_FieldType type;
/* this also skips leading whitespace */
@@ -1045,8 +1048,10 @@
cur = token.start;
limit = token.limit;
+ type = field->type;
+
/* we must detect arrays in /FontBBox */
- if ( field->type == T1_FIELD_TYPE_BBOX )
+ if ( type == T1_FIELD_TYPE_BBOX )
{
T1_TokenRec token2;
FT_Byte* old_cur = parser->cursor;
@@ -1062,17 +1067,21 @@
parser->limit = old_limit;
if ( token2.type == T1_TOKEN_TYPE_ARRAY )
+ {
+ type = T1_FIELD_TYPE_MM_BBOX;
goto FieldArray;
+ }
}
else if ( token.type == T1_TOKEN_TYPE_ARRAY )
{
+ count = max_objects;
+
FieldArray:
/* if this is an array and we have no blend, an error occurs */
if ( max_objects == 0 )
goto Fail;
- count = max_objects;
- idx = 1;
+ idx = 1;
/* don't include delimiters */
cur++;
@@ -1088,7 +1097,7 @@
skip_spaces( &cur, limit );
- switch ( field->type )
+ switch ( type )
{
case T1_FIELD_TYPE_BOOL:
val = ps_tobool( &cur, limit );
@@ -1160,7 +1169,7 @@
" "
" but found token of type %d instead\n",
token.type ));
- error = PSaux_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1193,11 +1202,11 @@
result = ps_tofixedarray( &cur, limit, 4, temp, 0 );
- if ( result < 0 )
+ if ( result < 4 )
{
FT_ERROR(( "ps_parser_load_field:"
" expected four integers in bounding box\n" ));
- error = PSaux_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1208,6 +1217,54 @@
}
break;
+ case T1_FIELD_TYPE_MM_BBOX:
+ {
+ FT_Memory memory = parser->memory;
+ FT_Fixed* temp;
+ FT_Int result;
+ FT_UInt i;
+
+
+ if ( FT_NEW_ARRAY( temp, max_objects * 4 ) )
+ goto Exit;
+
+ for ( i = 0; i < 4; i++ )
+ {
+ result = ps_tofixedarray( &cur, limit, max_objects,
+ temp + i * max_objects, 0 );
+ if ( result < 0 || (FT_UInt)result < max_objects )
+ {
+ FT_ERROR(( "ps_parser_load_field:"
+ " expected %d integers in the %s subarray\n"
+ " "
+ " of /FontBBox in the /Blend dictionary\n",
+ max_objects,
+ i == 0 ? "first"
+ : ( i == 1 ? "second"
+ : ( i == 2 ? "third"
+ : "fourth" ) ) ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
+
+ skip_spaces( &cur, limit );
+ }
+
+ for ( i = 0; i < max_objects; i++ )
+ {
+ FT_BBox* bbox = (FT_BBox*)objects[i];
+
+
+ bbox->xMin = FT_RoundFix( temp[i ] );
+ bbox->yMin = FT_RoundFix( temp[i + max_objects] );
+ bbox->xMax = FT_RoundFix( temp[i + 2 * max_objects] );
+ bbox->yMax = FT_RoundFix( temp[i + 3 * max_objects] );
+ }
+
+ FT_FREE( temp );
+ }
+ break;
+
default:
/* an error occurred */
goto Fail;
@@ -1221,13 +1278,13 @@
FT_UNUSED( pflags );
#endif
- error = PSaux_Err_Ok;
+ error = FT_Err_Ok;
Exit:
return error;
Fail:
- error = PSaux_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1245,7 +1302,7 @@
T1_TokenRec elements[T1_MAX_TABLE_ELEMENTS];
T1_Token token;
FT_Int num_elements;
- FT_Error error = PSaux_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte* old_cursor;
FT_Byte* old_limit;
T1_FieldRec fieldrec = *(T1_Field)field;
@@ -1260,7 +1317,7 @@
T1_MAX_TABLE_ELEMENTS, &num_elements );
if ( num_elements < 0 )
{
- error = PSaux_Err_Ignore;
+ error = FT_ERR( Ignore );
goto Exit;
}
if ( (FT_UInt)num_elements > field->array_max )
@@ -1281,7 +1338,15 @@
{
parser->cursor = token->start;
parser->limit = token->limit;
- ps_parser_load_field( parser, &fieldrec, objects, max_objects, 0 );
+
+ error = ps_parser_load_field( parser,
+ &fieldrec,
+ objects,
+ max_objects,
+ 0 );
+ if ( error )
+ break;
+
fieldrec.offset += fieldrec.size;
}
@@ -1317,7 +1382,7 @@
FT_Long* pnum_bytes,
FT_Bool delimiters )
{
- FT_Error error = PSaux_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte* cur;
@@ -1332,7 +1397,7 @@
if ( *cur != '<' )
{
FT_ERROR(( "ps_parser_to_bytes: Missing starting delimiter `<'\n" ));
- error = PSaux_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1349,7 +1414,7 @@
if ( cur < parser->limit && *cur != '>' )
{
FT_ERROR(( "ps_parser_to_bytes: Missing closing delimiter `>'\n" ));
- error = PSaux_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1419,7 +1484,7 @@
FT_Byte* limit,
FT_Memory memory )
{
- parser->error = PSaux_Err_Ok;
+ parser->error = FT_Err_Ok;
parser->base = base;
parser->limit = limit;
parser->cursor = base;
@@ -1592,13 +1657,13 @@
if ( !outline )
{
FT_ERROR(( "t1_builder_add_contour: no outline to add points to\n" ));
- return PSaux_Err_Invalid_File_Format;
+ return FT_THROW( Invalid_File_Format );
}
if ( !builder->load_points )
{
outline->n_contours++;
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
}
error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 );
@@ -1621,13 +1686,13 @@
FT_Pos x,
FT_Pos y )
{
- FT_Error error = PSaux_Err_Invalid_File_Format;
+ FT_Error error = FT_ERR( Invalid_File_Format );
/* test whether we are building a new contour */
if ( builder->parse_state == T1_Parse_Have_Path )
- error = PSaux_Err_Ok;
+ error = FT_Err_Ok;
else
{
builder->parse_state = T1_Parse_Have_Path;
diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c
index 9e5bd34..fb1353a 100644
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -120,8 +120,12 @@
FT_CALLBACK_DEF( FT_Error )
- t1_cmap_standard_init( T1_CMapStd cmap )
+ t1_cmap_standard_init( T1_CMapStd cmap,
+ FT_Pointer pointer )
{
+ FT_UNUSED( pointer );
+
+
t1_cmap_std_init( cmap, 0 );
return 0;
}
@@ -142,8 +146,12 @@
FT_CALLBACK_DEF( FT_Error )
- t1_cmap_expert_init( T1_CMapStd cmap )
+ t1_cmap_expert_init( T1_CMapStd cmap,
+ FT_Pointer pointer )
{
+ FT_UNUSED( pointer );
+
+
t1_cmap_std_init( cmap, 1 );
return 0;
}
@@ -172,11 +180,14 @@
FT_CALLBACK_DEF( FT_Error )
- t1_cmap_custom_init( T1_CMapCustom cmap )
+ t1_cmap_custom_init( T1_CMapCustom cmap,
+ FT_Pointer pointer )
{
T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
T1_Encoding encoding = &face->type1.encoding;
+ FT_UNUSED( pointer );
+
cmap->first = encoding->code_first;
cmap->count = (FT_UInt)( encoding->code_last - cmap->first );
@@ -272,12 +283,15 @@
FT_CALLBACK_DEF( FT_Error )
- t1_cmap_unicode_init( PS_Unicodes unicodes )
+ t1_cmap_unicode_init( PS_Unicodes unicodes,
+ FT_Pointer pointer )
{
T1_Face face = (T1_Face)FT_CMAP_FACE( unicodes );
FT_Memory memory = FT_FACE_MEMORY( face );
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
+ FT_UNUSED( pointer );
+
return psnames->unicodes_init( memory,
unicodes,
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index ea67841..d67a05e 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (body). */
/* */
-/* Copyright 2000-2011 by */
+/* Copyright 2000-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -205,7 +205,13 @@
if ( decoder->seac )
{
FT_ERROR(( "t1operator_seac: invalid nested seac\n" ));
- return PSaux_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
+ }
+
+ if ( decoder->builder.metrics_only )
+ {
+ FT_ERROR(( "t1operator_seac: unexpected seac\n" ));
+ return FT_THROW( Syntax_Error );
}
/* seac weirdness */
@@ -222,7 +228,7 @@
{
FT_ERROR(( "t1operator_seac:"
" glyph names table not available in this font\n" ));
- return PSaux_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
}
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -243,7 +249,7 @@
{
FT_ERROR(( "t1operator_seac:"
" invalid seac character code arguments\n" ));
- return PSaux_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
}
/* if we are trying to load a composite glyph, do not load the */
@@ -409,7 +415,7 @@
limit = zone->limit = charstring_base + charstring_len;
ip = zone->cursor = zone->base;
- error = PSaux_Err_Ok;
+ error = FT_Err_Ok;
x = orig_x = builder->pos_x;
y = orig_y = builder->pos_y;
@@ -559,10 +565,10 @@
goto Syntax_Error;
}
- value = (FT_Int32)( ( (FT_Long)ip[0] << 24 ) |
- ( (FT_Long)ip[1] << 16 ) |
- ( (FT_Long)ip[2] << 8 ) |
- ip[3] );
+ value = (FT_Int32)( ( (FT_UInt32)ip[0] << 24 ) |
+ ( (FT_UInt32)ip[1] << 16 ) |
+ ( (FT_UInt32)ip[2] << 8 ) |
+ (FT_UInt32)ip[3] );
ip += 4;
/* According to the specification, values > 32000 or < -32000 must */
@@ -585,7 +591,7 @@
else
{
if ( !large_int )
- value <<= 16;
+ value = (FT_Int32)( (FT_UInt32)value << 16 );
}
break;
@@ -605,13 +611,13 @@
}
if ( ip[-2] < 251 )
- value = ( ( (FT_Int32)ip[-2] - 247 ) << 8 ) + ip[-1] + 108;
+ value = ( ( ip[-2] - 247 ) * 256 ) + ip[-1] + 108;
else
- value = -( ( ( (FT_Int32)ip[-2] - 251 ) << 8 ) + ip[-1] + 108 );
+ value = -( ( ( ip[-2] - 251 ) * 256 ) + ip[-1] + 108 );
}
if ( !large_int )
- value <<= 16;
+ value = (FT_Int32)( (FT_UInt32)value << 16 );
}
else
{
@@ -750,9 +756,9 @@
decoder->flex_state = 1;
decoder->num_flex_vectors = 0;
if ( ( error = t1_builder_start_point( builder, x, y ) )
- != PSaux_Err_Ok ||
+ != FT_Err_Ok ||
( error = t1_builder_check_points( builder, 6 ) )
- != PSaux_Err_Ok )
+ != FT_Err_Ok )
goto Fail;
break;
@@ -1092,10 +1098,12 @@
goto Syntax_Error;
/* apply hints to the loaded glyph outline now */
- hinter->apply( hinter->hints,
- builder->current,
- (PSH_Globals)builder->hints_globals,
- decoder->hint_mode );
+ error = hinter->apply( hinter->hints,
+ builder->current,
+ (PSH_Globals)builder->hints_globals,
+ decoder->hint_mode );
+ if ( error )
+ goto Fail;
}
/* add current outline to the glyph slot */
@@ -1123,7 +1131,7 @@
FT_TRACE4(( "\n" ));
/* return now! */
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
case op_hsbw:
FT_TRACE4(( " hsbw" ));
@@ -1143,7 +1151,7 @@
/* the glyph's metrics (lsb + advance width), not load the */
/* rest of it; so exit immediately */
if ( builder->metrics_only )
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
break;
@@ -1172,7 +1180,7 @@
/* the glyph's metrics (lsb + advance width), not load the */
/* rest of it; so exit immediately */
if ( builder->metrics_only )
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
break;
@@ -1191,7 +1199,7 @@
FT_TRACE4(( " hlineto" ));
if ( ( error = t1_builder_start_point( builder, x, y ) )
- != PSaux_Err_Ok )
+ != FT_Err_Ok )
goto Fail;
x += top[0];
@@ -1213,9 +1221,9 @@
FT_TRACE4(( " hvcurveto" ));
if ( ( error = t1_builder_start_point( builder, x, y ) )
- != PSaux_Err_Ok ||
+ != FT_Err_Ok ||
( error = t1_builder_check_points( builder, 3 ) )
- != PSaux_Err_Ok )
+ != FT_Err_Ok )
goto Fail;
x += top[0];
@@ -1231,7 +1239,7 @@
FT_TRACE4(( " rlineto" ));
if ( ( error = t1_builder_start_point( builder, x, y ) )
- != PSaux_Err_Ok )
+ != FT_Err_Ok )
goto Fail;
x += top[0];
@@ -1239,7 +1247,7 @@
Add_Line:
if ( ( error = t1_builder_add_point1( builder, x, y ) )
- != PSaux_Err_Ok )
+ != FT_Err_Ok )
goto Fail;
break;
@@ -1260,9 +1268,9 @@
FT_TRACE4(( " rrcurveto" ));
if ( ( error = t1_builder_start_point( builder, x, y ) )
- != PSaux_Err_Ok ||
+ != FT_Err_Ok ||
( error = t1_builder_check_points( builder, 3 ) )
- != PSaux_Err_Ok )
+ != FT_Err_Ok )
goto Fail;
x += top[0];
@@ -1282,9 +1290,9 @@
FT_TRACE4(( " vhcurveto" ));
if ( ( error = t1_builder_start_point( builder, x, y ) )
- != PSaux_Err_Ok ||
+ != FT_Err_Ok ||
( error = t1_builder_check_points( builder, 3 ) )
- != PSaux_Err_Ok )
+ != FT_Err_Ok )
goto Fail;
y += top[0];
@@ -1300,7 +1308,7 @@
FT_TRACE4(( " vlineto" ));
if ( ( error = t1_builder_start_point( builder, x, y ) )
- != PSaux_Err_Ok )
+ != FT_Err_Ok )
goto Fail;
y += top[0];
@@ -1539,10 +1547,10 @@
return error;
Syntax_Error:
- return PSaux_Err_Syntax_Error;
+ return FT_THROW( Syntax_Error );
Stack_Underflow:
- return PSaux_Err_Stack_Underflow;
+ return FT_THROW( Stack_Underflow );
}
@@ -1579,7 +1587,7 @@
{
FT_ERROR(( "t1_decoder_init:"
" the `psnames' module is not available\n" ));
- return PSaux_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
}
decoder->psnames = psnames;
@@ -1599,7 +1607,7 @@
decoder->funcs = t1_decoder_funcs;
- return PSaux_Err_Ok;
+ return FT_Err_Ok;
}
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index d798978..644c76d 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -4,8 +4,7 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 */
-/* by */
+/* Copyright 2001-2010, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -402,13 +401,13 @@
FT_Fixed delta,
FT_Int dimension )
{
- PSH_Hint hint;
- FT_UInt count;
+ FT_UInt count;
for ( count = 0; count < table->max_hints; count++ )
{
- hint = table->hints + count;
+ PSH_Hint hint = table->hints + count;
+
hint->cur_pos = FT_MulFix( hint->org_pos, scale ) + delta;
hint->cur_len = FT_MulFix( hint->org_len, scale );
@@ -563,7 +562,7 @@
else if ( len > 0 )
{
/* This is a very small stem; we simply align it to the
- * pixel grid, trying to find the minimal displacement.
+ * pixel grid, trying to find the minimum displacement.
*
* left = pos
* right = pos + len
@@ -1162,8 +1161,8 @@
int result = PSH_DIR_NONE;
- ax = ( dx >= 0 ) ? dx : -dx;
- ay = ( dy >= 0 ) ? dy : -dy;
+ ax = FT_ABS( dx );
+ ay = FT_ABS( dy );
if ( ay * 12 < ax )
{
@@ -1407,7 +1406,6 @@
point = first;
before = point;
- after = point;
do
{
@@ -2080,8 +2078,6 @@
start = first;
do
{
- point = first;
-
/* skip consecutive fitted points */
for (;;)
{
@@ -2194,7 +2190,7 @@
/* something to do? */
if ( outline->n_points == 0 || outline->n_contours == 0 )
- return PSH_Err_Ok;
+ return FT_Err_Ok;
#ifdef DEBUG_HINTER
diff --git a/src/pshinter/pshalgo.h b/src/pshinter/pshalgo.h
index 1a248a7..c70f31e 100644
--- a/src/pshinter/pshalgo.h
+++ b/src/pshinter/pshalgo.h
@@ -4,7 +4,7 @@
/* */
/* PostScript hinting algorithm (specification). */
/* */
-/* Copyright 2001, 2002, 2003, 2008 by */
+/* Copyright 2001-2003, 2008, 2013 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 "pshrec.h"
#include "pshglob.h"
-#include FT_TRIGONOMETRY_H
FT_BEGIN_HEADER
@@ -168,8 +167,6 @@ FT_BEGIN_HEADER
FT_UInt flags2;
FT_Char dir_in;
FT_Char dir_out;
- FT_Angle angle_in;
- FT_Angle angle_out;
PSH_Hint hint;
FT_Pos org_u;
FT_Pos org_v;
@@ -186,12 +183,6 @@ FT_BEGIN_HEADER
} PSH_PointRec;
-#define PSH_POINT_EQUAL_ORG( a, b ) ( (a)->org_u == (b)->org_u && \
- (a)->org_v == (b)->org_v )
-
-#define PSH_POINT_ANGLE( a, b ) FT_Atan2( (b)->org_u - (a)->org_u, \
- (b)->org_v - (a)->org_v )
-
typedef struct PSH_ContourRec_
{
PSH_Point start;
diff --git a/src/pshinter/pshglob.c b/src/pshinter/pshglob.c
index 31231ad..1bcc481 100644
--- a/src/pshinter/pshglob.c
+++ b/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, 2010 by */
+/* Copyright 2001-2004, 2006, 2010, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -522,6 +522,28 @@
}
+ /* calculate the maximum height of given blue zones */
+ static FT_Short
+ psh_calc_max_height( FT_UInt num,
+ const FT_Short* values,
+ FT_Short cur_max )
+ {
+ FT_UInt count;
+
+
+ for ( count = 0; count < num; count += 2 )
+ {
+ FT_Short cur_height = values[count + 1] - values[count];
+
+
+ if ( cur_height > cur_max )
+ cur_max = cur_height;
+ }
+
+ return cur_max;
+ }
+
+
FT_LOCAL_DEF( void )
psh_blues_snap_stem( PSH_Blues blues,
FT_Int stem_top,
@@ -684,7 +706,32 @@
priv->family_blues, priv->num_family_other_blues,
priv->family_other_blues, priv->blue_fuzz, 1 );
- globals->blues.blue_scale = priv->blue_scale;
+ /* limit the BlueScale value to `1 / max_of_blue_zone_heights' */
+ {
+ FT_Fixed max_scale;
+ FT_Short max_height = 1;
+
+
+ max_height = psh_calc_max_height( priv->num_blue_values,
+ priv->blue_values,
+ max_height );
+ max_height = psh_calc_max_height( priv->num_other_blues,
+ priv->other_blues,
+ max_height );
+ max_height = psh_calc_max_height( priv->num_family_blues,
+ priv->family_blues,
+ max_height );
+ max_height = psh_calc_max_height( priv->num_family_other_blues,
+ priv->family_other_blues,
+ max_height );
+
+ /* BlueScale is scaled 1000 times */
+ max_scale = FT_DivFix( 1000, max_height );
+ globals->blues.blue_scale = priv->blue_scale < max_scale
+ ? priv->blue_scale
+ : max_scale;
+ }
+
globals->blues.blue_shift = priv->blue_shift;
globals->blues.blue_fuzz = priv->blue_fuzz;
@@ -703,14 +750,14 @@
}
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL_DEF( void )
psh_globals_set_scale( PSH_Globals globals,
FT_Fixed x_scale,
FT_Fixed y_scale,
FT_Fixed x_delta,
FT_Fixed y_delta )
{
- PSH_Dimension dim = &globals->dimension[0];
+ PSH_Dimension dim;
dim = &globals->dimension[0];
@@ -733,8 +780,6 @@
psh_globals_scale_widths( globals, 1 );
psh_blues_scale_zones( &globals->blues, y_scale, y_delta );
}
-
- return 0;
}
diff --git a/src/pshinter/pshglob.h b/src/pshinter/pshglob.h
index c511626..94d972a 100644
--- a/src/pshinter/pshglob.h
+++ b/src/pshinter/pshglob.h
@@ -4,7 +4,7 @@
/* */
/* PostScript hinter global hinting management. */
/* */
-/* Copyright 2001, 2002, 2003 by */
+/* Copyright 2001, 2002, 2003, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -167,7 +167,7 @@ FT_BEGIN_HEADER
FT_Int org_width );
#endif
- FT_LOCAL( FT_Error )
+ FT_LOCAL( void )
psh_globals_set_scale( PSH_Globals globals,
FT_Fixed x_scale,
FT_Fixed y_scale,
diff --git a/src/pshinter/pshmod.c b/src/pshinter/pshmod.c
index 91da5d7..cdeaca1 100644
--- a/src/pshinter/pshmod.c
+++ b/src/pshinter/pshmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PostScript hinter module implementation (body). */
/* */
-/* Copyright 2001, 2002, 2007 by */
+/* Copyright 2001, 2002, 2007, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -93,14 +93,15 @@
}
- FT_DEFINE_PSHINTER_INTERFACE(pshinter_interface,
+ FT_DEFINE_PSHINTER_INTERFACE(
+ pshinter_interface,
pshinter_get_globals_funcs,
pshinter_get_t1_funcs,
- pshinter_get_t2_funcs
- )
+ pshinter_get_t2_funcs )
- FT_DEFINE_MODULE(pshinter_module_class,
+ FT_DEFINE_MODULE(
+ pshinter_module_class,
0,
sizeof ( PS_Hinter_ModuleRec ),
@@ -108,11 +109,11 @@
0x10000L,
0x20000L,
- &FTPSHINTER_INTERFACE_GET, /* module-specific interface */
+ &PSHINTER_INTERFACE_GET, /* module-specific interface */
(FT_Module_Constructor)ps_hinter_init,
(FT_Module_Destructor) ps_hinter_done,
- (FT_Module_Requester) 0 /* no additional interface for now */
- )
+ (FT_Module_Requester) NULL ) /* no additional interface for now */
+
/* END */
diff --git a/src/pshinter/pshpic.c b/src/pshinter/pshpic.c
index 1e0f9a9..568f4ac 100644
--- a/src/pshinter/pshpic.c
+++ b/src/pshinter/pshpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for pshinter module. */
/* */
-/* Copyright 2009, 2010 by */
+/* Copyright 2009, 2010, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,7 @@
#include "pshpic.h"
#include "pshnterr.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from pshmod.c */
@@ -33,7 +34,7 @@
pshinter_module_class_pic_free( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Memory memory = library->memory;
+ FT_Memory memory = library->memory;
if ( pic_container->pshinter )
@@ -48,13 +49,13 @@
pshinter_module_class_pic_init( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = PSH_Err_Ok;
- PSHinterPIC* container;
+ FT_Error error = FT_Err_Ok;
+ PSHinterPIC* container = NULL;
FT_Memory memory = library->memory;
/* allocate pointer, clear and set global container pointer */
- if ( FT_ALLOC ( container, sizeof ( *container ) ) )
+ if ( FT_ALLOC( container, sizeof ( *container ) ) )
return error;
FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->pshinter = container;
@@ -63,13 +64,13 @@
FT_Init_Class_pshinter_interface(
library, &container->pshinter_interface );
-/*Exit:*/
- if( error )
+ if ( error )
pshinter_module_class_pic_free( library );
+
return error;
}
-
#endif /* FT_CONFIG_OPTION_PIC */
+
/* END */
diff --git a/src/pshinter/pshpic.h b/src/pshinter/pshpic.h
index c10bdd9..b46f853 100644
--- a/src/pshinter/pshpic.h
+++ b/src/pshinter/pshpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for pshinter module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,21 +24,25 @@ FT_BEGIN_HEADER
#include FT_INTERNAL_PIC_H
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FTPSHINTER_INTERFACE_GET pshinter_interface
+#define PSHINTER_INTERFACE_GET pshinter_interface
#else /* FT_CONFIG_OPTION_PIC */
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
- typedef struct PSHinterPIC_
+ typedef struct PSHinterPIC_
{
- PSHinter_Interface pshinter_interface;
+ PSHinter_Interface pshinter_interface;
+
} PSHinterPIC;
-#define GET_PIC(lib) ((PSHinterPIC*)((lib)->pic_container.autofit))
-#define FTPSHINTER_INTERFACE_GET (GET_PIC(library)->pshinter_interface)
+
+#define GET_PIC( lib ) ( (PSHinterPIC*)( (lib)->pic_container.pshinter ) )
+
+#define PSHINTER_INTERFACE_GET ( GET_PIC( library )->pshinter_interface )
/* see pshpic.c for the implementation */
void
diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c
index 0910cc5..73a18ff 100644
--- a/src/pshinter/pshrec.c
+++ b/src/pshinter/pshrec.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PostScript hints recorder (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2007, 2009 by */
+/* Copyright 2001-2004, 2007, 2009, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -64,7 +64,7 @@
{
FT_UInt old_max = table->max_hints;
FT_UInt new_max = count;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( new_max > old_max )
@@ -83,7 +83,7 @@
FT_Memory memory,
PS_Hint *ahint )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UInt count;
PS_Hint hint = 0;
@@ -139,7 +139,7 @@
{
FT_UInt old_max = ( mask->max_bits + 7 ) >> 3;
FT_UInt new_max = ( count + 7 ) >> 3;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( new_max > old_max )
@@ -186,7 +186,7 @@
FT_Int idx,
FT_Memory memory )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte* p;
@@ -236,7 +236,7 @@
{
FT_UInt old_max = table->max_masks;
FT_UInt new_max = count;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( new_max > old_max )
@@ -256,7 +256,7 @@
PS_Mask *amask )
{
FT_UInt count;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PS_Mask mask = 0;
@@ -287,7 +287,7 @@
FT_Memory memory,
PS_Mask *amask )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UInt count;
PS_Mask mask;
@@ -316,7 +316,7 @@
FT_UInt bit_count,
FT_Memory memory )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error;
PS_Mask mask;
@@ -384,7 +384,7 @@
FT_UInt count;
- count = ( count1 <= count2 ) ? count1 : count2;
+ count = FT_MIN( count1, count2 );
for ( ; count >= 8; count -= 8 )
{
if ( p1[0] & p2[0] )
@@ -409,7 +409,7 @@
FT_Memory memory )
{
FT_UInt temp;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
/* swap index1 and index2 so that index1 < index2 */
@@ -499,7 +499,7 @@
FT_Memory memory )
{
FT_Int index1, index2;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
for ( index1 = table->num_masks - 1; index1 > 0; index1-- )
@@ -561,7 +561,7 @@
FT_Memory memory )
{
PS_Mask mask;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
/* get last hint mask */
@@ -583,12 +583,13 @@
FT_UInt end_point )
{
FT_UInt count = dim->masks.num_masks;
- PS_Mask mask;
if ( count > 0 )
{
- mask = dim->masks.masks + count - 1;
+ PS_Mask mask = dim->masks.masks + count - 1;
+
+
mask->end_point = end_point;
}
}
@@ -621,7 +622,7 @@
FT_UInt end_point,
FT_Memory memory )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error;
/* reset current mask, if any */
@@ -646,7 +647,7 @@
FT_Memory memory,
FT_Int *aindex )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UInt flags = 0;
@@ -717,7 +718,7 @@
FT_Int hint3,
FT_Memory memory )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UInt count = dim->counters.num_masks;
PS_Mask counter = dim->counters.masks;
@@ -791,18 +792,17 @@
ps_dimension_done( &hints->dimension[0], memory );
ps_dimension_done( &hints->dimension[1], memory );
- hints->error = PSH_Err_Ok;
+ hints->error = FT_Err_Ok;
hints->memory = 0;
}
- FT_LOCAL( FT_Error )
+ FT_LOCAL( void )
ps_hints_init( PS_Hints hints,
FT_Memory memory )
{
FT_MEM_ZERO( hints, sizeof ( *hints ) );
hints->memory = memory;
- return PSH_Err_Ok;
}
@@ -815,7 +815,7 @@
{
case PS_HINT_TYPE_1:
case PS_HINT_TYPE_2:
- hints->error = PSH_Err_Ok;
+ hints->error = FT_Err_Ok;
hints->hint_type = hint_type;
ps_dimension_init( &hints->dimension[0] );
@@ -823,7 +823,7 @@
break;
default:
- hints->error = PSH_Err_Invalid_Argument;
+ hints->error = FT_THROW( Invalid_Argument );
hints->hint_type = hint_type;
FT_TRACE0(( "ps_hints_open: invalid charstring type\n" ));
@@ -894,7 +894,7 @@
FT_Int dimension,
FT_Fixed* stems )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( !hints->error )
@@ -938,7 +938,7 @@
else
{
FT_ERROR(( "ps_hints_t1stem3: called with invalid hint type\n" ));
- error = PSH_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Fail;
}
}
@@ -956,7 +956,7 @@
ps_hints_t1reset( PS_Hints hints,
FT_UInt end_point )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( !hints->error )
@@ -979,7 +979,7 @@
else
{
/* invalid hint type */
- error = PSH_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Fail;
}
}
diff --git a/src/pshinter/pshrec.h b/src/pshinter/pshrec.h
index dcb3197..a88fe6e 100644
--- a/src/pshinter/pshrec.h
+++ b/src/pshinter/pshrec.h
@@ -4,7 +4,7 @@
/* */
/* Postscript (Type1/Type2) hints recorder (specification). */
/* */
-/* Copyright 2001, 2002, 2003, 2006, 2008 by */
+/* Copyright 2001, 2002, 2003, 2006, 2008, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -141,7 +141,7 @@ FT_BEGIN_HEADER
/* */
/* initialize hints recorder */
- FT_LOCAL( FT_Error )
+ FT_LOCAL( void )
ps_hints_init( PS_Hints hints,
FT_Memory memory );
diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c
index 3619174..42c9aff 100644
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -4,7 +4,7 @@
/* */
/* PSNames module implementation (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2003, 2005-2008, 2012-2014 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_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
@@ -369,7 +370,7 @@
/* No unicode chars here! */
FT_FREE( table->maps );
if ( !error )
- error = PSnames_Err_No_Unicode_Glyph_Name;
+ error = FT_THROW( No_Unicode_Glyph_Name );
}
else
{
@@ -377,7 +378,7 @@
if ( count < num_glyphs / 2 )
{
(void)FT_RENEW_ARRAY( table->maps, num_glyphs, count );
- error = PSnames_Err_Ok;
+ error = FT_Err_Ok;
}
/* Sort the table in increasing order of unicode values, */
@@ -521,7 +522,9 @@
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
- FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface,
+
+ FT_DEFINE_SERVICE_PSCMAPSREC(
+ pscmaps_interface,
(PS_Unicode_ValueFunc) ps_unicode_value,
(PS_Unicodes_InitFunc) ps_unicodes_init,
(PS_Unicodes_CharIndexFunc)ps_unicodes_char_index,
@@ -531,39 +534,36 @@
(PS_Adobe_Std_StringsFunc) ps_get_standard_strings,
t1_standard_encoding,
- t1_expert_encoding
- )
+ t1_expert_encoding )
#else
- FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface,
- 0,
- 0,
- 0,
- 0,
+ FT_DEFINE_SERVICE_PSCMAPSREC(
+ pscmaps_interface,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
(PS_Macintosh_NameFunc) ps_get_macintosh_name,
(PS_Adobe_Std_StringsFunc) ps_get_standard_strings,
t1_standard_encoding,
- t1_expert_encoding
- )
+ t1_expert_encoding )
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
- FT_DEFINE_SERVICEDESCREC1(pscmaps_services,
- FT_SERVICE_ID_POSTSCRIPT_CMAPS, &FT_PSCMAPS_INTERFACE_GET
- )
-
-
+ FT_DEFINE_SERVICEDESCREC1(
+ pscmaps_services,
+ FT_SERVICE_ID_POSTSCRIPT_CMAPS, &PSCMAPS_INTERFACE_GET )
static FT_Pointer
psnames_get_service( FT_Module module,
const char* service_id )
{
- /* FT_PSCMAPS_SERVICES_GET derefers `library' in PIC mode */
+ /* PSCMAPS_SERVICES_GET dereferences `library' in PIC mode */
#ifdef FT_CONFIG_OPTION_PIC
FT_Library library;
@@ -577,19 +577,20 @@
FT_UNUSED( module );
#endif
- return ft_service_list_lookup( FT_PSCMAPS_SERVICES_GET, service_id );
+ return ft_service_list_lookup( PSCMAPS_SERVICES_GET, service_id );
}
#endif /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */
#ifndef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
-#define PUT_PS_NAMES_SERVICE(a) 0
+#define PUT_PS_NAMES_SERVICE( a ) NULL
#else
-#define PUT_PS_NAMES_SERVICE(a) a
+#define PUT_PS_NAMES_SERVICE( a ) a
#endif
- FT_DEFINE_MODULE(psnames_module_class,
+ FT_DEFINE_MODULE(
+ psnames_module_class,
0, /* this is not a font driver, nor a renderer */
sizeof ( FT_ModuleRec ),
@@ -598,12 +599,11 @@
0x10000L, /* driver version */
0x20000L, /* driver requires FreeType 2 or above */
- PUT_PS_NAMES_SERVICE((void*)&FT_PSCMAPS_INTERFACE_GET), /* module specific interface */
- (FT_Module_Constructor)0,
- (FT_Module_Destructor) 0,
- (FT_Module_Requester) PUT_PS_NAMES_SERVICE(psnames_get_service)
- )
-
+ PUT_PS_NAMES_SERVICE(
+ (void*)&PSCMAPS_INTERFACE_GET ), /* module specific interface */
+ (FT_Module_Constructor)NULL,
+ (FT_Module_Destructor) NULL,
+ (FT_Module_Requester) PUT_PS_NAMES_SERVICE( psnames_get_service ) )
/* END */
diff --git a/src/psnames/pspic.c b/src/psnames/pspic.c
index 467ab73..3820f65 100644
--- a/src/psnames/pspic.c
+++ b/src/psnames/pspic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for psnames module. */
/* */
-/* Copyright 2009, 2010 by */
+/* Copyright 2009, 2010, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,7 @@
#include "pspic.h"
#include "psnamerr.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from psmodule.c */
@@ -36,11 +37,12 @@
FT_Init_Class_pscmaps_interface( FT_Library library,
FT_Service_PsCMapsRec* clazz );
+
void
psnames_module_class_pic_free( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Memory memory = library->memory;
+ FT_Memory memory = library->memory;
if ( pic_container->psnames )
@@ -48,7 +50,7 @@
PSModulePIC* container = (PSModulePIC*)pic_container->psnames;
- if(container->pscmaps_services)
+ if ( container->pscmaps_services )
FT_Destroy_Class_pscmaps_services( library,
container->pscmaps_services );
container->pscmaps_services = NULL;
@@ -62,18 +64,19 @@
psnames_module_class_pic_init( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = PSnames_Err_Ok;
- PSModulePIC* container;
+ FT_Error error = FT_Err_Ok;
+ PSModulePIC* container = NULL;
FT_Memory memory = library->memory;
/* allocate pointer, clear and set global container pointer */
- if ( FT_ALLOC ( container, sizeof ( *container ) ) )
+ if ( FT_ALLOC( container, sizeof ( *container ) ) )
return error;
FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->psnames = 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 */
error = FT_Create_Class_pscmaps_services(
library, &container->pscmaps_services );
if ( error )
@@ -81,7 +84,7 @@
FT_Init_Class_pscmaps_interface( library,
&container->pscmaps_interface );
-Exit:
+ Exit:
if ( error )
psnames_module_class_pic_free( library );
return error;
diff --git a/src/psnames/pspic.h b/src/psnames/pspic.h
index 1169b89..6ff002c 100644
--- a/src/psnames/pspic.h
+++ b/src/psnames/pspic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for psnames module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2012 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,22 +25,27 @@ FT_BEGIN_HEADER
#include FT_INTERNAL_PIC_H
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_PSCMAPS_SERVICES_GET pscmaps_services
-#define FT_PSCMAPS_INTERFACE_GET pscmaps_interface
+
+#define PSCMAPS_SERVICES_GET pscmaps_services
+#define PSCMAPS_INTERFACE_GET pscmaps_interface
#else /* FT_CONFIG_OPTION_PIC */
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
- typedef struct PSModulePIC_
+ typedef struct PSModulePIC_
{
- FT_ServiceDescRec* pscmaps_services;
- FT_Service_PsCMapsRec pscmaps_interface;
+ FT_ServiceDescRec* pscmaps_services;
+ FT_Service_PsCMapsRec pscmaps_interface;
+
} PSModulePIC;
-#define GET_PIC(lib) ((PSModulePIC*)((lib)->pic_container.psnames))
-#define FT_PSCMAPS_SERVICES_GET (GET_PIC(library)->pscmaps_services)
-#define FT_PSCMAPS_INTERFACE_GET (GET_PIC(library)->pscmaps_interface)
+
+#define GET_PIC( lib ) \
+ ( (PSModulePIC*)((lib)->pic_container.psnames) )
+#define PSCMAPS_SERVICES_GET ( GET_PIC( library )->pscmaps_services )
+#define PSCMAPS_INTERFACE_GET ( GET_PIC( library )->pscmaps_interface )
+
/* see pspic.c for the implementation */
void
diff --git a/src/psnames/rules.mk b/src/psnames/rules.mk
index 4cd39a8..f321de2 100644
--- a/src/psnames/rules.mk
+++ b/src/psnames/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001, 2003, 2011 by
+# Copyright 1996-2001, 2003, 2011, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -46,7 +46,7 @@ PSNAMES_DRV_OBJ_S := $(OBJ_DIR)/psnames.$O
# PSNames driver source file for single build
#
-PSNAMES_DRV_SRC_S := $(PSNAMES_DIR)/psmodule.c
+PSNAMES_DRV_SRC_S := $(PSNAMES_DIR)/psnames.c
# PSNames driver - single object
diff --git a/src/raster/ftmisc.h b/src/raster/ftmisc.h
index 7773924..703155a 100644
--- a/src/raster/ftmisc.h
+++ b/src/raster/ftmisc.h
@@ -115,6 +115,27 @@
return ( s > 0 ) ? d : -d;
}
+
+ static FT_Long
+ FT_MulDiv_No_Round( FT_Long a,
+ FT_Long b,
+ FT_Long c )
+ {
+ FT_Int s;
+ FT_Long d;
+
+
+ s = 1;
+ if ( a < 0 ) { a = -a; s = -1; }
+ if ( b < 0 ) { b = -b; s = -s; }
+ if ( c < 0 ) { c = -c; s = -s; }
+
+ d = (FT_Long)( c > 0 ? (FT_Int64)a * b / c
+ : 0x7FFFFFFFL );
+
+ return ( s > 0 ) ? d : -d;
+ }
+
#endif /* __FTMISC_H__ */
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index f85845e..b06ac33 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer (body). */
/* */
-/* Copyright 1996-2003, 2005, 2007-2012 by */
+/* Copyright 1996-2003, 2005, 2007-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,8 +24,8 @@
/* */
/* - copy `src/raster/ftraster.c' (this file) to your current directory */
/* */
- /* - copy `include/freetype/ftimage.h' and `src/raster/ftmisc.h' */
- /* to your current directory */
+ /* - copy `include/ftimage.h' and `src/raster/ftmisc.h' to your current */
+ /* directory */
/* */
/* - compile `ftraster' with the _STANDALONE_ macro defined, as in */
/* */
@@ -60,7 +60,7 @@
#include <ft2build.h>
#include "ftraster.h"
-#include FT_INTERNAL_CALC_H /* for FT_MulDiv only */
+#include FT_INTERNAL_CALC_H /* for FT_MulDiv and FT_MulDiv_No_Round */
#include "rastpic.h"
@@ -179,6 +179,9 @@
#ifdef _STANDALONE_
+ /* Auxiliary macros for token concatenation. */
+#define FT_ERR_XCAT( x, y ) x ## y
+#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
/* This macro is used to indicate that a function parameter is unused. */
/* Its purpose is simply to reduce compiler warnings. Note also that */
@@ -187,7 +190,7 @@
#define FT_UNUSED( x ) (x) = (x)
/* Disable the tracing mechanism for simplicity -- developers can */
- /* activate it easily by redefining these two macros. */
+ /* activate it easily by redefining these macros. */
#ifndef FT_ERROR
#define FT_ERROR( x ) do { } while ( 0 ) /* nothing */
#endif
@@ -198,6 +201,10 @@
#define FT_TRACE6( x ) do { } while ( 0 ) /* nothing */
#endif
+#ifndef FT_THROW
+#define FT_THROW( e ) FT_ERR_CAT( Raster_Err_, e )
+#endif
+
#define Raster_Err_None 0
#define Raster_Err_Not_Ini -1
#define Raster_Err_Overflow -2
@@ -224,11 +231,11 @@
#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H /* for FT_TRACE() and FT_ERROR() */
+#include FT_INTERNAL_DEBUG_H /* for FT_TRACE, FT_ERROR, and FT_THROW */
#include "rasterrs.h"
-#define Raster_Err_None Raster_Err_Ok
+#define Raster_Err_None FT_Err_Ok
#define Raster_Err_Not_Ini Raster_Err_Raster_Uninitialized
#define Raster_Err_Overflow Raster_Err_Raster_Overflow
#define Raster_Err_Neg_Height Raster_Err_Raster_Negative_Height
@@ -255,7 +262,8 @@
/* On the other hand, SMulDiv means `Slow MulDiv', and is used typically */
/* for clipping computations. It simply uses the FT_MulDiv() function */
/* defined in `ftcalc.h'. */
-#define SMulDiv FT_MulDiv
+#define SMulDiv FT_MulDiv
+#define SMulDiv_No_Round FT_MulDiv_No_Round
/* The rasterizer is a very general purpose component; please leave */
/* the following redefinitions there (you never know your target */
@@ -302,6 +310,7 @@
typedef short Short;
typedef unsigned short UShort, *PUShort;
typedef long Long, *PLong;
+ typedef unsigned long ULong;
typedef unsigned char Byte, *PByte;
typedef char Bool;
@@ -440,12 +449,14 @@
#define FLOOR( x ) ( (x) & -ras.precision )
#define CEILING( x ) ( ( (x) + ras.precision - 1 ) & -ras.precision )
-#define TRUNC( x ) ( (signed long)(x) >> ras.precision_bits )
+#define TRUNC( x ) ( (Long)(x) >> ras.precision_bits )
#define FRAC( x ) ( (x) & ( ras.precision - 1 ) )
-#define SCALED( x ) ( ( (x) << ras.scale_shift ) - ras.precision_half )
+#define SCALED( x ) ( ( (ULong)(x) << ras.scale_shift ) - ras.precision_half )
-#define IS_BOTTOM_OVERSHOOT( x ) ( CEILING( x ) - x >= ras.precision_half )
-#define IS_TOP_OVERSHOOT( x ) ( x - FLOOR( x ) >= ras.precision_half )
+#define IS_BOTTOM_OVERSHOOT( x ) \
+ (Bool)( CEILING( x ) - x >= ras.precision_half )
+#define IS_TOP_OVERSHOOT( x ) \
+ (Bool)( x - FLOOR( x ) >= ras.precision_half )
/* The most used variables are positioned at the top of the structure. */
/* Thus, their offset can be coded with less opcodes, resulting in a */
@@ -654,7 +665,7 @@
/* Set precision variables according to param flag. */
/* */
/* <Input> */
- /* High :: Set to True for high precision (typically for ppem < 18), */
+ /* High :: Set to True for high precision (typically for ppem < 24), */
/* false otherwise. */
/* */
static void
@@ -734,7 +745,7 @@
if ( ras.top >= ras.maxBuff )
{
- ras.error = Raster_Err_Overflow;
+ ras.error = FT_THROW( Overflow );
return FAILURE;
}
@@ -764,7 +775,7 @@
default:
FT_ERROR(( "New_Profile: invalid profile direction\n" ));
- ras.error = Raster_Err_Invalid;
+ ras.error = FT_THROW( Invalid );
return FAILURE;
}
@@ -797,8 +808,7 @@
static Bool
End_Profile( RAS_ARGS Bool overshoot )
{
- Long h;
- PProfile oldProfile;
+ Long h;
h = (Long)( ras.top - ras.cProfile->offset );
@@ -806,12 +816,15 @@
if ( h < 0 )
{
FT_ERROR(( "End_Profile: negative height encountered\n" ));
- ras.error = Raster_Err_Neg_Height;
+ ras.error = FT_THROW( Neg_Height );
return FAILURE;
}
if ( h > 0 )
{
+ PProfile oldProfile;
+
+
FT_TRACE6(( "Ending profile %p, start = %ld, height = %ld\n",
ras.cProfile, ras.cProfile->start, h ));
@@ -839,7 +852,7 @@
if ( ras.top >= ras.maxBuff )
{
FT_TRACE1(( "overflow in End_Profile\n" ));
- ras.error = Raster_Err_Overflow;
+ ras.error = FT_THROW( Overflow );
return FAILURE;
}
@@ -868,7 +881,7 @@
Insert_Y_Turn( RAS_ARGS Int y )
{
PLong y_turns;
- Int y2, n;
+ Int n;
n = ras.numTurns - 1;
@@ -882,7 +895,9 @@
if ( n >= 0 && y > y_turns[n] )
while ( n >= 0 )
{
- y2 = (Int)y_turns[n];
+ Int y2 = (Int)y_turns[n];
+
+
y_turns[n] = y;
y = y2;
n--;
@@ -893,7 +908,7 @@
ras.maxBuff--;
if ( ras.maxBuff <= ras.top )
{
- ras.error = Raster_Err_Overflow;
+ ras.error = FT_THROW( Overflow );
return FAILURE;
}
ras.numTurns++;
@@ -918,7 +933,6 @@
static Bool
Finalize_Profile_Table( RAS_ARG )
{
- Int bottom, top;
UShort n;
PProfile p;
@@ -930,6 +944,9 @@
{
while ( n > 0 )
{
+ Int bottom, top;
+
+
if ( n > 1 )
p->link = (PProfile)( p->offset + p->height );
else
@@ -1144,20 +1161,20 @@
size = e2 - e1 + 1;
if ( ras.top + size >= ras.maxBuff )
{
- ras.error = Raster_Err_Overflow;
+ ras.error = FT_THROW( Overflow );
return FAILURE;
}
if ( Dx > 0 )
{
- Ix = SMulDiv( ras.precision, Dx, Dy);
+ Ix = SMulDiv_No_Round( ras.precision, Dx, Dy );
Rx = ( ras.precision * Dx ) % Dy;
Dx = 1;
}
else
{
- Ix = SMulDiv( ras.precision, -Dx, Dy) * -1;
- Rx = ( ras.precision * -Dx ) % Dy;
+ Ix = -SMulDiv_No_Round( ras.precision, -Dx, Dy );
+ Rx = ( ras.precision * -Dx ) % Dy;
Dx = -1;
}
@@ -1319,7 +1336,7 @@
if ( ( top + TRUNC( e2 - e ) + 1 ) >= ras.maxBuff )
{
ras.top = top;
- ras.error = Raster_Err_Overflow;
+ ras.error = FT_THROW( Overflow );
return FAILURE;
}
@@ -1857,7 +1874,7 @@
v_start.x = ( v_start.x + v_last.x ) / 2;
v_start.y = ( v_start.y + v_last.y ) / 2;
- v_last = v_start;
+ /* v_last = v_start; */
}
point--;
tags--;
@@ -1994,7 +2011,7 @@
return SUCCESS;
Invalid_Outline:
- ras.error = Raster_Err_Invalid;
+ ras.error = FT_THROW( Invalid );
Fail:
return FAILURE;
@@ -2023,8 +2040,6 @@
int i;
unsigned start;
- PProfile lastProfile;
-
ras.fProfile = NULL;
ras.joint = FALSE;
@@ -2042,7 +2057,8 @@
for ( i = 0; i < ras.outline.n_contours; i++ )
{
- Bool o;
+ PProfile lastProfile;
+ Bool o;
ras.state = Unknown_State;
@@ -2266,10 +2282,10 @@
PProfile right )
{
Long e1, e2;
- int c1, c2;
- Byte f1, f2;
Byte* target;
+ Int dropOutControl = left->flags & 7;
+
FT_UNUSED( y );
FT_UNUSED( left );
FT_UNUSED( right );
@@ -2279,13 +2295,18 @@
e1 = TRUNC( CEILING( x1 ) );
- if ( x2 - x1 - ras.precision <= ras.precision_jitter )
+ if ( dropOutControl != 2 &&
+ x2 - x1 - ras.precision <= ras.precision_jitter )
e2 = e1;
else
e2 = TRUNC( FLOOR( x2 ) );
if ( e2 >= 0 && e1 < ras.bWidth )
{
+ int c1, c2;
+ Byte f1, f2;
+
+
if ( e1 < 0 )
e1 = 0;
if ( e2 >= ras.bWidth )
@@ -2509,27 +2530,30 @@
PProfile left,
PProfile right )
{
- Long e1, e2;
- PByte bits;
- Byte f1;
-
FT_UNUSED( left );
FT_UNUSED( right );
if ( x2 - x1 < ras.precision )
{
+ Long e1, e2;
+
+
e1 = CEILING( x1 );
e2 = FLOOR ( x2 );
if ( e1 == e2 )
{
+ Byte f1;
+ PByte bits;
+
+
bits = ras.bTarget + ( y >> 3 );
f1 = (Byte)( 0x80 >> ( y & 7 ) );
e1 = TRUNC( e1 );
- if ( e1 >= 0 && e1 < ras.target.rows )
+ if ( e1 >= 0 && (ULong)e1 < ras.target.rows )
{
PByte p;
@@ -2623,7 +2647,7 @@
/* bounding box instead */
if ( pxl < 0 )
pxl = e1;
- else if ( TRUNC( pxl ) >= ras.target.rows )
+ else if ( (ULong)( TRUNC( pxl ) ) >= ras.target.rows )
pxl = e2;
/* check that the other pixel isn't set */
@@ -2638,9 +2662,9 @@
if ( ras.target.pitch > 0 )
bits += ( ras.target.rows - 1 ) * ras.target.pitch;
- if ( e1 >= 0 &&
- e1 < ras.target.rows &&
- *bits & f1 )
+ if ( e1 >= 0 &&
+ (ULong)e1 < ras.target.rows &&
+ *bits & f1 )
return;
}
else
@@ -2652,7 +2676,7 @@
e1 = TRUNC( pxl );
- if ( e1 >= 0 && e1 < ras.target.rows )
+ if ( e1 >= 0 && (ULong)e1 < ras.target.rows )
{
bits -= e1 * ras.target.pitch;
if ( ras.target.pitch > 0 )
@@ -2720,8 +2744,6 @@
static void
Vertical_Gray_Sweep_Step( RAS_ARG )
{
- Int c1, c2;
- PByte pix, bit, bit2;
short* count = (short*)count_table;
Byte* grays;
@@ -2730,6 +2752,9 @@
if ( ras.traceOfs > ras.gray_width )
{
+ PByte pix;
+
+
pix = ras.gTarget + ras.traceG + ras.gray_min_x * 4;
grays = ras.grays;
@@ -2740,6 +2765,9 @@
Int last_bit = last_pixel & 3;
Bool over = 0;
+ Int c1, c2;
+ PByte bit, bit2;
+
if ( ras.gray_max_x >= last_cell && last_bit != 3 )
{
@@ -2832,7 +2860,6 @@
{
Long e1, e2;
PByte pixel;
- Byte color;
/* During the horizontal sweep, we only take care of drop-outs */
@@ -2886,6 +2913,9 @@
if ( e1 >= 0 )
{
+ Byte color;
+
+
if ( x2 - x1 >= ras.precision_half )
color = ras.grays[2];
else
@@ -2963,7 +2993,7 @@
/* check the Y-turns */
if ( ras.numTurns == 0 )
{
- ras.error = Raster_Err_Invalid;
+ ras.error = FT_THROW( Invalid );
return FAILURE;
}
@@ -3204,7 +3234,7 @@
if ( ras.band_top >= 7 || k < i )
{
ras.band_top = 0;
- ras.error = Raster_Err_Invalid;
+ ras.error = FT_THROW( Invalid );
return ras.error;
}
@@ -3393,7 +3423,7 @@
{
FT_UNUSED_RASTER;
- return Raster_Err_Unsupported;
+ return FT_THROW( Unsupported );
}
#endif /* !FT_RASTER_OPTION_ANTI_ALIASING */
@@ -3498,7 +3528,8 @@
raster->buffer = pool_base + ( ( sizeof ( *worker ) + 7 ) & ~7 );
- raster->buffer_size = pool_base + pool_size - (char*)raster->buffer;
+ raster->buffer_size = (long)( pool_base + pool_size -
+ (char*)raster->buffer );
raster->worker = worker;
}
else
@@ -3511,7 +3542,7 @@
}
- static void
+ static int
ft_black_set_mode( black_PRaster raster,
unsigned long mode,
const char* palette )
@@ -3535,6 +3566,8 @@
FT_UNUSED( palette );
#endif
+
+ return 0;
}
@@ -3548,37 +3581,37 @@
if ( !raster || !raster->buffer || !raster->buffer_size )
- return Raster_Err_Not_Ini;
+ return FT_THROW( Not_Ini );
if ( !outline )
- return Raster_Err_Invalid;
+ return FT_THROW( Invalid );
/* return immediately if the outline is empty */
if ( outline->n_points == 0 || outline->n_contours <= 0 )
return Raster_Err_None;
if ( !outline->contours || !outline->points )
- return Raster_Err_Invalid;
+ return FT_THROW( Invalid );
if ( outline->n_points !=
outline->contours[outline->n_contours - 1] + 1 )
- return Raster_Err_Invalid;
+ return FT_THROW( Invalid );
worker = raster->worker;
/* this version of the raster does not support direct rendering, sorry */
if ( params->flags & FT_RASTER_FLAG_DIRECT )
- return Raster_Err_Unsupported;
+ return FT_THROW( Unsupported );
if ( !target_map )
- return Raster_Err_Invalid;
+ return FT_THROW( Invalid );
/* nothing to do */
if ( !target_map->width || !target_map->rows )
return Raster_Err_None;
if ( !target_map->buffer )
- return Raster_Err_Invalid;
+ return FT_THROW( Invalid );
ras.outline = *outline;
ras.target = *target_map;
diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c
index 859cb7d..aa7f6d5 100644
--- a/src/raster/ftrend1.c
+++ b/src/raster/ftrend1.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer interface (body). */
/* */
-/* Copyright 1996-2003, 2005, 2006, 2011 by */
+/* Copyright 1996-2003, 2005, 2006, 2011, 2013 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_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
#include FT_OUTLINE_H
#include "ftrend1.h"
@@ -37,7 +38,7 @@
library->raster_pool,
library->raster_pool_size );
- return Raster_Err_Ok;
+ return FT_Err_Ok;
}
@@ -61,12 +62,12 @@
const FT_Matrix* matrix,
const FT_Vector* delta )
{
- FT_Error error = Raster_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( slot->format != render->glyph_format )
{
- error = Raster_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -114,7 +115,7 @@
/* check glyph image format */
if ( slot->format != render->glyph_format )
{
- error = Raster_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -124,13 +125,13 @@
{
/* raster1 is only capable of producing monochrome bitmaps */
if ( render->clazz == &ft_raster1_renderer_class )
- return Raster_Err_Cannot_Render_Glyph;
+ return FT_THROW( Cannot_Render_Glyph );
}
else
{
/* raster5 is only capable of producing 5-gray-levels bitmaps */
if ( render->clazz == &ft_raster5_renderer_class )
- return Raster_Err_Cannot_Render_Glyph;
+ return FT_THROW( Cannot_Render_Glyph );
}
#else /* FT_CONFIG_OPTION_PIC */
/* When PIC is enabled, we cannot get to the class object */
@@ -142,13 +143,13 @@
{
/* raster1 is only capable of producing monochrome bitmaps */
if ( render->clazz->root.module_name[6] == '1' )
- return Raster_Err_Cannot_Render_Glyph;
+ return FT_THROW( Cannot_Render_Glyph );
}
else
{
/* raster5 is only capable of producing 5-gray-levels bitmaps */
if ( render->clazz->root.module_name[6] == '5' )
- return Raster_Err_Cannot_Render_Glyph;
+ return FT_THROW( Cannot_Render_Glyph );
}
#endif /* FT_CONFIG_OPTION_PIC */
@@ -179,7 +180,7 @@
if ( width > FT_USHORT_MAX || height > FT_USHORT_MAX )
{
- error = Raster_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
diff --git a/src/raster/rastpic.c b/src/raster/rastpic.c
index 2883e3f..5e9f7cc 100644
--- a/src/raster/rastpic.c
+++ b/src/raster/rastpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for raster module. */
/* */
-/* Copyright 2009, 2010 by */
+/* Copyright 2009, 2010, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,22 +22,26 @@
#include "rastpic.h"
#include "rasterrs.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from ftraster.c */
void
FT_Init_Class_ft_standard_raster( FT_Raster_Funcs* funcs );
+
void
ft_raster1_renderer_class_pic_free( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Memory memory = library->memory;
+ FT_Memory memory = library->memory;
if ( pic_container->raster )
{
- RasterPIC* container = (RasterPIC*)pic_container->raster;
+ RasterPIC* container = (RasterPIC*)pic_container->raster;
+
+
if ( --container->ref_count )
return;
FT_FREE( container );
@@ -49,14 +53,14 @@
FT_Error
ft_raster1_renderer_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = Raster_Err_Ok;
- RasterPIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = FT_Err_Ok;
+ RasterPIC* container = NULL;
+ FT_Memory memory = library->memory;
- /* since this function also serve raster5 renderer,
- it implements reference counting */
+ /* since this function also serves raster5 renderer, */
+ /* it implements reference counting */
if ( pic_container->raster )
{
((RasterPIC*)pic_container->raster)->ref_count++;
@@ -68,16 +72,17 @@
return error;
FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->raster = container;
+
container->ref_count = 1;
- /* initialize pointer table - this is how the module usually expects this data */
+ /* initialize pointer table - */
+ /* this is how the module usually expects this data */
FT_Init_Class_ft_standard_raster( &container->ft_standard_raster );
-/*Exit:*/
- if( error )
- ft_raster1_renderer_class_pic_free( library );
+
return error;
}
+
/* re-route these init and free functions to the above functions */
FT_Error
ft_raster5_renderer_class_pic_init( FT_Library library )
@@ -85,6 +90,7 @@
return ft_raster1_renderer_class_pic_init( library );
}
+
void
ft_raster5_renderer_class_pic_free( FT_Library library )
{
diff --git a/src/raster/rastpic.h b/src/raster/rastpic.h
index 7822a24..e0ddba6 100644
--- a/src/raster/rastpic.h
+++ b/src/raster/rastpic.h
@@ -24,19 +24,25 @@ FT_BEGIN_HEADER
#include FT_INTERNAL_PIC_H
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_STANDARD_RASTER_GET ft_standard_raster
+
+#define FT_STANDARD_RASTER_GET ft_standard_raster
#else /* FT_CONFIG_OPTION_PIC */
- typedef struct RasterPIC_
+ typedef struct RasterPIC_
{
- int ref_count;
- FT_Raster_Funcs ft_standard_raster;
+ int ref_count;
+ FT_Raster_Funcs ft_standard_raster;
+
} RasterPIC;
-#define GET_PIC(lib) ((RasterPIC*)((lib)->pic_container.raster))
-#define FT_STANDARD_RASTER_GET (GET_PIC(library)->ft_standard_raster)
+
+#define GET_PIC( lib ) \
+ ( (RasterPIC*)( (lib)->pic_container.raster ) )
+#define FT_STANDARD_RASTER_GET ( GET_PIC( library )->ft_standard_raster )
+
/* see rastpic.c for the implementation */
void
diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c
new file mode 100644
index 0000000..9bfcc2a
--- /dev/null
+++ b/src/sfnt/pngshim.c
@@ -0,0 +1,377 @@
+/***************************************************************************/
+/* */
+/* pngshim.c */
+/* */
+/* PNG Bitmap glyph support. */
+/* */
+/* Copyright 2013, 2014 by Google, Inc. */
+/* Written by Stuart Gill and Behdad Esfahbod. */
+/* */
+/* 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_DEBUG_H
+#include FT_INTERNAL_STREAM_H
+#include FT_TRUETYPE_TAGS_H
+#include FT_CONFIG_STANDARD_LIBRARY_H
+
+
+#ifdef FT_CONFIG_OPTION_USE_PNG
+
+ /* We always include <stjmp.h>, so make libpng shut up! */
+#define PNG_SKIP_SETJMP_CHECK 1
+#include <png.h>
+#include "pngshim.h"
+
+#include "sferrors.h"
+
+
+ /* This code is freely based on cairo-png.c. There's so many ways */
+ /* to call libpng, and the way cairo does it is defacto standard. */
+
+ static int
+ multiply_alpha( int alpha,
+ int color )
+ {
+ int temp = ( alpha * color ) + 0x80;
+
+
+ return ( temp + ( temp >> 8 ) ) >> 8;
+ }
+
+
+ /* Premultiplies data and converts RGBA bytes => native endian. */
+ static void
+ premultiply_data( png_structp png,
+ png_row_infop row_info,
+ png_bytep data )
+ {
+ unsigned int i;
+
+ FT_UNUSED( png );
+
+
+ for ( i = 0; i < row_info->rowbytes; i += 4 )
+ {
+ unsigned char* base = &data[i];
+ unsigned int alpha = base[3];
+
+
+ if ( alpha == 0 )
+ base[0] = base[1] = base[2] = base[3] = 0;
+
+ else
+ {
+ unsigned int red = base[0];
+ unsigned int green = base[1];
+ unsigned int blue = base[2];
+
+
+ if ( alpha != 0xFF )
+ {
+ red = multiply_alpha( alpha, red );
+ green = multiply_alpha( alpha, green );
+ blue = multiply_alpha( alpha, blue );
+ }
+
+ base[0] = blue;
+ base[1] = green;
+ base[2] = red;
+ base[3] = alpha;
+ }
+ }
+ }
+
+
+ /* Converts RGBx bytes to BGRA. */
+ static void
+ convert_bytes_to_data( png_structp png,
+ png_row_infop row_info,
+ png_bytep data )
+ {
+ unsigned int i;
+
+ FT_UNUSED( png );
+
+
+ for ( i = 0; i < row_info->rowbytes; i += 4 )
+ {
+ unsigned char* base = &data[i];
+ unsigned int red = base[0];
+ unsigned int green = base[1];
+ unsigned int blue = base[2];
+
+
+ base[0] = blue;
+ base[1] = green;
+ base[2] = red;
+ base[3] = 0xFF;
+ }
+ }
+
+
+ /* Use error callback to avoid png writing to stderr. */
+ static void
+ error_callback( png_structp png,
+ png_const_charp error_msg )
+ {
+ FT_Error* error = (FT_Error*)png_get_error_ptr( png );
+
+ FT_UNUSED( error_msg );
+
+
+ *error = FT_THROW( Out_Of_Memory );
+#ifdef PNG_SETJMP_SUPPORTED
+ ft_longjmp( png_jmpbuf( png ), 1 );
+#endif
+ /* if we get here, then we have no choice but to abort ... */
+ }
+
+
+ /* Use warning callback to avoid png writing to stderr. */
+ static void
+ warning_callback( png_structp png,
+ png_const_charp error_msg )
+ {
+ FT_UNUSED( png );
+ FT_UNUSED( error_msg );
+
+ /* Just ignore warnings. */
+ }
+
+
+ static void
+ read_data_from_FT_Stream( png_structp png,
+ png_bytep data,
+ png_size_t length )
+ {
+ FT_Error error;
+ png_voidp p = png_get_io_ptr( png );
+ FT_Stream stream = (FT_Stream)p;
+
+
+ if ( FT_FRAME_ENTER( length ) )
+ {
+ FT_Error* e = (FT_Error*)png_get_error_ptr( png );
+
+
+ *e = FT_THROW( Invalid_Stream_Read );
+ png_error( png, NULL );
+
+ return;
+ }
+
+ memcpy( data, stream->cursor, length );
+
+ FT_FRAME_EXIT();
+ }
+
+
+ FT_LOCAL_DEF( FT_Error )
+ Load_SBit_Png( FT_GlyphSlot slot,
+ FT_Int x_offset,
+ FT_Int y_offset,
+ FT_Int pix_bits,
+ TT_SBit_Metrics metrics,
+ FT_Memory memory,
+ FT_Byte* data,
+ FT_UInt png_len,
+ FT_Bool populate_map_and_metrics )
+ {
+ FT_Bitmap *map = &slot->bitmap;
+ FT_Error error = FT_Err_Ok;
+ FT_StreamRec stream;
+
+ png_structp png;
+ png_infop info;
+ png_uint_32 imgWidth, imgHeight;
+
+ int bitdepth, color_type, interlace;
+ FT_Int i;
+ png_byte* *rows = NULL; /* pacify compiler */
+
+
+ if ( x_offset < 0 ||
+ y_offset < 0 )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
+ if ( !populate_map_and_metrics &&
+ ( (FT_UInt)x_offset + metrics->width > map->width ||
+ (FT_UInt)y_offset + metrics->height > map->rows ||
+ pix_bits != 32 ||
+ map->pixel_mode != FT_PIXEL_MODE_BGRA ) )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+
+ FT_Stream_OpenMemory( &stream, data, png_len );
+
+ png = png_create_read_struct( PNG_LIBPNG_VER_STRING,
+ &error,
+ error_callback,
+ warning_callback );
+ if ( !png )
+ {
+ error = FT_THROW( Out_Of_Memory );
+ goto Exit;
+ }
+
+ info = png_create_info_struct( png );
+ if ( !info )
+ {
+ error = FT_THROW( Out_Of_Memory );
+ png_destroy_read_struct( &png, NULL, NULL );
+ goto Exit;
+ }
+
+ if ( ft_setjmp( png_jmpbuf( png ) ) )
+ {
+ error = FT_THROW( Invalid_File_Format );
+ goto DestroyExit;
+ }
+
+ png_set_read_fn( png, &stream, read_data_from_FT_Stream );
+
+ png_read_info( png, info );
+ png_get_IHDR( png, info,
+ &imgWidth, &imgHeight,
+ &bitdepth, &color_type, &interlace,
+ NULL, NULL );
+
+ if ( error ||
+ ( !populate_map_and_metrics &&
+ ( (FT_Int)imgWidth != metrics->width ||
+ (FT_Int)imgHeight != metrics->height ) ) )
+ goto DestroyExit;
+
+ if ( populate_map_and_metrics )
+ {
+ FT_Long size;
+
+
+ metrics->width = (FT_Int)imgWidth;
+ metrics->height = (FT_Int)imgHeight;
+
+ map->width = metrics->width;
+ map->rows = metrics->height;
+ map->pixel_mode = FT_PIXEL_MODE_BGRA;
+ map->pitch = map->width * 4;
+ map->num_grays = 256;
+
+ /* reject too large bitmaps similarly to the rasterizer */
+ if ( map->rows > 0x7FFF || map->width > 0x7FFF )
+ {
+ error = FT_THROW( Array_Too_Large );
+ goto DestroyExit;
+ }
+
+ /* this doesn't overflow: 0x7FFF * 0x7FFF * 4 < 2^32 */
+ size = map->rows * map->pitch;
+
+ error = ft_glyphslot_alloc_bitmap( slot, size );
+ if ( error )
+ goto DestroyExit;
+ }
+
+ /* convert palette/gray image to rgb */
+ if ( color_type == PNG_COLOR_TYPE_PALETTE )
+ png_set_palette_to_rgb( png );
+
+ /* expand gray bit depth if needed */
+ if ( color_type == PNG_COLOR_TYPE_GRAY )
+ {
+#if PNG_LIBPNG_VER >= 10209
+ png_set_expand_gray_1_2_4_to_8( png );
+#else
+ png_set_gray_1_2_4_to_8( png );
+#endif
+ }
+
+ /* transform transparency to alpha */
+ if ( png_get_valid(png, info, PNG_INFO_tRNS ) )
+ png_set_tRNS_to_alpha( png );
+
+ if ( bitdepth == 16 )
+ png_set_strip_16( png );
+
+ if ( bitdepth < 8 )
+ png_set_packing( png );
+
+ /* convert grayscale to RGB */
+ if ( color_type == PNG_COLOR_TYPE_GRAY ||
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA )
+ png_set_gray_to_rgb( png );
+
+ if ( interlace != PNG_INTERLACE_NONE )
+ png_set_interlace_handling( png );
+
+ png_set_filler( png, 0xFF, PNG_FILLER_AFTER );
+
+ /* recheck header after setting EXPAND options */
+ png_read_update_info(png, info );
+ png_get_IHDR( png, info,
+ &imgWidth, &imgHeight,
+ &bitdepth, &color_type, &interlace,
+ NULL, NULL );
+
+ if ( bitdepth != 8 ||
+ !( color_type == PNG_COLOR_TYPE_RGB ||
+ color_type == PNG_COLOR_TYPE_RGB_ALPHA ) )
+ {
+ error = FT_THROW( Invalid_File_Format );
+ goto DestroyExit;
+ }
+
+ switch ( color_type )
+ {
+ default:
+ /* Shouldn't happen, but fall through. */
+
+ case PNG_COLOR_TYPE_RGB_ALPHA:
+ png_set_read_user_transform_fn( png, premultiply_data );
+ break;
+
+ case PNG_COLOR_TYPE_RGB:
+ /* Humm, this smells. Carry on though. */
+ png_set_read_user_transform_fn( png, convert_bytes_to_data );
+ break;
+ }
+
+ if ( FT_NEW_ARRAY( rows, imgHeight ) )
+ {
+ error = FT_THROW( Out_Of_Memory );
+ goto DestroyExit;
+ }
+
+ for ( i = 0; i < (FT_Int)imgHeight; i++ )
+ rows[i] = map->buffer + ( y_offset + i ) * map->pitch + x_offset * 4;
+
+ png_read_image( png, rows );
+
+ FT_FREE( rows );
+
+ png_read_end( png, info );
+
+ DestroyExit:
+ png_destroy_read_struct( &png, &info, NULL );
+ FT_Stream_Close( &stream );
+
+ Exit:
+ return error;
+ }
+
+#endif /* FT_CONFIG_OPTION_USE_PNG */
+
+
+/* END */
diff --git a/src/sfnt/pngshim.h b/src/sfnt/pngshim.h
new file mode 100644
index 0000000..dc9ecaf
--- /dev/null
+++ b/src/sfnt/pngshim.h
@@ -0,0 +1,49 @@
+/***************************************************************************/
+/* */
+/* pngshim.h */
+/* */
+/* PNG Bitmap glyph support. */
+/* */
+/* Copyright 2013 by Google, Inc. */
+/* Written by Stuart Gill and Behdad Esfahbod. */
+/* */
+/* 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 __PNGSHIM_H__
+#define __PNGSHIM_H__
+
+
+#include <ft2build.h>
+#include "ttload.h"
+
+
+FT_BEGIN_HEADER
+
+#ifdef FT_CONFIG_OPTION_USE_PNG
+
+ FT_LOCAL( FT_Error )
+ Load_SBit_Png( FT_GlyphSlot slot,
+ FT_Int x_offset,
+ FT_Int y_offset,
+ FT_Int pix_bits,
+ TT_SBit_Metrics metrics,
+ FT_Memory memory,
+ FT_Byte* data,
+ FT_UInt png_len,
+ FT_Bool populate_map_and_metrics );
+
+#endif
+
+FT_END_HEADER
+
+#endif /* __PNGSHIM_H__ */
+
+
+/* END */
diff --git a/src/sfnt/rules.mk b/src/sfnt/rules.mk
index 02cee58..a6c956a 100644
--- a/src/sfnt/rules.mk
+++ b/src/sfnt/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2011 by
+# Copyright 1996-2000, 2002-2007, 2009, 2011, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -34,15 +34,13 @@ SFNT_DRV_SRC := $(SFNT_DIR)/ttload.c \
$(SFNT_DIR)/ttbdf.c \
$(SFNT_DIR)/sfobjs.c \
$(SFNT_DIR)/sfdriver.c \
- $(SFNT_DIR)/sfntpic.c
+ $(SFNT_DIR)/sfntpic.c \
+ $(SFNT_DIR)/pngshim.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_DIR)/sferrors.h
# SFNT driver object(s)
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 847d83d..badb159 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -4,7 +4,7 @@
/* */
/* High-level SFNT driver interface (body). */
/* */
-/* Copyright 1996-2007, 2009-2011 by */
+/* Copyright 1996-2007, 2009-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -50,6 +50,7 @@
#include FT_SERVICE_SFNT_H
#include FT_SERVICE_TT_CMAP_H
+
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
@@ -60,10 +61,10 @@
#define FT_COMPONENT trace_sfdriver
- /*
- * SFNT TABLE SERVICE
- *
- */
+ /*
+ * SFNT TABLE SERVICE
+ *
+ */
static void*
get_sfnt_table( TT_Face face,
@@ -74,36 +75,36 @@
switch ( tag )
{
- case ft_sfnt_head:
+ case FT_SFNT_HEAD:
table = &face->header;
break;
- case ft_sfnt_hhea:
+ case FT_SFNT_HHEA:
table = &face->horizontal;
break;
- case ft_sfnt_vhea:
- table = face->vertical_info ? &face->vertical : 0;
+ case FT_SFNT_VHEA:
+ table = face->vertical_info ? &face->vertical : NULL;
break;
- case ft_sfnt_os2:
- table = face->os2.version == 0xFFFFU ? 0 : &face->os2;
+ case FT_SFNT_OS2:
+ table = face->os2.version == 0xFFFFU ? NULL : &face->os2;
break;
- case ft_sfnt_post:
+ case FT_SFNT_POST:
table = &face->postscript;
break;
- case ft_sfnt_maxp:
+ case FT_SFNT_MAXP:
table = &face->max_profile;
break;
- case ft_sfnt_pclt:
- table = face->pclt.Version ? &face->pclt : 0;
+ case FT_SFNT_PCLT:
+ table = face->pclt.Version ? &face->pclt : NULL;
break;
default:
- table = 0;
+ table = NULL;
}
return table;
@@ -118,37 +119,37 @@
FT_ULong *length )
{
if ( !offset || !length )
- return SFNT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( !tag )
*length = face->num_tables;
else
{
if ( idx >= face->num_tables )
- return SFNT_Err_Table_Missing;
+ return FT_THROW( Table_Missing );
*tag = face->dir_tables[idx].Tag;
*offset = face->dir_tables[idx].Offset;
*length = face->dir_tables[idx].Length;
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
- FT_DEFINE_SERVICE_SFNT_TABLEREC(sfnt_service_sfnt_table,
+ FT_DEFINE_SERVICE_SFNT_TABLEREC(
+ sfnt_service_sfnt_table,
(FT_SFNT_TableLoadFunc)tt_face_load_any,
(FT_SFNT_TableGetFunc) get_sfnt_table,
- (FT_SFNT_TableInfoFunc)sfnt_table_info
- )
+ (FT_SFNT_TableInfoFunc)sfnt_table_info )
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
- /*
- * GLYPH DICT SERVICE
- *
- */
+ /*
+ * GLYPH DICT SERVICE
+ *
+ */
static FT_Error
sfnt_get_glyph_name( TT_Face face,
@@ -172,17 +173,18 @@
sfnt_get_name_index( TT_Face face,
FT_String* glyph_name )
{
- FT_Face root = &face->root;
- FT_UInt i, max_gid = FT_UINT_MAX;
+ FT_Face root = &face->root;
+
+ FT_UInt i, max_gid = FT_UINT_MAX;
if ( root->num_glyphs < 0 )
return 0;
- else if ( ( FT_ULong ) root->num_glyphs < FT_UINT_MAX )
- max_gid = ( FT_UInt ) root->num_glyphs;
+ else if ( (FT_ULong)root->num_glyphs < FT_UINT_MAX )
+ max_gid = (FT_UInt)root->num_glyphs;
else
FT_TRACE0(( "Ignore glyph names for invalid GID 0x%08x - 0x%08x\n",
- FT_UINT_MAX, root->num_glyphs ));
+ FT_UINT_MAX, root->num_glyphs ));
for ( i = 0; i < max_gid; i++ )
{
@@ -201,18 +203,19 @@
}
- FT_DEFINE_SERVICE_GLYPHDICTREC(sfnt_service_glyph_dict,
+ FT_DEFINE_SERVICE_GLYPHDICTREC(
+ sfnt_service_glyph_dict,
(FT_GlyphDict_GetNameFunc) sfnt_get_glyph_name,
- (FT_GlyphDict_NameIndexFunc)sfnt_get_name_index
- )
+ (FT_GlyphDict_NameIndexFunc)sfnt_get_name_index )
+
#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
- /*
- * POSTSCRIPT NAME SERVICE
- *
- */
+ /*
+ * POSTSCRIPT NAME SERVICE
+ *
+ */
static const char*
sfnt_get_ps_name( TT_Face face )
@@ -254,7 +257,7 @@
FT_Memory memory = face->root.memory;
TT_NameEntryRec* name = face->name_table.names + found_win;
FT_UInt len = name->stringLength / 2;
- FT_Error error = SFNT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( error );
@@ -263,7 +266,7 @@
{
FT_Stream stream = face->name_table.stream;
FT_String* r = (FT_String*)result;
- FT_Byte* p = (FT_Byte*)name->string;
+ FT_Byte* p;
if ( FT_STREAM_SEEK( name->stringOffset ) ||
@@ -296,7 +299,7 @@
FT_Memory memory = face->root.memory;
TT_NameEntryRec* name = face->name_table.names + found_apple;
FT_UInt len = name->stringLength;
- FT_Error error = SFNT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( error );
@@ -324,17 +327,18 @@
return result;
}
- FT_DEFINE_SERVICE_PSFONTNAMEREC(sfnt_service_ps_name,
- (FT_PsName_GetFunc)sfnt_get_ps_name
- )
+
+ FT_DEFINE_SERVICE_PSFONTNAMEREC(
+ sfnt_service_ps_name,
+ (FT_PsName_GetFunc)sfnt_get_ps_name )
/*
* TT CMAP INFO
*/
- FT_DEFINE_SERVICE_TTCMAPSREC(tt_service_get_cmap_info,
- (TT_CMap_Info_GetFunc)tt_get_cmap_info
- )
+ FT_DEFINE_SERVICE_TTCMAPSREC(
+ tt_service_get_cmap_info,
+ (TT_CMap_Info_GetFunc)tt_get_cmap_info )
#ifdef TT_CONFIG_OPTION_BDF
@@ -367,7 +371,7 @@
*acharset_registry = registry.u.atom;
}
else
- error = SFNT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
}
}
@@ -375,10 +379,11 @@
}
- FT_DEFINE_SERVICE_BDFRec(sfnt_service_bdf,
- (FT_BDF_GetCharsetIdFunc) sfnt_get_charset_id,
- (FT_BDF_GetPropertyFunc) tt_face_find_bdf_prop
- )
+ FT_DEFINE_SERVICE_BDFRec(
+ sfnt_service_bdf,
+ (FT_BDF_GetCharsetIdFunc)sfnt_get_charset_id,
+ (FT_BDF_GetPropertyFunc) tt_face_find_bdf_prop )
+
#endif /* TT_CONFIG_OPTION_BDF */
@@ -388,33 +393,33 @@
*/
#if defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES && defined TT_CONFIG_OPTION_BDF
- FT_DEFINE_SERVICEDESCREC5(sfnt_services,
- FT_SERVICE_ID_SFNT_TABLE, &FT_SFNT_SERVICE_SFNT_TABLE_GET,
- FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_SFNT_SERVICE_PS_NAME_GET,
- FT_SERVICE_ID_GLYPH_DICT, &FT_SFNT_SERVICE_GLYPH_DICT_GET,
- FT_SERVICE_ID_BDF, &FT_SFNT_SERVICE_BDF_GET,
- FT_SERVICE_ID_TT_CMAP, &FT_TT_SERVICE_GET_CMAP_INFO_GET
- )
+ FT_DEFINE_SERVICEDESCREC5(
+ sfnt_services,
+ FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET,
+ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,
+ FT_SERVICE_ID_GLYPH_DICT, &SFNT_SERVICE_GLYPH_DICT_GET,
+ FT_SERVICE_ID_BDF, &SFNT_SERVICE_BDF_GET,
+ FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET )
#elif defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES
- FT_DEFINE_SERVICEDESCREC4(sfnt_services,
- FT_SERVICE_ID_SFNT_TABLE, &FT_SFNT_SERVICE_SFNT_TABLE_GET,
- FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_SFNT_SERVICE_PS_NAME_GET,
- FT_SERVICE_ID_GLYPH_DICT, &FT_SFNT_SERVICE_GLYPH_DICT_GET,
- FT_SERVICE_ID_TT_CMAP, &FT_TT_SERVICE_GET_CMAP_INFO_GET
- )
+ FT_DEFINE_SERVICEDESCREC4(
+ sfnt_services,
+ FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET,
+ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,
+ FT_SERVICE_ID_GLYPH_DICT, &SFNT_SERVICE_GLYPH_DICT_GET,
+ FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET )
#elif defined TT_CONFIG_OPTION_BDF
- FT_DEFINE_SERVICEDESCREC4(sfnt_services,
- FT_SERVICE_ID_SFNT_TABLE, &FT_SFNT_SERVICE_SFNT_TABLE_GET,
- FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_SFNT_SERVICE_PS_NAME_GET,
- FT_SERVICE_ID_BDF, &FT_SFNT_SERVICE_BDF_GET,
- FT_SERVICE_ID_TT_CMAP, &FT_TT_SERVICE_GET_CMAP_INFO_GET
- )
+ FT_DEFINE_SERVICEDESCREC4(
+ sfnt_services,
+ FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET,
+ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,
+ FT_SERVICE_ID_BDF, &SFNT_SERVICE_BDF_GET,
+ FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET )
#else
- FT_DEFINE_SERVICEDESCREC3(sfnt_services,
- FT_SERVICE_ID_SFNT_TABLE, &FT_SFNT_SERVICE_SFNT_TABLE_GET,
- FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_SFNT_SERVICE_PS_NAME_GET,
- FT_SERVICE_ID_TT_CMAP, &FT_TT_SERVICE_GET_CMAP_INFO_GET
- )
+ FT_DEFINE_SERVICEDESCREC3(
+ sfnt_services,
+ FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET,
+ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,
+ FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET )
#endif
@@ -422,7 +427,7 @@
sfnt_get_interface( FT_Module module,
const char* module_interface )
{
- /* FT_SFNT_SERVICES_GET derefers `library' in PIC mode */
+ /* SFNT_SERVICES_GET dereferences `library' in PIC mode */
#ifdef FT_CONFIG_OPTION_PIC
FT_Library library;
@@ -435,149 +440,25 @@
#else
FT_UNUSED( module );
#endif
- return ft_service_list_lookup( FT_SFNT_SERVICES_GET, module_interface );
- }
-
-
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-
- FT_CALLBACK_DEF( FT_Error )
- tt_face_load_sfnt_header_stub( TT_Face face,
- FT_Stream stream,
- FT_Long face_index,
- SFNT_Header header )
- {
- FT_UNUSED( face );
- FT_UNUSED( stream );
- FT_UNUSED( face_index );
- FT_UNUSED( header );
-
- return SFNT_Err_Unimplemented_Feature;
- }
-
-
- FT_CALLBACK_DEF( FT_Error )
- tt_face_load_directory_stub( TT_Face face,
- FT_Stream stream,
- SFNT_Header header )
- {
- FT_UNUSED( face );
- FT_UNUSED( stream );
- FT_UNUSED( header );
-
- return SFNT_Err_Unimplemented_Feature;
- }
-
-
- FT_CALLBACK_DEF( FT_Error )
- tt_face_load_hdmx_stub( TT_Face face,
- FT_Stream stream )
- {
- FT_UNUSED( face );
- FT_UNUSED( stream );
-
- return SFNT_Err_Unimplemented_Feature;
- }
-
-
- FT_CALLBACK_DEF( void )
- tt_face_free_hdmx_stub( TT_Face face )
- {
- FT_UNUSED( face );
- }
-
-
- FT_CALLBACK_DEF( FT_Error )
- tt_face_set_sbit_strike_stub( TT_Face face,
- FT_UInt x_ppem,
- FT_UInt y_ppem,
- FT_ULong* astrike_index )
- {
- /*
- * We simply forge a FT_Size_Request and call the real function
- * that does all the work.
- *
- * This stub might be called by libXfont in the X.Org Xserver,
- * compiled against version 2.1.8 or newer.
- */
-
- FT_Size_RequestRec req;
-
-
- req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
- req.width = (FT_F26Dot6)x_ppem;
- req.height = (FT_F26Dot6)y_ppem;
- req.horiResolution = 0;
- req.vertResolution = 0;
-
- *astrike_index = 0x7FFFFFFFUL;
- return tt_face_set_sbit_strike( face, &req, astrike_index );
+ return ft_service_list_lookup( SFNT_SERVICES_GET, module_interface );
}
- FT_CALLBACK_DEF( FT_Error )
- tt_face_load_sbit_stub( TT_Face face,
- FT_Stream stream )
- {
- FT_UNUSED( face );
- FT_UNUSED( stream );
-
- /*
- * This function was originally implemented to load the sbit table.
- * However, it has been replaced by `tt_face_load_eblc', and this stub
- * is only there for some rogue clients which would want to call it
- * directly (which doesn't make much sense).
- */
- return SFNT_Err_Unimplemented_Feature;
- }
-
-
- FT_CALLBACK_DEF( void )
- tt_face_free_sbit_stub( TT_Face face )
- {
- /* nothing to do in this stub */
- FT_UNUSED( face );
- }
-
-
- FT_CALLBACK_DEF( FT_Error )
- tt_face_load_charmap_stub( TT_Face face,
- void* cmap,
- FT_Stream input )
- {
- FT_UNUSED( face );
- FT_UNUSED( cmap );
- FT_UNUSED( input );
-
- return SFNT_Err_Unimplemented_Feature;
- }
-
-
- FT_CALLBACK_DEF( FT_Error )
- tt_face_free_charmap_stub( TT_Face face,
- void* cmap )
- {
- FT_UNUSED( face );
- FT_UNUSED( cmap );
-
- return SFNT_Err_Ok;
- }
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-#define PUT_EMBEDDED_BITMAPS(a) a
+#define PUT_EMBEDDED_BITMAPS( a ) a
#else
-#define PUT_EMBEDDED_BITMAPS(a) 0
+#define PUT_EMBEDDED_BITMAPS( a ) NULL
#endif
+
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
-#define PUT_PS_NAMES(a) a
+#define PUT_PS_NAMES( a ) a
#else
-#define PUT_PS_NAMES(a) 0
+#define PUT_PS_NAMES( a ) NULL
#endif
- FT_DEFINE_SFNT_INTERFACE(sfnt_interface,
+ FT_DEFINE_SFNT_INTERFACE(
+ sfnt_interface,
tt_face_goto_table,
sfnt_init_face,
@@ -587,9 +468,6 @@
tt_face_load_any,
- tt_face_load_sfnt_header_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
- tt_face_load_directory_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
tt_face_load_head,
tt_face_load_hhea,
tt_face_load_cmap,
@@ -600,54 +478,39 @@
tt_face_load_name,
tt_face_free_name,
- tt_face_load_hdmx_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
- tt_face_free_hdmx_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
tt_face_load_kern,
tt_face_load_gasp,
tt_face_load_pclt,
/* see `ttload.h' */
- PUT_EMBEDDED_BITMAPS(tt_face_load_bhed),
-
- tt_face_set_sbit_strike_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
- tt_face_load_sbit_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
- tt_find_sbit_image, /* FT_CONFIG_OPTION_OLD_INTERNALS */
- tt_load_sbit_metrics, /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
- PUT_EMBEDDED_BITMAPS(tt_face_load_sbit_image),
+ PUT_EMBEDDED_BITMAPS( tt_face_load_bhed ),
- tt_face_free_sbit_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
+ PUT_EMBEDDED_BITMAPS( tt_face_load_sbit_image ),
/* see `ttpost.h' */
- PUT_PS_NAMES(tt_face_get_ps_name),
- PUT_PS_NAMES(tt_face_free_ps_names),
-
- tt_face_load_charmap_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
- tt_face_free_charmap_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
+ PUT_PS_NAMES( tt_face_get_ps_name ),
+ PUT_PS_NAMES( tt_face_free_ps_names ),
/* since version 2.1.8 */
-
tt_face_get_kerning,
/* since version 2.2 */
-
tt_face_load_font_dir,
tt_face_load_hmtx,
/* see `ttsbit.h' and `sfnt.h' */
- PUT_EMBEDDED_BITMAPS(tt_face_load_eblc),
- PUT_EMBEDDED_BITMAPS(tt_face_free_eblc),
+ PUT_EMBEDDED_BITMAPS( tt_face_load_sbit ),
+ PUT_EMBEDDED_BITMAPS( tt_face_free_sbit ),
- PUT_EMBEDDED_BITMAPS(tt_face_set_sbit_strike),
- PUT_EMBEDDED_BITMAPS(tt_face_load_strike_metrics),
+ PUT_EMBEDDED_BITMAPS( tt_face_set_sbit_strike ),
+ PUT_EMBEDDED_BITMAPS( tt_face_load_strike_metrics ),
tt_face_get_metrics
)
- FT_DEFINE_MODULE(sfnt_module_class,
+ FT_DEFINE_MODULE(
+ sfnt_module_class,
0, /* not a font driver or renderer */
sizeof ( FT_ModuleRec ),
@@ -656,12 +519,11 @@
0x10000L, /* driver version 1.0 */
0x20000L, /* driver requires FreeType 2.0 or higher */
- (const void*)&FT_SFNT_INTERFACE_GET, /* module specific interface */
+ (const void*)&SFNT_INTERFACE_GET, /* module specific interface */
(FT_Module_Constructor)0,
(FT_Module_Destructor) 0,
- (FT_Module_Requester) sfnt_get_interface
- )
+ (FT_Module_Requester) sfnt_get_interface )
/* END */
diff --git a/src/sfnt/sferrors.h b/src/sfnt/sferrors.h
index 564a3fe..e981e1d 100644
--- a/src/sfnt/sferrors.h
+++ b/src/sfnt/sferrors.h
@@ -4,7 +4,7 @@
/* */
/* SFNT error codes (specification only). */
/* */
-/* Copyright 2001, 2004, 2012 by */
+/* Copyright 2001, 2004, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -33,8 +33,6 @@
#define FT_ERR_PREFIX SFNT_Err_
#define FT_ERR_BASE FT_Mod_Err_SFNT
-#define FT_KEEP_ERR_PREFIX
-
#include FT_ERRORS_H
#endif /* __SFERRORS_H__ */
diff --git a/src/sfnt/sfnt.c b/src/sfnt/sfnt.c
index fc507b4..d62ed4e 100644
--- a/src/sfnt/sfnt.c
+++ b/src/sfnt/sfnt.c
@@ -4,7 +4,7 @@
/* */
/* Single object library component. */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 1996-2006, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -28,6 +28,7 @@
#include "sfdriver.c"
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+#include "pngshim.c"
#include "ttsbit.c"
#endif
diff --git a/src/sfnt/sfntpic.c b/src/sfnt/sfntpic.c
index 1372376..b3fb24b 100644
--- a/src/sfnt/sfntpic.c
+++ b/src/sfnt/sfntpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for sfnt module. */
/* */
-/* Copyright 2009, 2010 by */
+/* Copyright 2009, 2010, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,57 +22,52 @@
#include "sfntpic.h"
#include "sferrors.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from sfdriver.c */
FT_Error
FT_Create_Class_sfnt_services( FT_Library library,
- FT_ServiceDescRec** ouput_class );
-
+ FT_ServiceDescRec** output_class );
void
FT_Destroy_Class_sfnt_services( FT_Library library,
FT_ServiceDescRec* clazz );
-
void
FT_Init_Class_sfnt_service_bdf( FT_Service_BDFRec* clazz );
-
void
FT_Init_Class_sfnt_interface( FT_Library library,
SFNT_Interface* clazz );
-
void
FT_Init_Class_sfnt_service_glyph_dict(
FT_Library library,
FT_Service_GlyphDictRec* clazz );
-
void
FT_Init_Class_sfnt_service_ps_name(
FT_Library library,
FT_Service_PsFontNameRec* clazz );
-
void
FT_Init_Class_tt_service_get_cmap_info(
FT_Library library,
FT_Service_TTCMapsRec* clazz );
-
void
FT_Init_Class_sfnt_service_sfnt_table(
FT_Service_SFNT_TableRec* clazz );
+
/* forward declaration of PIC init functions from ttcmap.c */
FT_Error
FT_Create_Class_tt_cmap_classes( FT_Library library,
TT_CMap_Class** output_class );
-
void
FT_Destroy_Class_tt_cmap_classes( FT_Library library,
TT_CMap_Class* clazz );
+
void
sfnt_module_class_pic_free( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Memory memory = library->memory;
+ FT_Memory memory = library->memory;
if ( pic_container->sfnt )
@@ -84,10 +79,12 @@
FT_Destroy_Class_sfnt_services( library,
container->sfnt_services );
container->sfnt_services = NULL;
+
if ( container->tt_cmap_classes )
FT_Destroy_Class_tt_cmap_classes( library,
container->tt_cmap_classes );
container->tt_cmap_classes = NULL;
+
FT_FREE( container );
pic_container->sfnt = NULL;
}
@@ -95,25 +92,27 @@
FT_Error
- sfnt_module_class_pic_init( FT_Library library )
+ sfnt_module_class_pic_init( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = SFNT_Err_Ok;
- sfntModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_Error error = FT_Err_Ok;
+ sfntModulePIC* container = NULL;
+ FT_Memory memory = library->memory;
/* allocate pointer, clear and set global container pointer */
- if ( FT_ALLOC ( container, sizeof ( *container ) ) )
+ if ( FT_ALLOC( container, sizeof ( *container ) ) )
return error;
FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->sfnt = 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 */
error = FT_Create_Class_sfnt_services( library,
&container->sfnt_services );
if ( error )
goto Exit;
+
error = FT_Create_Class_tt_cmap_classes( library,
&container->tt_cmap_classes );
if ( error )
@@ -132,14 +131,12 @@
#endif
FT_Init_Class_sfnt_interface( library, &container->sfnt_interface );
-Exit:
+ Exit:
if ( error )
sfnt_module_class_pic_free( library );
return error;
}
-
-
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/src/sfnt/sfntpic.h b/src/sfnt/sfntpic.h
index f7993d1..b09a914 100644
--- a/src/sfnt/sfntpic.h
+++ b/src/sfnt/sfntpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for sfnt module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2012 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,57 +24,76 @@ FT_BEGIN_HEADER
#include FT_INTERNAL_PIC_H
- #ifndef FT_CONFIG_OPTION_PIC
-#define FT_SFNT_SERVICES_GET sfnt_services
-#define FT_SFNT_SERVICE_GLYPH_DICT_GET sfnt_service_glyph_dict
-#define FT_SFNT_SERVICE_PS_NAME_GET sfnt_service_ps_name
-#define FT_TT_SERVICE_GET_CMAP_INFO_GET tt_service_get_cmap_info
-#define FT_SFNT_SERVICES_GET sfnt_services
-#define FT_TT_CMAP_CLASSES_GET tt_cmap_classes
-#define FT_SFNT_SERVICE_SFNT_TABLE_GET sfnt_service_sfnt_table
-#define FT_SFNT_SERVICE_BDF_GET sfnt_service_bdf
-#define FT_SFNT_INTERFACE_GET sfnt_interface
+
+#ifndef FT_CONFIG_OPTION_PIC
+
+#define SFNT_SERVICES_GET sfnt_services
+#define SFNT_SERVICE_GLYPH_DICT_GET sfnt_service_glyph_dict
+#define SFNT_SERVICE_PS_NAME_GET sfnt_service_ps_name
+#define TT_SERVICE_CMAP_INFO_GET tt_service_get_cmap_info
+#define SFNT_SERVICES_GET sfnt_services
+#define TT_CMAP_CLASSES_GET tt_cmap_classes
+#define SFNT_SERVICE_SFNT_TABLE_GET sfnt_service_sfnt_table
+#define SFNT_SERVICE_BDF_GET sfnt_service_bdf
+#define SFNT_INTERFACE_GET sfnt_interface
#else /* FT_CONFIG_OPTION_PIC */
-/* some include files required for members of sfntModulePIC */
+ /* some include files required for members of sfntModulePIC */
#include FT_SERVICE_GLYPH_DICT_H
#include FT_SERVICE_POSTSCRIPT_NAME_H
#include FT_SERVICE_SFNT_H
#include FT_SERVICE_TT_CMAP_H
+
#ifdef TT_CONFIG_OPTION_BDF
#include "ttbdf.h"
#include FT_SERVICE_BDF_H
#endif
+
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include "ttcmap.h"
-typedef struct sfntModulePIC_
+
+ typedef struct sfntModulePIC_
{
- FT_ServiceDescRec* sfnt_services;
- FT_Service_GlyphDictRec sfnt_service_glyph_dict;
+ FT_ServiceDescRec* sfnt_services;
+ FT_Service_GlyphDictRec sfnt_service_glyph_dict;
FT_Service_PsFontNameRec sfnt_service_ps_name;
- FT_Service_TTCMapsRec tt_service_get_cmap_info;
- TT_CMap_Class* tt_cmap_classes;
- FT_Service_SFNT_TableRec sfnt_service_sfnt_table;
+ FT_Service_TTCMapsRec tt_service_get_cmap_info;
+ TT_CMap_Class* tt_cmap_classes;
+ FT_Service_SFNT_TableRec sfnt_service_sfnt_table;
#ifdef TT_CONFIG_OPTION_BDF
- FT_Service_BDFRec sfnt_service_bdf;
+ FT_Service_BDFRec sfnt_service_bdf;
#endif
- SFNT_Interface sfnt_interface;
+ SFNT_Interface sfnt_interface;
+
} sfntModulePIC;
-#define GET_PIC(lib) ((sfntModulePIC*)((lib)->pic_container.sfnt))
-#define FT_SFNT_SERVICES_GET (GET_PIC(library)->sfnt_services)
-#define FT_SFNT_SERVICE_GLYPH_DICT_GET (GET_PIC(library)->sfnt_service_glyph_dict)
-#define FT_SFNT_SERVICE_PS_NAME_GET (GET_PIC(library)->sfnt_service_ps_name)
-#define FT_TT_SERVICE_GET_CMAP_INFO_GET (GET_PIC(library)->tt_service_get_cmap_info)
-#define FT_SFNT_SERVICES_GET (GET_PIC(library)->sfnt_services)
-#define FT_TT_CMAP_CLASSES_GET (GET_PIC(library)->tt_cmap_classes)
-#define FT_SFNT_SERVICE_SFNT_TABLE_GET (GET_PIC(library)->sfnt_service_sfnt_table)
-#define FT_SFNT_SERVICE_BDF_GET (GET_PIC(library)->sfnt_service_bdf)
-#define FT_SFNT_INTERFACE_GET (GET_PIC(library)->sfnt_interface)
+
+#define GET_PIC( lib ) \
+ ( (sfntModulePIC*)( (lib)->pic_container.sfnt ) )
+
+#define SFNT_SERVICES_GET \
+ ( GET_PIC( library )->sfnt_services )
+#define SFNT_SERVICE_GLYPH_DICT_GET \
+ ( GET_PIC( library )->sfnt_service_glyph_dict )
+#define SFNT_SERVICE_PS_NAME_GET \
+ ( GET_PIC( library )->sfnt_service_ps_name )
+#define TT_SERVICE_CMAP_INFO_GET \
+ ( GET_PIC( library )->tt_service_get_cmap_info )
+#define SFNT_SERVICES_GET \
+ ( GET_PIC( library )->sfnt_services )
+#define TT_CMAP_CLASSES_GET \
+ ( GET_PIC( library )->tt_cmap_classes )
+#define SFNT_SERVICE_SFNT_TABLE_GET \
+ ( GET_PIC( library )->sfnt_service_sfnt_table )
+#define SFNT_SERVICE_BDF_GET \
+ ( GET_PIC( library )->sfnt_service_bdf )
+#define SFNT_INTERFACE_GET \
+ ( GET_PIC( library )->sfnt_interface )
+
/* see sfntpic.c for the implementation */
void
@@ -85,7 +104,7 @@ typedef struct sfntModulePIC_
#endif /* FT_CONFIG_OPTION_PIC */
-/* */
+ /* */
FT_END_HEADER
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index d7be631..70b988d 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -4,7 +4,7 @@
/* */
/* SFNT object management (base). */
/* */
-/* Copyright 1996-2008, 2010-2011 by */
+/* Copyright 1996-2008, 2010-2014 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 @@
#include FT_TRUETYPE_TAGS_H
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_SFNT_NAMES_H
+#include FT_GZIP_H
#include "sferrors.h"
#ifdef TT_CONFIG_OPTION_BDF
@@ -64,13 +65,17 @@
for ( n = 0; n < len; n++ )
{
code = FT_NEXT_USHORT( read );
+
+ if ( code == 0 )
+ break;
+
if ( code < 32 || code > 127 )
code = '?';
string[n] = (char)code;
}
- string[len] = 0;
+ string[n] = 0;
return string;
}
@@ -95,13 +100,17 @@
for ( n = 0; n < len; n++ )
{
code = *read++;
+
+ if ( code == 0 )
+ break;
+
if ( code < 32 || code > 127 )
code = '?';
string[n] = (char)code;
}
- string[len] = 0;
+ string[n] = 0;
return string;
}
@@ -137,7 +146,7 @@
FT_String** name )
{
FT_Memory memory = face->root.memory;
- FT_Error error = SFNT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_String* result = NULL;
FT_UShort n;
TT_NameEntryRec* rec;
@@ -339,6 +348,383 @@
}
+#define WRITE_USHORT( p, v ) \
+ do \
+ { \
+ *(p)++ = (FT_Byte)( (v) >> 8 ); \
+ *(p)++ = (FT_Byte)( (v) >> 0 ); \
+ \
+ } while ( 0 )
+
+#define WRITE_ULONG( p, v ) \
+ do \
+ { \
+ *(p)++ = (FT_Byte)( (v) >> 24 ); \
+ *(p)++ = (FT_Byte)( (v) >> 16 ); \
+ *(p)++ = (FT_Byte)( (v) >> 8 ); \
+ *(p)++ = (FT_Byte)( (v) >> 0 ); \
+ \
+ } while ( 0 )
+
+
+ static void
+ sfnt_stream_close( FT_Stream stream )
+ {
+ FT_Memory memory = stream->memory;
+
+
+ FT_FREE( stream->base );
+
+ stream->size = 0;
+ stream->base = 0;
+ stream->close = 0;
+ }
+
+
+ FT_CALLBACK_DEF( int )
+ compare_offsets( const void* a,
+ const void* b )
+ {
+ WOFF_Table table1 = *(WOFF_Table*)a;
+ WOFF_Table table2 = *(WOFF_Table*)b;
+
+ FT_ULong offset1 = table1->Offset;
+ FT_ULong offset2 = table2->Offset;
+
+
+ if ( offset1 > offset2 )
+ return 1;
+ else if ( offset1 < offset2 )
+ return -1;
+ else
+ return 0;
+ }
+
+
+ /* Replace `face->root.stream' with a stream containing the extracted */
+ /* SFNT of a WOFF font. */
+
+ static FT_Error
+ woff_open_font( FT_Stream stream,
+ TT_Face face )
+ {
+ FT_Memory memory = stream->memory;
+ FT_Error error = FT_Err_Ok;
+
+ WOFF_HeaderRec woff;
+ WOFF_Table tables = NULL;
+ WOFF_Table* indices = NULL;
+
+ FT_ULong woff_offset;
+
+ FT_Byte* sfnt = NULL;
+ FT_Stream sfnt_stream = NULL;
+
+ FT_Byte* sfnt_header;
+ FT_ULong sfnt_offset;
+
+ FT_Int nn;
+ FT_ULong old_tag = 0;
+
+ static const FT_Frame_Field woff_header_fields[] =
+ {
+#undef FT_STRUCTURE
+#define FT_STRUCTURE WOFF_HeaderRec
+
+ FT_FRAME_START( 44 ),
+ FT_FRAME_ULONG ( signature ),
+ FT_FRAME_ULONG ( flavor ),
+ FT_FRAME_ULONG ( length ),
+ FT_FRAME_USHORT( num_tables ),
+ FT_FRAME_USHORT( reserved ),
+ FT_FRAME_ULONG ( totalSfntSize ),
+ FT_FRAME_USHORT( majorVersion ),
+ FT_FRAME_USHORT( minorVersion ),
+ FT_FRAME_ULONG ( metaOffset ),
+ FT_FRAME_ULONG ( metaLength ),
+ FT_FRAME_ULONG ( metaOrigLength ),
+ FT_FRAME_ULONG ( privOffset ),
+ FT_FRAME_ULONG ( privLength ),
+ FT_FRAME_END
+ };
+
+
+ FT_ASSERT( stream == face->root.stream );
+ FT_ASSERT( FT_STREAM_POS() == 0 );
+
+ if ( FT_STREAM_READ_FIELDS( woff_header_fields, &woff ) )
+ return error;
+
+ /* Make sure we don't recurse back here or hit TTC code. */
+ if ( woff.flavor == TTAG_wOFF || woff.flavor == TTAG_ttcf )
+ return FT_THROW( Invalid_Table );
+
+ /* Miscellaneous checks. */
+ if ( woff.length != stream->size ||
+ woff.num_tables == 0 ||
+ 44 + woff.num_tables * 20UL >= woff.length ||
+ 12 + woff.num_tables * 16UL >= woff.totalSfntSize ||
+ ( woff.totalSfntSize & 3 ) != 0 ||
+ ( woff.metaOffset == 0 && ( woff.metaLength != 0 ||
+ woff.metaOrigLength != 0 ) ) ||
+ ( woff.metaLength != 0 && woff.metaOrigLength == 0 ) ||
+ ( woff.privOffset == 0 && woff.privLength != 0 ) )
+ return FT_THROW( Invalid_Table );
+
+ if ( FT_ALLOC( sfnt, woff.totalSfntSize ) ||
+ FT_NEW( sfnt_stream ) )
+ goto Exit;
+
+ sfnt_header = sfnt;
+
+ /* Write sfnt header. */
+ {
+ FT_UInt searchRange, entrySelector, rangeShift, x;
+
+
+ x = woff.num_tables;
+ entrySelector = 0;
+ while ( x )
+ {
+ x >>= 1;
+ entrySelector += 1;
+ }
+ entrySelector--;
+
+ searchRange = ( 1 << entrySelector ) * 16;
+ rangeShift = woff.num_tables * 16 - searchRange;
+
+ WRITE_ULONG ( sfnt_header, woff.flavor );
+ WRITE_USHORT( sfnt_header, woff.num_tables );
+ WRITE_USHORT( sfnt_header, searchRange );
+ WRITE_USHORT( sfnt_header, entrySelector );
+ WRITE_USHORT( sfnt_header, rangeShift );
+ }
+
+ /* While the entries in the sfnt header must be sorted by the */
+ /* tag value, the tables themselves are not. We thus have to */
+ /* sort them by offset and check that they don't overlap. */
+
+ if ( FT_NEW_ARRAY( tables, woff.num_tables ) ||
+ FT_NEW_ARRAY( indices, woff.num_tables ) )
+ goto Exit;
+
+ FT_TRACE2(( "\n"
+ " tag offset compLen origLen checksum\n"
+ " -------------------------------------------\n" ));
+
+ if ( FT_FRAME_ENTER( 20L * woff.num_tables ) )
+ goto Exit;
+
+ for ( nn = 0; nn < woff.num_tables; nn++ )
+ {
+ WOFF_Table table = tables + nn;
+
+ table->Tag = FT_GET_TAG4();
+ table->Offset = FT_GET_ULONG();
+ table->CompLength = FT_GET_ULONG();
+ table->OrigLength = FT_GET_ULONG();
+ table->CheckSum = FT_GET_ULONG();
+
+ FT_TRACE2(( " %c%c%c%c %08lx %08lx %08lx %08lx\n",
+ (FT_Char)( table->Tag >> 24 ),
+ (FT_Char)( table->Tag >> 16 ),
+ (FT_Char)( table->Tag >> 8 ),
+ (FT_Char)( table->Tag ),
+ table->Offset,
+ table->CompLength,
+ table->OrigLength,
+ table->CheckSum ));
+
+ if ( table->Tag <= old_tag )
+ {
+ FT_FRAME_EXIT();
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ old_tag = table->Tag;
+ indices[nn] = table;
+ }
+
+ FT_FRAME_EXIT();
+
+ /* Sort by offset. */
+
+ ft_qsort( indices,
+ woff.num_tables,
+ sizeof ( WOFF_Table ),
+ compare_offsets );
+
+ /* Check offsets and lengths. */
+
+ woff_offset = 44 + woff.num_tables * 20L;
+ sfnt_offset = 12 + woff.num_tables * 16L;
+
+ for ( nn = 0; nn < woff.num_tables; nn++ )
+ {
+ WOFF_Table table = indices[nn];
+
+
+ if ( table->Offset != woff_offset ||
+ table->CompLength > woff.length ||
+ table->Offset > woff.length - table->CompLength ||
+ table->OrigLength > woff.totalSfntSize ||
+ sfnt_offset > woff.totalSfntSize - table->OrigLength ||
+ table->CompLength > table->OrigLength )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ table->OrigOffset = sfnt_offset;
+
+ /* The offsets must be multiples of 4. */
+ woff_offset += ( table->CompLength + 3 ) & ~3;
+ sfnt_offset += ( table->OrigLength + 3 ) & ~3;
+ }
+
+ /*
+ * Final checks!
+ *
+ * We don't decode and check the metadata block.
+ * We don't check table checksums either.
+ * But other than those, I think we implement all
+ * `MUST' checks from the spec.
+ */
+
+ if ( woff.metaOffset )
+ {
+ if ( woff.metaOffset != woff_offset ||
+ woff.metaOffset + woff.metaLength > woff.length )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ /* We have padding only ... */
+ woff_offset += woff.metaLength;
+ }
+
+ if ( woff.privOffset )
+ {
+ /* ... if it isn't the last block. */
+ woff_offset = ( woff_offset + 3 ) & ~3;
+
+ if ( woff.privOffset != woff_offset ||
+ woff.privOffset + woff.privLength > woff.length )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ /* No padding for the last block. */
+ woff_offset += woff.privLength;
+ }
+
+ if ( sfnt_offset != woff.totalSfntSize ||
+ woff_offset != woff.length )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+ /* Write the tables. */
+
+ for ( nn = 0; nn < woff.num_tables; nn++ )
+ {
+ WOFF_Table table = tables + nn;
+
+
+ /* Write SFNT table entry. */
+ WRITE_ULONG( sfnt_header, table->Tag );
+ WRITE_ULONG( sfnt_header, table->CheckSum );
+ WRITE_ULONG( sfnt_header, table->OrigOffset );
+ WRITE_ULONG( sfnt_header, table->OrigLength );
+
+ /* Write table data. */
+ if ( FT_STREAM_SEEK( table->Offset ) ||
+ FT_FRAME_ENTER( table->CompLength ) )
+ goto Exit;
+
+ if ( table->CompLength == table->OrigLength )
+ {
+ /* Uncompressed data; just copy. */
+ ft_memcpy( sfnt + table->OrigOffset,
+ stream->cursor,
+ table->OrigLength );
+ }
+ else
+ {
+#ifdef FT_CONFIG_OPTION_USE_ZLIB
+
+ /* Uncompress with zlib. */
+ FT_ULong output_len = table->OrigLength;
+
+
+ error = FT_Gzip_Uncompress( memory,
+ sfnt + table->OrigOffset, &output_len,
+ stream->cursor, table->CompLength );
+ if ( error )
+ goto Exit;
+ if ( output_len != table->OrigLength )
+ {
+ error = FT_THROW( Invalid_Table );
+ goto Exit;
+ }
+
+#else /* !FT_CONFIG_OPTION_USE_ZLIB */
+
+ error = FT_THROW( Unimplemented_Feature );
+ goto Exit;
+
+#endif /* !FT_CONFIG_OPTION_USE_ZLIB */
+ }
+
+ FT_FRAME_EXIT();
+
+ /* We don't check whether the padding bytes in the WOFF file are */
+ /* actually '\0'. For the output, however, we do set them properly. */
+ sfnt_offset = table->OrigOffset + table->OrigLength;
+ while ( sfnt_offset & 3 )
+ {
+ sfnt[sfnt_offset] = '\0';
+ sfnt_offset++;
+ }
+ }
+
+ /* Ok! Finally ready. Swap out stream and return. */
+ FT_Stream_OpenMemory( sfnt_stream, sfnt, woff.totalSfntSize );
+ sfnt_stream->memory = stream->memory;
+ sfnt_stream->close = sfnt_stream_close;
+
+ FT_Stream_Free(
+ face->root.stream,
+ ( face->root.face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) != 0 );
+
+ face->root.stream = sfnt_stream;
+
+ face->root.face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM;
+
+ Exit:
+ FT_FREE( tables );
+ FT_FREE( indices );
+
+ if ( error )
+ {
+ FT_FREE( sfnt );
+ FT_Stream_Close( sfnt_stream );
+ FT_FREE( sfnt_stream );
+ }
+
+ return error;
+ }
+
+
+#undef WRITE_USHORT
+#undef WRITE_ULONG
+
+
/* Fill in face->ttc_header. If the font is not a TTC, it is */
/* synthesized into a TTC with one offset table. */
static FT_Error
@@ -365,11 +751,28 @@
face->ttc_header.version = 0;
face->ttc_header.count = 0;
+ retry:
offset = FT_STREAM_POS();
if ( FT_READ_ULONG( tag ) )
return error;
+ if ( tag == TTAG_wOFF )
+ {
+ FT_TRACE2(( "sfnt_open_font: file is a WOFF; synthesizing SFNT\n" ));
+
+ if ( FT_STREAM_SEEK( offset ) )
+ return error;
+
+ error = woff_open_font( stream, face );
+ if ( error )
+ return error;
+
+ /* Swap out stream and retry! */
+ stream = face->root.stream;
+ goto retry;
+ }
+
if ( tag != 0x00010000UL &&
tag != TTAG_ttcf &&
tag != TTAG_OTTO &&
@@ -378,7 +781,7 @@
tag != 0x00020000UL )
{
FT_TRACE2(( " not a font using the SFNT container format\n" ));
- return SFNT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
}
face->ttc_header.tag = TTAG_ttcf;
@@ -394,7 +797,7 @@
return error;
if ( face->ttc_header.count == 0 )
- return SFNT_Err_Invalid_Table;
+ return FT_THROW( 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 = */
@@ -402,7 +805,7 @@
/* 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;
+ return FT_THROW( 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 ) )
@@ -457,7 +860,7 @@
if ( !sfnt )
{
FT_ERROR(( "sfnt_init_face: cannot access `sfnt' module\n" ));
- return SFNT_Err_Missing_Module;
+ return FT_THROW( Missing_Module );
}
face->sfnt = sfnt;
@@ -472,13 +875,16 @@
if ( error )
return error;
+ /* Stream may have changed in sfnt_open_font. */
+ stream = face->root.stream;
+
FT_TRACE2(( "sfnt_init_face: %08p, %ld\n", face, face_index ));
if ( face_index < 0 )
face_index = 0;
if ( face_index >= face->ttc_header.count )
- return SFNT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( FT_STREAM_SEEK( face->ttc_header.offsets[face_index] ) )
return error;
@@ -495,42 +901,45 @@
}
-#define LOAD_( x ) \
- do { \
- FT_TRACE2(( "`" #x "' " )); \
- FT_TRACE3(( "-->\n" )); \
- \
- error = sfnt->load_##x( face, stream ); \
- \
- FT_TRACE2(( "%s\n", ( !error ) \
- ? "loaded" \
- : ( error == SFNT_Err_Table_Missing ) \
- ? "missing" \
- : "failed to load" )); \
- FT_TRACE3(( "\n" )); \
+#define LOAD_( x ) \
+ do \
+ { \
+ FT_TRACE2(( "`" #x "' " )); \
+ FT_TRACE3(( "-->\n" )); \
+ \
+ error = sfnt->load_ ## x( face, stream ); \
+ \
+ FT_TRACE2(( "%s\n", ( !error ) \
+ ? "loaded" \
+ : FT_ERR_EQ( error, Table_Missing ) \
+ ? "missing" \
+ : "failed to load" )); \
+ FT_TRACE3(( "\n" )); \
} while ( 0 )
-#define LOADM_( x, vertical ) \
- do { \
- FT_TRACE2(( "`%s" #x "' ", \
- vertical ? "vertical " : "" )); \
- FT_TRACE3(( "-->\n" )); \
- \
- error = sfnt->load_##x( face, stream, vertical ); \
- \
- FT_TRACE2(( "%s\n", ( !error ) \
- ? "loaded" \
- : ( error == SFNT_Err_Table_Missing ) \
- ? "missing" \
- : "failed to load" )); \
- FT_TRACE3(( "\n" )); \
+#define LOADM_( x, vertical ) \
+ do \
+ { \
+ FT_TRACE2(( "`%s" #x "' ", \
+ vertical ? "vertical " : "" )); \
+ FT_TRACE3(( "-->\n" )); \
+ \
+ error = sfnt->load_ ## x( face, stream, vertical ); \
+ \
+ FT_TRACE2(( "%s\n", ( !error ) \
+ ? "loaded" \
+ : FT_ERR_EQ( error, Table_Missing ) \
+ ? "missing" \
+ : "failed to load" )); \
+ FT_TRACE3(( "\n" )); \
} while ( 0 )
-#define GET_NAME( id, field ) \
- do { \
- error = tt_face_get_name( face, TT_NAME_ID_##id, field ); \
- if ( error ) \
- goto Exit; \
+#define GET_NAME( id, field ) \
+ do \
+ { \
+ error = tt_face_get_name( face, TT_NAME_ID_ ## id, field ); \
+ if ( error ) \
+ goto Exit; \
} while ( 0 )
@@ -547,13 +956,15 @@
#endif
FT_Bool has_outline;
FT_Bool is_apple_sbit;
- FT_Bool ignore_preferred_family = FALSE;
+ FT_Bool is_apple_sbix;
+ FT_Bool ignore_preferred_family = FALSE;
FT_Bool ignore_preferred_subfamily = FALSE;
SFNT_Service sfnt = (SFNT_Service)face->sfnt;
FT_UNUSED( face_index );
+
/* Check parameters */
{
@@ -599,6 +1010,13 @@
#endif
is_apple_sbit = 0;
+ is_apple_sbix = !face->goto_table( face, TTAG_sbix, stream, 0 );
+
+ /* Apple 'sbix' color bitmaps are rendered scaled and then the 'glyf'
+ * outline rendered on top. We don't support that yet, so just ignore
+ * the 'glyf' outline and advertise it as a bitmap-only font. */
+ if ( is_apple_sbix )
+ has_outline = FALSE;
/* if this font doesn't contain outlines, we try to load */
/* a `bhed' table */
@@ -610,7 +1028,7 @@
/* load the font header (`head' table) if this isn't an Apple */
/* sbit font file */
- if ( !is_apple_sbit )
+ if ( !is_apple_sbit || is_apple_sbix )
{
LOAD_( head );
if ( error )
@@ -619,7 +1037,7 @@
if ( face->header.Units_Per_EM == 0 )
{
- error = SFNT_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
@@ -647,9 +1065,9 @@
if ( !error )
{
LOADM_( hmtx, 0 );
- if ( error == SFNT_Err_Table_Missing )
+ if ( FT_ERR_EQ( error, Table_Missing ) )
{
- error = SFNT_Err_Hmtx_Table_Missing;
+ error = FT_THROW( Hmtx_Table_Missing );
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* If this is an incrementally loaded font and there are */
@@ -659,12 +1077,12 @@
get_glyph_metrics )
{
face->horizontal.number_Of_HMetrics = 0;
- error = SFNT_Err_Ok;
+ error = FT_Err_Ok;
}
#endif
}
}
- else if ( error == SFNT_Err_Table_Missing )
+ else if ( FT_ERR_EQ( error, Table_Missing ) )
{
/* No `hhea' table necessary for SFNT Mac fonts. */
if ( face->format_tag == TTAG_true )
@@ -672,11 +1090,11 @@
FT_TRACE2(( "This is an SFNT Mac font.\n" ));
has_outline = 0;
- error = SFNT_Err_Ok;
+ error = FT_Err_Ok;
}
else
{
- error = SFNT_Err_Horiz_Header_Missing;
+ error = FT_THROW( Horiz_Header_Missing );
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* If this is an incrementally loaded font and there are */
@@ -686,7 +1104,7 @@
get_glyph_metrics )
{
face->horizontal.number_Of_HMetrics = 0;
- error = SFNT_Err_Ok;
+ error = FT_Err_Ok;
}
#endif
@@ -705,7 +1123,7 @@
face->vertical_info = 1;
}
- if ( error && error != SFNT_Err_Table_Missing )
+ if ( error && FT_ERR_NEQ( error, Table_Missing ) )
goto Exit;
LOAD_( os2 );
@@ -727,8 +1145,8 @@
/* a font which contains neither bitmaps nor outlines is */
/* still valid (although rather useless in most cases); */
/* however, you can find such stripped fonts in PDFs */
- if ( error == SFNT_Err_Table_Missing )
- error = SFNT_Err_Ok;
+ if ( FT_ERR_EQ( error, Table_Missing ) )
+ error = FT_Err_Ok;
else
goto Exit;
}
@@ -737,7 +1155,7 @@
LOAD_( pclt );
if ( error )
{
- if ( error != SFNT_Err_Table_Missing )
+ if ( FT_ERR_NEQ( error, Table_Missing ) )
goto Exit;
face->pclt.Version = 0;
@@ -794,6 +1212,10 @@
/* */
/* Compute face flags. */
/* */
+ if ( face->sbit_table_type == TT_SBIT_TABLE_TYPE_CBLC ||
+ face->sbit_table_type == TT_SBIT_TABLE_TYPE_SBIX )
+ flags |= FT_FACE_FLAG_COLOR; /* color glyphs */
+
if ( has_outline == TRUE )
flags |= FT_FACE_FLAG_SCALABLE; /* scalable outlines */
@@ -803,7 +1225,7 @@
FT_FACE_FLAG_HORIZONTAL; /* horizontal data */
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
- if ( psnames_error == SFNT_Err_Ok &&
+ if ( !psnames_error &&
face->postscript.FormatType != 0x00030000L )
flags |= FT_FACE_FLAG_GLYPH_NAMES;
#endif
@@ -910,11 +1332,7 @@
FT_UInt i, count;
-#ifndef FT_CONFIG_OPTION_OLD_INTERNALS
count = face->sbit_num_strikes;
-#else
- count = (FT_UInt)face->num_sbit_strikes;
-#endif
if ( count > 0 )
{
@@ -926,7 +1344,7 @@
if ( em_size == 0 || face->os2.version == 0xFFFFU )
{
- avgwidth = 0;
+ avgwidth = 1;
em_size = 1;
}
@@ -1115,7 +1533,6 @@
}
/* freeing the horizontal metrics */
-#ifndef FT_CONFIG_OPTION_OLD_INTERNALS
{
FT_Stream stream = FT_FACE_STREAM( face );
@@ -1125,10 +1542,6 @@
face->horz_metrics_size = 0;
face->vert_metrics_size = 0;
}
-#else
- FT_FREE( face->horizontal.long_metrics );
- FT_FREE( face->horizontal.short_metrics );
-#endif
/* freeing the vertical ones, if any */
if ( face->vertical_info )
diff --git a/src/sfnt/ttbdf.c b/src/sfnt/ttbdf.c
index 18845c3..9401dae 100644
--- a/src/sfnt/ttbdf.c
+++ b/src/sfnt/ttbdf.c
@@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded BDF properties (body). */
/* */
-/* Copyright 2005, 2006, 2010 by */
+/* Copyright 2005, 2006, 2010, 2013 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 = SFNT_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
@@ -131,7 +131,7 @@
BadTable:
FT_FRAME_RELEASE( bdf->table );
FT_ZERO( bdf );
- error = SFNT_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
@@ -143,7 +143,7 @@
{
TT_BDF bdf = &face->bdf;
FT_Size size = FT_FACE(face)->size;
- FT_Error error = SFNT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte* p;
FT_UInt count;
FT_Byte* strike;
@@ -163,7 +163,7 @@
p = bdf->table + 8;
strike = p + 4 * count;
- error = SFNT_Err_Invalid_Argument;
+ error = FT_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 = SFNT_Err_Ok;
+ error = FT_Err_Ok;
goto Exit;
}
break;
@@ -223,13 +223,13 @@
case 0x02:
aprop->type = BDF_PROPERTY_TYPE_INTEGER;
aprop->u.integer = (FT_Int32)value;
- error = SFNT_Err_Ok;
+ error = FT_Err_Ok;
goto Exit;
case 0x03:
aprop->type = BDF_PROPERTY_TYPE_CARDINAL;
aprop->u.cardinal = value;
- error = SFNT_Err_Ok;
+ error = FT_Err_Ok;
goto Exit;
default:
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 1dfd987..f54de70 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -4,7 +4,7 @@
/* */
/* TrueType character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
+/* Copyright 2002-2010, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -56,7 +56,7 @@
FT_Byte* table )
{
cmap->data = table;
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -88,9 +88,15 @@
tt_cmap0_validate( FT_Byte* table,
FT_Validator valid )
{
- FT_Byte* p = table + 2;
- FT_UInt length = TT_NEXT_USHORT( p );
+ FT_Byte* p;
+ FT_UInt length;
+
+
+ if ( table + 2 + 2 > valid->limit )
+ FT_INVALID_TOO_SHORT;
+ p = table + 2; /* skip format */
+ length = TT_NEXT_USHORT( p );
if ( table + length > valid->limit || length < 262 )
FT_INVALID_TOO_SHORT;
@@ -110,7 +116,7 @@
}
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -161,24 +167,28 @@
cmap_info->format = 0;
cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
- FT_DEFINE_TT_CMAP(tt_cmap0_class_rec,
- sizeof ( TT_CMapRec ),
+ FT_DEFINE_TT_CMAP(
+ tt_cmap0_class_rec,
+ sizeof ( TT_CMapRec ),
+
+ (FT_CMap_InitFunc) tt_cmap_init,
+ (FT_CMap_DoneFunc) NULL,
+ (FT_CMap_CharIndexFunc)tt_cmap0_char_index,
+ (FT_CMap_CharNextFunc) tt_cmap0_char_next,
- (FT_CMap_InitFunc) tt_cmap_init,
- (FT_CMap_DoneFunc) NULL,
- (FT_CMap_CharIndexFunc)tt_cmap0_char_index,
- (FT_CMap_CharNextFunc) tt_cmap0_char_next,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
- NULL, NULL, NULL, NULL, NULL
- ,
0,
- (TT_CMap_ValidateFunc) tt_cmap0_validate,
- (TT_CMap_Info_GetFunc) tt_cmap0_get_info
- )
+ (TT_CMap_ValidateFunc)tt_cmap0_validate,
+ (TT_CMap_Info_GetFunc)tt_cmap0_get_info )
#endif /* TT_CONFIG_CMAP_FORMAT_0 */
@@ -275,13 +285,20 @@
tt_cmap2_validate( FT_Byte* table,
FT_Validator valid )
{
- FT_Byte* p = table + 2; /* skip format */
- FT_UInt length = TT_PEEK_USHORT( p );
+ FT_Byte* p;
+ FT_UInt length;
+
FT_UInt n, max_subs;
- FT_Byte* keys; /* keys table */
- FT_Byte* subs; /* sub-headers */
- FT_Byte* glyph_ids; /* glyph ID array */
+ FT_Byte* keys; /* keys table */
+ FT_Byte* subs; /* sub-headers */
+ FT_Byte* glyph_ids; /* glyph ID array */
+
+
+ if ( table + 2 + 2 > valid->limit )
+ FT_INVALID_TOO_SHORT;
+ p = table + 2; /* skip format */
+ length = TT_NEXT_USHORT( p );
if ( table + length > valid->limit || length < 6 + 512 )
FT_INVALID_TOO_SHORT;
@@ -316,9 +333,8 @@
/* parse sub-headers */
for ( n = 0; n <= max_subs; n++ )
{
- FT_UInt first_code, code_count, offset;
- FT_Int delta;
- FT_Byte* ids;
+ FT_UInt first_code, code_count, offset;
+ FT_Int delta;
first_code = TT_NEXT_USHORT( p );
@@ -340,6 +356,9 @@
/* check offset */
if ( offset != 0 )
{
+ FT_Byte* ids;
+
+
ids = p - 2 + offset;
if ( ids < glyph_ids || ids + code_count*2 > table + length )
FT_INVALID_OFFSET;
@@ -365,7 +384,7 @@
}
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -537,24 +556,28 @@
cmap_info->format = 2;
cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
- FT_DEFINE_TT_CMAP(tt_cmap2_class_rec,
- sizeof ( TT_CMapRec ),
+ FT_DEFINE_TT_CMAP(
+ tt_cmap2_class_rec,
+ sizeof ( TT_CMapRec ),
+
+ (FT_CMap_InitFunc) tt_cmap_init,
+ (FT_CMap_DoneFunc) NULL,
+ (FT_CMap_CharIndexFunc)tt_cmap2_char_index,
+ (FT_CMap_CharNextFunc) tt_cmap2_char_next,
- (FT_CMap_InitFunc) tt_cmap_init,
- (FT_CMap_DoneFunc) NULL,
- (FT_CMap_CharIndexFunc)tt_cmap2_char_index,
- (FT_CMap_CharNextFunc) tt_cmap2_char_next,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
- NULL, NULL, NULL, NULL, NULL
- ,
2,
- (TT_CMap_ValidateFunc) tt_cmap2_validate,
- (TT_CMap_Info_GetFunc) tt_cmap2_get_info
- )
+ (TT_CMap_ValidateFunc)tt_cmap2_validate,
+ (TT_CMap_Info_GetFunc)tt_cmap2_get_info )
#endif /* TT_CONFIG_CMAP_FORMAT_2 */
@@ -662,7 +685,7 @@
cmap->cur_charcode = (FT_UInt32)0xFFFFFFFFUL;
cmap->cur_gindex = 0;
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -808,16 +831,20 @@
tt_cmap4_validate( FT_Byte* table,
FT_Validator valid )
{
- FT_Byte* p = table + 2; /* skip format */
- FT_UInt length = TT_NEXT_USHORT( p );
+ FT_Byte* p;
+ FT_UInt length;
+
FT_Byte *ends, *starts, *offsets, *deltas, *glyph_ids;
FT_UInt num_segs;
- FT_Error error = SFNT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
- if ( length < 16 )
+ if ( table + 2 + 2 > valid->limit )
FT_INVALID_TOO_SHORT;
+ p = table + 2; /* skip format */
+ length = TT_NEXT_USHORT( p );
+
/* in certain fonts, the `length' field is invalid and goes */
/* out of bound. We try to correct this here... */
if ( table + length > valid->limit )
@@ -828,6 +855,9 @@
length = (FT_UInt)( valid->limit - table );
}
+ if ( length < 16 )
+ FT_INVALID_TOO_SHORT;
+
p = table + 6;
num_segs = TT_NEXT_USHORT( p ); /* read segCountX2 */
@@ -1373,23 +1403,27 @@
cmap_info->format = 4;
cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
- FT_DEFINE_TT_CMAP(tt_cmap4_class_rec,
- sizeof ( TT_CMap4Rec ),
- (FT_CMap_InitFunc) tt_cmap4_init,
- (FT_CMap_DoneFunc) NULL,
- (FT_CMap_CharIndexFunc)tt_cmap4_char_index,
- (FT_CMap_CharNextFunc) tt_cmap4_char_next,
+ FT_DEFINE_TT_CMAP(
+ tt_cmap4_class_rec,
+ sizeof ( TT_CMap4Rec ),
+ (FT_CMap_InitFunc) tt_cmap4_init,
+ (FT_CMap_DoneFunc) NULL,
+ (FT_CMap_CharIndexFunc)tt_cmap4_char_index,
+ (FT_CMap_CharNextFunc) tt_cmap4_char_next,
+
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
- NULL, NULL, NULL, NULL, NULL
- ,
4,
- (TT_CMap_ValidateFunc) tt_cmap4_validate,
- (TT_CMap_Info_GetFunc) tt_cmap4_get_info
- )
+ (TT_CMap_ValidateFunc)tt_cmap4_validate,
+ (TT_CMap_Info_GetFunc)tt_cmap4_get_info )
#endif /* TT_CONFIG_CMAP_FORMAT_4 */
@@ -1456,7 +1490,7 @@
}
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -1532,24 +1566,28 @@
cmap_info->format = 6;
cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
- FT_DEFINE_TT_CMAP(tt_cmap6_class_rec,
- sizeof ( TT_CMapRec ),
+ FT_DEFINE_TT_CMAP(
+ tt_cmap6_class_rec,
+ sizeof ( TT_CMapRec ),
+
+ (FT_CMap_InitFunc) tt_cmap_init,
+ (FT_CMap_DoneFunc) NULL,
+ (FT_CMap_CharIndexFunc)tt_cmap6_char_index,
+ (FT_CMap_CharNextFunc) tt_cmap6_char_next,
- (FT_CMap_InitFunc) tt_cmap_init,
- (FT_CMap_DoneFunc) NULL,
- (FT_CMap_CharIndexFunc)tt_cmap6_char_index,
- (FT_CMap_CharNextFunc) tt_cmap6_char_next,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
- NULL, NULL, NULL, NULL, NULL
- ,
6,
- (TT_CMap_ValidateFunc) tt_cmap6_validate,
- (TT_CMap_Info_GetFunc) tt_cmap6_get_info
- )
+ (TT_CMap_ValidateFunc)tt_cmap6_validate,
+ (TT_CMap_Info_GetFunc)tt_cmap6_get_info )
#endif /* TT_CONFIG_CMAP_FORMAT_6 */
@@ -1631,7 +1669,8 @@
p = is32 + 8192; /* skip `is32' array */
num_groups = TT_NEXT_ULONG( p );
- if ( p + num_groups * 12 > valid->limit )
+ /* p + num_groups * 12 > valid->limit ? */
+ if ( num_groups > (FT_UInt32)( valid->limit - p ) / 12 )
FT_INVALID_TOO_SHORT;
/* check groups, they must be in increasing order */
@@ -1656,7 +1695,12 @@
if ( valid->level >= FT_VALIDATE_TIGHT )
{
- if ( start_id + end - start >= TT_VALID_GLYPH_COUNT( valid ) )
+ FT_UInt32 d = end - start;
+
+
+ /* start_id + end - start >= TT_VALID_GLYPH_COUNT( valid ) ? */
+ if ( d > TT_VALID_GLYPH_COUNT( valid ) ||
+ start_id >= TT_VALID_GLYPH_COUNT( valid ) - d )
FT_INVALID_GLYPH_ID;
count = (FT_UInt32)( end - start + 1 );
@@ -1700,7 +1744,7 @@
}
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -1785,24 +1829,28 @@
cmap_info->format = 8;
cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
- FT_DEFINE_TT_CMAP(tt_cmap8_class_rec,
- sizeof ( TT_CMapRec ),
+ FT_DEFINE_TT_CMAP(
+ tt_cmap8_class_rec,
+ sizeof ( TT_CMapRec ),
- (FT_CMap_InitFunc) tt_cmap_init,
- (FT_CMap_DoneFunc) NULL,
- (FT_CMap_CharIndexFunc)tt_cmap8_char_index,
- (FT_CMap_CharNextFunc) tt_cmap8_char_next,
+ (FT_CMap_InitFunc) tt_cmap_init,
+ (FT_CMap_DoneFunc) NULL,
+ (FT_CMap_CharIndexFunc)tt_cmap8_char_index,
+ (FT_CMap_CharNextFunc) tt_cmap8_char_next,
+
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
- NULL, NULL, NULL, NULL, NULL
- ,
8,
- (TT_CMap_ValidateFunc) tt_cmap8_validate,
- (TT_CMap_Info_GetFunc) tt_cmap8_get_info
- )
+ (TT_CMap_ValidateFunc)tt_cmap8_validate,
+ (TT_CMap_Info_GetFunc)tt_cmap8_get_info )
#endif /* TT_CONFIG_CMAP_FORMAT_8 */
@@ -1850,7 +1898,9 @@
count = TT_NEXT_ULONG( p );
if ( length > (FT_ULong)( valid->limit - table ) ||
- length < 20 + count * 2 )
+ /* length < 20 + count * 2 ? */
+ length < 20 ||
+ ( length - 20 ) / 2 < count )
FT_INVALID_TOO_SHORT;
/* check glyph indices */
@@ -1867,7 +1917,7 @@
}
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -1934,24 +1984,28 @@
cmap_info->format = 10;
cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
- FT_DEFINE_TT_CMAP(tt_cmap10_class_rec,
- sizeof ( TT_CMapRec ),
+ FT_DEFINE_TT_CMAP(
+ tt_cmap10_class_rec,
+ sizeof ( TT_CMapRec ),
- (FT_CMap_InitFunc) tt_cmap_init,
- (FT_CMap_DoneFunc) NULL,
- (FT_CMap_CharIndexFunc)tt_cmap10_char_index,
- (FT_CMap_CharNextFunc) tt_cmap10_char_next,
+ (FT_CMap_InitFunc) tt_cmap_init,
+ (FT_CMap_DoneFunc) NULL,
+ (FT_CMap_CharIndexFunc)tt_cmap10_char_index,
+ (FT_CMap_CharNextFunc) tt_cmap10_char_next,
+
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
- NULL, NULL, NULL, NULL, NULL
- ,
10,
- (TT_CMap_ValidateFunc) tt_cmap10_validate,
- (TT_CMap_Info_GetFunc) tt_cmap10_get_info
- )
+ (TT_CMap_ValidateFunc)tt_cmap10_validate,
+ (TT_CMap_Info_GetFunc)tt_cmap10_get_info )
#endif /* TT_CONFIG_CMAP_FORMAT_10 */
@@ -2010,7 +2064,7 @@
cmap->valid = 0;
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -2018,9 +2072,9 @@
tt_cmap12_validate( FT_Byte* table,
FT_Validator valid )
{
- FT_Byte* p;
- FT_ULong length;
- FT_ULong num_groups;
+ FT_Byte* p;
+ FT_ULong length;
+ FT_ULong num_groups;
if ( table + 16 > valid->limit )
@@ -2033,7 +2087,9 @@
num_groups = TT_NEXT_ULONG( p );
if ( length > (FT_ULong)( valid->limit - table ) ||
- length < 16 + 12 * num_groups )
+ /* length < 16 + 12 * num_groups ? */
+ length < 16 ||
+ ( length - 16 ) / 12 < num_groups )
FT_INVALID_TOO_SHORT;
/* check groups, they must be in increasing order */
@@ -2055,7 +2111,12 @@
if ( valid->level >= FT_VALIDATE_TIGHT )
{
- if ( start_id + end - start >= TT_VALID_GLYPH_COUNT( valid ) )
+ FT_UInt32 d = end - start;
+
+
+ /* start_id + end - start >= TT_VALID_GLYPH_COUNT( valid ) ? */
+ if ( d > TT_VALID_GLYPH_COUNT( valid ) ||
+ start_id >= TT_VALID_GLYPH_COUNT( valid ) - d )
FT_INVALID_GLYPH_ID;
}
@@ -2063,7 +2124,7 @@
}
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -2084,8 +2145,6 @@
char_code = cmap->cur_charcode + 1;
- n = cmap->cur_group;
-
for ( n = cmap->cur_group; n < cmap->num_groups; n++ )
{
p = cmap->cmap.data + 16 + 12 * n;
@@ -2254,24 +2313,28 @@
cmap_info->format = 12;
cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
- FT_DEFINE_TT_CMAP(tt_cmap12_class_rec,
- sizeof ( TT_CMap12Rec ),
+ FT_DEFINE_TT_CMAP(
+ tt_cmap12_class_rec,
+ sizeof ( TT_CMap12Rec ),
+
+ (FT_CMap_InitFunc) tt_cmap12_init,
+ (FT_CMap_DoneFunc) NULL,
+ (FT_CMap_CharIndexFunc)tt_cmap12_char_index,
+ (FT_CMap_CharNextFunc) tt_cmap12_char_next,
- (FT_CMap_InitFunc) tt_cmap12_init,
- (FT_CMap_DoneFunc) NULL,
- (FT_CMap_CharIndexFunc)tt_cmap12_char_index,
- (FT_CMap_CharNextFunc) tt_cmap12_char_next,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
- NULL, NULL, NULL, NULL, NULL
- ,
12,
- (TT_CMap_ValidateFunc) tt_cmap12_validate,
- (TT_CMap_Info_GetFunc) tt_cmap12_get_info
- )
+ (TT_CMap_ValidateFunc)tt_cmap12_validate,
+ (TT_CMap_Info_GetFunc)tt_cmap12_get_info )
#endif /* TT_CONFIG_CMAP_FORMAT_12 */
@@ -2330,7 +2393,7 @@
cmap->valid = 0;
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -2338,9 +2401,9 @@
tt_cmap13_validate( FT_Byte* table,
FT_Validator valid )
{
- FT_Byte* p;
- FT_ULong length;
- FT_ULong num_groups;
+ FT_Byte* p;
+ FT_ULong length;
+ FT_ULong num_groups;
if ( table + 16 > valid->limit )
@@ -2353,7 +2416,9 @@
num_groups = TT_NEXT_ULONG( p );
if ( length > (FT_ULong)( valid->limit - table ) ||
- length < 16 + 12 * num_groups )
+ /* length < 16 + 12 * num_groups ? */
+ length < 16 ||
+ ( length - 16 ) / 12 < num_groups )
FT_INVALID_TOO_SHORT;
/* check groups, they must be in increasing order */
@@ -2383,7 +2448,7 @@
}
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -2404,8 +2469,6 @@
char_code = cmap->cur_charcode + 1;
- n = cmap->cur_group;
-
for ( n = cmap->cur_group; n < cmap->num_groups; n++ )
{
p = cmap->cmap.data + 16 + 12 * n;
@@ -2490,7 +2553,6 @@
/* if `char_code' is not in any group, then `mid' is */
/* the group nearest to `char_code' */
- /* */
if ( char_code > end )
{
@@ -2570,24 +2632,28 @@
cmap_info->format = 13;
cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
- FT_DEFINE_TT_CMAP(tt_cmap13_class_rec,
- sizeof ( TT_CMap13Rec ),
+ FT_DEFINE_TT_CMAP(
+ tt_cmap13_class_rec,
+ sizeof ( TT_CMap13Rec ),
- (FT_CMap_InitFunc) tt_cmap13_init,
- (FT_CMap_DoneFunc) NULL,
- (FT_CMap_CharIndexFunc)tt_cmap13_char_index,
- (FT_CMap_CharNextFunc) tt_cmap13_char_next,
+ (FT_CMap_InitFunc) tt_cmap13_init,
+ (FT_CMap_DoneFunc) NULL,
+ (FT_CMap_CharIndexFunc)tt_cmap13_char_index,
+ (FT_CMap_CharNextFunc) tt_cmap13_char_next,
+
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
- NULL, NULL, NULL, NULL, NULL
- ,
13,
- (TT_CMap_ValidateFunc) tt_cmap13_validate,
- (TT_CMap_Info_GetFunc) tt_cmap13_get_info
- )
+ (TT_CMap_ValidateFunc)tt_cmap13_validate,
+ (TT_CMap_Info_GetFunc)tt_cmap13_get_info )
#endif /* TT_CONFIG_CMAP_FORMAT_13 */
@@ -2688,8 +2754,8 @@
FT_UInt32 num_results,
FT_Memory memory )
{
- FT_UInt32 old_max = cmap->max_results;
- FT_Error error = SFNT_Err_Ok;
+ FT_UInt32 old_max = cmap->max_results;
+ FT_Error error = FT_Err_Ok;
if ( num_results > cmap->max_results )
@@ -2713,11 +2779,11 @@
cmap->cmap.data = table;
table += 6;
- cmap->num_selectors = FT_PEEK_ULONG( table );
- cmap->max_results = 0;
- cmap->results = NULL;
+ cmap->num_selectors = FT_PEEK_ULONG( table );
+ cmap->max_results = 0;
+ cmap->results = NULL;
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -2725,13 +2791,22 @@
tt_cmap14_validate( FT_Byte* table,
FT_Validator valid )
{
- FT_Byte* p = table + 2;
- FT_ULong length = TT_NEXT_ULONG( p );
- FT_ULong num_selectors = TT_NEXT_ULONG( p );
+ FT_Byte* p;
+ FT_ULong length;
+ FT_ULong num_selectors;
+
+ if ( table + 2 + 4 + 4 > valid->limit )
+ FT_INVALID_TOO_SHORT;
+
+ p = table + 2;
+ length = TT_NEXT_ULONG( p );
+ num_selectors = TT_NEXT_ULONG( p );
if ( length > (FT_ULong)( valid->limit - table ) ||
- length < 10 + 11 * num_selectors )
+ /* length < 10 + 11 * num_selectors ? */
+ length < 10 ||
+ ( length - 10 ) / 11 < num_selectors )
FT_INVALID_TOO_SHORT;
/* check selectors, they must be in increasing order */
@@ -2767,7 +2842,8 @@
FT_ULong lastBase = 0;
- if ( defp + numRanges * 4 > valid->limit )
+ /* defp + numRanges * 4 > valid->limit ? */
+ if ( numRanges > (FT_ULong)( valid->limit - defp ) / 4 )
FT_INVALID_TOO_SHORT;
for ( i = 0; i < numRanges; ++i )
@@ -2791,10 +2867,11 @@
{
FT_Byte* ndp = table + nondefOff;
FT_ULong numMappings = TT_NEXT_ULONG( ndp );
- FT_ULong i, lastUni = 0;
+ FT_ULong i, lastUni = 0;
- if ( numMappings * 4 > (FT_ULong)( valid->limit - ndp ) )
+ /* numMappings * 4 > (FT_ULong)( valid->limit - ndp ) ? */
+ if ( numMappings > ( (FT_ULong)( valid->limit - ndp ) ) / 4 )
FT_INVALID_TOO_SHORT;
for ( i = 0; i < numMappings; ++i )
@@ -2819,7 +2896,7 @@
}
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -2857,7 +2934,7 @@
/* subtable 14 does not define a language field */
cmap_info->language = 0xFFFFFFFFUL;
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -2965,7 +3042,7 @@
tt_cmap14_char_var_index( TT_CMap cmap,
TT_CMap ucmap,
FT_UInt32 charcode,
- FT_UInt32 variantSelector)
+ FT_UInt32 variantSelector )
{
FT_Byte* p = tt_cmap14_find_variant( cmap->data + 6, variantSelector );
FT_ULong defOff;
@@ -3106,9 +3183,9 @@
static FT_UInt32*
- tt_cmap14_get_def_chars( TT_CMap cmap,
- FT_Byte* p,
- FT_Memory memory )
+ tt_cmap14_get_def_chars( TT_CMap cmap,
+ FT_Byte* p,
+ FT_Memory memory )
{
TT_CMap14 cmap14 = (TT_CMap14) cmap;
FT_UInt32 numRanges;
@@ -3124,7 +3201,7 @@
for ( q = cmap14->results; numRanges > 0; --numRanges )
{
- FT_UInt32 uni = (FT_UInt32)TT_NEXT_UINT24( p );
+ FT_UInt32 uni = (FT_UInt32)TT_NEXT_UINT24( p );
cnt = FT_NEXT_BYTE( p ) + 1;
@@ -3133,6 +3210,7 @@
q[0] = uni;
uni += 1;
q += 1;
+
} while ( --cnt != 0 );
}
q[0] = 0;
@@ -3176,7 +3254,6 @@
{
FT_Byte *p = tt_cmap14_find_variant( cmap->data + 6,
variantSelector );
- FT_UInt32 *ret;
FT_Int i;
FT_ULong defOff;
FT_ULong nondefOff;
@@ -3210,6 +3287,8 @@
FT_Byte* dp;
FT_UInt di, ni, k;
+ FT_UInt32 *ret;
+
p = cmap->data + nondefOff;
dp = cmap->data + defOff;
@@ -3306,25 +3385,25 @@
}
- FT_DEFINE_TT_CMAP(tt_cmap14_class_rec,
- sizeof ( TT_CMap14Rec ),
+ FT_DEFINE_TT_CMAP(
+ tt_cmap14_class_rec,
+ sizeof ( TT_CMap14Rec ),
+
+ (FT_CMap_InitFunc) tt_cmap14_init,
+ (FT_CMap_DoneFunc) tt_cmap14_done,
+ (FT_CMap_CharIndexFunc)tt_cmap14_char_index,
+ (FT_CMap_CharNextFunc) tt_cmap14_char_next,
- (FT_CMap_InitFunc) tt_cmap14_init,
- (FT_CMap_DoneFunc) tt_cmap14_done,
- (FT_CMap_CharIndexFunc)tt_cmap14_char_index,
- (FT_CMap_CharNextFunc) tt_cmap14_char_next,
+ /* Format 14 extension functions */
+ (FT_CMap_CharVarIndexFunc) tt_cmap14_char_var_index,
+ (FT_CMap_CharVarIsDefaultFunc)tt_cmap14_char_var_isdefault,
+ (FT_CMap_VariantListFunc) tt_cmap14_variants,
+ (FT_CMap_CharVariantListFunc) tt_cmap14_char_variants,
+ (FT_CMap_VariantCharListFunc) tt_cmap14_variant_chars,
- /* Format 14 extension functions */
- (FT_CMap_CharVarIndexFunc) tt_cmap14_char_var_index,
- (FT_CMap_CharVarIsDefaultFunc)tt_cmap14_char_var_isdefault,
- (FT_CMap_VariantListFunc) tt_cmap14_variants,
- (FT_CMap_CharVariantListFunc) tt_cmap14_char_variants,
- (FT_CMap_VariantCharListFunc) tt_cmap14_variant_chars
- ,
14,
(TT_CMap_ValidateFunc)tt_cmap14_validate,
- (TT_CMap_Info_GetFunc)tt_cmap14_get_info
- )
+ (TT_CMap_Info_GetFunc)tt_cmap14_get_info )
#endif /* TT_CONFIG_CMAP_FORMAT_14 */
@@ -3333,50 +3412,62 @@
static const TT_CMap_Class tt_cmap_classes[] =
{
-#define TTCMAPCITEM(a) &a,
+#define TTCMAPCITEM( a ) &a,
#include "ttcmapc.h"
NULL,
};
#else /*FT_CONFIG_OPTION_PIC*/
- void FT_Destroy_Class_tt_cmap_classes(FT_Library library, TT_CMap_Class* clazz)
+ void
+ FT_Destroy_Class_tt_cmap_classes( FT_Library library,
+ TT_CMap_Class* clazz )
{
- FT_Memory memory = library->memory;
+ FT_Memory memory = library->memory;
+
+
if ( clazz )
FT_FREE( clazz );
}
- FT_Error FT_Create_Class_tt_cmap_classes(FT_Library library, TT_CMap_Class** output_class)
+
+ FT_Error
+ FT_Create_Class_tt_cmap_classes( FT_Library library,
+ TT_CMap_Class** output_class )
{
- TT_CMap_Class* clazz;
- TT_CMap_ClassRec* recs;
- FT_Error error;
- FT_Memory memory = library->memory;
- int i = 0;
+ TT_CMap_Class* clazz = NULL;
+ TT_CMap_ClassRec* recs;
+ FT_Error error;
+ FT_Memory memory = library->memory;
+
+ int i = 0;
+
-#define TTCMAPCITEM(a) i++;
+#define TTCMAPCITEM( a ) i++;
#include "ttcmapc.h"
- /* allocate enough space for both the pointers +terminator and the class instances */
- if ( FT_ALLOC( clazz, sizeof(*clazz)*(i+1)+sizeof(TT_CMap_ClassRec)*i ) )
+ /* allocate enough space for both the pointers */
+ /* plus terminator and the class instances */
+ if ( FT_ALLOC( clazz, sizeof ( *clazz ) * ( i + 1 ) +
+ sizeof ( TT_CMap_ClassRec ) * i ) )
return error;
/* the location of the class instances follows the array of pointers */
- recs = (TT_CMap_ClassRec*) (((char*)clazz)+(sizeof(*clazz)*(i+1)));
- i=0;
+ recs = (TT_CMap_ClassRec*)( (char*)clazz +
+ sizeof ( *clazz ) * ( i + 1 ) );
+ i = 0;
#undef TTCMAPCITEM
-#define TTCMAPCITEM(a) \
- FT_Init_Class_##a(&recs[i]); \
- clazz[i] = &recs[i]; \
+#define TTCMAPCITEM( a ) \
+ FT_Init_Class_ ## a( &recs[i] ); \
+ clazz[i] = &recs[i]; \
i++;
#include "ttcmapc.h"
clazz[i] = NULL;
*output_class = clazz;
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
#endif /*FT_CONFIG_OPTION_PIC*/
@@ -3398,25 +3489,18 @@
if ( !p || p + 4 > limit )
- return SFNT_Err_Invalid_Table;
+ return FT_THROW( Invalid_Table );
/* only recognize format 0 */
if ( TT_NEXT_USHORT( p ) != 0 )
{
- p -= 2;
FT_ERROR(( "tt_face_build_cmaps:"
" unsupported `cmap' table format = %d\n",
- TT_PEEK_USHORT( p ) ));
- return SFNT_Err_Invalid_Table;
+ TT_PEEK_USHORT( p - 2 ) ));
+ return FT_THROW( Invalid_Table );
}
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-- )
{
@@ -3434,7 +3518,7 @@
{
FT_Byte* volatile cmap = table + offset;
volatile FT_UInt format = TT_PEEK_USHORT( cmap );
- const TT_CMap_Class* volatile pclazz = FT_TT_CMAP_CLASSES_GET;
+ const TT_CMap_Class* volatile pclazz = TT_CMAP_CLASSES_GET;
TT_CMap_Class volatile clazz;
@@ -3444,7 +3528,7 @@
if ( clazz->format == format )
{
volatile TT_ValidatorRec valid;
- volatile FT_Error error = SFNT_Err_Ok;
+ volatile FT_Error error = FT_Err_Ok;
ft_validator_init( FT_VALIDATOR( &valid ), cmap, limit,
@@ -3452,8 +3536,7 @@
valid.num_glyphs = (FT_UInt)face->max_profile.numGlyphs;
- if ( ft_setjmp(
- *((ft_jmp_buf*)&FT_VALIDATOR( &valid )->jump_buffer) ) == 0 )
+ if ( ft_setjmp( FT_VALIDATOR( &valid )->jump_buffer) == 0 )
{
/* validate this cmap sub-table */
error = clazz->validate( cmap, FT_VALIDATOR( &valid ) );
@@ -3464,9 +3547,9 @@
FT_CMap ttcmap;
- /* It might make sense to store the single variation selector */
- /* cmap somewhere special. But it would have to be in the */
- /* public FT_FaceRec, and we can't change that. */
+ /* It might make sense to store the single variation */
+ /* selector cmap somewhere special. But it would have to be */
+ /* in the public FT_FaceRec, and we can't change that. */
if ( !FT_CMap_New( (FT_CMap_Class)clazz,
cmap, &charmap, &ttcmap ) )
@@ -3493,7 +3576,7 @@
}
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
diff --git a/src/sfnt/ttcmap.h b/src/sfnt/ttcmap.h
index 94f7978..0fde167 100644
--- a/src/sfnt/ttcmap.h
+++ b/src/sfnt/ttcmap.h
@@ -4,7 +4,7 @@
/* */
/* TrueType character mapping table (cmap) support (specification). */
/* */
-/* Copyright 2002, 2003, 2004, 2005 by */
+/* Copyright 2002-2005, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -55,47 +55,80 @@ FT_BEGIN_HEADER
} TT_CMap_ClassRec;
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_TT_CMAP(class_, size_, init_, done_, char_index_, \
- char_next_, char_var_index_, char_var_default_, variant_list_, \
- charvariant_list_,variantchar_list_, \
- format_, validate_, get_cmap_info_) \
- FT_CALLBACK_TABLE_DEF \
- const TT_CMap_ClassRec class_ = \
- { \
- {size_, init_, done_, char_index_, \
- char_next_, char_var_index_, char_var_default_, variant_list_, \
- charvariant_list_, variantchar_list_}, \
- format_, validate_, get_cmap_info_ \
+#define FT_DEFINE_TT_CMAP( class_, \
+ size_, \
+ init_, \
+ done_, \
+ char_index_, \
+ char_next_, \
+ char_var_index_, \
+ char_var_default_, \
+ variant_list_, \
+ charvariant_list_, \
+ variantchar_list_, \
+ format_, \
+ validate_, \
+ get_cmap_info_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const TT_CMap_ClassRec class_ = \
+ { \
+ { size_, \
+ init_, \
+ done_, \
+ char_index_, \
+ char_next_, \
+ char_var_index_, \
+ char_var_default_, \
+ variant_list_, \
+ charvariant_list_, \
+ variantchar_list_ \
+ }, \
+ \
+ format_, \
+ validate_, \
+ get_cmap_info_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_TT_CMAP(class_, size_, init_, done_, char_index_, \
- char_next_, char_var_index_, char_var_default_, variant_list_, \
- charvariant_list_,variantchar_list_, \
- format_, validate_, get_cmap_info_) \
- void \
- FT_Init_Class_##class_( TT_CMap_ClassRec* clazz ) \
- { \
- clazz->clazz.size = size_; \
- clazz->clazz.init = init_; \
- clazz->clazz.done = done_; \
- clazz->clazz.char_index = char_index_; \
- clazz->clazz.char_next = char_next_; \
- clazz->clazz.char_var_index = char_var_index_; \
- clazz->clazz.char_var_default = char_var_default_; \
- clazz->clazz.variant_list = variant_list_; \
- clazz->clazz.charvariant_list = charvariant_list_; \
- clazz->clazz.variantchar_list = variantchar_list_; \
- clazz->format = format_; \
- clazz->validate = validate_; \
- clazz->get_cmap_info = get_cmap_info_; \
+#define FT_DEFINE_TT_CMAP( class_, \
+ size_, \
+ init_, \
+ done_, \
+ char_index_, \
+ char_next_, \
+ char_var_index_, \
+ char_var_default_, \
+ variant_list_, \
+ charvariant_list_, \
+ variantchar_list_, \
+ format_, \
+ validate_, \
+ get_cmap_info_ ) \
+ void \
+ FT_Init_Class_ ## class_( TT_CMap_ClassRec* clazz ) \
+ { \
+ clazz->clazz.size = size_; \
+ clazz->clazz.init = init_; \
+ clazz->clazz.done = done_; \
+ clazz->clazz.char_index = char_index_; \
+ clazz->clazz.char_next = char_next_; \
+ clazz->clazz.char_var_index = char_var_index_; \
+ clazz->clazz.char_var_default = char_var_default_; \
+ clazz->clazz.variant_list = variant_list_; \
+ clazz->clazz.charvariant_list = charvariant_list_; \
+ clazz->clazz.variantchar_list = variantchar_list_; \
+ clazz->format = format_; \
+ clazz->validate = validate_; \
+ clazz->get_cmap_info = get_cmap_info_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
+
typedef struct TT_ValidatorRec_
{
FT_ValidatorRec validator;
@@ -104,7 +137,7 @@ FT_BEGIN_HEADER
} TT_ValidatorRec, *TT_Validator;
-#define TT_VALIDATOR( x ) ((TT_Validator)( x ))
+#define TT_VALIDATOR( x ) ( (TT_Validator)( x ) )
#define TT_VALID_GLYPH_COUNT( x ) TT_VALIDATOR( x )->num_glyphs
diff --git a/src/sfnt/ttcmapc.h b/src/sfnt/ttcmapc.h
index 4c9c6a5..2ea2043 100644
--- a/src/sfnt/ttcmapc.h
+++ b/src/sfnt/ttcmapc.h
@@ -17,39 +17,40 @@
#ifdef TT_CONFIG_CMAP_FORMAT_0
- TTCMAPCITEM(tt_cmap0_class_rec)
+ TTCMAPCITEM( tt_cmap0_class_rec )
#endif
#ifdef TT_CONFIG_CMAP_FORMAT_2
- TTCMAPCITEM(tt_cmap2_class_rec)
+ TTCMAPCITEM( tt_cmap2_class_rec )
#endif
#ifdef TT_CONFIG_CMAP_FORMAT_4
- TTCMAPCITEM(tt_cmap4_class_rec)
+ TTCMAPCITEM( tt_cmap4_class_rec )
#endif
#ifdef TT_CONFIG_CMAP_FORMAT_6
- TTCMAPCITEM(tt_cmap6_class_rec)
+ TTCMAPCITEM( tt_cmap6_class_rec )
#endif
#ifdef TT_CONFIG_CMAP_FORMAT_8
- TTCMAPCITEM(tt_cmap8_class_rec)
+ TTCMAPCITEM( tt_cmap8_class_rec )
#endif
#ifdef TT_CONFIG_CMAP_FORMAT_10
- TTCMAPCITEM(tt_cmap10_class_rec)
+ TTCMAPCITEM( tt_cmap10_class_rec )
#endif
#ifdef TT_CONFIG_CMAP_FORMAT_12
- TTCMAPCITEM(tt_cmap12_class_rec)
+ TTCMAPCITEM( tt_cmap12_class_rec )
#endif
#ifdef TT_CONFIG_CMAP_FORMAT_13
- TTCMAPCITEM(tt_cmap13_class_rec)
+ TTCMAPCITEM( tt_cmap13_class_rec )
#endif
#ifdef TT_CONFIG_CMAP_FORMAT_14
- TTCMAPCITEM(tt_cmap14_class_rec)
+ TTCMAPCITEM( tt_cmap14_class_rec )
#endif
+
/* END */
diff --git a/src/sfnt/ttkern.c b/src/sfnt/ttkern.c
index 4688898..455e7b5 100644
--- a/src/sfnt/ttkern.c
+++ b/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, 2010 by */
+/* Copyright 1996-2007, 2009, 2010, 2013 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_ERROR(( "tt_face_load_kern:"
" kerning table is too small - ignored\n" ));
- error = SFNT_Err_Table_Missing;
+ error = FT_THROW( Table_Missing );
goto Exit;
}
@@ -99,7 +99,7 @@
length = FT_NEXT_USHORT( p );
coverage = FT_NEXT_USHORT( p );
- if ( length <= 6 )
+ if ( length <= 6 + 8 )
break;
p_next += length;
@@ -183,7 +183,7 @@
FT_UInt right_glyph )
{
FT_Int result = 0;
- FT_UInt count, mask = 1;
+ FT_UInt count, mask;
FT_Byte* p = face->kern_table;
FT_Byte* p_limit = p + face->kern_table_size;
@@ -196,7 +196,7 @@
count--, mask <<= 1 )
{
FT_Byte* base = p;
- FT_Byte* next = base;
+ FT_Byte* next;
FT_UInt version = FT_NEXT_USHORT( p );
FT_UInt length = FT_NEXT_USHORT( p );
FT_UInt coverage = FT_NEXT_USHORT( p );
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 5fb9aea..8338150 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -5,8 +5,7 @@
/* 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, */
-/* 2010 by */
+/* Copyright 1996-2010, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -143,7 +142,7 @@
goto Exit;
}
else
- error = SFNT_Err_Table_Missing;
+ error = FT_THROW( Table_Missing );
Exit:
return error;
@@ -208,7 +207,10 @@
}
/* we ignore invalid tables */
- if ( table.Offset + table.Length > stream->size )
+
+ /* table.Offset + table.Length > stream->size ? */
+ if ( table.Length > stream->size ||
+ table.Offset > stream->size - table.Length )
{
FT_TRACE2(( "check_table_dir: table entry %d invalid\n", nn ));
continue;
@@ -237,8 +239,9 @@
*/
if ( table.Length < 0x36 )
{
- FT_TRACE2(( "check_table_dir: `head' table too small\n" ));
- error = SFNT_Err_Table_Missing;
+ FT_TRACE2(( "check_table_dir:"
+ " `head' or `bhed' table too small\n" ));
+ error = FT_THROW( Table_Missing );
goto Exit;
}
@@ -247,12 +250,8 @@
goto Exit;
if ( magic != 0x5F0F3CF5UL )
- {
FT_TRACE2(( "check_table_dir:"
- " no magic number found in `head' table\n"));
- error = SFNT_Err_Table_Missing;
- goto Exit;
- }
+ " invalid magic number in `head' or `bhed' table\n"));
if ( FT_STREAM_SEEK( offset + ( nn + 1 ) * 16 ) )
goto Exit;
@@ -268,14 +267,14 @@
if ( sfnt->num_tables == 0 )
{
FT_TRACE2(( "check_table_dir: no tables found\n" ));
- error = SFNT_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
/* if `sing' and `meta' tables are present, there is no `head' table */
if ( has_head || ( has_sing && has_meta ) )
{
- error = SFNT_Err_Ok;
+ error = FT_Err_Ok;
goto Exit;
}
else
@@ -286,7 +285,7 @@
#else
FT_TRACE2(( " neither `head' nor `sing' table found\n" ));
#endif
- error = SFNT_Err_Table_Missing;
+ error = FT_THROW( Table_Missing );
}
Exit:
@@ -354,7 +353,7 @@
#if 0
if ( sfnt.search_range != 1 << ( sfnt.entry_selector + 4 ) ||
sfnt.search_range + sfnt.range_shift != sfnt.num_tables << 4 )
- return SFNT_Err_Unknown_File_Format;
+ return FT_THROW( Unknown_File_Format );
#endif
/* load the table directory */
@@ -362,14 +361,17 @@
FT_TRACE2(( "-- Number of tables: %10u\n", sfnt.num_tables ));
FT_TRACE2(( "-- Format version: 0x%08lx\n", sfnt.format_tag ));
- /* check first */
- error = check_table_dir( &sfnt, stream );
- if ( error )
+ if ( sfnt.format_tag != TTAG_OTTO )
{
- FT_TRACE2(( "tt_face_load_font_dir:"
- " invalid table directory for TrueType\n" ));
+ /* check first */
+ error = check_table_dir( &sfnt, stream );
+ if ( error )
+ {
+ FT_TRACE2(( "tt_face_load_font_dir:"
+ " invalid table directory for TrueType\n" ));
- goto Exit;
+ goto Exit;
+ }
}
face->num_tables = sfnt.num_tables;
@@ -392,11 +394,14 @@
{
entry->Tag = FT_GET_TAG4();
entry->CheckSum = FT_GET_ULONG();
- entry->Offset = FT_GET_LONG();
- entry->Length = FT_GET_LONG();
+ entry->Offset = FT_GET_ULONG();
+ entry->Length = FT_GET_ULONG();
/* ignore invalid tables */
- if ( entry->Offset + entry->Length > stream->size )
+
+ /* entry->Offset + entry->Length > stream->size ? */
+ if ( entry->Length > stream->size ||
+ entry->Offset > stream->size - entry->Length )
continue;
else
{
@@ -480,7 +485,7 @@
table = tt_face_lookup_table( face, tag );
if ( !table )
{
- error = SFNT_Err_Table_Missing;
+ error = FT_THROW( Table_Missing );
goto Exit;
}
@@ -495,7 +500,7 @@
{
*length = size;
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
if ( length )
@@ -624,7 +629,7 @@
FT_Error error;
TT_MaxProfile* maxProfile = &face->max_profile;
- const FT_Frame_Field maxp_fields[] =
+ static const FT_Frame_Field maxp_fields[] =
{
#undef FT_STRUCTURE
#define FT_STRUCTURE TT_MaxProfile
@@ -635,7 +640,7 @@
FT_FRAME_END
};
- const FT_Frame_Field maxp_fields_extra[] =
+ static const FT_Frame_Field maxp_fields_extra[] =
{
FT_FRAME_START( 26 ),
FT_FRAME_USHORT( maxPoints ),
@@ -721,7 +726,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* tt_face_load_names */
+ /* tt_face_load_name */
/* */
/* <Description> */
/* Loads the name records. */
@@ -799,7 +804,7 @@
if ( storage_start > storage_limit )
{
FT_ERROR(( "tt_face_load_name: invalid `name' table\n" ));
- error = SFNT_Err_Name_Table_Missing;
+ error = FT_THROW( Name_Table_Missing );
goto Exit;
}
@@ -952,7 +957,7 @@
FT_Error error;
TT_OS2* os2;
- const FT_Frame_Field os2_fields[] =
+ static const FT_Frame_Field os2_fields[] =
{
#undef FT_STRUCTURE
#define FT_STRUCTURE TT_OS2
@@ -1004,7 +1009,8 @@
FT_FRAME_END
};
- const FT_Frame_Field os2_fields_extra[] =
+ /* `OS/2' version 1 and newer */
+ static const FT_Frame_Field os2_fields_extra1[] =
{
FT_FRAME_START( 8 ),
FT_FRAME_ULONG( ulCodePageRange1 ),
@@ -1012,7 +1018,8 @@
FT_FRAME_END
};
- const FT_Frame_Field os2_fields_extra2[] =
+ /* `OS/2' version 2 and newer */
+ static const FT_Frame_Field os2_fields_extra2[] =
{
FT_FRAME_START( 10 ),
FT_FRAME_SHORT ( sxHeight ),
@@ -1023,6 +1030,15 @@
FT_FRAME_END
};
+ /* `OS/2' version 5 and newer */
+ static const FT_Frame_Field os2_fields_extra5[] =
+ {
+ FT_FRAME_START( 4 ),
+ FT_FRAME_USHORT( usLowerOpticalPointSize ),
+ FT_FRAME_USHORT( usUpperOpticalPointSize ),
+ FT_FRAME_END
+ };
+
/* We now support old Mac fonts where the OS/2 table doesn't */
/* exist. Simply put, we set the `version' field to 0xFFFF */
@@ -1036,18 +1052,20 @@
if ( FT_STREAM_READ_FIELDS( os2_fields, os2 ) )
goto Exit;
- os2->ulCodePageRange1 = 0;
- os2->ulCodePageRange2 = 0;
- os2->sxHeight = 0;
- os2->sCapHeight = 0;
- os2->usDefaultChar = 0;
- os2->usBreakChar = 0;
- os2->usMaxContext = 0;
+ os2->ulCodePageRange1 = 0;
+ os2->ulCodePageRange2 = 0;
+ os2->sxHeight = 0;
+ os2->sCapHeight = 0;
+ os2->usDefaultChar = 0;
+ os2->usBreakChar = 0;
+ os2->usMaxContext = 0;
+ os2->usLowerOpticalPointSize = 0;
+ os2->usUpperOpticalPointSize = 0xFFFF;
if ( os2->version >= 0x0001 )
{
/* only version 1 tables */
- if ( FT_STREAM_READ_FIELDS( os2_fields_extra, os2 ) )
+ if ( FT_STREAM_READ_FIELDS( os2_fields_extra1, os2 ) )
goto Exit;
if ( os2->version >= 0x0002 )
@@ -1055,6 +1073,13 @@
/* only version 2 tables */
if ( FT_STREAM_READ_FIELDS( os2_fields_extra2, os2 ) )
goto Exit;
+
+ if ( os2->version >= 0x0005 )
+ {
+ /* only version 5 tables */
+ if ( FT_STREAM_READ_FIELDS( os2_fields_extra5, os2 ) )
+ goto Exit;
+ }
}
}
@@ -1125,7 +1150,7 @@
FT_TRACE3(( "isFixedPitch: %s\n", post->isFixedPitch
? " yes" : " no" ));
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -1162,6 +1187,7 @@
FT_FRAME_USHORT( Style ),
FT_FRAME_USHORT( TypeFamily ),
FT_FRAME_USHORT( CapHeight ),
+ FT_FRAME_USHORT( SymbolSet ),
FT_FRAME_BYTES ( TypeFace, 16 ),
FT_FRAME_BYTES ( CharacterComplement, 8 ),
FT_FRAME_BYTES ( FileName, 6 ),
@@ -1233,18 +1259,18 @@
if ( face->gasp.version >= 2 )
{
face->gasp.numRanges = 0;
- error = SFNT_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
num_ranges = face->gasp.numRanges;
FT_TRACE3(( "numRanges: %u\n", num_ranges ));
- if ( FT_QNEW_ARRAY( gaspranges, num_ranges ) ||
- FT_FRAME_ENTER( num_ranges * 4L ) )
+ if ( FT_QNEW_ARRAY( face->gasp.gaspRanges, num_ranges ) ||
+ FT_FRAME_ENTER( num_ranges * 4L ) )
goto Exit;
- face->gasp.gaspRanges = gaspranges;
+ gaspranges = face->gasp.gaspRanges;
for ( j = 0; j < num_ranges; j++ )
{
diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c
index 73ac8b2..bb31957 100644
--- a/src/sfnt/ttmtx.c
+++ b/src/sfnt/ttmtx.c
@@ -4,7 +4,7 @@
/* */
/* Load the metrics tables common to TTF and OTF fonts (body). */
/* */
-/* Copyright 2006-2009, 2011 by */
+/* Copyright 2006-2009, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -35,13 +35,6 @@
#define FT_COMPONENT trace_ttmtx
- /*
- * Unfortunately, we can't enable our memory optimizations if
- * FT_CONFIG_OPTION_OLD_INTERNALS is defined. This is because at least
- * one rogue client (libXfont in the X.Org XServer) is directly accessing
- * the metrics.
- */
-
/*************************************************************************/
/* */
/* <Function> */
@@ -60,8 +53,6 @@
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
-#ifndef FT_CONFIG_OPTION_OLD_INTERNALS
-
FT_LOCAL_DEF( FT_Error )
tt_face_load_hmtx( TT_Face face,
FT_Stream stream,
@@ -97,142 +88,6 @@
return error;
}
-#else /* !FT_CONFIG_OPTION_OLD_INTERNALS */
-
- FT_LOCAL_DEF( FT_Error )
- tt_face_load_hmtx( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical )
- {
- FT_Error error;
- FT_Memory memory = stream->memory;
-
- FT_ULong table_len;
- FT_Long num_shorts, num_longs, num_shorts_checked;
-
- TT_LongMetrics* longs;
- TT_ShortMetrics** shorts;
- FT_Byte* p;
-
-
- if ( vertical )
- {
- void* lm = &face->vertical.long_metrics;
- void** sm = &face->vertical.short_metrics;
-
-
- error = face->goto_table( face, TTAG_vmtx, stream, &table_len );
- if ( error )
- goto Fail;
-
- num_longs = face->vertical.number_Of_VMetrics;
- if ( (FT_ULong)num_longs > table_len / 4 )
- num_longs = (FT_Long)( table_len / 4 );
-
- face->vertical.number_Of_VMetrics = 0;
-
- longs = (TT_LongMetrics*)lm;
- shorts = (TT_ShortMetrics**)sm;
- }
- else
- {
- void* lm = &face->horizontal.long_metrics;
- void** sm = &face->horizontal.short_metrics;
-
-
- error = face->goto_table( face, TTAG_hmtx, stream, &table_len );
- if ( error )
- goto Fail;
-
- num_longs = face->horizontal.number_Of_HMetrics;
- if ( (FT_ULong)num_longs > table_len / 4 )
- num_longs = (FT_Long)( table_len / 4 );
-
- face->horizontal.number_Of_HMetrics = 0;
-
- longs = (TT_LongMetrics*)lm;
- shorts = (TT_ShortMetrics**)sm;
- }
-
- /* never trust derived values */
-
- num_shorts = face->max_profile.numGlyphs - num_longs;
- num_shorts_checked = ( table_len - num_longs * 4L ) / 2;
-
- if ( num_shorts < 0 )
- {
- FT_TRACE0(( "tt_face_load_hmtx:"
- " %cmtx has more metrics than glyphs.\n",
- vertical ? 'v' : 'h' ));
-
- /* Adobe simply ignores this problem. So we shall do the same. */
-#if 0
- error = vertical ? SFNT_Err_Invalid_Vert_Metrics
- : SFNT_Err_Invalid_Horiz_Metrics;
- goto Exit;
-#else
- num_shorts = 0;
-#endif
- }
-
- if ( FT_QNEW_ARRAY( *longs, num_longs ) ||
- FT_QNEW_ARRAY( *shorts, num_shorts ) )
- goto Fail;
-
- if ( FT_FRAME_ENTER( table_len ) )
- goto Fail;
-
- p = stream->cursor;
-
- {
- TT_LongMetrics cur = *longs;
- TT_LongMetrics limit = cur + num_longs;
-
-
- for ( ; cur < limit; cur++ )
- {
- cur->advance = FT_NEXT_USHORT( p );
- cur->bearing = FT_NEXT_SHORT( p );
- }
- }
-
- /* do we have an inconsistent number of metric values? */
- {
- TT_ShortMetrics* cur = *shorts;
- TT_ShortMetrics* limit = cur +
- FT_MIN( num_shorts, num_shorts_checked );
-
-
- for ( ; cur < limit; cur++ )
- *cur = FT_NEXT_SHORT( p );
-
- /* We fill up the missing left side bearings with the */
- /* last valid value. Since this will occur for buggy CJK */
- /* fonts usually only, nothing serious will happen. */
- if ( num_shorts > num_shorts_checked && num_shorts_checked > 0 )
- {
- FT_Short val = (*shorts)[num_shorts_checked - 1];
-
-
- limit = *shorts + num_shorts;
- for ( ; cur < limit; cur++ )
- *cur = val;
- }
- }
-
- FT_FRAME_EXIT();
-
- if ( vertical )
- face->vertical.number_Of_VMetrics = (FT_UShort)num_longs;
- else
- face->horizontal.number_Of_HMetrics = (FT_UShort)num_longs;
-
- Fail:
- return error;
- }
-
-#endif /* !FT_CONFIG_OPTION_OLD_INTERNALS */
-
/*************************************************************************/
/* */
@@ -260,7 +115,7 @@
FT_Error error;
TT_HoriHeader* header;
- const FT_Frame_Field metrics_header_fields[] =
+ static const FT_Frame_Field metrics_header_fields[] =
{
#undef FT_STRUCTURE
#define FT_STRUCTURE TT_HoriHeader
@@ -328,24 +183,25 @@
/* tt_face_get_metrics */
/* */
/* <Description> */
- /* Returns the horizontal or vertical metrics in font units for a */
- /* given glyph. The metrics are the left side bearing (resp. top */
- /* side bearing) and advance width (resp. advance height). */
+ /* Return the horizontal or vertical metrics in font units for a */
+ /* given glyph. The values are the left side bearing (top side */
+ /* bearing for vertical metrics) and advance width (advance height */
+ /* for vertical metrics). */
/* */
/* <Input> */
- /* header :: A pointer to either the horizontal or vertical metrics */
- /* structure. */
+ /* face :: A pointer to the TrueType face structure. */
+ /* */
+ /* vertical :: If set to TRUE, get vertical metrics. */
/* */
- /* idx :: The glyph index. */
+ /* gindex :: The glyph index. */
/* */
/* <Output> */
- /* bearing :: The bearing, either left side or top side. */
+ /* abearing :: The bearing, either left side or top side. */
/* */
- /* advance :: The advance width resp. advance height. */
+ /* aadvance :: The advance width or advance height, depending on */
+ /* the `vertical' flag. */
/* */
-#ifndef FT_CONFIG_OPTION_OLD_INTERNALS
-
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL_DEF( void )
tt_face_get_metrics( TT_Face face,
FT_Bool vertical,
FT_UInt gindex,
@@ -418,51 +274,7 @@
*abearing = 0;
*aadvance = 0;
}
-
- return SFNT_Err_Ok;
}
-#else /* !FT_CONFIG_OPTION_OLD_INTERNALS */
-
- FT_LOCAL_DEF( FT_Error )
- tt_face_get_metrics( TT_Face face,
- FT_Bool vertical,
- FT_UInt gindex,
- FT_Short* abearing,
- FT_UShort* aadvance )
- {
- void* v = &face->vertical;
- void* h = &face->horizontal;
- TT_HoriHeader* header = vertical ? (TT_HoriHeader*)v
- : (TT_HoriHeader*)h;
- TT_LongMetrics longs_m;
- FT_UShort k = header->number_Of_HMetrics;
-
-
- if ( k == 0 ||
- !header->long_metrics ||
- gindex >= (FT_UInt)face->max_profile.numGlyphs )
- {
- *abearing = *aadvance = 0;
- return SFNT_Err_Ok;
- }
-
- if ( gindex < (FT_UInt)k )
- {
- longs_m = (TT_LongMetrics)header->long_metrics + gindex;
- *abearing = longs_m->bearing;
- *aadvance = longs_m->advance;
- }
- else
- {
- *abearing = ((TT_ShortMetrics*)header->short_metrics)[gindex - k];
- *aadvance = ((TT_LongMetrics)header->long_metrics)[k - 1].advance;
- }
-
- return SFNT_Err_Ok;
- }
-
-#endif /* !FT_CONFIG_OPTION_OLD_INTERNALS */
-
/* END */
diff --git a/src/sfnt/ttmtx.h b/src/sfnt/ttmtx.h
index 8b91a11..fb04039 100644
--- a/src/sfnt/ttmtx.h
+++ b/src/sfnt/ttmtx.h
@@ -4,7 +4,7 @@
/* */
/* Load the metrics tables common to TTF and OTF fonts (specification). */
/* */
-/* Copyright 2006 by */
+/* Copyright 2006, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -40,7 +40,7 @@ FT_BEGIN_HEADER
FT_Bool vertical );
- FT_LOCAL( FT_Error )
+ FT_LOCAL( void )
tt_face_get_metrics( TT_Face face,
FT_Bool vertical,
FT_UInt gindex,
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index 6f4bb1d..99d8005 100644
--- a/src/sfnt/ttpost.c
+++ b/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, 2010 by */
+/* Copyright 1996-2003, 2006-2010, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -64,12 +64,12 @@
#define MAC_NAME( x ) ( (FT_String*)tt_post_default_names[x] )
- /* the 258 default Mac PS glyph names */
+ /* the 258 default Mac PS glyph names; see file `tools/glnames.py' */
static const FT_String* const tt_post_default_names[258] =
{
/* 0 */
- ".notdef", ".null", "CR", "space", "exclam",
+ ".notdef", ".null", "nonmarkingreturn", "space", "exclam",
"quotedbl", "numbersign", "dollar", "percent", "ampersand",
/* 10 */
"quotesingle", "parenleft", "parenright", "asterisk", "plus",
@@ -120,7 +120,7 @@
"ae", "oslash", "questiondown", "exclamdown", "logicalnot",
"radical", "florin", "approxequal", "Delta", "guillemotleft",
/* 170 */
- "guillemotright", "ellipsis", "nbspace", "Agrave", "Atilde",
+ "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde",
"Otilde", "OE", "oe", "endash", "emdash",
/* 180 */
"quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide",
@@ -144,8 +144,8 @@
"multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf",
"onequarter", "threequarters", "franc", "Gbreve", "gbreve",
/* 250 */
- "Idot", "Scedilla", "scedilla", "Cacute", "cacute",
- "Ccaron", "ccaron", "dmacron",
+ "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute",
+ "Ccaron", "ccaron", "dcroat",
};
@@ -178,7 +178,7 @@
if ( num_glyphs > face->max_profile.numGlyphs )
{
- error = SFNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -284,7 +284,7 @@
table->glyph_indices = glyph_indices;
table->glyph_names = name_strings;
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
Fail1:
{
@@ -325,7 +325,7 @@
/* check the number of glyphs */
if ( num_glyphs > face->max_profile.numGlyphs || num_glyphs > 258 )
{
- error = SFNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -345,7 +345,7 @@
if ( idx < 0 || idx > num_glyphs )
{
- error = SFNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
}
@@ -360,7 +360,7 @@
table->offsets = offset_table;
}
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
Fail:
FT_FREE( offset_table );
@@ -402,7 +402,7 @@
else if ( format == 0x00028000L )
error = load_format_25( face, stream, post_limit );
else
- error = SFNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
face->postscript_names.loaded = 1;
@@ -488,15 +488,15 @@
if ( !face )
- return SFNT_Err_Invalid_Face_Handle;
+ return FT_THROW( Invalid_Face_Handle );
if ( idx >= (FT_UInt)face->max_profile.numGlyphs )
- return SFNT_Err_Invalid_Glyph_Index;
+ return FT_THROW( Invalid_Glyph_Index );
#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
psnames = (FT_Service_PsCMaps)face->psnames;
if ( !psnames )
- return SFNT_Err_Unimplemented_Feature;
+ return FT_THROW( Unimplemented_Feature );
#endif
names = &face->postscript_names;
@@ -556,7 +556,7 @@
/* nothing to do for format == 0x00030000L */
End:
- return SFNT_Err_Ok;
+ return FT_Err_Ok;
}
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index 283ba7e..c2db96c 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -4,10 +4,12 @@
/* */
/* TrueType and OpenType embedded bitmap support (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
-/* 2010 by */
+/* Copyright 2005-2009, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
+/* Copyright 2013 by Google, Inc. */
+/* Google Author(s): Behdad Esfahbod. */
+/* */
/* 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 */
@@ -16,29 +18,19 @@
/* */
/***************************************************************************/
-#include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
-
- /*
- * Alas, the memory-optimized sbit loader can't be used when implementing
- * the `old internals' hack
- */
-#ifndef FT_CONFIG_OPTION_OLD_INTERNALS
-
-#include "ttsbit0.c"
-
-#else /* FT_CONFIG_OPTION_OLD_INTERNALS */
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
+#include FT_BITMAP_H
#include "ttsbit.h"
#include "sferrors.h"
+#include "ttmtx.h"
+#include "pngshim.h"
+
/*************************************************************************/
/* */
@@ -50,1398 +42,1352 @@
#define FT_COMPONENT trace_ttsbit
- /*************************************************************************/
- /* */
- /* <Function> */
- /* blit_sbit */
- /* */
- /* <Description> */
- /* Blits a bitmap from an input stream into a given target. Supports */
- /* x and y offsets as well as byte padded lines. */
- /* */
- /* <Input> */
- /* target :: The target bitmap/pixmap. */
- /* */
- /* source :: The input packed bitmap data. */
- /* */
- /* line_bits :: The number of bits per line. */
- /* */
- /* byte_padded :: A flag which is true if lines are byte-padded. */
- /* */
- /* x_offset :: The horizontal offset. */
- /* */
- /* y_offset :: The vertical offset. */
- /* */
- /* <Note> */
- /* IMPORTANT: The x and y offsets are relative to the top corner of */
- /* the target bitmap (unlike the normal TrueType */
- /* convention). A positive y offset indicates a downwards */
- /* direction! */
- /* */
- static void
- blit_sbit( FT_Bitmap* target,
- FT_Byte* source,
- FT_Int line_bits,
- FT_Bool byte_padded,
- FT_Int x_offset,
- FT_Int y_offset,
- FT_Int source_height )
+ FT_LOCAL_DEF( FT_Error )
+ tt_face_load_sbit( TT_Face face,
+ FT_Stream stream )
{
- FT_Byte* line_buff;
- FT_Int line_incr;
- FT_Int height;
+ FT_Error error;
+ FT_ULong table_size;
+
- FT_UShort acc;
- FT_UInt loaded;
+ face->sbit_table = NULL;
+ face->sbit_table_size = 0;
+ face->sbit_table_type = TT_SBIT_TABLE_TYPE_NONE;
+ face->sbit_num_strikes = 0;
+
+ error = face->goto_table( face, TTAG_CBLC, stream, &table_size );
+ if ( !error )
+ face->sbit_table_type = TT_SBIT_TABLE_TYPE_CBLC;
+ else
+ {
+ error = face->goto_table( face, TTAG_EBLC, stream, &table_size );
+ if ( error )
+ error = face->goto_table( face, TTAG_bloc, stream, &table_size );
+ if ( !error )
+ face->sbit_table_type = TT_SBIT_TABLE_TYPE_EBLC;
+ }
+
+ if ( error )
+ {
+ error = face->goto_table( face, TTAG_sbix, stream, &table_size );
+ if ( !error )
+ face->sbit_table_type = TT_SBIT_TABLE_TYPE_SBIX;
+ }
+ if ( error )
+ goto Exit;
+ if ( table_size < 8 )
+ {
+ FT_ERROR(( "tt_face_load_sbit_strikes: table too short\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
- /* first of all, compute starting write position */
- line_incr = target->pitch;
- line_buff = target->buffer;
+ switch ( (FT_UInt)face->sbit_table_type )
+ {
+ case TT_SBIT_TABLE_TYPE_EBLC:
+ case TT_SBIT_TABLE_TYPE_CBLC:
+ {
+ FT_Byte* p;
+ FT_Fixed version;
+ FT_ULong num_strikes;
+ FT_UInt count;
- if ( line_incr < 0 )
- line_buff -= line_incr * ( target->rows - 1 );
- line_buff += ( x_offset >> 3 ) + y_offset * line_incr;
+ if ( FT_FRAME_EXTRACT( table_size, face->sbit_table ) )
+ goto Exit;
- /***********************************************************************/
- /* */
- /* We use the extra-classic `accumulator' trick to extract the bits */
- /* from the source byte stream. */
- /* */
- /* Namely, the variable `acc' is a 16-bit accumulator containing the */
- /* last `loaded' bits from the input stream. The bits are shifted to */
- /* the upmost position in `acc'. */
- /* */
- /***********************************************************************/
+ face->sbit_table_size = table_size;
- acc = 0; /* clear accumulator */
- loaded = 0; /* no bits were loaded */
+ p = face->sbit_table;
- for ( height = source_height; height > 0; height-- )
- {
- FT_Byte* cur = line_buff; /* current write cursor */
- FT_Int count = line_bits; /* # of bits to extract per line */
- FT_Byte shift = (FT_Byte)( x_offset & 7 ); /* current write shift */
- FT_Byte space = (FT_Byte)( 8 - shift );
+ version = FT_NEXT_ULONG( p );
+ num_strikes = FT_NEXT_ULONG( p );
+ if ( ( version & 0xFFFF0000UL ) != 0x00020000UL )
+ {
+ error = FT_THROW( Unknown_File_Format );
+ goto Exit;
+ }
- /* first of all, read individual source bytes */
- if ( count >= 8 )
- {
- count -= 8;
+ if ( num_strikes >= 0x10000UL )
{
- do
- {
- FT_Byte val;
-
-
- /* ensure that there are at least 8 bits in the accumulator */
- if ( loaded < 8 )
- {
- acc |= (FT_UShort)((FT_UShort)*source++ << ( 8 - loaded ));
- loaded += 8;
- }
-
- /* now write one byte */
- val = (FT_Byte)( acc >> 8 );
- if ( shift )
- {
- cur[0] |= (FT_Byte)( val >> shift );
- cur[1] |= (FT_Byte)( val << space );
- }
- else
- cur[0] |= val;
-
- cur++;
- acc <<= 8; /* remove bits from accumulator */
- loaded -= 8;
- count -= 8;
-
- } while ( count >= 0 );
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
}
- /* restore `count' to correct value */
- count += 8;
+ /*
+ * Count the number of strikes available in the table. We are a bit
+ * paranoid there and don't trust the data.
+ */
+ count = (FT_UInt)num_strikes;
+ if ( 8 + 48UL * count > table_size )
+ count = (FT_UInt)( ( table_size - 8 ) / 48 );
+
+ face->sbit_num_strikes = count;
}
+ break;
- /* now write remaining bits (count < 8) */
- if ( count > 0 )
+ case TT_SBIT_TABLE_TYPE_SBIX:
{
- FT_Byte val;
+ FT_UShort version;
+ FT_UShort flags;
+ FT_ULong num_strikes;
+ FT_UInt count;
+
+
+ if ( FT_FRAME_ENTER( 8 ) )
+ goto Exit;
+ version = FT_GET_USHORT();
+ flags = FT_GET_USHORT();
+ num_strikes = FT_GET_ULONG();
- /* ensure that there are at least `count' bits in the accumulator */
- if ( (FT_Int)loaded < count )
+ FT_FRAME_EXIT();
+
+ if ( version < 1 )
{
- acc |= (FT_UShort)((FT_UShort)*source++ << ( 8 - loaded ));
- loaded += 8;
+ error = FT_THROW( Unknown_File_Format );
+ goto Exit;
}
- /* now write remaining bits */
- val = (FT_Byte)( ( (FT_Byte)( acc >> 8 ) ) & ~( 0xFF >> count ) );
- cur[0] |= (FT_Byte)( val >> shift );
+ /* Bit 0 must always be `1'. */
+ /* Bit 1 controls the overlay of bitmaps with outlines. */
+ /* All other bits should be zero. */
+ if ( !( flags == 1 || flags == 3 ) ||
+ num_strikes >= 0x10000UL )
+ {
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
- if ( count > space )
- cur[1] |= (FT_Byte)( val << space );
+ /* we currently don't support bit 1; however, it is better to */
+ /* draw at least something... */
+ if ( flags == 3 )
+ FT_TRACE1(( "tt_face_load_sbit_strikes:"
+ " sbix overlay not supported yet\n"
+ " "
+ " expect bad rendering results\n" ));
+
+ /*
+ * Count the number of strikes available in the table. We are a bit
+ * paranoid there and don't trust the data.
+ */
+ count = (FT_UInt)num_strikes;
+ if ( 8 + 4UL * count > table_size )
+ count = (FT_UInt)( ( table_size - 8 ) / 4 );
+
+ if ( FT_STREAM_SEEK( FT_STREAM_POS() - 8 ) )
+ goto Exit;
- acc <<= count;
- loaded -= count;
- }
+ face->sbit_table_size = 8 + count * 4;
+ if ( FT_FRAME_EXTRACT( face->sbit_table_size, face->sbit_table ) )
+ goto Exit;
- /* now, skip to next line */
- if ( byte_padded )
- {
- acc = 0;
- loaded = 0; /* clear accumulator on byte-padded lines */
+ face->sbit_num_strikes = count;
}
+ break;
+
+ default:
+ error = FT_THROW( Unknown_File_Format );
+ break;
+ }
- line_buff += line_incr;
+ if ( !error )
+ FT_TRACE3(( "sbit_num_strikes: %u\n", face->sbit_num_strikes ));
+
+ return FT_Err_Ok;
+
+ Exit:
+ if ( error )
+ {
+ if ( face->sbit_table )
+ FT_FRAME_RELEASE( face->sbit_table );
+ face->sbit_table_size = 0;
+ face->sbit_table_type = TT_SBIT_TABLE_TYPE_NONE;
}
+
+ return error;
}
- static const FT_Frame_Field sbit_metrics_fields[] =
+ FT_LOCAL_DEF( void )
+ tt_face_free_sbit( TT_Face face )
{
-#undef FT_STRUCTURE
-#define FT_STRUCTURE TT_SBit_MetricsRec
+ FT_Stream stream = face->root.stream;
- FT_FRAME_START( 8 ),
- FT_FRAME_BYTE( height ),
- FT_FRAME_BYTE( width ),
- FT_FRAME_CHAR( horiBearingX ),
- FT_FRAME_CHAR( horiBearingY ),
- FT_FRAME_BYTE( horiAdvance ),
+ FT_FRAME_RELEASE( face->sbit_table );
+ face->sbit_table_size = 0;
+ face->sbit_table_type = TT_SBIT_TABLE_TYPE_NONE;
+ face->sbit_num_strikes = 0;
+ }
- FT_FRAME_CHAR( vertBearingX ),
- FT_FRAME_CHAR( vertBearingY ),
- FT_FRAME_BYTE( vertAdvance ),
- FT_FRAME_END
- };
+ FT_LOCAL_DEF( FT_Error )
+ tt_face_set_sbit_strike( TT_Face face,
+ FT_Size_Request req,
+ FT_ULong* astrike_index )
+ {
+ return FT_Match_Size( (FT_Face)face, req, 0, astrike_index );
+ }
- /*************************************************************************/
- /* */
- /* <Function> */
- /* Load_SBit_Const_Metrics */
- /* */
- /* <Description> */
- /* Loads the metrics for `EBLC' index tables format 2 and 5. */
- /* */
- /* <Input> */
- /* range :: The target range. */
- /* */
- /* stream :: The input stream. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- static FT_Error
- Load_SBit_Const_Metrics( TT_SBit_Range range,
- FT_Stream stream )
+
+ FT_LOCAL_DEF( FT_Error )
+ tt_face_load_strike_metrics( TT_Face face,
+ FT_ULong strike_index,
+ FT_Size_Metrics* metrics )
{
- FT_Error error;
+ if ( strike_index >= (FT_ULong)face->sbit_num_strikes )
+ return FT_THROW( Invalid_Argument );
+ switch ( (FT_UInt)face->sbit_table_type )
+ {
+ case TT_SBIT_TABLE_TYPE_EBLC:
+ case TT_SBIT_TABLE_TYPE_CBLC:
+ {
+ FT_Byte* strike;
+
+
+ strike = face->sbit_table + 8 + strike_index * 48;
+
+ metrics->x_ppem = (FT_UShort)strike[44];
+ metrics->y_ppem = (FT_UShort)strike[45];
+
+ metrics->ascender = (FT_Char)strike[16] << 6; /* hori.ascender */
+ metrics->descender = (FT_Char)strike[17] << 6; /* hori.descender */
+ metrics->height = metrics->ascender - metrics->descender;
+
+ /* Is this correct? */
+ metrics->max_advance = ( (FT_Char)strike[22] + /* min_origin_SB */
+ strike[18] + /* max_width */
+ (FT_Char)strike[23] /* min_advance_SB */
+ ) << 6;
+ return FT_Err_Ok;
+ }
+
+ case TT_SBIT_TABLE_TYPE_SBIX:
+ {
+ FT_Stream stream = face->root.stream;
+ FT_UInt offset, upem;
+ FT_UShort ppem, resolution;
+ TT_HoriHeader *hori;
+ FT_ULong table_size;
+
+ FT_Error error;
+ FT_Byte* p;
- if ( FT_READ_ULONG( range->image_size ) )
- return error;
- return FT_STREAM_READ_FIELDS( sbit_metrics_fields, &range->metrics );
+ p = face->sbit_table + 8 + 4 * strike_index;
+ offset = FT_NEXT_ULONG( p );
+
+ error = face->goto_table( face, TTAG_sbix, stream, &table_size );
+ if ( error )
+ return error;
+
+ if ( offset + 4 > table_size )
+ return FT_THROW( Invalid_File_Format );
+
+ if ( FT_STREAM_SEEK( FT_STREAM_POS() + offset ) ||
+ FT_FRAME_ENTER( 4 ) )
+ return error;
+
+ ppem = FT_GET_USHORT();
+ resolution = FT_GET_USHORT();
+
+ FT_UNUSED( resolution ); /* What to do with this? */
+
+ FT_FRAME_EXIT();
+
+ upem = face->header.Units_Per_EM;
+ hori = &face->horizontal;
+
+ metrics->x_ppem = ppem;
+ metrics->y_ppem = ppem;
+
+ metrics->ascender = ppem * hori->Ascender * 64 / upem;
+ metrics->descender = ppem * hori->Descender * 64 / upem;
+ metrics->height = ppem * ( hori->Ascender -
+ hori->Descender +
+ hori->Line_Gap ) * 64 / upem;
+ metrics->max_advance = ppem * hori->advance_Width_Max * 64 / upem;
+
+ return error;
+ }
+
+ default:
+ return FT_THROW( Unknown_File_Format );
+ }
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* Load_SBit_Range_Codes */
- /* */
- /* <Description> */
- /* Loads the range codes for `EBLC' index tables format 4 and 5. */
- /* */
- /* <Input> */
- /* range :: The target range. */
- /* */
- /* stream :: The input stream. */
- /* */
- /* load_offsets :: A flag whether to load the glyph offset table. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ typedef struct TT_SBitDecoderRec_
+ {
+ TT_Face face;
+ FT_Stream stream;
+ FT_Bitmap* bitmap;
+ TT_SBit_Metrics metrics;
+ FT_Bool metrics_loaded;
+ FT_Bool bitmap_allocated;
+ FT_Byte bit_depth;
+
+ FT_ULong ebdt_start;
+ FT_ULong ebdt_size;
+
+ FT_ULong strike_index_array;
+ FT_ULong strike_index_count;
+ FT_Byte* eblc_base;
+ FT_Byte* eblc_limit;
+
+ } TT_SBitDecoderRec, *TT_SBitDecoder;
+
+
static FT_Error
- Load_SBit_Range_Codes( TT_SBit_Range range,
- FT_Stream stream,
- FT_Bool load_offsets )
+ tt_sbit_decoder_init( TT_SBitDecoder decoder,
+ TT_Face face,
+ FT_ULong strike_index,
+ TT_SBit_MetricsRec* metrics )
{
FT_Error error;
- FT_ULong count, n, size;
- FT_Memory memory = stream->memory;
+ FT_Stream stream = face->root.stream;
+ FT_ULong ebdt_size;
- if ( FT_READ_ULONG( count ) )
+ error = face->goto_table( face, TTAG_CBDT, stream, &ebdt_size );
+ if ( error )
+ error = face->goto_table( face, TTAG_EBDT, stream, &ebdt_size );
+ if ( error )
+ error = face->goto_table( face, TTAG_bdat, stream, &ebdt_size );
+ if ( error )
goto Exit;
- range->num_glyphs = count;
+ decoder->face = face;
+ decoder->stream = stream;
+ decoder->bitmap = &face->root.glyph->bitmap;
+ decoder->metrics = metrics;
- /* Allocate glyph offsets table if needed */
- if ( load_offsets )
- {
- if ( FT_NEW_ARRAY( range->glyph_offsets, count ) )
- goto Exit;
+ decoder->metrics_loaded = 0;
+ decoder->bitmap_allocated = 0;
- size = count * 4L;
- }
- else
- size = count * 2L;
+ decoder->ebdt_start = FT_STREAM_POS();
+ decoder->ebdt_size = ebdt_size;
- /* Allocate glyph codes table and access frame */
- if ( FT_NEW_ARRAY ( range->glyph_codes, count ) ||
- FT_FRAME_ENTER( size ) )
- goto Exit;
+ decoder->eblc_base = face->sbit_table;
+ decoder->eblc_limit = face->sbit_table + face->sbit_table_size;
- for ( n = 0; n < count; n++ )
+ /* now find the strike corresponding to the index */
{
- range->glyph_codes[n] = FT_GET_USHORT();
+ FT_Byte* p;
- if ( load_offsets )
- range->glyph_offsets[n] = (FT_ULong)range->image_offset +
- FT_GET_USHORT();
- }
- FT_FRAME_EXIT();
+ if ( 8 + 48 * strike_index + 3 * 4 + 34 + 1 > face->sbit_table_size )
+ {
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
+
+ p = decoder->eblc_base + 8 + 48 * strike_index;
+
+ decoder->strike_index_array = FT_NEXT_ULONG( p );
+ p += 4;
+ decoder->strike_index_count = FT_NEXT_ULONG( p );
+ p += 34;
+ decoder->bit_depth = *p;
+
+ /* decoder->strike_index_array + */
+ /* 8 * decoder->strike_index_count > face->sbit_table_size ? */
+ if ( decoder->strike_index_array > face->sbit_table_size ||
+ decoder->strike_index_count >
+ ( face->sbit_table_size - decoder->strike_index_array ) / 8 )
+ error = FT_THROW( Invalid_File_Format );
+ }
Exit:
return error;
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* Load_SBit_Range */
- /* */
- /* <Description> */
- /* Loads a given `EBLC' index/range table. */
- /* */
- /* <Input> */
- /* range :: The target range. */
- /* */
- /* stream :: The input stream. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- static FT_Error
- Load_SBit_Range( TT_SBit_Range range,
- FT_Stream stream )
+ static void
+ tt_sbit_decoder_done( TT_SBitDecoder decoder )
{
- FT_Error error;
- FT_Memory memory = stream->memory;
-
-
- switch( range->index_format )
- {
- case 1: /* variable metrics with 4-byte offsets */
- case 3: /* variable metrics with 2-byte offsets */
- {
- FT_ULong num_glyphs, n;
- FT_Int size_elem;
- FT_Bool large = FT_BOOL( range->index_format == 1 );
+ FT_UNUSED( decoder );
+ }
+ static FT_Error
+ tt_sbit_decoder_alloc_bitmap( TT_SBitDecoder decoder )
+ {
+ FT_Error error = FT_Err_Ok;
+ FT_UInt width, height;
+ FT_Bitmap* map = decoder->bitmap;
+ FT_Long size;
- if ( range->last_glyph < range->first_glyph )
- {
- error = SFNT_Err_Invalid_File_Format;
- goto Exit;
- }
- num_glyphs = range->last_glyph - range->first_glyph + 1L;
- range->num_glyphs = num_glyphs;
- num_glyphs++; /* XXX: BEWARE - see spec */
+ if ( !decoder->metrics_loaded )
+ {
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
- size_elem = large ? 4 : 2;
+ width = decoder->metrics->width;
+ height = decoder->metrics->height;
- if ( FT_NEW_ARRAY( range->glyph_offsets, num_glyphs ) ||
- FT_FRAME_ENTER( num_glyphs * size_elem ) )
- goto Exit;
+ map->width = (int)width;
+ map->rows = (int)height;
- for ( n = 0; n < num_glyphs; n++ )
- range->glyph_offsets[n] = (FT_ULong)( range->image_offset +
- ( large ? FT_GET_ULONG()
- : FT_GET_USHORT() ) );
- FT_FRAME_EXIT();
- }
+ switch ( decoder->bit_depth )
+ {
+ case 1:
+ map->pixel_mode = FT_PIXEL_MODE_MONO;
+ map->pitch = ( map->width + 7 ) >> 3;
+ map->num_grays = 2;
break;
- case 2: /* all glyphs have identical metrics */
- error = Load_SBit_Const_Metrics( range, stream );
+ case 2:
+ map->pixel_mode = FT_PIXEL_MODE_GRAY2;
+ map->pitch = ( map->width + 3 ) >> 2;
+ map->num_grays = 4;
break;
case 4:
- error = Load_SBit_Range_Codes( range, stream, 1 );
+ map->pixel_mode = FT_PIXEL_MODE_GRAY4;
+ map->pitch = ( map->width + 1 ) >> 1;
+ map->num_grays = 16;
break;
- case 5:
- error = Load_SBit_Const_Metrics( range, stream );
- if ( !error )
- error = Load_SBit_Range_Codes( range, stream, 0 );
+ case 8:
+ map->pixel_mode = FT_PIXEL_MODE_GRAY;
+ map->pitch = map->width;
+ map->num_grays = 256;
+ break;
+
+ case 32:
+ map->pixel_mode = FT_PIXEL_MODE_BGRA;
+ map->pitch = map->width * 4;
+ map->num_grays = 256;
break;
default:
- error = SFNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
}
+ size = map->rows * map->pitch;
+
+ /* check that there is no empty image */
+ if ( size == 0 )
+ goto Exit; /* exit successfully! */
+
+ error = ft_glyphslot_alloc_bitmap( decoder->face->root.glyph, size );
+ if ( error )
+ goto Exit;
+
+ decoder->bitmap_allocated = 1;
+
Exit:
return error;
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* tt_face_load_eblc */
- /* */
- /* <Description> */
- /* Loads the table of embedded bitmap sizes for this face. */
- /* */
- /* <Input> */
- /* face :: The target face object. */
- /* */
- /* stream :: The input stream. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_LOCAL_DEF( FT_Error )
- tt_face_load_eblc( TT_Face face,
- FT_Stream stream )
+ static FT_Error
+ tt_sbit_decoder_load_metrics( TT_SBitDecoder decoder,
+ FT_Byte* *pp,
+ FT_Byte* limit,
+ FT_Bool big )
{
- FT_Error error = SFNT_Err_Ok;
- FT_Memory memory = stream->memory;
- FT_Fixed version;
- FT_ULong num_strikes;
- FT_ULong table_base;
+ FT_Byte* p = *pp;
+ TT_SBit_Metrics metrics = decoder->metrics;
- static const FT_Frame_Field sbit_line_metrics_fields[] =
- {
-#undef FT_STRUCTURE
-#define FT_STRUCTURE TT_SBit_LineMetricsRec
-
- /* no FT_FRAME_START */
- FT_FRAME_CHAR( ascender ),
- FT_FRAME_CHAR( descender ),
- FT_FRAME_BYTE( max_width ),
-
- FT_FRAME_CHAR( caret_slope_numerator ),
- FT_FRAME_CHAR( caret_slope_denominator ),
- FT_FRAME_CHAR( caret_offset ),
-
- FT_FRAME_CHAR( min_origin_SB ),
- FT_FRAME_CHAR( min_advance_SB ),
- FT_FRAME_CHAR( max_before_BL ),
- FT_FRAME_CHAR( min_after_BL ),
- FT_FRAME_CHAR( pads[0] ),
- FT_FRAME_CHAR( pads[1] ),
- FT_FRAME_END
- };
-
- static const FT_Frame_Field strike_start_fields[] =
- {
-#undef FT_STRUCTURE
-#define FT_STRUCTURE TT_SBit_StrikeRec
-
- /* no FT_FRAME_START */
- FT_FRAME_ULONG( ranges_offset ),
- FT_FRAME_SKIP_LONG,
- FT_FRAME_ULONG( num_ranges ),
- FT_FRAME_ULONG( color_ref ),
- FT_FRAME_END
- };
-
- static const FT_Frame_Field strike_end_fields[] =
- {
- /* no FT_FRAME_START */
- FT_FRAME_USHORT( start_glyph ),
- FT_FRAME_USHORT( end_glyph ),
- FT_FRAME_BYTE ( x_ppem ),
- FT_FRAME_BYTE ( y_ppem ),
- FT_FRAME_BYTE ( bit_depth ),
- FT_FRAME_CHAR ( flags ),
- FT_FRAME_END
- };
+ if ( p + 5 > limit )
+ goto Fail;
- face->num_sbit_strikes = 0;
+ metrics->height = p[0];
+ metrics->width = p[1];
+ metrics->horiBearingX = (FT_Char)p[2];
+ metrics->horiBearingY = (FT_Char)p[3];
+ metrics->horiAdvance = p[4];
- /* this table is optional */
- error = face->goto_table( face, TTAG_EBLC, stream, 0 );
- if ( error )
- error = face->goto_table( face, TTAG_bloc, stream, 0 );
- if ( error )
- goto Exit;
+ p += 5;
+ if ( big )
+ {
+ if ( p + 3 > limit )
+ goto Fail;
- table_base = FT_STREAM_POS();
- if ( FT_FRAME_ENTER( 8L ) )
- goto Exit;
+ metrics->vertBearingX = (FT_Char)p[0];
+ metrics->vertBearingY = (FT_Char)p[1];
+ metrics->vertAdvance = p[2];
- version = FT_GET_LONG();
- num_strikes = FT_GET_ULONG();
+ p += 3;
+ }
+ else
+ {
+ /* avoid uninitialized data in case there is no vertical info -- */
+ metrics->vertBearingX = 0;
+ metrics->vertBearingY = 0;
+ metrics->vertAdvance = 0;
+ }
- FT_FRAME_EXIT();
+ decoder->metrics_loaded = 1;
+ *pp = p;
+ return FT_Err_Ok;
- /* check version number and strike count */
- if ( version != 0x00020000L ||
- num_strikes >= 0x10000L )
- {
- FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version\n" ));
- error = SFNT_Err_Invalid_File_Format;
+ Fail:
+ FT_TRACE1(( "tt_sbit_decoder_load_metrics: broken table\n" ));
+ return FT_THROW( Invalid_Argument );
+ }
- goto Exit;
- }
- /* allocate the strikes table */
- if ( FT_NEW_ARRAY( face->sbit_strikes, num_strikes ) )
- goto Exit;
+ /* forward declaration */
+ static FT_Error
+ tt_sbit_decoder_load_image( TT_SBitDecoder decoder,
+ FT_UInt glyph_index,
+ FT_Int x_pos,
+ FT_Int y_pos );
- face->num_sbit_strikes = num_strikes;
+ typedef FT_Error (*TT_SBitDecoder_LoadFunc)( TT_SBitDecoder decoder,
+ FT_Byte* p,
+ FT_Byte* plimit,
+ FT_Int x_pos,
+ FT_Int y_pos );
- /* now read each strike table separately */
- {
- TT_SBit_Strike strike = face->sbit_strikes;
- FT_ULong count = num_strikes;
+ static FT_Error
+ tt_sbit_decoder_load_byte_aligned( TT_SBitDecoder decoder,
+ FT_Byte* p,
+ FT_Byte* limit,
+ FT_Int x_pos,
+ FT_Int y_pos )
+ {
+ FT_Error error = FT_Err_Ok;
+ FT_Byte* line;
+ FT_Int bit_height, bit_width, pitch, width, height, line_bits, h;
+ FT_Bitmap* bitmap;
- if ( FT_FRAME_ENTER( 48L * num_strikes ) )
- goto Exit;
- while ( count > 0 )
- {
- if ( FT_STREAM_READ_FIELDS( strike_start_fields, strike ) ||
- FT_STREAM_READ_FIELDS( sbit_line_metrics_fields, &strike->hori ) ||
- FT_STREAM_READ_FIELDS( sbit_line_metrics_fields, &strike->vert ) ||
- FT_STREAM_READ_FIELDS( strike_end_fields, strike ) )
- break;
-
- count--;
- strike++;
- }
+ /* check that we can write the glyph into the bitmap */
+ bitmap = decoder->bitmap;
+ bit_width = bitmap->width;
+ bit_height = bitmap->rows;
+ pitch = bitmap->pitch;
+ line = bitmap->buffer;
- FT_FRAME_EXIT();
+ width = decoder->metrics->width;
+ height = decoder->metrics->height;
+
+ line_bits = width * decoder->bit_depth;
+
+ if ( x_pos < 0 || x_pos + width > bit_width ||
+ y_pos < 0 || y_pos + height > bit_height )
+ {
+ FT_TRACE1(( "tt_sbit_decoder_load_byte_aligned:"
+ " invalid bitmap dimensions\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
}
- /* allocate the index ranges for each strike table */
+ if ( p + ( ( line_bits + 7 ) >> 3 ) * height > limit )
{
- TT_SBit_Strike strike = face->sbit_strikes;
- FT_ULong count = num_strikes;
+ FT_TRACE1(( "tt_sbit_decoder_load_byte_aligned: broken bitmap\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
+ /* now do the blit */
+ line += y_pos * pitch + ( x_pos >> 3 );
+ x_pos &= 7;
- while ( count > 0 )
+ if ( x_pos == 0 ) /* the easy one */
+ {
+ for ( h = height; h > 0; h--, line += pitch )
{
- TT_SBit_Range range;
- FT_ULong count2 = strike->num_ranges;
-
-
- /* read each range */
- if ( FT_STREAM_SEEK( table_base + strike->ranges_offset ) ||
- FT_FRAME_ENTER( strike->num_ranges * 8L ) )
- goto Exit;
+ FT_Byte* pwrite = line;
+ FT_Int w;
- if ( FT_NEW_ARRAY( strike->sbit_ranges, strike->num_ranges ) )
- goto Exit;
- range = strike->sbit_ranges;
- while ( count2 > 0 )
+ for ( w = line_bits; w >= 8; w -= 8 )
{
- range->first_glyph = FT_GET_USHORT();
- range->last_glyph = FT_GET_USHORT();
- range->table_offset = table_base + strike->ranges_offset +
- FT_GET_ULONG();
- count2--;
- range++;
+ pwrite[0] = (FT_Byte)( pwrite[0] | *p++ );
+ pwrite += 1;
}
- FT_FRAME_EXIT();
+ if ( w > 0 )
+ pwrite[0] = (FT_Byte)( pwrite[0] | ( *p++ & ( 0xFF00U >> w ) ) );
+ }
+ }
+ else /* x_pos > 0 */
+ {
+ for ( h = height; h > 0; h--, line += pitch )
+ {
+ FT_Byte* pwrite = line;
+ FT_Int w;
+ FT_UInt wval = 0;
+
- /* Now, read each index table */
- count2 = strike->num_ranges;
- range = strike->sbit_ranges;
- while ( count2 > 0 )
+ for ( w = line_bits; w >= 8; w -= 8 )
{
- /* Read the header */
- if ( FT_STREAM_SEEK( range->table_offset ) ||
- FT_FRAME_ENTER( 8L ) )
- goto Exit;
+ wval = (FT_UInt)( wval | *p++ );
+ pwrite[0] = (FT_Byte)( pwrite[0] | ( wval >> x_pos ) );
+ pwrite += 1;
+ wval <<= 8;
+ }
- range->index_format = FT_GET_USHORT();
- range->image_format = FT_GET_USHORT();
- range->image_offset = FT_GET_ULONG();
+ if ( w > 0 )
+ wval = (FT_UInt)( wval | ( *p++ & ( 0xFF00U >> w ) ) );
- FT_FRAME_EXIT();
+ /* all bits read and there are `x_pos + w' bits to be written */
- error = Load_SBit_Range( range, stream );
- if ( error )
- goto Exit;
+ pwrite[0] = (FT_Byte)( pwrite[0] | ( wval >> x_pos ) );
- count2--;
- range++;
+ if ( x_pos + w > 8 )
+ {
+ pwrite++;
+ wval <<= 8;
+ pwrite[0] = (FT_Byte)( pwrite[0] | ( wval >> x_pos ) );
}
-
- count--;
- strike++;
}
}
Exit:
+ if ( !error )
+ FT_TRACE3(( "tt_sbit_decoder_load_byte_aligned: loaded\n" ));
return error;
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* tt_face_free_eblc */
- /* */
- /* <Description> */
- /* Releases the embedded bitmap tables. */
- /* */
- /* <Input> */
- /* face :: The target face object. */
- /* */
- FT_LOCAL_DEF( void )
- tt_face_free_eblc( TT_Face face )
+ /*
+ * Load a bit-aligned bitmap (with pointer `p') into a line-aligned bitmap
+ * (with pointer `pwrite'). In the example below, the width is 3 pixel,
+ * and `x_pos' is 1 pixel.
+ *
+ * p p+1
+ * | | |
+ * | 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 |...
+ * | | |
+ * +-------+ +-------+ +-------+ ...
+ * . . .
+ * . . .
+ * v . .
+ * +-------+ . .
+ * | | .
+ * | 7 6 5 4 3 2 1 0 | .
+ * | | .
+ * pwrite . .
+ * . .
+ * v .
+ * +-------+ .
+ * | |
+ * | 7 6 5 4 3 2 1 0 |
+ * | |
+ * pwrite+1 .
+ * .
+ * v
+ * +-------+
+ * | |
+ * | 7 6 5 4 3 2 1 0 |
+ * | |
+ * pwrite+2
+ *
+ */
+
+ static FT_Error
+ tt_sbit_decoder_load_bit_aligned( TT_SBitDecoder decoder,
+ FT_Byte* p,
+ FT_Byte* limit,
+ FT_Int x_pos,
+ FT_Int y_pos )
{
- FT_Memory memory = face->root.memory;
- TT_SBit_Strike strike = face->sbit_strikes;
- TT_SBit_Strike strike_limit = strike + face->num_sbit_strikes;
+ FT_Error error = FT_Err_Ok;
+ FT_Byte* line;
+ FT_Int bit_height, bit_width, pitch, width, height, line_bits, h, nbits;
+ FT_Bitmap* bitmap;
+ FT_UShort rval;
- if ( strike )
- {
- for ( ; strike < strike_limit; strike++ )
- {
- TT_SBit_Range range = strike->sbit_ranges;
- TT_SBit_Range range_limit = range + strike->num_ranges;
+ /* check that we can write the glyph into the bitmap */
+ bitmap = decoder->bitmap;
+ bit_width = bitmap->width;
+ bit_height = bitmap->rows;
+ pitch = bitmap->pitch;
+ line = bitmap->buffer;
+ width = decoder->metrics->width;
+ height = decoder->metrics->height;
- if ( range )
- {
- for ( ; range < range_limit; range++ )
- {
- /* release the glyph offsets and codes tables */
- /* where appropriate */
- FT_FREE( range->glyph_offsets );
- FT_FREE( range->glyph_codes );
- }
- }
- FT_FREE( strike->sbit_ranges );
- strike->num_ranges = 0;
- }
- FT_FREE( face->sbit_strikes );
+ line_bits = width * decoder->bit_depth;
+
+ if ( x_pos < 0 || x_pos + width > bit_width ||
+ y_pos < 0 || y_pos + height > bit_height )
+ {
+ FT_TRACE1(( "tt_sbit_decoder_load_bit_aligned:"
+ " invalid bitmap dimensions\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
}
- face->num_sbit_strikes = 0;
- }
+ if ( p + ( ( line_bits * height + 7 ) >> 3 ) > limit )
+ {
+ FT_TRACE1(( "tt_sbit_decoder_load_bit_aligned: broken bitmap\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
- FT_LOCAL_DEF( FT_Error )
- tt_face_set_sbit_strike( TT_Face face,
- FT_Size_Request req,
- FT_ULong* astrike_index )
- {
- return FT_Match_Size( (FT_Face)face, req, 0, astrike_index );
- }
+ /* now do the blit */
+ /* adjust `line' to point to the first byte of the bitmap */
+ line += y_pos * pitch + ( x_pos >> 3 );
+ x_pos &= 7;
- FT_LOCAL_DEF( FT_Error )
- tt_face_load_strike_metrics( TT_Face face,
- FT_ULong strike_index,
- FT_Size_Metrics* metrics )
- {
- TT_SBit_Strike strike;
+ /* the higher byte of `rval' is used as a buffer */
+ rval = 0;
+ nbits = 0;
+ for ( h = height; h > 0; h--, line += pitch )
+ {
+ FT_Byte* pwrite = line;
+ FT_Int w = line_bits;
+
+
+ /* handle initial byte (in target bitmap) specially if necessary */
+ if ( x_pos )
+ {
+ w = ( line_bits < 8 - x_pos ) ? line_bits : 8 - x_pos;
+
+ if ( h == height )
+ {
+ rval = *p++;
+ nbits = x_pos;
+ }
+ else if ( nbits < w )
+ {
+ if ( p < limit )
+ rval |= *p++;
+ nbits += 8 - w;
+ }
+ else
+ {
+ rval >>= 8;
+ nbits -= w;
+ }
- if ( strike_index >= face->num_sbit_strikes )
- return SFNT_Err_Invalid_Argument;
+ *pwrite++ |= ( ( rval >> nbits ) & 0xFF ) &
+ ( ~( 0xFF << w ) << ( 8 - w - x_pos ) );
+ rval <<= 8;
- strike = face->sbit_strikes + strike_index;
+ w = line_bits - w;
+ }
- metrics->x_ppem = strike->x_ppem;
- metrics->y_ppem = strike->y_ppem;
+ /* handle medial bytes */
+ for ( ; w >= 8; w -= 8 )
+ {
+ rval |= *p++;
+ *pwrite++ |= ( rval >> nbits ) & 0xFF;
- metrics->ascender = strike->hori.ascender << 6;
- metrics->descender = strike->hori.descender << 6;
+ rval <<= 8;
+ }
- /* XXX: Is this correct? */
- metrics->max_advance = ( strike->hori.min_origin_SB +
- strike->hori.max_width +
- strike->hori.min_advance_SB ) << 6;
+ /* handle final byte if necessary */
+ if ( w > 0 )
+ {
+ if ( nbits < w )
+ {
+ if ( p < limit )
+ rval |= *p++;
+ *pwrite |= ( ( rval >> nbits ) & 0xFF ) & ( 0xFF00U >> w );
+ nbits += 8 - w;
- metrics->height = metrics->ascender - metrics->descender;
+ rval <<= 8;
+ }
+ else
+ {
+ *pwrite |= ( ( rval >> nbits ) & 0xFF ) & ( 0xFF00U >> w );
+ nbits -= w;
+ }
+ }
+ }
- return SFNT_Err_Ok;
+ Exit:
+ if ( !error )
+ FT_TRACE3(( "tt_sbit_decoder_load_bit_aligned: loaded\n" ));
+ return error;
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* find_sbit_range */
- /* */
- /* <Description> */
- /* Scans a given strike's ranges and return, for a given glyph */
- /* index, the corresponding sbit range, and `EBDT' offset. */
- /* */
- /* <Input> */
- /* glyph_index :: The glyph index. */
- /* */
- /* strike :: The source/current sbit strike. */
- /* */
- /* <Output> */
- /* arange :: The sbit range containing the glyph index. */
- /* */
- /* aglyph_offset :: The offset of the glyph data in `EBDT' table. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means the glyph index was found. */
- /* */
static FT_Error
- find_sbit_range( FT_UInt glyph_index,
- TT_SBit_Strike strike,
- TT_SBit_Range *arange,
- FT_ULong *aglyph_offset )
+ tt_sbit_decoder_load_compound( TT_SBitDecoder decoder,
+ FT_Byte* p,
+ FT_Byte* limit,
+ FT_Int x_pos,
+ FT_Int y_pos )
{
- TT_SBit_RangeRec *range, *range_limit;
+ FT_Error error = FT_Err_Ok;
+ FT_UInt num_components, nn;
+ FT_Char horiBearingX = (FT_Char)decoder->metrics->horiBearingX;
+ FT_Char horiBearingY = (FT_Char)decoder->metrics->horiBearingY;
+ FT_Byte horiAdvance = (FT_Byte)decoder->metrics->horiAdvance;
+ FT_Char vertBearingX = (FT_Char)decoder->metrics->vertBearingX;
+ FT_Char vertBearingY = (FT_Char)decoder->metrics->vertBearingY;
+ FT_Byte vertAdvance = (FT_Byte)decoder->metrics->vertAdvance;
- /* check whether the glyph index is within this strike's */
- /* glyph range */
- if ( glyph_index < (FT_UInt)strike->start_glyph ||
- glyph_index > (FT_UInt)strike->end_glyph )
- goto Fail;
- /* scan all ranges in strike */
- range = strike->sbit_ranges;
- range_limit = range + strike->num_ranges;
- if ( !range )
+ if ( p + 2 > limit )
goto Fail;
- for ( ; range < range_limit; range++ )
+ num_components = FT_NEXT_USHORT( p );
+ if ( p + 4 * num_components > limit )
{
- if ( glyph_index >= (FT_UInt)range->first_glyph &&
- glyph_index <= (FT_UInt)range->last_glyph )
- {
- FT_UShort delta = (FT_UShort)( glyph_index - range->first_glyph );
+ FT_TRACE1(( "tt_sbit_decoder_load_compound: broken table\n" ));
+ goto Fail;
+ }
+ FT_TRACE3(( "tt_sbit_decoder_load_compound: loading %d components\n",
+ num_components ));
- switch ( range->index_format )
- {
- case 1:
- case 3:
- *aglyph_offset = range->glyph_offsets[delta];
- break;
-
- case 2:
- *aglyph_offset = range->image_offset +
- range->image_size * delta;
- break;
-
- case 4:
- case 5:
- {
- FT_ULong n;
-
-
- for ( n = 0; n < range->num_glyphs; n++ )
- {
- if ( (FT_UInt)range->glyph_codes[n] == glyph_index )
- {
- if ( range->index_format == 4 )
- *aglyph_offset = range->glyph_offsets[n];
- else
- *aglyph_offset = range->image_offset +
- n * range->image_size;
- goto Found;
- }
- }
- }
+ for ( nn = 0; nn < num_components; nn++ )
+ {
+ FT_UInt gindex = FT_NEXT_USHORT( p );
+ FT_Byte dx = FT_NEXT_BYTE( p );
+ FT_Byte dy = FT_NEXT_BYTE( p );
- /* fall-through */
- default:
- goto Fail;
- }
- Found:
- /* return successfully! */
- *arange = range;
- return SFNT_Err_Ok;
- }
+ /* NB: a recursive call */
+ error = tt_sbit_decoder_load_image( decoder, gindex,
+ x_pos + dx, y_pos + dy );
+ if ( error )
+ break;
}
- Fail:
- *arange = 0;
- *aglyph_offset = 0;
+ FT_TRACE3(( "tt_sbit_decoder_load_compound: done\n" ));
- return SFNT_Err_Invalid_Argument;
- }
+ decoder->metrics->horiBearingX = horiBearingX;
+ decoder->metrics->horiBearingY = horiBearingY;
+ decoder->metrics->horiAdvance = horiAdvance;
+ decoder->metrics->vertBearingX = vertBearingX;
+ decoder->metrics->vertBearingY = vertBearingY;
+ decoder->metrics->vertAdvance = vertAdvance;
+ decoder->metrics->width = (FT_Byte)decoder->bitmap->width;
+ decoder->metrics->height = (FT_Byte)decoder->bitmap->rows;
+ Exit:
+ return error;
- /*************************************************************************/
- /* */
- /* <Function> */
- /* tt_find_sbit_image */
- /* */
- /* <Description> */
- /* Checks whether an embedded bitmap (an `sbit') exists for a given */
- /* glyph, at a given strike. */
- /* */
- /* <Input> */
- /* face :: The target face object. */
- /* */
- /* glyph_index :: The glyph index. */
- /* */
- /* strike_index :: The current strike index. */
- /* */
- /* <Output> */
- /* arange :: The SBit range containing the glyph index. */
- /* */
- /* astrike :: The SBit strike containing the glyph index. */
- /* */
- /* aglyph_offset :: The offset of the glyph data in `EBDT' table. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. Returns */
- /* SFNT_Err_Invalid_Argument if no sbit exists for the requested */
- /* glyph. */
- /* */
- FT_LOCAL( FT_Error )
- tt_find_sbit_image( TT_Face face,
- FT_UInt glyph_index,
- FT_ULong strike_index,
- TT_SBit_Range *arange,
- TT_SBit_Strike *astrike,
- FT_ULong *aglyph_offset )
- {
- FT_Error error;
- TT_SBit_Strike strike;
+ Fail:
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
- if ( !face->sbit_strikes ||
- ( face->num_sbit_strikes <= strike_index ) )
- goto Fail;
+#ifdef FT_CONFIG_OPTION_USE_PNG
- strike = &face->sbit_strikes[strike_index];
+ static FT_Error
+ tt_sbit_decoder_load_png( TT_SBitDecoder decoder,
+ FT_Byte* p,
+ FT_Byte* limit,
+ FT_Int x_pos,
+ FT_Int y_pos )
+ {
+ FT_Error error = FT_Err_Ok;
+ FT_ULong png_len;
- error = find_sbit_range( glyph_index, strike,
- arange, aglyph_offset );
- if ( error )
- goto Fail;
- *astrike = strike;
+ if ( limit - p < 4 )
+ {
+ FT_TRACE1(( "tt_sbit_decoder_load_png: broken bitmap\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
- return SFNT_Err_Ok;
+ png_len = FT_NEXT_ULONG( p );
+ if ( (FT_ULong)( limit - p ) < png_len )
+ {
+ FT_TRACE1(( "tt_sbit_decoder_load_png: broken bitmap\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
- Fail:
- /* no embedded bitmap for this glyph in face */
- *arange = 0;
- *astrike = 0;
- *aglyph_offset = 0;
+ error = Load_SBit_Png( decoder->face->root.glyph,
+ x_pos,
+ y_pos,
+ decoder->bit_depth,
+ decoder->metrics,
+ decoder->stream->memory,
+ p,
+ png_len,
+ FALSE );
- return SFNT_Err_Invalid_Argument;
+ Exit:
+ if ( !error )
+ FT_TRACE3(( "tt_sbit_decoder_load_png: loaded\n" ));
+ return error;
}
+#endif /* FT_CONFIG_OPTION_USE_PNG */
- /*************************************************************************/
- /* */
- /* <Function> */
- /* tt_load_sbit_metrics */
- /* */
- /* <Description> */
- /* Gets the big metrics for a given SBit. */
- /* */
- /* <Input> */
- /* stream :: The input stream. */
- /* */
- /* range :: The SBit range containing the glyph. */
- /* */
- /* <Output> */
- /* big_metrics :: A big SBit metrics structure for the glyph. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The stream cursor must be positioned at the glyph's offset within */
- /* the `EBDT' table before the call. */
- /* */
- /* If the image format uses variable metrics, the stream cursor is */
- /* positioned just after the metrics header in the `EBDT' table on */
- /* function exit. */
- /* */
- FT_LOCAL( FT_Error )
- tt_load_sbit_metrics( FT_Stream stream,
- TT_SBit_Range range,
- TT_SBit_Metrics metrics )
+
+ static FT_Error
+ tt_sbit_decoder_load_bitmap( TT_SBitDecoder decoder,
+ FT_UInt glyph_format,
+ FT_ULong glyph_start,
+ FT_ULong glyph_size,
+ FT_Int x_pos,
+ FT_Int y_pos )
{
- FT_Error error = SFNT_Err_Ok;
+ FT_Error error;
+ FT_Stream stream = decoder->stream;
+ FT_Byte* p;
+ FT_Byte* p_limit;
+ FT_Byte* data;
- switch ( range->image_format )
+ /* seek into the EBDT table now */
+ if ( glyph_start + glyph_size > decoder->ebdt_size )
{
- case 1:
- case 2:
- case 8:
- /* variable small metrics */
- {
- TT_SBit_SmallMetricsRec smetrics;
-
- static const FT_Frame_Field sbit_small_metrics_fields[] =
- {
-#undef FT_STRUCTURE
-#define FT_STRUCTURE TT_SBit_SmallMetricsRec
-
- FT_FRAME_START( 5 ),
- FT_FRAME_BYTE( height ),
- FT_FRAME_BYTE( width ),
- FT_FRAME_CHAR( bearingX ),
- FT_FRAME_CHAR( bearingY ),
- FT_FRAME_BYTE( advance ),
- FT_FRAME_END
- };
+ error = FT_THROW( Invalid_Argument );
+ goto Exit;
+ }
+ if ( FT_STREAM_SEEK( decoder->ebdt_start + glyph_start ) ||
+ FT_FRAME_EXTRACT( glyph_size, data ) )
+ goto Exit;
- /* read small metrics */
- if ( FT_STREAM_READ_FIELDS( sbit_small_metrics_fields, &smetrics ) )
- goto Exit;
+ p = data;
+ p_limit = p + glyph_size;
- /* convert it to a big metrics */
- metrics->height = smetrics.height;
- metrics->width = smetrics.width;
- metrics->horiBearingX = smetrics.bearingX;
- metrics->horiBearingY = smetrics.bearingY;
- metrics->horiAdvance = smetrics.advance;
-
- /* these metrics are made up at a higher level when */
- /* needed. */
- metrics->vertBearingX = 0;
- metrics->vertBearingY = 0;
- metrics->vertAdvance = 0;
- }
+ /* read the data, depending on the glyph format */
+ switch ( glyph_format )
+ {
+ case 1:
+ case 2:
+ case 8:
+ case 17:
+ error = tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 0 );
break;
case 6:
case 7:
case 9:
- /* variable big metrics */
- if ( FT_STREAM_READ_FIELDS( sbit_metrics_fields, metrics ) )
- goto Exit;
+ case 18:
+ error = tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 );
break;
- case 5:
- default: /* constant metrics */
- if ( range->index_format == 2 || range->index_format == 5 )
- *metrics = range->metrics;
- else
- return SFNT_Err_Invalid_File_Format;
- }
-
- Exit:
- return error;
- }
+ default:
+ error = FT_Err_Ok;
+ }
+ if ( error )
+ goto Fail;
- /*************************************************************************/
- /* */
- /* <Function> */
- /* crop_bitmap */
- /* */
- /* <Description> */
- /* Crops a bitmap to its tightest bounding box, and adjusts its */
- /* metrics. */
- /* */
- /* <InOut> */
- /* map :: The bitmap. */
- /* */
- /* metrics :: The corresponding metrics structure. */
- /* */
- static void
- crop_bitmap( FT_Bitmap* map,
- TT_SBit_Metrics metrics )
- {
- /***********************************************************************/
- /* */
- /* In this situation, some bounding boxes of embedded bitmaps are too */
- /* large. We need to crop it to a reasonable size. */
- /* */
- /* --------- */
- /* | | ----- */
- /* | *** | |***| */
- /* | * | | * | */
- /* | * | ------> | * | */
- /* | * | | * | */
- /* | * | | * | */
- /* | *** | |***| */
- /* --------- ----- */
- /* */
- /***********************************************************************/
-
- FT_Int rows, count;
- FT_Long line_len;
- FT_Byte* line;
-
-
- /***********************************************************************/
- /* */
- /* first of all, check the top-most lines of the bitmap, and remove */
- /* them if they're empty. */
- /* */
{
- line = (FT_Byte*)map->buffer;
- rows = map->rows;
- line_len = map->pitch;
+ TT_SBitDecoder_LoadFunc loader;
- for ( count = 0; count < rows; count++ )
+ switch ( glyph_format )
{
- FT_Byte* cur = line;
- FT_Byte* limit = line + line_len;
+ case 1:
+ case 6:
+ loader = tt_sbit_decoder_load_byte_aligned;
+ break;
+ case 2:
+ case 7:
+ {
+ /* Don't trust `glyph_format'. For example, Apple's main Korean */
+ /* system font, `AppleMyungJo.ttf' (version 7.0d2e6), uses glyph */
+ /* format 7, but the data is format 6. We check whether we have */
+ /* an excessive number of bytes in the image: If it is equal to */
+ /* the value for a byte-aligned glyph, use the other loading */
+ /* routine. */
+ /* */
+ /* Note that for some (width,height) combinations, where the */
+ /* width is not a multiple of 8, the sizes for bit- and */
+ /* byte-aligned data are equal, for example (7,7) or (15,6). We */
+ /* then prefer what `glyph_format' specifies. */
+
+ FT_UInt width = decoder->metrics->width;
+ FT_UInt height = decoder->metrics->height;
+
+ FT_UInt bit_size = ( width * height + 7 ) >> 3;
+ FT_UInt byte_size = height * ( ( width + 7 ) >> 3 );
+
+
+ if ( bit_size < byte_size &&
+ byte_size == (FT_UInt)( p_limit - p ) )
+ loader = tt_sbit_decoder_load_byte_aligned;
+ else
+ loader = tt_sbit_decoder_load_bit_aligned;
+ }
+ break;
- for ( ; cur < limit; cur++ )
- if ( cur[0] )
- goto Found_Top;
+ case 5:
+ loader = tt_sbit_decoder_load_bit_aligned;
+ break;
- /* the current line was empty - skip to next one */
- line = limit;
- }
+ case 8:
+ if ( p + 1 > p_limit )
+ goto Fail;
- Found_Top:
- /* check that we have at least one filled line */
- if ( count >= rows )
- goto Empty_Bitmap;
+ p += 1; /* skip padding */
+ /* fall-through */
- /* now, crop the empty upper lines */
- if ( count > 0 )
- {
- line = (FT_Byte*)map->buffer;
+ case 9:
+ loader = tt_sbit_decoder_load_compound;
+ break;
- FT_MEM_MOVE( line, line + count * line_len,
- ( rows - count ) * line_len );
+ case 17: /* small metrics, PNG image data */
+ case 18: /* big metrics, PNG image data */
+ case 19: /* metrics in EBLC, PNG image data */
+#ifdef FT_CONFIG_OPTION_USE_PNG
+ loader = tt_sbit_decoder_load_png;
+ break;
+#else
+ error = FT_THROW( Unimplemented_Feature );
+ goto Fail;
+#endif /* FT_CONFIG_OPTION_USE_PNG */
- metrics->height = (FT_Byte)( metrics->height - count );
- metrics->horiBearingY = (FT_Char)( metrics->horiBearingY - count );
- metrics->vertBearingY = (FT_Char)( metrics->vertBearingY - count );
+ default:
+ error = FT_THROW( Invalid_Table );
+ goto Fail;
+ }
- map->rows -= count;
- rows -= count;
+ if ( !decoder->bitmap_allocated )
+ {
+ error = tt_sbit_decoder_alloc_bitmap( decoder );
+ if ( error )
+ goto Fail;
}
+
+ error = loader( decoder, p, p_limit, x_pos, y_pos );
}
- /***********************************************************************/
- /* */
- /* second, crop the lower lines */
- /* */
- {
- line = (FT_Byte*)map->buffer + ( rows - 1 ) * line_len;
+ Fail:
+ FT_FRAME_RELEASE( data );
- for ( count = 0; count < rows; count++ )
- {
- FT_Byte* cur = line;
- FT_Byte* limit = line + line_len;
+ Exit:
+ return error;
+ }
- for ( ; cur < limit; cur++ )
- if ( cur[0] )
- goto Found_Bottom;
+ static FT_Error
+ tt_sbit_decoder_load_image( TT_SBitDecoder decoder,
+ FT_UInt glyph_index,
+ FT_Int x_pos,
+ FT_Int y_pos )
+ {
+ /*
+ * First, we find the correct strike range that applies to this
+ * glyph index.
+ */
- /* the current line was empty - skip to previous one */
- line -= line_len;
- }
+ FT_Byte* p = decoder->eblc_base + decoder->strike_index_array;
+ FT_Byte* p_limit = decoder->eblc_limit;
+ FT_ULong num_ranges = decoder->strike_index_count;
+ FT_UInt start, end, index_format, image_format;
+ FT_ULong image_start = 0, image_end = 0, image_offset;
- Found_Bottom:
- if ( count > 0 )
- {
- metrics->height = (FT_Byte)( metrics->height - count );
- rows -= count;
- map->rows -= count;
- }
- }
- /***********************************************************************/
- /* */
- /* third, get rid of the space on the left side of the glyph */
- /* */
- do
+ for ( ; num_ranges > 0; num_ranges-- )
{
- FT_Byte* limit;
+ start = FT_NEXT_USHORT( p );
+ end = FT_NEXT_USHORT( p );
+ if ( glyph_index >= start && glyph_index <= end )
+ goto FoundRange;
- line = (FT_Byte*)map->buffer;
- limit = line + rows * line_len;
+ p += 4; /* ignore index offset */
+ }
+ goto NoBitmap;
+
+ FoundRange:
+ image_offset = FT_NEXT_ULONG( p );
+
+ /* overflow check */
+ p = decoder->eblc_base + decoder->strike_index_array;
+ if ( image_offset > (FT_ULong)( p_limit - p ) )
+ goto Failure;
+
+ p += image_offset;
+ if ( p + 8 > p_limit )
+ goto NoBitmap;
+
+ /* now find the glyph's location and extend within the ebdt table */
+ index_format = FT_NEXT_USHORT( p );
+ image_format = FT_NEXT_USHORT( p );
+ image_offset = FT_NEXT_ULONG ( p );
- for ( ; line < limit; line += line_len )
- if ( line[0] & 0x80 )
- goto Found_Left;
+ switch ( index_format )
+ {
+ case 1: /* 4-byte offsets relative to `image_offset' */
+ p += 4 * ( glyph_index - start );
+ if ( p + 8 > p_limit )
+ goto NoBitmap;
+
+ image_start = FT_NEXT_ULONG( p );
+ image_end = FT_NEXT_ULONG( p );
- /* shift the whole glyph one pixel to the left */
- line = (FT_Byte*)map->buffer;
- limit = line + rows * line_len;
+ if ( image_start == image_end ) /* missing glyph */
+ goto NoBitmap;
+ break;
- for ( ; line < limit; line += line_len )
+ case 2: /* big metrics, constant image size */
{
- FT_Int n, width = map->width;
- FT_Byte old;
- FT_Byte* cur = line;
+ FT_ULong image_size;
- old = (FT_Byte)(cur[0] << 1);
- for ( n = 8; n < width; n += 8 )
- {
- FT_Byte val;
+ if ( p + 12 > p_limit )
+ goto NoBitmap;
+ image_size = FT_NEXT_ULONG( p );
- val = cur[1];
- cur[0] = (FT_Byte)( old | ( val >> 7 ) );
- old = (FT_Byte)( val << 1 );
- cur++;
- }
- cur[0] = old;
+ if ( tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ) )
+ goto NoBitmap;
+
+ image_start = image_size * ( glyph_index - start );
+ image_end = image_start + image_size;
}
+ break;
- map->width--;
- metrics->horiBearingX++;
- metrics->vertBearingX++;
- metrics->width--;
+ case 3: /* 2-byte offsets relative to 'image_offset' */
+ p += 2 * ( glyph_index - start );
+ if ( p + 4 > p_limit )
+ goto NoBitmap;
- } while ( map->width > 0 );
+ image_start = FT_NEXT_USHORT( p );
+ image_end = FT_NEXT_USHORT( p );
- Found_Left:
+ if ( image_start == image_end ) /* missing glyph */
+ goto NoBitmap;
+ break;
- /***********************************************************************/
- /* */
- /* finally, crop the bitmap width to get rid of the space on the right */
- /* side of the glyph. */
- /* */
- do
- {
- FT_Int right = map->width - 1;
- FT_Byte* limit;
- FT_Byte mask;
+ case 4: /* sparse glyph array with (glyph,offset) pairs */
+ {
+ FT_ULong mm, num_glyphs;
- line = (FT_Byte*)map->buffer + ( right >> 3 );
- limit = line + rows * line_len;
- mask = (FT_Byte)( 0x80 >> ( right & 7 ) );
+ if ( p + 4 > p_limit )
+ goto NoBitmap;
- for ( ; line < limit; line += line_len )
- if ( line[0] & mask )
- goto Found_Right;
+ num_glyphs = FT_NEXT_ULONG( p );
- /* crop the whole glyph to the right */
- map->width--;
- metrics->width--;
+ /* overflow check for p + ( num_glyphs + 1 ) * 4 */
+ if ( p + 4 > p_limit ||
+ num_glyphs > (FT_ULong)( ( ( p_limit - p ) >> 2 ) - 1 ) )
+ goto NoBitmap;
- } while ( map->width > 0 );
+ for ( mm = 0; mm < num_glyphs; mm++ )
+ {
+ FT_UInt gindex = FT_NEXT_USHORT( p );
- Found_Right:
- /* all right, the bitmap was cropped */
- return;
- Empty_Bitmap:
- map->width = 0;
- map->rows = 0;
- map->pitch = 0;
- map->pixel_mode = FT_PIXEL_MODE_MONO;
- }
+ if ( gindex == glyph_index )
+ {
+ image_start = FT_NEXT_USHORT( p );
+ p += 2;
+ image_end = FT_PEEK_USHORT( p );
+ break;
+ }
+ p += 2;
+ }
+ if ( mm >= num_glyphs )
+ goto NoBitmap;
+ }
+ break;
- static FT_Error
- Load_SBit_Single( FT_Bitmap* map,
- FT_Int x_offset,
- FT_Int y_offset,
- FT_Int pix_bits,
- FT_UShort image_format,
- TT_SBit_Metrics metrics,
- FT_Stream stream )
- {
- FT_Error error;
+ case 5: /* constant metrics with sparse glyph codes */
+ case 19:
+ {
+ FT_ULong image_size, mm, num_glyphs;
- /* check that the source bitmap fits into the target pixmap */
- if ( x_offset < 0 || x_offset + metrics->width > map->width ||
- y_offset < 0 || y_offset + metrics->height > map->rows )
- {
- error = SFNT_Err_Invalid_Argument;
+ if ( p + 16 > p_limit )
+ goto NoBitmap;
- goto Exit;
- }
+ image_size = FT_NEXT_ULONG( p );
- {
- FT_Int glyph_width = metrics->width;
- FT_Int glyph_height = metrics->height;
- FT_Int glyph_size;
- FT_Int line_bits = pix_bits * glyph_width;
- FT_Bool pad_bytes = 0;
+ if ( tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ) )
+ goto NoBitmap;
+ num_glyphs = FT_NEXT_ULONG( p );
- /* compute size of glyph image */
- switch ( image_format )
- {
- case 1: /* byte-padded formats */
- case 6:
+ /* overflow check for p + 2 * num_glyphs */
+ if ( num_glyphs > (FT_ULong)( ( p_limit - p ) >> 1 ) )
+ goto NoBitmap;
+
+ for ( mm = 0; mm < num_glyphs; mm++ )
{
- FT_Int line_length;
+ FT_UInt gindex = FT_NEXT_USHORT( p );
- switch ( pix_bits )
- {
- case 1:
- line_length = ( glyph_width + 7 ) >> 3;
- break;
- case 2:
- line_length = ( glyph_width + 3 ) >> 2;
+ if ( gindex == glyph_index )
break;
- case 4:
- line_length = ( glyph_width + 1 ) >> 1;
- break;
- default:
- line_length = glyph_width;
- }
-
- glyph_size = glyph_height * line_length;
- pad_bytes = 1;
}
- break;
- case 2:
- case 5:
- case 7:
- line_bits = glyph_width * pix_bits;
- glyph_size = ( glyph_height * line_bits + 7 ) >> 3;
- break;
+ if ( mm >= num_glyphs )
+ goto NoBitmap;
- default: /* invalid format */
- return SFNT_Err_Invalid_File_Format;
+ image_start = image_size * mm;
+ image_end = image_start + image_size;
}
+ break;
- /* Now read data and draw glyph into target pixmap */
- if ( FT_FRAME_ENTER( glyph_size ) )
- goto Exit;
+ default:
+ goto NoBitmap;
+ }
- /* don't forget to multiply `x_offset' by `map->pix_bits' as */
- /* the sbit blitter doesn't make a difference between pixmap */
- /* depths. */
- blit_sbit( map, (FT_Byte*)stream->cursor, line_bits, pad_bytes,
- x_offset * pix_bits, y_offset, metrics->height );
+ if ( image_start > image_end )
+ goto NoBitmap;
- FT_FRAME_EXIT();
- }
+ image_end -= image_start;
+ image_start = image_offset + image_start;
- Exit:
- return error;
+ FT_TRACE3(( "tt_sbit_decoder_load_image:"
+ " found sbit (format %d) for glyph index %d\n",
+ image_format, glyph_index ));
+
+ return tt_sbit_decoder_load_bitmap( decoder,
+ image_format,
+ image_start,
+ image_end,
+ x_pos,
+ y_pos );
+
+ Failure:
+ return FT_THROW( Invalid_Table );
+
+ NoBitmap:
+ FT_TRACE4(( "tt_sbit_decoder_load_image:"
+ " no sbit found for glyph index %d\n", glyph_index ));
+
+ return FT_THROW( Invalid_Argument );
}
static FT_Error
- Load_SBit_Image( TT_SBit_Strike strike,
- TT_SBit_Range range,
- FT_ULong ebdt_pos,
- FT_ULong glyph_offset,
- FT_GlyphSlot slot,
- FT_Int x_offset,
- FT_Int y_offset,
- FT_Stream stream,
- TT_SBit_Metrics metrics,
- FT_Int depth )
+ tt_face_load_sbix_image( TT_Face face,
+ FT_ULong strike_index,
+ FT_UInt glyph_index,
+ FT_Stream stream,
+ FT_Bitmap *map,
+ TT_SBit_MetricsRec *metrics )
{
- FT_Memory memory = stream->memory;
- FT_Bitmap* map = &slot->bitmap;
- FT_Error error;
+ FT_UInt sbix_pos, strike_offset, glyph_start, glyph_end;
+ FT_ULong table_size;
+ FT_Int originOffsetX, originOffsetY;
+ FT_Tag graphicType;
+ FT_Int recurse_depth = 0;
+ FT_Error error;
+ FT_Byte* p;
- /* place stream at beginning of glyph data and read metrics */
- if ( FT_STREAM_SEEK( ebdt_pos + glyph_offset ) )
- goto Exit;
+ FT_UNUSED( map );
- error = tt_load_sbit_metrics( stream, range, metrics );
- if ( error )
- goto Exit;
- /* This function is recursive. At the top-level call, we */
- /* compute the dimensions of the higher-level glyph to */
- /* allocate the final pixmap buffer. */
- if ( depth == 0 )
- {
- FT_Long size;
+ metrics->width = 0;
+ metrics->height = 0;
+ p = face->sbit_table + 8 + 4 * strike_index;
+ strike_offset = FT_NEXT_ULONG( p );
- map->width = metrics->width;
- map->rows = metrics->height;
+ error = face->goto_table( face, TTAG_sbix, stream, &table_size );
+ if ( error )
+ return error;
+ sbix_pos = FT_STREAM_POS();
- switch ( strike->bit_depth )
- {
- case 1:
- map->pixel_mode = FT_PIXEL_MODE_MONO;
- map->pitch = ( map->width + 7 ) >> 3;
- break;
+ retry:
+ if ( glyph_index > (FT_UInt)face->root.num_glyphs )
+ return FT_THROW( Invalid_Argument );
- case 2:
- map->pixel_mode = FT_PIXEL_MODE_GRAY2;
- map->pitch = ( map->width + 3 ) >> 2;
- break;
+ if ( strike_offset >= table_size ||
+ table_size - strike_offset < 4 + glyph_index * 4 + 8 )
+ return FT_THROW( Invalid_File_Format );
- case 4:
- map->pixel_mode = FT_PIXEL_MODE_GRAY4;
- map->pitch = ( map->width + 1 ) >> 1;
- break;
+ if ( FT_STREAM_SEEK( sbix_pos + strike_offset + 4 + glyph_index * 4 ) ||
+ FT_FRAME_ENTER( 8 ) )
+ return error;
- case 8:
- map->pixel_mode = FT_PIXEL_MODE_GRAY;
- map->pitch = map->width;
- break;
+ glyph_start = FT_GET_ULONG();
+ glyph_end = FT_GET_ULONG();
- default:
- return SFNT_Err_Invalid_File_Format;
- }
+ FT_FRAME_EXIT();
- size = map->rows * map->pitch;
+ if ( glyph_start == glyph_end )
+ return FT_THROW( Invalid_Argument );
+ if ( glyph_start > glyph_end ||
+ glyph_end - glyph_start < 8 ||
+ table_size - strike_offset < glyph_end )
+ return FT_THROW( Invalid_File_Format );
- /* check that there is no empty image */
- if ( size == 0 )
- goto Exit; /* exit successfully! */
+ if ( FT_STREAM_SEEK( sbix_pos + strike_offset + glyph_start ) ||
+ FT_FRAME_ENTER( glyph_end - glyph_start ) )
+ return error;
- error = ft_glyphslot_alloc_bitmap( slot, size );
- if (error)
- goto Exit;
- }
+ originOffsetX = FT_GET_SHORT();
+ originOffsetY = FT_GET_SHORT();
- switch ( range->image_format )
- {
- case 1: /* single sbit image - load it */
- case 2:
- case 5:
- case 6:
- case 7:
- return Load_SBit_Single( map, x_offset, y_offset, strike->bit_depth,
- range->image_format, metrics, stream );
+ graphicType = FT_GET_TAG4();
- case 8: /* compound format */
- if ( FT_STREAM_SKIP( 1L ) )
+ switch ( graphicType )
+ {
+ case FT_MAKE_TAG( 'd', 'u', 'p', 'e' ):
+ if ( recurse_depth < 4 )
{
- error = SFNT_Err_Invalid_Stream_Skip;
- goto Exit;
+ glyph_index = FT_GET_USHORT();
+ FT_FRAME_EXIT();
+ recurse_depth++;
+ goto retry;
}
- /* fallthrough */
-
- case 9:
+ error = FT_THROW( Invalid_File_Format );
break;
- default: /* invalid image format */
- return SFNT_Err_Invalid_File_Format;
- }
-
- /* All right, we have a compound format. First of all, read */
- /* the array of elements. */
- {
- TT_SBit_Component components = NULL;
- TT_SBit_Component comp;
- FT_UShort num_components, count;
-
-
- if ( FT_READ_USHORT( num_components ) ||
- FT_NEW_ARRAY( components, num_components ) )
- goto Exit;
-
- count = num_components;
+ case FT_MAKE_TAG( 'p', 'n', 'g', ' ' ):
+#ifdef FT_CONFIG_OPTION_USE_PNG
+ error = Load_SBit_Png( face->root.glyph,
+ 0,
+ 0,
+ 32,
+ metrics,
+ stream->memory,
+ stream->cursor,
+ glyph_end - glyph_start - 8,
+ TRUE );
+#else
+ error = FT_THROW( Unimplemented_Feature );
+#endif
+ break;
- if ( FT_FRAME_ENTER( 4L * num_components ) )
- goto Fail_Memory;
+ case FT_MAKE_TAG( 'j', 'p', 'g', ' ' ):
+ case FT_MAKE_TAG( 't', 'i', 'f', 'f' ):
+ case FT_MAKE_TAG( 'r', 'g', 'b', 'l' ): /* used on iOS 7.1 */
+ error = FT_THROW( Unknown_File_Format );
+ break;
- for ( comp = components; count > 0; count--, comp++ )
- {
- comp->glyph_code = FT_GET_USHORT();
- comp->x_offset = FT_GET_CHAR();
- comp->y_offset = FT_GET_CHAR();
- }
+ default:
+ error = FT_THROW( Unimplemented_Feature );
+ break;
+ }
- FT_FRAME_EXIT();
+ FT_FRAME_EXIT();
- /* Now recursively load each element glyph */
- count = num_components;
- comp = components;
- for ( ; count > 0; count--, comp++ )
- {
- TT_SBit_Range elem_range;
- TT_SBit_MetricsRec elem_metrics;
- FT_ULong elem_offset;
+ if ( !error )
+ {
+ FT_Short abearing;
+ FT_UShort aadvance;
- /* find the range for this element */
- error = find_sbit_range( comp->glyph_code,
- strike,
- &elem_range,
- &elem_offset );
- if ( error )
- goto Fail_Memory;
-
- /* now load the element, recursively */
- error = Load_SBit_Image( strike,
- elem_range,
- ebdt_pos,
- elem_offset,
- slot,
- x_offset + comp->x_offset,
- y_offset + comp->y_offset,
- stream,
- &elem_metrics,
- depth + 1 );
- if ( error )
- goto Fail_Memory;
- }
+ tt_face_get_metrics( face, FALSE, glyph_index, &abearing, &aadvance );
- Fail_Memory:
- FT_FREE( components );
+ metrics->horiBearingX = (FT_Short)originOffsetX;
+ metrics->horiBearingY = (FT_Short)( -originOffsetY + metrics->height );
+ metrics->horiAdvance = (FT_Short)( aadvance *
+ face->root.size->metrics.x_ppem /
+ face->header.Units_Per_EM );
}
- Exit:
return error;
}
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* tt_face_load_sbit_image */
- /* */
- /* <Description> */
- /* Loads a given glyph sbit image from the font resource. This also */
- /* returns its metrics. */
- /* */
- /* <Input> */
- /* face :: The target face object. */
- /* */
- /* strike_index :: The current strike index. */
- /* */
- /* glyph_index :: The current glyph index. */
- /* */
- /* load_flags :: The glyph load flags (the code checks for the flag */
- /* FT_LOAD_CROP_BITMAP). */
- /* */
- /* stream :: The input stream. */
- /* */
- /* <Output> */
- /* map :: The target pixmap. */
- /* */
- /* metrics :: A big sbit metrics structure for the glyph image. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. Returns an error if no */
- /* glyph sbit exists for the index. */
- /* */
- /* <Note> */
- /* The `map.buffer' field is always freed before the glyph is loaded. */
- /* */
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL( FT_Error )
tt_face_load_sbit_image( TT_Face face,
FT_ULong strike_index,
FT_UInt glyph_index,
@@ -1450,59 +1396,71 @@
FT_Bitmap *map,
TT_SBit_MetricsRec *metrics )
{
- FT_Error error;
- FT_ULong ebdt_pos, glyph_offset;
+ FT_Error error = FT_Err_Ok;
- TT_SBit_Strike strike;
- TT_SBit_Range range;
+ switch ( (FT_UInt)face->sbit_table_type )
+ {
+ case TT_SBIT_TABLE_TYPE_EBLC:
+ case TT_SBIT_TABLE_TYPE_CBLC:
+ {
+ TT_SBitDecoderRec decoder[1];
- /* Check whether there is a glyph sbit for the current index */
- error = tt_find_sbit_image( face, glyph_index, strike_index,
- &range, &strike, &glyph_offset );
- if ( error )
- goto Exit;
- /* now, find the location of the `EBDT' table in */
- /* the font file */
- error = face->goto_table( face, TTAG_EBDT, stream, 0 );
- if ( error )
- error = face->goto_table( face, TTAG_bdat, stream, 0 );
- if ( error )
- goto Exit;
+ error = tt_sbit_decoder_init( decoder, face, strike_index, metrics );
+ if ( !error )
+ {
+ error = tt_sbit_decoder_load_image( decoder,
+ glyph_index,
+ 0,
+ 0 );
+ tt_sbit_decoder_done( decoder );
+ }
+ }
+ break;
- ebdt_pos = FT_STREAM_POS();
+ case TT_SBIT_TABLE_TYPE_SBIX:
+ error = tt_face_load_sbix_image( face,
+ strike_index,
+ glyph_index,
+ stream,
+ map,
+ metrics );
+ break;
- error = Load_SBit_Image( strike, range, ebdt_pos, glyph_offset,
- face->root.glyph, 0, 0, stream, metrics, 0 );
- if ( error )
- goto Exit;
+ default:
+ error = FT_THROW( Unknown_File_Format );
+ break;
+ }
- /* setup vertical metrics if needed */
- if ( strike->flags & 1 )
+ /* Flatten color bitmaps if color was not requested. */
+ if ( !error &&
+ !( load_flags & FT_LOAD_COLOR ) &&
+ map->pixel_mode == FT_PIXEL_MODE_BGRA )
{
- /* in case of a horizontal strike only */
- FT_Int advance;
+ FT_Bitmap new_map;
+ FT_Library library = face->root.glyph->library;
- advance = strike->hori.ascender - strike->hori.descender;
+ FT_Bitmap_New( &new_map );
- /* some heuristic values */
+ /* Convert to 8bit grayscale. */
+ error = FT_Bitmap_Convert( library, map, &new_map, 1 );
+ if ( error )
+ FT_Bitmap_Done( library, &new_map );
+ else
+ {
+ map->pixel_mode = new_map.pixel_mode;
+ map->pitch = new_map.pitch;
+ map->num_grays = new_map.num_grays;
- metrics->vertBearingX = (FT_Char)(-metrics->width / 2 );
- metrics->vertBearingY = (FT_Char)( ( advance - metrics->height ) / 2 );
- metrics->vertAdvance = (FT_Char)( advance * 12 / 10 );
+ ft_glyphslot_set_bitmap( face->root.glyph, new_map.buffer );
+ face->root.glyph->internal->flags |= FT_GLYPH_OWN_BITMAP;
+ }
}
- /* Crop the bitmap now, unless specified otherwise */
- if ( load_flags & FT_LOAD_CROP_BITMAP )
- crop_bitmap( map, metrics );
-
- Exit:
return error;
}
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
-/* END */
+/* EOF */
diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h
index 7ea2af1..695d0d8 100644
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded bitmap support (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2008, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -28,11 +28,11 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- tt_face_load_eblc( TT_Face face,
+ tt_face_load_sbit( TT_Face face,
FT_Stream stream );
FT_LOCAL( void )
- tt_face_free_eblc( TT_Face face );
+ tt_face_free_sbit( TT_Face face );
FT_LOCAL( FT_Error )
@@ -45,22 +45,6 @@ FT_BEGIN_HEADER
FT_ULong strike_index,
FT_Size_Metrics* metrics );
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- FT_LOCAL( FT_Error )
- tt_find_sbit_image( TT_Face face,
- FT_UInt glyph_index,
- FT_ULong strike_index,
- TT_SBit_Range *arange,
- TT_SBit_Strike *astrike,
- FT_ULong *aglyph_offset );
-
- FT_LOCAL( FT_Error )
- tt_load_sbit_metrics( FT_Stream stream,
- TT_SBit_Range range,
- TT_SBit_Metrics metrics );
-
-#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
FT_LOCAL( FT_Error )
tt_face_load_sbit_image( TT_Face face,
FT_ULong strike_index,
diff --git a/src/sfnt/ttsbit0.c b/src/sfnt/ttsbit0.c
deleted file mode 100644
index 38bcf21..0000000
--- a/src/sfnt/ttsbit0.c
+++ /dev/null
@@ -1,1011 +0,0 @@
-/***************************************************************************/
-/* */
-/* ttsbit0.c */
-/* */
-/* TrueType and OpenType embedded bitmap support (body). */
-/* This is a heap-optimized version. */
-/* */
-/* Copyright 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. */
-/* */
-/***************************************************************************/
-
-
-/* This file is included by ttsbit.c */
-
-
-#include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
-#include "ttsbit.h"
-
-#include "sferrors.h"
-
-
- /*************************************************************************/
- /* */
- /* 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_ttsbit
-
-
- FT_LOCAL_DEF( FT_Error )
- tt_face_load_eblc( TT_Face face,
- FT_Stream stream )
- {
- FT_Error error = SFNT_Err_Ok;
- FT_Fixed version;
- FT_ULong num_strikes, table_size;
- FT_Byte* p;
- FT_Byte* p_limit;
- FT_UInt count;
-
-
- face->sbit_num_strikes = 0;
-
- /* this table is optional */
- error = face->goto_table( face, TTAG_EBLC, stream, &table_size );
- if ( error )
- error = face->goto_table( face, TTAG_bloc, stream, &table_size );
- if ( error )
- goto Exit;
-
- if ( table_size < 8 )
- {
- FT_ERROR(( "tt_face_load_sbit_strikes: table too short\n" ));
- error = SFNT_Err_Invalid_File_Format;
- goto Exit;
- }
-
- if ( FT_FRAME_EXTRACT( table_size, face->sbit_table ) )
- goto Exit;
-
- face->sbit_table_size = table_size;
-
- p = face->sbit_table;
- p_limit = p + table_size;
-
- version = FT_NEXT_ULONG( p );
- num_strikes = FT_NEXT_ULONG( p );
-
- if ( version != 0x00020000UL || num_strikes >= 0x10000UL )
- {
- FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version\n" ));
- error = SFNT_Err_Invalid_File_Format;
- goto Fail;
- }
-
- /*
- * Count the number of strikes available in the table. We are a bit
- * paranoid there and don't trust the data.
- */
- count = (FT_UInt)num_strikes;
- if ( 8 + 48UL * count > table_size )
- count = (FT_UInt)( ( p_limit - p ) / 48 );
-
- face->sbit_num_strikes = count;
-
- FT_TRACE3(( "sbit_num_strikes: %u\n", count ));
- Exit:
- return error;
-
- Fail:
- FT_FRAME_RELEASE( face->sbit_table );
- face->sbit_table_size = 0;
- goto Exit;
- }
-
-
- FT_LOCAL_DEF( void )
- tt_face_free_eblc( TT_Face face )
- {
- FT_Stream stream = face->root.stream;
-
-
- FT_FRAME_RELEASE( face->sbit_table );
- face->sbit_table_size = 0;
- face->sbit_num_strikes = 0;
- }
-
-
- FT_LOCAL_DEF( FT_Error )
- tt_face_set_sbit_strike( TT_Face face,
- FT_Size_Request req,
- FT_ULong* astrike_index )
- {
- return FT_Match_Size( (FT_Face)face, req, 0, astrike_index );
- }
-
-
- FT_LOCAL_DEF( FT_Error )
- tt_face_load_strike_metrics( TT_Face face,
- FT_ULong strike_index,
- FT_Size_Metrics* metrics )
- {
- FT_Byte* strike;
-
-
- if ( strike_index >= (FT_ULong)face->sbit_num_strikes )
- return SFNT_Err_Invalid_Argument;
-
- strike = face->sbit_table + 8 + strike_index * 48;
-
- metrics->x_ppem = (FT_UShort)strike[44];
- metrics->y_ppem = (FT_UShort)strike[45];
-
- metrics->ascender = (FT_Char)strike[16] << 6; /* hori.ascender */
- metrics->descender = (FT_Char)strike[17] << 6; /* hori.descender */
- metrics->height = metrics->ascender - metrics->descender;
-
- /* XXX: Is this correct? */
- metrics->max_advance = ( (FT_Char)strike[22] + /* min_origin_SB */
- strike[18] + /* max_width */
- (FT_Char)strike[23] /* min_advance_SB */
- ) << 6;
-
- return SFNT_Err_Ok;
- }
-
-
- typedef struct TT_SBitDecoderRec_
- {
- TT_Face face;
- FT_Stream stream;
- FT_Bitmap* bitmap;
- TT_SBit_Metrics metrics;
- FT_Bool metrics_loaded;
- FT_Bool bitmap_allocated;
- FT_Byte bit_depth;
-
- FT_ULong ebdt_start;
- FT_ULong ebdt_size;
-
- FT_ULong strike_index_array;
- FT_ULong strike_index_count;
- FT_Byte* eblc_base;
- FT_Byte* eblc_limit;
-
- } TT_SBitDecoderRec, *TT_SBitDecoder;
-
-
- static FT_Error
- tt_sbit_decoder_init( TT_SBitDecoder decoder,
- TT_Face face,
- FT_ULong strike_index,
- TT_SBit_MetricsRec* metrics )
- {
- FT_Error error;
- FT_Stream stream = face->root.stream;
- FT_ULong ebdt_size;
-
-
- error = face->goto_table( face, TTAG_EBDT, stream, &ebdt_size );
- if ( error )
- error = face->goto_table( face, TTAG_bdat, stream, &ebdt_size );
- if ( error )
- goto Exit;
-
- decoder->face = face;
- decoder->stream = stream;
- decoder->bitmap = &face->root.glyph->bitmap;
- decoder->metrics = metrics;
-
- decoder->metrics_loaded = 0;
- decoder->bitmap_allocated = 0;
-
- decoder->ebdt_start = FT_STREAM_POS();
- decoder->ebdt_size = ebdt_size;
-
- decoder->eblc_base = face->sbit_table;
- decoder->eblc_limit = face->sbit_table + face->sbit_table_size;
-
- /* now find the strike corresponding to the index */
- {
- FT_Byte* p;
-
-
- if ( 8 + 48 * strike_index + 3 * 4 + 34 + 1 > face->sbit_table_size )
- {
- error = SFNT_Err_Invalid_File_Format;
- goto Exit;
- }
-
- p = decoder->eblc_base + 8 + 48 * strike_index;
-
- decoder->strike_index_array = FT_NEXT_ULONG( p );
- p += 4;
- decoder->strike_index_count = FT_NEXT_ULONG( p );
- p += 34;
- decoder->bit_depth = *p;
-
- if ( decoder->strike_index_array > face->sbit_table_size ||
- decoder->strike_index_array + 8 * decoder->strike_index_count >
- face->sbit_table_size )
- error = SFNT_Err_Invalid_File_Format;
- }
-
- Exit:
- return error;
- }
-
-
- static void
- tt_sbit_decoder_done( TT_SBitDecoder decoder )
- {
- FT_UNUSED( decoder );
- }
-
-
- static FT_Error
- tt_sbit_decoder_alloc_bitmap( TT_SBitDecoder decoder )
- {
- FT_Error error = SFNT_Err_Ok;
- FT_UInt width, height;
- FT_Bitmap* map = decoder->bitmap;
- FT_Long size;
-
-
- if ( !decoder->metrics_loaded )
- {
- error = SFNT_Err_Invalid_Argument;
- goto Exit;
- }
-
- width = decoder->metrics->width;
- height = decoder->metrics->height;
-
- map->width = (int)width;
- map->rows = (int)height;
-
- switch ( decoder->bit_depth )
- {
- case 1:
- map->pixel_mode = FT_PIXEL_MODE_MONO;
- map->pitch = ( map->width + 7 ) >> 3;
- break;
-
- case 2:
- map->pixel_mode = FT_PIXEL_MODE_GRAY2;
- map->pitch = ( map->width + 3 ) >> 2;
- break;
-
- case 4:
- map->pixel_mode = FT_PIXEL_MODE_GRAY4;
- map->pitch = ( map->width + 1 ) >> 1;
- break;
-
- case 8:
- map->pixel_mode = FT_PIXEL_MODE_GRAY;
- map->pitch = map->width;
- break;
-
- default:
- error = SFNT_Err_Invalid_File_Format;
- goto Exit;
- }
-
- size = map->rows * map->pitch;
-
- /* check that there is no empty image */
- if ( size == 0 )
- goto Exit; /* exit successfully! */
-
- error = ft_glyphslot_alloc_bitmap( decoder->face->root.glyph, size );
- if ( error )
- goto Exit;
-
- decoder->bitmap_allocated = 1;
-
- Exit:
- return error;
- }
-
-
- static FT_Error
- tt_sbit_decoder_load_metrics( TT_SBitDecoder decoder,
- FT_Byte* *pp,
- FT_Byte* limit,
- FT_Bool big )
- {
- FT_Byte* p = *pp;
- TT_SBit_Metrics metrics = decoder->metrics;
-
-
- if ( p + 5 > limit )
- goto Fail;
-
- metrics->height = p[0];
- metrics->width = p[1];
- metrics->horiBearingX = (FT_Char)p[2];
- metrics->horiBearingY = (FT_Char)p[3];
- metrics->horiAdvance = p[4];
-
- p += 5;
- if ( big )
- {
- if ( p + 3 > limit )
- goto Fail;
-
- metrics->vertBearingX = (FT_Char)p[0];
- metrics->vertBearingY = (FT_Char)p[1];
- metrics->vertAdvance = p[2];
-
- p += 3;
- }
-
- decoder->metrics_loaded = 1;
- *pp = p;
- return SFNT_Err_Ok;
-
- Fail:
- return SFNT_Err_Invalid_Argument;
- }
-
-
- /* forward declaration */
- static FT_Error
- tt_sbit_decoder_load_image( TT_SBitDecoder decoder,
- FT_UInt glyph_index,
- FT_Int x_pos,
- FT_Int y_pos );
-
- typedef FT_Error (*TT_SBitDecoder_LoadFunc)( TT_SBitDecoder decoder,
- FT_Byte* p,
- FT_Byte* plimit,
- FT_Int x_pos,
- FT_Int y_pos );
-
-
- static FT_Error
- tt_sbit_decoder_load_byte_aligned( TT_SBitDecoder decoder,
- FT_Byte* p,
- FT_Byte* limit,
- FT_Int x_pos,
- FT_Int y_pos )
- {
- FT_Error error = SFNT_Err_Ok;
- FT_Byte* line;
- FT_Int bit_height, bit_width, pitch, width, height, h;
- FT_Bitmap* bitmap;
-
-
- if ( !decoder->bitmap_allocated )
- {
- error = tt_sbit_decoder_alloc_bitmap( decoder );
- if ( error )
- goto Exit;
- }
-
- /* check that we can write the glyph into the bitmap */
- bitmap = decoder->bitmap;
- bit_width = bitmap->width;
- bit_height = bitmap->rows;
- pitch = bitmap->pitch;
- line = bitmap->buffer;
-
- width = decoder->metrics->width;
- height = decoder->metrics->height;
-
- if ( x_pos < 0 || x_pos + width > bit_width ||
- y_pos < 0 || y_pos + height > bit_height )
- {
- error = SFNT_Err_Invalid_File_Format;
- goto Exit;
- }
-
- if ( p + ( ( width + 7 ) >> 3 ) * height > limit )
- {
- error = SFNT_Err_Invalid_File_Format;
- goto Exit;
- }
-
- /* now do the blit */
- line += y_pos * pitch + ( x_pos >> 3 );
- x_pos &= 7;
-
- if ( x_pos == 0 ) /* the easy one */
- {
- for ( h = height; h > 0; h--, line += pitch )
- {
- FT_Byte* write = line;
- FT_Int w;
-
-
- for ( w = width; w >= 8; w -= 8 )
- {
- write[0] = (FT_Byte)( write[0] | *p++ );
- write += 1;
- }
-
- if ( w > 0 )
- write[0] = (FT_Byte)( write[0] | ( *p++ & ( 0xFF00U >> w ) ) );
- }
- }
- else /* x_pos > 0 */
- {
- for ( h = height; h > 0; h--, line += pitch )
- {
- FT_Byte* write = line;
- FT_Int w;
- FT_UInt wval = 0;
-
-
- for ( w = width; w >= 8; w -= 8 )
- {
- wval = (FT_UInt)( wval | *p++ );
- write[0] = (FT_Byte)( write[0] | ( wval >> x_pos ) );
- write += 1;
- wval <<= 8;
- }
-
- if ( w > 0 )
- wval = (FT_UInt)( wval | ( *p++ & ( 0xFF00U >> w ) ) );
-
- /* all bits read and there are `x_pos + w' bits to be written */
-
- write[0] = (FT_Byte)( write[0] | ( wval >> x_pos ) );
-
- if ( x_pos + w > 8 )
- {
- write++;
- wval <<= 8;
- write[0] = (FT_Byte)( write[0] | ( wval >> x_pos ) );
- }
- }
- }
-
- Exit:
- return error;
- }
-
-
- /*
- * Load a bit-aligned bitmap (with pointer `p') into a line-aligned bitmap
- * (with pointer `write'). In the example below, the width is 3 pixel,
- * and `x_pos' is 1 pixel.
- *
- * p p+1
- * | | |
- * | 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 |...
- * | | |
- * +-------+ +-------+ +-------+ ...
- * . . .
- * . . .
- * v . .
- * +-------+ . .
- * | | .
- * | 7 6 5 4 3 2 1 0 | .
- * | | .
- * write . .
- * . .
- * v .
- * +-------+ .
- * | |
- * | 7 6 5 4 3 2 1 0 |
- * | |
- * write+1 .
- * .
- * v
- * +-------+
- * | |
- * | 7 6 5 4 3 2 1 0 |
- * | |
- * write+2
- *
- */
-
- static FT_Error
- tt_sbit_decoder_load_bit_aligned( TT_SBitDecoder decoder,
- FT_Byte* p,
- FT_Byte* limit,
- FT_Int x_pos,
- FT_Int y_pos )
- {
- FT_Error error = SFNT_Err_Ok;
- FT_Byte* line;
- FT_Int bit_height, bit_width, pitch, width, height, h, nbits;
- FT_Bitmap* bitmap;
- FT_UShort rval;
-
-
- if ( !decoder->bitmap_allocated )
- {
- error = tt_sbit_decoder_alloc_bitmap( decoder );
- if ( error )
- goto Exit;
- }
-
- /* check that we can write the glyph into the bitmap */
- bitmap = decoder->bitmap;
- bit_width = bitmap->width;
- bit_height = bitmap->rows;
- pitch = bitmap->pitch;
- line = bitmap->buffer;
-
- width = decoder->metrics->width;
- height = decoder->metrics->height;
-
- if ( x_pos < 0 || x_pos + width > bit_width ||
- y_pos < 0 || y_pos + height > bit_height )
- {
- error = SFNT_Err_Invalid_File_Format;
- goto Exit;
- }
-
- if ( p + ( ( width * height + 7 ) >> 3 ) > limit )
- {
- error = SFNT_Err_Invalid_File_Format;
- goto Exit;
- }
-
- /* now do the blit */
-
- /* adjust `line' to point to the first byte of the bitmap */
- line += y_pos * pitch + ( x_pos >> 3 );
- x_pos &= 7;
-
- /* the higher byte of `rval' is used as a buffer */
- rval = 0;
- nbits = 0;
-
- for ( h = height; h > 0; h--, line += pitch )
- {
- FT_Byte* write = line;
- FT_Int w = width;
-
-
- /* handle initial byte (in target bitmap) specially if necessary */
- if ( x_pos )
- {
- w = ( width < 8 - x_pos ) ? width : 8 - x_pos;
-
- if ( h == height )
- {
- rval = *p++;
- nbits = x_pos;
- }
- else if ( nbits < w )
- {
- if ( p < limit )
- rval |= *p++;
- nbits += 8 - w;
- }
- else
- {
- rval >>= 8;
- nbits -= w;
- }
-
- *write++ |= ( ( rval >> nbits ) & 0xFF ) &
- ( ~( 0xFF << w ) << ( 8 - w - x_pos ) );
- rval <<= 8;
-
- w = width - w;
- }
-
- /* handle medial bytes */
- for ( ; w >= 8; w -= 8 )
- {
- rval |= *p++;
- *write++ |= ( rval >> nbits ) & 0xFF;
-
- rval <<= 8;
- }
-
- /* handle final byte if necessary */
- if ( w > 0 )
- {
- if ( nbits < w )
- {
- if ( p < limit )
- rval |= *p++;
- *write |= ( ( rval >> nbits ) & 0xFF ) & ( 0xFF00U >> w );
- nbits += 8 - w;
-
- rval <<= 8;
- }
- else
- {
- *write |= ( ( rval >> nbits ) & 0xFF ) & ( 0xFF00U >> w );
- nbits -= w;
- }
- }
- }
-
- Exit:
- return error;
- }
-
-
- static FT_Error
- tt_sbit_decoder_load_compound( TT_SBitDecoder decoder,
- FT_Byte* p,
- FT_Byte* limit,
- FT_Int x_pos,
- FT_Int y_pos )
- {
- FT_Error error = SFNT_Err_Ok;
- FT_UInt num_components, nn;
-
- FT_Char horiBearingX = decoder->metrics->horiBearingX;
- FT_Char horiBearingY = decoder->metrics->horiBearingY;
- FT_Byte horiAdvance = decoder->metrics->horiAdvance;
- FT_Char vertBearingX = decoder->metrics->vertBearingX;
- FT_Char vertBearingY = decoder->metrics->vertBearingY;
- FT_Byte vertAdvance = decoder->metrics->vertAdvance;
-
-
- if ( p + 2 > limit )
- goto Fail;
-
- num_components = FT_NEXT_USHORT( p );
- if ( p + 4 * num_components > limit )
- goto Fail;
-
- if ( !decoder->bitmap_allocated )
- {
- error = tt_sbit_decoder_alloc_bitmap( decoder );
- if ( error )
- goto Exit;
- }
-
- for ( nn = 0; nn < num_components; nn++ )
- {
- FT_UInt gindex = FT_NEXT_USHORT( p );
- FT_Byte dx = FT_NEXT_BYTE( p );
- FT_Byte dy = FT_NEXT_BYTE( p );
-
-
- /* NB: a recursive call */
- error = tt_sbit_decoder_load_image( decoder, gindex,
- x_pos + dx, y_pos + dy );
- if ( error )
- break;
- }
-
- decoder->metrics->horiBearingX = horiBearingX;
- decoder->metrics->horiBearingY = horiBearingY;
- decoder->metrics->horiAdvance = horiAdvance;
- decoder->metrics->vertBearingX = vertBearingX;
- decoder->metrics->vertBearingY = vertBearingY;
- decoder->metrics->vertAdvance = vertAdvance;
- decoder->metrics->width = (FT_UInt)decoder->bitmap->width;
- decoder->metrics->height = (FT_UInt)decoder->bitmap->rows;
-
- Exit:
- return error;
-
- Fail:
- error = SFNT_Err_Invalid_File_Format;
- goto Exit;
- }
-
-
- static FT_Error
- tt_sbit_decoder_load_bitmap( TT_SBitDecoder decoder,
- FT_UInt glyph_format,
- FT_ULong glyph_start,
- FT_ULong glyph_size,
- FT_Int x_pos,
- FT_Int y_pos )
- {
- FT_Error error;
- FT_Stream stream = decoder->stream;
- FT_Byte* p;
- FT_Byte* p_limit;
- FT_Byte* data;
-
-
- /* seek into the EBDT table now */
- if ( glyph_start + glyph_size > decoder->ebdt_size )
- {
- error = SFNT_Err_Invalid_Argument;
- goto Exit;
- }
-
- if ( FT_STREAM_SEEK( decoder->ebdt_start + glyph_start ) ||
- FT_FRAME_EXTRACT( glyph_size, data ) )
- goto Exit;
-
- p = data;
- p_limit = p + glyph_size;
-
- /* read the data, depending on the glyph format */
- switch ( glyph_format )
- {
- case 1:
- case 2:
- case 8:
- error = tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 0 );
- break;
-
- case 6:
- case 7:
- case 9:
- error = tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 );
- break;
-
- default:
- error = SFNT_Err_Ok;
- }
-
- if ( error )
- goto Fail;
-
- {
- TT_SBitDecoder_LoadFunc loader;
-
-
- switch ( glyph_format )
- {
- case 1:
- case 6:
- loader = tt_sbit_decoder_load_byte_aligned;
- break;
-
- case 2:
- case 5:
- case 7:
- loader = tt_sbit_decoder_load_bit_aligned;
- break;
-
- case 8:
- if ( p + 1 > p_limit )
- goto Fail;
-
- p += 1; /* skip padding */
- /* fall-through */
-
- case 9:
- loader = tt_sbit_decoder_load_compound;
- break;
-
- default:
- goto Fail;
- }
-
- error = loader( decoder, p, p_limit, x_pos, y_pos );
- }
-
- Fail:
- FT_FRAME_RELEASE( data );
-
- Exit:
- return error;
- }
-
-
- static FT_Error
- tt_sbit_decoder_load_image( TT_SBitDecoder decoder,
- FT_UInt glyph_index,
- FT_Int x_pos,
- FT_Int y_pos )
- {
- /*
- * First, we find the correct strike range that applies to this
- * glyph index.
- */
-
- FT_Byte* p = decoder->eblc_base + decoder->strike_index_array;
- FT_Byte* p_limit = decoder->eblc_limit;
- FT_ULong num_ranges = decoder->strike_index_count;
- FT_UInt start, end, index_format, image_format;
- FT_ULong image_start = 0, image_end = 0, image_offset;
-
-
- for ( ; num_ranges > 0; num_ranges-- )
- {
- start = FT_NEXT_USHORT( p );
- end = FT_NEXT_USHORT( p );
-
- if ( glyph_index >= start && glyph_index <= end )
- goto FoundRange;
-
- p += 4; /* ignore index offset */
- }
- goto NoBitmap;
-
- FoundRange:
- image_offset = FT_NEXT_ULONG( p );
-
- /* overflow check */
- if ( decoder->eblc_base + decoder->strike_index_array + image_offset <
- decoder->eblc_base )
- goto Failure;
-
- p = decoder->eblc_base + decoder->strike_index_array + image_offset;
- if ( p + 8 > p_limit )
- goto NoBitmap;
-
- /* now find the glyph's location and extend within the ebdt table */
- index_format = FT_NEXT_USHORT( p );
- image_format = FT_NEXT_USHORT( p );
- image_offset = FT_NEXT_ULONG ( p );
-
- switch ( index_format )
- {
- case 1: /* 4-byte offsets relative to `image_offset' */
- {
- p += 4 * ( glyph_index - start );
- if ( p + 8 > p_limit )
- goto NoBitmap;
-
- image_start = FT_NEXT_ULONG( p );
- image_end = FT_NEXT_ULONG( p );
-
- if ( image_start == image_end ) /* missing glyph */
- goto NoBitmap;
- }
- break;
-
- case 2: /* big metrics, constant image size */
- {
- FT_ULong image_size;
-
-
- if ( p + 12 > p_limit )
- goto NoBitmap;
-
- image_size = FT_NEXT_ULONG( p );
-
- if ( tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ) )
- goto NoBitmap;
-
- image_start = image_size * ( glyph_index - start );
- image_end = image_start + image_size;
- }
- break;
-
- case 3: /* 2-byte offsets relative to 'image_offset' */
- {
- p += 2 * ( glyph_index - start );
- if ( p + 4 > p_limit )
- goto NoBitmap;
-
- image_start = FT_NEXT_USHORT( p );
- image_end = FT_NEXT_USHORT( p );
-
- if ( image_start == image_end ) /* missing glyph */
- goto NoBitmap;
- }
- break;
-
- case 4: /* sparse glyph array with (glyph,offset) pairs */
- {
- FT_ULong mm, num_glyphs;
-
-
- if ( p + 4 > p_limit )
- goto NoBitmap;
-
- num_glyphs = FT_NEXT_ULONG( p );
-
- /* overflow check */
- if ( p + ( num_glyphs + 1 ) * 4 < p )
- goto Failure;
-
- if ( p + ( num_glyphs + 1 ) * 4 > p_limit )
- goto NoBitmap;
-
- for ( mm = 0; mm < num_glyphs; mm++ )
- {
- FT_UInt gindex = FT_NEXT_USHORT( p );
-
-
- if ( gindex == glyph_index )
- {
- image_start = FT_NEXT_USHORT( p );
- p += 2;
- image_end = FT_PEEK_USHORT( p );
- break;
- }
- p += 2;
- }
-
- if ( mm >= num_glyphs )
- goto NoBitmap;
- }
- break;
-
- case 5: /* constant metrics with sparse glyph codes */
- {
- FT_ULong image_size, mm, num_glyphs;
-
-
- if ( p + 16 > p_limit )
- goto NoBitmap;
-
- image_size = FT_NEXT_ULONG( p );
-
- if ( tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ) )
- goto NoBitmap;
-
- num_glyphs = FT_NEXT_ULONG( p );
-
- /* overflow check */
- if ( p + 2 * num_glyphs < p )
- goto Failure;
-
- if ( p + 2 * num_glyphs > p_limit )
- goto NoBitmap;
-
- for ( mm = 0; mm < num_glyphs; mm++ )
- {
- FT_UInt gindex = FT_NEXT_USHORT( p );
-
-
- if ( gindex == glyph_index )
- break;
- }
-
- if ( mm >= num_glyphs )
- goto NoBitmap;
-
- image_start = image_size * mm;
- image_end = image_start + image_size;
- }
- break;
-
- default:
- goto NoBitmap;
- }
-
- if ( image_start > image_end )
- goto NoBitmap;
-
- image_end -= image_start;
- image_start = image_offset + image_start;
-
- return tt_sbit_decoder_load_bitmap( decoder,
- image_format,
- image_start,
- image_end,
- x_pos,
- y_pos );
-
- Failure:
- return SFNT_Err_Invalid_Table;
-
- NoBitmap:
- return SFNT_Err_Invalid_Argument;
- }
-
-
- FT_LOCAL( FT_Error )
- tt_face_load_sbit_image( TT_Face face,
- FT_ULong strike_index,
- FT_UInt glyph_index,
- FT_UInt load_flags,
- FT_Stream stream,
- FT_Bitmap *map,
- TT_SBit_MetricsRec *metrics )
- {
- TT_SBitDecoderRec decoder[1];
- FT_Error error;
-
- FT_UNUSED( load_flags );
- FT_UNUSED( stream );
- FT_UNUSED( map );
-
-
- error = tt_sbit_decoder_init( decoder, face, strike_index, metrics );
- if ( !error )
- {
- error = tt_sbit_decoder_load_image( decoder, glyph_index, 0, 0 );
- tt_sbit_decoder_done( decoder );
- }
-
- return error;
- }
-
-/* EOF */
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 4c0eea5..131ad27 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -4,7 +4,7 @@
/* */
/* A new `perfect' anti-aliasing renderer (body). */
/* */
-/* Copyright 2000-2003, 2005-2012 by */
+/* Copyright 2000-2003, 2005-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,8 +24,8 @@
/* */
/* - copy `src/smooth/ftgrays.c' (this file) to your current directory */
/* */
- /* - copy `include/freetype/ftimage.h' and `src/smooth/ftgrays.h' to the */
- /* same directory */
+ /* - copy `include/ftimage.h' and `src/smooth/ftgrays.h' to the same */
+ /* directory */
/* */
/* - compile `ftgrays' with the _STANDALONE_ macro defined, as in */
/* */
@@ -94,6 +94,14 @@
#ifdef _STANDALONE_
+ /* Auxiliary macros for token concatenation. */
+#define FT_ERR_XCAT( x, y ) x ## y
+#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
+
+#define FT_BEGIN_STMNT do {
+#define FT_END_STMNT } while ( 0 )
+
+
/* define this to dump debugging information */
/* #define FT_DEBUG_LEVEL_TRACE */
@@ -154,6 +162,21 @@ typedef ptrdiff_t FT_PtrDist;
va_end( ap );
}
+
+ /* empty function useful for setting a breakpoint to catch errors */
+ int
+ FT_Throw( int error,
+ int line,
+ const char* file )
+ {
+ FT_UNUSED( error );
+ FT_UNUSED( line );
+ FT_UNUSED( file );
+
+ return 0;
+ }
+
+
/* we don't handle tracing levels in stand-alone mode; */
#ifndef FT_TRACE5
#define FT_TRACE5( varformat ) FT_Message varformat
@@ -165,11 +188,19 @@ typedef ptrdiff_t FT_PtrDist;
#define FT_ERROR( varformat ) FT_Message varformat
#endif
+#define FT_THROW( e ) \
+ ( FT_Throw( FT_ERR_CAT( ErrRaster, e ), \
+ __LINE__, \
+ __FILE__ ) | \
+ FT_ERR_CAT( ErrRaster, e ) )
+
#else /* !FT_DEBUG_LEVEL_TRACE */
#define FT_TRACE5( x ) do { } while ( 0 ) /* nothing */
#define FT_TRACE7( x ) do { } while ( 0 ) /* nothing */
#define FT_ERROR( x ) do { } while ( 0 ) /* nothing */
+#define FT_THROW( e ) FT_ERR_CAT( ErrRaster_, e )
+
#endif /* !FT_DEBUG_LEVEL_TRACE */
@@ -202,6 +233,7 @@ typedef ptrdiff_t FT_PtrDist;
raster_done_ \
};
+
#else /* !_STANDALONE_ */
@@ -215,13 +247,14 @@ typedef ptrdiff_t FT_PtrDist;
#include "ftspic.h"
-#define ErrRaster_Invalid_Mode Smooth_Err_Cannot_Render_Glyph
-#define ErrRaster_Invalid_Outline Smooth_Err_Invalid_Outline
+#define Smooth_Err_Invalid_Mode Smooth_Err_Cannot_Render_Glyph
+#define Smooth_Err_Memory_Overflow Smooth_Err_Out_Of_Memory
#define ErrRaster_Memory_Overflow Smooth_Err_Out_Of_Memory
-#define ErrRaster_Invalid_Argument Smooth_Err_Invalid_Argument
+
#endif /* !_STANDALONE_ */
+
#ifndef FT_MEM_SET
#define FT_MEM_SET( d, s, c ) ft_memset( d, s, c )
#endif
@@ -280,6 +313,40 @@ typedef ptrdiff_t FT_PtrDist;
#endif
+ /* Compute `dividend / divisor' and return both its quotient and */
+ /* remainder, cast to a specific type. This macro also ensures that */
+ /* the remainder is always positive. */
+#define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \
+ FT_BEGIN_STMNT \
+ (quotient) = (type)( (dividend) / (divisor) ); \
+ (remainder) = (type)( (dividend) % (divisor) ); \
+ if ( (remainder) < 0 ) \
+ { \
+ (quotient)--; \
+ (remainder) += (type)(divisor); \
+ } \
+ FT_END_STMNT
+
+#ifdef __arm__
+ /* Work around a bug specific to GCC which make the compiler fail to */
+ /* optimize a division and modulo operation on the same parameters */
+ /* into a single call to `__aeabi_idivmod'. See */
+ /* */
+ /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43721 */
+#undef FT_DIV_MOD
+#define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \
+ FT_BEGIN_STMNT \
+ (quotient) = (type)( (dividend) / (divisor) ); \
+ (remainder) = (type)( (dividend) - (quotient) * (divisor) ); \
+ if ( (remainder) < 0 ) \
+ { \
+ (quotient)--; \
+ (remainder) += (type)(divisor); \
+ } \
+ FT_END_STMNT
+#endif /* __arm__ */
+
+
/*************************************************************************/
/* */
/* TYPE DEFINITIONS */
@@ -312,7 +379,7 @@ typedef ptrdiff_t FT_PtrDist;
#endif /* PIXEL_BITS >= 8 */
- /* maximal number of gray spans in a call to the span callback */
+ /* maximum number of gray spans in a call to the span callback */
#define FT_MAX_GRAY_SPANS 32
@@ -328,8 +395,18 @@ typedef ptrdiff_t FT_PtrDist;
} TCell;
+#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
+ /* We disable the warning `structure was padded due to */
+ /* __declspec(align())' in order to compile cleanly with */
+ /* the maximum level of warnings. */
+#pragma warning( push )
+#pragma warning( disable : 4324 )
+#endif /* _MSC_VER */
+
typedef struct gray_TWorker_
{
+ ft_jmp_buf jump_buffer;
+
TCoord ex, ey;
TPos min_ex, max_ex;
TPos min_ey, max_ey;
@@ -365,8 +442,6 @@ typedef ptrdiff_t FT_PtrDist;
int band_size;
int band_shoot;
- ft_jmp_buf jump_buffer;
-
void* buffer;
long buffer_size;
@@ -375,6 +450,10 @@ typedef ptrdiff_t FT_PtrDist;
} gray_TWorker, *gray_PWorker;
+#if defined( _MSC_VER )
+#pragma warning( pop )
+#endif
+
#ifndef FT_STATIC_RASTER
#define ras (*worker)
@@ -506,7 +585,7 @@ typedef ptrdiff_t FT_PtrDist;
static void
gray_record_cell( RAS_ARG )
{
- if ( !ras.invalid && ( ras.area | ras.cover ) )
+ if ( ras.area | ras.cover )
{
PCell cell = gray_find_cell( RAS_VAR );
@@ -555,10 +634,10 @@ typedef ptrdiff_t FT_PtrDist;
ras.area = 0;
ras.cover = 0;
+ ras.ex = ex;
+ ras.ey = ey;
}
- ras.ex = ex;
- ras.ey = ey;
ras.invalid = ( (unsigned)ey >= (unsigned)ras.count_ey ||
ex >= ras.count_ex );
}
@@ -600,7 +679,7 @@ typedef ptrdiff_t FT_PtrDist;
TPos x2,
TCoord y2 )
{
- TCoord ex1, ex2, fx1, fx2, delta, mod, lift, rem;
+ TCoord ex1, ex2, fx1, fx2, delta, mod;
long p, first, dx;
int incr;
@@ -644,13 +723,7 @@ typedef ptrdiff_t FT_PtrDist;
dx = -dx;
}
- delta = (TCoord)( p / dx );
- mod = (TCoord)( p % dx );
- if ( mod < 0 )
- {
- delta--;
- mod += (TCoord)dx;
- }
+ FT_DIV_MOD( TCoord, p, dx, delta, mod );
ras.area += (TArea)(( fx1 + first ) * delta);
ras.cover += delta;
@@ -661,14 +734,11 @@ typedef ptrdiff_t FT_PtrDist;
if ( ex1 != ex2 )
{
- p = ONE_PIXEL * ( y2 - y1 + delta );
- lift = (TCoord)( p / dx );
- rem = (TCoord)( p % dx );
- if ( rem < 0 )
- {
- lift--;
- rem += (TCoord)dx;
- }
+ TCoord lift, rem;
+
+
+ p = ONE_PIXEL * ( y2 - y1 + delta );
+ FT_DIV_MOD( TCoord, p, dx, lift, rem );
mod -= (int)dx;
@@ -718,9 +788,6 @@ typedef ptrdiff_t FT_PtrDist;
dx = to_x - ras.x;
dy = to_y - ras.y;
- /* XXX: we should do something about the trivial case where dx == 0, */
- /* as it happens very often! */
-
/* perform vertical clipping */
{
TCoord min, max;
@@ -799,13 +866,7 @@ typedef ptrdiff_t FT_PtrDist;
dy = -dy;
}
- delta = (int)( p / dy );
- mod = (int)( p % dy );
- if ( mod < 0 )
- {
- delta--;
- mod += (TCoord)dy;
- }
+ FT_DIV_MOD( int, p, dy, delta, mod );
x = ras.x + delta;
gray_render_scanline( RAS_VAR_ ey1, ras.x, fy1, x, (TCoord)first );
@@ -816,13 +877,7 @@ typedef ptrdiff_t FT_PtrDist;
if ( ey1 != ey2 )
{
p = ONE_PIXEL * dx;
- lift = (int)( p / dy );
- rem = (int)( p % dy );
- if ( rem < 0 )
- {
- lift--;
- rem += (int)dy;
- }
+ FT_DIV_MOD( int, p, dy, lift, rem );
mod -= (int)dy;
while ( ey1 != ey2 )
@@ -1036,37 +1091,10 @@ typedef ptrdiff_t FT_PtrDist;
/* 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;
+ dx = dx_ = arc[3].x - arc[0].x;
+ dy = dy_ = arc[3].y - arc[0].y;
+
+ L = FT_HYPOT( dx_, dy_ );
/* Avoid possible arithmetic overflow below by splitting. */
if ( L > 32767 )
@@ -1091,11 +1119,11 @@ typedef ptrdiff_t FT_PtrDist;
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 )
+ /* Split super curvy segments where the off points are so far
+ from the chord that the angles P0-P1-P3 or P0-P2-P3 become
+ acute as detected by appropriate dot products. */
+ if ( dx1 * ( dx1 - dx ) + dy1 * ( dy1 - dy ) > 0 ||
+ dx2 * ( dx2 - dx ) + dy2 * ( dy2 - dy ) > 0 )
goto Split;
/* No reason to split. */
@@ -1126,7 +1154,8 @@ typedef ptrdiff_t FT_PtrDist;
/* record current cell, if any */
- gray_record_cell( RAS_VAR );
+ if ( !ras.invalid )
+ gray_record_cell( RAS_VAR );
/* start to a new position */
x = UPSCALE( to->x );
@@ -1227,9 +1256,7 @@ typedef ptrdiff_t FT_PtrDist;
TPos area,
TCoord acount )
{
- FT_Span* span;
- int count;
- int coverage;
+ int coverage;
/* compute the coverage line's coverage, depending on the */
@@ -1271,6 +1298,10 @@ typedef ptrdiff_t FT_PtrDist;
if ( coverage )
{
+ FT_Span* span;
+ int count;
+
+
/* see whether we can add this span to the current list */
count = ras.num_gray_spans;
span = ras.gray_spans + count - 1;
@@ -1309,7 +1340,6 @@ typedef ptrdiff_t FT_PtrDist;
ras.num_gray_spans = 0;
ras.span_y = (int)y;
- count = 0;
span = ras.gray_spans;
}
else
@@ -1400,7 +1430,26 @@ typedef ptrdiff_t FT_PtrDist;
ras.render_span( ras.span_y, ras.num_gray_spans,
ras.gray_spans, ras.render_span_data );
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+ if ( ras.num_gray_spans > 0 )
+ {
+ FT_Span* span;
+ int n;
+
+
+ FT_TRACE7(( "y = %3d ", ras.span_y ));
+ span = ras.gray_spans;
+ for ( n = 0; n < ras.num_gray_spans; n++, span++ )
+ FT_TRACE7(( "[%d..%d]:%02x ",
+ span->x, span->x + span->len - 1, span->coverage ));
+ FT_TRACE7(( "\n" ));
+ }
+
FT_TRACE7(( "gray_sweep: end\n" ));
+
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
}
@@ -1466,8 +1515,11 @@ typedef ptrdiff_t FT_PtrDist;
TPos delta;
- if ( !outline || !func_interface )
- return ErrRaster_Invalid_Argument;
+ if ( !outline )
+ return FT_THROW( Invalid_Outline );
+
+ if ( !func_interface )
+ return FT_THROW( Invalid_Argument );
shift = func_interface->shift;
delta = func_interface->delta;
@@ -1680,7 +1732,7 @@ typedef ptrdiff_t FT_PtrDist;
return error;
Invalid_Outline:
- return ErrRaster_Invalid_Outline;
+ return FT_THROW( Invalid_Outline );
}
#endif /* _STANDALONE_ */
@@ -1715,10 +1767,11 @@ typedef ptrdiff_t FT_PtrDist;
if ( ft_setjmp( ras.jump_buffer ) == 0 )
{
error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras );
- gray_record_cell( RAS_VAR );
+ if ( !ras.invalid )
+ gray_record_cell( RAS_VAR );
}
else
- error = ErrRaster_Memory_Overflow;
+ error = FT_THROW( Memory_Overflow );
return error;
}
@@ -1871,21 +1924,21 @@ typedef ptrdiff_t FT_PtrDist;
if ( !raster || !raster->buffer || !raster->buffer_size )
- return ErrRaster_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( !outline )
- return ErrRaster_Invalid_Outline;
+ return FT_THROW( Invalid_Outline );
/* return immediately if the outline is empty */
if ( outline->n_points == 0 || outline->n_contours <= 0 )
return 0;
if ( !outline->contours || !outline->points )
- return ErrRaster_Invalid_Outline;
+ return FT_THROW( Invalid_Outline );
if ( outline->n_points !=
outline->contours[outline->n_contours - 1] + 1 )
- return ErrRaster_Invalid_Outline;
+ return FT_THROW( Invalid_Outline );
worker = raster->worker;
@@ -1893,19 +1946,19 @@ typedef ptrdiff_t FT_PtrDist;
if ( !( params->flags & FT_RASTER_FLAG_DIRECT ) )
{
if ( !target_map )
- return ErrRaster_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* nothing to do */
if ( !target_map->width || !target_map->rows )
return 0;
if ( !target_map->buffer )
- return ErrRaster_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
}
/* this version does not support monochrome rendering */
if ( !( params->flags & FT_RASTER_FLAG_AA ) )
- return ErrRaster_Invalid_Mode;
+ return FT_THROW( Invalid_Mode );
/* compute clipping box */
if ( !( params->flags & FT_RASTER_FLAG_DIRECT ) )
@@ -2047,12 +2100,26 @@ typedef ptrdiff_t FT_PtrDist;
}
+ static int
+ gray_raster_set_mode( FT_Raster raster,
+ unsigned long mode,
+ void* args )
+ {
+ FT_UNUSED( raster );
+ FT_UNUSED( mode );
+ FT_UNUSED( args );
+
+
+ return 0; /* nothing to do */
+ }
+
+
FT_DEFINE_RASTER_FUNCS(ft_grays_raster,
FT_GLYPH_FORMAT_OUTLINE,
(FT_Raster_New_Func) gray_raster_new,
(FT_Raster_Reset_Func) gray_raster_reset,
- (FT_Raster_Set_Mode_Func)0,
+ (FT_Raster_Set_Mode_Func)gray_raster_set_mode,
(FT_Raster_Render_Func) gray_raster_render,
(FT_Raster_Done_Func) gray_raster_done
)
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index 00499cc..4e2dee5 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -4,7 +4,7 @@
/* */
/* Anti-aliasing renderer interface (body). */
/* */
-/* Copyright 2000-2006, 2009-2012 by */
+/* Copyright 2000-2006, 2009-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -61,12 +61,12 @@
const FT_Matrix* matrix,
const FT_Vector* delta )
{
- FT_Error error = Smooth_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( slot->format != render->glyph_format )
{
- error = Smooth_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -103,97 +103,79 @@
FT_Render_Mode required_mode )
{
FT_Error error;
- FT_Outline* outline = NULL;
+ FT_Outline* outline = &slot->outline;
+ FT_Bitmap* bitmap = &slot->bitmap;
+ FT_Memory memory = render->root.memory;
FT_BBox cbox;
+ FT_Pos x_shift = 0;
+ FT_Pos y_shift = 0;
+ FT_Pos x_left, y_top;
FT_Pos width, height, pitch;
#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
FT_Pos height_org, width_org;
#endif
- FT_Bitmap* bitmap;
- FT_Memory memory;
- FT_Int hmul = mode == FT_RENDER_MODE_LCD;
- FT_Int vmul = mode == FT_RENDER_MODE_LCD_V;
- FT_Pos x_shift, y_shift, x_left, y_top;
+ FT_Int hmul = mode == FT_RENDER_MODE_LCD;
+ FT_Int vmul = mode == FT_RENDER_MODE_LCD_V;
FT_Raster_Params params;
+ FT_Bool have_outline_shifted = FALSE;
+ FT_Bool have_buffer = FALSE;
+
/* check glyph image format */
if ( slot->format != render->glyph_format )
{
- error = Smooth_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
/* check mode */
if ( mode != required_mode )
- return Smooth_Err_Cannot_Render_Glyph;
-
- outline = &slot->outline;
+ {
+ error = FT_THROW( Cannot_Render_Glyph );
+ goto Exit;
+ }
- /* translate the outline to the new origin if needed */
if ( origin )
- FT_Outline_Translate( outline, origin->x, origin->y );
+ {
+ x_shift = origin->x;
+ y_shift = origin->y;
+ }
/* compute the control box, and grid fit it */
+ /* taking into account the origin shift */
FT_Outline_Get_CBox( outline, &cbox );
- 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 );
+ cbox.xMin = FT_PIX_FLOOR( cbox.xMin + x_shift );
+ cbox.yMin = FT_PIX_FLOOR( cbox.yMin + y_shift );
+ cbox.xMax = FT_PIX_CEIL( cbox.xMax + x_shift );
+ cbox.yMax = FT_PIX_CEIL( cbox.yMax + y_shift );
- 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 = ( cbox.xMax - cbox.xMin ) >> 6;
+ x_shift -= cbox.xMin;
+ y_shift -= cbox.yMin;
- 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 = ( cbox.yMax - cbox.yMin ) >> 6;
+ x_left = cbox.xMin >> 6;
+ y_top = cbox.yMax >> 6;
- bitmap = &slot->bitmap;
- memory = render->root.memory;
+ width = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6;
+ height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6;
#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 )
- {
- FT_FREE( bitmap->buffer );
- slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
- }
-
- /* allocate new one */
pitch = width;
if ( hmul )
{
- width = width * 3;
- pitch = FT_PAD_CEIL( width, 4 );
+ width *= 3;
+ pitch = FT_PAD_CEIL( width, 4 );
}
if ( vmul )
height *= 3;
- x_shift = (FT_Int) cbox.xMin;
- y_shift = (FT_Int) cbox.yMin;
- x_left = (FT_Int)( cbox.xMin >> 6 );
- y_top = (FT_Int)( cbox.yMax >> 6 );
-
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
if ( slot->library->lcd_filter_func )
@@ -203,34 +185,61 @@
if ( hmul )
{
- x_shift -= 64 * ( extra >> 1 );
+ x_shift += 64 * ( extra >> 1 );
+ x_left -= extra >> 1;
width += 3 * extra;
pitch = FT_PAD_CEIL( width, 4 );
- x_left -= extra >> 1;
}
if ( vmul )
{
- y_shift -= 64 * ( extra >> 1 );
- height += 3 * extra;
+ y_shift += 64 * ( extra >> 1 );
y_top += extra >> 1;
+ height += 3 * extra;
}
}
#endif
-#if FT_UINT_MAX > 0xFFFFU
+ /*
+ * XXX: on 16bit system, we return an error for huge bitmap
+ * to prevent an overflow.
+ */
+ if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX ||
+ x_left < FT_INT_MIN || y_top < FT_INT_MIN )
+ {
+ error = FT_THROW( Invalid_Pixel_Size );
+ goto Exit;
+ }
- /* Required check is ( pitch * height < FT_ULONG_MAX ), */
- /* but we care realistic cases only. Always pitch <= width. */
+ /* Required check is (pitch * height < FT_ULONG_MAX), */
+ /* but we care realistic cases only. Always pitch <= width. */
if ( width > 0x7FFF || height > 0x7FFF )
{
FT_ERROR(( "ft_smooth_render_generic: glyph too large: %u x %u\n",
width, height ));
- return Smooth_Err_Raster_Overflow;
+ error = FT_THROW( Raster_Overflow );
+ goto Exit;
}
-#endif
+ /* release old bitmap buffer */
+ if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
+ {
+ FT_FREE( bitmap->buffer );
+ slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
+ }
+
+ /* allocate new one */
+ if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) )
+ goto Exit;
+ else
+ have_buffer = TRUE;
+
+ slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
+
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
+ slot->bitmap_left = (FT_Int)x_left;
+ slot->bitmap_top = (FT_Int)y_top;
bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
bitmap->num_grays = 256;
@@ -239,12 +248,11 @@
bitmap->pitch = pitch;
/* translate outline to render it into the bitmap */
- FT_Outline_Translate( outline, -x_shift, -y_shift );
-
- if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) )
- goto Exit;
-
- slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
+ if ( x_shift || y_shift )
+ {
+ FT_Outline_Translate( outline, x_shift, y_shift );
+ have_outline_shifted = TRUE;
+ }
/* set up parameters */
params.target = bitmap;
@@ -288,6 +296,9 @@
vec->y /= 3;
}
+ if ( error )
+ goto Exit;
+
if ( slot->library->lcd_filter_func )
slot->library->lcd_filter_func( bitmap, mode, slot->library );
@@ -295,6 +306,8 @@
/* render outline into bitmap */
error = render->raster_render( render->raster, &params );
+ if ( error )
+ goto Exit;
/* expand it horizontally */
if ( hmul )
@@ -346,25 +359,19 @@
#endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
- FT_Outline_Translate( outline, x_shift, y_shift );
+ /* everything is fine; don't deallocate buffer */
+ have_buffer = FALSE;
- /*
- * XXX: on 16bit system, we return an error for huge bitmap
- * to prevent an overflow.
- */
- if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX )
- return Smooth_Err_Invalid_Pixel_Size;
-
- if ( error )
- goto Exit;
-
- slot->format = FT_GLYPH_FORMAT_BITMAP;
- slot->bitmap_left = (FT_Int)x_left;
- slot->bitmap_top = (FT_Int)y_top;
+ error = FT_Err_Ok;
Exit:
- if ( outline && origin )
- FT_Outline_Translate( outline, -origin->x, -origin->y );
+ if ( have_outline_shifted )
+ FT_Outline_Translate( outline, -x_shift, -y_shift );
+ if ( have_buffer )
+ {
+ FT_FREE( bitmap->buffer );
+ slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
+ }
return error;
}
diff --git a/src/smooth/ftspic.c b/src/smooth/ftspic.c
index 601bcf9..67a2b83 100644
--- a/src/smooth/ftspic.c
+++ b/src/smooth/ftspic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for smooth module. */
/* */
-/* Copyright 2009, 2010 by */
+/* Copyright 2009, 2010, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,17 +22,19 @@
#include "ftspic.h"
#include "ftsmerrs.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from ftgrays.c */
void
FT_Init_Class_ft_grays_raster( FT_Raster_Funcs* funcs );
+
void
ft_smooth_renderer_class_pic_free( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Memory memory = library->memory;
+ FT_Memory memory = library->memory;
if ( pic_container->smooth )
@@ -42,6 +44,7 @@
if ( --container->ref_count )
return;
+
FT_FREE( container );
pic_container->smooth = NULL;
}
@@ -52,8 +55,8 @@
ft_smooth_renderer_class_pic_init( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = Smooth_Err_Ok;
- SmoothPIC* container;
+ FT_Error error = FT_Err_Ok;
+ SmoothPIC* container = NULL;
FT_Memory memory = library->memory;
@@ -66,37 +69,45 @@
}
/* allocate pointer, clear and set global container pointer */
- if ( FT_ALLOC ( container, sizeof ( *container ) ) )
+ if ( FT_ALLOC( container, sizeof ( *container ) ) )
return error;
FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->smooth = container;
+
container->ref_count = 1;
- /* initialize pointer table - this is how the module usually expects this data */
+ /* initialize pointer table - */
+ /* this is how the module usually expects this data */
FT_Init_Class_ft_grays_raster( &container->ft_grays_raster );
-/*Exit:*/
- if ( error )
- ft_smooth_renderer_class_pic_free( library );
+
return error;
}
+
/* re-route these init and free functions to the above functions */
- FT_Error ft_smooth_lcd_renderer_class_pic_init( FT_Library library )
+ FT_Error
+ ft_smooth_lcd_renderer_class_pic_init( FT_Library library )
{
return ft_smooth_renderer_class_pic_init( library );
}
- void ft_smooth_lcd_renderer_class_pic_free( FT_Library library )
+
+ void
+ ft_smooth_lcd_renderer_class_pic_free( FT_Library library )
{
ft_smooth_renderer_class_pic_free( library );
}
- FT_Error ft_smooth_lcdv_renderer_class_pic_init( FT_Library library )
+
+ FT_Error
+ ft_smooth_lcdv_renderer_class_pic_init( FT_Library library )
{
return ft_smooth_renderer_class_pic_init( library );
}
- void ft_smooth_lcdv_renderer_class_pic_free( FT_Library library )
+
+ void
+ ft_smooth_lcdv_renderer_class_pic_free( FT_Library library )
{
ft_smooth_renderer_class_pic_free( library );
}
diff --git a/src/smooth/ftspic.h b/src/smooth/ftspic.h
index 4686f5e..334b51c 100644
--- a/src/smooth/ftspic.h
+++ b/src/smooth/ftspic.h
@@ -25,18 +25,23 @@ FT_BEGIN_HEADER
#include FT_INTERNAL_PIC_H
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_GRAYS_RASTER_GET ft_grays_raster
+
+#define FT_GRAYS_RASTER_GET ft_grays_raster
#else /* FT_CONFIG_OPTION_PIC */
- typedef struct SmoothPIC_
+ typedef struct SmoothPIC_
{
- int ref_count;
- FT_Raster_Funcs ft_grays_raster;
+ int ref_count;
+ FT_Raster_Funcs ft_grays_raster;
+
} SmoothPIC;
-#define GET_PIC(lib) ((SmoothPIC*)((lib)->pic_container.smooth))
-#define FT_GRAYS_RASTER_GET (GET_PIC(library)->ft_grays_raster)
+
+#define GET_PIC( lib ) \
+ ( (SmoothPIC*)( (lib)->pic_container.smooth ) )
+#define FT_GRAYS_RASTER_GET ( GET_PIC( library )->ft_grays_raster )
+
/* see ftspic.c for the implementation */
void
diff --git a/src/tools/afblue.pl b/src/tools/afblue.pl
new file mode 100644
index 0000000..60fe696
--- /dev/null
+++ b/src/tools/afblue.pl
@@ -0,0 +1,548 @@
+#! /usr/bin/perl -w
+# -*- Perl -*-
+#
+# afblue.pl
+#
+# Process a blue zone character data file.
+#
+# Copyright 2013, 2014 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.
+
+use strict;
+use warnings;
+use English '-no_match_vars';
+use open ':std', ':encoding(UTF-8)';
+
+
+my $prog = $PROGRAM_NAME;
+$prog =~ s| .* / ||x; # Remove path.
+
+die "usage: $prog datafile < infile > outfile\n" if $#ARGV != 0;
+
+
+my $datafile = $ARGV[0];
+
+my %diversions; # The extracted and massaged data from `datafile'.
+my @else_stack; # Booleans to track else-clauses.
+my @name_stack; # Stack of integers used for names of aux. variables.
+
+my $curr_enum; # Name of the current enumeration.
+my $curr_array; # Name of the current array.
+my $curr_max; # Name of the current maximum value.
+
+my $curr_enum_element; # Name of the current enumeration element.
+my $curr_offset; # The offset relative to current aux. variable.
+my $curr_elem_size; # The size of the current string or block.
+
+my $have_sections = 0; # Boolean; set if start of a section has been seen.
+my $have_strings; # Boolean; set if current section contains strings.
+my $have_blocks; # Boolean; set if current section contains blocks.
+
+my $have_enum_element; # Boolean; set if we have an enumeration element.
+my $in_string; # Boolean; set if a string has been parsed.
+
+my $num_sections = 0; # Number of sections seen so far.
+
+my $last_aux; # Name of last auxiliary variable.
+
+
+# Regular expressions.
+
+# [<ws>] <enum_name> <ws> <array_name> <ws> <max_name> [<ws>] ':' [<ws>] '\n'
+my $section_re = qr/ ^ \s* (\S+) \s+ (\S+) \s+ (\S+) \s* : \s* $ /x;
+
+# [<ws>] <enum_element_name> [<ws>] '\n'
+my $enum_element_re = qr/ ^ \s* ( [A-Za-z0-9_]+ ) \s* $ /x;
+
+# '#' <preprocessor directive> '\n'
+my $preprocessor_re = qr/ ^ \# /x;
+
+# [<ws>] '/' '/' <comment> '\n'
+my $comment_re = qr| ^ \s* // |x;
+
+# empty line
+my $whitespace_only_re = qr/ ^ \s* $ /x;
+
+# [<ws>] '"' <string> '"' [<ws>] '\n' (<string> doesn't contain newlines)
+my $string_re = qr/ ^ \s*
+ " ( (?> (?: (?> [^"\\]+ ) | \\. )* ) ) "
+ \s* $ /x;
+
+# [<ws>] '{' <block> '}' [<ws>] '\n' (<block> can contain newlines)
+my $block_start_re = qr/ ^ \s* \{ /x;
+
+# We need the capturing group for `split' to make it return the separator
+# tokens (i.e., the opening and closing brace) also.
+my $brace_re = qr/ ( [{}] ) /x;
+
+
+sub Warn
+{
+ my $message = shift;
+ warn "$datafile:$INPUT_LINE_NUMBER: warning: $message\n";
+}
+
+
+sub Die
+{
+ my $message = shift;
+ die "$datafile:$INPUT_LINE_NUMBER: error: $message\n";
+}
+
+
+my $warned_before = 0;
+
+sub warn_before
+{
+ Warn("data before first section gets ignored") unless $warned_before;
+ $warned_before = 1;
+}
+
+
+sub strip_newline
+{
+ chomp;
+ s/ \x0D $ //x;
+}
+
+
+sub end_curr_string
+{
+ # Append final null byte to string.
+ if ($have_strings)
+ {
+ push @{$diversions{$curr_array}}, " '\\0',\n" if $in_string;
+
+ $curr_offset++;
+ $in_string = 0;
+ }
+}
+
+
+sub update_max_elem_size
+{
+ if ($curr_elem_size)
+ {
+ my $max = pop @{$diversions{$curr_max}};
+ $max = $curr_elem_size if $curr_elem_size > $max;
+ push @{$diversions{$curr_max}}, $max;
+ }
+}
+
+
+sub convert_non_ascii_char
+{
+ # A UTF-8 character outside of the printable ASCII range, with possibly a
+ # leading backslash character.
+ my $s = shift;
+
+ # Here we count characters, not bytes.
+ $curr_elem_size += length $s;
+
+ utf8::encode($s);
+ $s = uc unpack 'H*', $s;
+
+ $curr_offset += $s =~ s/\G(..)/'\\x$1', /sg;
+
+ return $s;
+}
+
+
+sub convert_ascii_chars
+{
+ # A series of ASCII characters in the printable range.
+ my $s = shift;
+
+ # We ignore spaces.
+ $s =~ s/ //g;
+
+ my $count = $s =~ s/\G(.)/'$1', /g;
+ $curr_offset += $count;
+ $curr_elem_size += $count;
+
+ return $s;
+}
+
+
+sub convert_literal
+{
+ my $s = shift;
+ my $orig = $s;
+
+ # ASCII printables and space
+ my $safe_re = '\x20-\x7E';
+ # ASCII printables and space, no backslash
+ my $safe_no_backslash_re = '\x20-\x5B\x5D-\x7E';
+
+ $s =~ s{
+ (?: \\? ( [^$safe_re] )
+ | ( (?: [$safe_no_backslash_re]
+ | \\ [$safe_re] )+ ) )
+ }
+ {
+ defined($1) ? convert_non_ascii_char($1)
+ : convert_ascii_chars($2)
+ }egx;
+
+ # We assume that `$orig' doesn't contain `*/'
+ return $s . " /* $orig */";
+}
+
+
+sub aux_name
+{
+ return "af_blue_" . $num_sections. "_" . join('_', @name_stack);
+}
+
+
+sub aux_name_next
+{
+ $name_stack[$#name_stack]++;
+ my $name = aux_name();
+ $name_stack[$#name_stack]--;
+
+ return $name;
+}
+
+
+sub enum_val_string
+{
+ # Build string that holds code to save the current offset in an
+ # enumeration element.
+ my $aux = shift;
+
+ my $add = ($last_aux eq "af_blue_" . $num_sections . "_0" )
+ ? ""
+ : "$last_aux + ";
+
+ return " $aux = $add$curr_offset,\n";
+}
+
+
+
+# Process data file.
+
+open(DATA, $datafile) || die "$prog: can't open \`$datafile': $OS_ERROR\n";
+
+while (<DATA>)
+{
+ strip_newline();
+
+ next if /$comment_re/;
+ next if /$whitespace_only_re/;
+
+ if (/$section_re/)
+ {
+ Warn("previous section is empty") if ($have_sections
+ && !$have_strings
+ && !$have_blocks);
+
+ end_curr_string();
+ update_max_elem_size();
+
+ # Save captured groups from `section_re'.
+ $curr_enum = $1;
+ $curr_array = $2;
+ $curr_max = $3;
+
+ $curr_enum_element = "";
+ $curr_offset = 0;
+
+ Warn("overwriting already defined enumeration \`$curr_enum'")
+ if exists($diversions{$curr_enum});
+ Warn("overwriting already defined array \`$curr_array'")
+ if exists($diversions{$curr_array});
+ Warn("overwriting already defined maximum value \`$curr_max'")
+ if exists($diversions{$curr_max});
+
+ $diversions{$curr_enum} = [];
+ $diversions{$curr_array} = [];
+ $diversions{$curr_max} = [];
+
+ push @{$diversions{$curr_max}}, 0;
+
+ @name_stack = ();
+ push @name_stack, 0;
+
+ $have_sections = 1;
+ $have_strings = 0;
+ $have_blocks = 0;
+
+ $have_enum_element = 0;
+ $in_string = 0;
+
+ $num_sections++;
+ $curr_elem_size = 0;
+
+ $last_aux = aux_name();
+
+ next;
+ }
+
+ if (/$preprocessor_re/)
+ {
+ if ($have_sections)
+ {
+ # Having preprocessor conditionals complicates the computation of
+ # correct offset values. We have to introduce auxiliary enumeration
+ # elements with the name `af_blue_<s>_<n1>_<n2>_...' that store
+ # offsets to be used in conditional clauses. `<s>' is the number of
+ # sections seen so far, `<n1>' is the number of `#if' and `#endif'
+ # conditionals seen so far in the topmost level, `<n2>' the number of
+ # `#if' and `#endif' conditionals seen so far one level deeper, etc.
+ # As a consequence, uneven values are used within a clause, and even
+ # values after a clause, since the C standard doesn't allow the
+ # redefinition of an enumeration value. For example, the name
+ # `af_blue_5_1_6' is used to construct enumeration values in the fifth
+ # section after the third (second-level) if-clause within the first
+ # (top-level) if-clause. After the first top-level clause has
+ # finished, `af_blue_5_2' is used. The current offset is then
+ # relative to the value stored in the current auxiliary element.
+
+ if (/ ^ \# \s* if /x)
+ {
+ push @else_stack, 0;
+
+ $name_stack[$#name_stack]++;
+
+ push @{$diversions{$curr_enum}}, enum_val_string(aux_name());
+ $last_aux = aux_name();
+
+ push @name_stack, 0;
+
+ $curr_offset = 0;
+ }
+ elsif (/ ^ \# \s* elif /x)
+ {
+ Die("unbalanced #elif") unless @else_stack;
+
+ pop @name_stack;
+
+ push @{$diversions{$curr_enum}}, enum_val_string(aux_name_next());
+ $last_aux = aux_name();
+
+ push @name_stack, 0;
+
+ $curr_offset = 0;
+ }
+ elsif (/ ^ \# \s* else /x)
+ {
+ my $prev_else = pop @else_stack;
+ Die("unbalanced #else") unless defined($prev_else);
+ Die("#else already seen") if $prev_else;
+ push @else_stack, 1;
+
+ pop @name_stack;
+
+ push @{$diversions{$curr_enum}}, enum_val_string(aux_name_next());
+ $last_aux = aux_name();
+
+ push @name_stack, 0;
+
+ $curr_offset = 0;
+ }
+ elsif (/ ^ (\# \s*) endif /x)
+ {
+ my $prev_else = pop @else_stack;
+ Die("unbalanced #endif") unless defined($prev_else);
+
+ pop @name_stack;
+
+ # If there is no else-clause for an if-clause, we add one. This is
+ # necessary to have correct offsets.
+ if (!$prev_else)
+ {
+ # Use amount of whitespace from `endif'.
+ push @{$diversions{$curr_enum}}, enum_val_string(aux_name_next())
+ . $1 . "else\n";
+ $last_aux = aux_name();
+
+ $curr_offset = 0;
+ }
+
+ $name_stack[$#name_stack]++;
+
+ push @{$diversions{$curr_enum}}, enum_val_string(aux_name());
+ $last_aux = aux_name();
+
+ $curr_offset = 0;
+ }
+
+ # Handle (probably continued) preprocessor lines.
+ CONTINUED_LOOP:
+ {
+ do
+ {
+ strip_newline();
+
+ push @{$diversions{$curr_enum}}, $ARG . "\n";
+ push @{$diversions{$curr_array}}, $ARG . "\n";
+
+ last CONTINUED_LOOP unless / \\ $ /x;
+
+ } while (<DATA>);
+ }
+ }
+ else
+ {
+ warn_before();
+ }
+
+ next;
+ }
+
+ if (/$enum_element_re/)
+ {
+ end_curr_string();
+ update_max_elem_size();
+
+ $curr_enum_element = $1;
+ $have_enum_element = 1;
+ $curr_elem_size = 0;
+
+ next;
+ }
+
+ if (/$string_re/)
+ {
+ if ($have_sections)
+ {
+ Die("strings and blocks can't be mixed in a section") if $have_blocks;
+
+ # Save captured group from `string_re'.
+ my $string = $1;
+
+ if ($have_enum_element)
+ {
+ push @{$diversions{$curr_enum}}, enum_val_string($curr_enum_element);
+ $have_enum_element = 0;
+ }
+
+ $string = convert_literal($string);
+
+ push @{$diversions{$curr_array}}, " $string\n";
+
+ $have_strings = 1;
+ $in_string = 1;
+ }
+ else
+ {
+ warn_before();
+ }
+
+ next;
+ }
+
+ if (/$block_start_re/)
+ {
+ if ($have_sections)
+ {
+ Die("strings and blocks can't be mixed in a section") if $have_strings;
+
+ my $depth = 0;
+ my $block = "";
+ my $block_end = 0;
+
+ # Count braces while getting the block.
+ BRACE_LOOP:
+ {
+ do
+ {
+ strip_newline();
+
+ foreach my $substring (split(/$brace_re/))
+ {
+ if ($block_end)
+ {
+ Die("invalid data after last matching closing brace")
+ if $substring !~ /$whitespace_only_re/;
+ }
+
+ $block .= $substring;
+
+ if ($substring eq '{')
+ {
+ $depth++;
+ }
+ elsif ($substring eq '}')
+ {
+ $depth--;
+
+ $block_end = 1 if $depth == 0;
+ }
+ }
+
+ # If we are here, we have run out of substrings, so get next line
+ # or exit.
+ last BRACE_LOOP if $block_end;
+
+ $block .= "\n";
+
+ } while (<DATA>);
+ }
+
+ if ($have_enum_element)
+ {
+ push @{$diversions{$curr_enum}}, enum_val_string($curr_enum_element);
+ $have_enum_element = 0;
+ }
+
+ push @{$diversions{$curr_array}}, $block . ",\n";
+
+ $curr_offset++;
+ $curr_elem_size++;
+
+ $have_blocks = 1;
+ }
+ else
+ {
+ warn_before();
+ }
+
+ next;
+ }
+
+ # Garbage. We weren't able to parse the data.
+ Die("syntax error");
+}
+
+# Finalize data.
+end_curr_string();
+update_max_elem_size();
+
+
+# Filter stdin to stdout, replacing `@...@' templates.
+
+sub emit_diversion
+{
+ my $diversion_name = shift;
+ return (exists($diversions{$1})) ? "@{$diversions{$1}}"
+ : "@" . $diversion_name . "@";
+}
+
+
+$LIST_SEPARATOR = '';
+
+my $s1 = "This file has been generated by the Perl script \`$prog',";
+my $s1len = length $s1;
+my $s2 = "using data from file \`$datafile'.";
+my $s2len = length $s2;
+my $slen = ($s1len > $s2len) ? $s1len : $s2len;
+
+print "/* " . $s1 . " " x ($slen - $s1len) . " */\n"
+ . "/* " . $s2 . " " x ($slen - $s2len) . " */\n"
+ . "\n";
+
+while (<STDIN>)
+{
+ s/ @ ( [A-Za-z0-9_]+? ) @ / emit_diversion($1) /egx;
+ print;
+}
+
+# EOF
diff --git a/src/tools/apinames.c b/src/tools/apinames.c
index 3dc6559..c85df72 100644
--- a/src/tools/apinames.c
+++ b/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-2012
+ * Author: David Turner, 2005, 2006, 2008-2013
*
* This code is explicitly placed into the public domain.
*
@@ -22,7 +22,7 @@
#include <ctype.h>
#define PROGRAM_NAME "apinames"
-#define PROGRAM_VERSION "0.1"
+#define PROGRAM_VERSION "0.2"
#define LINEBUFF_SIZE 1024
@@ -31,7 +31,8 @@ typedef enum OutputFormat_
OUTPUT_LIST = 0, /* output the list of names, one per line */
OUTPUT_WINDOWS_DEF, /* output a Windows .DEF file for Visual C++ or Mingw */
OUTPUT_BORLAND_DEF, /* output a Windows .DEF file for Borland C++ */
- OUTPUT_WATCOM_LBC /* output a Watcom Linker Command File */
+ OUTPUT_WATCOM_LBC, /* output a Watcom Linker Command File */
+ OUTPUT_NETWARE_IMP /* output a NetWare ImportFile */
} OutputFormat;
@@ -154,8 +155,6 @@ names_dump( FILE* out,
case OUTPUT_WATCOM_LBC:
{
- /* we must omit the .dll suffix from the library name */
- char temp[512];
const char* dot;
@@ -166,10 +165,12 @@ names_dump( FILE* out,
exit( 4 );
}
+ /* we must omit the .dll suffix from the library name */
dot = strchr( dll_name, '.' );
if ( dot != NULL )
{
- int len = dot - dll_name;
+ char temp[512];
+ int len = dot - dll_name;
if ( len > (int)( sizeof ( temp ) - 1 ) )
@@ -187,6 +188,16 @@ names_dump( FILE* out,
}
break;
+ case OUTPUT_NETWARE_IMP:
+ {
+ if ( dll_name != NULL )
+ fprintf( out, " (%s)\n", dll_name );
+ for ( nn = 0; nn < num_names - 1; nn++ )
+ fprintf( out, " %s,\n", the_names[nn].name );
+ fprintf( out, " %s\n", the_names[num_names - 1].name );
+ }
+ break;
+
default: /* LIST */
for ( nn = 0; nn < num_names; nn++ )
fprintf( out, "%s\n", the_names[nn].name );
@@ -311,6 +322,7 @@ usage( void )
" -w : output .DEF file for Visual C++ and Mingw\n"
" -wB : output .DEF file for Borland C++\n"
" -wW : output Watcom Linker Response File\n"
+ " -wN : output NetWare Import File\n"
"\n";
fprintf( stderr,
@@ -394,6 +406,10 @@ int main( int argc, const char* const* argv )
format = OUTPUT_WATCOM_LBC;
break;
+ case 'N':
+ format = OUTPUT_NETWARE_IMP;
+ break;
+
case 0:
break;
diff --git a/src/tools/chktrcmp.py b/src/tools/chktrcmp.py
index d0f342e..ce6500c 100755
--- a/src/tools/chktrcmp.py
+++ b/src/tools/chktrcmp.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#
# Check trace components in FreeType 2 source.
-# Author: suzuki toshiya, 2009
+# Author: suzuki toshiya, 2009, 2013
#
# This code is explicitly into the public domain.
@@ -15,7 +15,7 @@ USED_COMPONENT = {}
KNOWN_COMPONENT = {}
SRC_FILE_DIRS = [ "src" ]
-TRACE_DEF_FILES = [ "include/freetype/internal/fttrace.h" ]
+TRACE_DEF_FILES = [ "include/internal/fttrace.h" ]
# --------------------------------------------------------------
diff --git a/src/tools/cordic.py b/src/tools/cordic.py
index 3f80c5f..6742c90 100644
--- a/src/tools/cordic.py
+++ b/src/tools/cordic.py
@@ -2,65 +2,20 @@
import sys, math
#units = 64*65536.0 # don't change !!
-units = 256
+units = 180 * 2**16
scale = units/math.pi
shrink = 1.0
comma = ""
-def calc_val( x ):
- global units, shrink
- angle = math.atan(x)
- shrink = shrink * math.cos(angle)
- return angle/math.pi * units
-
-def print_val( n, x ):
- global comma
-
- lo = int(x)
- hi = lo + 1
- alo = math.atan(lo)
- ahi = math.atan(hi)
- ax = math.atan(2.0**n)
-
- errlo = abs( alo - ax )
- errhi = abs( ahi - ax )
-
- if ( errlo < errhi ):
- hi = lo
-
- sys.stdout.write( comma + repr( int(hi) ) )
- comma = ", "
-
-
print ""
print "table of arctan( 1/2^n ) for PI = " + repr(units/65536.0) + " units"
-# compute range of "i"
-r = [-1]
-r = r + range(32)
-
-for n in r:
-
- if n >= 0:
- x = 1.0/(2.0**n) # tangent value
- else:
- x = 2.0**(-n)
+for n in range(1,32):
- angle = math.atan(x) # arctangent
- angle2 = angle*scale # arctangent in FT_Angle units
+ x = 0.5**n # tangent value
- # determine which integer value for angle gives the best tangent
- lo = int(angle2)
- hi = lo + 1
- tlo = math.tan(lo/scale)
- thi = math.tan(hi/scale)
-
- errlo = abs( tlo - x )
- errhi = abs( thi - x )
-
- angle2 = hi
- if errlo < errhi:
- angle2 = lo
+ angle = math.atan(x) # arctangent
+ angle2 = round(angle*scale) # arctangent in FT_Angle units
if angle2 <= 0:
break
@@ -68,12 +23,11 @@ for n in r:
sys.stdout.write( comma + repr( int(angle2) ) )
comma = ", "
- shrink = shrink * math.cos( angle2/scale)
-
+ shrink /= math.sqrt( 1 + x*x )
print
print "shrink factor = " + repr( shrink )
-print "shrink factor 2 = " + repr( shrink * (2.0**32) )
-print "expansion factor = " + repr(1/shrink)
+print "shrink factor 2 = " + repr( int( shrink * (2**32) ) )
+print "expansion factor = " + repr( 1/shrink )
print ""
diff --git a/src/tools/docmaker/content.py b/src/tools/docmaker/content.py
index b398955..adea6f1 100644
--- a/src/tools/docmaker/content.py
+++ b/src/tools/docmaker/content.py
@@ -1,57 +1,81 @@
-# Content (c) 2002, 2004, 2006, 2007, 2008, 2009
-# David Turner <david@freetype.org>
#
-# This file contains routines used to parse the content of documentation
-# comment blocks and build more structured objects out of them.
+# content.py
#
+# Parse comment blocks to build content blocks (library file).
+#
+# Copyright 2002, 2004, 2006-2009, 2012-2014 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
+# 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 routines to parse documentation comment blocks,
+# building more structured objects out of them.
+#
+
from sources import *
-from utils import *
+from utils import *
+
import string, re
-# this regular expression is used to detect code sequences. these
-# are simply code fragments embedded in '{' and '}' like in:
#
-# {
-# x = y + z;
-# if ( zookoo == 2 )
-# {
-# foobar();
-# }
-# }
+# Regular expressions to detect code sequences. `Code sequences' are simply
+# code fragments embedded in '{' and '}', as demonstrated in the following
+# example.
+#
+# {
+# x = y + z;
+# if ( zookoo == 2 )
+# {
+# foobar();
+# }
+# }
#
-# note that indentation of the starting and ending accolades must be
-# exactly the same. the code sequence can contain accolades at greater
-# indentation
+# Note that the indentation of the first opening brace and the last closing
+# brace must be exactly the same. The code sequence itself should have a
+# larger indentation than the surrounding braces.
#
re_code_start = re.compile( r"(\s*){\s*$" )
re_code_end = re.compile( r"(\s*)}\s*$" )
-# this regular expression is used to isolate identifiers from
-# other text
#
-re_identifier = re.compile( r'(\w*)' )
-
-
-# we collect macros ending in `_H'; while outputting the object data, we use
-# this info together with the object's file location to emit the appropriate
-# header file macro and name before the object itself
+# A regular expression to isolate identifiers from other text.
#
-re_header_macro = re.compile( r'^#define\s{1,}(\w{1,}_H)\s{1,}<(.*)>' )
+re_identifier = re.compile( r'((?:\w|-)*)' )
-#############################################################################
#
-# The DocCode class is used to store source code lines.
+# We collect macro names ending in `_H' (group 1), as defined in
+# `config/ftheader.h'. While outputting the object data, we use this info
+# together with the object's file location (group 2) to emit the appropriate
+# header file macro and its associated file name before the object itself.
#
-# 'self.lines' contains a set of source code lines that will be dumped as
-# HTML in a <PRE> tag.
+# Example:
#
-# The object is filled line by line by the parser; it strips the leading
-# "margin" space from each input line before storing it in 'self.lines'.
+# #define FT_FREETYPE_H <freetype.h>
#
+re_header_macro = re.compile( r'^#define\s{1,}(\w{1,}_H)\s{1,}<(.*)>' )
+
+
+################################################################
+##
+## DOC CODE CLASS
+##
+## The `DocCode' class is used to store source code lines.
+##
+## `self.lines' contains a set of source code lines that will be dumped as
+## HTML in a <PRE> tag.
+##
+## The object is filled line by line by the parser; it strips the leading
+## `margin' space from each input line before storing it in `self.lines'.
+##
class DocCode:
def __init__( self, margin, lines ):
@@ -77,12 +101,14 @@ class DocCode:
-#############################################################################
-#
-# The DocPara class is used to store "normal" text paragraph.
-#
-# 'self.words' contains the list of words that make up the paragraph
-#
+################################################################
+##
+## DOC PARA CLASS
+##
+## `Normal' text paragraphs are stored in the `DocPara' class.
+##
+## `self.words' contains the list of words that make up the paragraph.
+##
class DocPara:
def __init__( self, lines ):
@@ -123,17 +149,18 @@ class DocPara:
return result
-
-#############################################################################
-#
-# The DocField class is used to store a list containing either DocPara or
-# DocCode objects. Each DocField also has an optional "name" which is used
-# when the object corresponds to a field or value definition
-#
+################################################################
+##
+## DOC FIELD CLASS
+##
+## The `DocField' class stores a list containing either `DocPara' or
+## `DocCode' objects. Each DocField object also has an optional `name'
+## that is used when the object corresponds to a field or value definition.
+##
class DocField:
def __init__( self, name, lines ):
- self.name = name # can be None for normal paragraphs/sources
+ self.name = name # can be `None' for normal paragraphs/sources
self.items = [] # list of items
mode_none = 0 # start parsing mode
@@ -143,14 +170,14 @@ class DocField:
margin = -1 # current code sequence indentation
cur_lines = []
- # now analyze the markup lines to see if they contain paragraphs,
- # code sequences or fields definitions
+ # analyze the markup lines to check whether they contain paragraphs,
+ # code sequences, or fields definitions
#
start = 0
mode = mode_none
for l in lines:
- # are we parsing a code sequence ?
+ # are we parsing a code sequence?
if mode == mode_code:
m = re_code_end.match( l )
if m and len( m.group( 1 ) ) <= margin:
@@ -161,10 +188,10 @@ class DocField:
cur_lines = []
mode = mode_none
else:
- # nope, continue the code sequence
+ # otherwise continue the code sequence
cur_lines.append( l[margin:] )
else:
- # start of code sequence ?
+ # start of code sequence?
m = re_code_start.match( l )
if m:
# save current lines
@@ -222,13 +249,29 @@ class DocField:
return result
-
-# this regular expression is used to detect field definitions
#
-re_field = re.compile( r"\s*(\w*|\w(\w|\.)*\w)\s*::" )
-
-
-
+# A regular expression to detect field definitions.
+#
+# Examples:
+#
+# foo ::
+# foo.bar ::
+#
+re_field = re.compile( r"""
+ \s*
+ (
+ \w*
+ |
+ \w (\w | \.)* \w
+ )
+ \s* ::
+ """, re.VERBOSE )
+
+
+################################################################
+##
+## DOC MARKUP CLASS
+##
class DocMarkup:
def __init__( self, tag, lines ):
@@ -242,7 +285,7 @@ class DocMarkup:
for l in lines:
m = re_field.match( l )
if m:
- # we detected the start of a new field definition
+ # We detected the start of a new field definition.
# first, save the current one
if cur_lines:
@@ -268,15 +311,6 @@ class DocMarkup:
except:
return None
- def get_start( self ):
- try:
- result = ""
- for word in self.fields[0].items[0].words:
- result = result + " " + word
- return result[1:]
- except:
- return "ERROR"
-
def dump( self, margin ):
print " " * margin + "<" + self.tag + ">"
for f in self.fields:
@@ -284,7 +318,10 @@ class DocMarkup:
print " " * margin + "</" + self.tag + ">"
-
+################################################################
+##
+## DOC CHAPTER CLASS
+##
class DocChapter:
def __init__( self, block ):
@@ -300,7 +337,10 @@ class DocChapter:
self.order = []
-
+################################################################
+##
+## DOC SECTION CLASS
+##
class DocSection:
def __init__( self, name = "Other" ):
@@ -329,18 +369,21 @@ class DocSection:
self.title = title
self.abstract = block.get_markup_words( "abstract" )
self.description = block.get_markup_items( "description" )
- self.order = block.get_markup_words( "order" )
+ self.order = block.get_markup_words_all( "order" )
return
def reorder( self ):
self.block_names = sort_order_list( self.block_names, self.order )
-
+################################################################
+##
+## CONTENT PROCESSOR CLASS
+##
class ContentProcessor:
def __init__( self ):
- """initialize a block content processor"""
+ """Initialize a block content processor."""
self.reset()
self.sections = {} # dictionary of documentation sections
@@ -351,8 +394,8 @@ class ContentProcessor:
self.headers = {} # dictionary of header macros
def set_section( self, section_name ):
- """set current section during parsing"""
- if not self.sections.has_key( section_name ):
+ """Set current section during parsing."""
+ if not section_name in self.sections:
section = DocSection( section_name )
self.sections[section_name] = section
self.section = section
@@ -363,15 +406,14 @@ class ContentProcessor:
chapter = DocChapter( block )
self.chapters.append( chapter )
-
def reset( self ):
- """reset the content processor for a new block"""
+ """Reset the content processor for a new block."""
self.markups = []
self.markup = None
self.markup_lines = []
def add_markup( self ):
- """add a new markup section"""
+ """Add a new markup section."""
if self.markup and self.markup_lines:
# get rid of last line of markup if it's empty
@@ -387,8 +429,8 @@ class ContentProcessor:
self.markup_lines = []
def process_content( self, content ):
- """process a block content and return a list of DocMarkup objects
- corresponding to it"""
+ """Process a block content and return a list of DocMarkup objects
+ corresponding to it."""
markup = None
markup_lines = []
first = 1
@@ -446,7 +488,7 @@ class ContentProcessor:
# listed there
for chap in self.chapters:
for sec in chap.order:
- if self.sections.has_key( sec ):
+ if sec in self.sections:
section = self.sections[sec]
section.chapter = chap
section.reorder()
@@ -461,6 +503,7 @@ class ContentProcessor:
others = []
for sec in self.sections.values():
if not sec.chapter:
+ sec.reorder()
others.append( sec )
# create a new special chapter for all remaining sections
@@ -472,7 +515,10 @@ class ContentProcessor:
self.chapters.append( chap )
-
+################################################################
+##
+## DOC BLOCK CLASS
+##
class DocBlock:
def __init__( self, source, follow, processor ):
@@ -549,24 +595,31 @@ class DocBlock:
return self.source.location()
def get_markup( self, tag_name ):
- """return the DocMarkup corresponding to a given tag in a block"""
+ """Return the DocMarkup corresponding to a given tag in a block."""
for m in self.markups:
if m.tag == string.lower( tag_name ):
return m
return None
- def get_markup_name( self, tag_name ):
- """return the name of a given primary markup in a block"""
+ def get_markup_words( self, tag_name ):
try:
m = self.get_markup( tag_name )
- return m.get_name()
+ return m.fields[0].items[0].words
except:
- return None
+ return []
- def get_markup_words( self, tag_name ):
+ def get_markup_words_all( self, tag_name ):
try:
m = self.get_markup( tag_name )
- return m.fields[0].items[0].words
+ words = []
+ for item in m.fields[0].items:
+ # We honour empty lines in an `<Order>' section element by
+ # adding the sentinel `/empty/'. The formatter should then
+ # convert it to an appropriate representation in the
+ # `section_enter' function.
+ words += item.words
+ words.append( "/empty/" )
+ return words
except:
return []
diff --git a/src/tools/docmaker/docmaker.py b/src/tools/docmaker/docmaker.py
index 1d9de9f..4fb1abf 100644
--- a/src/tools/docmaker/docmaker.py
+++ b/src/tools/docmaker/docmaker.py
@@ -1,16 +1,26 @@
#!/usr/bin/env python
#
-# DocMaker (c) 2002, 2004, 2008 David Turner <david@freetype.org>
+# docmaker.py
#
-# This program is a re-write of the original DocMaker took used
-# to generate the API Reference of the FreeType font engine
-# by converting in-source comments into structured HTML.
+# Convert source code markup to HTML documentation.
#
-# This new version is capable of outputting XML data, as well
-# as accepts more liberal formatting options.
+# Copyright 2002, 2004, 2008, 2013, 2014 by
+# David Turner.
#
-# It also uses regular expression matching and substitution
-# to speed things significantly.
+# 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 program is a re-write of the original DocMaker tool used to generate
+# the API Reference of the FreeType font rendering engine by converting
+# in-source comments into structured HTML.
+#
+# This new version is capable of outputting XML data as well as accepting
+# more liberal formatting options. It also uses regular expression matching
+# and substitution to speed up operation significantly.
#
from sources import *
@@ -39,13 +49,13 @@ def usage():
def main( argv ):
- """main program loop"""
+ """Main program loop."""
global output_dir
try:
- opts, args = getopt.getopt( sys.argv[1:], \
- "ht:o:p:", \
+ opts, args = getopt.getopt( sys.argv[1:],
+ "ht:o:p:",
["help", "title=", "output=", "prefix="] )
except getopt.GetoptError:
usage()
@@ -56,7 +66,6 @@ def main( argv ):
sys.exit( 1 )
# process options
- #
project_title = "Project"
project_prefix = None
output_dir = None
@@ -90,7 +99,9 @@ def main( argv ):
# process sections
content_processor.finish()
- formatter = HtmlFormatter( content_processor, project_title, project_prefix )
+ formatter = HtmlFormatter( content_processor,
+ project_title,
+ project_prefix )
formatter.toc_dump()
formatter.index_dump()
@@ -98,9 +109,7 @@ def main( argv ):
# if called from the command line
-#
if __name__ == '__main__':
main( sys.argv )
-
# eof
diff --git a/src/tools/docmaker/formatter.py b/src/tools/docmaker/formatter.py
index f62ce67..7152c01 100644
--- a/src/tools/docmaker/formatter.py
+++ b/src/tools/docmaker/formatter.py
@@ -1,19 +1,37 @@
-# Formatter (c) 2002, 2004, 2007, 2008 David Turner <david@freetype.org>
#
+# formatter.py
+#
+# Convert parsed content blocks to a structured document (library file).
+#
+# Copyright 2002, 2004, 2007, 2008, 2014 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
+# 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 the base Formatter class. Its purpose is to convert a content
+# processor's data into specific documents (i.e., table of contents, global
+# index, and individual API reference indices).
+#
+# You need to sub-class it to output anything sensible. For example, the
+# file `tohtml.py' contains the definition of the `HtmlFormatter' sub-class
+# to output HTML.
+#
+
from sources import *
from content import *
from utils import *
-# This is the base Formatter class. Its purpose is to convert
-# a content processor's data into specific documents (i.e., table of
-# contents, global index, and individual API reference indices).
-#
-# You need to sub-class it to output anything sensible. For example,
-# the file tohtml.py contains the definition of the HtmlFormatter sub-class
-# used to output -- you guessed it -- HTML.
-#
+################################################################
+##
+## FORMATTER CLASS
+##
class Formatter:
def __init__( self, processor ):
@@ -36,20 +54,22 @@ class Formatter:
self.add_identifier( field.name, block )
self.block_index = self.identifiers.keys()
- self.block_index.sort( index_sort )
+ self.block_index.sort( key = index_key )
def add_identifier( self, name, block ):
- if self.identifiers.has_key( name ):
+ if name in self.identifiers:
# duplicate name!
- sys.stderr.write( \
- "WARNING: duplicate definition for '" + name + "' in " + \
- block.location() + ", previous definition in " + \
- self.identifiers[name].location() + "\n" )
+ sys.stderr.write( "WARNING: duplicate definition for"
+ + " '" + name + "' "
+ + "in " + block.location() + ", "
+ + "previous definition in "
+ + self.identifiers[name].location()
+ + "\n" )
else:
self.identifiers[name] = block
#
- # Formatting the table of contents
+ # formatting the table of contents
#
def toc_enter( self ):
pass
@@ -97,7 +117,7 @@ class Formatter:
close_output( output )
#
- # Formatting the index
+ # formatting the index
#
def index_enter( self ):
pass
@@ -128,7 +148,7 @@ class Formatter:
close_output( output )
#
- # Formatting a section
+ # formatting a section
#
def section_enter( self, section ):
pass
@@ -162,7 +182,22 @@ class Formatter:
self.section_enter( section )
for name in section.block_names:
- block = self.identifiers[name]
+ skip_entry = 0
+ try:
+ block = self.identifiers[name]
+ # `block_names' can contain field names also,
+ # which we filter out
+ for markup in block.markups:
+ if markup.tag == 'values':
+ for field in markup.fields:
+ if field.name == name:
+ skip_entry = 1
+ except:
+ skip_entry = 1 # this happens e.g. for `/empty/' entries
+
+ if skip_entry:
+ continue
+
self.block_enter( block )
for markup in block.markups[1:]: # always ignore first markup!
diff --git a/src/tools/docmaker/sources.py b/src/tools/docmaker/sources.py
index 7b68c07..61ecc22 100644
--- a/src/tools/docmaker/sources.py
+++ b/src/tools/docmaker/sources.py
@@ -1,62 +1,70 @@
-# Sources (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009
-# David Turner <david@freetype.org>
#
+# sources.py
#
-# this file contains definitions of classes needed to decompose
-# C sources files into a series of multi-line "blocks". There are
-# two kinds of blocks:
+# Convert source code comments to multi-line blocks (library file).
#
-# - normal blocks, which contain source code or ordinary comments
+# Copyright 2002-2004, 2006-2009, 2012-2014 by
+# David Turner.
#
-# - documentation blocks, which have restricted formatting, and
-# whose text always start with a documentation markup tag like
-# "<Function>", "<Type>", etc..
+# 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 library file contains definitions of classes needed to decompose C
+# source code files into a series of multi-line `blocks'. There are two
+# kinds of blocks.
#
-# the routines used to process the content of documentation blocks
-# are not contained here, but in "content.py"
+# - Normal blocks, which contain source code or ordinary comments.
#
-# the classes and methods found here only deal with text parsing
-# and basic documentation block extraction
+# - Documentation blocks, which have restricted formatting, and whose text
+# always start with a documentation markup tag like `<Function>',
+# `<Type>', etc.
+#
+# The routines to process the content of documentation blocks are contained
+# in file `content.py'; the classes and methods found here only deal with
+# text parsing and basic documentation block extraction.
#
-import fileinput, re, sys, os, string
+import fileinput, re, sys, os, string
################################################################
##
-## BLOCK FORMAT PATTERN
+## SOURCE BLOCK FORMAT CLASS
+##
+## A simple class containing compiled regular expressions to detect
+## potential documentation format block comments within C source code.
##
-## A simple class containing compiled regular expressions used
-## to detect potential documentation format block comments within
-## C source code
+## The `column' pattern must contain a group to `unbox' the content of
+## documentation comment blocks.
##
-## note that the 'column' pattern must contain a group that will
-## be used to "unbox" the content of documentation comment blocks
+## Later on, paragraphs are converted to long lines, which simplifies the
+## regular expressions that act upon the text.
##
class SourceBlockFormat:
def __init__( self, id, start, column, end ):
- """create a block pattern, used to recognize special documentation blocks"""
+ """Create a block pattern, used to recognize special documentation
+ blocks."""
self.id = id
self.start = re.compile( start, re.VERBOSE )
self.column = re.compile( column, re.VERBOSE )
self.end = re.compile( end, re.VERBOSE )
-
#
-# format 1 documentation comment blocks look like the following:
+# Format 1 documentation comment blocks.
#
-# /************************************/
+# /************************************/ (at least 2 asterisks)
# /* */
# /* */
# /* */
-# /************************************/
+# /************************************/ (at least 2 asterisks)
#
-# we define a few regular expressions here to detect them
-#
-
start = r'''
\s* # any number of whitespace
/\*{2,}/ # followed by '/' and at least two asterisks then '/'
@@ -75,16 +83,13 @@ re_source_block_format1 = SourceBlockFormat( 1, start, column, start )
#
-# format 2 documentation comment blocks look like the following:
+# Format 2 documentation comment blocks.
#
# /************************************ (at least 2 asterisks)
# *
+# * (1 asterisk)
# *
-# *
-# *
-# **/ (1 or more asterisks at the end)
-#
-# we define a few regular expressions here to detect them
+# */ (1 or more asterisks)
#
start = r'''
\s* # any number of whitespace
@@ -93,9 +98,9 @@ start = r'''
'''
column = r'''
- \s* # any number of whitespace
- \*{1}(?!/) # followed by precisely one asterisk not followed by `/'
- (.*) # then anything (group1)
+ \s* # any number of whitespace
+ \*{1}(?![*/]) # followed by precisely one asterisk not followed by `/'
+ (.*) # then anything (group1)
'''
end = r'''
@@ -107,51 +112,101 @@ re_source_block_format2 = SourceBlockFormat( 2, start, column, end )
#
-# the list of supported documentation block formats, we could add new ones
-# relatively easily
+# The list of supported documentation block formats. We could add new ones
+# quite easily.
#
re_source_block_formats = [re_source_block_format1, re_source_block_format2]
#
-# the following regular expressions corresponds to markup tags
-# within the documentation comment blocks. they're equivalent
-# despite their different syntax
+# The following regular expressions correspond to markup tags within the
+# documentation comment blocks. They are equivalent despite their different
+# syntax.
+#
+# A markup tag consists of letters or character `-', to be found in group 1.
#
-# notice how each markup tag _must_ begin a new line
+# Notice that a markup tag _must_ begin a new paragraph.
#
-re_markup_tag1 = re.compile( r'''\s*<(\w*)>''' ) # <xxxx> format
-re_markup_tag2 = re.compile( r'''\s*@(\w*):''' ) # @xxxx: format
+re_markup_tag1 = re.compile( r'''\s*<((?:\w|-)*)>''' ) # <xxxx> format
+re_markup_tag2 = re.compile( r'''\s*@((?:\w|-)*):''' ) # @xxxx: format
#
-# the list of supported markup tags, we could add new ones relatively
-# easily
+# The list of supported markup tags. We could add new ones quite easily.
#
re_markup_tags = [re_markup_tag1, re_markup_tag2]
+
+#
+# A regular expression to detect a cross reference, after markup tags have
+# been stripped off. Group 1 is the reference, group 2 the rest of the
+# line.
#
-# used to detect a cross-reference, after markup tags have been stripped
+# A cross reference consists of letters, digits, or characters `-' and `_'.
#
-re_crossref = re.compile( r'@(\w*)(.*)' )
+re_crossref = re.compile( r'@((?:\w|-)*)(.*)' ) # @foo
#
-# used to detect italic and bold styles in paragraph text
+# Two regular expressions to detect italic and bold markup, respectively.
+# Group 1 is the markup, group 2 the rest of the line.
#
-re_italic = re.compile( r"_(\w(\w|')*)_(.*)" ) # _italic_
-re_bold = re.compile( r"\*(\w(\w|')*)\*(.*)" ) # *bold*
+# Note that the markup is limited to words consisting of letters, digits,
+# the character `_', or an apostrophe (but not as the first character).
+#
+re_italic = re.compile( r"_(\w(?:\w|')*)_(.*)" ) # _italic_
+re_bold = re.compile( r"\*(\w(?:\w|')*)\*(.*)" ) # *bold*
#
-# used to detect the end of commented source lines
+# This regular expression code to identify an URL has been taken from
+#
+# http://mail.python.org/pipermail/tutor/2002-September/017228.html
#
-re_source_sep = re.compile( r'\s*/\*\s*\*/' )
+# (with slight modifications).
+#
+urls = r'(?:https?|telnet|gopher|file|wais|ftp)'
+ltrs = r'\w'
+gunk = r'/#~:.?+=&%@!\-'
+punc = r'.:?\-'
+any = "%(ltrs)s%(gunk)s%(punc)s" % { 'ltrs' : ltrs,
+ 'gunk' : gunk,
+ 'punc' : punc }
+url = r"""
+ (
+ \b # start at word boundary
+ %(urls)s : # need resource and a colon
+ [%(any)s] +? # followed by one or more of any valid
+ # character, but be conservative and
+ # take only what you need to...
+ (?= # [look-ahead non-consumptive assertion]
+ [%(punc)s]* # either 0 or more punctuation
+ (?: # [non-grouping parentheses]
+ [^%(any)s] | $ # followed by a non-url char
+ # or end of the string
+ )
+ )
+ )
+ """ % {'urls' : urls,
+ 'any' : any,
+ 'punc' : punc }
+
+re_url = re.compile( url, re.VERBOSE | re.MULTILINE )
#
-# used to perform cross-reference within source output
+# A regular expression that stops collection of comments for the current
+# block.
+#
+re_source_sep = re.compile( r'\s*/\*\s*\*/' ) # /* */
+
+#
+# A regular expression to find possible C identifiers while outputting
+# source code verbatim, covering things like `*foo' or `(bar'. Group 1 is
+# the prefix, group 2 the identifier -- since we scan lines from left to
+# right, sequentially splitting the source code into prefix and identifier
+# is fully sufficient for our purposes.
#
re_source_crossref = re.compile( r'(\W*)(\w*)' )
#
-# a list of reserved source keywords
+# A regular expression that matches a list of reserved C source keywords.
#
re_source_keywords = re.compile( '''\\b ( typedef |
struct |
@@ -179,24 +234,16 @@ re_source_keywords = re.compile( '''\\b ( typedef |
##
## SOURCE BLOCK CLASS
##
-## A SourceProcessor is in charge of reading a C source file
-## and decomposing it into a series of different "SourceBlocks".
-## each one of these blocks can be made of the following data:
-##
-## - A documentation comment block that starts with "/**" and
-## whose exact format will be discussed later
+## There are two important fields in a `SourceBlock' object.
##
-## - normal sources lines, including comments
+## self.lines
+## A list of text lines for the corresponding block.
##
-## the important fields in a text block are the following ones:
-##
-## self.lines : a list of text lines for the corresponding block
-##
-## self.content : for documentation comment blocks only, this is the
-## block content that has been "unboxed" from its
-## decoration. This is None for all other blocks
-## (i.e. sources or ordinary comments with no starting
-## markup tag)
+## self.content
+## For documentation comment blocks only, this is the block content
+## that has been `unboxed' from its decoration. This is `None' for all
+## other blocks (i.e., sources or ordinary comments with no starting
+## markup tag)
##
class SourceBlock:
@@ -233,7 +280,7 @@ class SourceBlock:
def location( self ):
return "(" + self.filename + ":" + repr( self.lineno ) + ")"
- # debugging only - not used in normal operations
+ # debugging only -- not used in normal operations
def dump( self ):
if self.content:
print "{{{content start---"
@@ -250,39 +297,38 @@ class SourceBlock:
print line
-
################################################################
##
## SOURCE PROCESSOR CLASS
##
-## The SourceProcessor is in charge of reading a C source file
-## and decomposing it into a series of different "SourceBlock"
-## objects.
+## The `SourceProcessor' is in charge of reading a C source file and
+## decomposing it into a series of different `SourceBlock' objects.
##
-## each one of these blocks can be made of the following data:
+## A SourceBlock object consists of the following data.
##
-## - A documentation comment block that starts with "/**" and
-## whose exact format will be discussed later
+## - A documentation comment block using one of the layouts above. Its
+## exact format will be discussed later.
##
-## - normal sources lines, include comments
+## - Normal sources lines, including comments.
##
##
class SourceProcessor:
def __init__( self ):
- """initialize a source processor"""
+ """Initialize a source processor."""
self.blocks = []
self.filename = None
self.format = None
self.lines = []
def reset( self ):
- """reset a block processor, clean all its blocks"""
+ """Reset a block processor and clean up all its blocks."""
self.blocks = []
self.format = None
def parse_file( self, filename ):
- """parse a C source file, and add its blocks to the processor's list"""
+ """Parse a C source file and add its blocks to the processor's
+ list."""
self.reset()
self.filename = filename
@@ -301,16 +347,16 @@ class SourceProcessor:
self.process_normal_line( line )
else:
if self.format.end.match( line ):
- # that's a normal block end, add it to 'lines' and
- # create a new block
+ # A normal block end. Add it to `lines' and create a
+ # new block
self.lines.append( line )
self.add_block_lines()
elif self.format.column.match( line ):
- # that's a normal column line, add it to 'lines'
+ # A normal column line. Add it to `lines'.
self.lines.append( line )
else:
- # humm.. this is an unexpected block end,
- # create a new block, but don't process the line
+ # An unexpected block end. Create a new block, but
+ # don't process the line.
self.add_block_lines()
# we need to process the line again
@@ -320,7 +366,8 @@ class SourceProcessor:
self.add_block_lines()
def process_normal_line( self, line ):
- """process a normal line and check whether it is the start of a new block"""
+ """Process a normal line and check whether it is the start of a new
+ block."""
for f in re_source_block_formats:
if f.start.match( line ):
self.add_block_lines()
@@ -330,9 +377,12 @@ class SourceProcessor:
self.lines.append( line )
def add_block_lines( self ):
- """add the current accumulated lines and create a new block"""
+ """Add the current accumulated lines and create a new block."""
if self.lines != []:
- block = SourceBlock( self, self.filename, self.lineno, self.lines )
+ block = SourceBlock( self,
+ self.filename,
+ self.lineno,
+ self.lines )
self.blocks.append( block )
self.format = None
@@ -340,7 +390,7 @@ class SourceProcessor:
# debugging only, not used in normal operations
def dump( self ):
- """print all blocks in a processor"""
+ """Print all blocks in a processor."""
for b in self.blocks:
b.dump()
diff --git a/src/tools/docmaker/tohtml.py b/src/tools/docmaker/tohtml.py
index fffa120..05fc08a 100644
--- a/src/tools/docmaker/tohtml.py
+++ b/src/tools/docmaker/tohtml.py
@@ -1,5 +1,19 @@
-# ToHTML (c) 2002, 2003, 2005, 2006, 2007, 2008
-# David Turner <david@freetype.org>
+#
+# tohtml.py
+#
+# A sub-class container of the `Formatter' class to produce HTML.
+#
+# Copyright 2002, 2003, 2005-2008, 2013, 2014 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
+# 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 parent class is contained in file `formatter.py'.
+
from sources import *
from content import *
@@ -8,7 +22,7 @@ from formatter import *
import time
-# The following defines the HTML header used by all generated pages.
+# The following strings define the HTML header used by all generated pages.
html_header_1 = """\
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
@@ -21,62 +35,125 @@ html_header_1 = """\
html_header_2 = """\
API Reference</title>
<style type="text/css">
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
- background: #FFFFFF; }
+ background: #FFFFFF;
+ width: 87%;
+ margin: auto; }
+
+ div.section { width: 75%;
+ margin: auto; }
+ div.section hr { margin: 4ex 0 1ex 0; }
+ div.section h4 { background-color: #EEEEFF;
+ font-size: medium;
+ font-style: oblique;
+ font-weight: bold;
+ margin: 3ex 0 1.5ex 9%;
+ padding: 0.3ex 0 0.3ex 1%; }
+ div.section p { margin: 1.5ex 0 1.5ex 10%; }
+ div.section pre { margin: 3ex 0 3ex 9%;
+ background-color: #D6E8FF;
+ padding: 2ex 0 2ex 1%; }
+ div.section table.fields { width: 90%;
+ margin: 1.5ex 0 1.5ex 10%; }
+ div.section table.toc { width: 95%;
+ margin: 1.5ex 0 1.5ex 5%; }
+ div.timestamp { text-align: center;
+ font-size: 69%;
+ margin: 1.5ex 0 1.5ex 0; }
- p { text-align: justify; }
h1 { text-align: center; }
- li { text-align: justify; }
- td { padding: 0 0.5em 0 0.5em; }
- td.left { padding: 0 0.5em 0 0.5em;
- text-align: left; }
+ h3 { font-size: medium;
+ margin: 4ex 0 1.5ex 0; }
- a:link { color: #0000EF; }
- a:visited { color: #51188E; }
- a:hover { color: #FF0000; }
+ p { text-align: justify; }
+
+ pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
- pre.colored { color: blue; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.fields td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em; }
+ table.fields td.desc p:first-child { margin: 0; }
+ table.fields td.desc p { margin: 1.5ex 0 0 0; }
+ table.index { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 0.3ex; }
+ table.index tr { padding: 0; }
+ table.index td { padding: 0; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0;
+ margin: 1ex 0 1ex 0; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: center; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: 6ex auto 6ex auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 2em 0.6ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
+ table.toc td.link { width: 30%;
+ text-align: right;
+ vertical-align: baseline;
+ padding: 1ex 1em 1ex 0; }
+ table.toc td.desc { vertical-align: baseline;
+ padding: 1ex 0 1ex 1em;
+ text-align: left; }
+ table.toc td.desc p:first-child { margin: 0;
+ text-align: left; }
+ table.toc td.desc p { margin: 1.5ex 0 0 0;
+ text-align: left; }
- ul.empty { list-style-type: none; }
</style>
</head>
<body>
"""
-html_header_3 = """
-<table align=center><tr><td><font size=-1>[<a href="\
+html_header_3l = """
+<table class="index-toc-link"><tr><td class="left">[<a href="\
"""
-html_header_3i = """
-<table align=center><tr><td width="100%"></td>
-<td><font size=-1>[<a href="\
+html_header_3r = """
+<table class="index-toc-link"><tr><td class="right">[<a href="\
"""
html_header_4 = """\
-">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-1>[<a href="\
+">Index</a>]</td><td class="right">[<a href="\
"""
-html_header_5 = """\
-">TOC</a>]</font></td></tr></table>
-<center><h1>\
+html_header_5t = """\
+">TOC</a>]</td></tr></table>
+<h1>\
"""
-html_header_5t = """\
-">Index</a>]</font></td>
-<td width="100%"></td></tr></table>
-<center><h1>\
+html_header_5i = """\
+">Index</a>]</td></tr></table>
+<h1>\
"""
html_header_6 = """\
- API Reference</h1></center>
+ API Reference</h1>
"""
@@ -87,8 +164,8 @@ html_footer = """\
"""
# The header and footer used for each section.
-section_title_header = "<center><h1>"
-section_title_footer = "</h1></center>"
+section_title_header = "<h1>"
+section_title_footer = "</h1>"
# The header and footer used for code segments.
code_header = '<pre class="colored">'
@@ -99,66 +176,65 @@ para_header = "<p>"
para_footer = "</p>"
# Block header and footer.
-block_header = '<table align=center width="75%"><tr><td>'
+block_header = '<div class="section">'
block_footer_start = """\
-</td></tr></table>
-<hr width="75%">
-<table align=center width="75%"><tr><td><font size=-2>[<a href="\
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="\
"""
block_footer_middle = """\
-">Index</a>]</font></td>
-<td width="100%"></td>
-<td><font size=-2>[<a href="\
+">Index</a>]</td>\
+<td class="middle">[<a href="#">Top</a>]</td>\
+<td class="right">[<a href="\
"""
block_footer_end = """\
-">TOC</a>]</font></td></tr></table>
+">TOC</a>]</td></tr></table></div>
"""
# Description header/footer.
-description_header = '<table align=center width="87%"><tr><td>'
-description_footer = "</td></tr></table><br>"
+description_header = ""
+description_footer = ""
# Marker header/inter/footer combination.
-marker_header = '<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>'
-marker_inter = "</b></em></td></tr><tr><td>"
-marker_footer = "</td></tr></table>"
+marker_header = "<h4>"
+marker_inter = "</h4>"
+marker_footer = ""
# Header location header/footer.
-header_location_header = '<table align=center width="87%"><tr><td>'
-header_location_footer = "</td></tr></table><br>"
+header_location_header = "<p>"
+header_location_footer = "</p>"
# Source code extracts header/footer.
-source_header = '<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>\n'
-source_footer = "\n</pre></table><br>"
+source_header = "<pre>"
+source_footer = "</pre>"
# Chapter header/inter/footer.
-chapter_header = '<br><table align=center width="75%"><tr><td><h2>'
-chapter_inter = '</h2><ul class="empty"><li>'
-chapter_footer = '</li></ul></td></tr></table>'
+chapter_header = """\
+<div class="section">
+<h2>\
+"""
+chapter_inter = '</h2>'
+chapter_footer = '</div>'
# Index footer.
index_footer_start = """\
<hr>
-<table><tr><td width="100%"></td>
-<td><font size=-2>[<a href="\
+<table class="index-toc-link"><tr><td class="right">[<a href="\
"""
index_footer_end = """\
-">TOC</a>]</font></td></tr></table>
+">TOC</a>]</td></tr></table>
"""
# TOC footer.
toc_footer_start = """\
<hr>
-<table><tr><td><font size=-2>[<a href="\
+<table class="index-toc-link"><tr><td class="left">[<a href="\
"""
toc_footer_end = """\
-">Index</a>]</font></td>
-<td width="100%"></td>
-</tr></table>
+">Index</a>]</td></tr></table>
"""
-# source language keyword coloration/styling
+# Source language keyword coloration and styling.
keyword_prefix = '<span class="keyword">'
keyword_suffix = '</span>'
@@ -166,95 +242,78 @@ section_synopsis_header = '<h2>Synopsis</h2>'
section_synopsis_footer = ''
-# Translate a single line of source to HTML. This will convert
-# a "<" into "&lt.", ">" into "&gt.", etc.
+# Translate a single line of source to HTML. This converts `<', `>', and
+# `&' into `&lt;',`&gt;', and `&amp;'.
+#
def html_quote( line ):
- result = string.replace( line, "&", "&amp;" )
- result = string.replace( result, "<", "&lt;" )
- result = string.replace( result, ">", "&gt;" )
+ result = string.replace( line, "&", "&amp;" )
+ result = string.replace( result, "<", "&lt;" )
+ result = string.replace( result, ">", "&gt;" )
return result
-# same as 'html_quote', but ignores left and right brackets
-def html_quote0( line ):
- return string.replace( line, "&", "&amp;" )
-
-
-def dump_html_code( lines, prefix = "" ):
- # clean the last empty lines
- l = len( self.lines )
- while l > 0 and string.strip( self.lines[l - 1] ) == "":
- l = l - 1
-
- # The code footer should be directly appended to the last code
- # line to avoid an additional blank line.
- print prefix + code_header,
- for line in self.lines[0 : l + 1]:
- print '\n' + prefix + html_quote( line ),
- print prefix + code_footer,
-
-
-
+################################################################
+##
+## HTML FORMATTER CLASS
+##
class HtmlFormatter( Formatter ):
def __init__( self, processor, project_title, file_prefix ):
Formatter.__init__( self, processor )
- global html_header_1, html_header_2, html_header_3
- global html_header_4, html_header_5, html_footer
+ global html_header_1
+ global html_header_2
+ global html_header_3l, html_header_3r
+ global html_header_4
+ global html_header_5t, html_header_5i
+ global html_header_6
+ global html_footer
if file_prefix:
file_prefix = file_prefix + "-"
else:
file_prefix = ""
- self.headers = processor.headers
- self.project_title = project_title
- self.file_prefix = file_prefix
- self.html_header = html_header_1 + project_title + \
- html_header_2 + \
- html_header_3 + file_prefix + "index.html" + \
- html_header_4 + file_prefix + "toc.html" + \
- html_header_5 + project_title + \
- html_header_6
-
- self.html_index_header = html_header_1 + project_title + \
- html_header_2 + \
- html_header_3i + file_prefix + "toc.html" + \
- html_header_5 + project_title + \
- html_header_6
-
- self.html_toc_header = html_header_1 + project_title + \
- html_header_2 + \
- html_header_3 + file_prefix + "index.html" + \
- html_header_5t + project_title + \
- html_header_6
-
- self.html_footer = "<center><font size=""-2"">generated on " + \
- time.asctime( time.localtime( time.time() ) ) + \
- "</font></center>" + html_footer
+ self.headers = processor.headers
+ self.project_title = project_title
+ self.file_prefix = file_prefix
+ self.html_header = (
+ html_header_1 + project_title
+ + html_header_2
+ + html_header_3l + file_prefix + "index.html"
+ + html_header_4 + file_prefix + "toc.html"
+ + html_header_5t + project_title
+ + html_header_6 )
+ self.html_index_header = (
+ html_header_1 + project_title
+ + html_header_2
+ + html_header_3r + file_prefix + "toc.html"
+ + html_header_5t + project_title
+ + html_header_6 )
+ self.html_toc_header = (
+ html_header_1 + project_title
+ + html_header_2
+ + html_header_3l + file_prefix + "index.html"
+ + html_header_5i + project_title
+ + html_header_6 )
+ self.html_footer = (
+ '<div class="timestamp">generated on '
+ + time.asctime( time.localtime( time.time() ) )
+ + "</div>" + html_footer )
self.columns = 3
def make_section_url( self, section ):
return self.file_prefix + section.name + ".html"
- def make_block_url( self, block ):
- return self.make_section_url( block.section ) + "#" + block.name
-
- def make_html_words( self, words ):
- """ convert a series of simple words into some HTML text """
- line = ""
- if words:
- line = html_quote( words[0] )
- for w in words[1:]:
- line = line + " " + html_quote( w )
-
- return line
+ def make_block_url( self, block, name = None ):
+ if name == None:
+ name = block.name
+ return self.make_section_url( block.section ) + "#" + name
def make_html_word( self, word ):
- """analyze a simple word to detect cross-references and styling"""
- # look for cross-references
+ """Analyze a simple word to detect cross-references and markup."""
+ # handle cross-references
m = re_crossref.match( word )
if m:
try:
@@ -265,35 +324,38 @@ class HtmlFormatter( Formatter ):
return '<a href="' + url + '">' + name + '</a>' + rest
except:
# we detected a cross-reference to an unknown item
- sys.stderr.write( \
- "WARNING: undefined cross reference '" + name + "'.\n" )
+ sys.stderr.write( "WARNING: undefined cross reference"
+ + " '" + name + "'.\n" )
return '?' + name + '?' + rest
- # look for italics and bolds
+ # handle markup for italic and bold
m = re_italic.match( word )
if m:
name = m.group( 1 )
- rest = m.group( 3 )
+ rest = m.group( 2 )
return '<i>' + name + '</i>' + rest
m = re_bold.match( word )
if m:
name = m.group( 1 )
- rest = m.group( 3 )
+ rest = m.group( 2 )
return '<b>' + name + '</b>' + rest
return html_quote( word )
def make_html_para( self, words ):
- """ convert words of a paragraph into tagged HTML text, handle xrefs """
+ """Convert words of a paragraph into tagged HTML text. Also handle
+ cross references."""
line = ""
if words:
line = self.make_html_word( words[0] )
for word in words[1:]:
line = line + " " + self.make_html_word( word )
+ # handle hyperlinks
+ line = re_url.sub( r'<a href="\1">\1</a>', line )
# convert `...' quotations into real left and right single quotes
- line = re.sub( r"(^|\W)`(.*?)'(\W|$)", \
- r'\1&lsquo;\2&rsquo;\3', \
+ line = re.sub( r"(^|\W)`(.*?)'(\W|$)",
+ r'\1&lsquo;\2&rsquo;\3',
line )
# convert tilde into non-breakable space
line = string.replace( line, "~", "&nbsp;" )
@@ -301,7 +363,7 @@ class HtmlFormatter( Formatter ):
return para_header + line + para_footer
def make_html_code( self, lines ):
- """ convert a code sequence to HTML """
+ """Convert a code sequence to HTML."""
line = code_header + '\n'
for l in lines:
line = line + html_quote( l ) + '\n'
@@ -309,7 +371,7 @@ class HtmlFormatter( Formatter ):
return line + code_footer
def make_html_items( self, items ):
- """ convert a field's content into some valid HTML """
+ """Convert a field's content into HTML."""
lines = []
for item in items:
if item.lines:
@@ -324,7 +386,9 @@ class HtmlFormatter( Formatter ):
def print_html_field( self, field ):
if field.name:
- print "<table><tr valign=top><td><b>" + field.name + "</b></td><td>"
+ print( '<table><tr valign="top"><td><b>'
+ + field.name
+ + "</b></td><td>" )
print self.make_html_items( field.items )
@@ -345,12 +409,24 @@ class HtmlFormatter( Formatter ):
result = result + prefix + '<b>' + name + '</b>'
elif re_source_keywords.match( name ):
# this is a C keyword
- result = result + prefix + keyword_prefix + name + keyword_suffix
- elif self.identifiers.has_key( name ):
+ result = ( result + prefix
+ + keyword_prefix + name + keyword_suffix )
+ elif name in self.identifiers:
# this is a known identifier
block = self.identifiers[name]
- result = result + prefix + '<a href="' + \
- self.make_block_url( block ) + '">' + name + '</a>'
+ id = block.name
+
+ # link to a field ID if possible
+ for markup in block.markups:
+ if markup.tag == 'values':
+ for field in markup.fields:
+ if field.name:
+ id = name
+
+ result = ( result + prefix
+ + '<a href="'
+ + self.make_block_url( block, id )
+ + '">' + name + '</a>' )
else:
result = result + html_quote( line[:length] )
@@ -362,15 +438,11 @@ class HtmlFormatter( Formatter ):
return result
def print_html_field_list( self, fields ):
- print "<p></p>"
- print "<table cellpadding=3 border=0>"
+ print '<table class="fields">'
for field in fields:
- if len( field.name ) > 22:
- print "<tr valign=top><td colspan=0><b>" + field.name + "</b></td></tr>"
- print "<tr valign=top><td></td><td>"
- else:
- print "<tr valign=top><td><b>" + field.name + "</b></td><td>"
-
+ print ( '<tr><td class="val" id="' + field.name + '">'
+ + field.name
+ + '</td><td class="desc">' )
self.print_html_items( field.items )
print "</td></tr>"
print "</table>"
@@ -379,10 +451,9 @@ class HtmlFormatter( Formatter ):
table_fields = []
for field in markup.fields:
if field.name:
- # we begin a new series of field or value definitions, we
- # will record them in the 'table_fields' list before outputting
- # all of them as a single table
- #
+ # We begin a new series of field or value definitions. We
+ # record them in the `table_fields' list before outputting
+ # all of them as a single table.
table_fields.append( field )
else:
if table_fields:
@@ -395,7 +466,7 @@ class HtmlFormatter( Formatter ):
self.print_html_field_list( table_fields )
#
- # Formatting the index
+ # formatting the index
#
def index_enter( self ):
print self.html_index_header
@@ -407,11 +478,11 @@ class HtmlFormatter( Formatter ):
self.index_items[name] = url
def index_exit( self ):
- # block_index already contains the sorted list of index names
+ # `block_index' already contains the sorted list of index names
count = len( self.block_index )
- rows = ( count + self.columns - 1 ) / self.columns
+ rows = ( count + self.columns - 1 ) // self.columns
- print "<table align=center border=0 cellpadding=0 cellspacing=0>"
+ print '<table class="index">'
for r in range( rows ):
line = "<tr>"
for c in range( self.columns ):
@@ -419,7 +490,8 @@ class HtmlFormatter( Formatter ):
if i < count:
bname = self.block_index[r + c * rows]
url = self.index_items[bname]
- line = line + '<td><a href="' + url + '">' + bname + '</a></td>'
+ line = ( line + '<td><a href="' + url + '">'
+ + bname + '</a></td>' )
else:
line = line + '<td></td>'
line = line + "</tr>"
@@ -427,9 +499,9 @@ class HtmlFormatter( Formatter ):
print "</table>"
- print index_footer_start + \
- self.file_prefix + "toc.html" + \
- index_footer_end
+ print( index_footer_start
+ + self.file_prefix + "toc.html"
+ + index_footer_end )
print self.html_footer
@@ -442,21 +514,20 @@ class HtmlFormatter( Formatter ):
Formatter.index_dump( self, index_filename )
#
- # Formatting the table of content
+ # formatting the table of contents
#
def toc_enter( self ):
print self.html_toc_header
- print "<center><h1>Table of Contents</h1></center>"
+ print "<h1>Table of Contents</h1>"
def toc_chapter_enter( self, chapter ):
- print chapter_header + string.join( chapter.title ) + chapter_inter
- print "<table cellpadding=5>"
+ print chapter_header + string.join( chapter.title ) + chapter_inter
+ print '<table class="toc">'
def toc_section_enter( self, section ):
- print '<tr valign=top><td class="left">'
- print '<a href="' + self.make_section_url( section ) + '">' + \
- section.title + '</a></td><td>'
-
+ print ( '<tr><td class="link">'
+ + '<a href="' + self.make_section_url( section ) + '">'
+ + section.title + '</a></td><td class="desc">' )
print self.make_html_para( section.abstract )
def toc_section_exit( self, section ):
@@ -467,14 +538,14 @@ class HtmlFormatter( Formatter ):
print chapter_footer
def toc_index( self, index_filename ):
- print chapter_header + \
- '<a href="' + index_filename + '">Global Index</a>' + \
- chapter_inter + chapter_footer
+ print( chapter_header
+ + '<a href="' + index_filename + '">Global Index</a>'
+ + chapter_inter + chapter_footer )
def toc_exit( self ):
- print toc_footer_start + \
- self.file_prefix + "index.html" + \
- toc_footer_end
+ print( toc_footer_start
+ + self.file_prefix + "index.html"
+ + toc_footer_end )
print self.html_footer
@@ -488,14 +559,12 @@ class HtmlFormatter( Formatter ):
Formatter.toc_dump( self, toc_filename, index_filename )
#
- # Formatting sections
+ # formatting sections
#
def section_enter( self, section ):
print self.html_header
- print section_title_header
- print section.title
- print section_title_footer
+ print section_title_header + section.title + section_title_footer
maxwidth = 0
for b in section.blocks.values():
@@ -503,32 +572,43 @@ class HtmlFormatter( Formatter ):
maxwidth = len( b.name )
width = 70 # XXX magic number
- if maxwidth <> 0:
+ if maxwidth > 0:
# print section synopsis
print section_synopsis_header
- print "<table align=center cellspacing=5 cellpadding=0 border=0>"
+ print '<table class="synopsis">'
- columns = width / maxwidth
+ columns = width // maxwidth
if columns < 1:
columns = 1
count = len( section.block_names )
- rows = ( count + columns - 1 ) / columns
+ # don't handle last entry if it is empty
+ if section.block_names[-1] == "/empty/":
+ count -= 1
+ rows = ( count + columns - 1 ) // columns
for r in range( rows ):
line = "<tr>"
for c in range( columns ):
i = r + c * rows
- line = line + '<td></td><td>'
+ line = line + '<td>'
if i < count:
name = section.block_names[i]
- line = line + '<a href="#' + name + '">' + name + '</a>'
+ if name == "/empty/":
+ # it can happen that a complete row is empty, and
+ # without a proper `filler' the browser might
+ # collapse the row to a much smaller height (or
+ # even omit it completely)
+ line = line + "&nbsp;"
+ else:
+ line = ( line + '<a href="#' + name + '">'
+ + name + '</a>' )
line = line + '</td>'
line = line + "</tr>"
print line
- print "</table><br><br>"
+ print "</table>"
print section_synopsis_footer
print description_header
@@ -540,7 +620,7 @@ class HtmlFormatter( Formatter ):
# place html anchor if needed
if block.name:
- print '<h4><a name="' + block.name + '">' + block.name + '</a></h4>'
+ print( '<h3 id="' + block.name + '">' + block.name + '</h3>' )
# dump the block C source lines now
if block.code:
@@ -548,16 +628,17 @@ class HtmlFormatter( Formatter ):
for f in self.headers.keys():
if block.source.filename.find( f ) >= 0:
header = self.headers[f] + ' (' + f + ')'
- break;
-
+ break
+
# if not header:
-# sys.stderr.write( \
-# 'WARNING: No header macro for ' + block.source.filename + '.\n' )
+# sys.stderr.write(
+# "WARNING: No header macro for"
+# + " '" + block.source.filename + "'.\n" )
if header:
- print header_location_header
- print 'Defined in ' + header + '.'
- print header_location_footer
+ print ( header_location_header
+ + 'Defined in ' + header + '.'
+ + header_location_footer )
print source_header
for l in block.code:
@@ -579,15 +660,16 @@ class HtmlFormatter( Formatter ):
print marker_footer
def block_exit( self, block ):
- print block_footer_start + self.file_prefix + "index.html" + \
- block_footer_middle + self.file_prefix + "toc.html" + \
- block_footer_end
+ print( block_footer_start + self.file_prefix + "index.html"
+ + block_footer_middle + self.file_prefix + "toc.html"
+ + block_footer_end )
def section_exit( self, section ):
print html_footer
def section_dump_all( self ):
for section in self.sections:
- self.section_dump( section, self.file_prefix + section.name + '.html' )
+ self.section_dump( section,
+ self.file_prefix + section.name + '.html' )
# eof
diff --git a/src/tools/docmaker/utils.py b/src/tools/docmaker/utils.py
index 1d96658..b35823a 100644
--- a/src/tools/docmaker/utils.py
+++ b/src/tools/docmaker/utils.py
@@ -1,48 +1,42 @@
-# Utils (c) 2002, 2004, 2007, 2008 David Turner <david@freetype.org>
#
-
-import string, sys, os, glob
-
-# current output directory
+# utils.py
#
-output_dir = None
-
-
-# This function is used to sort the index. It is a simple lexicographical
-# sort, except that it places capital letters before lowercase ones.
+# Auxiliary functions for the `docmaker' tool (library file).
#
-def index_sort( s1, s2 ):
- if not s1:
- return -1
-
- if not s2:
- return 1
-
- l1 = len( s1 )
- l2 = len( s2 )
- m1 = string.lower( s1 )
- m2 = string.lower( s2 )
+# Copyright 2002, 2004, 2007, 2008, 2014 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
+# 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.
- for i in range( l1 ):
- if i >= l2 or m1[i] > m2[i]:
- return 1
- if m1[i] < m2[i]:
- return -1
+import string, sys, os, glob, itertools
- if s1[i] < s2[i]:
- return -1
- if s1[i] > s2[i]:
- return 1
+# current output directory
+#
+output_dir = None
- if l2 > l1:
- return -1
- return 0
+# A function that generates a sorting key. We want lexicographical order
+# (primary key) except that capital letters are sorted before lowercase
+# ones (secondary key).
+#
+# The primary key is implemented by lowercasing the input. The secondary
+# key is simply the original data appended, character by character. For
+# example, the sort key for `FT_x' is `fFtT__xx', while the sort key for
+# `ft_X' is `fftt__xX'. Since ASCII codes of uppercase letters are
+# numerically smaller than the codes of lowercase letters, `fFtT__xx' gets
+# sorted before `fftt__xX'.
+#
+def index_key( s ):
+ return string.join( itertools.chain( *zip( s.lower(), s ) ) )
-# Sort input_list, placing the elements of order_list in front.
+# Sort `input_list', placing the elements of `order_list' in front.
#
def sort_order_list( input_list, order_list ):
new_list = order_list[:]
@@ -52,9 +46,9 @@ def sort_order_list( input_list, order_list ):
return new_list
-# Open the standard output to a given project documentation file. Use
-# "output_dir" to determine the filename location if necessary and save the
-# old stdout in a tuple that is returned by this function.
+# Divert standard output to a given project documentation file. Use
+# `output_dir' to determine the filename location if necessary and save the
+# old stdout handle in a tuple that is returned by this function.
#
def open_output( filename ):
global output_dir
@@ -69,7 +63,7 @@ def open_output( filename ):
return ( new_file, old_stdout )
-# Close the output that was returned by "close_output".
+# Close the output that was returned by `open_output'.
#
def close_output( output ):
output[0].close()
@@ -83,15 +77,16 @@ def check_output():
if output_dir:
if output_dir != "":
if not os.path.isdir( output_dir ):
- sys.stderr.write( "argument" + " '" + output_dir + "' " + \
- "is not a valid directory" )
+ sys.stderr.write( "argument"
+ + " '" + output_dir + "' "
+ + "is not a valid directory" )
sys.exit( 2 )
else:
output_dir = None
def file_exists( pathname ):
- """checks that a given file exists"""
+ """Check that a given file exists."""
result = 1
try:
file = open( pathname, "r" )
@@ -104,12 +99,12 @@ def file_exists( pathname ):
def make_file_list( args = None ):
- """builds a list of input files from command-line arguments"""
+ """Build a list of input files from command-line arguments."""
file_list = []
# sys.stderr.write( repr( sys.argv[1 :] ) + '\n' )
if not args:
- args = sys.argv[1 :]
+ args = sys.argv[1:]
for pathname in args:
if string.find( pathname, '*' ) >= 0:
diff --git a/src/tools/ftrandom/README b/src/tools/ftrandom/README
index c093f15..71bf053 100644
--- a/src/tools/ftrandom/README
+++ b/src/tools/ftrandom/README
@@ -43,6 +43,6 @@ Arguments are:
--rasterize Call FT_Render_Glyph as well as loading it.
--result <dir> This is the directory in which test files are
placed.
- --test <file> Run a single test on a pre-generated testcase.
+ --test <file> Run a single test on a pre-generated testcase.
Done in the current process so it can be debugged
more easily.
diff --git a/src/tools/ftrandom/ftrandom.c b/src/tools/ftrandom/ftrandom.c
index 4daac0d..9a5b632 100644
--- a/src/tools/ftrandom/ftrandom.c
+++ b/src/tools/ftrandom/ftrandom.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2007, 2008 by George Williams */
+/* Copyright (C) 2005, 2007, 2008, 2013 by George Williams */
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -184,7 +184,6 @@
{
FT_Library context;
FT_Face face;
- int i, num;
if ( FT_Init_FreeType( &context ) )
@@ -203,6 +202,9 @@
TestFace( face );
else
{
+ int i, num;
+
+
num = face->num_faces;
FT_Done_Face( face );
@@ -327,12 +329,9 @@
FindFonts( char** fontdirs,
char** extensions )
{
- DIR* examples;
- struct dirent* ent;
-
- int i, max;
- char buffer[1025];
- struct stat statb;
+ int i, max;
+ char buffer[1025];
+ struct stat statb;
max = 0;
@@ -340,6 +339,10 @@
for ( i = 0; fontdirs[i] != NULL; ++i )
{
+ DIR* examples;
+ struct dirent* ent;
+
+
examples = opendir( fontdirs[i] );
if ( examples == NULL )
{
@@ -446,9 +449,9 @@
fseek( new, getRandom( 0, item->len - 1 ), SEEK_SET );
if ( item->isbinary )
- putc( getRandom( 0, 0xff ), new );
+ putc( getRandom( 0, 0xFF ), new );
else if ( item->isascii )
- putc( getRandom( 0x20, 0x7e ), new );
+ putc( getRandom( 0x20, 0x7E ), new );
else
{
int hex = getRandom( 0, 15 );
@@ -555,7 +558,6 @@
char** argv )
{
char **dirs, **exts;
- char *pt, *end;
int dcnt = 0, ecnt = 0, rset = false, allexts = false;
int i;
time_t now;
@@ -567,7 +569,10 @@
for ( i = 1; i < argc; ++i )
{
- pt = argv[i];
+ char* pt = argv[i];
+ char* end;
+
+
if ( pt[0] == '-' && pt[1] == '-' )
++pt;
@@ -633,12 +638,21 @@
}
if ( allexts )
+ {
+ free( exts );
exts = NULL;
+ }
else if ( ecnt == 0 )
+ {
+ free( exts );
exts = default_ext_list;
+ }
if ( dcnt == 0 )
+ {
+ free( dirs );
dirs = default_dir_list;
+ }
if ( testfile != NULL )
ExecuteTest( testfile ); /* This should never return */
diff --git a/src/tools/test_afm.c b/src/tools/test_afm.c
index f5f9936..24cd0c4 100644
--- a/src/tools/test_afm.c
+++ b/src/tools/test_afm.c
@@ -118,7 +118,7 @@
if ( argc < 2 )
- return FT_Err_Invalid_Argument;
+ return FT_ERR( Invalid_Argument );
error = FT_Init_FreeType( &library );
if ( error )
diff --git a/src/tools/test_bbox.c b/src/tools/test_bbox.c
index e085c5b..64b82c3 100644
--- a/src/tools/test_bbox.c
+++ b/src/tools/test_bbox.c
@@ -88,6 +88,26 @@
};
+ /* dummy outline #3 with bbox of [0 100 128 128] precisely */
+ static FT_Vector dummy_vec_3[4] =
+ {
+ XVEC( 100.0, 127.0 ),
+ XVEC( 200.0, 127.0 ),
+ XVEC( 0.0, 136.0 ),
+ XVEC( 0.0, 100.0 )
+ };
+
+ static FT_Outline dummy_outline_3 =
+ {
+ 1,
+ 4,
+ dummy_vec_3,
+ dummy_tag_1,
+ dummy_contour_1,
+ 0
+ };
+
+
static void
dump_outline( FT_Outline* outline )
{
@@ -125,12 +145,14 @@
FT_Outline_Get_CBox( outline, &bbox );
time0 = get_time() - time0;
- printf( "time = %5.2f cbox = [%.2f %.2f %.2f %.2f]\n",
+ printf( "time = %6.3f cbox = [%8.4f %8.4f %8.4f %8.4f]\n",
((double)time0/10000.0),
XVAL( bbox.xMin ),
XVAL( bbox.yMin ),
XVAL( bbox.xMax ),
XVAL( bbox.yMax ) );
+ printf( "cbox_hex = [%08X %08X %08X %08X]\n",
+ bbox.xMin, bbox.yMin, bbox.xMax, bbox.yMax );
time0 = get_time();
@@ -138,15 +160,17 @@
FT_Outline_Get_BBox( outline, &bbox );
time0 = get_time() - time0;
- printf( "time = %5.2f bbox = [%.2f %.2f %.2f %.2f]\n",
+ printf( "time = %6.3f bbox = [%8.4f %8.4f %8.4f %8.4f]\n",
((double)time0/10000.0),
XVAL( bbox.xMin ),
XVAL( bbox.yMin ),
XVAL( bbox.xMax ),
XVAL( bbox.yMax ) );
+ printf( "bbox_hex = [%08X %08X %08X %08X]\n",
+ bbox.xMin, bbox.yMin, bbox.xMax, bbox.yMax );
}
-#define REPEAT 100000L
+#define REPEAT 1000000L
int main( int argc, char** argv )
{
@@ -155,6 +179,10 @@
printf( "outline #2\n" );
profile_outline( &dummy_outline_2, REPEAT );
+
+ printf( "outline #3\n" );
+ profile_outline( &dummy_outline_3, REPEAT );
+
return 0;
}
diff --git a/src/tools/test_trig.c b/src/tools/test_trig.c
index 8c8a544..99ac1cf 100644
--- a/src/tools/test_trig.c
+++ b/src/tools/test_trig.c
@@ -8,9 +8,8 @@
#define PI 3.14159265358979323846
#define SPI (PI/FT_ANGLE_PI)
-/* the precision in 16.16 fixed float points of the checks. Expect */
-/* between 2 and 5 noise LSB bits during operations, due to */
-/* rounding errors.. */
+/* the precision in 16.16 fixed-point checks. Expect between 2 and 5 */
+/* noise LSB bits during operations, due to rounding errors.. */
#define THRESHOLD 64
static error = 0;
@@ -18,14 +17,16 @@
static void
test_cos( void )
{
- FT_Fixed f1, f2;
- double d1, d2;
- int i;
+ int i;
- for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 )
+
+ for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L )
{
+ FT_Fixed f1, f2;
+ double d2;
+
+
f1 = FT_Cos(i);
- d1 = f1/65536.0;
d2 = cos( i*SPI );
f2 = (FT_Fixed)(d2*65536.0);
@@ -39,18 +40,19 @@
}
-
static void
test_sin( void )
{
- FT_Fixed f1, f2;
- double d1, d2;
- int i;
+ int i;
- for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 )
+
+ for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L )
{
+ FT_Fixed f1, f2;
+ double d2;
+
+
f1 = FT_Sin(i);
- d1 = f1/65536.0;
d2 = sin( i*SPI );
f2 = (FT_Fixed)(d2*65536.0);
@@ -67,14 +69,16 @@
static void
test_tan( void )
{
- FT_Fixed f1, f2;
- double d1, d2;
- int i;
+ int i;
- for ( i = 0; i < FT_ANGLE_PI2-0x2000000; i += 0x10000 )
+
+ for ( i = 0; i < FT_ANGLE_PI2 - 0x2000000L; i += 0x10000L )
{
+ FT_Fixed f1, f2;
+ double d2;
+
+
f1 = FT_Tan(i);
- d1 = f1/65536.0;
d2 = tan( i*SPI );
f2 = (FT_Fixed)(d2*65536.0);
@@ -91,12 +95,16 @@
static void
test_atan2( void )
{
- FT_Fixed c2, s2;
- double l, a, c1, s1;
- int i, j;
+ int i;
- for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 )
+
+ for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L )
{
+ FT_Fixed c2, s2;
+ double l, a, c1, s1;
+ int j;
+
+
l = 5.0;
a = i*SPI;
@@ -118,16 +126,20 @@
}
}
+
static void
test_unit( void )
{
- FT_Vector v;
- double a, c1, s1;
- FT_Fixed c2, s2;
- int i;
+ int i;
+
- for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 )
+ for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L )
{
+ FT_Vector v;
+ double a, c1, s1;
+ FT_Fixed c2, s2;
+
+
FT_Vector_Unit( &v, i );
a = ( i*SPI );
c1 = cos(a);
@@ -151,12 +163,15 @@
static void
test_length( void )
{
- FT_Vector v;
- FT_Fixed l, l2;
- int i;
+ int i;
+
- for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 )
+ for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L )
{
+ FT_Vector v;
+ FT_Fixed l, l2;
+
+
l = (FT_Fixed)(500.0*65536.0);
v.x = (FT_Fixed)( l * cos( i*SPI ) );
v.y = (FT_Fixed)( l * sin( i*SPI ) );
@@ -175,19 +190,26 @@
static void
test_rotate( void )
{
- FT_Fixed c2, s2, c4, s4;
- FT_Vector v;
- double l, ra, a, c1, s1, cra, sra, c3, s3;
- int i, j, rotate;
+ int rotate;
+
- for ( rotate = 0; rotate < FT_ANGLE_2PI; rotate += 0x10000 )
+ for ( rotate = 0; rotate < FT_ANGLE_2PI; rotate += 0x10000L )
{
+ double ra, cra, sra;
+ int i;
+
+
ra = rotate*SPI;
cra = cos( ra );
sra = sin( ra );
- for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 )
+ for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L )
{
+ FT_Fixed c2, s2, c4, s4;
+ FT_Vector v;
+ double l, a, c1, s1, c3, s3;
+
+
l = 500.0;
a = i*SPI;
diff --git a/src/truetype/rules.mk b/src/truetype/rules.mk
index 507ef16..d4b69f5 100644
--- a/src/truetype/rules.mk
+++ b/src/truetype/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001, 2003, 2004, 2011 by
+# Copyright 1996-2001, 2003-2004, 2011-2012 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -31,7 +31,8 @@ TT_DRV_SRC := $(TT_DIR)/ttdriver.c \
$(TT_DIR)/ttinterp.c \
$(TT_DIR)/ttobjs.c \
$(TT_DIR)/ttpic.c \
- $(TT_DIR)/ttpload.c
+ $(TT_DIR)/ttpload.c \
+ $(TT_DIR)/ttsubpix.c
# TrueType driver headers
#
diff --git a/src/truetype/truetype.c b/src/truetype/truetype.c
index 4bd1209..576912b 100644
--- a/src/truetype/truetype.c
+++ b/src/truetype/truetype.c
@@ -4,7 +4,7 @@
/* */
/* FreeType TrueType driver component (body only). */
/* */
-/* Copyright 1996-2001, 2004, 2006 by */
+/* Copyright 1996-2001, 2004, 2006, 2012 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 @@
#ifdef TT_USE_BYTECODE_INTERPRETER
#include "ttinterp.c"
+#include "ttsubpix.c"
#endif
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index 3669d45..ecf4cdc 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -4,7 +4,7 @@
/* */
/* TrueType font driver implementation (body). */
/* */
-/* Copyright 1996-2012 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,6 +29,8 @@
#include FT_SERVICE_TRUETYPE_ENGINE_H
#include FT_SERVICE_TRUETYPE_GLYF_H
+#include FT_SERVICE_PROPERTIES_H
+#include FT_TRUETYPE_DRIVER_H
#include "ttdriver.h"
#include "ttgload.h"
@@ -52,6 +54,73 @@
#define FT_COMPONENT trace_ttdriver
+ /*
+ * PROPERTY SERVICE
+ *
+ */
+ static FT_Error
+ tt_property_set( FT_Module module, /* TT_Driver */
+ const char* property_name,
+ const void* value )
+ {
+ FT_Error error = FT_Err_Ok;
+ TT_Driver driver = (TT_Driver)module;
+
+
+ if ( !ft_strcmp( property_name, "interpreter-version" ) )
+ {
+ FT_UInt* interpreter_version = (FT_UInt*)value;
+
+
+#ifndef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( *interpreter_version != TT_INTERPRETER_VERSION_35 )
+ error = FT_ERR( Unimplemented_Feature );
+ else
+#endif
+ driver->interpreter_version = *interpreter_version;
+
+ return error;
+ }
+
+ FT_TRACE0(( "tt_property_set: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ static FT_Error
+ tt_property_get( FT_Module module, /* TT_Driver */
+ const char* property_name,
+ const void* value )
+ {
+ FT_Error error = FT_Err_Ok;
+ TT_Driver driver = (TT_Driver)module;
+
+ FT_UInt interpreter_version = driver->interpreter_version;
+
+
+ if ( !ft_strcmp( property_name, "interpreter-version" ) )
+ {
+ FT_UInt* val = (FT_UInt*)value;
+
+
+ *val = interpreter_version;
+
+ return error;
+ }
+
+ FT_TRACE0(( "tt_property_get: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ FT_DEFINE_SERVICE_PROPERTIESREC(
+ tt_service_properties,
+ (FT_Properties_SetFunc)tt_property_set,
+ (FT_Properties_GetFunc)tt_property_get )
+
+
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -146,7 +215,8 @@
FT_UShort ah;
- TT_Get_VMetrics( face, start + nn, &tsb, &ah );
+ /* since we don't need `tsb', we use zero for `yMax' parameter */
+ TT_Get_VMetrics( face, start + nn, 0, &tsb, &ah );
advances[nn] = ah;
}
}
@@ -163,7 +233,7 @@
}
}
- return TT_Err_Ok;
+ return FT_Err_Ok;
}
/*************************************************************************/
@@ -187,7 +257,7 @@
{
TT_Face ttface = (TT_Face)size->face;
TT_Size ttsize = (TT_Size)size;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
ttsize->strike_index = strike_index;
@@ -197,7 +267,7 @@
/* use the scaled metrics, even when tt_size_reset fails */
FT_Select_Metrics( size->face, strike_index );
- tt_size_reset( ttsize );
+ tt_size_reset( ttsize ); /* ignore return value */
}
else
{
@@ -221,7 +291,7 @@
FT_Size_Request req )
{
TT_Size ttsize = (TT_Size)size;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
@@ -294,13 +364,13 @@
if ( !slot )
- return TT_Err_Invalid_Slot_Handle;
+ return FT_THROW( Invalid_Slot_Handle );
if ( !size )
- return TT_Err_Invalid_Size_Handle;
+ return FT_THROW( Invalid_Size_Handle );
if ( !face )
- return TT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Face_Handle );
#ifdef FT_CONFIG_OPTION_INCREMENTAL
if ( glyph_index >= (FT_UInt)face->num_glyphs &&
@@ -308,7 +378,7 @@
#else
if ( glyph_index >= (FT_UInt)face->num_glyphs )
#endif
- return TT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
if ( load_flags & FT_LOAD_NO_HINTING )
{
@@ -353,13 +423,13 @@
/*************************************************************************/
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- FT_DEFINE_SERVICE_MULTIMASTERSREC(tt_service_gx_multi_masters,
+ FT_DEFINE_SERVICE_MULTIMASTERSREC(
+ tt_service_gx_multi_masters,
(FT_Get_MM_Func) NULL,
(FT_Set_MM_Design_Func) NULL,
(FT_Set_MM_Blend_Func) TT_Set_MM_Blend,
(FT_Get_MM_Var_Func) TT_Get_MM_Var,
- (FT_Set_Var_Design_Func)TT_Set_Var_Design
- )
+ (FT_Set_Var_Design_Func)TT_Set_Var_Design )
#endif
static const FT_Service_TrueTypeEngineRec tt_service_truetype_engine =
@@ -379,25 +449,28 @@
#endif /* TT_USE_BYTECODE_INTERPRETER */
};
- FT_DEFINE_SERVICE_TTGLYFREC(tt_service_truetype_glyf,
- (TT_Glyf_GetLocationFunc)tt_face_get_location
- )
+ FT_DEFINE_SERVICE_TTGLYFREC(
+ tt_service_truetype_glyf,
+ (TT_Glyf_GetLocationFunc)tt_face_get_location )
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- FT_DEFINE_SERVICEDESCREC4(tt_services,
+ FT_DEFINE_SERVICEDESCREC5(
+ tt_services,
FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE,
- FT_SERVICE_ID_MULTI_MASTERS, &FT_TT_SERVICE_GX_MULTI_MASTERS_GET,
+ FT_SERVICE_ID_MULTI_MASTERS, &TT_SERVICE_GX_MULTI_MASTERS_GET,
FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,
- FT_SERVICE_ID_TT_GLYF, &FT_TT_SERVICE_TRUETYPE_GLYF_GET
- )
+ FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET,
+ FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET )
#else
- FT_DEFINE_SERVICEDESCREC3(tt_services,
+ FT_DEFINE_SERVICEDESCREC4(
+ tt_services,
FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE,
FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,
- FT_SERVICE_ID_TT_GLYF, &FT_TT_SERVICE_TRUETYPE_GLYF_GET
- )
+ FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET,
+ FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET )
#endif
+
FT_CALLBACK_DEF( FT_Module_Interface )
tt_get_interface( FT_Module driver, /* TT_Driver */
const char* tt_interface )
@@ -408,7 +481,7 @@
SFNT_Service sfnt;
- /* FT_TT_SERVICES_GET derefers `library' in PIC mode */
+ /* TT_SERVICES_GET dereferences `library' in PIC mode */
#ifdef FT_CONFIG_OPTION_PIC
if ( !driver )
return NULL;
@@ -417,7 +490,7 @@
return NULL;
#endif
- result = ft_service_list_lookup( FT_TT_SERVICES_GET, tt_interface );
+ result = ft_service_list_lookup( TT_SERVICES_GET, tt_interface );
if ( result != NULL )
return result;
@@ -445,18 +518,19 @@
/* The FT_DriverInterface structure is defined in ftdriver.h. */
#ifdef TT_USE_BYTECODE_INTERPRETER
-#define TT_HINTER_FLAG FT_MODULE_DRIVER_HAS_HINTER
+#define TT_HINTER_FLAG FT_MODULE_DRIVER_HAS_HINTER
#else
-#define TT_HINTER_FLAG 0
+#define TT_HINTER_FLAG 0
#endif
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-#define TT_SIZE_SELECT tt_size_select
+#define TT_SIZE_SELECT tt_size_select
#else
-#define TT_SIZE_SELECT 0
+#define TT_SIZE_SELECT 0
#endif
- FT_DEFINE_DRIVER( tt_driver_class,
+ FT_DEFINE_DRIVER(
+ tt_driver_class,
FT_MODULE_FONT_DRIVER |
FT_MODULE_DRIVER_SCALABLE |
@@ -485,9 +559,6 @@
tt_slot_init,
0, /* FT_Slot_DoneFunc */
- ft_stub_set_char_sizes, /* FT_CONFIG_OPTION_OLD_INTERNALS */
- ft_stub_set_pixel_sizes, /* FT_CONFIG_OPTION_OLD_INTERNALS */
-
tt_glyph_load,
tt_get_kerning,
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index ce8c888..c5841c3 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -4,7 +4,7 @@
/* */
/* TrueType Glyph Loader (body). */
/* */
-/* Copyright 1996-2012 */
+/* Copyright 1996-2014 */
/* 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 FT_INTERNAL_SFNT_H
#include FT_TRUETYPE_TAGS_H
#include FT_OUTLINE_H
+#include FT_TRUETYPE_DRIVER_H
#include "ttgload.h"
#include "ttpload.h"
@@ -32,6 +33,7 @@
#endif
#include "tterrors.h"
+#include "ttsubpix.h"
/*************************************************************************/
@@ -83,77 +85,90 @@
/*************************************************************************/
/* */
/* 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 */
- /* from the `hhea' table. But that is not what Microsoft's rasterizer */
- /* apparently does: It uses the ppem value as the advance height, and */
- /* sets the top side bearing to be zero. */
+ /* See macro `TT_LOADER_SET_PP' below for explanations. */
/* */
FT_LOCAL_DEF( void )
TT_Get_VMetrics( TT_Face face,
FT_UInt idx,
+ FT_Pos yMax,
FT_Short* tsb,
FT_UShort* ah )
{
if ( face->vertical_info )
( (SFNT_Service)face->sfnt )->get_metrics( face, 1, idx, tsb, ah );
-#if 1 /* Empirically determined, at variance with what MS said */
-
- else
- {
- *tsb = 0;
- *ah = face->root.units_per_EM;
- }
-
-#else /* This is what MS said to do. It isn't what they do, however. */
-
else if ( face->os2.version != 0xFFFFU )
{
- *tsb = face->os2.sTypoAscender;
+ *tsb = (FT_Short)( face->os2.sTypoAscender - yMax );
*ah = face->os2.sTypoAscender - face->os2.sTypoDescender;
}
+
else
{
- *tsb = face->horizontal.Ascender;
+ *tsb = (FT_Short)( face->horizontal.Ascender - yMax );
*ah = face->horizontal.Ascender - face->horizontal.Descender;
}
-#endif
-
FT_TRACE5(( " advance height (font units): %d\n", *ah ));
FT_TRACE5(( " top side bearing (font units): %d\n", *tsb ));
}
- static void
+ static FT_Error
tt_get_metrics( TT_Loader loader,
FT_UInt glyph_index )
{
- TT_Face face = (TT_Face)loader->face;
+ TT_Face face = (TT_Face)loader->face;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face );
+#endif
+
+ FT_Error error;
+ FT_Stream stream = loader->stream;
FT_Short left_bearing = 0, top_bearing = 0;
FT_UShort advance_width = 0, advance_height = 0;
+ /* we must preserve the stream position */
+ /* (which gets altered by the metrics functions) */
+ FT_ULong pos = FT_STREAM_POS();
+
TT_Get_HMetrics( face, glyph_index,
&left_bearing,
&advance_width );
TT_Get_VMetrics( face, glyph_index,
+ loader->bbox.yMax,
&top_bearing,
&advance_height );
+ if ( FT_STREAM_SEEK( pos ) )
+ return error;
+
loader->left_bearing = left_bearing;
loader->advance = advance_width;
loader->top_bearing = top_bearing;
loader->vadvance = advance_height;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )
+ {
+ if ( loader->exec )
+ loader->exec->sph_tweak_flags = 0;
+
+ /* this may not be the right place for this, but it works */
+ if ( loader->exec && loader->exec->ignore_x_mode )
+ sph_set_tweaks( loader, glyph_index );
+ }
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
if ( !loader->linear_def )
{
loader->linear_def = 1;
loader->linear = advance_width;
}
+
+ return FT_Err_Ok;
}
@@ -252,10 +267,6 @@
}
-#undef IS_HINTED
-#define IS_HINTED( flags ) ( ( flags & FT_LOAD_NO_HINTING ) == 0 )
-
-
/*************************************************************************/
/* */
/* The following functions are used by default with TrueType fonts. */
@@ -286,7 +297,7 @@
loader->cursor = stream->cursor;
loader->limit = stream->limit;
- return TT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -308,7 +319,7 @@
if ( p + 10 > limit )
- return TT_Err_Invalid_Outline;
+ return FT_THROW( Invalid_Outline );
loader->n_contours = FT_NEXT_SHORT( p );
@@ -324,7 +335,7 @@
loader->bbox.yMax ));
loader->cursor = p;
- return TT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -337,9 +348,9 @@
FT_GlyphLoader gloader = load->gloader;
FT_Int n_contours = load->n_contours;
FT_Outline* outline;
- TT_Face face = (TT_Face)load->face;
FT_UShort n_ins;
FT_Int n_points;
+ FT_ULong tmp;
FT_Byte *flag, *flag_limit;
FT_Byte c, count;
@@ -405,18 +416,11 @@
FT_TRACE5(( " Instructions size: %u\n", n_ins ));
- if ( n_ins > face->max_profile.maxSizeOfInstructions )
- {
- FT_TRACE0(( "TT_Load_Simple_Glyph: too many instructions (%d)\n",
- n_ins ));
- error = TT_Err_Too_Many_Hints;
- goto Fail;
- }
-
+ /* check it */
if ( ( limit - p ) < n_ins )
{
FT_TRACE0(( "TT_Load_Simple_Glyph: instruction count mismatch\n" ));
- error = TT_Err_Too_Many_Hints;
+ error = FT_THROW( Too_Many_Hints );
goto Fail;
}
@@ -424,6 +428,20 @@
if ( IS_HINTED( load->load_flags ) )
{
+ /* we don't trust `maxSizeOfInstructions' in the `maxp' table */
+ /* and thus update the bytecode array size by ourselves */
+
+ tmp = load->exec->glyphSize;
+ error = Update_Max( load->exec->memory,
+ &tmp,
+ sizeof ( FT_Byte ),
+ (void*)&load->exec->glyphIns,
+ n_ins );
+
+ load->exec->glyphSize = (FT_UShort)tmp;
+ if ( error )
+ return error;
+
load->glyph->control_len = n_ins;
load->glyph->control_data = load->exec->glyphIns;
@@ -546,7 +564,7 @@
return error;
Invalid_Outline:
- error = TT_Err_Invalid_Outline;
+ error = FT_THROW( Invalid_Outline );
goto Fail;
}
@@ -667,7 +685,7 @@
return error;
Invalid_Composite:
- error = TT_Err_Invalid_Composite;
+ error = FT_THROW( Invalid_Composite );
goto Fail;
}
@@ -714,8 +732,12 @@
TT_Hint_Glyph( TT_Loader loader,
FT_Bool is_composite )
{
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ TT_Face face = (TT_Face)loader->face;
+ TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face );
+#endif
+
TT_GlyphZone zone = &loader->zone;
- FT_Pos origin;
#ifdef TT_USE_BYTECODE_INTERPRETER
FT_UInt n_ins;
@@ -727,19 +749,12 @@
#ifdef TT_USE_BYTECODE_INTERPRETER
if ( loader->glyph->control_len > 0xFFFFL )
{
- FT_TRACE1(( "TT_Hint_Glyph: too long instructions " ));
- FT_TRACE1(( "(0x%lx byte) is truncated\n",
+ FT_TRACE1(( "TT_Hint_Glyph: too long instructions" ));
+ FT_TRACE1(( " (0x%lx byte) is truncated\n",
loader->glyph->control_len ));
}
n_ins = (FT_UInt)( loader->glyph->control_len );
-#endif
-
- origin = zone->cur[zone->n_points - 4].x;
- origin = FT_PIX_ROUND( origin ) - origin;
- if ( origin )
- translate_array( zone->n_points, zone->cur, origin, 0 );
-#ifdef TT_USE_BYTECODE_INTERPRETER
/* save original point position in org */
if ( n_ins > 0 )
FT_ARRAY_COPY( zone->org, zone->cur, zone->n_points );
@@ -765,9 +780,13 @@
}
#endif
- /* round pp2 and pp4 */
+ /* round phantom points */
+ zone->cur[zone->n_points - 4].x =
+ FT_PIX_ROUND( zone->cur[zone->n_points - 4].x );
zone->cur[zone->n_points - 3].x =
FT_PIX_ROUND( zone->cur[zone->n_points - 3].x );
+ zone->cur[zone->n_points - 2].y =
+ FT_PIX_ROUND( zone->cur[zone->n_points - 2].y );
zone->cur[zone->n_points - 1].y =
FT_PIX_ROUND( zone->cur[zone->n_points - 1].y );
@@ -782,10 +801,8 @@
FT_Outline current_outline = gloader->current.outline;
- error = TT_Set_CodeRange( loader->exec, tt_coderange_glyph,
- loader->exec->glyphIns, n_ins );
- if ( error )
- return error;
+ TT_Set_CodeRange( loader->exec, tt_coderange_glyph,
+ loader->exec->glyphIns, n_ins );
loader->exec->is_composite = is_composite;
loader->exec->pts = *zone;
@@ -805,15 +822,23 @@
#endif
/* save glyph phantom points */
- if ( !loader->preserve_pps )
+ loader->pp1 = zone->cur[zone->n_points - 4];
+ loader->pp2 = zone->cur[zone->n_points - 3];
+ loader->pp3 = zone->cur[zone->n_points - 2];
+ loader->pp4 = zone->cur[zone->n_points - 1];
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )
{
- loader->pp1 = zone->cur[zone->n_points - 4];
- loader->pp2 = zone->cur[zone->n_points - 3];
- loader->pp3 = zone->cur[zone->n_points - 2];
- loader->pp4 = zone->cur[zone->n_points - 1];
+ if ( loader->exec->sph_tweak_flags & SPH_TWEAK_DEEMBOLDEN )
+ FT_Outline_EmboldenXY( &loader->gloader->current.outline, -24, 0 );
+
+ else if ( loader->exec->sph_tweak_flags & SPH_TWEAK_EMBOLDEN )
+ FT_Outline_EmboldenXY( &loader->gloader->current.outline, 24, 0 );
}
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
- return TT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -831,7 +856,7 @@
TT_Process_Simple_Glyph( TT_Loader loader )
{
FT_GlyphLoader gloader = loader->gloader;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Outline* outline;
FT_Int n_points;
@@ -889,25 +914,83 @@
loader->zone.n_points + 4 );
}
- /* scale the glyph */
- if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
- FT_Vector* vec = outline->points;
- FT_Vector* limit = outline->points + n_points;
- FT_Fixed x_scale = ((TT_Size)loader->size)->metrics.x_scale;
- FT_Fixed y_scale = ((TT_Size)loader->size)->metrics.y_scale;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ TT_Face face = (TT_Face)loader->face;
+ TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face );
+
+ FT_String* family = face->root.family_name;
+ FT_Int ppem = loader->size->metrics.x_ppem;
+ FT_String* style = face->root.style_name;
+ FT_Int x_scale_factor = 1000;
+#endif
+
+ FT_Vector* vec = outline->points;
+ FT_Vector* limit = outline->points + n_points;
+
+ FT_Fixed x_scale = 0; /* pacify compiler */
+ FT_Fixed y_scale = 0;
+ FT_Bool do_scale = FALSE;
- for ( ; vec < limit; vec++ )
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )
{
- vec->x = FT_MulFix( vec->x, x_scale );
- vec->y = FT_MulFix( vec->y, y_scale );
+ /* scale, but only if enabled and only if TT hinting is being used */
+ if ( IS_HINTED( loader->load_flags ) )
+ x_scale_factor = sph_test_tweak_x_scaling( face,
+ family,
+ ppem,
+ style,
+ loader->glyph_index );
+ /* scale the glyph */
+ if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ||
+ x_scale_factor != 1000 )
+ {
+ x_scale = FT_MulDiv( ((TT_Size)loader->size)->metrics.x_scale,
+ x_scale_factor, 1000 );
+ y_scale = ((TT_Size)loader->size)->metrics.y_scale;
+
+ /* compensate for any scaling by de/emboldening; */
+ /* the amount was determined via experimentation */
+ if ( x_scale_factor != 1000 && ppem > 11 )
+ FT_Outline_EmboldenXY( outline,
+ FT_MulFix( 1280 * ppem,
+ 1000 - x_scale_factor ),
+ 0 );
+ do_scale = TRUE;
+ }
}
+ else
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ {
+ /* scale the glyph */
+ if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
+ {
+ x_scale = ((TT_Size)loader->size)->metrics.x_scale;
+ y_scale = ((TT_Size)loader->size)->metrics.y_scale;
- loader->pp1 = outline->points[n_points - 4];
- loader->pp2 = outline->points[n_points - 3];
- loader->pp3 = outline->points[n_points - 2];
- loader->pp4 = outline->points[n_points - 1];
+ do_scale = TRUE;
+ }
+ }
+
+ if ( do_scale )
+ {
+ for ( ; vec < limit; vec++ )
+ {
+ vec->x = FT_MulFix( vec->x, x_scale );
+ vec->y = FT_MulFix( vec->y, y_scale );
+ }
+
+ loader->pp1 = outline->points[n_points - 4];
+ loader->pp2 = outline->points[n_points - 3];
+ loader->pp3 = outline->points[n_points - 2];
+ loader->pp4 = outline->points[n_points - 1];
+ }
}
if ( IS_HINTED( loader->load_flags ) )
@@ -974,7 +1057,7 @@
l += num_base_points;
if ( k >= num_base_points ||
l >= num_points )
- return TT_Err_Invalid_Composite;
+ return FT_THROW( Invalid_Composite );
p1 = gloader->base.outline.points + k;
p2 = gloader->base.outline.points + l;
@@ -988,11 +1071,11 @@
y = subglyph->arg2;
if ( !x && !y )
- return TT_Err_Ok;
+ return FT_Err_Ok;
- /* Use a default value dependent on */
- /* TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED. This is useful for old TT */
- /* fonts which don't set the xxx_COMPONENT_OFFSET bit. */
+ /* Use a default value dependent on */
+ /* TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED. This is useful for old */
+ /* TT fonts which don't set the xxx_COMPONENT_OFFSET bit. */
if ( have_scale &&
#ifdef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
@@ -1004,10 +1087,10 @@
#if 0
- /*************************************************************************/
- /* */
- /* This algorithm is what Apple documents. But it doesn't work. */
- /* */
+ /*******************************************************************/
+ /* */
+ /* This algorithm is what Apple documents. But it doesn't work. */
+ /* */
int a = subglyph->transform.xx > 0 ? subglyph->transform.xx
: -subglyph->transform.xx;
int b = subglyph->transform.yx > 0 ? subglyph->transform.yx
@@ -1027,28 +1110,22 @@
x = FT_MulFix( x, m );
y = FT_MulFix( y, n );
-#else /* 0 */
+#else /* 1 */
- /*************************************************************************/
- /* */
- /* This algorithm is a guess and works much better than the above. */
- /* */
- FT_Fixed mac_xscale = FT_SqrtFixed(
- (FT_Int32)FT_MulFix( subglyph->transform.xx,
- subglyph->transform.xx ) +
- (FT_Int32)FT_MulFix( subglyph->transform.xy,
- subglyph->transform.xy ) );
- FT_Fixed mac_yscale = FT_SqrtFixed(
- (FT_Int32)FT_MulFix( subglyph->transform.yy,
- subglyph->transform.yy ) +
- (FT_Int32)FT_MulFix( subglyph->transform.yx,
- subglyph->transform.yx ) );
+ /*******************************************************************/
+ /* */
+ /* This algorithm is a guess and works much better than the above. */
+ /* */
+ FT_Fixed mac_xscale = FT_Hypot( subglyph->transform.xx,
+ subglyph->transform.xy );
+ FT_Fixed mac_yscale = FT_Hypot( subglyph->transform.yy,
+ subglyph->transform.yx );
x = FT_MulFix( x, mac_xscale );
y = FT_MulFix( y, mac_yscale );
-#endif /* 0 */
+#endif /* 1 */
}
@@ -1074,7 +1151,7 @@
base_vec + num_base_points,
x, y );
- return TT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -1137,27 +1214,29 @@
max_ins = ((TT_Face)loader->face)->max_profile.maxSizeOfInstructions;
if ( n_ins > max_ins )
{
- /* acroread ignores this field, so we only do a rough safety check */
+ /* don't trust `maxSizeOfInstructions'; */
+ /* 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",
+ 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 FT_THROW( Too_Many_Hints );
}
- tmp = loader->exec->glyphSize;
+ 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;
+ return FT_Err_Ok;
if ( FT_STREAM_READ( loader->exec->glyphIns, n_ins ) )
return error;
@@ -1173,7 +1252,7 @@
/* Some points are likely touched during execution of */
/* instructions on components. So let's untouch them. */
- for ( i = start_point; i < loader->zone.n_points; i++ )
+ for ( i = 0; i < loader->zone.n_points; i++ )
loader->zone.tags[i] &= ~FT_CURVE_TAG_TOUCH_BOTH;
loader->zone.n_points += 4;
@@ -1182,21 +1261,131 @@
}
- /* Calculate the four phantom points. */
- /* The first two stand for horizontal origin and advance. */
- /* The last two stand for vertical origin and advance. */
+ /*
+ * Calculate the phantom points
+ *
+ * Defining the right side bearing (rsb) as
+ *
+ * rsb = aw - (lsb + xmax - xmin)
+ *
+ * (with `aw' the advance width, `lsb' the left side bearing, and `xmin'
+ * and `xmax' the glyph's minimum and maximum x value), the OpenType
+ * specification defines the initial position of horizontal phantom points
+ * as
+ *
+ * pp1 = (round(xmin - lsb), 0) ,
+ * pp2 = (round(pp1 + aw), 0) .
+ *
+ * Note that the rounding to the grid (in the device space) is not
+ * documented currently in the specification.
+ *
+ * However, the specification lacks the precise definition of vertical
+ * phantom points. Greg Hitchcock provided the following explanation.
+ *
+ * - a `vmtx' table is present
+ *
+ * For any glyph, the minimum and maximum y values (`ymin' and `ymax')
+ * are given in the `glyf' table, the top side bearing (tsb) and advance
+ * height (ah) are given in the `vmtx' table. The bottom side bearing
+ * (bsb) is then calculated as
+ *
+ * bsb = ah - (tsb + ymax - ymin) ,
+ *
+ * and the initial position of vertical phantom points is
+ *
+ * pp3 = (x, round(ymax + tsb)) ,
+ * pp4 = (x, round(pp3 - ah)) .
+ *
+ * See below for value `x'.
+ *
+ * - no `vmtx' table in the font
+ *
+ * If there is an `OS/2' table, we set
+ *
+ * DefaultAscender = sTypoAscender ,
+ * DefaultDescender = sTypoDescender ,
+ *
+ * otherwise we use data from the `hhea' table:
+ *
+ * DefaultAscender = Ascender ,
+ * DefaultDescender = Descender .
+ *
+ * With these two variables we can now set
+ *
+ * ah = DefaultAscender - sDefaultDescender ,
+ * tsb = DefaultAscender - yMax ,
+ *
+ * and proceed as if a `vmtx' table was present.
+ *
+ * Usually we have
+ *
+ * x = aw / 2 , (1)
+ *
+ * but there is one compatibility case where it can be set to
+ *
+ * x = -DefaultDescender -
+ * ((DefaultAscender - DefaultDescender - aw) / 2) . (2)
+ *
+ * and another one with
+ *
+ * x = 0 . (3)
+ *
+ * In Windows, the history of those values is quite complicated,
+ * depending on the hinting engine (that is, the graphics framework).
+ *
+ * framework from to formula
+ * ----------------------------------------------------------
+ * GDI Windows 98 current (1)
+ * (Windows 2000 for NT)
+ * GDI+ Windows XP Windows 7 (2)
+ * GDI+ Windows 8 current (3)
+ * DWrite Windows 7 current (3)
+ *
+ * For simplicity, FreeType uses (1) for grayscale subpixel hinting and
+ * (3) for everything else.
+ *
+ */
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+#define TT_LOADER_SET_PP( loader ) \
+ do \
+ { \
+ FT_Bool subpixel_ = loader->exec ? loader->exec->subpixel \
+ : 0; \
+ FT_Bool grayscale_ = loader->exec ? loader->exec->grayscale \
+ : 0; \
+ FT_Bool use_aw_2_ = (FT_Bool)( subpixel_ && grayscale_ ); \
+ \
+ \
+ (loader)->pp1.x = (loader)->bbox.xMin - (loader)->left_bearing; \
+ (loader)->pp1.y = 0; \
+ (loader)->pp2.x = (loader)->pp1.x + (loader)->advance; \
+ (loader)->pp2.y = 0; \
+ \
+ (loader)->pp3.x = use_aw_2_ ? (loader)->advance / 2 : 0; \
+ (loader)->pp3.y = (loader)->bbox.yMax + (loader)->top_bearing; \
+ (loader)->pp4.x = use_aw_2_ ? (loader)->advance / 2 : 0; \
+ (loader)->pp4.y = (loader)->pp3.y - (loader)->vadvance; \
+ } while ( 0 )
+
+#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
#define TT_LOADER_SET_PP( loader ) \
- do { \
+ do \
+ { \
(loader)->pp1.x = (loader)->bbox.xMin - (loader)->left_bearing; \
(loader)->pp1.y = 0; \
(loader)->pp2.x = (loader)->pp1.x + (loader)->advance; \
(loader)->pp2.y = 0; \
+ \
(loader)->pp3.x = 0; \
- (loader)->pp3.y = (loader)->top_bearing + (loader)->bbox.yMax; \
+ (loader)->pp3.y = (loader)->bbox.yMax + (loader)->top_bearing; \
(loader)->pp4.x = 0; \
(loader)->pp4.y = (loader)->pp3.y - (loader)->vadvance; \
} while ( 0 )
+#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
/*************************************************************************/
/* */
@@ -1213,7 +1402,7 @@
FT_UInt recurse_count,
FT_Bool header_only )
{
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Fixed x_scale, y_scale;
FT_ULong offset;
TT_Face face = (TT_Face)loader->face;
@@ -1236,14 +1425,14 @@
if ( recurse_count > 1 &&
recurse_count > face->max_profile.maxComponentDepth )
{
- error = TT_Err_Invalid_Composite;
+ error = FT_THROW( Invalid_Composite );
goto Exit;
}
/* check glyph index */
if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
{
- error = TT_Err_Invalid_Glyph_Index;
+ error = FT_THROW( Invalid_Glyph_Index );
goto Exit;
}
@@ -1260,8 +1449,6 @@
y_scale = 0x10000L;
}
- 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 */
/* bytes. */
@@ -1307,7 +1494,7 @@
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
FT_TRACE2(( "no `glyf' table but non-zero `loca' entry\n" ));
- error = TT_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
@@ -1321,7 +1508,17 @@
/* read glyph header first */
error = face->read_glyph_header( loader );
- if ( error || header_only )
+ if ( error )
+ goto Exit;
+
+ /* the metrics must be computed after loading the glyph header */
+ /* since we need the glyph's `yMax' value in case the vertical */
+ /* metrics must be emulated */
+ error = tt_get_metrics( loader, glyph_index );
+ if ( error )
+ goto Exit;
+
+ if ( header_only )
goto Exit;
}
@@ -1332,6 +1529,10 @@
loader->bbox.yMin = 0;
loader->bbox.yMax = 0;
+ error = tt_get_metrics( loader, glyph_index );
+ if ( error )
+ goto Exit;
+
if ( header_only )
goto Exit;
@@ -1356,30 +1557,41 @@
if ( error )
goto Exit;
- loader->pp1.x += deltas[0].x; loader->pp1.y += deltas[0].y;
- loader->pp2.x += deltas[1].x; loader->pp2.y += deltas[1].y;
- loader->pp3.x += deltas[2].x; loader->pp3.y += deltas[2].y;
- loader->pp4.x += deltas[3].x; loader->pp4.y += deltas[3].y;
+ loader->pp1.x += deltas[0].x;
+ loader->pp1.y += deltas[0].y;
+ loader->pp2.x += deltas[1].x;
+ loader->pp2.y += deltas[1].y;
+
+ loader->pp3.x += deltas[2].x;
+ loader->pp3.y += deltas[2].y;
+ loader->pp4.x += deltas[3].x;
+ loader->pp4.y += deltas[3].y;
FT_FREE( deltas );
}
-#endif
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+ /* scale phantom points, if necessary; */
+ /* they get rounded in `TT_Hint_Glyph' */
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );
loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );
+ /* pp1.y and pp2.y are always zero */
+
+ loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale );
loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale );
+ loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale );
loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );
}
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
goto Exit;
}
- /* must initialize points before (possibly) overriding */
- /* glyph metrics from the incremental interface */
+ /* must initialize phantom points before (possibly) overriding */
+ /* glyph metrics from the incremental interface */
TT_LOADER_SET_PP( loader );
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -1452,7 +1664,7 @@
face,
glyph_index,
&deltas,
- gloader->current.num_subglyphs + 4 )) != 0 )
+ gloader->current.num_subglyphs + 4 ) ) != 0 )
goto Exit;
subglyph = gloader->current.subglyphs + gloader->base.num_subglyphs;
@@ -1470,21 +1682,32 @@
}
}
- loader->pp1.x += deltas[i + 0].x; loader->pp1.y += deltas[i + 0].y;
- loader->pp2.x += deltas[i + 1].x; loader->pp2.y += deltas[i + 1].y;
- loader->pp3.x += deltas[i + 2].x; loader->pp3.y += deltas[i + 2].y;
- loader->pp4.x += deltas[i + 3].x; loader->pp4.y += deltas[i + 3].y;
+ loader->pp1.x += deltas[i + 0].x;
+ loader->pp1.y += deltas[i + 0].y;
+ loader->pp2.x += deltas[i + 1].x;
+ loader->pp2.y += deltas[i + 1].y;
+
+ loader->pp3.x += deltas[i + 2].x;
+ loader->pp3.y += deltas[i + 2].y;
+ loader->pp4.x += deltas[i + 3].x;
+ loader->pp4.y += deltas[i + 3].y;
FT_FREE( deltas );
}
#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+ /* scale phantom points, if necessary; */
+ /* they get rounded in `TT_Hint_Glyph' */
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );
loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );
+ /* pp1.y and pp2.y are always zero */
+
+ loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale );
loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale );
+ loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale );
loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );
}
@@ -1544,6 +1767,7 @@
/* restore subglyph pointer */
subglyph = gloader->base.subglyphs + num_base_subgs + n;
+ /* restore phantom points if necessary */
if ( !( subglyph->flags & USE_MY_METRICS ) )
{
loader->pp1 = pp[0];
@@ -1563,8 +1787,12 @@
/* (1): exists from the beginning */
/* (2): components that have been loaded so far */
/* (3): the newly loaded component */
- TT_Process_Composite_Component( loader, subglyph, start_point,
- num_base_points );
+ error = TT_Process_Composite_Component( loader,
+ subglyph,
+ start_point,
+ num_base_points );
+ if ( error )
+ goto Exit;
}
loader->stream = old_stream;
@@ -1573,22 +1801,23 @@
/* process the glyph */
loader->ins_pos = ins_pos;
if ( IS_HINTED( loader->load_flags ) &&
-
#ifdef TT_USE_BYTECODE_INTERPRETER
-
subglyph->flags & WE_HAVE_INSTR &&
-
#endif
-
num_points > start_point )
- TT_Process_Composite_Glyph( loader, start_point, start_contour );
-
+ {
+ error = TT_Process_Composite_Glyph( loader,
+ start_point,
+ start_contour );
+ if ( error )
+ goto Exit;
+ }
}
}
else
{
/* invalid composite count (negative but not -1) */
- error = TT_Err_Invalid_Outline;
+ error = FT_THROW( Invalid_Outline );
goto Exit;
}
@@ -1618,11 +1847,15 @@
compute_glyph_metrics( TT_Loader loader,
FT_UInt glyph_index )
{
+ TT_Face face = (TT_Face)loader->face;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face );
+#endif
+
FT_BBox bbox;
- TT_Face face = (TT_Face)loader->face;
FT_Fixed y_scale;
TT_GlyphSlot glyph = loader->glyph;
- TT_Size size = (TT_Size)loader->size;
+ TT_Size size = (TT_Size)loader->size;
y_scale = 0x10000L;
@@ -1653,8 +1886,30 @@
size->root.metrics.x_ppem,
glyph_index );
- if ( widthp )
- glyph->metrics.horiAdvance = *widthp << 6;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )
+ {
+ FT_Bool ignore_x_mode;
+
+
+ ignore_x_mode = FT_BOOL( FT_LOAD_TARGET_MODE( loader->load_flags ) !=
+ FT_RENDER_MODE_MONO );
+
+ if ( widthp &&
+ ( ( ignore_x_mode && loader->exec->compatible_widths ) ||
+ !ignore_x_mode ||
+ SPH_OPTION_BITMAP_WIDTHS ) )
+ glyph->metrics.horiAdvance = *widthp << 6;
+ }
+ else
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ {
+ if ( widthp )
+ glyph->metrics.horiAdvance = *widthp << 6;
+ }
}
/* set glyph dimensions */
@@ -1831,9 +2086,13 @@
FT_Int32 load_flags,
FT_Bool glyf_table_only )
{
+ FT_Error error;
+
TT_Face face;
FT_Stream stream;
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_Bool pedantic = FT_BOOL( load_flags & FT_LOAD_PEDANTIC );
+#endif
face = (TT_Face)glyph->face;
@@ -1849,42 +2108,153 @@
TT_ExecContext exec;
FT_Bool grayscale;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face );
- if ( !size->cvt_ready )
- {
- FT_Error error = tt_size_ready_bytecode( size, pedantic );
+ FT_Bool subpixel = FALSE;
+#if 0
+ /* not used yet */
+ FT_Bool compatible_widths;
+ FT_Bool symmetrical_smoothing;
+ FT_Bool bgr;
+ FT_Bool subpixel_positioned;
+#endif
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ FT_Bool reexecute = FALSE;
+
+ if ( size->bytecode_ready < 0 || size->cvt_ready < 0 )
+ {
+ error = tt_size_ready_bytecode( size, pedantic );
if ( error )
return error;
}
+ else if ( size->bytecode_ready )
+ return size->bytecode_ready;
+ else if ( size->cvt_ready )
+ return size->cvt_ready;
/* query new execution context */
exec = size->debug ? size->context
: ( (TT_Driver)FT_FACE_DRIVER( face ) )->context;
if ( !exec )
- return TT_Err_Could_Not_Find_Context;
+ return FT_THROW( Could_Not_Find_Context );
- grayscale =
- FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != FT_RENDER_MODE_MONO );
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
- TT_Load_Context( exec, face, size );
+ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )
+ {
+ subpixel = FT_BOOL( ( FT_LOAD_TARGET_MODE( load_flags ) !=
+ FT_RENDER_MODE_MONO ) &&
+ SPH_OPTION_SET_SUBPIXEL );
+
+ if ( subpixel )
+ grayscale = FALSE;
+ else if ( SPH_OPTION_SET_GRAYSCALE )
+ {
+ grayscale = TRUE;
+ subpixel = FALSE;
+ }
+ else
+ grayscale = FALSE;
+
+ if ( FT_IS_TRICKY( glyph->face ) )
+ subpixel = FALSE;
+
+ exec->ignore_x_mode = subpixel || grayscale;
+ exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION;
+ if ( exec->sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 )
+ exec->rasterizer_version = TT_INTERPRETER_VERSION_35;
+
+#if 1
+ exec->compatible_widths = SPH_OPTION_SET_COMPATIBLE_WIDTHS;
+ exec->symmetrical_smoothing = FALSE;
+ exec->bgr = FALSE;
+ exec->subpixel_positioned = TRUE;
+#else /* 0 */
+ exec->compatible_widths =
+ FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=
+ TT_LOAD_COMPATIBLE_WIDTHS );
+ exec->symmetrical_smoothing =
+ FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=
+ TT_LOAD_SYMMETRICAL_SMOOTHING );
+ exec->bgr =
+ FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=
+ TT_LOAD_BGR );
+ exec->subpixel_positioned =
+ FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=
+ TT_LOAD_SUBPIXEL_POSITIONED );
+#endif /* 0 */
+
+ }
+ else
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
- /* a change from mono to grayscale rendering (and vice versa) */
- /* requires a re-execution of the CVT program */
- if ( grayscale != exec->grayscale )
{
- FT_UInt i;
+ grayscale = FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) !=
+ FT_RENDER_MODE_MONO );
+ }
+ error = TT_Load_Context( exec, face, size );
+ if ( error )
+ return error;
- FT_TRACE4(( "tt_loader_init: grayscale change,"
- " re-executing `prep' table\n" ));
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )
+ {
+ /* a change from mono to subpixel rendering (and vice versa) */
+ /* requires a re-execution of the CVT program */
+ if ( subpixel != exec->subpixel )
+ {
+ FT_TRACE4(( "tt_loader_init: subpixel hinting change,"
+ " re-executing `prep' table\n" ));
+
+ exec->subpixel = subpixel;
+ reexecute = TRUE;
+ }
+
+ /* a change from mono to grayscale rendering (and vice versa) */
+ /* requires a re-execution of the CVT program */
+ if ( grayscale != exec->grayscale )
+ {
+ FT_TRACE4(( "tt_loader_init: grayscale hinting change,"
+ " re-executing `prep' table\n" ));
+
+ exec->grayscale = grayscale;
+ reexecute = TRUE;
+ }
+ }
+ else
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ {
+ /* a change from mono to grayscale rendering (and vice versa) */
+ /* requires a re-execution of the CVT program */
+ if ( grayscale != exec->grayscale )
+ {
+ FT_TRACE4(( "tt_loader_init: grayscale change,"
+ " re-executing `prep' table\n" ));
+
+ exec->grayscale = grayscale;
+ reexecute = TRUE;
+ }
+ }
+
+ if ( reexecute )
+ {
+ FT_UInt i;
- 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, pedantic );
+ error = tt_size_run_prep( size, pedantic );
+ if ( error )
+ return error;
}
/* see whether the cvt program has disabled hinting */
@@ -1915,10 +2285,9 @@
#endif
{
- FT_Error error = face->goto_table( face, TTAG_glyf, stream, 0 );
-
+ error = face->goto_table( face, TTAG_glyf, stream, 0 );
- if ( error == TT_Err_Table_Missing )
+ if ( FT_ERR_EQ( error, Table_Missing ) )
loader->glyf_offset = 0;
else if ( error )
{
@@ -1946,7 +2315,7 @@
loader->glyph = (FT_GlyphSlot)glyph;
loader->stream = stream;
- return TT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -1983,13 +2352,11 @@
FT_UInt glyph_index,
FT_Int32 load_flags )
{
- TT_Face face;
FT_Error error;
TT_LoaderRec loader;
- face = (TT_Face)glyph->face;
- error = TT_Err_Ok;
+ FT_TRACE1(( "TT_Load_Glyph: glyph index %d\n", glyph_index ));
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
@@ -2003,20 +2370,27 @@
error = load_sbit_image( size, glyph, glyph_index, load_flags );
if ( !error )
{
- FT_Face root = &face->root;
-
-
- if ( FT_IS_SCALABLE( root ) )
+ if ( FT_IS_SCALABLE( glyph->face ) )
{
/* 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;
+ glyph->linearVertAdvance = loader.vadvance;
+
+ /* sanity checks: if `xxxAdvance' in the sbit metric */
+ /* structure isn't set, use `linearXXXAdvance' */
+ if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance )
+ glyph->metrics.horiAdvance =
+ FT_MulFix( glyph->linearHoriAdvance,
+ size->root.metrics.x_scale );
+ if ( !glyph->metrics.vertAdvance && glyph->linearVertAdvance )
+ glyph->metrics.vertAdvance =
+ FT_MulFix( glyph->linearVertAdvance,
+ size->root.metrics.y_scale );
}
- return TT_Err_Ok;
+ return FT_Err_Ok;
}
}
@@ -2024,10 +2398,10 @@
/* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */
if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid )
- return TT_Err_Invalid_Size_Handle;
+ return FT_THROW( Invalid_Size_Handle );
if ( load_flags & FT_LOAD_SBITS_ONLY )
- return TT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
error = tt_loader_init( &loader, size, glyph, load_flags, FALSE );
if ( error )
@@ -2093,7 +2467,7 @@
#endif /* TT_USE_BYTECODE_INTERPRETER */
- compute_glyph_metrics( &loader, glyph_index );
+ error = compute_glyph_metrics( &loader, glyph_index );
}
/* Set the `high precision' bit flag. */
diff --git a/src/truetype/ttgload.h b/src/truetype/ttgload.h
index 05f7588..3f1699e 100644
--- a/src/truetype/ttgload.h
+++ b/src/truetype/ttgload.h
@@ -43,6 +43,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
TT_Get_VMetrics( TT_Face face,
FT_UInt idx,
+ FT_Pos yMax,
FT_Short* tsb,
FT_UShort* ah );
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 69b702f..1b35539 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -4,7 +4,7 @@
/* */
/* TrueType GX Font Variation loader */
/* */
-/* Copyright 2004-2011 by */
+/* Copyright 2004-2014 by */
/* David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -61,9 +61,9 @@
#define FT_Stream_FTell( stream ) \
- ( (stream)->cursor - (stream)->base )
+ (FT_ULong)( (stream)->cursor - (stream)->base )
#define FT_Stream_SeekSet( stream, off ) \
- ( (stream)->cursor = (stream)->base+(off) )
+ ( (stream)->cursor = (stream)->base + (off) )
/*************************************************************************/
@@ -91,7 +91,9 @@
/* indicates that there is a delta for every point without needing to */
/* enumerate all of them. */
/* */
-#define ALL_POINTS (FT_UShort*)( -1 )
+
+ /* ensure that value `0' has the same width as a pointer */
+#define ALL_POINTS (FT_UShort*)~(FT_PtrDist)0
#define GX_PT_POINTS_ARE_WORDS 0x80
@@ -130,7 +132,7 @@
FT_Int j;
FT_Int first;
FT_Memory memory = stream->memory;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( error );
@@ -215,7 +217,7 @@
FT_Offset i;
FT_UInt j;
FT_Memory memory = stream->memory;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( error );
@@ -283,7 +285,7 @@
FT_Memory memory = stream->memory;
GX_Blend blend = face->blend;
GX_AVarSegment segment;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_ULong version;
FT_Long axisCount;
FT_Int i, j;
@@ -412,7 +414,7 @@
if ( gvar_head.version != (FT_Long)0x00010000L ||
gvar_head.axisCount != (FT_UShort)blend->mmvar->num_axis )
{
- error = TT_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
@@ -501,11 +503,9 @@
FT_Fixed* im_end_coords )
{
FT_UInt i;
- FT_Fixed apply;
- FT_Fixed temp;
+ FT_Fixed apply = 0x10000L;
- apply = 0x10000L;
for ( i = 0; i < blend->num_axis; ++i )
{
if ( tuple_coords[i] == 0 )
@@ -525,11 +525,10 @@
else if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) )
/* not an intermediate tuple */
- apply = FT_MulDiv( apply,
+ apply = FT_MulFix( apply,
blend->normalizedcoords[i] > 0
? blend->normalizedcoords[i]
- : -blend->normalizedcoords[i],
- 0x10000L );
+ : -blend->normalizedcoords[i] );
else if ( blend->normalizedcoords[i] <= im_start_coords[i] ||
blend->normalizedcoords[i] >= im_end_coords[i] )
@@ -539,20 +538,14 @@
}
else if ( blend->normalizedcoords[i] < tuple_coords[i] )
- {
- temp = FT_MulDiv( blend->normalizedcoords[i] - im_start_coords[i],
- 0x10000L,
- tuple_coords[i] - im_start_coords[i]);
- apply = FT_MulDiv( apply, temp, 0x10000L );
- }
+ apply = FT_MulDiv( apply,
+ blend->normalizedcoords[i] - im_start_coords[i],
+ tuple_coords[i] - im_start_coords[i] );
else
- {
- temp = FT_MulDiv( im_end_coords[i] - blend->normalizedcoords[i],
- 0x10000L,
- im_end_coords[i] - tuple_coords[i] );
- apply = FT_MulDiv( apply, temp, 0x10000L );
- }
+ apply = FT_MulDiv( apply,
+ im_end_coords[i] - blend->normalizedcoords[i],
+ im_end_coords[i] - tuple_coords[i] );
}
return apply;
@@ -619,7 +612,7 @@
FT_Stream stream = face->root.stream;
FT_Memory memory = face->root.memory;
FT_ULong table_len;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_ULong fvar_start;
FT_Int i, j;
FT_MM_Var* mmvar = NULL;
@@ -690,7 +683,7 @@
fvar_head.offsetToData + fvar_head.axisCount * 20U +
fvar_head.instanceCount * fvar_head.instanceSize > table_len )
{
- error = TT_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
@@ -712,7 +705,7 @@
mmvar->num_axis =
fvar_head.axisCount;
mmvar->num_designs =
- (FT_UInt)-1; /* meaningless in this context; each glyph */
+ ~0U; /* meaningless in this context; each glyph */
/* may have a different number of designs */
/* (or tuples, as called by Apple) */
mmvar->num_namedstyles =
@@ -856,7 +849,7 @@
FT_UInt num_coords,
FT_Fixed* coords )
{
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
GX_Blend blend;
FT_MM_Var* mmvar;
FT_UInt i;
@@ -884,14 +877,14 @@
if ( num_coords != mmvar->num_axis )
{
- error = TT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
for ( i = 0; i < num_coords; ++i )
if ( coords[i] < -0x00010000L || coords[i] > 0x00010000L )
{
- error = TT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -945,13 +938,13 @@
FT_FREE( face->cvt );
face->cvt = NULL;
- tt_face_load_cvt( face, face->root.stream );
+ error = tt_face_load_cvt( face, face->root.stream );
break;
case mcvt_modify:
/* The original cvt table is in memory. All we need to do is */
/* apply the `cvar' table (if any). */
- tt_face_vary_cvt( face, face->root.stream );
+ error = tt_face_vary_cvt( face, face->root.stream );
break;
case mcvt_retain:
@@ -992,7 +985,7 @@
FT_UInt num_coords,
FT_Fixed* coords )
{
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Fixed* normalized = NULL;
GX_Blend blend;
FT_MM_Var* mmvar;
@@ -1013,7 +1006,7 @@
if ( num_coords != mmvar->num_axis )
{
- error = TT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -1029,24 +1022,16 @@
{
if ( coords[i] > a->maximum || coords[i] < a->minimum )
{
- error = TT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
if ( coords[i] < a->def )
- {
- normalized[i] = -FT_MulDiv( coords[i] - a->def,
- 0x10000L,
- a->minimum - a->def );
- }
+ normalized[i] = -FT_DivFix( coords[i] - a->def, a->minimum - a->def );
else if ( a->maximum == a->def )
normalized[i] = 0;
else
- {
- normalized[i] = FT_MulDiv( coords[i] - a->def,
- 0x10000L,
- a->maximum - a->def );
- }
+ normalized[i] = FT_DivFix( coords[i] - a->def, a->maximum - a->def );
}
if ( !blend->avar_checked )
@@ -1061,15 +1046,11 @@
if ( normalized[i] < av->correspondence[j].fromCoord )
{
normalized[i] =
- FT_MulDiv(
- FT_MulDiv(
- normalized[i] - av->correspondence[j - 1].fromCoord,
- 0x10000L,
- av->correspondence[j].fromCoord -
- av->correspondence[j - 1].fromCoord ),
- av->correspondence[j].toCoord -
- av->correspondence[j - 1].toCoord,
- 0x10000L ) +
+ FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord,
+ av->correspondence[j].toCoord -
+ av->correspondence[j - 1].toCoord,
+ av->correspondence[j].fromCoord -
+ av->correspondence[j - 1].fromCoord ) +
av->correspondence[j - 1].toCoord;
break;
}
@@ -1141,7 +1122,7 @@
{
FT_TRACE2(( "tt_face_vary_cvt: no blend specified\n" ));
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
goto Exit;
}
@@ -1149,7 +1130,7 @@
{
FT_TRACE2(( "tt_face_vary_cvt: no `cvt ' table\n" ));
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
goto Exit;
}
@@ -1158,13 +1139,13 @@
{
FT_TRACE2(( "is missing\n" ));
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
goto Exit;
}
if ( FT_FRAME_ENTER( table_len ) )
{
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
goto Exit;
}
@@ -1173,7 +1154,7 @@
{
FT_TRACE2(( "bad table version\n" ));
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
goto FExit;
}
@@ -1344,7 +1325,7 @@
if ( !face->doblend || blend == NULL )
- return TT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* to be freed by the caller */
if ( FT_NEW_ARRAY( delta_xy, n_points ) )
@@ -1354,7 +1335,7 @@
if ( glyph_index >= blend->gv_glyphcnt ||
blend->glyphoffsets[glyph_index] ==
blend->glyphoffsets[glyph_index + 1] )
- return TT_Err_Ok; /* no variation data for this glyph */
+ return FT_Err_Ok; /* no variation data for this glyph */
if ( FT_STREAM_SEEK( blend->glyphoffsets[glyph_index] ) ||
FT_FRAME_ENTER( blend->glyphoffsets[glyph_index + 1] -
@@ -1404,7 +1385,7 @@
}
else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount )
{
- error = TT_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Fail3;
}
else
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 3acb24a..eccd4aa 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -4,7 +4,7 @@
/* */
/* TrueType bytecode interpreter (body). */
/* */
-/* Copyright 1996-2012 */
+/* Copyright 1996-2014 */
/* by David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,20 +25,16 @@
#include FT_INTERNAL_CALC_H
#include FT_TRIGONOMETRY_H
#include FT_SYSTEM_H
+#include FT_TRUETYPE_DRIVER_H
#include "ttinterp.h"
-
#include "tterrors.h"
+#include "ttsubpix.h"
#ifdef TT_USE_BYTECODE_INTERPRETER
-#define TT_MULFIX FT_MulFix
-#define TT_MULDIV FT_MulDiv
-#define TT_MULDIV_NO_ROUND FT_MulDiv_No_Round
-
-
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
@@ -52,7 +48,7 @@
/* */
/* In order to detect infinite loops in the code, we set up a counter */
/* within the run loop. A single stroke of interpretation is now */
- /* limited to a maximal number of opcodes defined below. */
+ /* limited to a maximum number of opcodes defined below. */
/* */
#define MAX_RUNNABLE_OPCODES 1000000L
@@ -136,6 +132,11 @@
#define FT_UNUSED_ARG FT_UNUSED_EXEC; FT_UNUSED( args )
+#define SUBPIXEL_HINTING \
+ ( ((TT_Driver)FT_FACE_DRIVER( CUR.face ))->interpreter_version == \
+ TT_INTERPRETER_VERSION_38 )
+
+
/*************************************************************************/
/* */
/* The following macros hide the use of EXEC_ARG and EXEC_ARG_ to */
@@ -171,6 +172,9 @@
#define CUR_Func_round( d, c ) \
CUR.func_round( EXEC_ARG_ d, c )
+#define CUR_Func_cur_ppem() \
+ CUR.func_cur_ppem( EXEC_ARG )
+
#define CUR_Func_read_cvt( index ) \
CUR.func_read_cvt( EXEC_ARG_ index )
@@ -183,12 +187,6 @@
#define CURRENT_Ratio() \
Current_Ratio( EXEC_ARG )
-#define CURRENT_Ppem() \
- Current_Ppem( EXEC_ARG )
-
-#define CUR_Ppem() \
- Cur_PPEM( EXEC_ARG )
-
#define INS_SxVTL( a, b, c, d ) \
Ins_SxVTL( EXEC_ARG_ a, b, c, d )
@@ -232,6 +230,14 @@
#define BOUNDS( x, n ) ( (FT_UInt)(x) >= (FT_UInt)(n) )
#define BOUNDSL( x, n ) ( (FT_ULong)(x) >= (FT_ULong)(n) )
+ /*************************************************************************/
+ /* */
+ /* This macro computes (a*2^14)/b and complements TT_MulFix14. */
+ /* */
+#define TT_DivFix14( a, b ) \
+ FT_DivFix( a, (b) << 2 )
+
+
#undef SUCCESS
#define SUCCESS 0
@@ -273,10 +279,7 @@
/* <InOut> */
/* exec :: The target execution context. */
/* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL_DEF( void )
TT_Goto_CodeRange( TT_ExecContext exec,
FT_Int range,
FT_Long IP )
@@ -300,8 +303,6 @@
exec->codeSize = coderange->size;
exec->IP = IP;
exec->curRange = range;
-
- return TT_Err_Ok;
}
@@ -323,10 +324,7 @@
/* <InOut> */
/* exec :: The target execution context. */
/* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL_DEF( void )
TT_Set_CodeRange( TT_ExecContext exec,
FT_Int range,
void* base,
@@ -336,8 +334,6 @@
exec->codeRangeTable[range - 1].base = (FT_Byte*)base;
exec->codeRangeTable[range - 1].size = length;
-
- return TT_Err_Ok;
}
@@ -355,13 +351,7 @@
/* <InOut> */
/* exec :: The target execution context. */
/* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* Does not set the Error variable. */
- /* */
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL_DEF( void )
TT_Clear_CodeRange( TT_ExecContext exec,
FT_Int range )
{
@@ -369,8 +359,6 @@
exec->codeRangeTable[range - 1].base = NULL;
exec->codeRangeTable[range - 1].size = 0;
-
- return TT_Err_Ok;
}
@@ -394,13 +382,10 @@
/* */
/* memory :: A handle to the parent memory object. */
/* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
/* <Note> */
/* Only the glyph loader and debugger should call this function. */
/* */
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL_DEF( void )
TT_Done_Context( TT_ExecContext exec )
{
FT_Memory memory = exec->memory;
@@ -427,8 +412,6 @@
exec->face = NULL;
FT_FREE( exec );
-
- return TT_Err_Ok;
}
@@ -478,7 +461,7 @@
exec->face = NULL;
exec->size = NULL;
- return TT_Err_Ok;
+ return FT_Err_Ok;
Fail_Memory:
FT_ERROR(( "Init_Context: not enough memory for %p\n", exec ));
@@ -530,7 +513,7 @@
*size = new_max;
}
- return TT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -637,7 +620,7 @@
exec->instruction_trap = FALSE;
- return TT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -655,13 +638,10 @@
/* <InOut> */
/* size :: A handle to the target size object. */
/* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
/* <Note> */
/* Only the glyph loader and debugger should call this function. */
/* */
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL_DEF( void )
TT_Save_Context( TT_ExecContext exec,
TT_Size size )
{
@@ -679,8 +659,6 @@
for ( i = 0; i < TT_MAX_CODE_RANGES; i++ )
size->codeRangeTable[i] = exec->codeRangeTable[i];
-
- return TT_Err_Ok;
}
@@ -712,12 +690,7 @@
TT_Run_Context( TT_ExecContext exec,
FT_Bool debug )
{
- FT_Error error;
-
-
- if ( ( error = TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 ) )
- != TT_Err_Ok )
- return error;
+ TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 );
exec->zp0 = exec->pts;
exec->zp1 = exec->pts;
@@ -753,7 +726,7 @@
if ( !debug )
return TT_RunIns( exec );
else
- return TT_Err_Ok;
+ return FT_Err_Ok;
#endif
}
@@ -787,16 +760,18 @@
FT_EXPORT_DEF( TT_ExecContext )
TT_New_Context( TT_Driver driver )
{
- TT_ExecContext exec;
- FT_Memory memory;
+ FT_Memory memory;
+
+ if ( !driver )
+ goto Fail;
memory = driver->root.root.memory;
- exec = driver->context;
if ( !driver->context )
{
- FT_Error error;
+ FT_Error error;
+ TT_ExecContext exec;
/* allocate object */
@@ -1428,9 +1403,108 @@
#undef PACK
-#if 1
+
+#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
+
+#if defined( __arm__ ) && \
+ ( defined( __thumb2__ ) || !defined( __thumb__ ) )
+
+#define TT_MulFix14 TT_MulFix14_arm
static FT_Int32
+ TT_MulFix14_arm( FT_Int32 a,
+ FT_Int b )
+ {
+ FT_Int32 t, t2;
+
+
+#if defined( __CC_ARM ) || defined( __ARMCC__ )
+
+ __asm
+ {
+ smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
+ mov a, t, asr #31 /* a = (hi >> 31) */
+ add a, a, #0x2000 /* a += 0x2000 */
+ adds t2, t2, a /* t2 += a */
+ adc t, t, #0 /* t += carry */
+ mov a, t2, lsr #14 /* a = t2 >> 14 */
+ orr a, a, t, lsl #18 /* a |= t << 18 */
+ }
+
+#elif defined( __GNUC__ )
+
+ __asm__ __volatile__ (
+ "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
+ "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
+#if defined( __clang__ ) && defined( __thumb2__ )
+ "add.w %0, %0, #0x2000\n\t" /* %0 += 0x2000 */
+#else
+ "add %0, %0, #0x2000\n\t" /* %0 += 0x2000 */
+#endif
+ "adds %1, %1, %0\n\t" /* %1 += %0 */
+ "adc %2, %2, #0\n\t" /* %2 += carry */
+ "mov %0, %1, lsr #14\n\t" /* %0 = %1 >> 16 */
+ "orr %0, %0, %2, lsl #18\n\t" /* %0 |= %2 << 16 */
+ : "=r"(a), "=&r"(t2), "=&r"(t)
+ : "r"(a), "r"(b)
+ : "cc" );
+
+#endif
+
+ return a;
+ }
+
+#endif /* __arm__ && ( __thumb2__ || !__thumb__ ) */
+
+#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
+
+
+#if defined( __GNUC__ ) && \
+ ( defined( __i386__ ) || defined( __x86_64__ ) )
+
+#define TT_MulFix14 TT_MulFix14_long_long
+
+ /* Temporarily disable the warning that C90 doesn't support `long long'. */
+#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406
+#pragma GCC diagnostic push
+#endif
+#pragma GCC diagnostic ignored "-Wlong-long"
+
+ /* This is declared `noinline' because inlining the function results */
+ /* in slower code. The `pure' attribute indicates that the result */
+ /* only depends on the parameters. */
+ static __attribute__(( noinline ))
+ __attribute__(( pure )) FT_Int32
+ TT_MulFix14_long_long( FT_Int32 a,
+ FT_Int b )
+ {
+
+ long long ret = (long long)a * b;
+
+ /* The following line assumes that right shifting of signed values */
+ /* will actually preserve the sign bit. The exact behaviour is */
+ /* undefined, but this is true on x86 and x86_64. */
+ long long tmp = ret >> 63;
+
+
+ ret += 0x2000 + tmp;
+
+ return (FT_Int32)( ret >> 14 );
+ }
+
+#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406
+#pragma GCC diagnostic pop
+#endif
+
+#endif /* __GNUC__ && ( __i386__ || __x86_64__ ) */
+
+
+#ifndef TT_MulFix14
+
+ /* Compute (a*b)/2^14 with maximum accuracy and rounding. */
+ /* This is optimized to be faster than calling FT_MulFix() */
+ /* for platforms where sizeof(int) == 2. */
+ static FT_Int32
TT_MulFix14( FT_Int32 a,
FT_Int b )
{
@@ -1461,39 +1535,52 @@
return sign >= 0 ? (FT_Int32)mid : -(FT_Int32)mid;
}
-#else
+#endif /* !TT_MulFix14 */
- /* compute (a*b)/2^14 with maximal accuracy and rounding */
- static FT_Int32
- TT_MulFix14( FT_Int32 a,
- FT_Int b )
- {
- FT_Int32 m, s, hi;
- FT_UInt32 l, lo;
+#if defined( __GNUC__ ) && \
+ ( defined( __i386__ ) || \
+ defined( __x86_64__ ) || \
+ defined( __arm__ ) )
- /* compute ax*bx as 64-bit value */
- l = (FT_UInt32)( ( a & 0xFFFFU ) * b );
- m = ( a >> 16 ) * b;
+#define TT_DotFix14 TT_DotFix14_long_long
- lo = l + (FT_UInt32)( m << 16 );
- hi = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo < l );
+#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406
+#pragma GCC diagnostic push
+#endif
+#pragma GCC diagnostic ignored "-Wlong-long"
- /* divide the result by 2^14 with rounding */
- s = hi >> 31;
- l = lo + (FT_UInt32)s;
- hi += s + ( l < lo );
- lo = l;
+ static __attribute__(( pure )) FT_Int32
+ TT_DotFix14_long_long( FT_Int32 ax,
+ FT_Int32 ay,
+ FT_Int bx,
+ FT_Int by )
+ {
+ /* Temporarily disable the warning that C90 doesn't support */
+ /* `long long'. */
- l = lo + 0x2000U;
- hi += l < lo;
+ long long temp1 = (long long)ax * bx;
+ long long temp2 = (long long)ay * by;
+
+
+ temp1 += temp2;
+ temp2 = temp1 >> 63;
+ temp1 += 0x2000 + temp2;
+
+ return (FT_Int32)( temp1 >> 14 );
- return ( hi << 18 ) | ( l >> 14 );
}
+
+#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406
+#pragma GCC diagnostic pop
#endif
+#endif /* __GNUC__ && (__arm__ || __i386__ || __x86_64__) */
+
- /* compute (ax*bx+ay*by)/2^14 with maximal accuracy and rounding */
+#ifndef TT_DotFix14
+
+ /* compute (ax*bx+ay*by)/2^14 with maximum accuracy and rounding */
static FT_Int32
TT_DotFix14( FT_Int32 ax,
FT_Int32 ay,
@@ -1508,14 +1595,14 @@
l = (FT_UInt32)( ( ax & 0xFFFFU ) * bx );
m = ( ax >> 16 ) * bx;
- lo1 = l + (FT_UInt32)( m << 16 );
+ lo1 = l + ( (FT_UInt32)m << 16 );
hi1 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo1 < l );
/* compute ay*by as 64-bit value */
l = (FT_UInt32)( ( ay & 0xFFFFU ) * by );
m = ( ay >> 16 ) * by;
- lo2 = l + (FT_UInt32)( m << 16 );
+ lo2 = l + ( (FT_UInt32)m << 16 );
hi2 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo2 < l );
/* add them */
@@ -1531,98 +1618,10 @@
l = lo + 0x2000U;
hi += ( l < lo );
- return ( hi << 18 ) | ( l >> 14 );
- }
-
-
- /* return length of given vector */
-
-#if 0
-
- static FT_Int32
- TT_VecLen( FT_Int32 x,
- FT_Int32 y )
- {
- FT_Int32 m, hi1, hi2, hi;
- FT_UInt32 l, lo1, lo2, lo;
-
-
- /* compute x*x as 64-bit value */
- lo = (FT_UInt32)( x & 0xFFFFU );
- hi = x >> 16;
-
- l = lo * lo;
- m = hi * lo;
- hi = hi * hi;
-
- lo1 = l + (FT_UInt32)( m << 17 );
- hi1 = hi + ( m >> 15 ) + ( lo1 < l );
-
- /* compute y*y as 64-bit value */
- lo = (FT_UInt32)( y & 0xFFFFU );
- hi = y >> 16;
-
- l = lo * lo;
- m = hi * lo;
- hi = hi * hi;
-
- lo2 = l + (FT_UInt32)( m << 17 );
- hi2 = hi + ( m >> 15 ) + ( lo2 < l );
-
- /* add them to get 'x*x+y*y' as 64-bit value */
- lo = lo1 + lo2;
- hi = hi1 + hi2 + ( lo < lo1 );
-
- /* compute the square root of this value */
- {
- FT_UInt32 root, rem, test_div;
- FT_Int count;
-
-
- root = 0;
-
- {
- rem = 0;
- count = 32;
- do
- {
- rem = ( rem << 2 ) | ( (FT_UInt32)hi >> 30 );
- hi = ( hi << 2 ) | ( lo >> 30 );
- lo <<= 2;
- root <<= 1;
- test_div = ( root << 1 ) + 1;
-
- if ( rem >= test_div )
- {
- rem -= test_div;
- root += 1;
- }
- } while ( --count );
- }
-
- return (FT_Int32)root;
- }
- }
-
-#else
-
- /* this version uses FT_Vector_Length which computes the same value */
- /* much, much faster.. */
- /* */
- static FT_F26Dot6
- TT_VecLen( FT_F26Dot6 X,
- FT_F26Dot6 Y )
- {
- FT_Vector v;
-
-
- v.x = X;
- v.y = Y;
-
- return FT_Vector_Length( &v );
+ return (FT_Int32)( ( (FT_UInt32)hi << 18 ) | ( l >> 14 ) );
}
-#endif
+#endif /* TT_DotFix14 */
/*************************************************************************/
@@ -1661,14 +1660,14 @@
else
{
- FT_Long x, y;
+ FT_F26Dot6 x, y;
- x = TT_MULDIV( CUR.GS.projVector.x,
- CUR.tt_metrics.x_ratio, 0x4000 );
- y = TT_MULDIV( CUR.GS.projVector.y,
- CUR.tt_metrics.y_ratio, 0x4000 );
- CUR.tt_metrics.ratio = TT_VecLen( x, y );
+ x = TT_MulFix14( CUR.tt_metrics.x_ratio,
+ CUR.GS.projVector.x );
+ y = TT_MulFix14( CUR.tt_metrics.y_ratio,
+ CUR.GS.projVector.y );
+ CUR.tt_metrics.ratio = FT_Hypot( x, y );
}
}
}
@@ -1676,10 +1675,17 @@
}
- static FT_Long
+ FT_CALLBACK_DEF( FT_Long )
Current_Ppem( EXEC_OP )
{
- return TT_MULFIX( CUR.tt_metrics.ppem, CURRENT_Ratio() );
+ return CUR.tt_metrics.ppem;
+ }
+
+
+ FT_CALLBACK_DEF( FT_Long )
+ Current_Ppem_Stretched( EXEC_OP )
+ {
+ return FT_MulFix( CUR.tt_metrics.ppem, CURRENT_Ratio() );
}
@@ -1700,7 +1706,7 @@
FT_CALLBACK_DEF( FT_F26Dot6 )
Read_CVT_Stretched( EXEC_OP_ FT_ULong idx )
{
- return TT_MULFIX( CUR.cvt[idx], CURRENT_Ratio() );
+ return FT_MulFix( CUR.cvt[idx], CURRENT_Ratio() );
}
@@ -1786,7 +1792,7 @@
if ( aRange < 1 || aRange > 3 )
{
- CUR.error = TT_Err_Bad_Argument;
+ CUR.error = FT_THROW( Bad_Argument );
return FAILURE;
}
@@ -1794,7 +1800,7 @@
if ( range->base == NULL ) /* invalid coderange */
{
- CUR.error = TT_Err_Invalid_CodeRange;
+ CUR.error = FT_THROW( Invalid_CodeRange );
return FAILURE;
}
@@ -1804,7 +1810,7 @@
if ( aIP > range->size )
{
- CUR.error = TT_Err_Code_Overflow;
+ CUR.error = FT_THROW( Code_Overflow );
return FAILURE;
}
@@ -1850,9 +1856,12 @@
if ( v != 0 )
{
- zone->cur[point].x += TT_MULDIV( distance,
- v * 0x10000L,
- CUR.F_dot_P );
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( !SUBPIXEL_HINTING ||
+ ( !CUR.ignore_x_mode ||
+ ( CUR.sph_tweak_flags & SPH_TWEAK_ALLOW_X_DMOVE ) ) )
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+ zone->cur[point].x += FT_MulDiv( distance, v, CUR.F_dot_P );
zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
@@ -1861,9 +1870,7 @@
if ( v != 0 )
{
- zone->cur[point].y += TT_MULDIV( distance,
- v * 0x10000L,
- CUR.F_dot_P );
+ zone->cur[point].y += FT_MulDiv( distance, v, CUR.F_dot_P );
zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
@@ -1902,16 +1909,12 @@
v = CUR.GS.freeVector.x;
if ( v != 0 )
- zone->org[point].x += TT_MULDIV( distance,
- v * 0x10000L,
- CUR.F_dot_P );
+ zone->org[point].x += FT_MulDiv( distance, v, CUR.F_dot_P );
v = CUR.GS.freeVector.y;
if ( v != 0 )
- zone->org[point].y += TT_MULDIV( distance,
- v * 0x10000L,
- CUR.F_dot_P );
+ zone->org[point].y += FT_MulDiv( distance, v, CUR.F_dot_P );
}
@@ -1932,7 +1935,12 @@
{
FT_UNUSED_EXEC;
- zone->cur[point].x += distance;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( !SUBPIXEL_HINTING ||
+ !CUR.ignore_x_mode )
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+ zone->cur[point].x += distance;
+
zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
@@ -2015,7 +2023,7 @@
if ( distance >= 0 )
{
val = distance + compensation;
- if ( distance && val < 0 )
+ if ( val < 0 )
val = 0;
}
else
@@ -2055,10 +2063,8 @@
if ( distance >= 0 )
{
- val = distance + compensation + 32;
- if ( distance && val > 0 )
- val &= ~63;
- else
+ val = FT_PIX_ROUND( distance + compensation );
+ if ( val < 0 )
val = 0;
}
else
@@ -2100,14 +2106,14 @@
if ( distance >= 0 )
{
val = FT_PIX_FLOOR( distance + compensation ) + 32;
- if ( distance && val < 0 )
- val = 0;
+ if ( val < 0 )
+ val = 32;
}
else
{
val = -( FT_PIX_FLOOR( compensation - distance ) + 32 );
if ( val > 0 )
- val = 0;
+ val = -32;
}
return val;
@@ -2141,15 +2147,13 @@
if ( distance >= 0 )
{
- val = distance + compensation;
- if ( distance && val > 0 )
- val &= ~63;
- else
+ val = FT_PIX_FLOOR( distance + compensation );
+ if ( val < 0 )
val = 0;
}
else
{
- val = -( ( compensation - distance ) & -64 );
+ val = -FT_PIX_FLOOR( compensation - distance );
if ( val > 0 )
val = 0;
}
@@ -2185,15 +2189,13 @@
if ( distance >= 0 )
{
- val = distance + compensation + 63;
- if ( distance && val > 0 )
- val &= ~63;
- else
+ val = FT_PIX_CEIL( distance + compensation );
+ if ( val < 0 )
val = 0;
}
else
{
- val = - FT_PIX_CEIL( compensation - distance );
+ val = -FT_PIX_CEIL( compensation - distance );
if ( val > 0 )
val = 0;
}
@@ -2229,10 +2231,8 @@
if ( distance >= 0 )
{
- val = distance + compensation + 16;
- if ( distance && val > 0 )
- val &= ~31;
- else
+ val = FT_PAD_ROUND( distance + compensation, 32 );
+ if ( val < 0 )
val = 0;
}
else
@@ -2279,17 +2279,17 @@
{
val = ( distance - CUR.phase + CUR.threshold + compensation ) &
-CUR.period;
- if ( distance && val < 0 )
- val = 0;
val += CUR.phase;
+ if ( val < 0 )
+ val = CUR.phase;
}
else
{
val = -( ( CUR.threshold - CUR.phase - distance + compensation ) &
-CUR.period );
- if ( val > 0 )
- val = 0;
val -= CUR.phase;
+ if ( val > 0 )
+ val = -CUR.phase;
}
return val;
@@ -2327,17 +2327,17 @@
{
val = ( ( distance - CUR.phase + CUR.threshold + compensation ) /
CUR.period ) * CUR.period;
- if ( distance && val < 0 )
- val = 0;
val += CUR.phase;
+ if ( val < 0 )
+ val = CUR.phase;
}
else
{
val = -( ( ( CUR.threshold - CUR.phase - distance + compensation ) /
CUR.period ) * CUR.period );
- if ( val > 0 )
- val = 0;
val -= CUR.phase;
+ if ( val > 0 )
+ val = -CUR.phase;
}
return val;
@@ -2404,8 +2404,9 @@
/* Sets Super Round parameters. */
/* */
/* <Input> */
- /* GridPeriod :: Grid period */
- /* selector :: SROUND opcode */
+ /* GridPeriod :: The grid period. */
+ /* */
+ /* selector :: The SROUND opcode. */
/* */
static void
SetSuperRound( EXEC_OP_ FT_F26Dot6 GridPeriod,
@@ -2617,13 +2618,10 @@
if ( CUR.GS.dualVector.x == 0x4000 )
CUR.func_dualproj = Project_x;
+ else if ( CUR.GS.dualVector.y == 0x4000 )
+ CUR.func_dualproj = Project_y;
else
- {
- if ( CUR.GS.dualVector.y == 0x4000 )
- CUR.func_dualproj = Project_y;
- else
- CUR.func_dualproj = Dual_Project;
- }
+ CUR.func_dualproj = Dual_Project;
/* Force recalculation of cached aspect ratio */
CUR.tt_metrics.ratio = 0;
@@ -2633,61 +2631,50 @@
#endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING */
if ( CUR.GS.freeVector.x == 0x4000 )
- CUR.F_dot_P = CUR.GS.projVector.x * 0x10000L;
+ CUR.F_dot_P = CUR.GS.projVector.x;
+ else if ( CUR.GS.freeVector.y == 0x4000 )
+ CUR.F_dot_P = CUR.GS.projVector.y;
else
- {
- if ( CUR.GS.freeVector.y == 0x4000 )
- CUR.F_dot_P = CUR.GS.projVector.y * 0x10000L;
- else
- CUR.F_dot_P = (FT_Long)CUR.GS.projVector.x * CUR.GS.freeVector.x * 4 +
- (FT_Long)CUR.GS.projVector.y * CUR.GS.freeVector.y * 4;
- }
+ CUR.F_dot_P = ( (FT_Long)CUR.GS.projVector.x * CUR.GS.freeVector.x +
+ (FT_Long)CUR.GS.projVector.y * CUR.GS.freeVector.y ) >>
+ 14;
if ( CUR.GS.projVector.x == 0x4000 )
CUR.func_project = (TT_Project_Func)Project_x;
+ else if ( CUR.GS.projVector.y == 0x4000 )
+ CUR.func_project = (TT_Project_Func)Project_y;
else
- {
- if ( CUR.GS.projVector.y == 0x4000 )
- CUR.func_project = (TT_Project_Func)Project_y;
- else
- CUR.func_project = (TT_Project_Func)Project;
- }
+ CUR.func_project = (TT_Project_Func)Project;
if ( CUR.GS.dualVector.x == 0x4000 )
CUR.func_dualproj = (TT_Project_Func)Project_x;
+ else if ( CUR.GS.dualVector.y == 0x4000 )
+ CUR.func_dualproj = (TT_Project_Func)Project_y;
else
- {
- if ( CUR.GS.dualVector.y == 0x4000 )
- CUR.func_dualproj = (TT_Project_Func)Project_y;
- else
- CUR.func_dualproj = (TT_Project_Func)Dual_Project;
- }
+ CUR.func_dualproj = (TT_Project_Func)Dual_Project;
CUR.func_move = (TT_Move_Func)Direct_Move;
CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig;
- if ( CUR.F_dot_P == 0x40000000L )
+ if ( CUR.F_dot_P == 0x4000L )
{
if ( CUR.GS.freeVector.x == 0x4000 )
{
CUR.func_move = (TT_Move_Func)Direct_Move_X;
CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_X;
}
- else
+ else if ( CUR.GS.freeVector.y == 0x4000 )
{
- if ( CUR.GS.freeVector.y == 0x4000 )
- {
- CUR.func_move = (TT_Move_Func)Direct_Move_Y;
- CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y;
- }
+ CUR.func_move = (TT_Move_Func)Direct_Move_Y;
+ CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y;
}
}
/* at small sizes, F_dot_P can become too small, resulting */
/* in overflows and `spikes' in a number of glyphs like `w'. */
- if ( FT_ABS( CUR.F_dot_P ) < 0x4000000L )
- CUR.F_dot_P = 0x40000000L;
+ if ( FT_ABS( CUR.F_dot_P ) < 0x400L )
+ CUR.F_dot_P = 0x4000L;
/* Disable cached aspect ratio */
CUR.tt_metrics.ratio = 0;
@@ -2716,98 +2703,33 @@
/* In case Vx and Vy are both zero, Normalize() returns SUCCESS, and */
/* R is undefined. */
/* */
-
-
static FT_Bool
Normalize( EXEC_OP_ FT_F26Dot6 Vx,
FT_F26Dot6 Vy,
FT_UnitVector* R )
{
FT_F26Dot6 W;
- FT_Bool S1, S2;
FT_UNUSED_EXEC;
- if ( FT_ABS( Vx ) < 0x10000L && FT_ABS( Vy ) < 0x10000L )
+ if ( FT_ABS( Vx ) < 0x4000L && FT_ABS( Vy ) < 0x4000L )
{
- Vx *= 0x100;
- Vy *= 0x100;
-
- W = TT_VecLen( Vx, Vy );
-
- if ( W == 0 )
+ if ( Vx == 0 && Vy == 0 )
{
/* XXX: UNDOCUMENTED! It seems that it is possible to try */
/* to normalize the vector (0,0). Return immediately. */
return SUCCESS;
}
- R->x = (FT_F2Dot14)FT_MulDiv( Vx, 0x4000L, W );
- R->y = (FT_F2Dot14)FT_MulDiv( Vy, 0x4000L, W );
-
- return SUCCESS;
+ Vx *= 0x4000;
+ Vy *= 0x4000;
}
- W = TT_VecLen( Vx, Vy );
-
- Vx = FT_MulDiv( Vx, 0x4000L, W );
- Vy = FT_MulDiv( Vy, 0x4000L, W );
-
- W = Vx * Vx + Vy * Vy;
-
- /* Now, we want that Sqrt( W ) = 0x4000 */
- /* Or 0x10000000 <= W < 0x10004000 */
+ W = FT_Hypot( Vx, Vy );
- if ( Vx < 0 )
- {
- Vx = -Vx;
- S1 = TRUE;
- }
- else
- S1 = FALSE;
-
- if ( Vy < 0 )
- {
- Vy = -Vy;
- S2 = TRUE;
- }
- else
- S2 = FALSE;
-
- while ( W < 0x10000000L )
- {
- /* We need to increase W by a minimal amount */
- if ( Vx < Vy )
- Vx++;
- else
- Vy++;
-
- W = Vx * Vx + Vy * Vy;
- }
-
- while ( W >= 0x10004000L )
- {
- /* We need to decrease W by a minimal amount */
- if ( Vx < Vy )
- Vx--;
- else
- Vy--;
-
- W = Vx * Vx + Vy * Vy;
- }
-
- /* Note that in various cases, we can only */
- /* compute a Sqrt(W) of 0x3FFF, eg. Vx = Vy */
-
- if ( S1 )
- Vx = -Vx;
-
- if ( S2 )
- Vy = -Vy;
-
- R->x = (FT_F2Dot14)Vx; /* Type conversion */
- R->y = (FT_F2Dot14)Vy; /* Type conversion */
+ R->x = (FT_F2Dot14)TT_DivFix14( Vx, W );
+ R->y = (FT_F2Dot14)TT_DivFix14( Vy, W );
return SUCCESS;
}
@@ -2835,7 +2757,7 @@
BOUNDS( aIdx2, CUR.zp1.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return FAILURE;
}
@@ -3091,10 +3013,10 @@
CUR.func_round = (TT_Round_Func)Round_Super_45;
-#define DO_SLOOP \
- if ( args[0] < 0 ) \
- CUR.error = TT_Err_Bad_Argument; \
- else \
+#define DO_SLOOP \
+ if ( args[0] < 0 ) \
+ CUR.error = FT_THROW( Bad_Argument ); \
+ else \
CUR.GS.loop = args[0];
@@ -3110,14 +3032,9 @@
CUR.GS.single_width_cutin = (FT_F26Dot6)args[0];
- /* XXX: UNDOCUMENTED! or bug in the Windows engine? */
- /* */
- /* It seems that the value that is read here is */
- /* expressed in 16.16 format rather than in font */
- /* units. */
- /* */
-#define DO_SSW \
- CUR.GS.single_width_value = (FT_F26Dot6)( args[0] >> 10 );
+#define DO_SSW \
+ CUR.GS.single_width_value = FT_MulFix( args[0], \
+ CUR.tt_metrics.scale );
#define DO_FLIPON \
@@ -3128,19 +3045,22 @@
CUR.GS.auto_flip = FALSE;
-#define DO_SDB \
- CUR.GS.delta_base = (FT_Short)args[0];
+#define DO_SDB \
+ CUR.GS.delta_base = (FT_UShort)args[0];
-#define DO_SDS \
- CUR.GS.delta_shift = (FT_Short)args[0];
+#define DO_SDS \
+ if ( (FT_ULong)args[0] > 6UL ) \
+ CUR.error = FT_THROW( Bad_Argument ); \
+ else \
+ CUR.GS.delta_shift = (FT_UShort)args[0];
#define DO_MD /* nothing */
-#define DO_MPPEM \
- args[0] = CURRENT_Ppem();
+#define DO_MPPEM \
+ args[0] = CUR_Func_cur_ppem();
/* Note: The pointSize should be irrelevant in a given font program; */
@@ -3152,8 +3072,8 @@
#else
-#define DO_MPS \
- args[0] = CURRENT_Ppem();
+#define DO_MPS \
+ args[0] = CUR_Func_cur_ppem();
#endif /* 0 */
@@ -3181,60 +3101,60 @@
args[0] = CUR.top;
-#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.callTop > 0 && \
- CUR.IP > CUR.callStack[CUR.callTop - 1].Cur_End ) ) \
- 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.callTop > 0 && \
- CUR.IP > CUR.callStack[CUR.callTop - 1].Cur_End ) ) \
- CUR.error = TT_Err_Bad_Argument; \
+#define DO_CINDEX \
+ { \
+ FT_Long L; \
+ \
+ \
+ L = args[0]; \
+ \
+ if ( L <= 0 || L > CUR.args ) \
+ { \
+ if ( CUR.pedantic_hinting ) \
+ CUR.error = FT_THROW( 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 = FT_THROW( Bad_Argument ); \
+ CUR.IP += args[0]; \
+ if ( CUR.IP < 0 || \
+ ( CUR.callTop > 0 && \
+ CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) ) \
+ CUR.error = FT_THROW( Bad_Argument ); \
+ CUR.step_ins = FALSE; \
+ }
+
+
+#define DO_JMPR \
+ if ( args[0] == 0 && CUR.args == 0 ) \
+ CUR.error = FT_THROW( Bad_Argument ); \
+ CUR.IP += args[0]; \
+ if ( CUR.IP < 0 || \
+ ( CUR.callTop > 0 && \
+ CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) ) \
+ CUR.error = FT_THROW( Bad_Argument ); \
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.callTop > 0 && \
- CUR.IP > CUR.callStack[CUR.callTop - 1].Cur_End ) ) \
- CUR.error = TT_Err_Bad_Argument; \
- CUR.step_ins = FALSE; \
+#define DO_JROF \
+ if ( args[1] == 0 ) \
+ { \
+ if ( args[0] == 0 && CUR.args == 0 ) \
+ CUR.error = FT_THROW( Bad_Argument ); \
+ CUR.IP += args[0]; \
+ if ( CUR.IP < 0 || \
+ ( CUR.callTop > 0 && \
+ CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) ) \
+ CUR.error = FT_THROW( Bad_Argument ); \
+ CUR.step_ins = FALSE; \
}
@@ -3292,13 +3212,13 @@
#define DO_DIV \
if ( args[1] == 0 ) \
- CUR.error = TT_Err_Divide_By_Zero; \
+ CUR.error = FT_THROW( Divide_By_Zero ); \
else \
- args[0] = TT_MULDIV_NO_ROUND( args[0], 64L, args[1] );
+ args[0] = FT_MulDiv_No_Round( args[0], 64L, args[1] );
#define DO_MUL \
- args[0] = TT_MULDIV( args[0], args[1], 64L );
+ args[0] = FT_MulDiv( args[0], args[1], 64L );
#define DO_ABS \
@@ -3316,6 +3236,45 @@
#define DO_CEILING \
args[0] = FT_PIX_CEIL( args[0] );
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+#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 \
+ { \
+ /* subpixel hinting - avoid Typeman Dstroke and */ \
+ /* IStroke and Vacuform rounds */ \
+ \
+ if ( SUBPIXEL_HINTING && \
+ CUR.ignore_x_mode && \
+ ( ( I == 24 && \
+ ( CUR.face->sph_found_func_flags & \
+ ( SPH_FDEF_SPACING_1 | \
+ SPH_FDEF_SPACING_2 ) ) ) || \
+ ( I == 22 && \
+ ( CUR.sph_in_func_flags & \
+ SPH_FDEF_TYPEMAN_STROKES ) ) || \
+ ( I == 8 && \
+ ( CUR.face->sph_found_func_flags & \
+ SPH_FDEF_VACUFORM_ROUND_1 ) && \
+ CUR.iup_called ) ) ) \
+ args[0] = 0; \
+ else \
+ args[0] = CUR.storage[I]; \
+ } \
+ }
+
+#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */
#define DO_RS \
{ \
@@ -3335,6 +3294,8 @@
args[0] = CUR.storage[I]; \
}
+#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
#define DO_WS \
{ \
@@ -3402,12 +3363,12 @@
} \
} \
else \
- CUR.cvt[I] = TT_MULFIX( args[1], CUR.tt_metrics.scale ); \
+ CUR.cvt[I] = FT_MulFix( args[1], CUR.tt_metrics.scale ); \
}
-#define DO_DEBUG \
- CUR.error = TT_Err_Debug_OpCode;
+#define DO_DEBUG \
+ CUR.error = FT_THROW( Debug_OpCode );
#define DO_ROUND \
@@ -3435,10 +3396,10 @@
#undef ARRAY_BOUND_ERROR
-#define ARRAY_BOUND_ERROR \
- { \
- CUR.error = TT_Err_Invalid_Reference; \
- return; \
+#define ARRAY_BOUND_ERROR \
+ { \
+ CUR.error = FT_THROW( Invalid_Reference ); \
+ return; \
}
@@ -4417,7 +4378,7 @@
if ( L <= 0 || L > CUR.args )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
}
else
{
@@ -4487,7 +4448,7 @@
}
Fail_Overflow:
- CUR.error = TT_Err_Code_Overflow;
+ CUR.error = FT_THROW( Code_Overflow );
return FAILURE;
}
@@ -4592,6 +4553,106 @@
TT_DefRecord* rec;
TT_DefRecord* limit;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ /* arguments to opcodes are skipped by `SKIP_Code' */
+ FT_Byte opcode_pattern[9][12] = {
+ /* #0 inline delta function 1 */
+ {
+ 0x4B, /* PPEM */
+ 0x53, /* GTEQ */
+ 0x23, /* SWAP */
+ 0x4B, /* PPEM */
+ 0x51, /* LTEQ */
+ 0x5A, /* AND */
+ 0x58, /* IF */
+ 0x38, /* SHPIX */
+ 0x1B, /* ELSE */
+ 0x21, /* POP */
+ 0x21, /* POP */
+ 0x59 /* EIF */
+ },
+ /* #1 inline delta function 2 */
+ {
+ 0x4B, /* PPEM */
+ 0x54, /* EQ */
+ 0x58, /* IF */
+ 0x38, /* SHPIX */
+ 0x1B, /* ELSE */
+ 0x21, /* POP */
+ 0x21, /* POP */
+ 0x59 /* EIF */
+ },
+ /* #2 diagonal stroke function */
+ {
+ 0x20, /* DUP */
+ 0x20, /* DUP */
+ 0xB0, /* PUSHB_1 */
+ /* 1 */
+ 0x60, /* ADD */
+ 0x46, /* GC_cur */
+ 0xB0, /* PUSHB_1 */
+ /* 64 */
+ 0x23, /* SWAP */
+ 0x42 /* WS */
+ },
+ /* #3 VacuFormRound function */
+ {
+ 0x45, /* RCVT */
+ 0x23, /* SWAP */
+ 0x46, /* GC_cur */
+ 0x60, /* ADD */
+ 0x20, /* DUP */
+ 0xB0 /* PUSHB_1 */
+ /* 38 */
+ },
+ /* #4 TTFautohint bytecode (old) */
+ {
+ 0x20, /* DUP */
+ 0x64, /* ABS */
+ 0xB0, /* PUSHB_1 */
+ /* 32 */
+ 0x60, /* ADD */
+ 0x66, /* FLOOR */
+ 0x23, /* SWAP */
+ 0xB0 /* PUSHB_1 */
+ },
+ /* #5 spacing function 1 */
+ {
+ 0x01, /* SVTCA_x */
+ 0xB0, /* PUSHB_1 */
+ /* 24 */
+ 0x43, /* RS */
+ 0x58 /* IF */
+ },
+ /* #6 spacing function 2 */
+ {
+ 0x01, /* SVTCA_x */
+ 0x18, /* RTG */
+ 0xB0, /* PUSHB_1 */
+ /* 24 */
+ 0x43, /* RS */
+ 0x58 /* IF */
+ },
+ /* #7 TypeMan Talk DiagEndCtrl function */
+ {
+ 0x01, /* SVTCA_x */
+ 0x20, /* DUP */
+ 0xB0, /* PUSHB_1 */
+ /* 3 */
+ 0x25, /* CINDEX */
+ },
+ /* #8 TypeMan Talk Align */
+ {
+ 0x06, /* SPVTL */
+ 0x7D, /* RDTG */
+ },
+ };
+ FT_UShort opcode_patterns = 9;
+ FT_UShort opcode_pointer[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ FT_UShort opcode_size[9] = { 12, 8, 8, 6, 7, 4, 5, 4, 2 };
+ FT_UShort i;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
/* some font programs are broken enough to redefine functions! */
/* We will then parse the current table. */
@@ -4611,7 +4672,7 @@
/* check that there is enough room for new functions */
if ( CUR.numFDefs >= CUR.maxFDefs )
{
- CUR.error = TT_Err_Too_Many_Function_Defs;
+ CUR.error = FT_THROW( Too_Many_Function_Defs );
return;
}
CUR.numFDefs++;
@@ -4621,28 +4682,149 @@
/* func # must be within unsigned 16-bit integer */
if ( n > 0xFFFFU )
{
- CUR.error = TT_Err_Too_Many_Function_Defs;
+ CUR.error = FT_THROW( Too_Many_Function_Defs );
return;
}
- rec->range = CUR.curRange;
- rec->opc = (FT_UInt16)n;
- rec->start = CUR.IP + 1;
- rec->active = TRUE;
+ rec->range = CUR.curRange;
+ rec->opc = (FT_UInt16)n;
+ rec->start = CUR.IP + 1;
+ rec->active = TRUE;
+ rec->inline_delta = FALSE;
+ rec->sph_fdef_flags = 0x0000;
if ( n > CUR.maxFunc )
CUR.maxFunc = (FT_UInt16)n;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ /* We don't know for sure these are typeman functions, */
+ /* however they are only active when RS 22 is called */
+ if ( n >= 64 && n <= 66 )
+ rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_STROKES;
+#endif
+
/* Now skip the whole function definition. */
/* We don't allow nested IDEFS & FDEFs. */
while ( SKIP_Code() == SUCCESS )
{
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+ if ( SUBPIXEL_HINTING )
+ {
+ for ( i = 0; i < opcode_patterns; i++ )
+ {
+ if ( opcode_pointer[i] < opcode_size[i] &&
+ CUR.opcode == opcode_pattern[i][opcode_pointer[i]] )
+ {
+ opcode_pointer[i] += 1;
+
+ if ( opcode_pointer[i] == opcode_size[i] )
+ {
+ FT_TRACE7(( "sph: Function %d, opcode ptrn: %d, %s %s\n",
+ i, n,
+ CUR.face->root.family_name,
+ CUR.face->root.style_name ));
+
+ switch ( i )
+ {
+ case 0:
+ rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_1;
+ CUR.face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_1;
+ break;
+
+ case 1:
+ rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_2;
+ CUR.face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_2;
+ break;
+
+ case 2:
+ switch ( n )
+ {
+ /* needs to be implemented still */
+ case 58:
+ rec->sph_fdef_flags |= SPH_FDEF_DIAGONAL_STROKE;
+ CUR.face->sph_found_func_flags |= SPH_FDEF_DIAGONAL_STROKE;
+ }
+ break;
+
+ case 3:
+ switch ( n )
+ {
+ case 0:
+ rec->sph_fdef_flags |= SPH_FDEF_VACUFORM_ROUND_1;
+ CUR.face->sph_found_func_flags |= SPH_FDEF_VACUFORM_ROUND_1;
+ }
+ break;
+
+ case 4:
+ /* probably not necessary to detect anymore */
+ rec->sph_fdef_flags |= SPH_FDEF_TTFAUTOHINT_1;
+ CUR.face->sph_found_func_flags |= SPH_FDEF_TTFAUTOHINT_1;
+ break;
+
+ case 5:
+ switch ( n )
+ {
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 7:
+ case 8:
+ rec->sph_fdef_flags |= SPH_FDEF_SPACING_1;
+ CUR.face->sph_found_func_flags |= SPH_FDEF_SPACING_1;
+ }
+ break;
+
+ case 6:
+ switch ( n )
+ {
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 7:
+ case 8:
+ rec->sph_fdef_flags |= SPH_FDEF_SPACING_2;
+ CUR.face->sph_found_func_flags |= SPH_FDEF_SPACING_2;
+ }
+ break;
+
+ case 7:
+ rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL;
+ CUR.face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL;
+ break;
+
+ case 8:
+#if 0
+ rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL;
+ CUR.face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL;
+#endif
+ break;
+ }
+ opcode_pointer[i] = 0;
+ }
+ }
+
+ else
+ opcode_pointer[i] = 0;
+ }
+
+ /* Set sph_compatibility_mode only when deltas are detected */
+ CUR.face->sph_compatibility_mode =
+ ( ( CUR.face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_1 ) |
+ ( CUR.face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_2 ) );
+ }
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
switch ( CUR.opcode )
{
case 0x89: /* IDEF */
case 0x2C: /* FDEF */
- CUR.error = TT_Err_Nested_DEFS;
+ CUR.error = FT_THROW( Nested_DEFS );
return;
case 0x2D: /* ENDF */
@@ -4667,9 +4849,13 @@
FT_UNUSED_ARG;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ CUR.sph_in_func_flags = 0x0000;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
if ( CUR.callTop <= 0 ) /* We encountered an ENDF without a call */
{
- CUR.error = TT_Err_ENDF_In_Exec_Stream;
+ CUR.error = FT_THROW( ENDF_In_Exec_Stream );
return;
}
@@ -4684,7 +4870,7 @@
if ( pRec->Cur_Count > 0 )
{
CUR.callTop++;
- CUR.IP = pRec->Cur_Restart;
+ CUR.IP = pRec->Def->start;
}
else
/* Loop through the current function */
@@ -4751,10 +4937,21 @@
if ( !def->active )
goto Fail;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ ( ( CUR.iup_called &&
+ ( CUR.sph_tweak_flags & SPH_TWEAK_NO_CALL_AFTER_IUP ) ) ||
+ ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) ) )
+ goto Fail;
+ else
+ CUR.sph_in_func_flags = def->sph_fdef_flags;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
/* check the call stack */
if ( CUR.callTop >= CUR.callSize )
{
- CUR.error = TT_Err_Stack_Overflow;
+ CUR.error = FT_THROW( Stack_Overflow );
return;
}
@@ -4763,8 +4960,7 @@
pCrec->Caller_Range = CUR.curRange;
pCrec->Caller_IP = CUR.IP + 1;
pCrec->Cur_Count = 1;
- pCrec->Cur_Restart = def->start;
- pCrec->Cur_End = def->end;
+ pCrec->Def = def;
CUR.callTop++;
@@ -4772,10 +4968,11 @@
def->start );
CUR.step_ins = FALSE;
+
return;
Fail:
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
}
@@ -4828,10 +5025,19 @@
if ( !def->active )
goto Fail;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) )
+ goto Fail;
+ else
+ CUR.sph_in_func_flags = def->sph_fdef_flags;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
/* check stack */
if ( CUR.callTop >= CUR.callSize )
{
- CUR.error = TT_Err_Stack_Overflow;
+ CUR.error = FT_THROW( Stack_Overflow );
return;
}
@@ -4842,8 +5048,7 @@
pCrec->Caller_Range = CUR.curRange;
pCrec->Caller_IP = CUR.IP + 1;
pCrec->Cur_Count = (FT_Int)args[0];
- pCrec->Cur_Restart = def->start;
- pCrec->Cur_End = def->end;
+ pCrec->Def = def;
CUR.callTop++;
@@ -4851,10 +5056,11 @@
CUR.step_ins = FALSE;
}
+
return;
Fail:
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
}
@@ -4885,7 +5091,7 @@
/* check that there is enough room for a new instruction */
if ( CUR.numIDefs >= CUR.maxIDefs )
{
- CUR.error = TT_Err_Too_Many_Instruction_Defs;
+ CUR.error = FT_THROW( Too_Many_Instruction_Defs );
return;
}
CUR.numIDefs++;
@@ -4894,7 +5100,7 @@
/* opcode must be unsigned 8-bit integer */
if ( 0 > args[0] || args[0] > 0x00FF )
{
- CUR.error = TT_Err_Too_Many_Instruction_Defs;
+ CUR.error = FT_THROW( Too_Many_Instruction_Defs );
return;
}
@@ -4915,7 +5121,7 @@
{
case 0x89: /* IDEF */
case 0x2C: /* FDEF */
- CUR.error = TT_Err_Nested_DEFS;
+ CUR.error = FT_THROW( Nested_DEFS );
return;
case 0x2D: /* ENDF */
return;
@@ -4949,7 +5155,7 @@
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
- CUR.error = TT_Err_Stack_Overflow;
+ CUR.error = FT_THROW( Stack_Overflow );
return;
}
@@ -4976,7 +5182,7 @@
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
- CUR.error = TT_Err_Stack_Overflow;
+ CUR.error = FT_THROW( Stack_Overflow );
return;
}
@@ -5006,7 +5212,7 @@
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
- CUR.error = TT_Err_Stack_Overflow;
+ CUR.error = FT_THROW( Stack_Overflow );
return;
}
@@ -5031,7 +5237,7 @@
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
- CUR.error = TT_Err_Stack_Overflow;
+ CUR.error = FT_THROW( Stack_Overflow );
return;
}
@@ -5074,7 +5280,7 @@
if ( BOUNDSL( L, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
R = 0;
}
else
@@ -5111,7 +5317,7 @@
if ( BOUNDS( L, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5155,7 +5361,7 @@
BOUNDS( K, CUR.zp1.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
D = 0;
}
else
@@ -5184,15 +5390,15 @@
{
/* this should be faster */
D = CUR_Func_dualproj( vec1, vec2 );
- D = TT_MULFIX( D, CUR.metrics.x_scale );
+ D = FT_MulFix( D, CUR.metrics.x_scale );
}
else
{
FT_Vector vec;
- vec.x = TT_MULFIX( vec1->x - vec2->x, CUR.metrics.x_scale );
- vec.y = TT_MULFIX( vec1->y - vec2->y, CUR.metrics.y_scale );
+ vec.x = FT_MulFix( vec1->x - vec2->x, CUR.metrics.x_scale );
+ vec.y = FT_MulFix( vec1->y - vec2->y, CUR.metrics.y_scale );
D = CUR_fast_dualproj( &vec );
}
@@ -5200,6 +5406,13 @@
}
}
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ /* Disable Type 2 Vacuform Rounds - e.g. Arial Narrow */
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode && FT_ABS( D ) == 64 )
+ D += 1;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
args[0] = D;
}
@@ -5225,7 +5438,7 @@
BOUNDS( p1, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5265,6 +5478,12 @@
A = v1->x - v2->x;
B = v1->y - v2->y;
+
+ if ( A == 0 && B == 0 )
+ {
+ A = 0x4000;
+ aOpc = 0;
+ }
}
if ( ( aOpc & 1 ) != 0 )
@@ -5303,7 +5522,7 @@
default:
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5332,7 +5551,7 @@
default:
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5361,7 +5580,7 @@
default:
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5390,7 +5609,7 @@
default:
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5406,7 +5625,7 @@
/*************************************************************************/
/* */
/* INSTCTRL[]: INSTruction ConTRoL */
- /* Opcode range: 0x8e */
+ /* Opcode range: 0x8E */
/* Stack: int32 int32 --> */
/* */
static void
@@ -5421,7 +5640,7 @@
if ( K < 1 || K > 2 )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5519,7 +5738,7 @@
if ( CUR.top < CUR.GS.loop )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Too_Few_Arguments;
+ CUR.error = FT_THROW( Too_Few_Arguments );
goto Fail;
}
@@ -5533,7 +5752,7 @@
{
if ( CUR.pedantic_hinting )
{
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
}
@@ -5568,7 +5787,7 @@
BOUNDS( L, CUR.pts.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5596,7 +5815,7 @@
BOUNDS( L, CUR.pts.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5630,7 +5849,7 @@
if ( BOUNDS( p, zp.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
*refp = 0;
return FAILURE;
}
@@ -5657,12 +5876,8 @@
else
#endif
{
- *x = TT_MULDIV( d,
- (FT_Long)CUR.GS.freeVector.x * 0x10000L,
- CUR.F_dot_P );
- *y = TT_MULDIV( d,
- (FT_Long)CUR.GS.freeVector.y * 0x10000L,
- CUR.F_dot_P );
+ *x = FT_MulDiv( d, (FT_Long)CUR.GS.freeVector.x, CUR.F_dot_P );
+ *y = FT_MulDiv( d, (FT_Long)CUR.GS.freeVector.y, CUR.F_dot_P );
}
return SUCCESS;
@@ -5732,7 +5947,7 @@
if ( CUR.top < CUR.GS.loop )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
goto Fail;
}
@@ -5748,11 +5963,18 @@
{
if ( CUR.pedantic_hinting )
{
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
}
else
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ /* doesn't follow Cleartype spec but produces better result */
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode )
+ MOVE_Zp2_Point( point, 0, dy, TRUE );
+ else
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
MOVE_Zp2_Point( point, dx, dy, TRUE );
CUR.GS.loop--;
@@ -5772,7 +5994,7 @@
/* */
/* UNDOCUMENTED: According to Greg Hitchcock, there is one (virtual) */
/* contour in the twilight zone, namely contour number */
- /* zero. */
+ /* zero which includes all points of it. */
/* */
static void
Ins_SHC( INS_ARG )
@@ -5791,7 +6013,7 @@
if ( BOUNDS( contour, bounds ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5839,7 +6061,7 @@
if ( BOUNDS( args[0], 2 ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5877,12 +6099,15 @@
{
FT_F26Dot6 dx, dy;
FT_UShort point;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ FT_Int B1, B2;
+#endif
if ( CUR.top < CUR.GS.loop + 1 )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
goto Fail;
}
@@ -5891,13 +6116,13 @@
{
if ( CUR.GS.both_x_axis )
{
- dx = TT_MulFix14( (FT_UInt32)args[0], 0x4000 );
+ dx = (FT_UInt32)args[0];
dy = 0;
}
else
{
dx = 0;
- dy = TT_MulFix14( (FT_UInt32)args[0], 0x4000 );
+ dy = (FT_UInt32)args[0];
}
}
else
@@ -5917,13 +6142,95 @@
{
if ( CUR.pedantic_hinting )
{
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
}
else
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ {
+ /* If not using ignore_x_mode rendering, allow ZP2 move. */
+ /* If inline deltas aren't allowed, skip ZP2 move. */
+ /* If using ignore_x_mode rendering, allow ZP2 point move if: */
+ /* - freedom vector is y and sph_compatibility_mode is off */
+ /* - the glyph is composite and the move is in the Y direction */
+ /* - the glyph is specifically set to allow SHPIX moves */
+ /* - the move is on a previously Y-touched point */
+
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode )
+ {
+ /* save point for later comparison */
+ if ( CUR.GS.freeVector.y != 0 )
+ B1 = CUR.zp2.cur[point].y;
+ else
+ B1 = CUR.zp2.cur[point].x;
+
+ if ( !CUR.face->sph_compatibility_mode &&
+ CUR.GS.freeVector.y != 0 )
+ {
+ MOVE_Zp2_Point( point, dx, dy, TRUE );
+
+ /* save new point */
+ if ( CUR.GS.freeVector.y != 0 )
+ {
+ B2 = CUR.zp2.cur[point].y;
+
+ /* reverse any disallowed moves */
+ if ( ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) &&
+ ( B1 & 63 ) != 0 &&
+ ( B2 & 63 ) != 0 &&
+ B1 != B2 )
+ MOVE_Zp2_Point( point, -dx, -dy, TRUE );
+ }
+ }
+ else if ( CUR.face->sph_compatibility_mode )
+ {
+ if ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES )
+ {
+ dx = FT_PIX_ROUND( B1 + dx ) - B1;
+ dy = FT_PIX_ROUND( B1 + dy ) - B1;
+ }
+
+ /* skip post-iup deltas */
+ if ( CUR.iup_called &&
+ ( ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_1 ) ||
+ ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ) )
+ goto Skip;
+
+ if ( !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) &&
+ ( ( CUR.is_composite && CUR.GS.freeVector.y != 0 ) ||
+ ( CUR.zp2.tags[point] & FT_CURVE_TAG_TOUCH_Y ) ||
+ ( CUR.sph_tweak_flags & SPH_TWEAK_DO_SHPIX ) ) )
+ MOVE_Zp2_Point( point, 0, dy, TRUE );
+
+ /* save new point */
+ if ( CUR.GS.freeVector.y != 0 )
+ {
+ B2 = CUR.zp2.cur[point].y;
+
+ /* reverse any disallowed moves */
+ if ( ( B1 & 63 ) == 0 &&
+ ( B2 & 63 ) != 0 &&
+ B1 != B2 )
+ MOVE_Zp2_Point( point, 0, -dy, TRUE );
+ }
+ }
+ else if ( CUR.sph_in_func_flags & SPH_FDEF_TYPEMAN_DIAGENDCTRL )
+ MOVE_Zp2_Point( point, dx, dy, TRUE );
+ }
+ else
+ MOVE_Zp2_Point( point, dx, dy, TRUE );
+ }
+
+ Skip:
+
+#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
MOVE_Zp2_Point( point, dx, dy, TRUE );
+#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
CUR.GS.loop--;
}
@@ -5945,6 +6252,21 @@
FT_UShort point;
FT_F26Dot6 distance;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ FT_F26Dot6 control_value_cutin = 0; /* pacify compiler */
+
+
+ if ( SUBPIXEL_HINTING )
+ {
+ control_value_cutin = CUR.GS.control_value_cutin;
+
+ if ( CUR.ignore_x_mode &&
+ CUR.GS.freeVector.x != 0 &&
+ !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) )
+ control_value_cutin = 0;
+ }
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
point = (FT_UShort)args[0];
@@ -5952,7 +6274,7 @@
BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -5968,6 +6290,15 @@
distance = CUR_Func_project( CUR.zp1.cur + point,
CUR.zp0.cur + CUR.GS.rp0 );
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ /* subpixel hinting - make MSIRP respect CVT cut-in; */
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.GS.freeVector.x != 0 &&
+ FT_ABS( distance - args[1] ) >= control_value_cutin )
+ distance = args[1];
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
CUR_Func_move( &CUR.zp1, point, args[1] - distance );
CUR.GS.rp1 = CUR.GS.rp0;
@@ -5988,8 +6319,8 @@
Ins_MDAP( INS_ARG )
{
FT_UShort point;
- FT_F26Dot6 cur_dist,
- distance;
+ FT_F26Dot6 cur_dist;
+ FT_F26Dot6 distance;
point = (FT_UShort)args[0];
@@ -5997,15 +6328,25 @@
if ( BOUNDS( point, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
if ( ( CUR.opcode & 1 ) != 0 )
{
cur_dist = CUR_fast_project( &CUR.zp0.cur[point] );
- distance = CUR_Func_round( cur_dist,
- CUR.tt_metrics.compensations[0] ) - cur_dist;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.GS.freeVector.x != 0 )
+ distance = ROUND_None(
+ cur_dist,
+ CUR.tt_metrics.compensations[0] ) - cur_dist;
+ else
+#endif
+ distance = CUR_Func_round(
+ cur_dist,
+ CUR.tt_metrics.compensations[0] ) - cur_dist;
}
else
distance = 0;
@@ -6028,18 +6369,29 @@
{
FT_ULong cvtEntry;
FT_UShort point;
- FT_F26Dot6 distance,
- org_dist;
+ FT_F26Dot6 distance;
+ FT_F26Dot6 org_dist;
+ FT_F26Dot6 control_value_cutin;
+
+ control_value_cutin = CUR.GS.control_value_cutin;
+ cvtEntry = (FT_ULong)args[1];
+ point = (FT_UShort)args[0];
- cvtEntry = (FT_ULong)args[1];
- point = (FT_UShort)args[0];
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.GS.freeVector.x != 0 &&
+ CUR.GS.freeVector.y == 0 &&
+ !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) )
+ control_value_cutin = 0;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
if ( BOUNDS( point, CUR.zp0.n_points ) ||
BOUNDSL( cvtEntry, CUR.cvtSize ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
goto Fail;
}
@@ -6067,21 +6419,45 @@
if ( CUR.GS.gep0 == 0 ) /* If in twilight zone */
{
- CUR.zp0.org[point].x = TT_MulFix14( (FT_UInt32)distance,
- CUR.GS.freeVector.x );
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ /* Only adjust if not in sph_compatibility_mode or ignore_x_mode. */
+ /* Determined via experimentation and may be incorrect... */
+ if ( !SUBPIXEL_HINTING ||
+ ( !CUR.ignore_x_mode ||
+ !CUR.face->sph_compatibility_mode ) )
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+ CUR.zp0.org[point].x = TT_MulFix14( (FT_UInt32)distance,
+ CUR.GS.freeVector.x );
CUR.zp0.org[point].y = TT_MulFix14( (FT_UInt32)distance,
CUR.GS.freeVector.y ),
CUR.zp0.cur[point] = CUR.zp0.org[point];
}
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ ( CUR.sph_tweak_flags & SPH_TWEAK_MIAP_HACK ) &&
+ distance > 0 &&
+ CUR.GS.freeVector.y != 0 )
+ distance = 0;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
org_dist = CUR_fast_project( &CUR.zp0.cur[point] );
- if ( ( CUR.opcode & 1 ) != 0 ) /* rounding and control cutin flag */
+ if ( ( CUR.opcode & 1 ) != 0 ) /* rounding and control cut-in flag */
{
- if ( FT_ABS( distance - org_dist ) > CUR.GS.control_value_cutin )
+ if ( FT_ABS( distance - org_dist ) > control_value_cutin )
distance = org_dist;
- distance = CUR_Func_round( distance, CUR.tt_metrics.compensations[0] );
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.GS.freeVector.x != 0 )
+ distance = ROUND_None( distance,
+ CUR.tt_metrics.compensations[0] );
+ else
+#endif
+ distance = CUR_Func_round( distance,
+ CUR.tt_metrics.compensations[0] );
}
CUR_Func_move( &CUR.zp0, point, distance - org_dist );
@@ -6102,8 +6478,18 @@
Ins_MDRP( INS_ARG )
{
FT_UShort point;
- FT_F26Dot6 org_dist, distance;
+ FT_F26Dot6 org_dist, distance, minimum_distance;
+
+
+ minimum_distance = CUR.GS.minimum_distance;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.GS.freeVector.x != 0 &&
+ !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) )
+ minimum_distance = 0;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
point = (FT_UShort)args[0];
@@ -6111,7 +6497,7 @@
BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
goto Fail;
}
@@ -6138,15 +6524,15 @@
{
/* this should be faster */
org_dist = CUR_Func_dualproj( vec1, vec2 );
- org_dist = TT_MULFIX( org_dist, CUR.metrics.x_scale );
+ org_dist = FT_MulFix( org_dist, CUR.metrics.x_scale );
}
else
{
FT_Vector vec;
- vec.x = TT_MULFIX( vec1->x - vec2->x, CUR.metrics.x_scale );
- vec.y = TT_MULFIX( vec1->y - vec2->y, CUR.metrics.y_scale );
+ vec.x = FT_MulFix( vec1->x - vec2->x, CUR.metrics.x_scale );
+ vec.y = FT_MulFix( vec1->y - vec2->y, CUR.metrics.y_scale );
org_dist = CUR_fast_dualproj( &vec );
}
@@ -6166,9 +6552,20 @@
/* round flag */
if ( ( CUR.opcode & 4 ) != 0 )
+ {
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.GS.freeVector.x != 0 )
+ distance = ROUND_None(
+ org_dist,
+ CUR.tt_metrics.compensations[CUR.opcode & 3] );
+ else
+#endif
distance = CUR_Func_round(
org_dist,
CUR.tt_metrics.compensations[CUR.opcode & 3] );
+ }
else
distance = ROUND_None(
org_dist,
@@ -6180,13 +6577,13 @@
{
if ( org_dist >= 0 )
{
- if ( distance < CUR.GS.minimum_distance )
- distance = CUR.GS.minimum_distance;
+ if ( distance < minimum_distance )
+ distance = minimum_distance;
}
else
{
- if ( distance > -CUR.GS.minimum_distance )
- distance = -CUR.GS.minimum_distance;
+ if ( distance > -minimum_distance )
+ distance = -minimum_distance;
}
}
@@ -6221,11 +6618,28 @@
FT_F26Dot6 cvt_dist,
distance,
cur_dist,
- org_dist;
-
-
- point = (FT_UShort)args[0];
- cvtEntry = (FT_ULong)( args[1] + 1 );
+ org_dist,
+ control_value_cutin,
+ minimum_distance;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ FT_Int B1 = 0; /* pacify compiler */
+ FT_Int B2 = 0;
+ FT_Bool reverse_move = FALSE;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+
+ minimum_distance = CUR.GS.minimum_distance;
+ control_value_cutin = CUR.GS.control_value_cutin;
+ point = (FT_UShort)args[0];
+ cvtEntry = (FT_ULong)( args[1] + 1 );
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.GS.freeVector.x != 0 &&
+ !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) )
+ control_value_cutin = minimum_distance = 0;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
/* XXX: UNDOCUMENTED! cvt[-1] = 0 always */
@@ -6234,7 +6648,7 @@
BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
goto Fail;
}
@@ -6280,7 +6694,20 @@
cvt_dist = -cvt_dist;
}
- /* control value cutin and round */
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.GS.freeVector.y != 0 &&
+ ( CUR.sph_tweak_flags & SPH_TWEAK_TIMES_NEW_ROMAN_HACK ) )
+ {
+ if ( cur_dist < -64 )
+ cvt_dist -= 16;
+ else if ( cur_dist > 64 && cur_dist < 84 )
+ cvt_dist += 32;
+ }
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ /* control value cut-in and round */
if ( ( CUR.opcode & 4 ) != 0 )
{
@@ -6301,7 +6728,7 @@
/* `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 )
+ if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin )
cvt_dist = org_dist;
}
@@ -6310,9 +6737,23 @@
CUR.tt_metrics.compensations[CUR.opcode & 3] );
}
else
+ {
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ /* do cvt cut-in always in MIRP for sph */
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.GS.gep0 == CUR.GS.gep1 )
+ {
+ if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin )
+ cvt_dist = org_dist;
+ }
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
distance = ROUND_None(
cvt_dist,
CUR.tt_metrics.compensations[CUR.opcode & 3] );
+ }
/* minimum distance test */
@@ -6320,18 +6761,65 @@
{
if ( org_dist >= 0 )
{
- if ( distance < CUR.GS.minimum_distance )
- distance = CUR.GS.minimum_distance;
+ if ( distance < minimum_distance )
+ distance = minimum_distance;
}
else
{
- if ( distance > -CUR.GS.minimum_distance )
- distance = -CUR.GS.minimum_distance;
+ if ( distance > -minimum_distance )
+ distance = -minimum_distance;
}
}
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING )
+ {
+ B1 = CUR.zp1.cur[point].y;
+
+ /* Round moves if necessary */
+ if ( CUR.ignore_x_mode &&
+ CUR.GS.freeVector.y != 0 &&
+ ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) )
+ distance = FT_PIX_ROUND( B1 + distance - cur_dist ) - B1 + cur_dist;
+
+ if ( CUR.ignore_x_mode &&
+ CUR.GS.freeVector.y != 0 &&
+ ( CUR.opcode & 16 ) == 0 &&
+ ( CUR.opcode & 8 ) == 0 &&
+ ( CUR.sph_tweak_flags & SPH_TWEAK_COURIER_NEW_2_HACK ) )
+ distance += 64;
+ }
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
CUR_Func_move( &CUR.zp1, point, distance - cur_dist );
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING )
+ {
+ B2 = CUR.zp1.cur[point].y;
+
+ /* Reverse move if necessary */
+ if ( CUR.ignore_x_mode )
+ {
+ if ( CUR.face->sph_compatibility_mode &&
+ CUR.GS.freeVector.y != 0 &&
+ ( B1 & 63 ) == 0 &&
+ ( B2 & 63 ) != 0 )
+ reverse_move = TRUE;
+
+ if ( ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) &&
+ CUR.GS.freeVector.y != 0 &&
+ ( B2 & 63 ) != 0 &&
+ ( B1 & 63 ) != 0 )
+ reverse_move = TRUE;
+ }
+
+ if ( reverse_move )
+ CUR_Func_move( &CUR.zp1, point, -( distance - cur_dist ) );
+ }
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
Fail:
CUR.GS.rp1 = CUR.GS.rp0;
@@ -6357,11 +6845,22 @@
FT_UNUSED_ARG;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.iup_called &&
+ ( CUR.sph_tweak_flags & SPH_TWEAK_NO_ALIGNRP_AFTER_IUP ) )
+ {
+ CUR.error = FT_THROW( Invalid_Reference );
+ goto Fail;
+ }
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
if ( CUR.top < CUR.GS.loop ||
BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
goto Fail;
}
@@ -6375,7 +6874,7 @@
{
if ( CUR.pedantic_hinting )
{
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
}
@@ -6409,7 +6908,7 @@
a0, a1,
b0, b1;
- FT_F26Dot6 discriminant;
+ FT_F26Dot6 discriminant, dotproduct;
FT_F26Dot6 dx, dy,
dax, day,
@@ -6434,10 +6933,12 @@
BOUNDS( point, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
+ /* Cramer's rule */
+
dbx = CUR.zp0.cur[b1].x - CUR.zp0.cur[b0].x;
dby = CUR.zp0.cur[b1].y - CUR.zp0.cur[b0].y;
@@ -6449,15 +6950,25 @@
CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_BOTH;
- discriminant = TT_MULDIV( dax, -dby, 0x40 ) +
- TT_MULDIV( day, dbx, 0x40 );
+ discriminant = FT_MulDiv( dax, -dby, 0x40 ) +
+ FT_MulDiv( day, dbx, 0x40 );
+ dotproduct = FT_MulDiv( dax, dbx, 0x40 ) +
+ FT_MulDiv( day, dby, 0x40 );
- if ( FT_ABS( discriminant ) >= 0x40 )
+ /* The discriminant above is actually a cross product of vectors */
+ /* da and db. Together with the dot product, they can be used as */
+ /* surrogates for sine and cosine of the angle between the vectors. */
+ /* Indeed, */
+ /* dotproduct = |da||db|cos(angle) */
+ /* discriminant = |da||db|sin(angle) . */
+ /* We use these equations to reject grazing intersections by */
+ /* thresholding abs(tan(angle)) at 1/19, corresponding to 3 degrees. */
+ if ( 19 * FT_ABS( discriminant ) > FT_ABS( dotproduct ) )
{
- val = TT_MULDIV( dx, -dby, 0x40 ) + TT_MULDIV( dy, dbx, 0x40 );
+ val = FT_MulDiv( dx, -dby, 0x40 ) + FT_MulDiv( dy, dbx, 0x40 );
- R.x = TT_MULDIV( val, dax, discriminant );
- R.y = TT_MULDIV( val, day, discriminant );
+ R.x = FT_MulDiv( val, dax, discriminant );
+ R.y = FT_MulDiv( val, day, discriminant );
CUR.zp2.cur[point].x = CUR.zp1.cur[a0].x + R.x;
CUR.zp2.cur[point].y = CUR.zp1.cur[a0].y + R.y;
@@ -6498,7 +7009,7 @@
BOUNDS( p2, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -6533,7 +7044,7 @@
if ( CUR.top < CUR.GS.loop )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
goto Fail;
}
@@ -6547,7 +7058,7 @@
if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
goto Fail;
}
@@ -6581,9 +7092,9 @@
FT_Vector vec;
- vec.x = TT_MULFIX( CUR.zp1.orus[CUR.GS.rp2].x - orus_base->x,
+ vec.x = FT_MulFix( CUR.zp1.orus[CUR.GS.rp2].x - orus_base->x,
CUR.metrics.x_scale );
- vec.y = TT_MULFIX( CUR.zp1.orus[CUR.GS.rp2].y - orus_base->y,
+ vec.y = FT_MulFix( CUR.zp1.orus[CUR.GS.rp2].y - orus_base->y,
CUR.metrics.y_scale );
old_range = CUR_fast_dualproj( &vec );
@@ -6603,7 +7114,7 @@
{
if ( CUR.pedantic_hinting )
{
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
continue;
@@ -6618,20 +7129,41 @@
FT_Vector vec;
- vec.x = TT_MULFIX( CUR.zp2.orus[point].x - orus_base->x,
+ vec.x = FT_MulFix( CUR.zp2.orus[point].x - orus_base->x,
CUR.metrics.x_scale );
- vec.y = TT_MULFIX( CUR.zp2.orus[point].y - orus_base->y,
+ vec.y = FT_MulFix( CUR.zp2.orus[point].y - orus_base->y,
CUR.metrics.y_scale );
org_dist = CUR_fast_dualproj( &vec );
}
- cur_dist = CUR_Func_project ( &CUR.zp2.cur[point], cur_base );
+ cur_dist = CUR_Func_project( &CUR.zp2.cur[point], cur_base );
if ( org_dist )
- new_dist = ( old_range != 0 )
- ? TT_MULDIV( org_dist, cur_range, old_range )
- : cur_dist;
+ {
+ if ( old_range )
+ new_dist = FT_MulDiv( org_dist, cur_range, old_range );
+ else
+ {
+ /* This is the same as what MS does for the invalid case: */
+ /* */
+ /* delta = (Original_Pt - Original_RP1) - */
+ /* (Current_Pt - Current_RP1) ; */
+ /* */
+ /* In FreeType speak: */
+ /* */
+ /* delta = org_dist - cur_dist . */
+ /* */
+ /* We move `point' by `new_dist - cur_dist' after leaving */
+ /* this block, thus we have */
+ /* */
+ /* new_dist - cur_dist = delta , */
+ /* new_dist - cur_dist = org_dist - cur_dist , */
+ /* new_dist = org_dist . */
+
+ new_dist = org_dist;
+ }
+ }
else
new_dist = 0;
@@ -6662,7 +7194,7 @@
if ( BOUNDS( point, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
@@ -6791,12 +7323,12 @@
if ( !scale_valid )
{
scale_valid = 1;
- scale = TT_MULDIV( org2 + delta2 - ( org1 + delta1 ),
- 0x10000L, orus2 - orus1 );
+ scale = FT_DivFix( org2 + delta2 - ( org1 + delta1 ),
+ orus2 - orus1 );
}
x = ( org1 + delta1 ) +
- TT_MULFIX( worker->orus[i].x - orus1, scale );
+ FT_MulFix( worker->orus[i].x - orus1, scale );
}
worker->curs[i].x = x;
}
@@ -6851,6 +7383,16 @@
contour = 0;
point = 0;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode )
+ {
+ CUR.iup_called = TRUE;
+ if ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_IUP )
+ return;
+ }
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
do
{
end_point = CUR.pts.contours[contour] - CUR.pts.first_point;
@@ -6916,10 +7458,20 @@
static void
Ins_DELTAP( INS_ARG )
{
- FT_ULong k, nump;
+ FT_ULong nump, k;
FT_UShort A;
- FT_ULong C;
+ FT_ULong C, P;
FT_Long B;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ FT_UShort B1, B2;
+
+
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.iup_called &&
+ ( CUR.sph_tweak_flags & SPH_TWEAK_NO_DELTAP_AFTER_IUP ) )
+ goto Fail;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
@@ -6932,7 +7484,7 @@
if ( CUR.args < n )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Too_Few_Arguments;
+ CUR.error = FT_THROW( Too_Few_Arguments );
n = CUR.args;
}
@@ -6942,6 +7494,7 @@
}
#endif
+ P = (FT_ULong)CUR_Func_cur_ppem();
nump = (FT_ULong)args[0]; /* some points theoretically may occur more
than once, thus UShort isn't enough */
@@ -6950,7 +7503,7 @@
if ( CUR.args < 2 )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Too_Few_Arguments;
+ CUR.error = FT_THROW( Too_Few_Arguments );
CUR.args = 0;
goto Fail;
}
@@ -6986,19 +7539,80 @@
C += CUR.GS.delta_base;
- if ( CURRENT_Ppem() == (FT_Long)C )
+ if ( P == C )
{
B = ( (FT_ULong)B & 0xF ) - 8;
if ( B >= 0 )
B++;
- B = B * 64 / ( 1L << CUR.GS.delta_shift );
+ B *= 1L << ( 6 - CUR.GS.delta_shift );
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+ if ( SUBPIXEL_HINTING )
+ {
+ /*
+ * Allow delta move if
+ *
+ * - not using ignore_x_mode rendering,
+ * - glyph is specifically set to allow it, or
+ * - glyph is composite and freedom vector is not in subpixel
+ * direction.
+ */
+ if ( !CUR.ignore_x_mode ||
+ ( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_DO_DELTAP ) ||
+ ( CUR.is_composite && CUR.GS.freeVector.y != 0 ) )
+ CUR_Func_move( &CUR.zp0, A, B );
+
+ /* Otherwise, apply subpixel hinting and compatibility mode */
+ /* rules, always skipping deltas in subpixel direction. */
+ else if ( CUR.ignore_x_mode && CUR.GS.freeVector.y != 0 )
+ {
+ /* save the y value of the point now; compare after move */
+ B1 = (FT_UShort)CUR.zp0.cur[A].y;
+
+ /* Standard subpixel hinting: Allow y move for y-touched */
+ /* points. This messes up DejaVu ... */
+ if ( !CUR.face->sph_compatibility_mode &&
+ ( CUR.zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) )
+ CUR_Func_move( &CUR.zp0, A, B );
+
+ /* compatibility mode */
+ else if ( CUR.face->sph_compatibility_mode &&
+ !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) )
+ {
+ if ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES )
+ B = FT_PIX_ROUND( B1 + B ) - B1;
+
+ /* Allow delta move if using sph_compatibility_mode, */
+ /* IUP has not been called, and point is touched on Y. */
+ if ( !CUR.iup_called &&
+ ( CUR.zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) )
+ CUR_Func_move( &CUR.zp0, A, B );
+ }
+
+ B2 = (FT_UShort)CUR.zp0.cur[A].y;
+
+ /* Reverse this move if it results in a disallowed move */
+ if ( CUR.GS.freeVector.y != 0 &&
+ ( ( CUR.face->sph_compatibility_mode &&
+ ( B1 & 63 ) == 0 &&
+ ( B2 & 63 ) != 0 ) ||
+ ( ( CUR.sph_tweak_flags &
+ SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP ) &&
+ ( B1 & 63 ) != 0 &&
+ ( B2 & 63 ) != 0 ) ) )
+ CUR_Func_move( &CUR.zp0, A, -B );
+ }
+ }
+ else
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
- CUR_Func_move( &CUR.zp0, A, B );
+ CUR_Func_move( &CUR.zp0, A, B );
}
}
else
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
}
Fail:
@@ -7016,7 +7630,7 @@
Ins_DELTAC( INS_ARG )
{
FT_ULong nump, k;
- FT_ULong A, C;
+ FT_ULong A, C, P;
FT_Long B;
@@ -7030,7 +7644,7 @@
if ( CUR.args < n )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Too_Few_Arguments;
+ CUR.error = FT_THROW( Too_Few_Arguments );
n = CUR.args;
}
@@ -7040,6 +7654,7 @@
}
#endif
+ P = (FT_ULong)CUR_Func_cur_ppem();
nump = (FT_ULong)args[0];
for ( k = 1; k <= nump; k++ )
@@ -7047,7 +7662,7 @@
if ( CUR.args < 2 )
{
if ( CUR.pedantic_hinting )
- CUR.error = TT_Err_Too_Few_Arguments;
+ CUR.error = FT_THROW( Too_Few_Arguments );
CUR.args = 0;
goto Fail;
}
@@ -7061,7 +7676,7 @@
{
if ( CUR.pedantic_hinting )
{
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
return;
}
}
@@ -7085,12 +7700,12 @@
C += CUR.GS.delta_base;
- if ( CURRENT_Ppem() == (FT_Long)C )
+ if ( P == C )
{
B = ( (FT_ULong)B & 0xF ) - 8;
if ( B >= 0 )
B++;
- B = B * 64 / ( 1L << CUR.GS.delta_shift );
+ B *= 1L << ( 6 - CUR.GS.delta_shift );
CUR_Func_move_cvt( A, B );
}
@@ -7123,22 +7738,109 @@
K = 0;
- /* We return MS rasterizer version 1.7 for the font scaler. */
- if ( ( args[0] & 1 ) != 0 )
- K = 35;
-
- /* Has the glyph been rotated? */
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ /********************************/
+ /* RASTERIZER VERSION */
+ /* Selector Bit: 0 */
+ /* Return Bit(s): 0-7 */
+ /* */
+ if ( SUBPIXEL_HINTING &&
+ ( args[0] & 1 ) != 0 &&
+ CUR.ignore_x_mode )
+ {
+ K = CUR.rasterizer_version;
+ FT_TRACE7(( "Setting rasterizer version %d\n",
+ CUR.rasterizer_version ));
+ }
+ else
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+ if ( ( args[0] & 1 ) != 0 )
+ K = TT_INTERPRETER_VERSION_35;
+
+ /********************************/
+ /* GLYPH ROTATED */
+ /* Selector Bit: 1 */
+ /* Return Bit(s): 8 */
+ /* */
if ( ( args[0] & 2 ) != 0 && CUR.tt_metrics.rotated )
K |= 0x80;
- /* Has the glyph been stretched? */
+ /********************************/
+ /* GLYPH STRETCHED */
+ /* Selector Bit: 2 */
+ /* Return Bit(s): 9 */
+ /* */
if ( ( args[0] & 4 ) != 0 && CUR.tt_metrics.stretched )
K |= 1 << 8;
- /* Are we hinting for grayscale? */
+ /********************************/
+ /* HINTING FOR GRAYSCALE */
+ /* Selector Bit: 5 */
+ /* Return Bit(s): 12 */
+ /* */
if ( ( args[0] & 32 ) != 0 && CUR.grayscale )
K |= 1 << 12;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+ if ( SUBPIXEL_HINTING &&
+ CUR.ignore_x_mode &&
+ CUR.rasterizer_version >= TT_INTERPRETER_VERSION_35 )
+ {
+
+ if ( CUR.rasterizer_version >= 37 )
+ {
+ /********************************/
+ /* HINTING FOR SUBPIXEL */
+ /* Selector Bit: 6 */
+ /* Return Bit(s): 13 */
+ /* */
+ if ( ( args[0] & 64 ) != 0 && CUR.subpixel )
+ K |= 1 << 13;
+
+ /********************************/
+ /* COMPATIBLE WIDTHS ENABLED */
+ /* Selector Bit: 7 */
+ /* Return Bit(s): 14 */
+ /* */
+ /* Functionality still needs to be added */
+ if ( ( args[0] & 128 ) != 0 && CUR.compatible_widths )
+ K |= 1 << 14;
+
+ /********************************/
+ /* SYMMETRICAL SMOOTHING */
+ /* Selector Bit: 8 */
+ /* Return Bit(s): 15 */
+ /* */
+ /* Functionality still needs to be added */
+ if ( ( args[0] & 256 ) != 0 && CUR.symmetrical_smoothing )
+ K |= 1 << 15;
+
+ /********************************/
+ /* HINTING FOR BGR? */
+ /* Selector Bit: 9 */
+ /* Return Bit(s): 16 */
+ /* */
+ /* Functionality still needs to be added */
+ if ( ( args[0] & 512 ) != 0 && CUR.bgr )
+ K |= 1 << 16;
+
+ if ( CUR.rasterizer_version >= 38 )
+ {
+ /********************************/
+ /* SUBPIXEL POSITIONED? */
+ /* Selector Bit: 10 */
+ /* Return Bit(s): 17 */
+ /* */
+ /* Functionality still needs to be added */
+ if ( ( args[0] & 1024 ) != 0 && CUR.subpixel_positioned )
+ K |= 1 << 17;
+ }
+ }
+ }
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
args[0] = K;
}
@@ -7161,7 +7863,7 @@
if ( CUR.callTop >= CUR.callSize )
{
- CUR.error = TT_Err_Stack_Overflow;
+ CUR.error = FT_THROW( Stack_Overflow );
return;
}
@@ -7170,8 +7872,7 @@
call->Caller_Range = CUR.curRange;
call->Caller_IP = CUR.IP + 1;
call->Cur_Count = 1;
- call->Cur_Restart = def->start;
- call->Cur_End = def->end;
+ call->Def = def;
INS_Goto_CodeRange( def->range, def->start );
@@ -7180,7 +7881,7 @@
}
}
- CUR.error = TT_Err_Invalid_Opcode;
+ CUR.error = FT_THROW( Invalid_Opcode );
}
@@ -7507,18 +8208,40 @@
FT_EXPORT_DEF( FT_Error )
TT_RunIns( TT_ExecContext exc )
{
- FT_Long ins_counter = 0; /* executed instructions counter */
+ FT_Long ins_counter = 0; /* executed instructions counter */
+ FT_UShort i;
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ FT_Byte opcode_pattern[1][2] = {
+ /* #8 TypeMan Talk Align */
+ {
+ 0x06, /* SPVTL */
+ 0x7D, /* RDTG */
+ },
+ };
+ FT_UShort opcode_patterns = 1;
+ FT_UShort opcode_pointer[1] = { 0 };
+ FT_UShort opcode_size[1] = { 1 };
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
#ifdef TT_CONFIG_OPTION_STATIC_RASTER
+ if ( !exc )
+ return FT_THROW( Invalid_Argument );
+
cur = *exc;
#endif
- /* set CVT functions */
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ CUR.iup_called = FALSE;
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ /* set PPEM and CVT functions */
CUR.tt_metrics.ratio = 0;
if ( CUR.metrics.x_ppem != CUR.metrics.y_ppem )
{
/* non-square pixels, use the stretched routines */
+ CUR.func_cur_ppem = Current_Ppem_Stretched;
CUR.func_read_cvt = Read_CVT_Stretched;
CUR.func_write_cvt = Write_CVT_Stretched;
CUR.func_move_cvt = Move_CVT_Stretched;
@@ -7526,6 +8249,7 @@
else
{
/* square pixels, use normal routines */
+ CUR.func_cur_ppem = Current_Ppem;
CUR.func_read_cvt = Read_CVT;
CUR.func_write_cvt = Write_CVT;
CUR.func_move_cvt = Move_CVT;
@@ -7560,12 +8284,9 @@
/* One can also interpret it as the index of the last argument. */
if ( CUR.args < 0 )
{
- FT_UShort i;
-
-
if ( CUR.pedantic_hinting )
{
- CUR.error = TT_Err_Too_Few_Arguments;
+ CUR.error = FT_THROW( Too_Few_Arguments );
goto LErrorLabel_;
}
@@ -7582,12 +8303,45 @@
/* statement. */
if ( CUR.new_top > CUR.stackSize )
{
- CUR.error = TT_Err_Stack_Overflow;
+ CUR.error = FT_THROW( Stack_Overflow );
goto LErrorLabel_;
}
CUR.step_ins = TRUE;
- CUR.error = TT_Err_Ok;
+ CUR.error = FT_Err_Ok;
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+ if ( SUBPIXEL_HINTING )
+ {
+ for ( i = 0; i < opcode_patterns; i++ )
+ {
+ if ( opcode_pointer[i] < opcode_size[i] &&
+ CUR.opcode == opcode_pattern[i][opcode_pointer[i]] )
+ {
+ opcode_pointer[i] += 1;
+
+ if ( opcode_pointer[i] == opcode_size[i] )
+ {
+ FT_TRACE7(( "sph: opcode ptrn: %d, %s %s\n",
+ i,
+ CUR.face->root.family_name,
+ CUR.face->root.style_name ));
+
+ switch ( i )
+ {
+ case 0:
+ break;
+ }
+ opcode_pointer[i] = 0;
+ }
+ }
+ else
+ opcode_pointer[i] = 0;
+ }
+ }
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
#ifdef TT_CONFIG_OPTION_INTERPRETER_SWITCH
@@ -7801,7 +8555,6 @@
Ins_MDAP( EXEC_ARG_ args );
break;
-
case 0x30: /* IUP */
case 0x31: /* IUP */
Ins_IUP( EXEC_ARG_ args );
@@ -7861,7 +8614,7 @@
break;
Set_Invalid_Ref:
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
break;
case 0x43: /* RS */
@@ -8151,11 +8904,12 @@
#endif /* TT_CONFIG_OPTION_INTERPRETER_SWITCH */
- if ( CUR.error != TT_Err_Ok )
+ if ( CUR.error )
{
switch ( CUR.error )
{
- case TT_Err_Invalid_Opcode: /* looking for redefined instructions */
+ /* looking for redefined instructions */
+ case FT_ERR( Invalid_Opcode ):
{
TT_DefRecord* def = CUR.IDefs;
TT_DefRecord* limit = def + CUR.numIDefs;
@@ -8170,7 +8924,7 @@
if ( CUR.callTop >= CUR.callSize )
{
- CUR.error = TT_Err_Invalid_Reference;
+ CUR.error = FT_THROW( Invalid_Reference );
goto LErrorLabel_;
}
@@ -8179,8 +8933,7 @@
callrec->Caller_Range = CUR.curRange;
callrec->Caller_IP = CUR.IP + 1;
callrec->Cur_Count = 1;
- callrec->Cur_Restart = def->start;
- callrec->Cur_End = def->end;
+ callrec->Def = def;
if ( INS_Goto_CodeRange( def->range, def->start ) == FAILURE )
goto LErrorLabel_;
@@ -8190,7 +8943,7 @@
}
}
- CUR.error = TT_Err_Invalid_Opcode;
+ CUR.error = FT_THROW( Invalid_Opcode );
goto LErrorLabel_;
#if 0
@@ -8216,14 +8969,14 @@
/* increment instruction counter and check if we didn't */
/* run this program for too long (e.g. infinite loops). */
if ( ++ins_counter > MAX_RUNNABLE_OPCODES )
- return TT_Err_Execution_Too_Long;
+ return FT_THROW( Execution_Too_Long );
LSuiteLabel_:
if ( CUR.IP >= CUR.codeSize )
{
if ( CUR.callTop > 0 )
{
- CUR.error = TT_Err_Code_Overflow;
+ CUR.error = FT_THROW( Code_Overflow );
goto LErrorLabel_;
}
else
@@ -8237,10 +8990,10 @@
*exc = cur;
#endif
- return TT_Err_Ok;
+ return FT_Err_Ok;
LErrorCodeOverflow_:
- CUR.error = TT_Err_Code_Overflow;
+ CUR.error = FT_THROW( Code_Overflow );
LErrorLabel_:
@@ -8251,10 +9004,13 @@
/* 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 )
+ if ( CUR.error &&
+ !CUR.instruction_trap &&
+ CUR.curRange == tt_coderange_glyph )
{
FT_TRACE1(( " The interpreter returned error 0x%x\n", CUR.error ));
- exc->size->cvt_ready = FALSE;
+ exc->size->bytecode_ready = -1;
+ exc->size->cvt_ready = -1;
}
return CUR.error;
diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h
index 6d0fc03..333decc 100644
--- a/src/truetype/ttinterp.h
+++ b/src/truetype/ttinterp.h
@@ -4,7 +4,7 @@
/* */
/* TrueType bytecode interpreter (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */
+/* Copyright 1996-2007, 2010, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -81,6 +81,10 @@ FT_BEGIN_HEADER
(*TT_Project_Func)( EXEC_OP_ FT_Pos dx,
FT_Pos dy );
+ /* getting current ppem. Take care of non-square pixels if necessary */
+ typedef FT_Long
+ (*TT_Cur_Ppem_Func)( EXEC_OP );
+
/* reading a cvt value. Take care of non-square pixels if necessary */
typedef FT_F26Dot6
(*TT_Get_CVT_Func)( EXEC_OP_ FT_ULong idx );
@@ -101,12 +105,54 @@ FT_BEGIN_HEADER
FT_Int Caller_Range;
FT_Long Caller_IP;
FT_Long Cur_Count;
- FT_Long Cur_Restart;
- FT_Long Cur_End;
+
+ TT_DefRecord *Def; /* either FDEF or IDEF */
} TT_CallRec, *TT_CallStack;
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+ /*************************************************************************/
+ /* */
+ /* These structures define rules used to tweak subpixel hinting for */
+ /* various fonts. "", 0, "", NULL value indicates to match any value. */
+ /* */
+
+#define SPH_MAX_NAME_SIZE 32
+#define SPH_MAX_CLASS_MEMBERS 100
+
+ typedef struct SPH_TweakRule_
+ {
+ const char family[SPH_MAX_NAME_SIZE];
+ const FT_UInt ppem;
+ const char style[SPH_MAX_NAME_SIZE];
+ const FT_ULong glyph;
+
+ } SPH_TweakRule;
+
+
+ typedef struct SPH_ScaleRule_
+ {
+ const char family[SPH_MAX_NAME_SIZE];
+ const FT_UInt ppem;
+ const char style[SPH_MAX_NAME_SIZE];
+ const FT_ULong glyph;
+ const FT_ULong scale;
+
+ } SPH_ScaleRule;
+
+
+ typedef struct SPH_Font_Class_
+ {
+ const char name[SPH_MAX_NAME_SIZE];
+ const char member[SPH_MAX_CLASS_MEMBERS][SPH_MAX_NAME_SIZE];
+
+ } SPH_Font_Class;
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+
/*************************************************************************/
/* */
/* The main structure for the interpreter which collects all necessary */
@@ -186,11 +232,6 @@ FT_BEGIN_HEADER
FT_F26Dot6 phase; /* `SuperRounding' */
FT_F26Dot6 threshold;
-#if 0
- /* this seems to be unused */
- FT_Int cur_ppem; /* ppem along the current proj vector */
-#endif
-
FT_Bool instruction_trap; /* If `True', the interpreter will */
/* exit after each instruction */
@@ -212,30 +253,61 @@ FT_BEGIN_HEADER
TT_Move_Func func_move; /* current point move function */
TT_Move_Func func_move_orig; /* move original position function */
+ TT_Cur_Ppem_Func func_cur_ppem; /* get current proj. ppem value */
+
TT_Get_CVT_Func func_read_cvt; /* read a cvt entry */
TT_Set_CVT_Func func_write_cvt; /* write a cvt entry (in pixels) */
TT_Set_CVT_Func func_move_cvt; /* incr a cvt entry (in pixels) */
FT_Bool grayscale; /* are we hinting for grayscale? */
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ TT_Round_Func func_round_sphn; /* subpixel rounding function */
+
+ FT_Bool subpixel; /* Using subpixel hinting? */
+ FT_Bool ignore_x_mode; /* Standard rendering mode for */
+ /* subpixel hinting. On if gray */
+ /* or subpixel hinting is on. */
+
+ /* The following 4 aren't fully implemented but here for MS rasterizer */
+ /* compatibility. */
+ FT_Bool compatible_widths; /* compatible widths? */
+ FT_Bool symmetrical_smoothing; /* symmetrical_smoothing? */
+ FT_Bool bgr; /* bgr instead of rgb? */
+ FT_Bool subpixel_positioned; /* subpixel positioned */
+ /* (DirectWrite ClearType)? */
+
+ FT_Int rasterizer_version; /* MS rasterizer version */
+
+ FT_Bool iup_called; /* IUP called for glyph? */
+
+ FT_ULong sph_tweak_flags; /* flags to control */
+ /* hint tweaks */
+
+ FT_ULong sph_in_func_flags; /* flags to indicate if in */
+ /* special functions */
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
} TT_ExecContextRec;
extern const TT_GraphicsState tt_default_graphics_state;
- FT_LOCAL( FT_Error )
+#ifdef TT_USE_BYTECODE_INTERPRETER
+ FT_LOCAL( void )
TT_Goto_CodeRange( TT_ExecContext exec,
FT_Int range,
FT_Long IP );
- FT_LOCAL( FT_Error )
+ FT_LOCAL( void )
TT_Set_CodeRange( TT_ExecContext exec,
FT_Int range,
void* base,
FT_Long length );
- FT_LOCAL( FT_Error )
+ FT_LOCAL( void )
TT_Clear_CodeRange( TT_ExecContext exec,
FT_Int range );
@@ -246,6 +318,7 @@ FT_BEGIN_HEADER
FT_Long multiplier,
void* _pbuff,
FT_ULong new_max );
+#endif /* TT_USE_BYTECODE_INTERPRETER */
/*************************************************************************/
@@ -270,7 +343,9 @@ FT_BEGIN_HEADER
FT_EXPORT( TT_ExecContext )
TT_New_Context( TT_Driver driver );
- FT_LOCAL( FT_Error )
+
+#ifdef TT_USE_BYTECODE_INTERPRETER
+ FT_LOCAL( void )
TT_Done_Context( TT_ExecContext exec );
FT_LOCAL( FT_Error )
@@ -278,13 +353,14 @@ FT_BEGIN_HEADER
TT_Face face,
TT_Size size );
- FT_LOCAL( FT_Error )
+ FT_LOCAL( void )
TT_Save_Context( TT_ExecContext exec,
TT_Size ins );
FT_LOCAL( FT_Error )
TT_Run_Context( TT_ExecContext exec,
FT_Bool debug );
+#endif /* TT_USE_BYTECODE_INTERPRETER */
/*************************************************************************/
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 814c713..4707dfe 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -4,7 +4,7 @@
/* */
/* Objects manager (body). */
/* */
-/* Copyright 1996-2011 */
+/* Copyright 1996-2013 */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,6 +21,7 @@
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
#include FT_INTERNAL_SFNT_H
+#include FT_TRUETYPE_DRIVER_H
#include "ttgload.h"
#include "ttpload.h"
@@ -149,20 +150,21 @@
tt_check_trickyness_family( FT_String* name )
{
-#define TRICK_NAMES_MAX_CHARACTERS 16
-#define TRICK_NAMES_COUNT 8
+#define TRICK_NAMES_MAX_CHARACTERS 19
+#define TRICK_NAMES_COUNT 9
static const char trick_names[TRICK_NAMES_COUNT]
[TRICK_NAMES_MAX_CHARACTERS + 1] =
{
- "DFKaiSho-SB", /* dfkaisb.ttf */
+ "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 */
+ "DFKai-SB", /* kaiu.ttf */
+ "HuaTianKaiTi?", /* htkt2.ttf */
+ "HuaTianSongTi?", /* htst3.ttf */
+ "Ming(for ISO10646)", /* hkscsiic.ttf & iicore.ttf */
+ "MingLiU", /* mingliu.ttf & mingliu.ttc */
+ "PMingLiU", /* mingliu.ttc */
+ "MingLi43", /* mingli.ttf */
};
int nn;
@@ -244,7 +246,7 @@
tt_check_trickyness_sfnt_ids( TT_Face face )
{
#define TRICK_SFNT_IDS_PER_FACE 3
-#define TRICK_SFNT_IDS_NUM_FACES 13
+#define TRICK_SFNT_IDS_NUM_FACES 17
static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES]
[TRICK_SFNT_IDS_PER_FACE] = {
@@ -254,69 +256,89 @@
#define TRICK_SFNT_ID_prep 2
{ /* MingLiU 1995 */
- { 0x05bcf058, 0x000002e4 }, /* cvt */
- { 0x28233bf1, 0x000087c4 }, /* fpgm */
- { 0xa344a1ea, 0x000001e1 } /* prep */
+ { 0x05BCF058UL, 0x000002E4UL }, /* cvt */
+ { 0x28233BF1UL, 0x000087C4UL }, /* fpgm */
+ { 0xA344A1EAUL, 0x000001E1UL } /* prep */
},
{ /* MingLiU 1996- */
- { 0x05bcf058, 0x000002e4 }, /* cvt */
- { 0x28233bf1, 0x000087c4 }, /* fpgm */
- { 0xa344a1eb, 0x000001e1 } /* prep */
+ { 0x05BCF058UL, 0x000002E4UL }, /* cvt */
+ { 0x28233BF1UL, 0x000087C4UL }, /* fpgm */
+ { 0xA344A1EBUL, 0x000001E1UL } /* prep */
},
{ /* DFKaiShu */
- { 0x11e5ead4, 0x00000350 }, /* cvt */
- { 0x5a30ca3b, 0x00009063 }, /* fpgm */
- { 0x13a42602, 0x0000007e } /* prep */
+ { 0x11E5EAD4UL, 0x00000350UL }, /* cvt */
+ { 0x5A30CA3BUL, 0x00009063UL }, /* fpgm */
+ { 0x13A42602UL, 0x0000007EUL } /* prep */
},
{ /* HuaTianKaiTi */
- { 0xfffbfffc, 0x00000008 }, /* cvt */
- { 0x9c9e48b8, 0x0000bea2 }, /* fpgm */
- { 0x70020112, 0x00000008 } /* prep */
+ { 0xFFFBFFFCUL, 0x00000008UL }, /* cvt */
+ { 0x9C9E48B8UL, 0x0000BEA2UL }, /* fpgm */
+ { 0x70020112UL, 0x00000008UL } /* prep */
},
{ /* HuaTianSongTi */
- { 0xfffbfffc, 0x00000008 }, /* cvt */
- { 0x0a5a0483, 0x00017c39 }, /* fpgm */
- { 0x70020112, 0x00000008 } /* prep */
+ { 0xFFFBFFFCUL, 0x00000008UL }, /* cvt */
+ { 0x0A5A0483UL, 0x00017C39UL }, /* fpgm */
+ { 0x70020112UL, 0x00000008UL } /* prep */
},
{ /* NEC fadpop7.ttf */
- { 0x00000000, 0x00000000 }, /* cvt */
- { 0x40c92555, 0x000000e5 }, /* fpgm */
- { 0xa39b58e3, 0x0000117c } /* prep */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0x40C92555UL, 0x000000E5UL }, /* fpgm */
+ { 0xA39B58E3UL, 0x0000117CUL } /* prep */
},
{ /* NEC fadrei5.ttf */
- { 0x00000000, 0x00000000 }, /* cvt */
- { 0x33c41652, 0x000000e5 }, /* fpgm */
- { 0x26d6c52a, 0x00000f6a } /* prep */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0x33C41652UL, 0x000000E5UL }, /* fpgm */
+ { 0x26D6C52AUL, 0x00000F6AUL } /* prep */
},
{ /* NEC fangot7.ttf */
- { 0x00000000, 0x00000000 }, /* cvt */
- { 0x6db1651d, 0x0000019d }, /* fpgm */
- { 0x6c6e4b03, 0x00002492 } /* prep */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0x6DB1651DUL, 0x0000019DUL }, /* fpgm */
+ { 0x6C6E4B03UL, 0x00002492UL } /* prep */
},
{ /* NEC fangyo5.ttf */
- { 0x00000000, 0x00000000 }, /* cvt */
- { 0x40c92555, 0x000000e5 }, /* fpgm */
- { 0xde51fad0, 0x0000117c } /* prep */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0x40C92555UL, 0x000000E5UL }, /* fpgm */
+ { 0xDE51FAD0UL, 0x0000117CUL } /* prep */
},
{ /* NEC fankyo5.ttf */
- { 0x00000000, 0x00000000 }, /* cvt */
- { 0x85e47664, 0x000000e5 }, /* fpgm */
- { 0xa6c62831, 0x00001caa } /* prep */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0x85E47664UL, 0x000000E5UL }, /* fpgm */
+ { 0xA6C62831UL, 0x00001CAAUL } /* prep */
},
{ /* NEC fanrgo5.ttf */
- { 0x00000000, 0x00000000 }, /* cvt */
- { 0x2d891cfd, 0x0000019d }, /* fpgm */
- { 0xa0604633, 0x00001de8 } /* prep */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0x2D891CFDUL, 0x0000019DUL }, /* fpgm */
+ { 0xA0604633UL, 0x00001DE8UL } /* prep */
},
{ /* NEC fangot5.ttc */
- { 0x00000000, 0x00000000 }, /* cvt */
- { 0x40aa774c, 0x000001cb }, /* fpgm */
- { 0x9b5caa96, 0x00001f9a } /* prep */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0x40AA774CUL, 0x000001CBUL }, /* fpgm */
+ { 0x9B5CAA96UL, 0x00001F9AUL } /* prep */
},
{ /* NEC fanmin3.ttc */
- { 0x00000000, 0x00000000 }, /* cvt */
- { 0x0d3de9cb, 0x00000141 }, /* fpgm */
- { 0xd4127766, 0x00002280 } /* prep */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0x0D3DE9CBUL, 0x00000141UL }, /* fpgm */
+ { 0xD4127766UL, 0x00002280UL } /* prep */
+ },
+ { /* NEC FA-Gothic, 1996 */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0x4A692698UL, 0x000001F0UL }, /* fpgm */
+ { 0x340D4346UL, 0x00001FCAUL } /* prep */
+ },
+ { /* NEC FA-Minchou, 1996 */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0xCD34C604UL, 0x00000166UL }, /* fpgm */
+ { 0x6CF31046UL, 0x000022B0UL } /* prep */
+ },
+ { /* NEC FA-RoundGothicB, 1996 */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0x5DA75315UL, 0x0000019DUL }, /* fpgm */
+ { 0x40745A5FUL, 0x000022E0UL } /* prep */
+ },
+ { /* NEC FA-RoundGothicM, 1996 */
+ { 0x00000000UL, 0x00000000UL }, /* cvt */
+ { 0xF055FC48UL, 0x000001C2UL }, /* fpgm */
+ { 0x3900DED3UL, 0x00001E18UL } /* prep */
}
};
@@ -501,7 +523,7 @@
if ( !sfnt )
{
FT_ERROR(( "tt_face_init: cannot access `sfnt' module\n" ));
- error = TT_Err_Missing_Module;
+ error = FT_THROW( Missing_Module );
goto Exit;
}
@@ -511,6 +533,10 @@
/* check that we have a valid TrueType file */
error = sfnt->init_face( stream, face, face_index, num_params, params );
+
+ /* Stream may have changed. */
+ stream = face->root.stream;
+
if ( error )
goto Exit;
@@ -531,7 +557,7 @@
/* If we are performing a simple font format check, exit immediately. */
if ( face_index < 0 )
- return TT_Err_Ok;
+ return FT_Err_Ok;
/* Load font directory */
error = sfnt->load_face( stream, face, face_index, num_params, params );
@@ -631,7 +657,7 @@
return error;
Bad_Format:
- error = TT_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -732,9 +758,11 @@
exec = ( (TT_Driver)FT_FACE_DRIVER( face ) )->context;
if ( !exec )
- return TT_Err_Could_Not_Find_Context;
+ return FT_THROW( Could_Not_Find_Context );
- TT_Load_Context( exec, face, size );
+ error = TT_Load_Context( exec, face, size );
+ if ( error )
+ return error;
exec->callTop = 0;
exec->top = 0;
@@ -744,7 +772,7 @@
exec->threshold = 0;
exec->instruction_trap = FALSE;
- exec->F_dot_P = 0x10000L;
+ exec->F_dot_P = 0x4000L;
exec->pedantic_hinting = pedantic;
@@ -775,17 +803,15 @@
if ( face->font_program_size > 0 )
{
- error = TT_Goto_CodeRange( exec, tt_coderange_font, 0 );
+ TT_Goto_CodeRange( exec, tt_coderange_font, 0 );
- if ( !error )
- {
- FT_TRACE4(( "Executing `fpgm' table.\n" ));
-
- error = face->interpreter( exec );
- }
+ FT_TRACE4(( "Executing `fpgm' table.\n" ));
+ error = face->interpreter( exec );
}
else
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
+
+ size->bytecode_ready = error;
if ( !error )
TT_Save_Context( exec, size );
@@ -826,9 +852,11 @@
exec = ( (TT_Driver)FT_FACE_DRIVER( face ) )->context;
if ( !exec )
- return TT_Err_Could_Not_Find_Context;
+ return FT_THROW( Could_Not_Find_Context );
- TT_Load_Context( exec, face, size );
+ error = TT_Load_Context( exec, face, size );
+ if ( error )
+ return error;
exec->callTop = 0;
exec->top = 0;
@@ -846,9 +874,9 @@
if ( face->cvt_program_size > 0 )
{
- error = TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );
+ TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );
- if ( !error && !size->debug )
+ if ( !size->debug )
{
FT_TRACE4(( "Executing `prep' table.\n" ));
@@ -856,7 +884,29 @@
}
}
else
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
+
+ size->cvt_ready = error;
+
+ /* UNDOCUMENTED! The MS rasterizer doesn't allow the following */
+ /* graphics state variables to be modified by the CVT program. */
+
+ exec->GS.dualVector.x = 0x4000;
+ exec->GS.dualVector.y = 0;
+ exec->GS.projVector.x = 0x4000;
+ exec->GS.projVector.y = 0x0;
+ exec->GS.freeVector.x = 0x4000;
+ exec->GS.freeVector.y = 0x0;
+
+ exec->GS.rp0 = 0;
+ exec->GS.rp1 = 0;
+ exec->GS.rp2 = 0;
+
+ exec->GS.gep0 = 1;
+ exec->GS.gep1 = 1;
+ exec->GS.gep2 = 1;
+
+ exec->GS.loop = 1;
/* save as default graphics state */
size->GS = exec->GS;
@@ -866,10 +916,6 @@
return error;
}
-#endif /* TT_USE_BYTECODE_INTERPRETER */
-
-
-#ifdef TT_USE_BYTECODE_INTERPRETER
static void
tt_size_done_bytecode( FT_Size ftsize )
@@ -907,8 +953,8 @@
size->max_func = 0;
size->max_ins = 0;
- size->bytecode_ready = 0;
- size->cvt_ready = 0;
+ size->bytecode_ready = -1;
+ size->cvt_ready = -1;
}
@@ -922,14 +968,13 @@
TT_Size size = (TT_Size)ftsize;
TT_Face face = (TT_Face)ftsize->face;
FT_Memory memory = face->root.memory;
- FT_Int i;
FT_UShort n_twilight;
TT_MaxProfile* maxp = &face->max_profile;
- size->bytecode_ready = 1;
- size->cvt_ready = 0;
+ size->bytecode_ready = -1;
+ size->cvt_ready = -1;
size->max_function_defs = maxp->maxFunctionDefs;
size->max_instruction_defs = maxp->maxInstructionDefs;
@@ -951,9 +996,11 @@
metrics->rotated = FALSE;
metrics->stretched = FALSE;
- /* set default compensation (all 0) */
- for ( i = 0; i < 4; i++ )
- metrics->compensations[i] = 0;
+ /* set default engine compensation */
+ metrics->compensations[0] = 0; /* gray */
+ metrics->compensations[1] = 0; /* black */
+ metrics->compensations[2] = 0; /* white */
+ metrics->compensations[3] = 0; /* reserved */
}
/* allocate function defs, instruction defs, cvt, and storage area */
@@ -1003,18 +1050,17 @@
tt_size_ready_bytecode( TT_Size size,
FT_Bool pedantic )
{
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
- if ( !size->bytecode_ready )
- {
+ if ( size->bytecode_ready < 0 )
error = tt_size_init_bytecode( (FT_Size)size, pedantic );
- if ( error )
- goto Exit;
- }
+
+ if ( error || size->bytecode_ready )
+ goto Exit;
/* rescale CVT when needed */
- if ( !size->cvt_ready )
+ if ( size->cvt_ready < 0 )
{
FT_UInt i;
TT_Face face = (TT_Face)size->root.face;
@@ -1041,8 +1087,6 @@
size->GS = tt_default_graphics_state;
error = tt_size_run_prep( size, pedantic );
- if ( !error )
- size->cvt_ready = 1;
}
Exit:
@@ -1070,11 +1114,12 @@
tt_size_init( FT_Size ttsize ) /* TT_Size */
{
TT_Size size = (TT_Size)ttsize;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
+
#ifdef TT_USE_BYTECODE_INTERPRETER
- size->bytecode_ready = 0;
- size->cvt_ready = 0;
+ size->bytecode_ready = -1;
+ size->cvt_ready = -1;
#endif
size->ttmetrics.valid = FALSE;
@@ -1102,8 +1147,7 @@
#ifdef TT_USE_BYTECODE_INTERPRETER
- if ( size->bytecode_ready )
- tt_size_done_bytecode( ttsize );
+ tt_size_done_bytecode( ttsize );
#endif
size->ttmetrics.valid = FALSE;
@@ -1126,7 +1170,7 @@
tt_size_reset( TT_Size size )
{
TT_Face face;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Size_Metrics* metrics;
@@ -1140,7 +1184,7 @@
*metrics = size->root.metrics;
if ( metrics->x_ppem < 1 || metrics->y_ppem < 1 )
- return TT_Err_Invalid_PPem;
+ return FT_THROW( Invalid_PPem );
/* This bit flag, if set, indicates that the ppems must be */
/* rounded to integers. Nearly all TrueType fonts have this bit */
@@ -1170,22 +1214,20 @@
size->ttmetrics.scale = metrics->x_scale;
size->ttmetrics.ppem = metrics->x_ppem;
size->ttmetrics.x_ratio = 0x10000L;
- size->ttmetrics.y_ratio = FT_MulDiv( metrics->y_ppem,
- 0x10000L,
+ size->ttmetrics.y_ratio = FT_DivFix( metrics->y_ppem,
metrics->x_ppem );
}
else
{
size->ttmetrics.scale = metrics->y_scale;
size->ttmetrics.ppem = metrics->y_ppem;
- size->ttmetrics.x_ratio = FT_MulDiv( metrics->x_ppem,
- 0x10000L,
+ size->ttmetrics.x_ratio = FT_DivFix( metrics->x_ppem,
metrics->y_ppem );
size->ttmetrics.y_ratio = 0x10000L;
}
#ifdef TT_USE_BYTECODE_INTERPRETER
- size->cvt_ready = 0;
+ size->cvt_ready = -1;
#endif /* TT_USE_BYTECODE_INTERPRETER */
if ( !error )
@@ -1219,15 +1261,21 @@
if ( !TT_New_Context( driver ) )
- return TT_Err_Could_Not_Find_Context;
+ return FT_THROW( Could_Not_Find_Context );
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ driver->interpreter_version = TT_INTERPRETER_VERSION_38;
#else
+ driver->interpreter_version = TT_INTERPRETER_VERSION_35;
+#endif
+
+#else /* !TT_USE_BYTECODE_INTERPRETER */
FT_UNUSED( ttdriver );
-#endif
+#endif /* !TT_USE_BYTECODE_INTERPRETER */
- return TT_Err_Ok;
+ return FT_Err_Ok;
}
diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h
index 47e4129..859164f 100644
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -4,7 +4,7 @@
/* */
/* Objects manager (specification). */
/* */
-/* Copyright 1996-2009, 2011-2012 by */
+/* Copyright 1996-2009, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -95,8 +95,8 @@ FT_BEGIN_HEADER
FT_F26Dot6 control_value_cutin;
FT_F26Dot6 single_width_cutin;
FT_F26Dot6 single_width_value;
- FT_Short delta_base;
- FT_Short delta_shift;
+ FT_UShort delta_base;
+ FT_UShort delta_shift;
FT_Byte instruct_control;
/* According to Greg Hitchcock from Microsoft, the `scan_control' */
@@ -173,11 +173,13 @@ FT_BEGIN_HEADER
/* */
typedef struct TT_DefRecord_
{
- FT_Int range; /* in which code range is it located? */
- FT_Long start; /* where does it start? */
- FT_Long end; /* where does it end? */
- FT_UInt opc; /* function #, or instruction code */
- FT_Bool active; /* is it active? */
+ FT_Int range; /* in which code range is it located? */
+ FT_Long start; /* where does it start? */
+ FT_Long end; /* where does it end? */
+ FT_UInt opc; /* function #, or instruction code */
+ FT_Bool active; /* is it active? */
+ FT_Bool inline_delta; /* is function that defines inline delta? */
+ FT_ULong sph_fdef_flags; /* flags to identify special functions */
} TT_DefRecord, *TT_DefArray;
@@ -190,7 +192,7 @@ FT_BEGIN_HEADER
{
FT_Fixed xx, xy; /* transformation matrix coefficients */
FT_Fixed yx, yy;
- FT_F26Dot6 ox, oy; /* offsets */
+ FT_F26Dot6 ox, oy; /* offsets */
} TT_Transform;
@@ -331,8 +333,10 @@ FT_BEGIN_HEADER
FT_Bool debug;
TT_ExecContext context;
- FT_Bool bytecode_ready;
- FT_Bool cvt_ready;
+ /* if negative, `fpgm' (resp. `prep'), wasn't executed yet; */
+ /* otherwise it is the returned error code */
+ FT_Error bytecode_ready;
+ FT_Error cvt_ready;
#endif /* TT_USE_BYTECODE_INTERPRETER */
@@ -345,11 +349,12 @@ FT_BEGIN_HEADER
/* */
typedef struct TT_DriverRec_
{
- FT_DriverRec root;
+ FT_DriverRec root;
+
TT_ExecContext context; /* execution context */
TT_GlyphZoneRec zone; /* glyph loader points zone */
- void* extension_component;
+ FT_UInt interpreter_version;
} TT_DriverRec;
@@ -427,6 +432,10 @@ FT_BEGIN_HEADER
tt_slot_init( FT_GlyphSlot slot );
+ /* auxiliary */
+#define IS_HINTED( flags ) ( ( flags & FT_LOAD_NO_HINTING ) == 0 )
+
+
FT_END_HEADER
#endif /* __TTOBJS_H__ */
diff --git a/src/truetype/ttpic.c b/src/truetype/ttpic.c
index 65ca845..edefae7 100644
--- a/src/truetype/ttpic.c
+++ b/src/truetype/ttpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for truetype module. */
/* */
-/* Copyright 2009, 2010 by */
+/* Copyright 2009, 2010, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,30 +22,29 @@
#include "ttpic.h"
#include "tterrors.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from ttdriver.c */
FT_Error
FT_Create_Class_tt_services( FT_Library library,
FT_ServiceDescRec** output_class );
-
void
FT_Destroy_Class_tt_services( FT_Library library,
FT_ServiceDescRec* clazz );
-
void
FT_Init_Class_tt_service_gx_multi_masters(
FT_Service_MultiMastersRec* sv_mm );
-
void
FT_Init_Class_tt_service_truetype_glyf(
FT_Service_TTGlyfRec* sv_ttglyf );
+
void
tt_driver_class_pic_free( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Memory memory = library->memory;
+ FT_Memory memory = library->memory;
if ( pic_container->truetype )
@@ -66,18 +65,19 @@
tt_driver_class_pic_init( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = TT_Err_Ok;
- TTModulePIC* container;
+ FT_Error error = FT_Err_Ok;
+ TTModulePIC* container = NULL;
FT_Memory memory = library->memory;
/* allocate pointer, clear and set global container pointer */
- if ( FT_ALLOC ( container, sizeof ( *container ) ) )
+ if ( FT_ALLOC( container, sizeof ( *container ) ) )
return error;
FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->truetype = 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 */
error = FT_Create_Class_tt_services( library,
&container->tt_services );
if ( error )
@@ -88,7 +88,8 @@
#endif
FT_Init_Class_tt_service_truetype_glyf(
&container->tt_service_truetype_glyf );
-Exit:
+
+ Exit:
if ( error )
tt_driver_class_pic_free( library );
return error;
diff --git a/src/truetype/ttpic.h b/src/truetype/ttpic.h
index 48f43a5..cfb4ee6 100644
--- a/src/truetype/ttpic.h
+++ b/src/truetype/ttpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for truetype module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,29 +23,43 @@
FT_BEGIN_HEADER
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_TT_SERVICES_GET tt_services
-#define FT_TT_SERVICE_GX_MULTI_MASTERS_GET tt_service_gx_multi_masters
-#define FT_TT_SERVICE_TRUETYPE_GLYF_GET tt_service_truetype_glyf
+
+#define TT_SERVICES_GET tt_services
+#define TT_SERVICE_GX_MULTI_MASTERS_GET tt_service_gx_multi_masters
+#define TT_SERVICE_TRUETYPE_GLYF_GET tt_service_truetype_glyf
+#define TT_SERVICE_PROPERTIES_GET tt_service_properties
#else /* FT_CONFIG_OPTION_PIC */
#include FT_MULTIPLE_MASTERS_H
#include FT_SERVICE_MULTIPLE_MASTERS_H
#include FT_SERVICE_TRUETYPE_GLYF_H
+#include FT_SERVICE_PROPERTIES_H
+
- typedef struct TTModulePIC_
+ typedef struct TTModulePIC_
{
- FT_ServiceDescRec* tt_services;
+ FT_ServiceDescRec* tt_services;
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- FT_Service_MultiMastersRec tt_service_gx_multi_masters;
+ FT_Service_MultiMastersRec tt_service_gx_multi_masters;
#endif
- FT_Service_TTGlyfRec tt_service_truetype_glyf;
+ FT_Service_TTGlyfRec tt_service_truetype_glyf;
+ FT_Service_PropertiesRec tt_service_properties;
+
} TTModulePIC;
-#define GET_PIC(lib) ((TTModulePIC*)((lib)->pic_container.truetype))
-#define FT_TT_SERVICES_GET (GET_PIC(library)->tt_services)
-#define FT_TT_SERVICE_GX_MULTI_MASTERS_GET (GET_PIC(library)->tt_service_gx_multi_masters)
-#define FT_TT_SERVICE_TRUETYPE_GLYF_GET (GET_PIC(library)->tt_service_truetype_glyf)
+
+#define GET_PIC( lib ) \
+ ( (TTModulePIC*)((lib)->pic_container.truetype) )
+#define TT_SERVICES_GET \
+ ( GET_PIC( library )->tt_services )
+#define TT_SERVICE_GX_MULTI_MASTERS_GET \
+ ( GET_PIC( library )->tt_service_gx_multi_masters )
+#define TT_SERVICE_TRUETYPE_GLYF_GET \
+ ( GET_PIC( library )->tt_service_truetype_glyf )
+#define TT_SERVICE_PROPERTIES_GET \
+ ( GET_PIC( library )->tt_service_properties )
+
/* see ttpic.c for the implementation */
void
@@ -58,6 +72,7 @@ FT_BEGIN_HEADER
/* */
+
FT_END_HEADER
#endif /* __TTPIC_H__ */
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c
index bb6005d..9991925 100644
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -4,7 +4,7 @@
/* */
/* TrueType-specific tables loader (body). */
/* */
-/* Copyright 1996-2002, 2004-2012 by */
+/* Copyright 1996-2002, 2004-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -72,7 +72,7 @@
/* it is possible that a font doesn't have a glyf table at all */
/* or its size is zero */
- if ( error == TT_Err_Table_Missing )
+ if ( FT_ERR_EQ( error, Table_Missing ) )
face->glyf_len = 0;
else if ( error )
goto Exit;
@@ -81,7 +81,7 @@
error = face->goto_table( face, TTAG_loca, stream, &table_len );
if ( error )
{
- error = TT_Err_Locations_Missing;
+ error = FT_THROW( Locations_Missing );
goto Exit;
}
@@ -92,7 +92,7 @@
if ( table_len >= 0x40000L )
{
FT_TRACE2(( "table too large\n" ));
- error = TT_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
face->num_locations = table_len >> shift;
@@ -104,7 +104,7 @@
if ( table_len >= 0x20000L )
{
FT_TRACE2(( "table too large\n" ));
- error = TT_Err_Invalid_Table;
+ error = FT_THROW( Invalid_Table );
goto Exit;
}
face->num_locations = table_len >> shift;
@@ -296,7 +296,7 @@
face->cvt_size = 0;
face->cvt = NULL;
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
goto Exit;
}
@@ -334,7 +334,7 @@
FT_UNUSED( face );
FT_UNUSED( stream );
- return TT_Err_Ok;
+ return FT_Err_Ok;
#endif
}
@@ -375,7 +375,7 @@
{
face->font_program = NULL;
face->font_program_size = 0;
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
FT_TRACE2(( "is missing\n" ));
}
@@ -396,7 +396,7 @@
FT_UNUSED( face );
FT_UNUSED( stream );
- return TT_Err_Ok;
+ return FT_Err_Ok;
#endif
}
@@ -436,7 +436,7 @@
{
face->cvt_program = NULL;
face->cvt_program_size = 0;
- error = TT_Err_Ok;
+ error = FT_Err_Ok;
FT_TRACE2(( "is missing\n" ));
}
@@ -457,7 +457,7 @@
FT_UNUSED( face );
FT_UNUSED( stream );
- return TT_Err_Ok;
+ return FT_Err_Ok;
#endif
}
@@ -495,7 +495,7 @@
/* this table is optional */
error = face->goto_table( face, TTAG_hdmx, stream, &table_size );
if ( error || table_size < 8 )
- return TT_Err_Ok;
+ return FT_Err_Ok;
if ( FT_FRAME_EXTRACT( table_size, face->hdmx_table ) )
goto Exit;
@@ -508,9 +508,9 @@
record_size = FT_NEXT_ULONG( p );
/* The maximum number of bytes in an hdmx device record is the */
- /* maximum number of glyphs + 2; this is 0xFFFF + 2; this is */
- /* the reason why `record_size' is a long (which we read as */
- /* unsigned long for convenience). In practice, two bytes */
+ /* maximum number of glyphs + 2; this is 0xFFFF + 2, thus */
+ /* explaining why `record_size' is a long (which we read as */
+ /* unsigned long for convenience). In practice, two bytes are */
/* sufficient to hold the size value. */
/* */
/* There are at least two fonts, HANNOM-A and HANNOM-B version */
@@ -522,10 +522,12 @@
record_size &= 0xFFFFU;
/* The limit for `num_records' is a heuristic value. */
-
- if ( version != 0 || num_records > 255 || record_size > 0x10001L )
+ if ( version != 0 ||
+ num_records > 255 ||
+ record_size > 0x10001L ||
+ record_size < 4 )
{
- error = TT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
diff --git a/src/truetype/ttsubpix.c b/src/truetype/ttsubpix.c
new file mode 100644
index 0000000..ca60451
--- /dev/null
+++ b/src/truetype/ttsubpix.c
@@ -0,0 +1,1011 @@
+/***************************************************************************/
+/* */
+/* ttsubpix.c */
+/* */
+/* TrueType Subpixel Hinting. */
+/* */
+/* Copyright 2010-2013 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_CALC_H
+#include FT_INTERNAL_STREAM_H
+#include FT_INTERNAL_SFNT_H
+#include FT_TRUETYPE_TAGS_H
+#include FT_OUTLINE_H
+#include FT_TRUETYPE_DRIVER_H
+
+#include "ttsubpix.h"
+
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+ /*************************************************************************/
+ /* */
+ /* These rules affect how the TT Interpreter does hinting, with the */
+ /* goal of doing subpixel hinting by (in general) ignoring x moves. */
+ /* Some of these rules are fixes that go above and beyond the */
+ /* stated techniques in the MS whitepaper on Cleartype, due to */
+ /* artifacts in many glyphs. So, these rules make some glyphs render */
+ /* better than they do in the MS rasterizer. */
+ /* */
+ /* "" string or 0 int/char indicates to apply to all glyphs. */
+ /* "-" used as dummy placeholders, but any non-matching string works. */
+ /* */
+ /* Some of this could arguably be implemented in fontconfig, however: */
+ /* */
+ /* - Fontconfig can't set things on a glyph-by-glyph basis. */
+ /* - The tweaks that happen here are very low-level, from an average */
+ /* user's point of view and are best implemented in the hinter. */
+ /* */
+ /* The goal is to make the subpixel hinting techniques as generalized */
+ /* as possible across all fonts to prevent the need for extra rules such */
+ /* as these. */
+ /* */
+ /* The rule structure is designed so that entirely new rules can easily */
+ /* be added when a new compatibility feature is discovered. */
+ /* */
+ /* The rule structures could also use some enhancement to handle ranges. */
+ /* */
+ /* ****************** WORK IN PROGRESS ******************* */
+ /* */
+
+ /* These are `classes' of fonts that can be grouped together and used in */
+ /* rules below. A blank entry "" is required at the end of these! */
+#define FAMILY_CLASS_RULES_SIZE 7
+
+ static const SPH_Font_Class FAMILY_CLASS_Rules
+ [FAMILY_CLASS_RULES_SIZE] =
+ {
+ { "MS Legacy Fonts",
+ { "Aharoni",
+ "Andale Mono",
+ "Andalus",
+ "Angsana New",
+ "AngsanaUPC",
+ "Arabic Transparent",
+ "Arial Black",
+ "Arial Narrow",
+ "Arial Unicode MS",
+ "Arial",
+ "Batang",
+ "Browallia New",
+ "BrowalliaUPC",
+ "Comic Sans MS",
+ "Cordia New",
+ "CordiaUPC",
+ "Courier New",
+ "DFKai-SB",
+ "David Transparent",
+ "David",
+ "DilleniaUPC",
+ "Estrangelo Edessa",
+ "EucrosiaUPC",
+ "FangSong_GB2312",
+ "Fixed Miriam Transparent",
+ "FrankRuehl",
+ "Franklin Gothic Medium",
+ "FreesiaUPC",
+ "Garamond",
+ "Gautami",
+ "Georgia",
+ "Gulim",
+ "Impact",
+ "IrisUPC",
+ "JasmineUPC",
+ "KaiTi_GB2312",
+ "KodchiangUPC",
+ "Latha",
+ "Levenim MT",
+ "LilyUPC",
+ "Lucida Console",
+ "Lucida Sans Unicode",
+ "MS Gothic",
+ "MS Mincho",
+ "MV Boli",
+ "Mangal",
+ "Marlett",
+ "Microsoft Sans Serif",
+ "Mingliu",
+ "Miriam Fixed",
+ "Miriam Transparent",
+ "Miriam",
+ "Narkisim",
+ "Palatino Linotype",
+ "Raavi",
+ "Rod Transparent",
+ "Rod",
+ "Shruti",
+ "SimHei",
+ "Simplified Arabic Fixed",
+ "Simplified Arabic",
+ "Simsun",
+ "Sylfaen",
+ "Symbol",
+ "Tahoma",
+ "Times New Roman",
+ "Traditional Arabic",
+ "Trebuchet MS",
+ "Tunga",
+ "Verdana",
+ "Webdings",
+ "Wingdings",
+ "",
+ },
+ },
+ { "Core MS Legacy Fonts",
+ { "Arial Black",
+ "Arial Narrow",
+ "Arial Unicode MS",
+ "Arial",
+ "Comic Sans MS",
+ "Courier New",
+ "Garamond",
+ "Georgia",
+ "Impact",
+ "Lucida Console",
+ "Lucida Sans Unicode",
+ "Microsoft Sans Serif",
+ "Palatino Linotype",
+ "Tahoma",
+ "Times New Roman",
+ "Trebuchet MS",
+ "Verdana",
+ "",
+ },
+ },
+ { "Apple Legacy Fonts",
+ { "Geneva",
+ "Times",
+ "Monaco",
+ "Century",
+ "Chalkboard",
+ "Lobster",
+ "Century Gothic",
+ "Optima",
+ "Lucida Grande",
+ "Gill Sans",
+ "Baskerville",
+ "Helvetica",
+ "Helvetica Neue",
+ "",
+ },
+ },
+ { "Legacy Sans Fonts",
+ { "Andale Mono",
+ "Arial Unicode MS",
+ "Arial",
+ "Century Gothic",
+ "Comic Sans MS",
+ "Franklin Gothic Medium",
+ "Geneva",
+ "Lucida Console",
+ "Lucida Grande",
+ "Lucida Sans Unicode",
+ "Lucida Sans Typewriter",
+ "Microsoft Sans Serif",
+ "Monaco",
+ "Tahoma",
+ "Trebuchet MS",
+ "Verdana",
+ "",
+ },
+ },
+
+ { "Misc Legacy Fonts",
+ { "Dark Courier", "", }, },
+ { "Verdana Clones",
+ { "DejaVu Sans",
+ "Bitstream Vera Sans", "", }, },
+ { "Verdana and Clones",
+ { "DejaVu Sans",
+ "Bitstream Vera Sans",
+ "Verdana", "", }, },
+ };
+
+
+ /* Define this to force natural (i.e. not bitmap-compatible) widths. */
+ /* The default leans strongly towards natural widths except for a few */
+ /* legacy fonts where a selective combination produces nicer results. */
+/* #define FORCE_NATURAL_WIDTHS */
+
+
+ /* Define `classes' of styles that can be grouped together and used in */
+ /* rules below. A blank entry "" is required at the end of these! */
+#define STYLE_CLASS_RULES_SIZE 5
+
+ const SPH_Font_Class STYLE_CLASS_Rules
+ [STYLE_CLASS_RULES_SIZE] =
+ {
+ { "Regular Class",
+ { "Regular",
+ "Book",
+ "Medium",
+ "Roman",
+ "Normal",
+ "",
+ },
+ },
+ { "Regular/Italic Class",
+ { "Regular",
+ "Book",
+ "Medium",
+ "Italic",
+ "Oblique",
+ "Roman",
+ "Normal",
+ "",
+ },
+ },
+ { "Bold/BoldItalic Class",
+ { "Bold",
+ "Bold Italic",
+ "Black",
+ "",
+ },
+ },
+ { "Bold/Italic/BoldItalic Class",
+ { "Bold",
+ "Bold Italic",
+ "Black",
+ "Italic",
+ "Oblique",
+ "",
+ },
+ },
+ { "Regular/Bold Class",
+ { "Regular",
+ "Book",
+ "Medium",
+ "Normal",
+ "Roman",
+ "Bold",
+ "Black",
+ "",
+ },
+ },
+ };
+
+
+ /* Force special legacy fixes for fonts. */
+#define COMPATIBILITY_MODE_RULES_SIZE 1
+
+ const SPH_TweakRule COMPATIBILITY_MODE_Rules
+ [COMPATIBILITY_MODE_RULES_SIZE] =
+ {
+ { "Verdana Clones", 0, "", 0 },
+ };
+
+
+ /* Don't do subpixel (ignore_x_mode) hinting; do normal hinting. */
+#define PIXEL_HINTING_RULES_SIZE 2
+
+ const SPH_TweakRule PIXEL_HINTING_Rules
+ [PIXEL_HINTING_RULES_SIZE] =
+ {
+ /* these characters are almost always safe */
+ { "Courier New", 12, "Italic", 'z' },
+ { "Courier New", 11, "Italic", 'z' },
+ };
+
+
+ /* Subpixel hinting ignores SHPIX rules on X. Force SHPIX for these. */
+#define DO_SHPIX_RULES_SIZE 1
+
+ const SPH_TweakRule DO_SHPIX_Rules
+ [DO_SHPIX_RULES_SIZE] =
+ {
+ { "-", 0, "", 0 },
+ };
+
+
+ /* Skip Y moves that start with a point that is not on a Y pixel */
+ /* boundary and don't move that point to a Y pixel boundary. */
+#define SKIP_NONPIXEL_Y_MOVES_RULES_SIZE 4
+
+ const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_Rules
+ [SKIP_NONPIXEL_Y_MOVES_RULES_SIZE] =
+ {
+ /* fix vwxyz thinness*/
+ { "Consolas", 0, "", 0 },
+ /* Fix thin middle stems */
+ { "Core MS Legacy Fonts", 0, "Regular", 0 },
+ /* Cyrillic small letter I */
+ { "Legacy Sans Fonts", 0, "", 0 },
+ /* Fix artifacts with some Regular & Bold */
+ { "Verdana Clones", 0, "", 0 },
+ };
+
+
+#define SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1
+
+ const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions
+ [SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =
+ {
+ /* Fixes < and > */
+ { "Courier New", 0, "Regular", 0 },
+ };
+
+
+ /* Skip Y moves that start with a point that is not on a Y pixel */
+ /* boundary and don't move that point to a Y pixel boundary. */
+#define SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE 2
+
+ const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_DELTAP_Rules
+ [SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE] =
+ {
+ /* Maintain thickness of diagonal in 'N' */
+ { "Times New Roman", 0, "Regular/Bold Class", 'N' },
+ { "Georgia", 0, "Regular/Bold Class", 'N' },
+ };
+
+
+ /* Skip Y moves that move a point off a Y pixel boundary. */
+#define SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE 1
+
+ const SPH_TweakRule SKIP_OFFPIXEL_Y_MOVES_Rules
+ [SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE] =
+ {
+ { "-", 0, "", 0 },
+ };
+
+
+#define SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1
+
+ const SPH_TweakRule SKIP_OFFPIXEL_Y_MOVES_Rules_Exceptions
+ [SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =
+ {
+ { "-", 0, "", 0 },
+ };
+
+
+ /* Round moves that don't move a point to a Y pixel boundary. */
+#define ROUND_NONPIXEL_Y_MOVES_RULES_SIZE 2
+
+ const SPH_TweakRule ROUND_NONPIXEL_Y_MOVES_Rules
+ [ROUND_NONPIXEL_Y_MOVES_RULES_SIZE] =
+ {
+ /* Droid font instructions don't snap Y to pixels */
+ { "Droid Sans", 0, "Regular/Italic Class", 0 },
+ { "Droid Sans Mono", 0, "", 0 },
+ };
+
+
+#define ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1
+
+ const SPH_TweakRule ROUND_NONPIXEL_Y_MOVES_Rules_Exceptions
+ [ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] =
+ {
+ { "-", 0, "", 0 },
+ };
+
+
+ /* Allow a Direct_Move along X freedom vector if matched. */
+#define ALLOW_X_DMOVE_RULES_SIZE 1
+
+ const SPH_TweakRule ALLOW_X_DMOVE_Rules
+ [ALLOW_X_DMOVE_RULES_SIZE] =
+ {
+ /* Fixes vanishing diagonal in 4 */
+ { "Verdana", 0, "Regular", '4' },
+ };
+
+
+ /* Return MS rasterizer version 35 if matched. */
+#define RASTERIZER_35_RULES_SIZE 8
+
+ const SPH_TweakRule RASTERIZER_35_Rules
+ [RASTERIZER_35_RULES_SIZE] =
+ {
+ /* This seems to be the only way to make these look good */
+ { "Times New Roman", 0, "Regular", 'i' },
+ { "Times New Roman", 0, "Regular", 'j' },
+ { "Times New Roman", 0, "Regular", 'm' },
+ { "Times New Roman", 0, "Regular", 'r' },
+ { "Times New Roman", 0, "Regular", 'a' },
+ { "Times New Roman", 0, "Regular", 'n' },
+ { "Times New Roman", 0, "Regular", 'p' },
+ { "Times", 0, "", 0 },
+ };
+
+
+ /* Don't round to the subpixel grid. Round to pixel grid. */
+#define NORMAL_ROUND_RULES_SIZE 1
+
+ const SPH_TweakRule NORMAL_ROUND_Rules
+ [NORMAL_ROUND_RULES_SIZE] =
+ {
+ /* Fix serif thickness for certain ppems */
+ /* Can probably be generalized somehow */
+ { "Courier New", 0, "", 0 },
+ };
+
+
+ /* Skip IUP instructions if matched. */
+#define SKIP_IUP_RULES_SIZE 1
+
+ const SPH_TweakRule SKIP_IUP_Rules
+ [SKIP_IUP_RULES_SIZE] =
+ {
+ { "Arial", 13, "Regular", 'a' },
+ };
+
+
+ /* Skip MIAP Twilight hack if matched. */
+#define MIAP_HACK_RULES_SIZE 1
+
+ const SPH_TweakRule MIAP_HACK_Rules
+ [MIAP_HACK_RULES_SIZE] =
+ {
+ { "Geneva", 12, "", 0 },
+ };
+
+
+ /* Skip DELTAP instructions if matched. */
+#define ALWAYS_SKIP_DELTAP_RULES_SIZE 23
+
+ const SPH_TweakRule ALWAYS_SKIP_DELTAP_Rules
+ [ALWAYS_SKIP_DELTAP_RULES_SIZE] =
+ {
+ { "Georgia", 0, "Regular", 'k' },
+ /* fix various problems with e in different versions */
+ { "Trebuchet MS", 14, "Regular", 'e' },
+ { "Trebuchet MS", 13, "Regular", 'e' },
+ { "Trebuchet MS", 15, "Regular", 'e' },
+ { "Trebuchet MS", 0, "Italic", 'v' },
+ { "Trebuchet MS", 0, "Italic", 'w' },
+ { "Trebuchet MS", 0, "Regular", 'Y' },
+ { "Arial", 11, "Regular", 's' },
+ /* prevent problems with '3' and others */
+ { "Verdana", 10, "Regular", 0 },
+ { "Verdana", 9, "Regular", 0 },
+ /* Cyrillic small letter short I */
+ { "Legacy Sans Fonts", 0, "", 0x438 },
+ { "Legacy Sans Fonts", 0, "", 0x439 },
+ { "Arial", 10, "Regular", '6' },
+ { "Arial", 0, "Bold/BoldItalic Class", 'a' },
+ /* Make horizontal stems consistent with the rest */
+ { "Arial", 24, "Bold", 'a' },
+ { "Arial", 25, "Bold", 'a' },
+ { "Arial", 24, "Bold", 's' },
+ { "Arial", 25, "Bold", 's' },
+ { "Arial", 34, "Bold", 's' },
+ { "Arial", 35, "Bold", 's' },
+ { "Arial", 36, "Bold", 's' },
+ { "Arial", 25, "Regular", 's' },
+ { "Arial", 26, "Regular", 's' },
+ };
+
+
+ /* Always do DELTAP instructions if matched. */
+#define ALWAYS_DO_DELTAP_RULES_SIZE 1
+
+ const SPH_TweakRule ALWAYS_DO_DELTAP_Rules
+ [ALWAYS_DO_DELTAP_RULES_SIZE] =
+ {
+ { "-", 0, "", 0 },
+ };
+
+
+ /* Don't allow ALIGNRP after IUP. */
+#define NO_ALIGNRP_AFTER_IUP_RULES_SIZE 1
+
+ static const SPH_TweakRule NO_ALIGNRP_AFTER_IUP_Rules
+ [NO_ALIGNRP_AFTER_IUP_RULES_SIZE] =
+ {
+ /* Prevent creation of dents in outline */
+ { "-", 0, "", 0 },
+ };
+
+
+ /* Don't allow DELTAP after IUP. */
+#define NO_DELTAP_AFTER_IUP_RULES_SIZE 1
+
+ static const SPH_TweakRule NO_DELTAP_AFTER_IUP_Rules
+ [NO_DELTAP_AFTER_IUP_RULES_SIZE] =
+ {
+ { "-", 0, "", 0 },
+ };
+
+
+ /* Don't allow CALL after IUP. */
+#define NO_CALL_AFTER_IUP_RULES_SIZE 1
+
+ static const SPH_TweakRule NO_CALL_AFTER_IUP_Rules
+ [NO_CALL_AFTER_IUP_RULES_SIZE] =
+ {
+ /* Prevent creation of dents in outline */
+ { "-", 0, "", 0 },
+ };
+
+
+ /* De-embolden these glyphs slightly. */
+#define DEEMBOLDEN_RULES_SIZE 9
+
+ static const SPH_TweakRule DEEMBOLDEN_Rules
+ [DEEMBOLDEN_RULES_SIZE] =
+ {
+ { "Courier New", 0, "Bold", 'A' },
+ { "Courier New", 0, "Bold", 'W' },
+ { "Courier New", 0, "Bold", 'w' },
+ { "Courier New", 0, "Bold", 'M' },
+ { "Courier New", 0, "Bold", 'X' },
+ { "Courier New", 0, "Bold", 'K' },
+ { "Courier New", 0, "Bold", 'x' },
+ { "Courier New", 0, "Bold", 'z' },
+ { "Courier New", 0, "Bold", 'v' },
+ };
+
+
+ /* Embolden these glyphs slightly. */
+#define EMBOLDEN_RULES_SIZE 2
+
+ static const SPH_TweakRule EMBOLDEN_Rules
+ [EMBOLDEN_RULES_SIZE] =
+ {
+ { "Courier New", 0, "Regular", 0 },
+ { "Courier New", 0, "Italic", 0 },
+ };
+
+
+ /* This is a CVT hack that makes thick horizontal stems on 2, 5, 7 */
+ /* similar to Windows XP. */
+#define TIMES_NEW_ROMAN_HACK_RULES_SIZE 12
+
+ static const SPH_TweakRule TIMES_NEW_ROMAN_HACK_Rules
+ [TIMES_NEW_ROMAN_HACK_RULES_SIZE] =
+ {
+ { "Times New Roman", 16, "Italic", '2' },
+ { "Times New Roman", 16, "Italic", '5' },
+ { "Times New Roman", 16, "Italic", '7' },
+ { "Times New Roman", 16, "Regular", '2' },
+ { "Times New Roman", 16, "Regular", '5' },
+ { "Times New Roman", 16, "Regular", '7' },
+ { "Times New Roman", 17, "Italic", '2' },
+ { "Times New Roman", 17, "Italic", '5' },
+ { "Times New Roman", 17, "Italic", '7' },
+ { "Times New Roman", 17, "Regular", '2' },
+ { "Times New Roman", 17, "Regular", '5' },
+ { "Times New Roman", 17, "Regular", '7' },
+ };
+
+
+ /* This fudges distance on 2 to get rid of the vanishing stem issue. */
+ /* A real solution to this is certainly welcome. */
+#define COURIER_NEW_2_HACK_RULES_SIZE 15
+
+ static const SPH_TweakRule COURIER_NEW_2_HACK_Rules
+ [COURIER_NEW_2_HACK_RULES_SIZE] =
+ {
+ { "Courier New", 10, "Regular", '2' },
+ { "Courier New", 11, "Regular", '2' },
+ { "Courier New", 12, "Regular", '2' },
+ { "Courier New", 13, "Regular", '2' },
+ { "Courier New", 14, "Regular", '2' },
+ { "Courier New", 15, "Regular", '2' },
+ { "Courier New", 16, "Regular", '2' },
+ { "Courier New", 17, "Regular", '2' },
+ { "Courier New", 18, "Regular", '2' },
+ { "Courier New", 19, "Regular", '2' },
+ { "Courier New", 20, "Regular", '2' },
+ { "Courier New", 21, "Regular", '2' },
+ { "Courier New", 22, "Regular", '2' },
+ { "Courier New", 23, "Regular", '2' },
+ { "Courier New", 24, "Regular", '2' },
+ };
+
+
+#ifndef FORCE_NATURAL_WIDTHS
+
+ /* Use compatible widths with these glyphs. Compatible widths is always */
+ /* on when doing B/W TrueType instructing, but is used selectively here, */
+ /* typically on glyphs with 3 or more vertical stems. */
+#define COMPATIBLE_WIDTHS_RULES_SIZE 38
+
+ static const SPH_TweakRule COMPATIBLE_WIDTHS_Rules
+ [COMPATIBLE_WIDTHS_RULES_SIZE] =
+ {
+ { "Arial Unicode MS", 12, "Regular Class", 'm' },
+ { "Arial Unicode MS", 14, "Regular Class", 'm' },
+ /* Cyrillic small letter sha */
+ { "Arial", 10, "Regular Class", 0x448 },
+ { "Arial", 11, "Regular Class", 'm' },
+ { "Arial", 12, "Regular Class", 'm' },
+ /* Cyrillic small letter sha */
+ { "Arial", 12, "Regular Class", 0x448 },
+ { "Arial", 13, "Regular Class", 0x448 },
+ { "Arial", 14, "Regular Class", 'm' },
+ /* Cyrillic small letter sha */
+ { "Arial", 14, "Regular Class", 0x448 },
+ { "Arial", 15, "Regular Class", 0x448 },
+ { "Arial", 17, "Regular Class", 'm' },
+ { "DejaVu Sans", 15, "Regular Class", 0 },
+ { "Microsoft Sans Serif", 11, "Regular Class", 0 },
+ { "Microsoft Sans Serif", 12, "Regular Class", 0 },
+ { "Segoe UI", 11, "Regular Class", 0 },
+ { "Monaco", 0, "Regular Class", 0 },
+ { "Segoe UI", 12, "Regular Class", 'm' },
+ { "Segoe UI", 14, "Regular Class", 'm' },
+ { "Tahoma", 11, "Regular Class", 0 },
+ { "Times New Roman", 16, "Regular Class", 'c' },
+ { "Times New Roman", 16, "Regular Class", 'm' },
+ { "Times New Roman", 16, "Regular Class", 'o' },
+ { "Times New Roman", 16, "Regular Class", 'w' },
+ { "Trebuchet MS", 11, "Regular Class", 0 },
+ { "Trebuchet MS", 12, "Regular Class", 0 },
+ { "Trebuchet MS", 14, "Regular Class", 0 },
+ { "Trebuchet MS", 15, "Regular Class", 0 },
+ { "Ubuntu", 12, "Regular Class", 'm' },
+ /* Cyrillic small letter sha */
+ { "Verdana", 10, "Regular Class", 0x448 },
+ { "Verdana", 11, "Regular Class", 0x448 },
+ { "Verdana and Clones", 12, "Regular Class", 'i' },
+ { "Verdana and Clones", 12, "Regular Class", 'j' },
+ { "Verdana and Clones", 12, "Regular Class", 'l' },
+ { "Verdana and Clones", 12, "Regular Class", 'm' },
+ { "Verdana and Clones", 13, "Regular Class", 'i' },
+ { "Verdana and Clones", 13, "Regular Class", 'j' },
+ { "Verdana and Clones", 13, "Regular Class", 'l' },
+ { "Verdana and Clones", 14, "Regular Class", 'm' },
+ };
+
+
+ /* Scaling slightly in the x-direction prior to hinting results in */
+ /* more visually pleasing glyphs in certain cases. */
+ /* This sometimes needs to be coordinated with compatible width rules. */
+ /* A value of 1000 corresponds to a scaled value of 1.0. */
+
+#define X_SCALING_RULES_SIZE 50
+
+ static const SPH_ScaleRule X_SCALING_Rules[X_SCALING_RULES_SIZE] =
+ {
+ { "DejaVu Sans", 12, "Regular Class", 'm', 950 },
+ { "Verdana and Clones", 12, "Regular Class", 'a', 1100 },
+ { "Verdana and Clones", 13, "Regular Class", 'a', 1050 },
+ { "Arial", 11, "Regular Class", 'm', 975 },
+ { "Arial", 12, "Regular Class", 'm', 1050 },
+ /* Cyrillic small letter el */
+ { "Arial", 13, "Regular Class", 0x43B, 950 },
+ { "Arial", 13, "Regular Class", 'o', 950 },
+ { "Arial", 13, "Regular Class", 'e', 950 },
+ { "Arial", 14, "Regular Class", 'm', 950 },
+ /* Cyrillic small letter el */
+ { "Arial", 15, "Regular Class", 0x43B, 925 },
+ { "Bitstream Vera Sans", 10, "Regular/Italic Class", 0, 1100 },
+ { "Bitstream Vera Sans", 12, "Regular/Italic Class", 0, 1050 },
+ { "Bitstream Vera Sans", 16, "Regular Class", 0, 1050 },
+ { "Bitstream Vera Sans", 9, "Regular/Italic Class", 0, 1050 },
+ { "DejaVu Sans", 12, "Regular Class", 'l', 975 },
+ { "DejaVu Sans", 12, "Regular Class", 'i', 975 },
+ { "DejaVu Sans", 12, "Regular Class", 'j', 975 },
+ { "DejaVu Sans", 13, "Regular Class", 'l', 950 },
+ { "DejaVu Sans", 13, "Regular Class", 'i', 950 },
+ { "DejaVu Sans", 13, "Regular Class", 'j', 950 },
+ { "DejaVu Sans", 10, "Regular/Italic Class", 0, 1100 },
+ { "DejaVu Sans", 12, "Regular/Italic Class", 0, 1050 },
+ { "Georgia", 10, "", 0, 1050 },
+ { "Georgia", 11, "", 0, 1100 },
+ { "Georgia", 12, "", 0, 1025 },
+ { "Georgia", 13, "", 0, 1050 },
+ { "Georgia", 16, "", 0, 1050 },
+ { "Georgia", 17, "", 0, 1030 },
+ { "Liberation Sans", 12, "Regular Class", 'm', 1100 },
+ { "Lucida Grande", 11, "Regular Class", 'm', 1100 },
+ { "Microsoft Sans Serif", 11, "Regular Class", 'm', 950 },
+ { "Microsoft Sans Serif", 12, "Regular Class", 'm', 1050 },
+ { "Segoe UI", 12, "Regular Class", 'H', 1050 },
+ { "Segoe UI", 12, "Regular Class", 'm', 1050 },
+ { "Segoe UI", 14, "Regular Class", 'm', 1050 },
+ { "Tahoma", 11, "Regular Class", 'i', 975 },
+ { "Tahoma", 11, "Regular Class", 'l', 975 },
+ { "Tahoma", 11, "Regular Class", 'j', 900 },
+ { "Tahoma", 11, "Regular Class", 'm', 918 },
+ { "Verdana", 10, "Regular/Italic Class", 0, 1100 },
+ { "Verdana", 12, "Regular Class", 'm', 975 },
+ { "Verdana", 12, "Regular/Italic Class", 0, 1050 },
+ { "Verdana", 13, "Regular/Italic Class", 'i', 950 },
+ { "Verdana", 13, "Regular/Italic Class", 'j', 950 },
+ { "Verdana", 13, "Regular/Italic Class", 'l', 950 },
+ { "Verdana", 16, "Regular Class", 0, 1050 },
+ { "Verdana", 9, "Regular/Italic Class", 0, 1050 },
+ { "Times New Roman", 16, "Regular Class", 'm', 918 },
+ { "Trebuchet MS", 11, "Regular Class", 'm', 800 },
+ { "Trebuchet MS", 12, "Regular Class", 'm', 800 },
+ };
+
+#else
+
+#define COMPATIBLE_WIDTHS_RULES_SIZE 1
+
+ static const SPH_TweakRule COMPATIBLE_WIDTHS_Rules
+ [COMPATIBLE_WIDTHS_RULES_SIZE] =
+ {
+ { "-", 0, "", 0 },
+ };
+
+
+#define X_SCALING_RULES_SIZE 1
+
+ static const SPH_ScaleRule X_SCALING_Rules
+ [X_SCALING_RULES_SIZE] =
+ {
+ { "-", 0, "", 0, 1000 },
+ };
+
+#endif /* FORCE_NATURAL_WIDTHS */
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ is_member_of_family_class( const FT_String* detected_font_name,
+ const FT_String* rule_font_name )
+ {
+ FT_UInt i, j;
+
+
+ /* Does font name match rule family? */
+ if ( strcmp( detected_font_name, rule_font_name ) == 0 )
+ return TRUE;
+
+ /* Is font name a wildcard ""? */
+ if ( strcmp( rule_font_name, "" ) == 0 )
+ return TRUE;
+
+ /* Is font name contained in a class list? */
+ for ( i = 0; i < FAMILY_CLASS_RULES_SIZE; i++ )
+ {
+ if ( strcmp( FAMILY_CLASS_Rules[i].name, rule_font_name ) == 0 )
+ {
+ for ( j = 0; j < SPH_MAX_CLASS_MEMBERS; j++ )
+ {
+ if ( strcmp( FAMILY_CLASS_Rules[i].member[j], "" ) == 0 )
+ continue;
+ if ( strcmp( FAMILY_CLASS_Rules[i].member[j],
+ detected_font_name ) == 0 )
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ is_member_of_style_class( const FT_String* detected_font_style,
+ const FT_String* rule_font_style )
+ {
+ FT_UInt i, j;
+
+
+ /* Does font style match rule style? */
+ if ( strcmp( detected_font_style, rule_font_style ) == 0 )
+ return TRUE;
+
+ /* Is font style a wildcard ""? */
+ if ( strcmp( rule_font_style, "" ) == 0 )
+ return TRUE;
+
+ /* Is font style contained in a class list? */
+ for ( i = 0; i < STYLE_CLASS_RULES_SIZE; i++ )
+ {
+ if ( strcmp( STYLE_CLASS_Rules[i].name, rule_font_style ) == 0 )
+ {
+ for ( j = 0; j < SPH_MAX_CLASS_MEMBERS; j++ )
+ {
+ if ( strcmp( STYLE_CLASS_Rules[i].member[j], "" ) == 0 )
+ continue;
+ if ( strcmp( STYLE_CLASS_Rules[i].member[j],
+ detected_font_style ) == 0 )
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ sph_test_tweak( TT_Face face,
+ const FT_String* family,
+ FT_UInt ppem,
+ const FT_String* style,
+ FT_UInt glyph_index,
+ const SPH_TweakRule* rule,
+ FT_UInt num_rules )
+ {
+ FT_UInt i;
+
+
+ /* rule checks may be able to be optimized further */
+ for ( i = 0; i < num_rules; i++ )
+ {
+ if ( family &&
+ ( is_member_of_family_class ( family, rule[i].family ) ) )
+ if ( rule[i].ppem == 0 ||
+ rule[i].ppem == ppem )
+ if ( style &&
+ is_member_of_style_class ( style, rule[i].style ) )
+ if ( rule[i].glyph == 0 ||
+ FT_Get_Char_Index( (FT_Face)face,
+ rule[i].glyph ) == glyph_index )
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+
+
+ static FT_UInt
+ scale_test_tweak( TT_Face face,
+ const FT_String* family,
+ FT_UInt ppem,
+ const FT_String* style,
+ FT_UInt glyph_index,
+ const SPH_ScaleRule* rule,
+ FT_UInt num_rules )
+ {
+ FT_UInt i;
+
+
+ /* rule checks may be able to be optimized further */
+ for ( i = 0; i < num_rules; i++ )
+ {
+ if ( family &&
+ ( is_member_of_family_class ( family, rule[i].family ) ) )
+ if ( rule[i].ppem == 0 ||
+ rule[i].ppem == ppem )
+ if ( style &&
+ is_member_of_style_class( style, rule[i].style ) )
+ if ( rule[i].glyph == 0 ||
+ FT_Get_Char_Index( (FT_Face)face,
+ rule[i].glyph ) == glyph_index )
+ return rule[i].scale;
+ }
+
+ return 1000;
+ }
+
+
+ FT_LOCAL_DEF( FT_UInt )
+ sph_test_tweak_x_scaling( TT_Face face,
+ const FT_String* family,
+ FT_UInt ppem,
+ const FT_String* style,
+ FT_UInt glyph_index )
+ {
+ return scale_test_tweak( face, family, ppem, style, glyph_index,
+ X_SCALING_Rules, X_SCALING_RULES_SIZE );
+ }
+
+
+#define TWEAK_RULES( x ) \
+ if ( sph_test_tweak( face, family, ppem, style, glyph_index, \
+ x##_Rules, x##_RULES_SIZE ) ) \
+ loader->exec->sph_tweak_flags |= SPH_TWEAK_##x;
+
+#define TWEAK_RULES_EXCEPTIONS( x ) \
+ if ( sph_test_tweak( face, family, ppem, style, glyph_index, \
+ x##_Rules_Exceptions, x##_RULES_EXCEPTIONS_SIZE ) ) \
+ loader->exec->sph_tweak_flags &= ~SPH_TWEAK_##x;
+
+
+ FT_LOCAL_DEF( void )
+ sph_set_tweaks( TT_Loader loader,
+ FT_UInt glyph_index )
+ {
+ TT_Face face = (TT_Face)loader->face;
+ FT_String* family = face->root.family_name;
+ int ppem = loader->size->metrics.x_ppem;
+ FT_String* style = face->root.style_name;
+
+
+ /* don't apply rules if style isn't set */
+ if ( !face->root.style_name )
+ return;
+
+#ifdef SPH_DEBUG_MORE_VERBOSE
+ printf( "%s,%d,%s,%c=%d ",
+ family, ppem, style, glyph_index, glyph_index );
+#endif
+
+ TWEAK_RULES( PIXEL_HINTING );
+
+ if ( loader->exec->sph_tweak_flags & SPH_TWEAK_PIXEL_HINTING )
+ {
+ loader->exec->ignore_x_mode = FALSE;
+ return;
+ }
+
+ TWEAK_RULES( ALLOW_X_DMOVE );
+ TWEAK_RULES( ALWAYS_DO_DELTAP );
+ TWEAK_RULES( ALWAYS_SKIP_DELTAP );
+ TWEAK_RULES( DEEMBOLDEN );
+ TWEAK_RULES( DO_SHPIX );
+ TWEAK_RULES( EMBOLDEN );
+ TWEAK_RULES( MIAP_HACK );
+ TWEAK_RULES( NORMAL_ROUND );
+ TWEAK_RULES( NO_ALIGNRP_AFTER_IUP );
+ TWEAK_RULES( NO_CALL_AFTER_IUP );
+ TWEAK_RULES( NO_DELTAP_AFTER_IUP );
+ TWEAK_RULES( RASTERIZER_35 );
+ TWEAK_RULES( SKIP_IUP );
+
+ TWEAK_RULES( SKIP_OFFPIXEL_Y_MOVES );
+ TWEAK_RULES_EXCEPTIONS( SKIP_OFFPIXEL_Y_MOVES );
+
+ TWEAK_RULES( SKIP_NONPIXEL_Y_MOVES_DELTAP );
+
+ TWEAK_RULES( SKIP_NONPIXEL_Y_MOVES );
+ TWEAK_RULES_EXCEPTIONS( SKIP_NONPIXEL_Y_MOVES );
+
+ TWEAK_RULES( ROUND_NONPIXEL_Y_MOVES );
+ TWEAK_RULES_EXCEPTIONS( ROUND_NONPIXEL_Y_MOVES );
+
+ if ( loader->exec->sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 )
+ {
+ if ( loader->exec->rasterizer_version != TT_INTERPRETER_VERSION_35 )
+ {
+ loader->exec->rasterizer_version = TT_INTERPRETER_VERSION_35;
+ loader->exec->size->cvt_ready = -1;
+
+ tt_size_ready_bytecode(
+ loader->exec->size,
+ FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) );
+ }
+ else
+ loader->exec->rasterizer_version = TT_INTERPRETER_VERSION_35;
+ }
+ else
+ {
+ if ( loader->exec->rasterizer_version !=
+ SPH_OPTION_SET_RASTERIZER_VERSION )
+ {
+ loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION;
+ loader->exec->size->cvt_ready = -1;
+
+ tt_size_ready_bytecode(
+ loader->exec->size,
+ FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) );
+ }
+ else
+ loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION;
+ }
+
+ if ( IS_HINTED( loader->load_flags ) )
+ {
+ TWEAK_RULES( TIMES_NEW_ROMAN_HACK );
+ TWEAK_RULES( COURIER_NEW_2_HACK );
+ }
+
+ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
+ COMPATIBILITY_MODE_Rules, COMPATIBILITY_MODE_RULES_SIZE ) )
+ loader->exec->face->sph_compatibility_mode = TRUE;
+
+
+ if ( IS_HINTED( loader->load_flags ) )
+ {
+ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
+ COMPATIBLE_WIDTHS_Rules, COMPATIBLE_WIDTHS_RULES_SIZE ) )
+ loader->exec->compatible_widths |= TRUE;
+ }
+ }
+
+#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_subpix_dummy;
+
+#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+
+/* END */
diff --git a/src/truetype/ttsubpix.h b/src/truetype/ttsubpix.h
new file mode 100644
index 0000000..8a54fc7
--- /dev/null
+++ b/src/truetype/ttsubpix.h
@@ -0,0 +1,110 @@
+/***************************************************************************/
+/* */
+/* ttsubpix.h */
+/* */
+/* TrueType Subpixel Hinting. */
+/* */
+/* Copyright 2010-2013 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __TTSUBPIX_H__
+#define __TTSUBPIX_H__
+
+#include <ft2build.h>
+#include "ttobjs.h"
+#include "ttinterp.h"
+
+
+FT_BEGIN_HEADER
+
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+ /*************************************************************************/
+ /* */
+ /* ID flags to identify special functions at FDEF and runtime. */
+ /* */
+ /* */
+#define SPH_FDEF_INLINE_DELTA_1 0x0000001
+#define SPH_FDEF_INLINE_DELTA_2 0x0000002
+#define SPH_FDEF_DIAGONAL_STROKE 0x0000004
+#define SPH_FDEF_VACUFORM_ROUND_1 0x0000008
+#define SPH_FDEF_TTFAUTOHINT_1 0x0000010
+#define SPH_FDEF_SPACING_1 0x0000020
+#define SPH_FDEF_SPACING_2 0x0000040
+#define SPH_FDEF_TYPEMAN_STROKES 0x0000080
+#define SPH_FDEF_TYPEMAN_DIAGENDCTRL 0x0000100
+
+
+ /*************************************************************************/
+ /* */
+ /* Tweak flags that are set for each glyph by the below rules. */
+ /* */
+ /* */
+#define SPH_TWEAK_ALLOW_X_DMOVE 0x0000001
+#define SPH_TWEAK_ALWAYS_DO_DELTAP 0x0000002
+#define SPH_TWEAK_ALWAYS_SKIP_DELTAP 0x0000004
+#define SPH_TWEAK_COURIER_NEW_2_HACK 0x0000008
+#define SPH_TWEAK_DEEMBOLDEN 0x0000010
+#define SPH_TWEAK_DO_SHPIX 0x0000020
+#define SPH_TWEAK_EMBOLDEN 0x0000040
+#define SPH_TWEAK_MIAP_HACK 0x0000080
+#define SPH_TWEAK_NORMAL_ROUND 0x0000100
+#define SPH_TWEAK_NO_ALIGNRP_AFTER_IUP 0x0000200
+#define SPH_TWEAK_NO_CALL_AFTER_IUP 0x0000400
+#define SPH_TWEAK_NO_DELTAP_AFTER_IUP 0x0000800
+#define SPH_TWEAK_PIXEL_HINTING 0x0001000
+#define SPH_TWEAK_RASTERIZER_35 0x0002000
+#define SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES 0x0004000
+#define SPH_TWEAK_SKIP_IUP 0x0008000
+#define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES 0x0010000
+#define SPH_TWEAK_SKIP_OFFPIXEL_Y_MOVES 0x0020000
+#define SPH_TWEAK_TIMES_NEW_ROMAN_HACK 0x0040000
+#define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP 0x0080000
+
+
+ FT_LOCAL( FT_Bool )
+ sph_test_tweak( TT_Face face,
+ const FT_String* family,
+ FT_UInt ppem,
+ const FT_String* style,
+ FT_UInt glyph_index,
+ const SPH_TweakRule* rule,
+ FT_UInt num_rules );
+
+ FT_LOCAL( FT_UInt )
+ sph_test_tweak_x_scaling( TT_Face face,
+ const FT_String* family,
+ FT_UInt ppem,
+ const FT_String* style,
+ FT_UInt glyph_index );
+
+ FT_LOCAL( void )
+ sph_set_tweaks( TT_Loader loader,
+ FT_UInt glyph_index );
+
+
+ /* These macros are defined absent a method for setting them */
+#define SPH_OPTION_BITMAP_WIDTHS FALSE
+#define SPH_OPTION_SET_SUBPIXEL TRUE
+#define SPH_OPTION_SET_GRAYSCALE FALSE
+#define SPH_OPTION_SET_COMPATIBLE_WIDTHS FALSE
+#define SPH_OPTION_SET_RASTERIZER_VERSION 38
+
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+
+FT_END_HEADER
+
+#endif /* __TTSUBPIX_H__ */
+
+/* END */
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 1fff15d..de9c199 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (body). */
/* */
-/* Copyright 1996-2011 by */
+/* Copyright 1996-2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,9 +18,10 @@
#include <ft2build.h>
#include "t1afm.h"
-#include "t1errors.h"
+#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include "t1errors.h"
/*************************************************************************/
@@ -107,7 +108,7 @@
FT_Stream stream,
AFM_FontInfo fi )
{
- FT_Error error = T1_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Memory memory = stream->memory;
FT_Byte* start;
FT_Byte* limit;
@@ -121,14 +122,13 @@
start = (FT_Byte*)stream->cursor;
limit = (FT_Byte*)stream->limit;
- p = start;
/* Figure out how long the width table is. */
/* This info is a little-endian short at offset 99. */
p = start + 99;
if ( p + 2 > limit )
{
- error = T1_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
width_table_length = FT_PEEK_USHORT_LE( p );
@@ -148,7 +148,7 @@
if ( p + 2 > limit )
{
- error = T1_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -156,7 +156,7 @@
p += 2;
if ( p + 4 * fi->NumKernPair > limit )
{
- error = T1_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -238,7 +238,7 @@
FT_Memory memory = stream->memory;
AFM_ParserRec parser;
AFM_FontInfo fi = NULL;
- FT_Error error = T1_Err_Unknown_File_Format;
+ FT_Error error = FT_ERR( Unknown_File_Format );
T1_Font t1_font = &( (T1_Face)t1_face )->type1;
@@ -269,7 +269,7 @@
}
}
- if ( error == T1_Err_Unknown_File_Format )
+ if ( FT_ERR_EQ( error, Unknown_File_Format ) )
{
FT_Byte* start = stream->cursor;
@@ -366,7 +366,7 @@
if ( !fi )
- return T1_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
for ( i = 0; i < fi->NumTrackKern; i++ )
{
@@ -389,7 +389,7 @@
}
}
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index e35d7b1..2602bdb 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 driver interface (body). */
/* */
-/* Copyright 1996-2004, 2006, 2007, 2009, 2011 by */
+/* Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013, 2014 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_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
@@ -69,13 +69,13 @@
t1_get_name_index( T1_Face face,
FT_String* glyph_name )
{
- FT_Int i;
- FT_String* gname;
+ FT_Int i;
for ( i = 0; i < face->type1.num_glyphs; i++ )
{
- gname = face->type1.glyph_names[i];
+ FT_String* gname = face->type1.glyph_names[i];
+
if ( !ft_strcmp( glyph_name, gname ) )
return (FT_UInt)i;
@@ -138,7 +138,7 @@
{
*afont_info = ((T1_Face)face)->type1.font_info;
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
@@ -148,7 +148,7 @@
{
*afont_extra = ((T1_Face)face)->type1.font_extra;
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
@@ -167,7 +167,7 @@
{
*afont_private = ((T1_Face)face)->type1.private_dict;
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
@@ -258,7 +258,7 @@
break;
case PS_DICT_FONT_NAME:
- retval = ft_strlen( type1->font_name ) + 1;
+ retval = (FT_Long)( ft_strlen( type1->font_name ) + 1 );
if ( value && value_len >= retval )
ft_memcpy( value, (void *)( type1->font_name ), retval );
break;
@@ -278,7 +278,7 @@
case PS_DICT_CHAR_STRING_KEY:
if ( idx < (FT_UInt)type1->num_glyphs )
{
- retval = ft_strlen( type1->glyph_names[idx] ) + 1;
+ retval = (FT_Long)( ft_strlen( type1->glyph_names[idx] ) + 1 );
if ( value && value_len >= retval )
{
ft_memcpy( value, (void *)( type1->glyph_names[idx] ), retval );
@@ -290,7 +290,7 @@
case PS_DICT_CHAR_STRING:
if ( idx < (FT_UInt)type1->num_glyphs )
{
- retval = type1->charstrings_len[idx] + 1;
+ retval = (FT_Long)( type1->charstrings_len[idx] + 1 );
if ( value && value_len >= retval )
{
ft_memcpy( value, (void *)( type1->charstrings[idx] ),
@@ -310,7 +310,7 @@
if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY &&
idx < (FT_UInt)type1->encoding.num_chars )
{
- retval = ft_strlen( type1->encoding.char_name[idx] ) + 1;
+ retval = (FT_Long)( ft_strlen( type1->encoding.char_name[idx] ) + 1 );
if ( value && value_len >= retval )
{
ft_memcpy( value, (void *)( type1->encoding.char_name[idx] ),
@@ -329,7 +329,7 @@
case PS_DICT_SUBR:
if ( idx < (FT_UInt)type1->num_subrs )
{
- retval = type1->subrs_len[idx] + 1;
+ retval = (FT_Long)( type1->subrs_len[idx] + 1 );
if ( value && value_len >= retval )
{
ft_memcpy( value, (void *)( type1->subrs[idx] ), retval - 1 );
@@ -523,31 +523,31 @@
break;
case PS_DICT_VERSION:
- retval = ft_strlen( type1->font_info.version ) + 1;
+ retval = (FT_Long)( ft_strlen( type1->font_info.version ) + 1 );
if ( value && value_len >= retval )
ft_memcpy( value, (void *)( type1->font_info.version ), retval );
break;
case PS_DICT_NOTICE:
- retval = ft_strlen( type1->font_info.notice ) + 1;
+ retval = (FT_Long)( ft_strlen( type1->font_info.notice ) + 1 );
if ( value && value_len >= retval )
ft_memcpy( value, (void *)( type1->font_info.notice ), retval );
break;
case PS_DICT_FULL_NAME:
- retval = ft_strlen( type1->font_info.full_name ) + 1;
+ retval = (FT_Long)( ft_strlen( type1->font_info.full_name ) + 1 );
if ( value && value_len >= retval )
ft_memcpy( value, (void *)( type1->font_info.full_name ), retval );
break;
case PS_DICT_FAMILY_NAME:
- retval = ft_strlen( type1->font_info.family_name ) + 1;
+ retval = (FT_Long)( ft_strlen( type1->font_info.family_name ) + 1 );
if ( value && value_len >= retval )
ft_memcpy( value, (void *)( type1->font_info.family_name ), retval );
break;
case PS_DICT_WEIGHT:
- retval = ft_strlen( type1->font_info.weight ) + 1;
+ retval = (FT_Long)( ft_strlen( type1->font_info.weight ) + 1 );
if ( value && value_len >= retval )
ft_memcpy( value, (void *)( type1->font_info.weight ), retval );
break;
@@ -557,9 +557,6 @@
if ( value && value_len >= retval )
*((FT_Long *)value) = type1->font_info.italic_angle;
break;
-
- default:
- break;
}
return retval;
@@ -669,7 +666,7 @@
right_glyph,
kerning );
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
@@ -708,10 +705,6 @@
T1_GlyphSlot_Init,
T1_GlyphSlot_Done,
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- ft_stub_set_char_sizes,
- ft_stub_set_pixel_sizes,
-#endif
T1_Load_Glyph,
#ifdef T1_CONFIG_OPTION_NO_AFM
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 80e5453..af102fd 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by */
+/* Copyright 1996-2006, 2008-2010, 2013, 2014 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 @@
{
T1_Face face = (T1_Face)decoder->builder.face;
T1_Font type1 = &face->type1;
- FT_Error error = T1_Err_Ok;
+ FT_Error error = FT_Err_Ok;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
FT_Incremental_InterfaceRec *inc =
@@ -194,7 +194,7 @@
for ( glyph_index = 0; glyph_index < type1->num_glyphs; glyph_index++ )
{
/* now get load the unscaled outline */
- error = T1_Parse_Glyph( &decoder, glyph_index );
+ (void)T1_Parse_Glyph( &decoder, glyph_index );
if ( glyph_index == 0 || decoder.builder.advance.x > *max_advance )
*max_advance = decoder.builder.advance.x;
@@ -203,7 +203,7 @@
psaux->t1_decoder_funcs->done( &decoder );
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
@@ -227,7 +227,7 @@
for ( nn = 0; nn < count; nn++ )
advances[nn] = 0;
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
error = psaux->t1_decoder_funcs->init( &decoder,
@@ -261,7 +261,7 @@
advances[nn] = 0;
}
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
@@ -296,10 +296,12 @@
if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
- error = T1_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
+ FT_TRACE1(( "T1_Load_Glyph: glyph index %d\n", glyph_index ));
+
FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) );
if ( load_flags & FT_LOAD_NO_RECURSE )
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index a0adfd4..22b3f6b 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 font loader (body). */
/* */
-/* Copyright 1996-2012 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -71,6 +71,13 @@
#include "t1errors.h"
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+#define IS_INCREMENTAL (FT_Bool)( face->root.internal->incremental_interface != 0 )
+#else
+#define IS_INCREMENTAL 0
+#endif
+
+
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
@@ -99,7 +106,7 @@
{
PS_Blend blend;
FT_Memory memory = face->root.memory;
- FT_Error error = T1_Err_Ok;
+ FT_Error error = FT_Err_Ok;
blend = face->blend;
@@ -123,8 +130,8 @@
/* allocate the blend `private' and `font_info' dictionaries */
if ( FT_NEW_ARRAY( blend->font_infos[1], num_designs ) ||
- FT_NEW_ARRAY( blend->privates[1], num_designs ) ||
- FT_NEW_ARRAY( blend->bboxes[1], num_designs ) ||
+ FT_NEW_ARRAY( blend->privates [1], num_designs ) ||
+ FT_NEW_ARRAY( blend->bboxes [1], num_designs ) ||
FT_NEW_ARRAY( blend->weight_vector, num_designs * 2 ) )
goto Exit;
@@ -136,12 +143,12 @@
for ( nn = 2; nn <= num_designs; nn++ )
{
- blend->privates[nn] = blend->privates [nn - 1] + 1;
blend->font_infos[nn] = blend->font_infos[nn - 1] + 1;
- blend->bboxes[nn] = blend->bboxes [nn - 1] + 1;
+ blend->privates [nn] = blend->privates [nn - 1] + 1;
+ blend->bboxes [nn] = blend->bboxes [nn - 1] + 1;
}
- blend->num_designs = num_designs;
+ blend->num_designs = num_designs;
}
else if ( blend->num_designs != num_designs )
goto Fail;
@@ -175,7 +182,7 @@
return error;
Fail:
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -189,7 +196,7 @@
FT_Error error;
- error = T1_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
if ( blend )
{
@@ -207,7 +214,7 @@
axis->maximum = map->design_points[map->num_points - 1];
}
- error = T1_Err_Ok;
+ error = FT_Err_Ok;
}
return error;
@@ -232,18 +239,11 @@
for ( j = 1; j < axismap->num_points; ++j )
{
if ( ncv <= axismap->blend_points[j] )
- {
- FT_Fixed t = FT_MulDiv( ncv - axismap->blend_points[j - 1],
- 0x10000L,
- axismap->blend_points[j] -
- axismap->blend_points[j - 1] );
-
return INT_TO_FIXED( axismap->design_points[j - 1] ) +
- FT_MulDiv( t,
- axismap->design_points[j] -
- axismap->design_points[j - 1],
- 1L );
- }
+ ( axismap->design_points[j] - axismap->design_points[j - 1] ) *
+ FT_DivFix( ncv - axismap->blend_points[j - 1],
+ axismap->blend_points[j] -
+ axismap->blend_points[j - 1] );
}
return INT_TO_FIXED( axismap->design_points[axismap->num_points - 1] );
@@ -320,7 +320,7 @@
mmvar->num_axis = mmaster.num_axis;
mmvar->num_designs = mmaster.num_designs;
- mmvar->num_namedstyles = (FT_UInt)-1; /* Does not apply */
+ mmvar->num_namedstyles = ~0U; /* Does not apply */
mmvar->axis = (FT_Var_Axis*)&mmvar[1];
/* Point to axes after MM_Var struct */
mmvar->namedstyle = NULL;
@@ -333,8 +333,8 @@
mmvar->axis[i].def = ( mmvar->axis[i].minimum +
mmvar->axis[i].maximum ) / 2;
/* Does not apply. But this value is in range */
- mmvar->axis[i].strid = (FT_UInt)-1; /* Does not apply */
- mmvar->axis[i].tag = (FT_ULong)-1; /* Does not apply */
+ mmvar->axis[i].strid = ~0U; /* Does not apply */
+ mmvar->axis[i].tag = ~0U; /* Does not apply */
if ( ft_strcmp( mmvar->axis[i].name, "Weight" ) == 0 )
mmvar->axis[i].tag = FT_MAKE_TAG( 'w', 'g', 'h', 't' );
@@ -372,13 +372,11 @@
FT_UInt n, m;
- error = T1_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( blend && blend->num_axis == num_coords )
{
/* recompute the weight vector from the blend coordinates */
- error = T1_Err_Ok;
-
for ( n = 0; n < blend->num_designs; n++ )
{
FT_Fixed result = 0x10000L; /* 1.0 fixed */
@@ -391,8 +389,10 @@
/* get current blend axis position */
factor = coords[m];
- if ( factor < 0 ) factor = 0;
- if ( factor > 0x10000L ) factor = 0x10000L;
+ if ( factor < 0 )
+ factor = 0;
+ if ( factor > 0x10000L )
+ factor = 0x10000L;
if ( ( n & ( 1 << m ) ) == 0 )
factor = 0x10000L - factor;
@@ -402,7 +402,7 @@
blend->weight_vector[n] = result;
}
- error = T1_Err_Ok;
+ error = FT_Err_Ok;
}
return error;
@@ -419,7 +419,7 @@
FT_UInt n, p;
- error = T1_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( blend && blend->num_axis == num_coords )
{
/* compute the blend coordinates through the blend design map */
@@ -495,7 +495,7 @@
FT_Error error;
- error = T1_Err_Invalid_Argument;
+ error = FT_ERR( Invalid_Argument );
if ( num_coords <= 4 && num_coords > 0 )
{
for ( i = 0; i < num_coords; ++i )
@@ -524,7 +524,7 @@
/* release design pos table */
FT_FREE( blend->design_pos[0] );
for ( n = 1; n < num_designs; n++ )
- blend->design_pos[n] = 0;
+ blend->design_pos[n] = NULL;
/* release blend `private' and `font info' dictionaries */
FT_FREE( blend->privates[1] );
@@ -533,14 +533,14 @@
for ( n = 0; n < num_designs; n++ )
{
- blend->privates [n] = 0;
- blend->font_infos[n] = 0;
- blend->bboxes [n] = 0;
+ blend->privates [n] = NULL;
+ blend->font_infos[n] = NULL;
+ blend->bboxes [n] = NULL;
}
/* release weight vectors */
FT_FREE( blend->weight_vector );
- blend->default_weight_vector = 0;
+ blend->default_weight_vector = NULL;
/* release axis names */
for ( n = 0; n < num_axis; n++ )
@@ -567,7 +567,7 @@
{
T1_TokenRec axis_tokens[T1_MAX_MM_AXIS];
FT_Int n, num_axis;
- FT_Error error = T1_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PS_Blend blend;
FT_Memory memory;
@@ -577,14 +577,14 @@
T1_MAX_MM_AXIS, &num_axis );
if ( num_axis < 0 )
{
- error = T1_Err_Ignore;
+ error = FT_ERR( Ignore );
goto Exit;
}
if ( num_axis == 0 || num_axis > T1_MAX_MM_AXIS )
{
FT_ERROR(( "parse_blend_axis_types: incorrect number of axes: %d\n",
num_axis ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -611,16 +611,16 @@
len = token->limit - token->start;
if ( len == 0 )
{
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
- if ( FT_ALLOC( blend->axis_names[n], len + 1 ) )
+ if ( FT_ALLOC( blend->axis_names[n], (FT_Long)( len + 1 ) ) )
goto Exit;
name = (FT_Byte*)blend->axis_names[n];
FT_MEM_COPY( name, token->start, len );
- name[len] = 0;
+ name[len] = '\0';
}
Exit:
@@ -637,7 +637,7 @@
FT_Int num_axis;
T1_Parser parser = &loader->parser;
- FT_Error error = T1_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PS_Blend blend;
@@ -646,7 +646,7 @@
T1_MAX_MM_DESIGNS, &num_designs );
if ( num_designs < 0 )
{
- error = T1_Err_Ignore;
+ error = FT_ERR( Ignore );
goto Exit;
}
if ( num_designs == 0 || num_designs > T1_MAX_MM_DESIGNS )
@@ -654,7 +654,7 @@
FT_ERROR(( "parse_blend_design_positions:"
" incorrect number of designs: %d\n",
num_designs ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -687,7 +687,7 @@
FT_ERROR(( "parse_blend_design_positions:"
" invalid number of axes: %d\n",
n_axis ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -700,7 +700,7 @@
else if ( n_axis != num_axis )
{
FT_ERROR(( "parse_blend_design_positions: incorrect table\n" ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -729,7 +729,7 @@
parse_blend_design_map( T1_Face face,
T1_Loader loader )
{
- FT_Error error = T1_Err_Ok;
+ FT_Error error = FT_Err_Ok;
T1_Parser parser = &loader->parser;
PS_Blend blend;
T1_TokenRec axis_tokens[T1_MAX_MM_AXIS];
@@ -743,14 +743,14 @@
T1_MAX_MM_AXIS, &num_axis );
if ( num_axis < 0 )
{
- error = T1_Err_Ignore;
+ error = FT_ERR( Ignore );
goto Exit;
}
if ( num_axis == 0 || num_axis > T1_MAX_MM_AXIS )
{
FT_ERROR(( "parse_blend_design_map: incorrect number of axes: %d\n",
num_axis ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -781,7 +781,7 @@
if ( num_points <= 0 || num_points > T1_MAX_MM_MAP_POINTS )
{
FT_ERROR(( "parse_blend_design_map: incorrect table\n" ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -821,7 +821,7 @@
{
T1_TokenRec design_tokens[T1_MAX_MM_DESIGNS];
FT_Int num_designs;
- FT_Error error = T1_Err_Ok;
+ FT_Error error = FT_Err_Ok;
T1_Parser parser = &loader->parser;
PS_Blend blend = face->blend;
T1_Token token;
@@ -834,7 +834,7 @@
T1_MAX_MM_DESIGNS, &num_designs );
if ( num_designs < 0 )
{
- error = T1_Err_Ignore;
+ error = FT_ERR( Ignore );
goto Exit;
}
if ( num_designs == 0 || num_designs > T1_MAX_MM_DESIGNS )
@@ -842,7 +842,7 @@
FT_ERROR(( "parse_weight_vector:"
" incorrect number of designs: %d\n",
num_designs ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -859,7 +859,7 @@
" /BlendDesignPosition and /WeightVector have\n"
" "
" different number of elements\n" ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1004,13 +1004,24 @@
max_objects = 0;
}
- if ( field->type == T1_FIELD_TYPE_INTEGER_ARRAY ||
- field->type == T1_FIELD_TYPE_FIXED_ARRAY )
- error = T1_Load_Field_Table( &loader->parser, field,
- objects, max_objects, 0 );
+ if ( *objects )
+ {
+ if ( field->type == T1_FIELD_TYPE_INTEGER_ARRAY ||
+ field->type == T1_FIELD_TYPE_FIXED_ARRAY )
+ error = T1_Load_Field_Table( &loader->parser, field,
+ objects, max_objects, 0 );
+ else
+ error = T1_Load_Field( &loader->parser, field,
+ objects, max_objects, 0 );
+ }
else
- error = T1_Load_Field( &loader->parser, field,
- objects, max_objects, 0 );
+ {
+ FT_TRACE1(( "t1_load_keyword: ignoring keyword `%s'"
+ " which is not valid at this point\n"
+ " (probably due to missing keywords)\n",
+ field->ident ));
+ error = FT_Err_Ok;
+ }
Exit:
return error;
@@ -1030,7 +1041,8 @@
static int
read_binary_data( T1_Parser parser,
FT_Long* size,
- FT_Byte** base )
+ FT_Byte** base,
+ FT_Bool incremental )
{
FT_Byte* cur;
FT_Byte* limit = parser->root.limit;
@@ -1065,8 +1077,12 @@
}
}
- FT_ERROR(( "read_binary_data: invalid size field\n" ));
- parser->root.error = T1_Err_Invalid_File_Format;
+ if( !incremental )
+ {
+ FT_ERROR(( "read_binary_data: invalid size field\n" ));
+ parser->root.error = FT_THROW( Invalid_File_Format );
+ }
+
return 0;
}
@@ -1089,9 +1105,9 @@
result = T1_ToFixedArray( parser, 6, temp, 3 );
- if ( result < 0 )
+ if ( result < 6 )
{
- parser->root.error = T1_Err_Invalid_File_Format;
+ parser->root.error = FT_THROW( Invalid_File_Format );
return;
}
@@ -1100,7 +1116,7 @@
if ( temp_scale == 0 )
{
FT_ERROR(( "t1_parse_font_matrix: invalid font matrix\n" ));
- parser->root.error = T1_Err_Invalid_File_Format;
+ parser->root.error = FT_THROW( Invalid_File_Format );
return;
}
@@ -1108,8 +1124,7 @@
/* 1000 / temp_scale, because temp_scale was already multiplied by */
/* 1000 (in t1_tofixed, from psobjs.c). */
- root->units_per_EM = (FT_UShort)( FT_DivFix( 1000 * 0x10000L,
- temp_scale ) >> 16 );
+ root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale );
/* we need to scale the values by 1.0/temp_scale */
if ( temp_scale != 0x10000L )
@@ -1149,7 +1164,7 @@
if ( cur >= limit )
{
FT_ERROR(( "parse_encoding: out of bounds\n" ));
- parser->root.error = T1_Err_Invalid_File_Format;
+ parser->root.error = FT_THROW( Invalid_File_Format );
return;
}
@@ -1196,7 +1211,7 @@
char* notdef = (char *)".notdef";
- T1_Add_Table( char_table, n, notdef, 8 );
+ (void)T1_Add_Table( char_table, n, notdef, 8 );
}
/* Now we need to read records of the form */
@@ -1257,11 +1272,18 @@
{
charcode = (FT_Int)T1_ToInt( parser );
T1_Skip_Spaces( parser );
+
+ /* protect against invalid charcode */
+ if ( cur == parser->root.cursor )
+ {
+ parser->root.error = FT_THROW( Unknown_File_Format );
+ return;
+ }
}
cur = parser->root.cursor;
- if ( *cur == '/' && cur + 2 < limit && n < count )
+ if ( cur + 2 < limit && *cur == '/' && n < count )
{
FT_PtrDist len;
@@ -1270,6 +1292,8 @@
parser->root.cursor = cur;
T1_Skip_PS_Token( parser );
+ if ( parser->root.cursor >= limit )
+ return;
if ( parser->root.error )
return;
@@ -1293,7 +1317,7 @@
/* specification (it might be an encoding for a CID type1 */
/* font, however), so we conclude that this font is NOT a */
/* type1 font. */
- parser->root.error = FT_Err_Unknown_File_Format;
+ parser->root.error = FT_THROW( Unknown_File_Format );
return;
}
}
@@ -1328,7 +1352,7 @@
face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1;
else
- parser->root.error = T1_Err_Ignore;
+ parser->root.error = FT_ERR( Ignore );
}
}
@@ -1356,7 +1380,7 @@
T1_Skip_Spaces ( parser );
if ( parser->root.cursor >= parser->root.limit ||
*parser->root.cursor != ']' )
- parser->root.error = T1_Err_Invalid_File_Format;
+ parser->root.error = FT_THROW( Invalid_File_Format );
return;
}
@@ -1387,16 +1411,17 @@
FT_Byte* base;
- /* If the next token isn't `dup' we are done. */
- if ( parser->root.cursor + 4 < parser->root.limit &&
- ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 )
+ /* If we are out of data, or if the next token isn't `dup', */
+ /* we are done. */
+ if ( parser->root.cursor + 4 >= parser->root.limit ||
+ ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 )
break;
T1_Skip_PS_Token( parser ); /* `dup' */
idx = T1_ToInt( parser );
- if ( !read_binary_data( parser, &size, &base ) )
+ if ( !read_binary_data( parser, &size, &base, IS_INCREMENTAL ) )
return;
/* The binary string is followed by one token, e.g. `NP' */
@@ -1434,7 +1459,7 @@
/* least contain a `return'), but we support them anyway */
if ( size < face->type1.private_dict.lenIV )
{
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -1488,6 +1513,12 @@
num_glyphs = (FT_Int)T1_ToInt( parser );
+ if ( num_glyphs < 0 )
+ {
+ error = FT_THROW( Invalid_File_Format );
+ goto Fail;
+ }
+
/* some fonts like Optima-Oblique not only define the /CharStrings */
/* array but access it also */
if ( num_glyphs == 0 || parser->root.error )
@@ -1565,6 +1596,11 @@
}
T1_Skip_PS_Token( parser );
+ if ( parser->root.cursor >= limit )
+ {
+ error = FT_THROW( Invalid_File_Format );
+ goto Fail;
+ }
if ( parser->root.error )
return;
@@ -1573,16 +1609,16 @@
FT_PtrDist len;
- if ( cur + 1 >= limit )
+ if ( cur + 2 >= limit )
{
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
cur++; /* skip `/' */
len = parser->root.cursor - cur;
- if ( !read_binary_data( parser, &size, &base ) )
+ if ( !read_binary_data( parser, &size, &base, IS_INCREMENTAL ) )
return;
/* for some non-standard fonts like `Optima' which provides */
@@ -1615,7 +1651,7 @@
if ( size <= face->type1.private_dict.lenIV )
{
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -1819,7 +1855,7 @@
parser->root.cursor = base;
parser->root.limit = base + size;
- parser->root.error = T1_Err_Ok;
+ parser->root.error = FT_Err_Ok;
limit = parser->root.limit;
@@ -1871,8 +1907,8 @@
parser->root.cursor = start_binary;
- if ( !read_binary_data( parser, &s, &b ) )
- return T1_Err_Invalid_File_Format;
+ if ( !read_binary_data( parser, &s, &b, IS_INCREMENTAL ) )
+ return FT_THROW( Invalid_File_Format );
have_integer = 0;
}
@@ -1884,8 +1920,8 @@
parser->root.cursor = start_binary;
- if ( !read_binary_data( parser, &s, &b ) )
- return T1_Err_Invalid_File_Format;
+ if ( !read_binary_data( parser, &s, &b, IS_INCREMENTAL ) )
+ return FT_THROW( Invalid_File_Format );
have_integer = 0;
}
@@ -1957,8 +1993,8 @@
if ( !( dict & keyword->dict ) )
{
- FT_TRACE1(( "parse_dict: found %s but ignoring it "
- "since it is in the wrong dictionary\n",
+ FT_TRACE1(( "parse_dict: found `%s' but ignoring it"
+ " since it is in the wrong dictionary\n",
keyword->ident ));
break;
}
@@ -1970,10 +2006,10 @@
parser->root.error = t1_load_keyword( face,
loader,
keyword );
- if ( parser->root.error != T1_Err_Ok )
+ if ( parser->root.error != FT_Err_Ok )
{
- if ( FT_ERROR_BASE( parser->root.error ) == FT_Err_Ignore )
- parser->root.error = T1_Err_Ok;
+ if ( FT_ERR_EQ( parser->root.error, Ignore ) )
+ parser->root.error = FT_Err_Ok;
else
return parser->root.error;
}
@@ -2160,13 +2196,11 @@
type1->subrs_len = loader.subrs.lengths;
}
-#ifdef FT_CONFIG_OPTION_INCREMENTAL
- if ( !face->root.internal->incremental_interface )
-#endif
+ if ( !IS_INCREMENTAL )
if ( !loader.charstrings.init )
{
FT_ERROR(( "T1_Open_Face: no `/CharStrings' array in face\n" ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
}
loader.charstrings.init = 0;
@@ -2185,7 +2219,6 @@
if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY )
{
FT_Int charcode, idx, min_char, max_char;
- FT_Byte* char_name;
FT_Byte* glyph_name;
@@ -2200,6 +2233,9 @@
charcode = 0;
for ( ; charcode < loader.encoding_table.max_elems; charcode++ )
{
+ FT_Byte* char_name;
+
+
type1->encoding.char_index[charcode] = 0;
type1->encoding.char_name [charcode] = (char *)".notdef";
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index b685f2f..e11770f 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 objects manager (body). */
/* */
-/* Copyright 1996-2009, 2011 by */
+/* Copyright 1996-2009, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -95,7 +95,7 @@
T1_Size_Init( FT_Size t1size ) /* T1_Size */
{
T1_Size size = (T1_Size)t1size;
- FT_Error error = T1_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size );
@@ -131,7 +131,7 @@
size->root.metrics.y_scale,
0, 0 );
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
@@ -326,7 +326,7 @@
if ( !psaux )
{
FT_ERROR(( "T1_Face_Init: cannot access `psaux' module\n" ));
- error = T1_Err_Missing_Module;
+ error = FT_THROW( Missing_Module );
goto Exit;
}
@@ -348,7 +348,7 @@
if ( face_index > 0 )
{
FT_ERROR(( "T1_Face_Init: invalid face index\n" ));
- error = T1_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -364,10 +364,10 @@
root->num_glyphs = type1->num_glyphs;
root->face_index = 0;
- root->face_flags = FT_FACE_FLAG_SCALABLE |
- FT_FACE_FLAG_HORIZONTAL |
- FT_FACE_FLAG_GLYPH_NAMES |
- FT_FACE_FLAG_HINTER;
+ root->face_flags |= FT_FACE_FLAG_SCALABLE |
+ FT_FACE_FLAG_HORIZONTAL |
+ FT_FACE_FLAG_GLYPH_NAMES |
+ FT_FACE_FLAG_HINTER;
if ( info->is_fixed_pitch )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
@@ -489,7 +489,7 @@
if ( !error )
root->max_advance_width = (FT_Short)FIXED_TO_INT( max_advance );
else
- error = T1_Err_Ok; /* clear error */
+ error = FT_Err_Ok; /* clear error */
}
root->max_advance_height = root->height;
@@ -517,7 +517,8 @@
charmap.encoding = FT_ENCODING_UNICODE;
error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
- if ( error && FT_Err_No_Unicode_Glyph_Name != error )
+ if ( error &&
+ FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
goto Exit;
error = FT_Err_Ok;
@@ -590,7 +591,7 @@
{
FT_UNUSED( driver );
- return T1_Err_Ok;
+ return FT_Err_Ok;
}
diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c
index 4955279..ccf9f4c 100644
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 parser (body). */
/* */
-/* Copyright 1996-2005, 2008, 2009, 2012 by */
+/* Copyright 1996-2005, 2008, 2009, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -119,10 +119,10 @@
if ( !FT_FRAME_ENTER( header_length ) )
{
- error = T1_Err_Ok;
+ error = FT_Err_Ok;
if ( ft_memcmp( stream->cursor, header_string, header_length ) != 0 )
- error = T1_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
FT_FRAME_EXIT();
}
@@ -158,7 +158,7 @@
error = check_type1_format( stream, "%!PS-AdobeFont", 14 );
if ( error )
{
- if ( error != T1_Err_Unknown_File_Format )
+ if ( FT_ERR_NEQ( error, Unknown_File_Format ) )
goto Exit;
error = check_type1_format( stream, "%!FontType", 10 );
@@ -263,7 +263,7 @@
{
FT_Stream stream = parser->stream;
FT_Memory memory = parser->root.memory;
- FT_Error error = T1_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_ULong size;
@@ -299,7 +299,7 @@
{
FT_ERROR(( "T1_Get_Private_Dict:"
" invalid private dictionary section\n" ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -313,7 +313,7 @@
error = read_pfb_tag( stream, &tag, &size );
if ( error || tag != 0x8002U )
{
- error = T1_Err_Ok;
+ error = FT_Err_Ok;
break;
}
@@ -332,9 +332,11 @@
/* dictionary block in the heap. */
/* first of all, look at the `eexec' keyword */
- FT_Byte* cur = parser->base_dict;
- FT_Byte* limit = cur + parser->base_len;
- FT_Byte c;
+ FT_Byte* cur = parser->base_dict;
+ FT_Byte* limit = cur + parser->base_len;
+ FT_Byte c;
+ FT_Pointer pos_lf;
+ FT_Bool test_cr;
Again:
@@ -342,7 +344,7 @@
{
c = cur[0];
if ( c == 'e' && cur + 9 < limit ) /* 9 = 5 letters for `eexec' + */
- /* newline + 4 chars */
+ /* whitespace + 4 chars */
{
if ( cur[1] == 'e' &&
cur[2] == 'x' &&
@@ -355,7 +357,7 @@
{
FT_ERROR(( "T1_Get_Private_Dict:"
" could not find `eexec' keyword\n" ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
}
@@ -364,7 +366,8 @@
/* or string (as e.g. in u003043t.gsf from ghostscript) */
parser->root.cursor = parser->base_dict;
- parser->root.limit = cur + 9;
+ /* set limit to `eexec' + whitespace + 4 characters */
+ parser->root.limit = cur + 10;
cur = parser->root.cursor;
limit = parser->root.limit;
@@ -396,27 +399,37 @@
parser->root.limit = parser->base_dict + parser->base_len;
T1_Skip_PS_Token( parser );
- cur = parser->root.cursor;
+ cur = parser->root.cursor;
+ limit = parser->root.limit;
- /* according to the Type1 spec, the first cipher byte must not be */
+ /* According to the Type 1 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' ) )
+ /* */
+ /* On the other hand, Adobe's Type 1 parser handles fonts just */
+ /* fine that are violating this limitation, so we add a heuristic */
+ /* test to stop at \r only if it is not used for EOL. */
+
+ pos_lf = ft_memchr( cur, '\n', limit - cur );
+ test_cr = FT_BOOL( !pos_lf ||
+ pos_lf > ft_memchr( cur, '\r', limit - cur ) );
+
+ while ( cur < limit &&
+ ( *cur == ' ' ||
+ *cur == '\t' ||
+ (test_cr && *cur == '\r' ) ||
+ *cur == '\n' ) )
++cur;
if ( cur >= limit )
{
FT_ERROR(( "T1_Get_Private_Dict:"
" `eexec' not properly terminated\n" ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
- size = parser->base_len - ( cur - parser->base_dict );
+ size = (FT_ULong)( parser->base_len - ( cur - parser->base_dict ) );
if ( parser->in_memory )
{
@@ -437,11 +450,12 @@
/* now determine whether the private dictionary is encoded in binary */
/* or hexadecimal ASCII format -- decode it accordingly */
- /* we need to access the next 4 bytes (after the final \r following */
- /* the `eexec' keyword); if they all are hexadecimal digits, then */
- /* we have a case of ASCII storage */
+ /* we need to access the next 4 bytes (after the final whitespace */
+ /* following the `eexec' keyword); if they all are hexadecimal */
+ /* digits, then we have a case of ASCII storage */
- if ( ft_isxdigit( cur[0] ) && ft_isxdigit( cur[1] ) &&
+ if ( cur + 3 < limit &&
+ ft_isxdigit( cur[0] ) && ft_isxdigit( cur[1] ) &&
ft_isxdigit( cur[2] ) && ft_isxdigit( cur[3] ) )
{
/* ASCII hexadecimal encoding */
@@ -471,7 +485,7 @@
{
FT_ERROR(( "T1_Get_Private_Dict:"
" invalid private dictionary section\n" ));
- error = T1_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
diff --git a/src/type42/t42drivr.c b/src/type42/t42drivr.c
index 9b93209..3ad1bde 100644
--- a/src/type42/t42drivr.c
+++ b/src/type42/t42drivr.c
@@ -4,7 +4,8 @@
/* */
/* High-level Type 42 driver interface (body). */
/* */
-/* Copyright 2002-2004, 2006, 2007, 2009, 2011 by Roberto Alameda. */
+/* Copyright 2002-2004, 2006, 2007, 2009, 2011, 2013 by */
+/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -63,7 +64,7 @@
{
FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );
- return T42_Err_Ok;
+ return FT_Err_Ok;
}
@@ -71,13 +72,13 @@
t42_get_name_index( T42_Face face,
FT_String* glyph_name )
{
- FT_Int i;
- FT_String* gname;
+ FT_Int i;
for ( i = 0; i < face->type1.num_glyphs; i++ )
{
- gname = face->type1.glyph_names[i];
+ FT_String* gname = face->type1.glyph_names[i];
+
if ( glyph_name[0] == gname[0] && !ft_strcmp( glyph_name, gname ) )
return (FT_UInt)ft_atol( (const char *)face->type1.charstrings[i] );
@@ -125,7 +126,7 @@
{
*afont_info = ((T42_Face)face)->type1.font_info;
- return T42_Err_Ok;
+ return FT_Err_Ok;
}
@@ -135,7 +136,7 @@
{
*afont_extra = ((T42_Face)face)->type1.font_extra;
- return T42_Err_Ok;
+ return FT_Err_Ok;
}
@@ -154,7 +155,7 @@
{
*afont_private = ((T42_Face)face)->type1.private_dict;
- return T42_Err_Ok;
+ return FT_Err_Ok;
}
@@ -229,10 +230,6 @@
T42_GlyphSlot_Init,
T42_GlyphSlot_Done,
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- ft_stub_set_char_sizes,
- ft_stub_set_pixel_sizes,
-#endif
T42_GlyphSlot_Load,
0, /* FT_Face_GetKerningFunc */
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index c6053af..915e81f 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -4,7 +4,7 @@
/* */
/* Type 42 objects manager (body). */
/* */
-/* Copyright 2002-2009, 2011 */
+/* Copyright 2002-2009, 2011, 2013 */
/* by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -47,6 +47,12 @@
if ( FT_ALLOC( face->ttf_data, 12 ) )
goto Exit;
+ /* while parsing the font we always update `face->ttf_size' so that */
+ /* even in case of buggy data (which might lead to premature end of */
+ /* scanning without causing an error) the call to `FT_Open_Face' in */
+ /* `T42_Face_Init' passes the correct size */
+ face->ttf_size = 12;
+
error = t42_parser_init( parser,
face->root.stream,
memory,
@@ -63,7 +69,7 @@
{
FT_ERROR(( "T42_Open_Face: cannot handle FontType %d\n",
type1->font_type ));
- error = T42_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -74,7 +80,7 @@
if ( !loader.charstrings.init )
{
FT_ERROR(( "T42_Open_Face: no charstrings array in face\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
}
loader.charstrings.init = 0;
@@ -93,7 +99,6 @@
if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY )
{
FT_Int charcode, idx, min_char, max_char;
- FT_Byte* char_name;
FT_Byte* glyph_name;
@@ -109,6 +114,9 @@
charcode = 0;
for ( ; charcode < loader.encoding_table.max_elems; charcode++ )
{
+ FT_Byte* char_name;
+
+
type1->encoding.char_index[charcode] = 0;
type1->encoding.char_name [charcode] = (char *)".notdef";
@@ -169,7 +177,6 @@
FT_UNUSED( num_params );
FT_UNUSED( params );
- FT_UNUSED( face_index );
FT_UNUSED( stream );
@@ -185,7 +192,7 @@
if ( !psaux )
{
FT_ERROR(( "T42_Face_Init: cannot access `psaux' module\n" ));
- error = T42_Err_Missing_Module;
+ error = FT_THROW( Missing_Module );
goto Exit;
}
@@ -204,7 +211,7 @@
if ( face_index > 0 )
{
FT_ERROR(( "T42_Face_Init: invalid face index\n" ));
- error = T42_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -217,9 +224,9 @@
root->num_charmaps = 0;
root->face_index = 0;
- root->face_flags = FT_FACE_FLAG_SCALABLE |
- FT_FACE_FLAG_HORIZONTAL |
- FT_FACE_FLAG_GLYPH_NAMES;
+ root->face_flags |= FT_FACE_FLAG_SCALABLE |
+ FT_FACE_FLAG_HORIZONTAL |
+ FT_FACE_FLAG_GLYPH_NAMES;
if ( info->is_fixed_pitch )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
@@ -285,7 +292,9 @@
FT_Open_Args args;
- args.flags = FT_OPEN_MEMORY;
+ args.flags = FT_OPEN_MEMORY | FT_OPEN_DRIVER;
+ args.driver = FT_Get_Module( FT_FACE_LIBRARY( face ),
+ "truetype" );
args.memory_base = face->ttf_data;
args.memory_size = face->ttf_size;
@@ -347,7 +356,8 @@
charmap.encoding = FT_ENCODING_UNICODE;
error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
- if ( error && FT_Err_No_Unicode_Glyph_Name != error )
+ if ( error &&
+ FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
goto Exit;
error = FT_Err_Ok;
@@ -481,12 +491,12 @@
if ( !ttmodule )
{
FT_ERROR(( "T42_Driver_Init: cannot access `truetype' module\n" ));
- return T42_Err_Missing_Module;
+ return FT_THROW( Missing_Module );
}
driver->ttclazz = (FT_Driver_Class)ttmodule->clazz;
- return T42_Err_Ok;
+ return FT_Err_Ok;
}
@@ -504,7 +514,7 @@
FT_Face face = size->face;
T42_Face t42face = (T42_Face)face;
FT_Size ttsize;
- FT_Error error = T42_Err_Ok;
+ FT_Error error;
error = FT_New_Size( t42face->ttf_face, &ttsize );
@@ -580,7 +590,7 @@
FT_Face face = t42slot->face;
T42_Face t42face = (T42_Face)face;
FT_GlyphSlot ttslot;
- FT_Error error = T42_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( face->glyph == NULL )
@@ -645,6 +655,8 @@
FT_Driver_Class ttclazz = ((T42_Driver)glyph->face->driver)->ttclazz;
+ FT_TRACE1(( "T42_GlyphSlot_Load: glyph index %d\n", glyph_index ));
+
t42_glyphslot_clear( t42slot->ttslot );
error = ttclazz->load_glyph( t42slot->ttslot,
t42size->ttsize,
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
index 468b463..5070853 100644
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -4,7 +4,7 @@
/* */
/* Type 42 font parser (body). */
/* */
-/* Copyright 2002-2012 by */
+/* Copyright 2002-2014 by */
/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -144,7 +144,7 @@
FT_Memory memory,
PSAux_Service psaux )
{
- FT_Error error = T42_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Long size;
@@ -176,7 +176,7 @@
if ( ft_memcmp( stream->cursor, "%!PS-TrueTypeFont", 17 ) != 0 )
{
FT_TRACE2(( " not a Type42 font\n" ));
- error = T42_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
}
FT_FRAME_EXIT();
@@ -255,18 +255,31 @@
FT_Face root = (FT_Face)&face->root;
FT_Fixed temp[6];
FT_Fixed temp_scale;
+ FT_Int result;
- (void)T1_ToFixedArray( parser, 6, temp, 3 );
+ result = T1_ToFixedArray( parser, 6, temp, 3 );
+
+ if ( result < 6 )
+ {
+ parser->root.error = FT_THROW( Invalid_File_Format );
+ return;
+ }
temp_scale = FT_ABS( temp[3] );
+ if ( temp_scale == 0 )
+ {
+ FT_ERROR(( "t1_parse_font_matrix: invalid font matrix\n" ));
+ parser->root.error = FT_THROW( Invalid_File_Format );
+ return;
+ }
+
/* Set Units per EM based on FontMatrix values. We set the value to */
/* 1000 / temp_scale, because temp_scale was already multiplied by */
/* 1000 (in t1_tofixed, from psobjs.c). */
- root->units_per_EM = (FT_UShort)( FT_DivFix( 1000 * 0x10000L,
- temp_scale ) >> 16 );
+ root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale );
/* we need to scale the values by 1.0/temp_scale */
if ( temp_scale != 0x10000L )
@@ -276,7 +289,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];
@@ -306,7 +319,7 @@
if ( cur >= limit )
{
FT_ERROR(( "t42_parse_encoding: out of bounds\n" ));
- parser->root.error = T42_Err_Invalid_File_Format;
+ parser->root.error = FT_THROW( Invalid_File_Format );
return;
}
@@ -315,7 +328,7 @@
if ( ft_isdigit( *cur ) || *cur == '[' )
{
T1_Encoding encode = &face->type1.encoding;
- FT_UInt count, n;
+ FT_Int count, n;
PS_Table char_table = &loader->encoding_table;
FT_Memory memory = parser->root.memory;
FT_Error error;
@@ -330,7 +343,7 @@
parser->root.cursor++;
}
else
- count = (FT_UInt)T1_ToInt( parser );
+ count = (FT_Int)T1_ToInt( parser );
T1_Skip_Spaces( parser );
if ( parser->root.cursor >= limit )
@@ -353,7 +366,7 @@
char* notdef = (char *)".notdef";
- T1_Add_Table( char_table, n, notdef, 8 );
+ (void)T1_Add_Table( char_table, n, notdef, 8 );
}
/* Now we need to read records of the form */
@@ -418,7 +431,7 @@
cur = parser->root.cursor;
- if ( *cur == '/' && cur + 2 < limit && n < count )
+ if ( cur + 2 < limit && *cur == '/' && n < count )
{
FT_PtrDist len;
@@ -427,6 +440,8 @@
parser->root.cursor = cur;
T1_Skip_PS_Token( parser );
+ if ( parser->root.cursor >= limit )
+ return;
if ( parser->root.error )
return;
@@ -440,6 +455,19 @@
n++;
}
+ else if ( only_immediates )
+ {
+ /* Since the current position is not updated for */
+ /* immediates-only mode we would get an infinite loop if */
+ /* we don't do anything here. */
+ /* */
+ /* This encoding array is not valid according to the type1 */
+ /* specification (it might be an encoding for a CID type1 */
+ /* font, however), so we conclude that this font is NOT a */
+ /* type1 font. */
+ parser->root.error = FT_THROW( Unknown_File_Format );
+ return;
+ }
}
else
{
@@ -451,8 +479,8 @@
T1_Skip_Spaces( parser );
}
- face->type1.encoding_type = T1_ENCODING_TYPE_ARRAY;
- parser->root.cursor = cur;
+ face->type1.encoding_type = T1_ENCODING_TYPE_ARRAY;
+ parser->root.cursor = cur;
}
/* Otherwise, we should have either `StandardEncoding', */
@@ -472,10 +500,7 @@
face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1;
else
- {
- FT_ERROR(( "t42_parse_encoding: invalid token\n" ));
- parser->root.error = T42_Err_Invalid_File_Format;
- }
+ parser->root.error = FT_THROW( Ignore );
}
}
@@ -499,7 +524,7 @@
FT_Byte* limit = parser->root.limit;
FT_Error error;
FT_Int num_tables = 0;
- FT_ULong count, ttf_size = 0;
+ FT_ULong count;
FT_Long n, string_size, old_string_size, real_size;
FT_Byte* string_buf = NULL;
@@ -527,7 +552,7 @@
if ( parser->root.cursor >= limit || *parser->root.cursor++ != '[' )
{
FT_ERROR(( "t42_parse_sfnts: can't find begin of sfnts vector\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -555,6 +580,12 @@
/* don't include delimiters */
string_size = (FT_Long)( ( parser->root.cursor - cur - 2 + 1 ) / 2 );
+ if ( !string_size )
+ {
+ FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Fail;
+ }
if ( FT_REALLOC( string_buf, old_string_size, string_size ) )
goto Fail;
@@ -572,7 +603,7 @@
{
FT_ERROR(( "t42_parse_sfnts: "
"can't handle mixed binary and hex strings\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -580,7 +611,7 @@
if ( string_size < 0 )
{
FT_ERROR(( "t42_parse_sfnts: invalid string size\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -592,8 +623,8 @@
if ( limit - parser->root.cursor < string_size )
{
- FT_ERROR(( "t42_parse_sfnts: too many binary data\n" ));
- error = T42_Err_Invalid_File_Format;
+ FT_ERROR(( "t42_parse_sfnts: too much binary data\n" ));
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
else
@@ -603,7 +634,7 @@
if ( !string_buf )
{
FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -615,7 +646,7 @@
if ( !string_size )
{
FT_ERROR(( "t42_parse_sfnts: invalid string\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -632,18 +663,25 @@
}
else
{
- num_tables = 16 * face->ttf_data[4] + face->ttf_data[5];
- status = BEFORE_TABLE_DIR;
- ttf_size = 12 + 16 * num_tables;
+ num_tables = 16 * face->ttf_data[4] + face->ttf_data[5];
+ status = BEFORE_TABLE_DIR;
+ face->ttf_size = 12 + 16 * num_tables;
+
+ if ( (FT_ULong)( limit - parser->root.cursor ) < face->ttf_size )
+ {
+ FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Fail;
+ }
- if ( FT_REALLOC( face->ttf_data, 12, ttf_size ) )
+ if ( FT_REALLOC( face->ttf_data, 12, face->ttf_size ) )
goto Fail;
}
/* fall through */
case BEFORE_TABLE_DIR:
/* the offset table is read; read the table directory */
- if ( count < ttf_size )
+ if ( count < face->ttf_size )
{
face->ttf_data[count++] = string_buf[n];
continue;
@@ -662,25 +700,24 @@
len = FT_PEEK_ULONG( p );
/* Pad to a 4-byte boundary length */
- ttf_size += ( len + 3 ) & ~3;
+ face->ttf_size += ( len + 3 ) & ~3;
}
- status = OTHER_TABLES;
- face->ttf_size = ttf_size;
+ status = OTHER_TABLES;
/* there are no more than 256 tables, so no size check here */
if ( FT_REALLOC( face->ttf_data, 12 + 16 * num_tables,
- ttf_size + 1 ) )
+ face->ttf_size + 1 ) )
goto Fail;
}
/* fall through */
case OTHER_TABLES:
/* all other tables are just copied */
- if ( count >= ttf_size )
+ if ( count >= face->ttf_size )
{
- FT_ERROR(( "t42_parse_sfnts: too many binary data\n" ));
- error = T42_Err_Invalid_File_Format;
+ FT_ERROR(( "t42_parse_sfnts: too much binary data\n" ));
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
face->ttf_data[count++] = string_buf[n];
@@ -691,7 +728,7 @@
}
/* if control reaches this point, the format was not valid */
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
Fail:
parser->root.error = error;
@@ -727,7 +764,7 @@
if ( parser->root.cursor >= limit )
{
FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -769,14 +806,14 @@
else
{
FT_ERROR(( "t42_parse_charstrings: invalid token\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
if ( parser->root.cursor >= limit )
{
FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -825,6 +862,12 @@
break;
T1_Skip_PS_Token( parser );
+ if ( parser->root.cursor >= limit )
+ {
+ FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Fail;
+ }
if ( parser->root.error )
return;
@@ -833,10 +876,10 @@
FT_PtrDist len;
- if ( cur + 1 >= limit )
+ if ( cur + 2 >= limit )
{
FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -867,7 +910,7 @@
if ( parser->root.cursor >= limit )
{
FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -890,7 +933,7 @@
if ( !notdef_found )
{
FT_ERROR(( "t42_parse_charstrings: no /.notdef glyph\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -1034,7 +1077,7 @@
parser->root.cursor = base;
parser->root.limit = base + size;
- parser->root.error = T42_Err_Ok;
+ parser->root.error = FT_Err_Ok;
limit = parser->root.limit;
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index a551896..4705c53 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
-/* Copyright 1996-2004, 2006-2012 by */
+/* Copyright 1996-2004, 2006-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* Copyright 2003 Huw D M Davies for Codeweavers */
/* Copyright 2007 Dmitry Timoshkov for Codeweavers */
@@ -72,12 +72,12 @@
FT_FRAME_START( 248 ),
FT_FRAME_ULONG_LE ( magic ), /* PE00 */
- FT_FRAME_USHORT_LE ( machine ), /* 0x014c - i386 */
+ FT_FRAME_USHORT_LE ( machine ), /* 0x014C - i386 */
FT_FRAME_USHORT_LE ( number_of_sections ),
FT_FRAME_SKIP_BYTES( 12 ),
FT_FRAME_USHORT_LE ( size_of_optional_header ),
FT_FRAME_SKIP_BYTES( 2 ),
- FT_FRAME_USHORT_LE ( magic32 ), /* 0x10b */
+ FT_FRAME_USHORT_LE ( magic32 ), /* 0x10B */
FT_FRAME_SKIP_BYTES( 110 ),
FT_FRAME_ULONG_LE ( rsrc_virtual_address ),
FT_FRAME_ULONG_LE ( rsrc_size ),
@@ -225,7 +225,7 @@
header->version != 0x300 )
{
FT_TRACE2(( " not a Windows FNT file\n" ));
- error = FNT_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -235,7 +235,7 @@
if ( header->file_size < size )
{
FT_TRACE2(( " not a Windows FNT file\n" ));
- error = FNT_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -253,7 +253,7 @@
if ( header->file_type & 1 )
{
FT_TRACE2(( "[can't handle vector FNT fonts]\n" ));
- error = FNT_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -284,7 +284,7 @@
FT_STREAM_READ_FIELDS( winmz_header_fields, &mz_header ) )
goto Exit;
- error = FNT_Err_Unknown_File_Format;
+ error = FT_ERR( Unknown_File_Format );
if ( mz_header.magic == WINFNT_MZ_MAGIC )
{
/* yes, now look for an NE header in the file */
@@ -297,7 +297,7 @@
FT_STREAM_READ_FIELDS( winne_header_fields, &ne_header ) )
goto Exit;
- error = FNT_Err_Unknown_File_Format;
+ error = FT_ERR( Unknown_File_Format );
if ( ne_header.magic == WINFNT_NE_MAGIC )
{
/* good, now look into the resource table for each FNT resource */
@@ -344,7 +344,7 @@
if ( !font_count || !font_offset )
{
FT_TRACE2(( "this file doesn't contain any FNT resources\n" ));
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -353,7 +353,7 @@
if ( font_count * 118UL > stream->size )
{
FT_TRACE2(( "invalid number of faces\n" ));
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -361,7 +361,7 @@
if ( face_index >= font_count )
{
- error = FNT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
else if ( face_index < 0 )
@@ -412,12 +412,12 @@
pe32_header.rsrc_size ));
if ( pe32_header.magic != WINFNT_PE_MAGIC /* check full signature */ ||
- pe32_header.machine != 0x014c /* i386 */ ||
- pe32_header.size_of_optional_header != 0xe0 /* FIXME */ ||
- pe32_header.magic32 != 0x10b )
+ pe32_header.machine != 0x014C /* i386 */ ||
+ pe32_header.size_of_optional_header != 0xE0 /* FIXME */ ||
+ pe32_header.magic32 != 0x10B )
{
FT_TRACE2(( "this file has an invalid PE header\n" ));
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -440,7 +440,7 @@
}
FT_TRACE2(( "this file doesn't contain any resources\n" ));
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
Found_rsrc_section:
@@ -462,7 +462,7 @@
if ( !(dir_entry1.offset & 0x80000000UL ) /* DataIsDirectory */ )
{
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -486,7 +486,7 @@
if ( !(dir_entry2.offset & 0x80000000UL ) /* DataIsDirectory */ )
{
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -510,7 +510,7 @@
if ( dir_entry2.offset & 0x80000000UL /* DataIsDirectory */ )
{
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -561,13 +561,13 @@
if ( !face->root.num_faces )
{
FT_TRACE2(( "this file doesn't contain any RT_FONT resources\n" ));
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
if ( face_index >= face->root.num_faces )
{
- error = FNT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
}
@@ -591,11 +591,14 @@
static FT_Error
- fnt_cmap_init( FNT_CMap cmap )
+ fnt_cmap_init( FNT_CMap cmap,
+ FT_Pointer pointer )
{
FNT_Face face = (FNT_Face)FT_CMAP_FACE( cmap );
FNT_Font font = face->font;
+ FT_UNUSED( pointer );
+
cmap->first = (FT_UInt32) font->header.first_char;
cmap->count = (FT_UInt32)( font->header.last_char - cmap->first + 1 );
@@ -705,7 +708,7 @@
if ( !error && face_index < 0 )
goto Exit;
- if ( error == FNT_Err_Unknown_File_Format )
+ if ( FT_ERR_EQ( error, Unknown_File_Format ) )
{
/* this didn't work; try to load a single FNT font */
FNT_Font font;
@@ -724,7 +727,7 @@
if ( !error )
{
if ( face_index > 0 )
- error = FNT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
else if ( face_index < 0 )
goto Exit;
}
@@ -743,8 +746,8 @@
root->face_index = face_index;
- root->face_flags = FT_FACE_FLAG_FIXED_SIZES |
- FT_FACE_FLAG_HORIZONTAL;
+ root->face_flags |= FT_FACE_FLAG_FIXED_SIZES |
+ FT_FACE_FLAG_HORIZONTAL;
if ( font->header.avg_width == font->header.max_width )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
@@ -836,7 +839,7 @@
if ( font->header.last_char < font->header.first_char )
{
FT_TRACE2(( "invalid number of glyphs\n" ));
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
@@ -847,7 +850,7 @@
if ( font->header.face_name_offset >= font->header.file_size )
{
FT_TRACE2(( "invalid family name offset\n" ));
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Fail;
}
family_size = font->header.file_size - font->header.face_name_offset;
@@ -909,7 +912,7 @@
header->ascent ) * 64;
size->metrics.max_advance = header->max_width * 64;
- return FNT_Err_Ok;
+ return FT_Err_Ok;
}
@@ -920,7 +923,7 @@
FNT_Face face = (FNT_Face)size->face;
FT_WinFNT_Header header = &face->font->header;
FT_Bitmap_Size* bsize = size->face->available_sizes;
- FT_Error error = FNT_Err_Invalid_Pixel_Size;
+ FT_Error error = FT_ERR( Invalid_Pixel_Size );
FT_Long height;
@@ -931,16 +934,16 @@
{
case FT_SIZE_REQUEST_TYPE_NOMINAL:
if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) )
- error = FNT_Err_Ok;
+ error = FT_Err_Ok;
break;
case FT_SIZE_REQUEST_TYPE_REAL_DIM:
if ( height == header->pixel_height )
- error = FNT_Err_Ok;
+ error = FT_Err_Ok;
break;
default:
- error = FNT_Err_Unimplemented_Feature;
+ error = FT_THROW( Unimplemented_Feature );
break;
}
@@ -959,7 +962,7 @@
{
FNT_Face face = (FNT_Face)FT_SIZE_FACE( size );
FNT_Font font;
- FT_Error error = FNT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte* p;
FT_Int len;
FT_Bitmap* bitmap = &slot->bitmap;
@@ -971,32 +974,44 @@
if ( !face )
{
- error = FNT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Face_Handle );
goto Exit;
}
font = face->font;
- if ( !font ||
+ if ( !font ||
glyph_index >= (FT_UInt)( FT_FACE( face )->num_glyphs ) )
{
- error = FNT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
+ FT_TRACE1(( "FNT_Load_Glyph: glyph index %d\n", glyph_index ));
+
if ( glyph_index > 0 )
glyph_index--; /* revert to real index */
else
- glyph_index = font->header.default_char; /* the .notdef glyph */
+ glyph_index = font->header.default_char; /* the `.notdef' glyph */
new_format = FT_BOOL( font->header.version == 0x300 );
len = new_format ? 6 : 4;
- /* jump to glyph entry */
- p = font->fnt_frame + ( new_format ? 148 : 118 ) + len * glyph_index;
+ /* get glyph width and offset */
+ offset = ( new_format ? 148 : 118 ) + len * glyph_index;
+
+ if ( offset >= font->header.file_size - 2 - ( new_format ? 4 : 2 ) )
+ {
+ FT_TRACE2(( "invalid FNT offset\n" ));
+ error = FT_THROW( Invalid_File_Format );
+ goto Exit;
+ }
+
+ p = font->fnt_frame + offset;
bitmap->width = FT_NEXT_SHORT_LE( p );
+ /* jump to glyph entry */
if ( new_format )
offset = FT_NEXT_ULONG_LE( p );
else
@@ -1005,7 +1020,7 @@
if ( offset >= font->header.file_size )
{
FT_TRACE2(( "invalid FNT offset\n" ));
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1024,10 +1039,10 @@
bitmap->rows = font->header.pixel_height;
bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
- if ( offset + pitch * bitmap->rows >= font->header.file_size )
+ if ( offset + pitch * bitmap->rows > font->header.file_size )
{
FT_TRACE2(( "invalid bitmap width\n" ));
- error = FNT_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -1141,10 +1156,6 @@
0, /* FT_Slot_InitFunc */
0, /* FT_Slot_DoneFunc */
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- ft_stub_set_char_sizes,
- ft_stub_set_pixel_sizes,
-#endif
FNT_Load_Glyph,
0, /* FT_Face_GetKerningFunc */
diff --git a/vms_make.com b/vms_make.com
index 1aa83e7..8d8fdf7 100644
--- a/vms_make.com
+++ b/vms_make.com
@@ -1,6 +1,6 @@
$! make Freetype2 under OpenVMS
$!
-$! Copyright 2003, 2004, 2006, 2007 by
+$! Copyright 2003, 2004, 2006, 2007, 2013 by
$! David Turner, Robert Wilhelm, and Werner Lemberg.
$!
$! This file is part of the FreeType project, and may only be used, modified,
@@ -172,7 +172,7 @@ $ deck
all :
- define freetype [--.include.freetype]
+ define freetype [--.include]
define psaux [-.psaux]
define autofit [-.autofit]
define autohint [-.autohint]