From 379ce1d29e09709b9c05a5f2739edf0719896f20 Mon Sep 17 00:00:00 2001 From: Remy Marquis Date: Fri, 23 Jan 2015 15:47:28 +0100 Subject: [PATCH] updated to Freetype 2.5.5 --- freetype/CMakeLists.txt | 124 +- freetype/ChangeLog | 9459 +++------ freetype/ChangeLog.21 | 2 +- freetype/ChangeLog.24 | 6360 ++++++ freetype/Jamfile | 4 +- freetype/PaxHeaders.18661/CMakeLists.txt | 3 - freetype/PaxHeaders.18661/ChangeLog | 3 - freetype/PaxHeaders.18661/ChangeLog.20 | 2 - freetype/PaxHeaders.18661/ChangeLog.21 | 2 - freetype/PaxHeaders.18661/ChangeLog.22 | 2 - freetype/PaxHeaders.18661/ChangeLog.23 | 2 - freetype/PaxHeaders.18661/Jamfile | 3 - freetype/PaxHeaders.18661/Jamrules | 2 - freetype/PaxHeaders.18661/Makefile | 3 - freetype/PaxHeaders.18661/README | 3 - freetype/PaxHeaders.18661/README.git | 3 - freetype/PaxHeaders.18661/autogen.sh | 3 - freetype/PaxHeaders.18661/builds | 3 - freetype/PaxHeaders.18661/configure | 2 - freetype/PaxHeaders.18661/devel | 3 - freetype/PaxHeaders.18661/docs | 3 - freetype/PaxHeaders.18661/include | 3 - freetype/PaxHeaders.18661/modules.cfg | 3 - freetype/PaxHeaders.18661/objs | 3 - freetype/PaxHeaders.18661/src | 3 - freetype/PaxHeaders.18661/version.sed | 2 - freetype/PaxHeaders.18661/vms_make.com | 3 - freetype/README | 24 +- freetype/autogen.sh | 0 freetype/builds/PaxHeaders.18661/amiga | 3 - freetype/builds/PaxHeaders.18661/ansi | 3 - freetype/builds/PaxHeaders.18661/atari | 3 - freetype/builds/PaxHeaders.18661/beos | 3 - freetype/builds/PaxHeaders.18661/compiler | 3 - freetype/builds/PaxHeaders.18661/detect.mk | 3 - freetype/builds/PaxHeaders.18661/dos | 3 - freetype/builds/PaxHeaders.18661/exports.mk | 2 - freetype/builds/PaxHeaders.18661/freetype.mk | 3 - freetype/builds/PaxHeaders.18661/link_dos.mk | 2 - freetype/builds/PaxHeaders.18661/link_std.mk | 2 - freetype/builds/PaxHeaders.18661/mac | 3 - freetype/builds/PaxHeaders.18661/modules.mk | 2 - freetype/builds/PaxHeaders.18661/newline | 2 - freetype/builds/PaxHeaders.18661/os2 | 3 - freetype/builds/PaxHeaders.18661/symbian | 3 - freetype/builds/PaxHeaders.18661/toplevel.mk | 3 - freetype/builds/PaxHeaders.18661/unix | 3 - freetype/builds/PaxHeaders.18661/vms | 3 - freetype/builds/PaxHeaders.18661/wince | 3 - freetype/builds/PaxHeaders.18661/windows | 3 - freetype/builds/amiga/PaxHeaders.18661/README | 3 - .../builds/amiga/PaxHeaders.18661/include | 3 - .../builds/amiga/PaxHeaders.18661/makefile | 3 - .../amiga/PaxHeaders.18661/makefile.os4 | 3 - .../builds/amiga/PaxHeaders.18661/smakefile | 3 - freetype/builds/amiga/PaxHeaders.18661/src | 3 - .../amiga/include/PaxHeaders.18661/config | 3 - .../config/PaxHeaders.18661/ftconfig.h | 3 - .../config/PaxHeaders.18661/ftmodule.h | 2 - .../builds/amiga/src/PaxHeaders.18661/base | 3 - .../amiga/src/base/PaxHeaders.18661/ftdebug.c | 3 - .../src/base/PaxHeaders.18661/ftsystem.c | 2 - .../builds/ansi/PaxHeaders.18661/ansi-def.mk | 2 - freetype/builds/ansi/PaxHeaders.18661/ansi.mk | 2 - .../builds/atari/PaxHeaders.18661/ATARI.H | 2 - .../builds/atari/PaxHeaders.18661/FNames.SIC | 2 - .../atari/PaxHeaders.18661/FREETYPE.PRJ | 2 - .../builds/atari/PaxHeaders.18661/README.TXT | 2 - .../atari/PaxHeaders.18661/deflinejoiner.awk | 2 - .../atari/PaxHeaders.18661/gen-purec-patch.sh | 2 - freetype/builds/atari/gen-purec-patch.sh | 0 .../builds/beos/PaxHeaders.18661/beos-def.mk | 2 - freetype/builds/beos/PaxHeaders.18661/beos.mk | 2 - .../builds/beos/PaxHeaders.18661/detect.mk | 2 - freetype/builds/cmake/iOS.cmake | 275 + .../compiler/PaxHeaders.18661/ansi-cc.mk | 2 - .../compiler/PaxHeaders.18661/bcc-dev.mk | 2 - .../builds/compiler/PaxHeaders.18661/bcc.mk | 2 - .../builds/compiler/PaxHeaders.18661/emx.mk | 2 - .../compiler/PaxHeaders.18661/gcc-dev.mk | 2 - .../builds/compiler/PaxHeaders.18661/gcc.mk | 2 - .../compiler/PaxHeaders.18661/intelc.mk | 2 - .../compiler/PaxHeaders.18661/unix-lcc.mk | 2 - .../compiler/PaxHeaders.18661/visualage.mk | 2 - .../compiler/PaxHeaders.18661/visualc.mk | 2 - .../compiler/PaxHeaders.18661/watcom.mk | 2 - .../compiler/PaxHeaders.18661/win-lcc.mk | 2 - freetype/builds/detect.mk | 6 +- .../builds/dos/PaxHeaders.18661/detect.mk | 2 - .../builds/dos/PaxHeaders.18661/dos-def.mk | 2 - .../builds/dos/PaxHeaders.18661/dos-emx.mk | 2 - .../builds/dos/PaxHeaders.18661/dos-gcc.mk | 2 - .../builds/dos/PaxHeaders.18661/dos-wat.mk | 2 - freetype/builds/dos/detect.mk | 8 +- freetype/builds/freetype.mk | 32 +- .../FreeType.m68k_cfm.make.txt | 2 - .../FreeType.m68k_far.make.txt | 2 - .../FreeType.ppc_carbon.make.txt | 2 - .../FreeType.ppc_classic.make.txt | 2 - freetype/builds/mac/PaxHeaders.18661/README | 3 - .../builds/mac/PaxHeaders.18661/ascii2mpw.py | 2 - .../builds/mac/PaxHeaders.18661/ftlib.prj.xml | 2 - freetype/builds/mac/PaxHeaders.18661/ftmac.c | 3 - freetype/builds/mac/ascii2mpw.py | 0 freetype/builds/mac/freetype-Info.plist | 36 + freetype/builds/mac/ftmac.c | 14 +- freetype/builds/modules.mk | 4 +- .../builds/os2/PaxHeaders.18661/detect.mk | 2 - .../builds/os2/PaxHeaders.18661/os2-def.mk | 2 - .../builds/os2/PaxHeaders.18661/os2-dev.mk | 2 - .../builds/os2/PaxHeaders.18661/os2-gcc.mk | 2 - .../builds/symbian/PaxHeaders.18661/bld.inf | 3 - .../symbian/PaxHeaders.18661/freetype.mmp | 2 - freetype/builds/toplevel.mk | 12 +- .../builds/unix/PaxHeaders.18661/aclocal.m4 | 3 - .../builds/unix/PaxHeaders.18661/config.guess | 3 - .../builds/unix/PaxHeaders.18661/config.sub | 3 - .../builds/unix/PaxHeaders.18661/configure | 3 - .../builds/unix/PaxHeaders.18661/configure.ac | 3 - .../unix/PaxHeaders.18661/configure.raw | 3 - .../builds/unix/PaxHeaders.18661/detect.mk | 2 - .../unix/PaxHeaders.18661/freetype-config.in | 3 - .../builds/unix/PaxHeaders.18661/freetype2.in | 3 - .../builds/unix/PaxHeaders.18661/freetype2.m4 | 2 - .../builds/unix/PaxHeaders.18661/ft-munmap.m4 | 2 - .../builds/unix/PaxHeaders.18661/ftconfig.in | 3 - .../builds/unix/PaxHeaders.18661/ftsystem.c | 3 - .../builds/unix/PaxHeaders.18661/install-sh | 3 - .../builds/unix/PaxHeaders.18661/install.mk | 3 - .../builds/unix/PaxHeaders.18661/ltmain.sh | 3 - .../unix/PaxHeaders.18661/mkinstalldirs | 2 - .../builds/unix/PaxHeaders.18661/unix-cc.in | 2 - .../builds/unix/PaxHeaders.18661/unix-def.in | 3 - .../builds/unix/PaxHeaders.18661/unix-dev.mk | 2 - .../builds/unix/PaxHeaders.18661/unix-lcc.mk | 2 - freetype/builds/unix/PaxHeaders.18661/unix.mk | 2 - .../builds/unix/PaxHeaders.18661/unixddef.mk | 2 - freetype/builds/unix/aclocal.m4 | 2107 +- freetype/builds/unix/config.guess | 201 +- freetype/builds/unix/config.sub | 36 +- freetype/builds/unix/configure | 16900 ++++++++-------- freetype/builds/unix/configure.ac | 415 +- freetype/builds/unix/configure.raw | 413 +- freetype/builds/unix/freetype-config.in | 13 +- freetype/builds/unix/freetype2.in | 12 +- freetype/builds/unix/freetype2.m4 | 6 +- freetype/builds/unix/ftconfig.in | 251 +- freetype/builds/unix/ftsystem.c | 3 +- freetype/builds/unix/install-sh | 333 +- freetype/builds/unix/install.mk | 8 +- freetype/builds/unix/ltmain.sh | 5443 +++-- freetype/builds/unix/mkinstalldirs | 0 freetype/builds/unix/pkg.m4 | 199 + freetype/builds/unix/unix-def.in | 77 +- .../builds/vms/PaxHeaders.18661/ftconfig.h | 3 - .../builds/vms/PaxHeaders.18661/ftsystem.c | 2 - freetype/builds/vms/ftconfig.h | 244 +- .../builds/wince/PaxHeaders.18661/ftdebug.c | 3 - .../builds/wince/PaxHeaders.18661/vc2005-ce | 3 - .../builds/wince/PaxHeaders.18661/vc2008-ce | 3 - .../vc2005-ce/PaxHeaders.18661/freetype.sln | 2 - .../PaxHeaders.18661/freetype.vcproj | 3 - .../vc2005-ce/PaxHeaders.18661/index.html | 3 - .../builds/wince/vc2005-ce/freetype.vcproj | 76 +- freetype/builds/wince/vc2005-ce/index.html | 10 +- .../vc2008-ce/PaxHeaders.18661/freetype.sln | 2 - .../PaxHeaders.18661/freetype.vcproj | 3 - .../vc2008-ce/PaxHeaders.18661/index.html | 3 - .../builds/wince/vc2008-ce/freetype.vcproj | 76 +- freetype/builds/wince/vc2008-ce/index.html | 10 +- .../builds/windows/PaxHeaders.18661/detect.mk | 2 - .../builds/windows/PaxHeaders.18661/ftdebug.c | 3 - .../builds/windows/PaxHeaders.18661/vc2005 | 3 - .../builds/windows/PaxHeaders.18661/vc2008 | 3 - .../builds/windows/PaxHeaders.18661/vc2010 | 3 - .../builds/windows/PaxHeaders.18661/visualc | 3 - .../builds/windows/PaxHeaders.18661/visualce | 3 - .../windows/PaxHeaders.18661/w32-bcc.mk | 3 - .../windows/PaxHeaders.18661/w32-bccd.mk | 3 - .../windows/PaxHeaders.18661/w32-dev.mk | 3 - .../windows/PaxHeaders.18661/w32-gcc.mk | 3 - .../windows/PaxHeaders.18661/w32-icc.mk | 3 - .../windows/PaxHeaders.18661/w32-intl.mk | 3 - .../windows/PaxHeaders.18661/w32-lcc.mk | 3 - .../windows/PaxHeaders.18661/w32-mingw32.mk | 3 - .../windows/PaxHeaders.18661/w32-vcc.mk | 3 - .../windows/PaxHeaders.18661/w32-wat.mk | 3 - .../windows/PaxHeaders.18661/win32-def.mk | 3 - freetype/builds/windows/detect.mk | 13 +- .../vc2005/PaxHeaders.18661/freetype.sln | 2 - .../vc2005/PaxHeaders.18661/freetype.vcproj | 3 - .../vc2005/PaxHeaders.18661/index.html | 3 - .../builds/windows/vc2005/freetype.vcproj | 12 +- freetype/builds/windows/vc2005/index.html | 10 +- .../vc2008/PaxHeaders.18661/freetype.sln | 2 - .../vc2008/PaxHeaders.18661/freetype.vcproj | 3 - .../vc2008/PaxHeaders.18661/index.html | 3 - .../builds/windows/vc2008/freetype.vcproj | 12 +- freetype/builds/windows/vc2008/index.html | 10 +- .../vc2010/PaxHeaders.18661/freetype.sln | 3 - .../vc2010/PaxHeaders.18661/freetype.vcxproj | 3 - .../PaxHeaders.18661/freetype.vcxproj.filters | 3 - .../vc2010/PaxHeaders.18661/index.html | 3 - freetype/builds/windows/vc2010/freetype.sln | 24 +- .../builds/windows/vc2010/freetype.user.props | 68 + .../builds/windows/vc2010/freetype.vcxproj | 683 +- freetype/builds/windows/vc2010/index.html | 35 +- .../visualc/PaxHeaders.18661/freetype.dsp | 3 - .../visualc/PaxHeaders.18661/freetype.dsw | 2 - .../visualc/PaxHeaders.18661/freetype.sln | 2 - .../visualc/PaxHeaders.18661/freetype.vcproj | 3 - .../visualc/PaxHeaders.18661/index.html | 3 - freetype/builds/windows/visualc/freetype.dsp | 34 +- .../builds/windows/visualc/freetype.vcproj | 12 +- freetype/builds/windows/visualc/index.html | 10 +- .../visualce/PaxHeaders.18661/freetype.dsp | 3 - .../visualce/PaxHeaders.18661/freetype.dsw | 2 - .../visualce/PaxHeaders.18661/freetype.vcproj | 3 - .../visualce/PaxHeaders.18661/index.html | 3 - freetype/builds/windows/visualce/freetype.dsp | 34 +- .../builds/windows/visualce/freetype.vcproj | 84 +- freetype/builds/windows/visualce/index.html | 10 +- freetype/builds/windows/win32-def.mk | 4 +- freetype/configure | 0 freetype/devel/PaxHeaders.18661/ft2build.h | 3 - freetype/devel/PaxHeaders.18661/ftoption.h | 3 - freetype/devel/ftoption.h | 76 +- freetype/docs/CHANGES | 177 + freetype/docs/INSTALL.CROSS | 90 +- freetype/docs/INSTALL.GNU | 4 +- freetype/docs/INSTALL.UNIX | 21 +- freetype/docs/PaxHeaders.18661/CHANGES | 3 - freetype/docs/PaxHeaders.18661/CMAKE | 3 - freetype/docs/PaxHeaders.18661/CUSTOMIZE | 3 - freetype/docs/PaxHeaders.18661/DEBUG | 3 - freetype/docs/PaxHeaders.18661/FTL.TXT | 2 - freetype/docs/PaxHeaders.18661/GPLv2.TXT | 2 - freetype/docs/PaxHeaders.18661/INSTALL | 3 - freetype/docs/PaxHeaders.18661/INSTALL.ANY | 3 - freetype/docs/PaxHeaders.18661/INSTALL.CROSS | 2 - freetype/docs/PaxHeaders.18661/INSTALL.GNU | 3 - freetype/docs/PaxHeaders.18661/INSTALL.MAC | 2 - freetype/docs/PaxHeaders.18661/INSTALL.UNIX | 2 - freetype/docs/PaxHeaders.18661/INSTALL.VMS | 2 - freetype/docs/PaxHeaders.18661/LICENSE.TXT | 2 - freetype/docs/PaxHeaders.18661/MAKEPP | 2 - freetype/docs/PaxHeaders.18661/PROBLEMS | 2 - freetype/docs/PaxHeaders.18661/TODO | 2 - freetype/docs/PaxHeaders.18661/VERSION.DLL | 3 - freetype/docs/PaxHeaders.18661/formats.txt | 2 - freetype/docs/PaxHeaders.18661/raster.txt | 2 - freetype/docs/PaxHeaders.18661/reference | 3 - freetype/docs/PaxHeaders.18661/release | 3 - freetype/docs/VERSION.DLL | 6 +- freetype/docs/freetype-config.1 | 108 + .../docs/reference/PaxHeaders.18661/README | 2 - .../PaxHeaders.18661/ft2-auto_hinter.html | 3 - .../PaxHeaders.18661/ft2-base_interface.html | 3 - .../PaxHeaders.18661/ft2-basic_types.html | 3 - .../PaxHeaders.18661/ft2-bdf_fonts.html | 3 - .../PaxHeaders.18661/ft2-bitmap_handling.html | 3 - .../reference/PaxHeaders.18661/ft2-bzip2.html | 3 - .../PaxHeaders.18661/ft2-cache_subsystem.html | 3 - .../PaxHeaders.18661/ft2-cff_driver.html | 3 - .../PaxHeaders.18661/ft2-cid_fonts.html | 3 - .../PaxHeaders.18661/ft2-computations.html | 3 - .../PaxHeaders.18661/ft2-font_formats.html | 3 - .../PaxHeaders.18661/ft2-gasp_table.html | 3 - .../ft2-glyph_management.html | 3 - .../PaxHeaders.18661/ft2-glyph_stroker.html | 3 - .../PaxHeaders.18661/ft2-glyph_variants.html | 3 - .../PaxHeaders.18661/ft2-gx_validation.html | 3 - .../reference/PaxHeaders.18661/ft2-gzip.html | 3 - .../ft2-header_file_macros.html | 3 - .../PaxHeaders.18661/ft2-incremental.html | 3 - .../reference/PaxHeaders.18661/ft2-index.html | 3 - .../PaxHeaders.18661/ft2-lcd_filtering.html | 3 - .../PaxHeaders.18661/ft2-list_processing.html | 3 - .../reference/PaxHeaders.18661/ft2-lzw.html | 3 - .../PaxHeaders.18661/ft2-mac_specific.html | 3 - .../ft2-module_management.html | 3 - .../ft2-multiple_masters.html | 3 - .../PaxHeaders.18661/ft2-ot_validation.html | 3 - .../ft2-outline_processing.html | 3 - .../PaxHeaders.18661/ft2-pfr_fonts.html | 3 - .../PaxHeaders.18661/ft2-quick_advance.html | 3 - .../PaxHeaders.18661/ft2-raster.html | 3 - .../PaxHeaders.18661/ft2-sfnt_names.html | 3 - .../ft2-sizes_management.html | 3 - .../ft2-system_interface.html | 3 - .../reference/PaxHeaders.18661/ft2-toc.html | 3 - .../PaxHeaders.18661/ft2-truetype_engine.html | 3 - .../PaxHeaders.18661/ft2-truetype_tables.html | 3 - .../PaxHeaders.18661/ft2-tt_driver.html | 3 - .../PaxHeaders.18661/ft2-type1_tables.html | 3 - .../PaxHeaders.18661/ft2-user_allocation.html | 3 - .../PaxHeaders.18661/ft2-version.html | 3 - .../PaxHeaders.18661/ft2-winfnt_fonts.html | 3 - freetype/docs/reference/ft2-auto_hinter.html | 311 +- .../docs/reference/ft2-base_interface.html | 4985 ++--- freetype/docs/reference/ft2-basic_types.html | 1479 +- freetype/docs/reference/ft2-bdf_fonts.html | 332 +- .../docs/reference/ft2-bitmap_handling.html | 375 +- freetype/docs/reference/ft2-bzip2.html | 155 +- .../docs/reference/ft2-cache_subsystem.html | 1568 +- freetype/docs/reference/ft2-cff_driver.html | 229 +- freetype/docs/reference/ft2-cid_fonts.html | 278 +- freetype/docs/reference/ft2-computations.html | 958 +- freetype/docs/reference/ft2-font_formats.html | 149 +- freetype/docs/reference/ft2-gasp_table.html | 213 +- .../docs/reference/ft2-glyph_management.html | 665 +- .../docs/reference/ft2-glyph_stroker.html | 1127 +- .../docs/reference/ft2-glyph_variants.html | 343 +- .../docs/reference/ft2-gx_validation.html | 532 +- freetype/docs/reference/ft2-gzip.html | 215 +- .../reference/ft2-header_file_macros.html | 1013 +- .../docs/reference/ft2-header_inclusion.html | 117 + freetype/docs/reference/ft2-incremental.html | 434 +- freetype/docs/reference/ft2-index.html | 636 +- .../docs/reference/ft2-lcd_filtering.html | 255 +- .../docs/reference/ft2-list_processing.html | 616 +- freetype/docs/reference/ft2-lzw.html | 155 +- freetype/docs/reference/ft2-mac_specific.html | 430 +- .../docs/reference/ft2-module_management.html | 944 +- .../docs/reference/ft2-multiple_masters.html | 545 +- .../docs/reference/ft2-ot_validation.html | 315 +- .../reference/ft2-outline_processing.html | 1466 +- freetype/docs/reference/ft2-pfr_fonts.html | 268 +- .../docs/reference/ft2-quick_advance.html | 258 +- freetype/docs/reference/ft2-raster.html | 718 +- freetype/docs/reference/ft2-sfnt_names.html | 292 +- .../docs/reference/ft2-sizes_management.html | 234 +- .../docs/reference/ft2-system_interface.html | 458 +- freetype/docs/reference/ft2-toc.html | 283 +- .../docs/reference/ft2-truetype_engine.html | 200 +- .../docs/reference/ft2-truetype_tables.html | 1453 +- freetype/docs/reference/ft2-tt_driver.html | 189 +- freetype/docs/reference/ft2-type1_tables.html | 1075 +- .../docs/reference/ft2-user_allocation.html | 109 +- freetype/docs/reference/ft2-version.html | 321 +- freetype/docs/reference/ft2-winfnt_fonts.html | 310 +- freetype/docs/release | 5 +- freetype/include/PaxHeaders.18661/config | 3 - freetype/include/PaxHeaders.18661/freetype.h | 3 - freetype/include/PaxHeaders.18661/ft2build.h | 3 - freetype/include/PaxHeaders.18661/ftadvanc.h | 3 - freetype/include/PaxHeaders.18661/ftautoh.h | 3 - freetype/include/PaxHeaders.18661/ftbbox.h | 3 - freetype/include/PaxHeaders.18661/ftbdf.h | 2 - freetype/include/PaxHeaders.18661/ftbitmap.h | 2 - freetype/include/PaxHeaders.18661/ftbzip2.h | 2 - freetype/include/PaxHeaders.18661/ftcache.h | 3 - freetype/include/PaxHeaders.18661/ftcffdrv.h | 3 - .../include/PaxHeaders.18661/ftchapters.h | 3 - freetype/include/PaxHeaders.18661/ftcid.h | 2 - freetype/include/PaxHeaders.18661/fterrdef.h | 2 - freetype/include/PaxHeaders.18661/fterrors.h | 2 - freetype/include/PaxHeaders.18661/ftgasp.h | 2 - freetype/include/PaxHeaders.18661/ftglyph.h | 3 - freetype/include/PaxHeaders.18661/ftgxval.h | 3 - freetype/include/PaxHeaders.18661/ftgzip.h | 3 - freetype/include/PaxHeaders.18661/ftimage.h | 3 - freetype/include/PaxHeaders.18661/ftincrem.h | 2 - freetype/include/PaxHeaders.18661/ftlcdfil.h | 3 - freetype/include/PaxHeaders.18661/ftlist.h | 3 - freetype/include/PaxHeaders.18661/ftlzw.h | 2 - freetype/include/PaxHeaders.18661/ftmac.h | 3 - freetype/include/PaxHeaders.18661/ftmm.h | 3 - freetype/include/PaxHeaders.18661/ftmodapi.h | 3 - freetype/include/PaxHeaders.18661/ftmoderr.h | 2 - freetype/include/PaxHeaders.18661/ftotval.h | 3 - freetype/include/PaxHeaders.18661/ftoutln.h | 3 - freetype/include/PaxHeaders.18661/ftpfr.h | 2 - freetype/include/PaxHeaders.18661/ftrender.h | 2 - freetype/include/PaxHeaders.18661/ftsizes.h | 3 - freetype/include/PaxHeaders.18661/ftsnames.h | 3 - freetype/include/PaxHeaders.18661/ftstroke.h | 2 - freetype/include/PaxHeaders.18661/ftsynth.h | 3 - freetype/include/PaxHeaders.18661/ftsystem.h | 2 - freetype/include/PaxHeaders.18661/fttrigon.h | 2 - freetype/include/PaxHeaders.18661/ftttdrv.h | 3 - freetype/include/PaxHeaders.18661/fttypes.h | 3 - freetype/include/PaxHeaders.18661/ftwinfnt.h | 2 - freetype/include/PaxHeaders.18661/ftxf86.h | 3 - freetype/include/PaxHeaders.18661/internal | 3 - freetype/include/PaxHeaders.18661/t1tables.h | 2 - freetype/include/PaxHeaders.18661/ttnameid.h | 3 - freetype/include/PaxHeaders.18661/tttables.h | 3 - freetype/include/PaxHeaders.18661/tttags.h | 3 - freetype/include/PaxHeaders.18661/ttunpat.h | 2 - .../config/PaxHeaders.18661/ftconfig.h | 3 - .../config/PaxHeaders.18661/ftheader.h | 3 - .../config/PaxHeaders.18661/ftmodule.h | 2 - .../config/PaxHeaders.18661/ftoption.h | 3 - .../config/PaxHeaders.18661/ftstdlib.h | 2 - freetype/include/config/ftconfig.h | 248 +- freetype/include/config/ftoption.h | 76 +- freetype/include/freetype.h | 294 +- freetype/include/ftadvanc.h | 9 +- freetype/include/ftautoh.h | 69 +- freetype/include/ftbbox.h | 1 - freetype/include/ftbdf.h | 9 +- freetype/include/ftbitmap.h | 9 +- freetype/include/ftbzip2.h | 2 +- freetype/include/ftcache.h | 8 +- freetype/include/ftcffdrv.h | 18 +- freetype/include/ftchapters.h | 1 + freetype/include/ftcid.h | 3 +- freetype/include/fterrdef.h | 182 +- freetype/include/ftgasp.h | 3 +- freetype/include/ftglyph.h | 21 +- freetype/include/ftgxval.h | 25 +- freetype/include/ftgzip.h | 3 +- freetype/include/ftimage.h | 204 +- freetype/include/ftincrem.h | 5 +- freetype/include/ftlcdfil.h | 4 +- freetype/include/ftlist.h | 5 +- freetype/include/ftlzw.h | 2 +- freetype/include/ftmm.h | 4 - freetype/include/ftmodapi.h | 30 +- freetype/include/ftotval.h | 15 +- freetype/include/ftoutln.h | 23 +- freetype/include/ftpfr.h | 2 +- freetype/include/ftrender.h | 1 - freetype/include/ftstroke.h | 44 +- freetype/include/ftsynth.h | 1 + freetype/include/ftsystem.h | 12 +- freetype/include/fttrigon.h | 4 +- freetype/include/ftttdrv.h | 22 +- freetype/include/fttypes.h | 8 +- freetype/include/ftwinfnt.h | 2 +- freetype/include/ftxf86.h | 3 +- .../internal/PaxHeaders.18661/autohint.h | 2 - .../internal/PaxHeaders.18661/ftcalc.h | 3 - .../internal/PaxHeaders.18661/ftdebug.h | 2 - .../internal/PaxHeaders.18661/ftdriver.h | 2 - .../internal/PaxHeaders.18661/ftgloadr.h | 2 - .../internal/PaxHeaders.18661/ftmemory.h | 2 - .../internal/PaxHeaders.18661/ftobjs.h | 2 - .../include/internal/PaxHeaders.18661/ftpic.h | 2 - .../internal/PaxHeaders.18661/ftrfork.h | 2 - .../internal/PaxHeaders.18661/ftserv.h | 3 - .../internal/PaxHeaders.18661/ftstream.h | 2 - .../internal/PaxHeaders.18661/fttrace.h | 2 - .../internal/PaxHeaders.18661/ftvalid.h | 2 - .../internal/PaxHeaders.18661/internal.h | 3 - .../include/internal/PaxHeaders.18661/psaux.h | 2 - .../internal/PaxHeaders.18661/pshints.h | 2 - .../internal/PaxHeaders.18661/services | 3 - .../include/internal/PaxHeaders.18661/sfnt.h | 2 - .../internal/PaxHeaders.18661/t1types.h | 2 - .../internal/PaxHeaders.18661/tttypes.h | 3 - freetype/include/internal/ftcalc.h | 291 +- freetype/include/internal/ftgloadr.h | 26 +- freetype/include/internal/ftobjs.h | 18 +- freetype/include/internal/ftrfork.h | 12 +- freetype/include/internal/fttrace.h | 4 +- freetype/include/internal/ftvalid.h | 24 +- freetype/include/internal/pshints.h | 4 +- .../services/PaxHeaders.18661/svbdf.h | 2 - .../services/PaxHeaders.18661/svcid.h | 2 - .../services/PaxHeaders.18661/svgldict.h | 2 - .../services/PaxHeaders.18661/svgxval.h | 2 - .../services/PaxHeaders.18661/svkern.h | 2 - .../internal/services/PaxHeaders.18661/svmm.h | 2 - .../services/PaxHeaders.18661/svotval.h | 2 - .../services/PaxHeaders.18661/svpfr.h | 2 - .../services/PaxHeaders.18661/svpostnm.h | 2 - .../services/PaxHeaders.18661/svprop.h | 2 - .../services/PaxHeaders.18661/svpscmap.h | 2 - .../services/PaxHeaders.18661/svpsinfo.h | 2 - .../services/PaxHeaders.18661/svsfnt.h | 2 - .../services/PaxHeaders.18661/svttcmap.h | 3 - .../services/PaxHeaders.18661/svtteng.h | 2 - .../services/PaxHeaders.18661/svttglyf.h | 2 - .../services/PaxHeaders.18661/svwinfnt.h | 2 - .../services/PaxHeaders.18661/svxf86nm.h | 2 - freetype/include/internal/sfnt.h | 16 +- freetype/include/internal/tttypes.h | 1 - freetype/include/t1tables.h | 120 +- freetype/include/ttnameid.h | 230 +- freetype/include/tttables.h | 64 +- freetype/include/ttunpat.h | 3 +- freetype/objs/PaxHeaders.18661/README | 2 - freetype/src/PaxHeaders.18661/Jamfile | 3 - freetype/src/PaxHeaders.18661/autofit | 3 - freetype/src/PaxHeaders.18661/base | 3 - freetype/src/PaxHeaders.18661/bdf | 3 - freetype/src/PaxHeaders.18661/bzip2 | 3 - freetype/src/PaxHeaders.18661/cache | 3 - freetype/src/PaxHeaders.18661/cff | 3 - freetype/src/PaxHeaders.18661/cid | 3 - freetype/src/PaxHeaders.18661/gxvalid | 3 - freetype/src/PaxHeaders.18661/gzip | 3 - freetype/src/PaxHeaders.18661/lzw | 3 - freetype/src/PaxHeaders.18661/otvalid | 3 - freetype/src/PaxHeaders.18661/pcf | 3 - freetype/src/PaxHeaders.18661/pfr | 3 - freetype/src/PaxHeaders.18661/psaux | 3 - freetype/src/PaxHeaders.18661/pshinter | 3 - freetype/src/PaxHeaders.18661/psnames | 3 - freetype/src/PaxHeaders.18661/raster | 3 - freetype/src/PaxHeaders.18661/sfnt | 3 - freetype/src/PaxHeaders.18661/smooth | 3 - freetype/src/PaxHeaders.18661/tools | 3 - freetype/src/PaxHeaders.18661/truetype | 3 - freetype/src/PaxHeaders.18661/type1 | 3 - freetype/src/PaxHeaders.18661/type42 | 3 - freetype/src/PaxHeaders.18661/winfonts | 3 - freetype/src/autofit/PaxHeaders.18661/Jamfile | 2 - .../src/autofit/PaxHeaders.18661/afangles.c | 2 - .../src/autofit/PaxHeaders.18661/afangles.h | 2 - .../src/autofit/PaxHeaders.18661/afblue.c | 3 - .../src/autofit/PaxHeaders.18661/afblue.cin | 3 - .../src/autofit/PaxHeaders.18661/afblue.dat | 3 - .../src/autofit/PaxHeaders.18661/afblue.h | 3 - .../src/autofit/PaxHeaders.18661/afblue.hin | 3 - freetype/src/autofit/PaxHeaders.18661/afcjk.c | 3 - freetype/src/autofit/PaxHeaders.18661/afcjk.h | 3 - .../src/autofit/PaxHeaders.18661/afdummy.c | 3 - .../src/autofit/PaxHeaders.18661/afdummy.h | 3 - .../src/autofit/PaxHeaders.18661/aferrors.h | 2 - .../src/autofit/PaxHeaders.18661/afglobal.c | 3 - .../src/autofit/PaxHeaders.18661/afglobal.h | 3 - .../src/autofit/PaxHeaders.18661/afhints.c | 3 - .../src/autofit/PaxHeaders.18661/afhints.h | 3 - .../src/autofit/PaxHeaders.18661/afindic.c | 3 - .../src/autofit/PaxHeaders.18661/afindic.h | 3 - .../src/autofit/PaxHeaders.18661/aflatin.c | 3 - .../src/autofit/PaxHeaders.18661/aflatin.h | 3 - .../src/autofit/PaxHeaders.18661/aflatin2.c | 3 - .../src/autofit/PaxHeaders.18661/aflatin2.h | 3 - .../src/autofit/PaxHeaders.18661/afloader.c | 3 - .../src/autofit/PaxHeaders.18661/afloader.h | 2 - .../src/autofit/PaxHeaders.18661/afmodule.c | 2 - .../src/autofit/PaxHeaders.18661/afmodule.h | 2 - freetype/src/autofit/PaxHeaders.18661/afpic.c | 3 - freetype/src/autofit/PaxHeaders.18661/afpic.h | 3 - .../src/autofit/PaxHeaders.18661/afscript.h | 3 - .../src/autofit/PaxHeaders.18661/aftypes.h | 3 - .../src/autofit/PaxHeaders.18661/afwarp.c | 2 - .../src/autofit/PaxHeaders.18661/afwarp.h | 2 - .../src/autofit/PaxHeaders.18661/afwrtsys.h | 3 - .../src/autofit/PaxHeaders.18661/autofit.c | 3 - .../src/autofit/PaxHeaders.18661/module.mk | 2 - .../src/autofit/PaxHeaders.18661/rules.mk | 3 - freetype/src/autofit/afangles.c | 60 - freetype/src/autofit/afblue.c | 113 +- freetype/src/autofit/afblue.cin | 2 +- freetype/src/autofit/afblue.dat | 257 +- freetype/src/autofit/afblue.h | 104 +- freetype/src/autofit/afblue.hin | 16 +- freetype/src/autofit/afcjk.c | 262 +- freetype/src/autofit/afcjk.h | 17 +- freetype/src/autofit/afcover.h | 105 + freetype/src/autofit/afdummy.c | 28 +- freetype/src/autofit/afdummy.h | 6 +- freetype/src/autofit/afglobal.c | 302 +- freetype/src/autofit/afglobal.h | 66 +- freetype/src/autofit/afhints.c | 499 +- freetype/src/autofit/afhints.h | 97 +- freetype/src/autofit/afindic.c | 55 +- freetype/src/autofit/afindic.h | 8 +- freetype/src/autofit/aflatin.c | 452 +- freetype/src/autofit/aflatin.h | 43 +- freetype/src/autofit/aflatin2.c | 83 +- freetype/src/autofit/aflatin2.h | 14 +- freetype/src/autofit/afloader.c | 53 +- freetype/src/autofit/afloader.h | 4 +- freetype/src/autofit/afmodule.c | 75 +- freetype/src/autofit/afmodule.h | 5 +- freetype/src/autofit/afpic.c | 28 +- freetype/src/autofit/afpic.h | 16 +- freetype/src/autofit/afranges.c | 220 + freetype/src/autofit/afranges.h | 41 + freetype/src/autofit/afscript.h | 126 +- freetype/src/autofit/afstyles.h | 164 + freetype/src/autofit/aftypes.h | 310 +- freetype/src/autofit/afwrtsys.h | 3 +- freetype/src/autofit/autofit.c | 4 + freetype/src/autofit/hbshim.c | 545 + freetype/src/autofit/hbshim.h | 56 + freetype/src/autofit/rules.mk | 6 +- freetype/src/base/PaxHeaders.18661/Jamfile | 2 - freetype/src/base/PaxHeaders.18661/basepic.c | 2 - freetype/src/base/PaxHeaders.18661/basepic.h | 2 - freetype/src/base/PaxHeaders.18661/ftadvanc.c | 2 - freetype/src/base/PaxHeaders.18661/ftapi.c | 2 - freetype/src/base/PaxHeaders.18661/ftbase.c | 2 - freetype/src/base/PaxHeaders.18661/ftbase.h | 2 - freetype/src/base/PaxHeaders.18661/ftbbox.c | 3 - freetype/src/base/PaxHeaders.18661/ftbdf.c | 2 - freetype/src/base/PaxHeaders.18661/ftbitmap.c | 3 - freetype/src/base/PaxHeaders.18661/ftcalc.c | 3 - freetype/src/base/PaxHeaders.18661/ftcid.c | 2 - freetype/src/base/PaxHeaders.18661/ftdbgmem.c | 2 - freetype/src/base/PaxHeaders.18661/ftdebug.c | 3 - freetype/src/base/PaxHeaders.18661/ftfstype.c | 2 - freetype/src/base/PaxHeaders.18661/ftgasp.c | 2 - freetype/src/base/PaxHeaders.18661/ftgloadr.c | 2 - freetype/src/base/PaxHeaders.18661/ftglyph.c | 3 - freetype/src/base/PaxHeaders.18661/ftgxval.c | 2 - freetype/src/base/PaxHeaders.18661/ftinit.c | 3 - freetype/src/base/PaxHeaders.18661/ftlcdfil.c | 2 - freetype/src/base/PaxHeaders.18661/ftmac.c | 3 - freetype/src/base/PaxHeaders.18661/ftmm.c | 2 - freetype/src/base/PaxHeaders.18661/ftobjs.c | 3 - freetype/src/base/PaxHeaders.18661/ftotval.c | 2 - freetype/src/base/PaxHeaders.18661/ftoutln.c | 3 - freetype/src/base/PaxHeaders.18661/ftpatent.c | 2 - freetype/src/base/PaxHeaders.18661/ftpfr.c | 2 - freetype/src/base/PaxHeaders.18661/ftpic.c | 3 - freetype/src/base/PaxHeaders.18661/ftrfork.c | 2 - freetype/src/base/PaxHeaders.18661/ftsnames.c | 2 - freetype/src/base/PaxHeaders.18661/ftstream.c | 2 - freetype/src/base/PaxHeaders.18661/ftstroke.c | 2 - freetype/src/base/PaxHeaders.18661/ftsynth.c | 3 - freetype/src/base/PaxHeaders.18661/ftsystem.c | 2 - freetype/src/base/PaxHeaders.18661/fttrigon.c | 2 - freetype/src/base/PaxHeaders.18661/fttype1.c | 2 - freetype/src/base/PaxHeaders.18661/ftutil.c | 2 - freetype/src/base/PaxHeaders.18661/ftwinfnt.c | 2 - freetype/src/base/PaxHeaders.18661/ftxf86.c | 2 - freetype/src/base/PaxHeaders.18661/md5.c | 2 - freetype/src/base/PaxHeaders.18661/md5.h | 2 - freetype/src/base/PaxHeaders.18661/rules.mk | 3 - freetype/src/base/basepic.c | 6 +- freetype/src/base/ftadvanc.c | 8 +- freetype/src/base/ftbbox.c | 223 +- freetype/src/base/ftbdf.c | 47 +- freetype/src/base/ftbitmap.c | 228 +- freetype/src/base/ftcalc.c | 489 +- freetype/src/base/ftfstype.c | 4 +- freetype/src/base/ftglyph.c | 10 +- freetype/src/base/ftgxval.c | 6 +- freetype/src/base/ftinit.c | 22 +- freetype/src/base/ftlcdfil.c | 46 +- freetype/src/base/ftmac.c | 25 +- freetype/src/base/ftmm.c | 32 +- freetype/src/base/ftobjs.c | 289 +- freetype/src/base/ftoutln.c | 62 +- freetype/src/base/ftpfr.c | 15 +- freetype/src/base/ftrfork.c | 34 +- freetype/src/base/ftstream.c | 5 +- freetype/src/base/ftstroke.c | 87 +- freetype/src/base/ftsynth.c | 25 +- freetype/src/base/fttrigon.c | 100 +- freetype/src/base/fttype1.c | 45 +- freetype/src/base/ftutil.c | 63 +- freetype/src/base/ftwinfnt.c | 22 +- freetype/src/base/rules.mk | 9 +- freetype/src/bdf/PaxHeaders.18661/Jamfile | 2 - freetype/src/bdf/PaxHeaders.18661/README | 2 - freetype/src/bdf/PaxHeaders.18661/bdf.c | 2 - freetype/src/bdf/PaxHeaders.18661/bdf.h | 2 - freetype/src/bdf/PaxHeaders.18661/bdfdrivr.c | 3 - freetype/src/bdf/PaxHeaders.18661/bdfdrivr.h | 2 - freetype/src/bdf/PaxHeaders.18661/bdferror.h | 2 - freetype/src/bdf/PaxHeaders.18661/bdflib.c | 2 - freetype/src/bdf/PaxHeaders.18661/module.mk | 2 - freetype/src/bdf/PaxHeaders.18661/rules.mk | 2 - freetype/src/bdf/bdfdrivr.c | 23 +- freetype/src/bdf/bdflib.c | 94 +- freetype/src/bzip2/PaxHeaders.18661/Jamfile | 2 - freetype/src/bzip2/PaxHeaders.18661/ftbzip2.c | 2 - freetype/src/bzip2/PaxHeaders.18661/rules.mk | 2 - freetype/src/bzip2/ftbzip2.c | 14 +- freetype/src/cache/PaxHeaders.18661/Jamfile | 3 - freetype/src/cache/PaxHeaders.18661/ftcache.c | 2 - .../src/cache/PaxHeaders.18661/ftcbasic.c | 2 - .../src/cache/PaxHeaders.18661/ftccache.c | 2 - .../src/cache/PaxHeaders.18661/ftccache.h | 2 - .../src/cache/PaxHeaders.18661/ftccback.h | 2 - freetype/src/cache/PaxHeaders.18661/ftccmap.c | 2 - .../src/cache/PaxHeaders.18661/ftcerror.h | 2 - .../src/cache/PaxHeaders.18661/ftcglyph.c | 2 - .../src/cache/PaxHeaders.18661/ftcglyph.h | 2 - .../src/cache/PaxHeaders.18661/ftcimage.c | 2 - .../src/cache/PaxHeaders.18661/ftcimage.h | 2 - .../src/cache/PaxHeaders.18661/ftcmanag.c | 2 - .../src/cache/PaxHeaders.18661/ftcmanag.h | 2 - freetype/src/cache/PaxHeaders.18661/ftcmru.c | 2 - freetype/src/cache/PaxHeaders.18661/ftcmru.h | 2 - .../src/cache/PaxHeaders.18661/ftcsbits.c | 2 - .../src/cache/PaxHeaders.18661/ftcsbits.h | 2 - freetype/src/cache/PaxHeaders.18661/rules.mk | 2 - freetype/src/cache/ftcbasic.c | 81 +- freetype/src/cache/ftccmap.c | 13 +- freetype/src/cache/ftcmanag.c | 31 +- freetype/src/cache/ftcsbits.c | 8 +- freetype/src/cff/PaxHeaders.18661/Jamfile | 2 - freetype/src/cff/PaxHeaders.18661/cf2arrst.c | 2 - freetype/src/cff/PaxHeaders.18661/cf2arrst.h | 2 - freetype/src/cff/PaxHeaders.18661/cf2blues.c | 3 - freetype/src/cff/PaxHeaders.18661/cf2blues.h | 2 - freetype/src/cff/PaxHeaders.18661/cf2error.c | 2 - freetype/src/cff/PaxHeaders.18661/cf2error.h | 2 - freetype/src/cff/PaxHeaders.18661/cf2fixed.h | 2 - freetype/src/cff/PaxHeaders.18661/cf2font.c | 3 - freetype/src/cff/PaxHeaders.18661/cf2font.h | 2 - freetype/src/cff/PaxHeaders.18661/cf2ft.c | 2 - freetype/src/cff/PaxHeaders.18661/cf2ft.h | 2 - freetype/src/cff/PaxHeaders.18661/cf2glue.h | 2 - freetype/src/cff/PaxHeaders.18661/cf2hints.c | 3 - freetype/src/cff/PaxHeaders.18661/cf2hints.h | 3 - freetype/src/cff/PaxHeaders.18661/cf2intrp.c | 2 - freetype/src/cff/PaxHeaders.18661/cf2intrp.h | 2 - freetype/src/cff/PaxHeaders.18661/cf2read.c | 2 - freetype/src/cff/PaxHeaders.18661/cf2read.h | 2 - freetype/src/cff/PaxHeaders.18661/cf2stack.c | 2 - freetype/src/cff/PaxHeaders.18661/cf2stack.h | 2 - freetype/src/cff/PaxHeaders.18661/cf2types.h | 2 - freetype/src/cff/PaxHeaders.18661/cff.c | 2 - freetype/src/cff/PaxHeaders.18661/cffcmap.c | 2 - freetype/src/cff/PaxHeaders.18661/cffcmap.h | 2 - freetype/src/cff/PaxHeaders.18661/cffdrivr.c | 3 - freetype/src/cff/PaxHeaders.18661/cffdrivr.h | 2 - freetype/src/cff/PaxHeaders.18661/cfferrs.h | 2 - freetype/src/cff/PaxHeaders.18661/cffgload.c | 3 - freetype/src/cff/PaxHeaders.18661/cffgload.h | 2 - freetype/src/cff/PaxHeaders.18661/cffload.c | 3 - freetype/src/cff/PaxHeaders.18661/cffload.h | 2 - freetype/src/cff/PaxHeaders.18661/cffobjs.c | 2 - freetype/src/cff/PaxHeaders.18661/cffobjs.h | 2 - freetype/src/cff/PaxHeaders.18661/cffparse.c | 2 - freetype/src/cff/PaxHeaders.18661/cffparse.h | 2 - freetype/src/cff/PaxHeaders.18661/cffpic.c | 2 - freetype/src/cff/PaxHeaders.18661/cffpic.h | 2 - freetype/src/cff/PaxHeaders.18661/cfftoken.h | 2 - freetype/src/cff/PaxHeaders.18661/cfftypes.h | 2 - freetype/src/cff/PaxHeaders.18661/module.mk | 2 - freetype/src/cff/PaxHeaders.18661/rules.mk | 2 - freetype/src/cff/cf2blues.c | 11 +- freetype/src/cff/cf2font.c | 62 +- freetype/src/cff/cf2ft.c | 87 +- freetype/src/cff/cf2hints.c | 21 +- freetype/src/cff/cf2intrp.c | 21 +- freetype/src/cff/cffcmap.c | 10 +- freetype/src/cff/cffdrivr.c | 4 +- freetype/src/cff/cffgload.c | 41 +- freetype/src/cff/cffload.c | 15 +- freetype/src/cff/cffobjs.c | 46 +- freetype/src/cff/cffparse.c | 8 +- freetype/src/cid/PaxHeaders.18661/Jamfile | 2 - freetype/src/cid/PaxHeaders.18661/ciderrs.h | 2 - freetype/src/cid/PaxHeaders.18661/cidgload.c | 3 - freetype/src/cid/PaxHeaders.18661/cidgload.h | 2 - freetype/src/cid/PaxHeaders.18661/cidload.c | 3 - freetype/src/cid/PaxHeaders.18661/cidload.h | 2 - freetype/src/cid/PaxHeaders.18661/cidobjs.c | 2 - freetype/src/cid/PaxHeaders.18661/cidobjs.h | 2 - freetype/src/cid/PaxHeaders.18661/cidparse.c | 2 - freetype/src/cid/PaxHeaders.18661/cidparse.h | 2 - freetype/src/cid/PaxHeaders.18661/cidriver.c | 2 - freetype/src/cid/PaxHeaders.18661/cidriver.h | 2 - freetype/src/cid/PaxHeaders.18661/cidtoken.h | 2 - freetype/src/cid/PaxHeaders.18661/module.mk | 2 - freetype/src/cid/PaxHeaders.18661/rules.mk | 2 - freetype/src/cid/PaxHeaders.18661/type1cid.c | 2 - freetype/src/cid/cidload.c | 19 +- freetype/src/cid/cidobjs.c | 7 +- freetype/src/cid/cidparse.c | 4 +- freetype/src/cid/cidparse.h | 22 +- freetype/src/gxvalid/PaxHeaders.18661/Jamfile | 2 - freetype/src/gxvalid/PaxHeaders.18661/README | 2 - .../src/gxvalid/PaxHeaders.18661/gxvalid.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvalid.h | 2 - .../src/gxvalid/PaxHeaders.18661/gxvbsln.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvcommn.c | 3 - .../src/gxvalid/PaxHeaders.18661/gxvcommn.h | 3 - .../src/gxvalid/PaxHeaders.18661/gxverror.h | 2 - .../src/gxvalid/PaxHeaders.18661/gxvfeat.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvfeat.h | 2 - .../src/gxvalid/PaxHeaders.18661/gxvfgen.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvjust.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvkern.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvlcar.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmod.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmod.h | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmort.c | 3 - .../src/gxvalid/PaxHeaders.18661/gxvmort.h | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmort0.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmort1.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmort2.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmort4.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmort5.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmorx.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmorx.h | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmorx0.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmorx1.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmorx2.c | 3 - .../src/gxvalid/PaxHeaders.18661/gxvmorx4.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvmorx5.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvopbd.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvprop.c | 2 - .../src/gxvalid/PaxHeaders.18661/gxvtrak.c | 2 - .../src/gxvalid/PaxHeaders.18661/module.mk | 2 - .../src/gxvalid/PaxHeaders.18661/rules.mk | 2 - freetype/src/gxvalid/gxvbsln.c | 56 +- freetype/src/gxvalid/gxvcommn.c | 274 +- freetype/src/gxvalid/gxvcommn.h | 78 +- freetype/src/gxvalid/gxvfeat.c | 38 +- freetype/src/gxvalid/gxvjust.c | 188 +- freetype/src/gxvalid/gxvkern.c | 152 +- freetype/src/gxvalid/gxvlcar.c | 36 +- freetype/src/gxvalid/gxvmort.c | 44 +- freetype/src/gxvalid/gxvmort.h | 14 +- freetype/src/gxvalid/gxvmort0.c | 16 +- freetype/src/gxvalid/gxvmort1.c | 54 +- freetype/src/gxvalid/gxvmort2.c | 46 +- freetype/src/gxvalid/gxvmort4.c | 18 +- freetype/src/gxvalid/gxvmort5.c | 30 +- freetype/src/gxvalid/gxvmorx.c | 30 +- freetype/src/gxvalid/gxvmorx.h | 10 +- freetype/src/gxvalid/gxvmorx0.c | 16 +- freetype/src/gxvalid/gxvmorx1.c | 50 +- freetype/src/gxvalid/gxvmorx2.c | 48 +- freetype/src/gxvalid/gxvmorx4.c | 4 +- freetype/src/gxvalid/gxvmorx5.c | 34 +- freetype/src/gxvalid/gxvopbd.c | 32 +- freetype/src/gxvalid/gxvprop.c | 38 +- freetype/src/gxvalid/gxvtrak.c | 46 +- freetype/src/gzip/PaxHeaders.18661/Jamfile | 2 - freetype/src/gzip/PaxHeaders.18661/adler32.c | 2 - freetype/src/gzip/PaxHeaders.18661/ftgzip.c | 3 - freetype/src/gzip/PaxHeaders.18661/infblock.c | 2 - freetype/src/gzip/PaxHeaders.18661/infblock.h | 2 - freetype/src/gzip/PaxHeaders.18661/infcodes.c | 2 - freetype/src/gzip/PaxHeaders.18661/infcodes.h | 2 - freetype/src/gzip/PaxHeaders.18661/inffixed.h | 2 - freetype/src/gzip/PaxHeaders.18661/inflate.c | 3 - freetype/src/gzip/PaxHeaders.18661/inftrees.c | 2 - freetype/src/gzip/PaxHeaders.18661/inftrees.h | 2 - freetype/src/gzip/PaxHeaders.18661/infutil.c | 2 - freetype/src/gzip/PaxHeaders.18661/infutil.h | 2 - freetype/src/gzip/PaxHeaders.18661/rules.mk | 3 - freetype/src/gzip/PaxHeaders.18661/zconf.h | 2 - freetype/src/gzip/PaxHeaders.18661/zlib.h | 3 - freetype/src/gzip/PaxHeaders.18661/zutil.c | 2 - freetype/src/gzip/PaxHeaders.18661/zutil.h | 2 - freetype/src/gzip/ftgzip.c | 21 +- freetype/src/gzip/inftrees.c | 10 +- freetype/src/lzw/PaxHeaders.18661/Jamfile | 2 - freetype/src/lzw/PaxHeaders.18661/ftlzw.c | 2 - freetype/src/lzw/PaxHeaders.18661/ftzopen.c | 2 - freetype/src/lzw/PaxHeaders.18661/ftzopen.h | 2 - freetype/src/lzw/PaxHeaders.18661/rules.mk | 2 - freetype/src/lzw/ftlzw.c | 16 +- freetype/src/lzw/ftzopen.h | 2 +- freetype/src/otvalid/PaxHeaders.18661/Jamfile | 2 - .../src/otvalid/PaxHeaders.18661/module.mk | 2 - .../src/otvalid/PaxHeaders.18661/otvalid.c | 2 - .../src/otvalid/PaxHeaders.18661/otvalid.h | 2 - .../src/otvalid/PaxHeaders.18661/otvbase.c | 2 - .../src/otvalid/PaxHeaders.18661/otvcommn.c | 2 - .../src/otvalid/PaxHeaders.18661/otvcommn.h | 2 - .../src/otvalid/PaxHeaders.18661/otverror.h | 2 - .../src/otvalid/PaxHeaders.18661/otvgdef.c | 2 - .../src/otvalid/PaxHeaders.18661/otvgpos.c | 2 - .../src/otvalid/PaxHeaders.18661/otvgpos.h | 2 - .../src/otvalid/PaxHeaders.18661/otvgsub.c | 2 - .../src/otvalid/PaxHeaders.18661/otvjstf.c | 2 - .../src/otvalid/PaxHeaders.18661/otvmath.c | 2 - .../src/otvalid/PaxHeaders.18661/otvmod.c | 2 - .../src/otvalid/PaxHeaders.18661/otvmod.h | 2 - .../src/otvalid/PaxHeaders.18661/rules.mk | 2 - freetype/src/otvalid/otvbase.c | 50 +- freetype/src/otvalid/otvcommn.c | 170 +- freetype/src/otvalid/otvcommn.h | 158 +- freetype/src/otvalid/otvgdef.c | 36 +- freetype/src/otvalid/otvgpos.c | 186 +- freetype/src/otvalid/otvgsub.c | 108 +- freetype/src/otvalid/otvjstf.c | 83 +- freetype/src/otvalid/otvmath.c | 72 +- freetype/src/pcf/PaxHeaders.18661/Jamfile | 2 - freetype/src/pcf/PaxHeaders.18661/README | 2 - freetype/src/pcf/PaxHeaders.18661/module.mk | 2 - freetype/src/pcf/PaxHeaders.18661/pcf.c | 2 - freetype/src/pcf/PaxHeaders.18661/pcf.h | 2 - freetype/src/pcf/PaxHeaders.18661/pcfdrivr.c | 3 - freetype/src/pcf/PaxHeaders.18661/pcfdrivr.h | 2 - freetype/src/pcf/PaxHeaders.18661/pcferror.h | 2 - freetype/src/pcf/PaxHeaders.18661/pcfread.c | 3 - freetype/src/pcf/PaxHeaders.18661/pcfread.h | 2 - freetype/src/pcf/PaxHeaders.18661/pcfutil.c | 3 - freetype/src/pcf/PaxHeaders.18661/pcfutil.h | 2 - freetype/src/pcf/PaxHeaders.18661/rules.mk | 2 - freetype/src/pcf/pcfdrivr.c | 12 +- freetype/src/pcf/pcfread.c | 115 +- freetype/src/pfr/PaxHeaders.18661/Jamfile | 2 - freetype/src/pfr/PaxHeaders.18661/module.mk | 2 - freetype/src/pfr/PaxHeaders.18661/pfr.c | 2 - freetype/src/pfr/PaxHeaders.18661/pfrcmap.c | 3 - freetype/src/pfr/PaxHeaders.18661/pfrcmap.h | 2 - freetype/src/pfr/PaxHeaders.18661/pfrdrivr.c | 2 - freetype/src/pfr/PaxHeaders.18661/pfrdrivr.h | 2 - freetype/src/pfr/PaxHeaders.18661/pfrerror.h | 2 - freetype/src/pfr/PaxHeaders.18661/pfrgload.c | 3 - freetype/src/pfr/PaxHeaders.18661/pfrgload.h | 2 - freetype/src/pfr/PaxHeaders.18661/pfrload.c | 2 - freetype/src/pfr/PaxHeaders.18661/pfrload.h | 2 - freetype/src/pfr/PaxHeaders.18661/pfrobjs.c | 3 - freetype/src/pfr/PaxHeaders.18661/pfrobjs.h | 2 - freetype/src/pfr/PaxHeaders.18661/pfrsbit.c | 2 - freetype/src/pfr/PaxHeaders.18661/pfrsbit.h | 2 - freetype/src/pfr/PaxHeaders.18661/pfrtypes.h | 2 - freetype/src/pfr/PaxHeaders.18661/rules.mk | 2 - freetype/src/pfr/pfrcmap.c | 5 +- freetype/src/pfr/pfrdrivr.c | 6 +- freetype/src/pfr/pfrload.c | 5 +- freetype/src/pfr/pfrobjs.c | 8 +- freetype/src/pfr/pfrsbit.c | 6 +- freetype/src/psaux/PaxHeaders.18661/Jamfile | 2 - .../src/psaux/PaxHeaders.18661/afmparse.c | 2 - .../src/psaux/PaxHeaders.18661/afmparse.h | 2 - freetype/src/psaux/PaxHeaders.18661/module.mk | 2 - freetype/src/psaux/PaxHeaders.18661/psaux.c | 2 - .../src/psaux/PaxHeaders.18661/psauxerr.h | 2 - .../src/psaux/PaxHeaders.18661/psauxmod.c | 2 - .../src/psaux/PaxHeaders.18661/psauxmod.h | 2 - freetype/src/psaux/PaxHeaders.18661/psconv.c | 2 - freetype/src/psaux/PaxHeaders.18661/psconv.h | 2 - freetype/src/psaux/PaxHeaders.18661/psobjs.c | 2 - freetype/src/psaux/PaxHeaders.18661/psobjs.h | 2 - freetype/src/psaux/PaxHeaders.18661/rules.mk | 2 - freetype/src/psaux/PaxHeaders.18661/t1cmap.c | 2 - freetype/src/psaux/PaxHeaders.18661/t1cmap.h | 2 - .../src/psaux/PaxHeaders.18661/t1decode.c | 2 - .../src/psaux/PaxHeaders.18661/t1decode.h | 2 - freetype/src/psaux/psconv.c | 9 +- freetype/src/psaux/psobjs.c | 18 +- freetype/src/psaux/t1cmap.c | 22 +- freetype/src/psaux/t1decode.c | 12 +- .../src/pshinter/PaxHeaders.18661/Jamfile | 2 - .../src/pshinter/PaxHeaders.18661/module.mk | 2 - .../src/pshinter/PaxHeaders.18661/pshalgo.c | 2 - .../src/pshinter/PaxHeaders.18661/pshalgo.h | 2 - .../src/pshinter/PaxHeaders.18661/pshglob.c | 3 - .../src/pshinter/PaxHeaders.18661/pshglob.h | 2 - .../src/pshinter/PaxHeaders.18661/pshinter.c | 2 - .../src/pshinter/PaxHeaders.18661/pshmod.c | 2 - .../src/pshinter/PaxHeaders.18661/pshmod.h | 2 - .../src/pshinter/PaxHeaders.18661/pshnterr.h | 2 - .../src/pshinter/PaxHeaders.18661/pshpic.c | 2 - .../src/pshinter/PaxHeaders.18661/pshpic.h | 2 - .../src/pshinter/PaxHeaders.18661/pshrec.c | 2 - .../src/pshinter/PaxHeaders.18661/pshrec.h | 2 - .../src/pshinter/PaxHeaders.18661/rules.mk | 2 - freetype/src/pshinter/pshalgo.c | 5 +- freetype/src/pshinter/pshglob.c | 6 +- freetype/src/pshinter/pshglob.h | 4 +- freetype/src/pshinter/pshrec.c | 5 +- freetype/src/pshinter/pshrec.h | 4 +- freetype/src/psnames/PaxHeaders.18661/Jamfile | 2 - .../src/psnames/PaxHeaders.18661/module.mk | 2 - .../src/psnames/PaxHeaders.18661/psmodule.c | 2 - .../src/psnames/PaxHeaders.18661/psmodule.h | 2 - .../src/psnames/PaxHeaders.18661/psnamerr.h | 2 - .../src/psnames/PaxHeaders.18661/psnames.c | 2 - freetype/src/psnames/PaxHeaders.18661/pspic.c | 2 - freetype/src/psnames/PaxHeaders.18661/pspic.h | 2 - .../src/psnames/PaxHeaders.18661/pstables.h | 2 - .../src/psnames/PaxHeaders.18661/rules.mk | 2 - freetype/src/psnames/psmodule.c | 4 +- freetype/src/psnames/rules.mk | 4 +- freetype/src/raster/PaxHeaders.18661/Jamfile | 2 - freetype/src/raster/PaxHeaders.18661/ftmisc.h | 2 - .../src/raster/PaxHeaders.18661/ftraster.c | 3 - .../src/raster/PaxHeaders.18661/ftraster.h | 2 - .../src/raster/PaxHeaders.18661/ftrend1.c | 2 - .../src/raster/PaxHeaders.18661/ftrend1.h | 2 - .../src/raster/PaxHeaders.18661/module.mk | 2 - freetype/src/raster/PaxHeaders.18661/raster.c | 2 - .../src/raster/PaxHeaders.18661/rasterrs.h | 2 - .../src/raster/PaxHeaders.18661/rastpic.c | 2 - .../src/raster/PaxHeaders.18661/rastpic.h | 2 - freetype/src/raster/PaxHeaders.18661/rules.mk | 2 - freetype/src/raster/ftraster.c | 25 +- freetype/src/sfnt/PaxHeaders.18661/Jamfile | 2 - freetype/src/sfnt/PaxHeaders.18661/module.mk | 2 - freetype/src/sfnt/PaxHeaders.18661/pngshim.c | 3 - freetype/src/sfnt/PaxHeaders.18661/pngshim.h | 2 - freetype/src/sfnt/PaxHeaders.18661/rules.mk | 2 - freetype/src/sfnt/PaxHeaders.18661/sfdriver.c | 2 - freetype/src/sfnt/PaxHeaders.18661/sfdriver.h | 2 - freetype/src/sfnt/PaxHeaders.18661/sferrors.h | 2 - freetype/src/sfnt/PaxHeaders.18661/sfnt.c | 2 - freetype/src/sfnt/PaxHeaders.18661/sfntpic.c | 2 - freetype/src/sfnt/PaxHeaders.18661/sfntpic.h | 2 - freetype/src/sfnt/PaxHeaders.18661/sfobjs.c | 3 - freetype/src/sfnt/PaxHeaders.18661/sfobjs.h | 2 - freetype/src/sfnt/PaxHeaders.18661/ttbdf.c | 2 - freetype/src/sfnt/PaxHeaders.18661/ttbdf.h | 2 - freetype/src/sfnt/PaxHeaders.18661/ttcmap.c | 3 - freetype/src/sfnt/PaxHeaders.18661/ttcmap.h | 2 - freetype/src/sfnt/PaxHeaders.18661/ttcmapc.h | 2 - freetype/src/sfnt/PaxHeaders.18661/ttkern.c | 3 - freetype/src/sfnt/PaxHeaders.18661/ttkern.h | 2 - freetype/src/sfnt/PaxHeaders.18661/ttload.c | 3 - freetype/src/sfnt/PaxHeaders.18661/ttload.h | 2 - freetype/src/sfnt/PaxHeaders.18661/ttmtx.c | 2 - freetype/src/sfnt/PaxHeaders.18661/ttmtx.h | 2 - freetype/src/sfnt/PaxHeaders.18661/ttpost.c | 2 - freetype/src/sfnt/PaxHeaders.18661/ttpost.h | 2 - freetype/src/sfnt/PaxHeaders.18661/ttsbit.c | 3 - freetype/src/sfnt/PaxHeaders.18661/ttsbit.h | 2 - freetype/src/sfnt/pngshim.c | 22 +- freetype/src/sfnt/sfdriver.c | 28 +- freetype/src/sfnt/sfobjs.c | 63 +- freetype/src/sfnt/ttcmap.c | 117 +- freetype/src/sfnt/ttkern.c | 2 +- freetype/src/sfnt/ttload.c | 12 +- freetype/src/sfnt/ttmtx.c | 6 +- freetype/src/sfnt/ttmtx.h | 4 +- freetype/src/sfnt/ttpost.c | 12 +- freetype/src/sfnt/ttsbit.c | 95 +- freetype/src/smooth/PaxHeaders.18661/Jamfile | 2 - .../src/smooth/PaxHeaders.18661/ftgrays.c | 3 - .../src/smooth/PaxHeaders.18661/ftgrays.h | 2 - .../src/smooth/PaxHeaders.18661/ftsmerrs.h | 2 - .../src/smooth/PaxHeaders.18661/ftsmooth.c | 2 - .../src/smooth/PaxHeaders.18661/ftsmooth.h | 2 - freetype/src/smooth/PaxHeaders.18661/ftspic.c | 2 - freetype/src/smooth/PaxHeaders.18661/ftspic.h | 2 - .../src/smooth/PaxHeaders.18661/module.mk | 2 - freetype/src/smooth/PaxHeaders.18661/rules.mk | 2 - freetype/src/smooth/PaxHeaders.18661/smooth.c | 2 - freetype/src/smooth/ftgrays.c | 64 +- freetype/src/smooth/ftsmooth.c | 147 +- freetype/src/tools/PaxHeaders.18661/Jamfile | 2 - freetype/src/tools/PaxHeaders.18661/afblue.pl | 3 - .../src/tools/PaxHeaders.18661/apinames.c | 2 - .../src/tools/PaxHeaders.18661/chktrcmp.py | 3 - freetype/src/tools/PaxHeaders.18661/cordic.py | 2 - freetype/src/tools/PaxHeaders.18661/docmaker | 3 - freetype/src/tools/PaxHeaders.18661/ftrandom | 3 - .../src/tools/PaxHeaders.18661/glnames.py | 2 - .../src/tools/PaxHeaders.18661/test_afm.c | 2 - .../src/tools/PaxHeaders.18661/test_bbox.c | 2 - .../src/tools/PaxHeaders.18661/test_trig.c | 2 - freetype/src/tools/afblue.pl | 30 +- freetype/src/tools/chktrcmp.py | 0 .../docmaker/PaxHeaders.18661/content.py | 2 - .../docmaker/PaxHeaders.18661/docbeauty.py | 2 - .../docmaker/PaxHeaders.18661/docmaker.py | 2 - .../docmaker/PaxHeaders.18661/formatter.py | 2 - .../docmaker/PaxHeaders.18661/sources.py | 2 - .../tools/docmaker/PaxHeaders.18661/tohtml.py | 2 - .../tools/docmaker/PaxHeaders.18661/utils.py | 2 - freetype/src/tools/docmaker/content.py | 212 +- freetype/src/tools/docmaker/docmaker.py | 39 +- freetype/src/tools/docmaker/formatter.py | 73 +- freetype/src/tools/docmaker/sources.py | 200 +- freetype/src/tools/docmaker/tohtml.py | 451 +- freetype/src/tools/docmaker/utils.py | 81 +- .../tools/ftrandom/PaxHeaders.18661/Makefile | 2 - .../tools/ftrandom/PaxHeaders.18661/README | 2 - .../ftrandom/PaxHeaders.18661/ftrandom.c | 2 - freetype/src/tools/ftrandom/ftrandom.c | 4 +- freetype/src/tools/test_trig.c | 16 +- .../src/truetype/PaxHeaders.18661/Jamfile | 2 - .../src/truetype/PaxHeaders.18661/module.mk | 2 - .../src/truetype/PaxHeaders.18661/rules.mk | 2 - .../src/truetype/PaxHeaders.18661/truetype.c | 2 - .../src/truetype/PaxHeaders.18661/ttdriver.c | 3 - .../src/truetype/PaxHeaders.18661/ttdriver.h | 2 - .../src/truetype/PaxHeaders.18661/tterrors.h | 2 - .../src/truetype/PaxHeaders.18661/ttgload.c | 3 - .../src/truetype/PaxHeaders.18661/ttgload.h | 3 - .../src/truetype/PaxHeaders.18661/ttgxvar.c | 2 - .../src/truetype/PaxHeaders.18661/ttgxvar.h | 2 - .../src/truetype/PaxHeaders.18661/ttinterp.c | 3 - .../src/truetype/PaxHeaders.18661/ttinterp.h | 3 - .../src/truetype/PaxHeaders.18661/ttobjs.c | 3 - .../src/truetype/PaxHeaders.18661/ttobjs.h | 2 - .../src/truetype/PaxHeaders.18661/ttpic.c | 2 - .../src/truetype/PaxHeaders.18661/ttpic.h | 2 - .../src/truetype/PaxHeaders.18661/ttpload.c | 2 - .../src/truetype/PaxHeaders.18661/ttpload.h | 2 - .../src/truetype/PaxHeaders.18661/ttsubpix.c | 2 - .../src/truetype/PaxHeaders.18661/ttsubpix.h | 2 - freetype/src/truetype/ttdriver.c | 8 +- freetype/src/truetype/ttgload.c | 318 +- freetype/src/truetype/ttgxvar.c | 6 +- freetype/src/truetype/ttinterp.c | 248 +- freetype/src/truetype/ttinterp.h | 29 +- freetype/src/truetype/ttobjs.c | 172 +- freetype/src/truetype/ttobjs.h | 12 +- freetype/src/truetype/ttpload.c | 12 +- freetype/src/truetype/ttsubpix.c | 6 +- freetype/src/type1/PaxHeaders.18661/Jamfile | 2 - freetype/src/type1/PaxHeaders.18661/module.mk | 2 - freetype/src/type1/PaxHeaders.18661/rules.mk | 2 - freetype/src/type1/PaxHeaders.18661/t1afm.c | 2 - freetype/src/type1/PaxHeaders.18661/t1afm.h | 2 - .../src/type1/PaxHeaders.18661/t1driver.c | 2 - .../src/type1/PaxHeaders.18661/t1driver.h | 2 - .../src/type1/PaxHeaders.18661/t1errors.h | 2 - freetype/src/type1/PaxHeaders.18661/t1gload.c | 3 - freetype/src/type1/PaxHeaders.18661/t1gload.h | 2 - freetype/src/type1/PaxHeaders.18661/t1load.c | 3 - freetype/src/type1/PaxHeaders.18661/t1load.h | 2 - freetype/src/type1/PaxHeaders.18661/t1objs.c | 2 - freetype/src/type1/PaxHeaders.18661/t1objs.h | 2 - freetype/src/type1/PaxHeaders.18661/t1parse.c | 2 - freetype/src/type1/PaxHeaders.18661/t1parse.h | 2 - .../src/type1/PaxHeaders.18661/t1tokens.h | 2 - freetype/src/type1/PaxHeaders.18661/type1.c | 2 - freetype/src/type1/t1driver.c | 5 +- freetype/src/type1/t1gload.c | 4 +- freetype/src/type1/t1load.c | 22 +- freetype/src/type1/t1objs.c | 8 +- freetype/src/type1/t1parse.c | 31 +- freetype/src/type42/PaxHeaders.18661/Jamfile | 2 - .../src/type42/PaxHeaders.18661/module.mk | 2 - freetype/src/type42/PaxHeaders.18661/rules.mk | 2 - .../src/type42/PaxHeaders.18661/t42drivr.c | 2 - .../src/type42/PaxHeaders.18661/t42drivr.h | 2 - .../src/type42/PaxHeaders.18661/t42error.h | 2 - .../src/type42/PaxHeaders.18661/t42objs.c | 3 - .../src/type42/PaxHeaders.18661/t42objs.h | 2 - .../src/type42/PaxHeaders.18661/t42parse.c | 2 - .../src/type42/PaxHeaders.18661/t42parse.h | 2 - .../src/type42/PaxHeaders.18661/t42types.h | 2 - freetype/src/type42/PaxHeaders.18661/type42.c | 2 - freetype/src/type42/t42objs.c | 16 +- freetype/src/type42/t42parse.c | 98 +- .../src/winfonts/PaxHeaders.18661/Jamfile | 2 - .../src/winfonts/PaxHeaders.18661/fnterrs.h | 2 - .../src/winfonts/PaxHeaders.18661/module.mk | 2 - .../src/winfonts/PaxHeaders.18661/rules.mk | 2 - .../src/winfonts/PaxHeaders.18661/winfnt.c | 3 - .../src/winfonts/PaxHeaders.18661/winfnt.h | 2 - freetype/src/winfonts/winfnt.c | 41 +- 1134 files changed, 47183 insertions(+), 40687 deletions(-) create mode 100644 freetype/ChangeLog.24 delete mode 100644 freetype/PaxHeaders.18661/CMakeLists.txt delete mode 100644 freetype/PaxHeaders.18661/ChangeLog delete mode 100644 freetype/PaxHeaders.18661/ChangeLog.20 delete mode 100644 freetype/PaxHeaders.18661/ChangeLog.21 delete mode 100644 freetype/PaxHeaders.18661/ChangeLog.22 delete mode 100644 freetype/PaxHeaders.18661/ChangeLog.23 delete mode 100644 freetype/PaxHeaders.18661/Jamfile delete mode 100644 freetype/PaxHeaders.18661/Jamrules delete mode 100644 freetype/PaxHeaders.18661/Makefile delete mode 100644 freetype/PaxHeaders.18661/README delete mode 100644 freetype/PaxHeaders.18661/README.git delete mode 100644 freetype/PaxHeaders.18661/autogen.sh delete mode 100644 freetype/PaxHeaders.18661/builds delete mode 100644 freetype/PaxHeaders.18661/configure delete mode 100644 freetype/PaxHeaders.18661/devel delete mode 100644 freetype/PaxHeaders.18661/docs delete mode 100644 freetype/PaxHeaders.18661/include delete mode 100644 freetype/PaxHeaders.18661/modules.cfg delete mode 100644 freetype/PaxHeaders.18661/objs delete mode 100644 freetype/PaxHeaders.18661/src delete mode 100644 freetype/PaxHeaders.18661/version.sed delete mode 100644 freetype/PaxHeaders.18661/vms_make.com mode change 100644 => 100755 freetype/autogen.sh delete mode 100644 freetype/builds/PaxHeaders.18661/amiga delete mode 100644 freetype/builds/PaxHeaders.18661/ansi delete mode 100644 freetype/builds/PaxHeaders.18661/atari delete mode 100644 freetype/builds/PaxHeaders.18661/beos delete mode 100644 freetype/builds/PaxHeaders.18661/compiler delete mode 100644 freetype/builds/PaxHeaders.18661/detect.mk delete mode 100644 freetype/builds/PaxHeaders.18661/dos delete mode 100644 freetype/builds/PaxHeaders.18661/exports.mk delete mode 100644 freetype/builds/PaxHeaders.18661/freetype.mk delete mode 100644 freetype/builds/PaxHeaders.18661/link_dos.mk delete mode 100644 freetype/builds/PaxHeaders.18661/link_std.mk delete mode 100644 freetype/builds/PaxHeaders.18661/mac delete mode 100644 freetype/builds/PaxHeaders.18661/modules.mk delete mode 100644 freetype/builds/PaxHeaders.18661/newline delete mode 100644 freetype/builds/PaxHeaders.18661/os2 delete mode 100644 freetype/builds/PaxHeaders.18661/symbian delete mode 100644 freetype/builds/PaxHeaders.18661/toplevel.mk delete mode 100644 freetype/builds/PaxHeaders.18661/unix delete mode 100644 freetype/builds/PaxHeaders.18661/vms delete mode 100644 freetype/builds/PaxHeaders.18661/wince delete mode 100644 freetype/builds/PaxHeaders.18661/windows delete mode 100644 freetype/builds/amiga/PaxHeaders.18661/README delete mode 100644 freetype/builds/amiga/PaxHeaders.18661/include delete mode 100644 freetype/builds/amiga/PaxHeaders.18661/makefile delete mode 100644 freetype/builds/amiga/PaxHeaders.18661/makefile.os4 delete mode 100644 freetype/builds/amiga/PaxHeaders.18661/smakefile delete mode 100644 freetype/builds/amiga/PaxHeaders.18661/src delete mode 100644 freetype/builds/amiga/include/PaxHeaders.18661/config delete mode 100644 freetype/builds/amiga/include/config/PaxHeaders.18661/ftconfig.h delete mode 100644 freetype/builds/amiga/include/config/PaxHeaders.18661/ftmodule.h delete mode 100644 freetype/builds/amiga/src/PaxHeaders.18661/base delete mode 100644 freetype/builds/amiga/src/base/PaxHeaders.18661/ftdebug.c delete mode 100644 freetype/builds/amiga/src/base/PaxHeaders.18661/ftsystem.c delete mode 100644 freetype/builds/ansi/PaxHeaders.18661/ansi-def.mk delete mode 100644 freetype/builds/ansi/PaxHeaders.18661/ansi.mk delete mode 100644 freetype/builds/atari/PaxHeaders.18661/ATARI.H delete mode 100644 freetype/builds/atari/PaxHeaders.18661/FNames.SIC delete mode 100644 freetype/builds/atari/PaxHeaders.18661/FREETYPE.PRJ delete mode 100644 freetype/builds/atari/PaxHeaders.18661/README.TXT delete mode 100644 freetype/builds/atari/PaxHeaders.18661/deflinejoiner.awk delete mode 100644 freetype/builds/atari/PaxHeaders.18661/gen-purec-patch.sh mode change 100644 => 100755 freetype/builds/atari/gen-purec-patch.sh delete mode 100644 freetype/builds/beos/PaxHeaders.18661/beos-def.mk delete mode 100644 freetype/builds/beos/PaxHeaders.18661/beos.mk delete mode 100644 freetype/builds/beos/PaxHeaders.18661/detect.mk create mode 100644 freetype/builds/cmake/iOS.cmake delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/ansi-cc.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/bcc-dev.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/bcc.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/emx.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/gcc-dev.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/gcc.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/intelc.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/unix-lcc.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/visualage.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/visualc.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/watcom.mk delete mode 100644 freetype/builds/compiler/PaxHeaders.18661/win-lcc.mk delete mode 100644 freetype/builds/dos/PaxHeaders.18661/detect.mk delete mode 100644 freetype/builds/dos/PaxHeaders.18661/dos-def.mk delete mode 100644 freetype/builds/dos/PaxHeaders.18661/dos-emx.mk delete mode 100644 freetype/builds/dos/PaxHeaders.18661/dos-gcc.mk delete mode 100644 freetype/builds/dos/PaxHeaders.18661/dos-wat.mk delete mode 100644 freetype/builds/mac/PaxHeaders.18661/FreeType.m68k_cfm.make.txt delete mode 100644 freetype/builds/mac/PaxHeaders.18661/FreeType.m68k_far.make.txt delete mode 100644 freetype/builds/mac/PaxHeaders.18661/FreeType.ppc_carbon.make.txt delete mode 100644 freetype/builds/mac/PaxHeaders.18661/FreeType.ppc_classic.make.txt delete mode 100644 freetype/builds/mac/PaxHeaders.18661/README delete mode 100644 freetype/builds/mac/PaxHeaders.18661/ascii2mpw.py delete mode 100644 freetype/builds/mac/PaxHeaders.18661/ftlib.prj.xml delete mode 100644 freetype/builds/mac/PaxHeaders.18661/ftmac.c mode change 100644 => 100755 freetype/builds/mac/ascii2mpw.py create mode 100644 freetype/builds/mac/freetype-Info.plist delete mode 100644 freetype/builds/os2/PaxHeaders.18661/detect.mk delete mode 100644 freetype/builds/os2/PaxHeaders.18661/os2-def.mk delete mode 100644 freetype/builds/os2/PaxHeaders.18661/os2-dev.mk delete mode 100644 freetype/builds/os2/PaxHeaders.18661/os2-gcc.mk delete mode 100644 freetype/builds/symbian/PaxHeaders.18661/bld.inf delete mode 100644 freetype/builds/symbian/PaxHeaders.18661/freetype.mmp delete mode 100644 freetype/builds/unix/PaxHeaders.18661/aclocal.m4 delete mode 100644 freetype/builds/unix/PaxHeaders.18661/config.guess delete mode 100644 freetype/builds/unix/PaxHeaders.18661/config.sub delete mode 100644 freetype/builds/unix/PaxHeaders.18661/configure delete mode 100644 freetype/builds/unix/PaxHeaders.18661/configure.ac delete mode 100644 freetype/builds/unix/PaxHeaders.18661/configure.raw delete mode 100644 freetype/builds/unix/PaxHeaders.18661/detect.mk delete mode 100644 freetype/builds/unix/PaxHeaders.18661/freetype-config.in delete mode 100644 freetype/builds/unix/PaxHeaders.18661/freetype2.in delete mode 100644 freetype/builds/unix/PaxHeaders.18661/freetype2.m4 delete mode 100644 freetype/builds/unix/PaxHeaders.18661/ft-munmap.m4 delete mode 100644 freetype/builds/unix/PaxHeaders.18661/ftconfig.in delete mode 100644 freetype/builds/unix/PaxHeaders.18661/ftsystem.c delete mode 100644 freetype/builds/unix/PaxHeaders.18661/install-sh delete mode 100644 freetype/builds/unix/PaxHeaders.18661/install.mk delete mode 100644 freetype/builds/unix/PaxHeaders.18661/ltmain.sh delete mode 100644 freetype/builds/unix/PaxHeaders.18661/mkinstalldirs delete mode 100644 freetype/builds/unix/PaxHeaders.18661/unix-cc.in delete mode 100644 freetype/builds/unix/PaxHeaders.18661/unix-def.in delete mode 100644 freetype/builds/unix/PaxHeaders.18661/unix-dev.mk delete mode 100644 freetype/builds/unix/PaxHeaders.18661/unix-lcc.mk delete mode 100644 freetype/builds/unix/PaxHeaders.18661/unix.mk delete mode 100644 freetype/builds/unix/PaxHeaders.18661/unixddef.mk mode change 100644 => 100755 freetype/builds/unix/config.guess mode change 100644 => 100755 freetype/builds/unix/config.sub mode change 100644 => 100755 freetype/builds/unix/configure mode change 100644 => 100755 freetype/builds/unix/install-sh mode change 100644 => 100755 freetype/builds/unix/mkinstalldirs create mode 100644 freetype/builds/unix/pkg.m4 delete mode 100644 freetype/builds/vms/PaxHeaders.18661/ftconfig.h delete mode 100644 freetype/builds/vms/PaxHeaders.18661/ftsystem.c delete mode 100644 freetype/builds/wince/PaxHeaders.18661/ftdebug.c delete mode 100644 freetype/builds/wince/PaxHeaders.18661/vc2005-ce delete mode 100644 freetype/builds/wince/PaxHeaders.18661/vc2008-ce delete mode 100644 freetype/builds/wince/vc2005-ce/PaxHeaders.18661/freetype.sln delete mode 100644 freetype/builds/wince/vc2005-ce/PaxHeaders.18661/freetype.vcproj delete mode 100644 freetype/builds/wince/vc2005-ce/PaxHeaders.18661/index.html delete mode 100644 freetype/builds/wince/vc2008-ce/PaxHeaders.18661/freetype.sln delete mode 100644 freetype/builds/wince/vc2008-ce/PaxHeaders.18661/freetype.vcproj delete mode 100644 freetype/builds/wince/vc2008-ce/PaxHeaders.18661/index.html delete mode 100644 freetype/builds/windows/PaxHeaders.18661/detect.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/ftdebug.c delete mode 100644 freetype/builds/windows/PaxHeaders.18661/vc2005 delete mode 100644 freetype/builds/windows/PaxHeaders.18661/vc2008 delete mode 100644 freetype/builds/windows/PaxHeaders.18661/vc2010 delete mode 100644 freetype/builds/windows/PaxHeaders.18661/visualc delete mode 100644 freetype/builds/windows/PaxHeaders.18661/visualce delete mode 100644 freetype/builds/windows/PaxHeaders.18661/w32-bcc.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/w32-bccd.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/w32-dev.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/w32-gcc.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/w32-icc.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/w32-intl.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/w32-lcc.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/w32-mingw32.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/w32-vcc.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/w32-wat.mk delete mode 100644 freetype/builds/windows/PaxHeaders.18661/win32-def.mk delete mode 100644 freetype/builds/windows/vc2005/PaxHeaders.18661/freetype.sln delete mode 100644 freetype/builds/windows/vc2005/PaxHeaders.18661/freetype.vcproj delete mode 100644 freetype/builds/windows/vc2005/PaxHeaders.18661/index.html delete mode 100644 freetype/builds/windows/vc2008/PaxHeaders.18661/freetype.sln delete mode 100644 freetype/builds/windows/vc2008/PaxHeaders.18661/freetype.vcproj delete mode 100644 freetype/builds/windows/vc2008/PaxHeaders.18661/index.html delete mode 100644 freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.sln delete mode 100644 freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.vcxproj delete mode 100644 freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.vcxproj.filters delete mode 100644 freetype/builds/windows/vc2010/PaxHeaders.18661/index.html create mode 100644 freetype/builds/windows/vc2010/freetype.user.props delete mode 100644 freetype/builds/windows/visualc/PaxHeaders.18661/freetype.dsp delete mode 100644 freetype/builds/windows/visualc/PaxHeaders.18661/freetype.dsw delete mode 100644 freetype/builds/windows/visualc/PaxHeaders.18661/freetype.sln delete mode 100644 freetype/builds/windows/visualc/PaxHeaders.18661/freetype.vcproj delete mode 100644 freetype/builds/windows/visualc/PaxHeaders.18661/index.html delete mode 100644 freetype/builds/windows/visualce/PaxHeaders.18661/freetype.dsp delete mode 100644 freetype/builds/windows/visualce/PaxHeaders.18661/freetype.dsw delete mode 100644 freetype/builds/windows/visualce/PaxHeaders.18661/freetype.vcproj delete mode 100644 freetype/builds/windows/visualce/PaxHeaders.18661/index.html mode change 100644 => 100755 freetype/configure delete mode 100644 freetype/devel/PaxHeaders.18661/ft2build.h delete mode 100644 freetype/devel/PaxHeaders.18661/ftoption.h delete mode 100644 freetype/docs/PaxHeaders.18661/CHANGES delete mode 100644 freetype/docs/PaxHeaders.18661/CMAKE delete mode 100644 freetype/docs/PaxHeaders.18661/CUSTOMIZE delete mode 100644 freetype/docs/PaxHeaders.18661/DEBUG delete mode 100644 freetype/docs/PaxHeaders.18661/FTL.TXT delete mode 100644 freetype/docs/PaxHeaders.18661/GPLv2.TXT delete mode 100644 freetype/docs/PaxHeaders.18661/INSTALL delete mode 100644 freetype/docs/PaxHeaders.18661/INSTALL.ANY delete mode 100644 freetype/docs/PaxHeaders.18661/INSTALL.CROSS delete mode 100644 freetype/docs/PaxHeaders.18661/INSTALL.GNU delete mode 100644 freetype/docs/PaxHeaders.18661/INSTALL.MAC delete mode 100644 freetype/docs/PaxHeaders.18661/INSTALL.UNIX delete mode 100644 freetype/docs/PaxHeaders.18661/INSTALL.VMS delete mode 100644 freetype/docs/PaxHeaders.18661/LICENSE.TXT delete mode 100644 freetype/docs/PaxHeaders.18661/MAKEPP delete mode 100644 freetype/docs/PaxHeaders.18661/PROBLEMS delete mode 100644 freetype/docs/PaxHeaders.18661/TODO delete mode 100644 freetype/docs/PaxHeaders.18661/VERSION.DLL delete mode 100644 freetype/docs/PaxHeaders.18661/formats.txt delete mode 100644 freetype/docs/PaxHeaders.18661/raster.txt delete mode 100644 freetype/docs/PaxHeaders.18661/reference delete mode 100644 freetype/docs/PaxHeaders.18661/release create mode 100644 freetype/docs/freetype-config.1 delete mode 100644 freetype/docs/reference/PaxHeaders.18661/README delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-auto_hinter.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-base_interface.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-basic_types.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-bdf_fonts.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-bitmap_handling.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-bzip2.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-cache_subsystem.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-cff_driver.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-cid_fonts.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-computations.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-font_formats.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-gasp_table.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-glyph_management.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-glyph_stroker.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-glyph_variants.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-gx_validation.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-gzip.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-header_file_macros.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-incremental.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-index.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-lcd_filtering.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-list_processing.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-lzw.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-mac_specific.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-module_management.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-multiple_masters.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-ot_validation.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-outline_processing.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-pfr_fonts.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-quick_advance.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-raster.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-sfnt_names.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-sizes_management.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-system_interface.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-toc.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-truetype_engine.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-truetype_tables.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-tt_driver.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-type1_tables.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-user_allocation.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-version.html delete mode 100644 freetype/docs/reference/PaxHeaders.18661/ft2-winfnt_fonts.html create mode 100644 freetype/docs/reference/ft2-header_inclusion.html delete mode 100644 freetype/include/PaxHeaders.18661/config delete mode 100644 freetype/include/PaxHeaders.18661/freetype.h delete mode 100644 freetype/include/PaxHeaders.18661/ft2build.h delete mode 100644 freetype/include/PaxHeaders.18661/ftadvanc.h delete mode 100644 freetype/include/PaxHeaders.18661/ftautoh.h delete mode 100644 freetype/include/PaxHeaders.18661/ftbbox.h delete mode 100644 freetype/include/PaxHeaders.18661/ftbdf.h delete mode 100644 freetype/include/PaxHeaders.18661/ftbitmap.h delete mode 100644 freetype/include/PaxHeaders.18661/ftbzip2.h delete mode 100644 freetype/include/PaxHeaders.18661/ftcache.h delete mode 100644 freetype/include/PaxHeaders.18661/ftcffdrv.h delete mode 100644 freetype/include/PaxHeaders.18661/ftchapters.h delete mode 100644 freetype/include/PaxHeaders.18661/ftcid.h delete mode 100644 freetype/include/PaxHeaders.18661/fterrdef.h delete mode 100644 freetype/include/PaxHeaders.18661/fterrors.h delete mode 100644 freetype/include/PaxHeaders.18661/ftgasp.h delete mode 100644 freetype/include/PaxHeaders.18661/ftglyph.h delete mode 100644 freetype/include/PaxHeaders.18661/ftgxval.h delete mode 100644 freetype/include/PaxHeaders.18661/ftgzip.h delete mode 100644 freetype/include/PaxHeaders.18661/ftimage.h delete mode 100644 freetype/include/PaxHeaders.18661/ftincrem.h delete mode 100644 freetype/include/PaxHeaders.18661/ftlcdfil.h delete mode 100644 freetype/include/PaxHeaders.18661/ftlist.h delete mode 100644 freetype/include/PaxHeaders.18661/ftlzw.h delete mode 100644 freetype/include/PaxHeaders.18661/ftmac.h delete mode 100644 freetype/include/PaxHeaders.18661/ftmm.h delete mode 100644 freetype/include/PaxHeaders.18661/ftmodapi.h delete mode 100644 freetype/include/PaxHeaders.18661/ftmoderr.h delete mode 100644 freetype/include/PaxHeaders.18661/ftotval.h delete mode 100644 freetype/include/PaxHeaders.18661/ftoutln.h delete mode 100644 freetype/include/PaxHeaders.18661/ftpfr.h delete mode 100644 freetype/include/PaxHeaders.18661/ftrender.h delete mode 100644 freetype/include/PaxHeaders.18661/ftsizes.h delete mode 100644 freetype/include/PaxHeaders.18661/ftsnames.h delete mode 100644 freetype/include/PaxHeaders.18661/ftstroke.h delete mode 100644 freetype/include/PaxHeaders.18661/ftsynth.h delete mode 100644 freetype/include/PaxHeaders.18661/ftsystem.h delete mode 100644 freetype/include/PaxHeaders.18661/fttrigon.h delete mode 100644 freetype/include/PaxHeaders.18661/ftttdrv.h delete mode 100644 freetype/include/PaxHeaders.18661/fttypes.h delete mode 100644 freetype/include/PaxHeaders.18661/ftwinfnt.h delete mode 100644 freetype/include/PaxHeaders.18661/ftxf86.h delete mode 100644 freetype/include/PaxHeaders.18661/internal delete mode 100644 freetype/include/PaxHeaders.18661/t1tables.h delete mode 100644 freetype/include/PaxHeaders.18661/ttnameid.h delete mode 100644 freetype/include/PaxHeaders.18661/tttables.h delete mode 100644 freetype/include/PaxHeaders.18661/tttags.h delete mode 100644 freetype/include/PaxHeaders.18661/ttunpat.h delete mode 100644 freetype/include/config/PaxHeaders.18661/ftconfig.h delete mode 100644 freetype/include/config/PaxHeaders.18661/ftheader.h delete mode 100644 freetype/include/config/PaxHeaders.18661/ftmodule.h delete mode 100644 freetype/include/config/PaxHeaders.18661/ftoption.h delete mode 100644 freetype/include/config/PaxHeaders.18661/ftstdlib.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/autohint.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftcalc.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftdebug.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftdriver.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftgloadr.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftmemory.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftobjs.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftpic.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftrfork.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftserv.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftstream.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/fttrace.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/ftvalid.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/internal.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/psaux.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/pshints.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/services delete mode 100644 freetype/include/internal/PaxHeaders.18661/sfnt.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/t1types.h delete mode 100644 freetype/include/internal/PaxHeaders.18661/tttypes.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svbdf.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svcid.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svgldict.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svgxval.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svkern.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svmm.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svotval.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svpfr.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svpostnm.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svprop.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svpscmap.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svpsinfo.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svsfnt.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svttcmap.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svtteng.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svttglyf.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svwinfnt.h delete mode 100644 freetype/include/internal/services/PaxHeaders.18661/svxf86nm.h delete mode 100644 freetype/objs/PaxHeaders.18661/README delete mode 100644 freetype/src/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/PaxHeaders.18661/autofit delete mode 100644 freetype/src/PaxHeaders.18661/base delete mode 100644 freetype/src/PaxHeaders.18661/bdf delete mode 100644 freetype/src/PaxHeaders.18661/bzip2 delete mode 100644 freetype/src/PaxHeaders.18661/cache delete mode 100644 freetype/src/PaxHeaders.18661/cff delete mode 100644 freetype/src/PaxHeaders.18661/cid delete mode 100644 freetype/src/PaxHeaders.18661/gxvalid delete mode 100644 freetype/src/PaxHeaders.18661/gzip delete mode 100644 freetype/src/PaxHeaders.18661/lzw delete mode 100644 freetype/src/PaxHeaders.18661/otvalid delete mode 100644 freetype/src/PaxHeaders.18661/pcf delete mode 100644 freetype/src/PaxHeaders.18661/pfr delete mode 100644 freetype/src/PaxHeaders.18661/psaux delete mode 100644 freetype/src/PaxHeaders.18661/pshinter delete mode 100644 freetype/src/PaxHeaders.18661/psnames delete mode 100644 freetype/src/PaxHeaders.18661/raster delete mode 100644 freetype/src/PaxHeaders.18661/sfnt delete mode 100644 freetype/src/PaxHeaders.18661/smooth delete mode 100644 freetype/src/PaxHeaders.18661/tools delete mode 100644 freetype/src/PaxHeaders.18661/truetype delete mode 100644 freetype/src/PaxHeaders.18661/type1 delete mode 100644 freetype/src/PaxHeaders.18661/type42 delete mode 100644 freetype/src/PaxHeaders.18661/winfonts delete mode 100644 freetype/src/autofit/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afangles.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afangles.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afblue.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afblue.cin delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afblue.dat delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afblue.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afblue.hin delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afcjk.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afcjk.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afdummy.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afdummy.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/aferrors.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afglobal.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afglobal.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afhints.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afhints.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afindic.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afindic.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/aflatin.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/aflatin.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/aflatin2.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/aflatin2.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afloader.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afloader.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afmodule.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afmodule.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afpic.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afpic.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afscript.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/aftypes.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afwarp.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afwarp.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/afwrtsys.h delete mode 100644 freetype/src/autofit/PaxHeaders.18661/autofit.c delete mode 100644 freetype/src/autofit/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/autofit/PaxHeaders.18661/rules.mk create mode 100644 freetype/src/autofit/afcover.h create mode 100644 freetype/src/autofit/afranges.c create mode 100644 freetype/src/autofit/afranges.h create mode 100644 freetype/src/autofit/afstyles.h create mode 100644 freetype/src/autofit/hbshim.c create mode 100644 freetype/src/autofit/hbshim.h delete mode 100644 freetype/src/base/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/base/PaxHeaders.18661/basepic.c delete mode 100644 freetype/src/base/PaxHeaders.18661/basepic.h delete mode 100644 freetype/src/base/PaxHeaders.18661/ftadvanc.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftapi.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftbase.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftbase.h delete mode 100644 freetype/src/base/PaxHeaders.18661/ftbbox.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftbdf.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftbitmap.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftcalc.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftcid.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftdbgmem.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftdebug.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftfstype.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftgasp.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftgloadr.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftglyph.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftgxval.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftinit.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftlcdfil.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftmac.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftmm.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftobjs.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftotval.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftoutln.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftpatent.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftpfr.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftpic.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftrfork.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftsnames.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftstream.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftstroke.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftsynth.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftsystem.c delete mode 100644 freetype/src/base/PaxHeaders.18661/fttrigon.c delete mode 100644 freetype/src/base/PaxHeaders.18661/fttype1.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftutil.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftwinfnt.c delete mode 100644 freetype/src/base/PaxHeaders.18661/ftxf86.c delete mode 100644 freetype/src/base/PaxHeaders.18661/md5.c delete mode 100644 freetype/src/base/PaxHeaders.18661/md5.h delete mode 100644 freetype/src/base/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/bdf/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/bdf/PaxHeaders.18661/README delete mode 100644 freetype/src/bdf/PaxHeaders.18661/bdf.c delete mode 100644 freetype/src/bdf/PaxHeaders.18661/bdf.h delete mode 100644 freetype/src/bdf/PaxHeaders.18661/bdfdrivr.c delete mode 100644 freetype/src/bdf/PaxHeaders.18661/bdfdrivr.h delete mode 100644 freetype/src/bdf/PaxHeaders.18661/bdferror.h delete mode 100644 freetype/src/bdf/PaxHeaders.18661/bdflib.c delete mode 100644 freetype/src/bdf/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/bdf/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/bzip2/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/bzip2/PaxHeaders.18661/ftbzip2.c delete mode 100644 freetype/src/bzip2/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/cache/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcache.c delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcbasic.c delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftccache.c delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftccache.h delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftccback.h delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftccmap.c delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcerror.h delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcglyph.c delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcglyph.h delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcimage.c delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcimage.h delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcmanag.c delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcmanag.h delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcmru.c delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcmru.h delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcsbits.c delete mode 100644 freetype/src/cache/PaxHeaders.18661/ftcsbits.h delete mode 100644 freetype/src/cache/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/cff/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2arrst.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2arrst.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2blues.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2blues.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2error.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2error.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2fixed.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2font.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2font.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2ft.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2ft.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2glue.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2hints.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2hints.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2intrp.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2intrp.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2read.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2read.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2stack.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2stack.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cf2types.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cff.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffcmap.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffcmap.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffdrivr.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffdrivr.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cfferrs.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffgload.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffgload.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffload.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffload.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffobjs.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffobjs.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffparse.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffparse.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffpic.c delete mode 100644 freetype/src/cff/PaxHeaders.18661/cffpic.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cfftoken.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/cfftypes.h delete mode 100644 freetype/src/cff/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/cff/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/cid/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/cid/PaxHeaders.18661/ciderrs.h delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidgload.c delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidgload.h delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidload.c delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidload.h delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidobjs.c delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidobjs.h delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidparse.c delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidparse.h delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidriver.c delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidriver.h delete mode 100644 freetype/src/cid/PaxHeaders.18661/cidtoken.h delete mode 100644 freetype/src/cid/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/cid/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/cid/PaxHeaders.18661/type1cid.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/README delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvalid.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvalid.h delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvbsln.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvcommn.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvcommn.h delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxverror.h delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvfeat.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvfeat.h delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvfgen.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvjust.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvkern.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvlcar.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmod.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmod.h delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmort.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmort.h delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmort0.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmort1.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmort2.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmort4.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmort5.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmorx.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmorx.h delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmorx0.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmorx1.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmorx2.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmorx4.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvmorx5.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvopbd.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvprop.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/gxvtrak.c delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/gxvalid/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/gzip/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/gzip/PaxHeaders.18661/adler32.c delete mode 100644 freetype/src/gzip/PaxHeaders.18661/ftgzip.c delete mode 100644 freetype/src/gzip/PaxHeaders.18661/infblock.c delete mode 100644 freetype/src/gzip/PaxHeaders.18661/infblock.h delete mode 100644 freetype/src/gzip/PaxHeaders.18661/infcodes.c delete mode 100644 freetype/src/gzip/PaxHeaders.18661/infcodes.h delete mode 100644 freetype/src/gzip/PaxHeaders.18661/inffixed.h delete mode 100644 freetype/src/gzip/PaxHeaders.18661/inflate.c delete mode 100644 freetype/src/gzip/PaxHeaders.18661/inftrees.c delete mode 100644 freetype/src/gzip/PaxHeaders.18661/inftrees.h delete mode 100644 freetype/src/gzip/PaxHeaders.18661/infutil.c delete mode 100644 freetype/src/gzip/PaxHeaders.18661/infutil.h delete mode 100644 freetype/src/gzip/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/gzip/PaxHeaders.18661/zconf.h delete mode 100644 freetype/src/gzip/PaxHeaders.18661/zlib.h delete mode 100644 freetype/src/gzip/PaxHeaders.18661/zutil.c delete mode 100644 freetype/src/gzip/PaxHeaders.18661/zutil.h delete mode 100644 freetype/src/lzw/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/lzw/PaxHeaders.18661/ftlzw.c delete mode 100644 freetype/src/lzw/PaxHeaders.18661/ftzopen.c delete mode 100644 freetype/src/lzw/PaxHeaders.18661/ftzopen.h delete mode 100644 freetype/src/lzw/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvalid.c delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvalid.h delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvbase.c delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvcommn.c delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvcommn.h delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otverror.h delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvgdef.c delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvgpos.c delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvgpos.h delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvgsub.c delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvjstf.c delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvmath.c delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvmod.c delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/otvmod.h delete mode 100644 freetype/src/otvalid/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/pcf/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/pcf/PaxHeaders.18661/README delete mode 100644 freetype/src/pcf/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/pcf/PaxHeaders.18661/pcf.c delete mode 100644 freetype/src/pcf/PaxHeaders.18661/pcf.h delete mode 100644 freetype/src/pcf/PaxHeaders.18661/pcfdrivr.c delete mode 100644 freetype/src/pcf/PaxHeaders.18661/pcfdrivr.h delete mode 100644 freetype/src/pcf/PaxHeaders.18661/pcferror.h delete mode 100644 freetype/src/pcf/PaxHeaders.18661/pcfread.c delete mode 100644 freetype/src/pcf/PaxHeaders.18661/pcfread.h delete mode 100644 freetype/src/pcf/PaxHeaders.18661/pcfutil.c delete mode 100644 freetype/src/pcf/PaxHeaders.18661/pcfutil.h delete mode 100644 freetype/src/pcf/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/pfr/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/pfr/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfr.c delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrcmap.c delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrcmap.h delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrdrivr.c delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrdrivr.h delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrerror.h delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrgload.c delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrgload.h delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrload.c delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrload.h delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrobjs.c delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrobjs.h delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrsbit.c delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrsbit.h delete mode 100644 freetype/src/pfr/PaxHeaders.18661/pfrtypes.h delete mode 100644 freetype/src/pfr/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/psaux/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/psaux/PaxHeaders.18661/afmparse.c delete mode 100644 freetype/src/psaux/PaxHeaders.18661/afmparse.h delete mode 100644 freetype/src/psaux/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/psaux/PaxHeaders.18661/psaux.c delete mode 100644 freetype/src/psaux/PaxHeaders.18661/psauxerr.h delete mode 100644 freetype/src/psaux/PaxHeaders.18661/psauxmod.c delete mode 100644 freetype/src/psaux/PaxHeaders.18661/psauxmod.h delete mode 100644 freetype/src/psaux/PaxHeaders.18661/psconv.c delete mode 100644 freetype/src/psaux/PaxHeaders.18661/psconv.h delete mode 100644 freetype/src/psaux/PaxHeaders.18661/psobjs.c delete mode 100644 freetype/src/psaux/PaxHeaders.18661/psobjs.h delete mode 100644 freetype/src/psaux/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/psaux/PaxHeaders.18661/t1cmap.c delete mode 100644 freetype/src/psaux/PaxHeaders.18661/t1cmap.h delete mode 100644 freetype/src/psaux/PaxHeaders.18661/t1decode.c delete mode 100644 freetype/src/psaux/PaxHeaders.18661/t1decode.h delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshalgo.c delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshalgo.h delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshglob.c delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshglob.h delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshinter.c delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshmod.c delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshmod.h delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshnterr.h delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshpic.c delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshpic.h delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshrec.c delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/pshrec.h delete mode 100644 freetype/src/pshinter/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/psnames/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/psnames/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/psnames/PaxHeaders.18661/psmodule.c delete mode 100644 freetype/src/psnames/PaxHeaders.18661/psmodule.h delete mode 100644 freetype/src/psnames/PaxHeaders.18661/psnamerr.h delete mode 100644 freetype/src/psnames/PaxHeaders.18661/psnames.c delete mode 100644 freetype/src/psnames/PaxHeaders.18661/pspic.c delete mode 100644 freetype/src/psnames/PaxHeaders.18661/pspic.h delete mode 100644 freetype/src/psnames/PaxHeaders.18661/pstables.h delete mode 100644 freetype/src/psnames/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/raster/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/raster/PaxHeaders.18661/ftmisc.h delete mode 100644 freetype/src/raster/PaxHeaders.18661/ftraster.c delete mode 100644 freetype/src/raster/PaxHeaders.18661/ftraster.h delete mode 100644 freetype/src/raster/PaxHeaders.18661/ftrend1.c delete mode 100644 freetype/src/raster/PaxHeaders.18661/ftrend1.h delete mode 100644 freetype/src/raster/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/raster/PaxHeaders.18661/raster.c delete mode 100644 freetype/src/raster/PaxHeaders.18661/rasterrs.h delete mode 100644 freetype/src/raster/PaxHeaders.18661/rastpic.c delete mode 100644 freetype/src/raster/PaxHeaders.18661/rastpic.h delete mode 100644 freetype/src/raster/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/pngshim.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/pngshim.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/sfdriver.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/sfdriver.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/sferrors.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/sfnt.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/sfntpic.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/sfntpic.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/sfobjs.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/sfobjs.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttbdf.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttbdf.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttcmap.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttcmap.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttcmapc.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttkern.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttkern.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttload.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttload.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttmtx.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttmtx.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttpost.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttpost.h delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttsbit.c delete mode 100644 freetype/src/sfnt/PaxHeaders.18661/ttsbit.h delete mode 100644 freetype/src/smooth/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/smooth/PaxHeaders.18661/ftgrays.c delete mode 100644 freetype/src/smooth/PaxHeaders.18661/ftgrays.h delete mode 100644 freetype/src/smooth/PaxHeaders.18661/ftsmerrs.h delete mode 100644 freetype/src/smooth/PaxHeaders.18661/ftsmooth.c delete mode 100644 freetype/src/smooth/PaxHeaders.18661/ftsmooth.h delete mode 100644 freetype/src/smooth/PaxHeaders.18661/ftspic.c delete mode 100644 freetype/src/smooth/PaxHeaders.18661/ftspic.h delete mode 100644 freetype/src/smooth/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/smooth/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/smooth/PaxHeaders.18661/smooth.c delete mode 100644 freetype/src/tools/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/tools/PaxHeaders.18661/afblue.pl delete mode 100644 freetype/src/tools/PaxHeaders.18661/apinames.c delete mode 100644 freetype/src/tools/PaxHeaders.18661/chktrcmp.py delete mode 100644 freetype/src/tools/PaxHeaders.18661/cordic.py delete mode 100644 freetype/src/tools/PaxHeaders.18661/docmaker delete mode 100644 freetype/src/tools/PaxHeaders.18661/ftrandom delete mode 100644 freetype/src/tools/PaxHeaders.18661/glnames.py delete mode 100644 freetype/src/tools/PaxHeaders.18661/test_afm.c delete mode 100644 freetype/src/tools/PaxHeaders.18661/test_bbox.c delete mode 100644 freetype/src/tools/PaxHeaders.18661/test_trig.c mode change 100644 => 100755 freetype/src/tools/chktrcmp.py delete mode 100644 freetype/src/tools/docmaker/PaxHeaders.18661/content.py delete mode 100644 freetype/src/tools/docmaker/PaxHeaders.18661/docbeauty.py delete mode 100644 freetype/src/tools/docmaker/PaxHeaders.18661/docmaker.py delete mode 100644 freetype/src/tools/docmaker/PaxHeaders.18661/formatter.py delete mode 100644 freetype/src/tools/docmaker/PaxHeaders.18661/sources.py delete mode 100644 freetype/src/tools/docmaker/PaxHeaders.18661/tohtml.py delete mode 100644 freetype/src/tools/docmaker/PaxHeaders.18661/utils.py delete mode 100644 freetype/src/tools/ftrandom/PaxHeaders.18661/Makefile delete mode 100644 freetype/src/tools/ftrandom/PaxHeaders.18661/README delete mode 100644 freetype/src/tools/ftrandom/PaxHeaders.18661/ftrandom.c delete mode 100644 freetype/src/truetype/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/truetype/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/truetype/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/truetype/PaxHeaders.18661/truetype.c delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttdriver.c delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttdriver.h delete mode 100644 freetype/src/truetype/PaxHeaders.18661/tterrors.h delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttgload.c delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttgload.h delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttgxvar.c delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttgxvar.h delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttinterp.c delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttinterp.h delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttobjs.c delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttobjs.h delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttpic.c delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttpic.h delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttpload.c delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttpload.h delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttsubpix.c delete mode 100644 freetype/src/truetype/PaxHeaders.18661/ttsubpix.h delete mode 100644 freetype/src/type1/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/type1/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/type1/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1afm.c delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1afm.h delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1driver.c delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1driver.h delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1errors.h delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1gload.c delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1gload.h delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1load.c delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1load.h delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1objs.c delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1objs.h delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1parse.c delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1parse.h delete mode 100644 freetype/src/type1/PaxHeaders.18661/t1tokens.h delete mode 100644 freetype/src/type1/PaxHeaders.18661/type1.c delete mode 100644 freetype/src/type42/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/type42/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/type42/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/type42/PaxHeaders.18661/t42drivr.c delete mode 100644 freetype/src/type42/PaxHeaders.18661/t42drivr.h delete mode 100644 freetype/src/type42/PaxHeaders.18661/t42error.h delete mode 100644 freetype/src/type42/PaxHeaders.18661/t42objs.c delete mode 100644 freetype/src/type42/PaxHeaders.18661/t42objs.h delete mode 100644 freetype/src/type42/PaxHeaders.18661/t42parse.c delete mode 100644 freetype/src/type42/PaxHeaders.18661/t42parse.h delete mode 100644 freetype/src/type42/PaxHeaders.18661/t42types.h delete mode 100644 freetype/src/type42/PaxHeaders.18661/type42.c delete mode 100644 freetype/src/winfonts/PaxHeaders.18661/Jamfile delete mode 100644 freetype/src/winfonts/PaxHeaders.18661/fnterrs.h delete mode 100644 freetype/src/winfonts/PaxHeaders.18661/module.mk delete mode 100644 freetype/src/winfonts/PaxHeaders.18661/rules.mk delete mode 100644 freetype/src/winfonts/PaxHeaders.18661/winfnt.c delete mode 100644 freetype/src/winfonts/PaxHeaders.18661/winfnt.h diff --git a/freetype/CMakeLists.txt b/freetype/CMakeLists.txt index d9f589b5..8b859a57 100644 --- a/freetype/CMakeLists.txt +++ b/freetype/CMakeLists.txt @@ -1,6 +1,6 @@ # CMakeLists.txt # -# Copyright 2013 by +# Copyright 2013, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written by John Cary @@ -16,13 +16,28 @@ # # cmake CMakeLists.txt # -# to create a Makefile that builds a static version of the library. For a -# dynamic library, use +# 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 # -# instead. Please refer to the cmake manual for further options, in -# particular, how to modify compilation and linking parameters. +# 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. # @@ -37,11 +52,54 @@ 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 "0") +set(VERSION_PATCH "5") set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) # Compiler definitions for building the library @@ -51,22 +109,27 @@ add_definitions(-DFT2_BUILD_LIBRARY) include_directories("${PROJECT_SOURCE_DIR}/include") # Create the configuration file -message(STATUS "Creating directory, ${PROJECT_BINARY_DIR}/include.") -file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include) +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("${PROJECT_BINARY_DIR}/include") -message(STATUS "Creating ${PROJECT_BINARY_DIR}/include/ftconfig.h.") +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//" -e "s/FT_CONFIG_STANDARD_LIBRARY_H//" -e "s?/undef ?#undef ?" INPUT_FILE ${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in - OUTPUT_FILE ${PROJECT_BINARY_DIR}/include/ftconfig.h + 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 @@ -125,25 +188,31 @@ include_directories("src/raster") include_directories("src/psaux") include_directories("src/psnames") -if(MSVC) - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHsc /O2") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /EHa /W3") - - set(CompilerFlags - CMAKE_CXX_FLAGS - CMAKE_CXX_FLAGS_DEBUG - CMAKE_CXX_FLAGS_RELEASE - CMAKE_C_FLAGS - CMAKE_C_FLAGS_DEBUG - CMAKE_C_FLAGS_RELEASE +if (BUILD_FRAMEWORK) + set(BASE_SRCS + ${BASE_SRCS} + builds/mac/freetype-Info.plist ) +endif () - foreach(CompilerFlag ${CompilerFlags}) - string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") - endforeach() -endif(MSVC) +add_library(freetype + ${PUBLIC_HEADERS} + ${PUBLIC_CONFIG_HEADERS} + ${PRIVATE_HEADERS} + ${BASE_SRCS} +) -add_library(freetype ${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 @@ -155,6 +224,7 @@ install(TARGETS freetype RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib + FRAMEWORK DESTINATION Library/Frameworks ) # Packaging diff --git a/freetype/ChangeLog b/freetype/ChangeLog index 2dc7a62c..809b475f 100644 --- a/freetype/ChangeLog +++ b/freetype/ChangeLog @@ -1,3 +1,3113 @@ +2014-12-30 Werner Lemberg + + * Version 2.5.5 released. + ========================= + + + Tag sources with `VER-2-5-5'. + + * docs/VERSION.DLL: Update documentation and bump version number to + 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.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 + + [base] Formatting and nanooptimizations. + + * src/base/ftcalc.c, + * src/base/fttrigon.c: Revise sign restoration. + +2014-12-13 Werner Lemberg + + * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08. + +2014-12-11 Werner Lemberg + + * 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 . + +2014-12-11 Werner Lemberg + + * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size. + +2014-12-11 Werner Lemberg + + * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check. + + Problem reported by Dennis Felsing . + +2014-12-11 Werner Lemberg + + * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'. + + Problem reported by Dennis Felsing . + +2014-12-09 suzuki toshiya + + [gxvalid] Fix a naming convention conflicting with ftvalid. + + See previous changeset for otvalid. + + * 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. + +2014-12-09 suzuki toshiya + + [otvalid] Fix a naming convention conflicting with ftvalid. + + 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. + + Some macros in otvcommn.h assume the exist of the variable + `valid' typed as OTV_Validator in the caller. + + 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/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. + +2014-12-09 suzuki toshiya + + [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros. + + 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 + + * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_(). + * src/gxvalid/gxvcommn.h: Ditto. + * src/otvalid/otvcommn.h: Ditto. + +2014-12-08 Werner Lemberg + + [pcf] Fix Savannah bug #43774. + + 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. + + The problem was unveiled with a patch from 2014-11-06, fixing issue + #43547. + + * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last + element. Instead, assign real size. + +2014-12-07 Werner Lemberg + + Work around a bug in Borland's C++ compiler. + + See + + http://qc.embarcadero.com/wc/qcmain.aspx?d=118998 + + for Borland's bug tracker entry. + + Reported by Yuliana Zigangirova , + http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html. + + * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c + (gray_TWorker_): Move `ft_jmp_buf' field to be the first element. + +2014-12-07 Werner Lemberg + + */*: Decorate hex constants with `U' and `L' where appropriate. + +2014-12-07 Werner Lemberg + + [truetype] Prevent memory leak for buggy fonts. + + * src/truetype/ttobjs.c (tt_size_done): Unconditionally call + `tt_size_done_bytecode'. + +2014-12-06 Werner Lemberg + + * Version 2.5.4 released. + ========================= + + + 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. + +2014-12-04 Werner Lemberg + + docs/CHANGES: Updated, formatted. + +2014-12-04 Dave Arnold + + [cff] Modify an FT_ASSERT. + + * 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. + +2014-12-04 Dave Arnold + + [cff] Fix Savannah bug #43661. + + * src/cff/cf2intrp.c (cf2_interpT2CharString) : Don't append to stem arrays after + hintmask is constructed. + + * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to + avoid reading past end of hintmask. + +2014-12-03 Werner Lemberg + + docs/CHANGES: Updated. + +2014-12-03 Werner Lemberg + + [autofit] Better fix for conversion specifiers in debug messages. + + 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. + + This patch improves the change from 2014-11-28. + + * 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'. + +2014-12-03 Werner Lemberg + + 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 + + * include/*: Improve structure of documentation. + + . Add and update many `' tags. + . Apply various documentation fixes. + . Remove details to deprecated (or never implemented) data. + +2014-12-02 Werner Lemberg + + [docmaker] Always handle `' section elements. + + Previously, those elements were handled only for sections present in + a `' chapter element. + + * src/tools/docmaker/content.py (ContentProcessor::finish): + Implement it. + +2014-12-02 Werner Lemberg + + [docmaker] Properly handle empty rows in Synopsis. + + * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit + ` ' for empty fields. + +2014-12-02 Werner Lemberg + + [docmaker] Thinko. + + * src/tools/docmaker/content.py (DocBlock::get_markup_words_all): + Emit `/empty/' string for first element also. + +2014-12-02 Werner Lemberg + + [docmaker] Honour empty lines in `' section element. + + This greatly improves the readability of the `Synopsis' links. + + * src/tools/docmaker/content.py (DocBlock::get_markup_words_all): + Insert string `/empty/' between items. + + * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it + robust against nonexistent keys. + + * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit + empty elements for `/empty/'. + +2014-12-02 Werner Lemberg + + [docmaker] Ensure Python 3 compatibility. + + * src/tools/docmaker/content.py (ContentProcessor::set_section, + ContentProcessor::finish): Replace `has_key' function with `in' + keyword. + + * 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/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/<>/>/. + + * src/tools/docmaker/utils.py: Import `itertools'. + (index_sort): Replaced by... + (index_key): ... this new key generator (doing exactly the same). + +2014-11-29 Werner Lemberg + + [docmaker] Don't output a block multiple times. + + This bug was hidden by not processing all lines of `' blocks. + + * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter + out field names. + +2014-11-29 Werner Lemberg + + [docmaker] Use field values as HTML link targets where possible. + + * 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. + +2014-11-29 Werner Lemberg + + [docmaker] Allow empty lines in `' blocks. + + Before this patch, the suggested order of entries stopped at the + first empty line. + + Obviously, nobody noticed that this problem caused a much reduced + set of links in the `Synopsis' sections; in particular, the + `' blocks contain a lot of entries that wouldn't be listed + otherwise... + + * src/tools/docmaker/content.py (DocBlock::get_markup_words_all): + New function to iterate over all items. + (DocSection::process): Use it. + +2014-11-29 Werner Lemberg + + * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp. + + After the single asterisk there must be no other immediately following + asterisk. + +2014-11-29 Werner Lemberg + + * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing. + +2014-11-29 Werner Lemberg + + [docmaker] Improve HTML code for table of contents. + + * src/tools/docmaker/tohtml.py: Introduce a new table class `toc', + together with proper CSS. + +2014-11-29 Werner Lemberg + + [docmaker] Provide higher-level markup and simplify HTML. + + * src/tools/docmaker/tohtml.py: Instead of using extraneous `
' + elements, use CSS descendants (of class `section') to format the + data. + + Also remove reduntant

and
elements, replacing them with + proper CSS. + + Globally reduce page width to 75%. + + (block_header): Rename

class to `section'. + +2014-11-29 Werner Lemberg + + [docmaker] Add `top' links after blocks. + + * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it. + +2014-11-29 Werner Lemberg + + * src/tools/docmaker/tohtml.py: Improve CSS for fields. + + Make fields align horizontally relative to full line width. + +2014-11-29 Werner Lemberg + + * src/tools/docmaker/tohtml.py: Fix index and TOC templates. + + This thinko was introduced 2014-11-27. + +2014-11-28 Werner Lemberg + + [docmaker] Format field lists with CSS. + + This also simplifies the inserted HTML code. + + * src/tools/docmaker/tohtml.py + (HtmlFormatter::print_html_field_list): Do it. + +2014-11-28 suzuki toshiya + + Fix compiler warning to the comparison between signed and + unsigned variable. + + * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison + between `ypos + ysize' and FT_INT_{MAX,MIN}. + +2014-11-28 Werner Lemberg + + [docmaker] Replace empty `' with CSS. + + * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do + it. + +2014-11-28 Werner Lemberg + + [docmaker] Replace some `' tags with `

' and `
'. + + * src/tools/docmaker/tohtml.py (marker_*): Use `

'. + (source_*): Use `
'. + (HtmlFormatter::block_enter): s/

/

/. + +2014-11-28 suzuki toshiya + + Fix compiler warning to conversion specifiers in debug messages. + + * 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. + +2014-11-27 Werner Lemberg + + * src/tools/docmaker/tohtml.py: Use more CSS for index. + +2014-11-27 Werner Lemberg + + [docmaker] Replace `name' attribute of `' with `id'. + + * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it. + +2014-11-27 Werner Lemberg + + * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes. + + For `Index' and `TOC' links, we now simply use the `text-align' CSS + property of `

' to enforce flush-left and flush-right, + eliminating the hack with an empty, full-width `' element + inbetween. + + The change also enforces the same (smaller) size for all index and + TOC links. + +2014-11-27 suzuki toshiya + + * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(), + cf2font.c could not find it under `make multi' build. + +2014-11-27 suzuki toshiya + + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove + unrequired negative value check for `width' and `height'. + +2014-11-27 Werner Lemberg + + * src/tools/docmaker/tohtml.py: More HTML table refactoring. + + Replace some `' tags with `
' to simplify structure. + + Move `bgcolor' attribute to CSS. + + Replace most `width' attributes with CSS. The remaining instances + (providing a similar effect as LaTeX's `\hfill' command) are removed + in a later patch. + +2014-11-27 Werner Lemberg + + * src/tools/docmaker/tohtml.py: Replace with CSS. + +2014-11-27 Werner Lemberg + + * src/tools/docmaker/tohtml.py: Center
with CSS. + +2014-11-27 Werner Lemberg + + * src/tools/docmaker/tohtml.py: Replace `
' with `
'. + +2014-11-27 Werner Lemberg + + * src/tools/docmaker/tohtml.py: Remove redundant `
' tags. + + This starts a series of commits into the direction of generating + valid HTML 5 code, especially using much more CSS. + +2014-11-27 suzuki toshiya + + Prevent too negative values (< FT_INT_MIN) in bitmap metrics, + suggested by Alexei. + + * 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. + +2014-11-27 Werner Lemberg + + [docmaker] Produce better HTML code. + + * src/tools/docmaker/tohtml.py: Always use double quotes for + attribute values. + (source_footer): Close `td' and `tr' groups. + +2014-11-27 Werner Lemberg + + Use better way to disable creation of .pyc files for `make refdoc'. + + Python 2.6 was released in 2008... + + * builds/freetype.mk (refdoc): Use python's `-B' option. + + * builds/detect.mk (std_setup, dos_setup): Mention required python + version for `refdoc' target. + +2014-11-27 Werner Lemberg + + * src/tools/docmaker/sources.py (re_bold, re_italic): Use + non-grouping parentheses. + * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word): + Updated. + +2014-11-27 Werner Lemberg + + * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning. + + Introdruced in previous change. Reported by Alexei. + +2014-11-26 Werner Lemberg + + * src/*: Add checks for parameters of API functions where missing. + + `API functions' are functions tagged with `FT_EXPORT_DEF'. + + Besides trivial fixes, the following changes are included, too. + + * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set + error code if no service is available. + + * src/base/ftinit.c (FT_Done_FreeType): Change return value for + invalid `library' parameter to `Invalid_Library_Handle'. + + * src/base/ftobjs.c (FT_New_Size): Change return value for invalid + `asize' parameter to `Invalid_Argument'. + + * 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'. + +2014-11-26 Werner Lemberg + + * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'. + +2014-11-26 suzuki toshiya + + * src/base/ftobj.c (Mac_Read_POST_Resource): Additional + overflow check in the summation of POST fragment lengths, + suggested by Mateusz Jurczyk . + +2014-11-26 suzuki toshiya + + * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments + and fold too long tracing messages. + +2014-11-26 suzuki toshiya + + Fix Savannah bug #43540. + + * src/base/ftmac.c (parse_fond): Prevent a buffer overrun + caused by a font including too many (> 63) strings to store + names[] table. + +2014-11-26 suzuki toshiya + + * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long + variables to read the lengths in POST fragments. Suggested by + Mateusz Jurczyk . + +2014-11-26 suzuki toshiya + + Fix Savannah bug #43539. + + * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow + by a broken POST table in resource-fork. + +2014-11-26 suzuki toshiya + + Fix Savannah bug #43538. + + * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow + by a broken POST table in resource-fork. + +2014-11-26 suzuki toshiya + + * 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. + +2014-11-25 Werner Lemberg + + */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate. + +2014-11-25 Werner Lemberg + + */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate. + +2014-11-25 Werner Lemberg + + */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate. + +2014-11-25 Werner Lemberg + + */*: s/Invalid_Argument/Invalid_Outline/ where appropriate. + +2014-11-25 Werner Lemberg + + */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate. + +2014-11-24 Werner Lemberg + + [Savannah bug #43682] Adjust some renderer callbacks. + + * src/raster/ftraster.c (ft_black_set_mode): Change return type to + `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype. + + * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function + for orthogonality. + (ft_grays_raster): Use it. + +2014-11-25 Werner Lemberg + + [Savannah bug #43682] Properly handle missing return errors. + + The functions in this patch *do* return non-trivial errors that must + be taken care of. + + * 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) , + src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode + (t1_decoder_parse_charstrings) , src/truetype/ttgload.c + (load_truetype_glyph , 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. + +2014-11-25 Werner Lemberg + + [Savannah bug #43682] Add/remove `void' casts to some 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/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. + +2014-11-25 Werner Lemberg + + [Savannah bug #43682] Change some signatures to `void' return type. + + * 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/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. + +2014-11-24 Werner Lemberg + + Remove all code related to FT_MAX_CHARMAP_CACHEABLE. + + This is no longer used. + + * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c, + src/sfnt/ttcmap.c: Do it. + +2014-11-24 Werner Lemberg + + [sfnt] Fix Savannah bug #43680. + + This adds an additional constraint to make the fix from 2013-01-25 + really work. + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) : + Check `p' before `num_glyphs'. + +2014-11-24 Werner Lemberg + + [truetype] Fix Savannah bug #43679. + + * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of + `record_size'. + +2014-11-24 Jarkko Pöyry + + [cff, pfr, psaux, winfonts] Fix Savannah bug #43676. + + Don't cast cmap init function pointers to an incompatible type. + + Without this patch, the number of parameters between declaration and + the real signature differs. Calling such a function results in + undefined behavior. + + 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. + + 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. + + * 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. + +2014-11-24 Werner Lemberg + + [sfnt] Fix Savannah bug #43672. + + * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for + minimum table length test. + +2014-11-24 Werner Lemberg + + [type1, type42] Another fix for Savannah bug #43655. + + * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c + (t42_parse_charstrings): Add another boundary testing. + +2014-11-24 Werner Lemberg + + [docmaker] Formatting, copyright, improved documentation. + + * src/tools/docmaker/*: No code changes besides trivial + modifications. + +2014-11-22 Werner Lemberg + + [bdf] Fix Savannah bug #43660. + + * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check + `_BDF_GLYPH_BITS'. + +2014-11-22 Werner Lemberg + + [type42] Allow only embedded TrueType fonts. + + This is a follow-up to Savannah bug #43659. + + * 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 + + [type42] Fix Savannah bug #43659. + + * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'. + + * 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. + +2014-11-22 Werner Lemberg + + [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 + + [sfnt] Fix Savannah bug #43656. + + * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity + tests. + +2014-11-21 Werner Lemberg + + [type1, type42] Fix Savannah bug #43655. + + * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c + (t42_parse_charstrings): Fix boundary testing. + +2014-11-21 Werner Lemberg + + * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics. + +2014-11-21 Werner Lemberg + + [ftlcdfil] Obey flow direction. + + * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy): + Handle `up' flow. + +2014-11-21 Werner Lemberg + + * 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 + + * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve. + + This commit adds argument checks and support for different flow + directions. + +2014-11-20 Werner Lemberg + + * src/base/ftbitmap.c (FT_Bitmap_New): Check argument. + +2014-11-19 Werner Lemberg + + 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. + +2014-11-19 Werner Lemberg + + Make `FT_Bitmap_Convert' correctly handle negative `pitch' values. + + * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value + for the pitch while copying data. + Correctly set pitch sign in target bitmap. + +2014-11-19 Werner Lemberg + + Minor code improvement in `FT_Bitmap_Embolden'. + + * src/base/ftbitmap.c (FT_Bitmap_Embolden) : + Fix thinko. + +2014-11-19 Alexei Podtelezhnikov + + * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table. + +2014-11-19 Behdad Esfahbod + + Avoid compiler warnings on x86-64 for `FT_MulFix'. + + `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. + + * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add + casts. + +2014-11-15 Werner Lemberg + + [sfnt] Fix Savannah bug #43597. + + * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large + bitmaps. + +2014-11-12 Werner Lemberg + + [sfnt] Fix Savannah bug #43591. + + * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition + and multiplication overflow. + +2014-11-12 Werner Lemberg + + [sfnt] Fix Savannah bug #43590. + + * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): + Protect against addition overflow. + +2014-11-12 Werner Lemberg + + [sfnt] Fix Savannah bug #43589. + + * src/sfnt/sfobjs.c (woff_open_font): Protect against addition + overflow. + +2014-11-12 Werner Lemberg + + [sfnt] Fix Savannah bug #43588. + + * 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. + +2014-11-10 Alexei Podtelezhnikov + + [base] CORDIC improvements. + + 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. + + * src/base/fttrigon.c (ft_trig_downscale): Borrow code from + ./ftcalc.c (ft_multo64), change linear intercept. + (ft_trig_pseudo_polarize): Decrease `theta' padding. + +2014-11-09 Werner Lemberg + + * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections. + + One more place to check whether `radius' is zero. + + Problem reported by Marco Wertz . + +2014-11-07 Werner Lemberg + + [bdf] Fix Savannah bug #43535. + + * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one + character more than `strncmp'. + s/ft_strncmp/_bdf_strncmp/ everywhere. + +2014-11-06 Werner Lemberg + + [pcf] Fix Savannah bug #43548. + + * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row + and column values. + +2014-11-06 Werner Lemberg + + [pcf] Fix Savannah bug #43547. + + * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset' + values. + +2014-11-06 Werner Lemberg + + * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak. + +2014-11-03 Infinality + + * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated. + + The previous commit deteriorates rendering of DejaVu and similar + fonts; this gets compensated with this rule. + +2014-11-03 Werner Lemberg + + * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting. + + 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. + + We now follow the whitepaper more closely so that DELTAP[123] + instructions for touched points in the non-subpixel direction are + executed. + +2014-10-31 Alexei Podtelezhnikov + + [smooth] Improve code readability. + + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code. + +2014-10-31 Alexei Podtelezhnikov + + [smooth] Reduce outline translations during rendering. + + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin + virtually by modifying cbox, actually translate outline if cumulative + shift is not zero. + +2014-10-30 Alexei Podtelezhnikov + + [smooth] Fix Savannah bug #35604 (cont'd). + + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and + casts that became unnecessary after the variable type upgrades. + +2014-10-29 Alexei Podtelezhnikov + + [smooth] Improve code readability. + + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code. + +2014-10-29 Alexei Podtelezhnikov + + Unify hypotenuse approximations. + + * 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. + +2014-10-25 Werner Lemberg + + [cff] Test valid darkening parameter macros in `ftoption.h'. + + We no longer need an otherwise unused typedef that can cause a gcc + warning. + Problem reported by Alexei. + + * 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 ... + + * devel/ftoption.h, include/config/ftoption.h: ... here. + +2014-10-25 Alexei Podtelezhnikov + + Improve flat corner definition. + + * 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. + +2014-10-23 David Weiß + + [build] Improve property file for vc2010. + + User-defined properties should be empty by default to prevent linker + failures. + + * builds/windows/vc2010/freetype.user.props, + builds/windows/vc2010/freetype.vcxproj: + s/OptionsDirectory/UserOptionDirectory/. + Comment out all user options. + +2014-10-23 Werner Lemberg + + [cff] Work around bug in preprocessor of MSVC 2010. + + We have been hit by + + https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr + + * 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/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no + longer need double expansion. + (SET_DARKENING_PARAMETERS_0): Renamed to ... + (SET_DARKENING_PARAMETERS): ... this. + Update call. + +2014-10-20 Werner Lemberg + + [sbit] Minor fixes. + + * 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. + +2014-10-19 Alexei Podtelezhnikov + + [truetype] Clean up bytecode rounding. + + Zero distance does not have to be treated specially if you follow + specifications and check the sign as the very last step of rounding. + + * 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. + +2014-10-18 Alexei Podtelezhnikov + + [truetype] Unwrap engine compensation settings. + + * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated. + +2014-10-18 David Weiß + + [build] Add property file to vc2010 project. + + This simplifies custom build configurations, especially for + automated build environments. + + * builds/windows/vc2010/freetype.user.props: New configuration file. + + * builds/windows/vc2010/freetype.vcxproj: Include + `freetype.user.props' and use its data fields. + + * builds/windows/vc2010/index.html: Updated. + +2014-10-18 Werner Lemberg + + [autofit] Add blue-zone support for Telugu. + + 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. + + * src/autofit/afblue.dat: Add blue zone data for Telugu. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Telugu standard characters and move + data out of AF_CONFIG_OPTION_INDIC block. + + * 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 + + [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 + Werner Lemberg + + [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 + + [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 + + A better fix for Savannah bug #43392. + Suggested by Doug Felt . + + * 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ß + + [build] Better optimization settings for vc2010 solution file. + + * builds/windows/vc2010/freetype.sln, + builds/windows/vc2010/freetype.vcxproj: Updated. + +2014-10-14 Werner Lemberg + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + * src/base/ftcalc.c: Remove miscellaneous type casts. + +2014-10-01 Alexei Podtelezhnikov + + [base] Use more common `FT_MSB' implementation with masks. + + * src/base/ftcalc.c (FT_MSB): Updated. + +2014-09-30 Alexei Podtelezhnikov + + [base] Clean up. + + * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used + code. + +2014-09-25 Alexei Podtelezhnikov + + [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 + + [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 + + [autofit] Minor code streamlining. + + * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant + initialization. + +2014-09-19 Alexei Podtelezhnikov + + * src/base/ftcalc.c: Harmonize code. + +2014-09-15 Alexei Podtelezhnikov + + [base] Tighten the overflow check in `FT_MulDiv'. + + * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated. + +2014-09-08 Alexei Podtelezhnikov + + Fix Savannah bug #43153. + + * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against + overflow in `divider'. + +2014-09-03 Alexei Podtelezhnikov + + [base] Tighten the overflow check in `FT_DivFix'. + + This fixes a 13-year old bug. The original overflow check should have + been updated when rounding was introduced into this function + (c2cd00443b). + + * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated. + * include/freetype.h (FT_DivFix): Updated documentation. + +2014-09-03 Alexei Podtelezhnikov + + [base] Tighten the overflow check in `FT_MulFix'. + + * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated. + +2014-09-02 Alexei Podtelezhnikov + + [truetype] Shortcut ppem calculations for square pixels. + + * 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'. + +2014-08-31 Behdad Esfahbod + + Don't use `register' keyword. Fixes compiler warnings. + + * 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. + +2014-08-24 Alexei Podtelezhnikov + + [truetype] Optimize DELTAP and DELTAC. + + * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem + calculations outside of the loop. + +2014-08-21 Alexei Podtelezhnikov + + 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 + + [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 + + [base] Use unsigned calculation in `FT_MulDiv'. + + * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range. + +2014-08-18 Alexei Podtelezhnikov + + [base] Remove truncation in `FT_DivFix'. + + * src/base/ftcalc.c (FT_DivFix): Updated. + +2014-08-14 Alexei Podtelezhnikov + + Minor refactoring. + + * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated. + +2014-08-14 Alexei Podtelezhnikov + + Turn FT_MSB into a macro when using gcc builtins. + + * src/base/ftcalc.c, include/internal/ftcalc.h: Updated. + +2014-08-12 Alexei Podtelezhnikov + + [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 + + [base] Handle collapsed outlines to avoid undefined FT_MSB. + + * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update. + +2014-08-11 Alexei Podtelezhnikov + + [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 + + * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor. + +2014-07-26 Werner Lemberg + + [cff] Fix typo. + + * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct + offsets in third quadrant. + + Reported by maks . + +2014-07-17 Werner Lemberg + + Fix Savannah bug #42788. + + * src/pfr/pfrobjs.c: Include `ftcalc.h'. + +2014-07-16 Alexei Podtelezhnikov + + 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. + +2014-07-15 Alexei Podtelezhnikov + + * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins. + +2014-07-15 Alexei Podtelezhnikov + + [base] Move assembler code back in the source file. + + FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b. + + * include/config/ftconfig.h, builds/unix/ftconfig.in, + builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here... + + * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here. + +2014-07-14 Alexei Podtelezhnikov + + [base] Further clean up color bitmap conversion. + + * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop + using FT_MulFix and FT_DivFix since all calculations fit into 32 bits. + +2014-07-13 Werner Lemberg + + [truetype] Improve handling of buggy `prep' tables. + + 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/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. + + * 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. + + * 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. + +2014-07-12 Werner Lemberg + + * builds/vms/ftconfig.h: Synchronize. + Problem reported by Alexei. + +2014-07-11 Alexei Podtelezhnikov + + [base] Clean up bitmap conversion. + + * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use + appropriate FT_DivFix and remove superfluous upscaling. + +2014-07-04 Alexei Podtelezhnikov + + [base] Small optimization of the ancient code. + + * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the + condition for direct 32-bit calculations. + +2014-06-27 Werner Lemberg + + Fix Apple standard glyph names. + + * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with + `tools/glnames.py' + + Problem reported by Adam Twardoch . + +2014-06-17 Werner Lemberg + + Partially revert commit from 2014-06-13. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move + declaration of `p_first' and `p_last' out of the loop. + +2014-06-17 Werner Lemberg + + * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/. + + This simplifies cross-compiling. + +2014-06-13 Werner Lemberg + + Fix more compiler warnings. + Reported by Wojciech Mamrak . + + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Make integer constant unsigned. + + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) + : Fix types. + (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper + casts. + +2014-06-13 Werner Lemberg + + Fix compiler warnings. + Reported by Wojciech Mamrak . + + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage), + src/autofit/afmodule.c (af_property_set): Fix `signed' vs. + `unsigned' issues. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler + happy. + + * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements + for `fir'. + Fix `signed' vs. `unsigned' issues. + + * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused. + (WRITE_USHORT, WRITE_ULONG): Add proper casts. + + * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts. + + * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1' + and `B2'. + +2014-05-16 Alexey Petruchik + + [cmake] Add option to build OS X framework. + + * CMakeLists.txt: Update accordingly. + + * builds/mac/freetype-Info.plist: New file. + +2014-05-13 Pavel Koshevoy + + * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'. + +2014-05-11 Werner Lemberg + + [autofit] Fix variable initializations. + + * src/autofit/afhints.c (af_glyph_hints_reload): Assign default + values to `in_dir' and `out_dir' for all points. + +2014-05-11 Werner Lemberg + + [autofit] Fix crash with font `CabinSketch-Bold.ttf'. + + Problem reported by Ralf S. Engelschall . + + * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for + finding first non-near point. + Properly initialize non-near point deltas. + +2014-05-01 Werner Lemberg + + [autofit] Add blue-zone support for Devanagari. + + This essentially moves the Devanagari script from the `Indic' hinter + to the `Latin' hinter. Thanks to Girish Dalvi + for guidance with blue zone characters! + + * src/autofit/afblue.dat: Add blue zone data for Devanagari. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Devanagari standard characters and + move data out of AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afranges.c: Move Devanagari data out of + AF_CONFIG_OPTION_INDIC block. + Move U+20B9, (new) Rupee sign, from Latin to Devanagari. + + * src/autofit/afstyles.h: Update Devanagari data; in particular, use + AF_WRITING_SYSTEM_LATIN. + +2014-05-01 Werner Lemberg + + [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 + + [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 + + * src/autofit/hbshim.c: Partially revert commit from 2014-04-17. + + Using input glyph coverage data is simply wrong. + + Problem reported by Nikolaus Waxweiler and + Mantas Mikulėnas . + +2014-04-23 Werner Lemberg + + * 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 . + +2014-04-22 Werner Lemberg + + * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/. + +2014-04-20 Werner Lemberg + + [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 + + [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 + + 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 + + [afblue.pl]: Minor improvements. + + * src/tools/afblue.pl: Allow whitespace before comments. + Ignore whitespace in strings. + +2014-04-14 Werner Lemberg + + [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 + + [smooth] Fix stand-alone compilation. + + * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define. + +2014-04-12 Werner Lemberg + + [autofit] Redesign the recognition algorithm of strong points. + + In particular, local extrema without horizontal or vertical segments + are better recognized: + + + 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 + + [autofit] Improve scoring algorithm for identifying stems. + + Problem reported by Karsten Lücke . + + 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 + + Don't require `gzip' module for `sfnt'. + + Reported by Preet . + + * src/sfnt/sfobjs.c (woff_open_font): Guard use of + FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB. + +2014-03-27 Werner Lemberg + + 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 + + Fix Savannah bug #41946. + + Based on a patch from Marek Kašík . + + * 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 + + Another revert for the change from 2014-03-18. + + Problem reported by Nikolaus Waxweiler . + + * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol + gets always exported. + +2014-03-20 Werner Lemberg + + CMakeLists.txt: Another fix for include directories. + + Problem reported by Taylor Holberton . + +2014-03-19 Werner Lemberg + + CMakeLists.txt: Fix include directories. + + Problem reported by Taylor Holberton . + +2014-03-19 Werner Lemberg + + 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 + Werner Lemberg + + 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 + + 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. + +2014-03-14 Werner Lemberg + + * builds/unix/configure.raw: Don't show error messages of `which'. + +2014-03-09 Alan Coopersmith + + 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 + + * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning. + +2014-03-06 Werner Lemberg + + * 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.5.2/2.5.3/, s/252/253/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. + + * builds/unix/configure.raw (version_info): Set to 17:2:11. + * CMakeLists.txt (VERSION_PATCH): Set to 3. + * docs/CHANGES: Updated. + +2014-03-06 Werner Lemberg + + Fixes for compilation with C++. + + * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'. + (af_get_coverage): Updated. + (COVERAGE): Add cast. + +2014-03-06 Sean McBride + + Remove more clang analyzer warnings. + + * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c + (TT_Load_Glyph): Remove dead stores. + +2014-03-05 Werner Lemberg + + * builds/unix/configure.raw: Simplify. + +2014-03-05 suzuki toshiya + + Fix a bug in configure in library dependency setting + Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652. + + * builds/unix/configure.raw: Use `x"${xxx}" != xno' style. + +2014-03-04 Werner Lemberg + + Minor fix for `make devel'. + + * 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). + +2014-03-04 Sean McBride + + Fix several clang static analyzer dead store warnings. + + * src/autofit/afhints.c (af_glyph_hints_reload, + af_glyph_hints_align_weak_points): Remove unnecessary assignments. + + * src/bdf/bdflib.c (bdf_font_load): Ditto. + + * src/pshinter/pshalgo.c (psh_glyph_compute_extrema, + psh_glyph_interpolate_other_points): Ditto. + + * src/type1/t1load.c (T1_Set_MM_Blend): Ditto. + +2014-03-03 Werner Lemberg + + Rewrite library option handling in `configure'. + + o Introduce `auto' value for `--with-XXX' library options; this is + now the default. + + o First use `pkg-config' for library detection, then fall back to + other tests. + + * 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. + + * 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/freetype2.in, builds/unix/unix-def.in: Updated. + +2014-03-01 Werner Lemberg + + Avoid `long long' warnings with older gcc compilers. + Problem reported by Hin-Tak Leung . + + * 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. + +2014-03-01 Werner Lemberg + + * docs/INSTALL.CROSS: Revised and updated. + +2014-03-01 Werner Lemberg + + Make `make clean' remove `freetype2.pc'. + + This is a generated file at build time, not configure time. + + * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ... + (CLEAN): This variable. + +2014-03-01 Werner Lemberg + + Use pkg-config for detecting libpng and libbz2 also. + + * 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. + +2014-03-01 Werner Lemberg + + Add configure support for HarfBuzz. + + * 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. + + * docs/INSTALL.UNIX: Document interdependency of Freetype with + HarfBuzz. + +2014-02-28 Alexei Podtelezhnikov + + [cff] Math simplifications. + + * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'. + * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division. + +2014-02-28 Dave Arnold + + [cff] Fix Savannah bug #41697, part 2. + + * 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. + +2014-02-28 Dave Arnold + + [cff] Fix Savannah bug #41697, part 1. + + * 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'. + +2014-02-26 Werner Lemberg + + [sfnt] Fix Savannah bug #41696. + + * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate, + tt_cmap4_validate, tt_cmap14_validate): Fix limit tests. + +2014-02-26 Werner Lemberg + + [winfnt] Fix Savannah bug #41694. + + * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset. + +2014-02-26 Werner Lemberg + + [cff] Fix Savannah bug #41693. + + * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array. + +2014-02-26 Werner Lemberg + + [bdf] Fix Savannah bug #41692. + + 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. + + 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. + + * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons + stop at string ends. + +2014-02-17 suzuki toshiya + + [autofit] Fix `make multi' compilation. + + * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'. + +2014-02-19 Werner Lemberg + Simon Bünzli + + Fix Savannah bug #32902. + + Patch taken from + + https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87 + + with slight modifications. + + * 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. + +2014-02-19 Simon Bünzli + + Fix Savannah bug #41590. + + * src/type1/t1load.c (parse_encoding): Protect against invalid + number. + +2014-02-12 Dave Arnold + + [cff] Optimize by using `FT_MulDiv'. + Suggested by Alexei. + + * src/cff/cf2font.c (cf2_computeDarkening): Do it. + +2014-02-12 Werner Lemberg + + Fix Savannah bug #41465. + + * builds/unix/unix-def.in (CLEAN): Add `freetype-config'. + (DISTCLEAN): Remove `freetype-config'. + +2014-02-08 Sean McBride + + Fix clang static analyzer and compiler warnings. + + * src/autofit/afhints.c (af_glyph_hints_align_weak_points), + src/autofit/afloader (af_loader_load_g) , + 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. + + * 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. + + * src/base/ftobjs.c (ft_remove_renderer): Protect against + library == NULL. + (ft_property_do): Make function static. + + * src/base/ftrfork.c: Include `ftbase.h'. + + * 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. + + * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of + variable. + +2014-02-08 Werner Lemberg + + Fix Windows build directories. + + The build target is now `windows' instead of `win32'. + + Problem reported by Nickolas George . + + * builds/modules.mk: Don't use `win32' and `win16' (!) but + `windows'. + + * builds/windows/detect.mk, builds/windows/win32-def.mk: + s/win32/windows/. + +2014-02-08 Eugen Sawin + + Fix Savannah bug #41507. + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) + [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling. + +2014-02-08 Dave Arnold + + [cff] Fix minor performance bug. + + * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone + calculations are now cached and not recomputed on each glyph. + +2014-02-05 Werner Lemberg + + Fix problems with perl 5.8.8 as distributed with current MinGW. + + * src/tools/afblue.pl: Work-around for Perl bug #63402. + (string_re): Avoid `possessive quantifiers', which have been + introduced in Perl version 5.10. + +2014-02-04 Werner Lemberg + + Fix compilation with MinGW. + + 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. + + https://sourceforge.net/p/mingw/bugs/2024/ + https://sourceforge.net/p/mingw/bugs/2046/ + + * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW. + +2014-02-04 Werner Lemberg + + [autofit] Minor fix. + + * 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. + +2014-02-03 Werner Lemberg + + [cff] Fix Savannah bug #41363. + + * 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. + +2014-01-26 Werner Lemberg + + [autofit] Introduce two more slots for standard characters. + + 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. + + * src/autofit/afscript.h: Add more standard characters. + + * 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/autofit/afglobal.c, src/autofit/afglobal.h, + * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c: + Update use of `SCRIPT' macro. + + * src/autofit/afcjk.c (af_cjk_metrics_init_widths), + src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more + standard characters. + +2014-01-24 Werner Lemberg + + Fix Savannah bug #41320. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues) + : Avoid negative index of `last'. + +2014-01-23 Werner Lemberg + + Fix Savannah bug #41310. + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) : + Don't check metrics, which this format doesn't have. + This is another correction to the commit from 2013-11-21. + +2014-01-23 Werner Lemberg + + Fix Savannah bug #41309. + + * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result + of `T1_ToFixedArray'. + + * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with + `t1_parse_font_matrix'. + + * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with + `t1_parse_font_matrix'. + (t42_parse_encoding): Synchronize with `t1_parse_encoding'. + + * src/psaux/psobjs.c (ps_parser_load_field) , + : Properly handle result of `ps_tofixedarray'. + +2014-01-22 Werner Lemberg + + * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks. + +2014-01-16 Werner Lemberg + + [autofit] Improve tracing of style coverages. + + * include/internal/fttrace.h: Add `afglobal' for tracing style + coverages. + + * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H. + (FT_COMPONENT): Define. + (af_face_globals_compute_style_coverage): Trace `gstyles' array + data. + +2014-01-09 Werner Lemberg + + Fix Savannah bug #41158. + + * builds/unix/install.mk (install): Create man page directory. + +2014-01-08 Chongyu Zhu + + [arm] Fix Savannah bug #41138, part 2. + + * 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'. + +2014-01-08 Werner Lemberg + + [autofit] Fix Savannah bug #41138, part 1. + + * src/tools/afblue.pl : Produce correct auxiliary + enumeration names for generated `#else'. + + * src/autofit/afblue.h: Regenerated. + +2014-01-06 Werner Lemberg + + Add manual page for `freetype-config'. + Contributed by Nis Martensen . + + * docs/freetype-config.1: New file. + + * builds/unix/unix-def.in (mandir): Define. + * builds/unix/install.mk (install, uninstall): Handle manpage. + +2014-01-05 Werner Lemberg + + [autofit] Minor fixes for `afblue.pl'. + + * src/tools/afblue.pl (aux_name): Don't use `reverse'. + : Use proper indentation for generated `#else'. + + * src/autofit/afblue.h: Regenerated. + +2014-01-04 Werner Lemberg + + [autofit] Fix Indic scripts. + + 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. + + * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and + AF_CONFIG_OPTION_CJK. + + * 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. + + * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated. + [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed. + Sort entries by tags. + +2014-01-03 Werner Lemberg + + [autofit] Thinko. + + * src/autofit/hbshim.c (af_get_char_index): Similar to + `af_get_coverage', reject glyphs which are not substituted. + +2014-01-03 Werner Lemberg + + [autofit] Fix handling of default coverages. + + With this commit, the implementation of coverage handling is + completed. + + * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to + do. + Reject coverages which don't contain appropriate glyphs for blue + zones. + +2014-01-03 Werner Lemberg + + [autofit] Fix handling of default coverages. + + * 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. + +2014-01-03 Werner Lemberg + + [autofit] Fix scaling of HarfBuzz shaping. + + * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM. + +2014-01-03 Werner Lemberg + + [autofit] Better ftgrid support. + + * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add + parameters `is_blue' and `blue_offset'. + +2014-01-01 Werner Lemberg + + [autofit] Remove some styles. + + * src/autofit/afcover.h: Remove coverages for alternative fractions, + denominators, numerators, and fractions. + + * src/autofit/afstyles.h (META_STYLE_LATIN): Updated. + +2014-01-01 Werner Lemberg + + [autofit] Add more styles. + + * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New + auxiliary macros; use them to define styles for Cyrillic, Greek, and + Latin. + + * 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. + + * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit + `options' parameter to 4 bits. + +2014-01-01 Werner Lemberg + + [autofit] Fix style assignments to glyphs. + + * 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. + +2014-01-01 Werner Lemberg + + * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/. + +2014-01-01 Werner Lemberg + + [autofit] Implement and use `af_get_char_index' with HarfBuzz. + + * 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. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use + `y_offset' to adjust `best_y'. + +2013-12-31 Werner Lemberg + + [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i. + +2013-12-31 Werner Lemberg + + [autofit] Fix interface of `af_get_char_index'. + + * 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). + + * src/autofit/hbshim.h, src/autofit/afcjk.c, + src/autofit/aflatin.c: Updated. + +2013-12-30 Werner Lemberg + + [autofit] Don't combine multiple features into one set. + + 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. + + * 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'. + + * src/autofit/aftypes.h: Updated. + * src/autofit/hbshim.c: Updated. + +2013-12-28 Werner Lemberg + + [autofit] Code shuffling to reduce use of cpp macros. + + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Call `af_get_coverage' unconditionally. + + * src/autofit/autofit.c: Include `hbshim.c' unconditionally. + + * src/autofit/hbshim.c (af_get_coverage) + [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function. + + * src/autofit/hbshim.h: Provide function declarations + unconditionally. + +2013-12-28 Werner Lemberg + + [autofit] Add wrapper function for `FT_Get_Char_Index'. + + Yet-to-come changes will provide HarfBuzz functionality for the new + function. + + * src/autofit/hbshim.c (af_get_char_index): New function. + * src/autofit/hbshim.h: Updated. + + * src/autofit/afcjk.c (af_cjk_metrics_init_widths, + af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated. + + * src/autofit/aflatin.c (af_latin_metrics_init_widths, + af_latin_metrics_init_blues, af_latin_metrics_check_digits): + Updated. + +2013-12-28 Werner Lemberg + + [autofit] Use `global' HarfBuzz font object. + + We now use `hb_font' instead of `hb_face' since yet-to-come changes + need this. + + * src/autofit/afglobal.h: Include `hbshim.h'. + (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member + `hb_font'. + + * 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/autofit/hbshim.h: Include HarfBuzz headers. + + * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz + headers. + (af_get_coverage): Updated. + +2013-12-27 Werner Lemberg + + [autofit] Handle `DFLT' OpenType script for coverages. + + * include/ftautoh.h: Document new `default-script' property. + + * 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. + + * src/autofit/hbshim.h: Updated. + + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Updated. + + * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro. + + * src/autofit/afmodule.h (AF_ModuleRec): New `default_script' + member. + + * src/autofit/afmodule.c (af_property_set, af_property_get): Handle + `default-script' property. + (af_autofitter_init): Updated. + +2013-12-27 suzuki toshiya + + [ftrfork] Fix the face order difference between POSIX and Carbon. + + 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. + + http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html + http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html + + * 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. + +2013-12-25 Werner Lemberg + + Fix Savannah bug #40997. + + * 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. + +2013-12-21 Werner Lemberg + + [autofit] Introduce `coverages'. + + Coverages are the interface to the HarfBuzz library to acces + OpenType features for handling glyphs not addressable by the cmap. + + 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. + + 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. + + * devel/ftoption.h, include/config/ftoption.h + (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro. + + * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h: + New files. + + * src/autofit/afscript.h: Add HarfBuzz script name tags. + + * src/autofit/afstyles.h: Add default coverage enumeration values. + + * 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. + + * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage + data. + + * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros. + (AF_SCRIPT_FALLBACK): Renamed to ... + (AF_STYLE_FALLBACK): ... this. + + * 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. + + * src/autofit/afmodule.h (AF_ModuleRec): + s/fallback_script/fallback_style/. + + * 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. + + * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros. + + * src/autofit/afranges.h: Update use of `SCRIPT' macro. + + * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include + `hbshim.c'. + + * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'. + (AUTOF_DRV_H): Add `afcover.h'. + + * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for + all libraries needed by FreeType. + +2013-12-21 Werner Lemberg + + Fix Savannah bug #40975 (sort of). + + * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType + behave the same as the Windows TrueType engine for the invalid case. + +2013-12-21 Werner Lemberg + + [autofit] Make PIC mode work actually. + + * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the + enumeration values automatically generated by including `afscript.h' + and friends. + + * src/autofit/afpic.c (autofit_module_class_pic_init): Updated. + +2013-12-21 Werner Lemberg + + Fix PIC linking. + + * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix + generated function name. + + * 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/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so + that PIC functions are compiled also. + +2013-12-21 Werner Lemberg + + [base] Add missing dependencies to Makefile. + + * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'. + (BASE_H): Add `basepic.h'. + +2013-12-20 Werner Lemberg + + [autofit] Fix PIC compilation. + + * 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/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and + AF_DEFINE_STYLE_CLASS. + + * src/autofit/afpic.c: Include `afglobal.h'. + (autofit_module_class_pic_init): Typo. + + * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS, + AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro + parameter and structure member. + +2013-12-20 Werner Lemberg + + [autofit] Introduce `styles'. + + This is the new top-level structure for handling glyph input data; + scripts are now defined separately. + + * 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. + + * src/autofit/afstyles.h: New file, using data from `afscript.h'. + * src/autofit/afscript.h: Updated. + + * src/autofit/afcjk.c (af_cjk_metrics_init_widths, + af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated. + + * 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 + + [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 + + [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 + + [autofit] s/ScriptMetrics/StyleMetrics/. + +2013-12-18 Werner Lemberg + + [autofit] s/script_{metrics,hints}/style_{metrics,hints}/ + +2013-12-18 Werner Lemberg + + [autofit] s/gscripts/gstyles/. + +2013-12-18 Werner Lemberg + + [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 + + [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate. + +2013-12-11 Infinality + + [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 + + [documentation] Add section how to include FreeType header files. + Problem reported by David Kastrup . + + 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 + + [autofit] s/DFLT/NONE/, s/dflt/none/. + +2013-12-10 Werner Lemberg + + [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/. + +2013-12-10 Werner Lemberg + + [truetype] Fix scaling of vertical phantom points. + + * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and + pp4.x also. + +2013-12-10 Werner Lemberg + + [truetype] Fix positioning of composite glyphs. + Problem reported by Nigel Tao . + + * 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 + + * Version 2.5.2 released. + ========================= + + + 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. + +2013-12-07 Werner Lemberg + + [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 + + * builds/freetype.mk (FT_CC): Removed. Unused. + +2013-12-04 Werner Lemberg + + [sfnt] Fix handling of embedded bitmap strikes. + + This corrects the commit from 2013-11-21. Problem reported by + Andrey Panov . + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to + detect excessive bytes for bit-aligned bitmaps. + +2013-12-03 Werner Lemberg + + [truetype] Remove dead code. + + Reported by Nigel Tao . + + * include/internal/tttypes.h (TT_LoaderRec): Remove unused + `preserve_pps' field. + * src/truetype/ttgload.c (TT_Hint_Glyph): Updated. + +2013-12-03 Werner Lemberg + + [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 + + [truetype] Fix change from 2013-11-20. + + Problem reported by Akira Kakuto . + + * 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 + + [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 * Version 2.5.1 released. @@ -29,6 +3139,7 @@ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 17:0:11. + * CMakeLists.txt (VERSION_PATCH): Set to 1. * docs/CHANGES, docs/release: Updated. 2013-11-23 Werner Lemberg @@ -54,7 +3165,7 @@ 2013-11-21 Werner Lemberg - [truetype] Improve handling of buggy embedded bitmap strikes. + [sfnt] Improve handling of buggy embedded bitmap strikes. We are now able to successfully load `AppleMyoungJo.ttf'. Problem reported by Hin-Tak Leung . @@ -2030,6353 +5141,9 @@ */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code. -2013-05-08 Werner Lemberg - - * 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 - - * docs/CHANGES: Updated. - -2013-05-08 Werner Lemberg - - * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Typo. - -2013-05-05 Werner Lemberg - - Synchronize `ftconfig.h'. - - * builds/unix/ftconfig.in: Updated. - -2013-05-05 Werner Lemberg - - Fix compilation with C++. - - * src/base/md5.c (body): Use proper cast. - -2013-05-05 Werner Lemberg - - 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 - - [raster] Fix clang issues. - - Fix suggested by . - - * src/raster/ftraster.c (ULong): New typedef. - (SCALED): Add proper cast. - -2013-05-04 Werner Lemberg - - Fix clang fixes. - - * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate): Use - correct types. - - * src/cff/cf2intrp.c (cf2_interpT2CharString) : 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 - - [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 - - 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 - - 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) : 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 - - * src/cff/cf2blues.c: Remove dead code. - -2013-05-02 Chris Liddell - - * src/cff/cffgload.c: Include FT_CFF_DRIVER_H. - -2013-04-27 Werner Lemberg - - * docs/CHANGES: Updated. - * README: Improved. - -2013-04-13 Werner Lemberg - - [cff] Add a new Type 2 interpreter and hinter. - - This work, written by Dave Arnold 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 - - [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 - - 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 - - [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 - - [bdf] Fix Savannah bug #38589. - - * src/bdf/bdflib.c (_bdf_readstream): Thinko. - -2013-03-31 Werner Lemberg - - * configure: Use egrep, not grep. - - Problem reported Mojca Miklavec . - -2013-03-29 Werner Lemberg - - * include/freetype/ftlcdfil.h: Add description of color filtering. - - Based on a contribution from Antti S. Lankila - (Savannah bug #38607). - -2013-03-23 Werner Lemberg - - [autofit] Minor. - - * src/autofit/afmodule.c (af_property_set): Typo. - (af_autofitter_init, af_autofitter_done): Use cast. - -2013-03-21 Werner Lemberg - - * configure: Automatically test for `gmake' also. - - Suggested by Mojca Miklavec . - -2013-03-21 Peter Breitenlohner - - 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 - - Fix Savannah patch #7971. - - * configure: Handle MAKE environment variable also. - -2013-03-17 Werner Lemberg - - 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 - - [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 - - * src/pshinter/pshpic.h (GET_PIC): Use correct container. - -2013-03-15 Werner Lemberg - - * 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 - - */*: 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 - - 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 - - */*: Use FT_Err_Ok only. - - This is a purely mechanical conversion. - -2013-03-14 Werner Lemberg - - */*: 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 - - 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 - - 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 - - [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 - - 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 - - [cff] Set `linear{Hori,Vert}Advance' for embedded bitmaps also. - - Problem reported by Khaled Hosny . - - * src/cff/cffgload.c (cff_slot_load): Implement it. - -2013-02-23 Alexei Podtelezhnikov - - [base] Fix commit ab02d9e8. - - * src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22. - -2013-02-19 Alexei Podtelezhnikov - - [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 - - [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 - - 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 - - * 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 - - * 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 - - [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 - - [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 - - Fix Savannah bug #38227. - - * builds/unix/freetype-config.in: Set LC_ALL. - -2013-02-01 Werner Lemberg - - 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 - - [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 - - [base] Small optimization of BBox calculation. - - * src/base/ftbbox.c (BBox_Cubic_Check): Use FT_MSB function in - scaling algorithm. - -2013-01-26 Infinality - - [truetype] Minor formatting fix. - - * src/truetype/ttinterp.c: Updated. - (DO_RS): Fix indentation. - -2013-01-26 Infinality - - [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 - - [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 - - [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 - - 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 - - [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 - - [base] Fix `make multi'. - - * src/base/ftoutln.c, src/base/fttrigon.c: Include - FT_INTERNAL_CALC_H. - -2013-01-25 David 'Digit' Turner - - [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 - - [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 - - [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 - - [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 - - [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 - - [base] Fix integer overflow. - - * src/base/ftoutln.c (FT_Outline_Get_Orientation): Scale the - coordinates down to avoid overflow. - -2013-01-23 Alexei Podtelezhnikov - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - 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 - - [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 - - [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 - - [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 - - [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 - - [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 - - * src/pshinter/pshalgo.h: Remove unused code. - -2012-12-27 Werner Lemberg - - * src/truetype/ttgload.c (tt_loader_init): Add more tracing. - -2012-12-23 Werner Lemberg - - [type1] Fix handling of /FontBBox in MM fonts. - Problem reported by Del Merritt - - 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) : - Implement it. - -2012-12-21 Alexei Podtelezhnikov - - * src/tools/cordic.py: Bring up to date with trigonometric core. - -2012-12-21 Werner Lemberg - - Check parameters of `FT_Outline_New'. - Problem reported by Robin Watts . - - * 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 - - * 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 - - [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 - - * src/base/ftobjs.c (ft_property_do): Fix compiler warning. - -2012-12-19 Alexei Podtelezhnikov - - * src/base/ftrfork.c (FT_Raccess_Guess): Switch to FT_Int counters. - -2012-12-19 Alexei Podtelezhnikov - - [base] Clean up trigonometric core. - - * src/base/fttrrigon.c (ft_trig_pseudo_polarize): Align algorithm - with `ft_trig_pseudo_rotate'. - -2012-12-18 Infinality - - [truetype] Minor performance enhancement. - - * src/truetype/ttgload.c: (TT_Process_Simple_Glyph): Use FT_MulFix - instead of FT_MulDiv. - -2012-12-17 Infinality - - [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 - - 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 - - [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 - - [sfnt] Fix Savannah bug #37936. - - * src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak. - -2012-12-15 Alexei Podtelezhnikov - - [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 - - [bdf] Fix Savannah bug #37907. - - * src/bdf/bdflib.c (_bdf_parse_glyphs) : Normalize - negative second parameter of `ENCODING' field also. - -2012-12-15 Werner Lemberg - - [bdf] Fix Savannah bug #37906. - - * src/bdf/bdflib.c (_bdf_parse_glyphs) : Use correct array - size for checking `glyph_enc'. - -2012-12-15 Werner Lemberg - - [bdf] Fix Savannah bug #37905. - - * src/bdf/bdflib.c (_bdf_parse_start) : 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 - - [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 - - [type1] Another fix for 2012-09-17 commit. - - * src/type1/t1parse.c (T1_Get_Private_Dict) : Correctly set - `limit' value. - -2012-12-06 Alexei Podtelezhnikov - - [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 - - [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 - - [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 - - [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 - - [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 - - [configure] Preserve customized `ftoption.h'. - - Problem reported by Del Merritt . - - * builds/unix/configure.raw : Don't - remove existing FreeType configuration files. - -2012-11-29 John Tytgat - - [type1] Fix Savannah bug #37831. - - The bug report also contains a patch. - - * src/type1/t1parse.c (T1_Get_Private_Dict) : Really fix - change from 2012-09-17. - -2012-11-28 Alexei Podtelezhnikov - - [truetype] Fix formatting and typo. - -2012-11-27 Alexei Podtelezhnikov - - [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 - - [ftstroke] Minor improvement. - - * src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with - FT_MulDiv. - -2012-11-17 Werner Lemberg - - * src/base/fttrigon.c (ft_trig_downscale): Make 64bit version work. - -2012-11-15 Alexei Podtelezhnikov - - [base] Fix integer overflows in dd5718c7d67a. - - * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use FT_MulDiv. - -2012-11-15 Werner Lemberg - - [autofit] Trace stem widths. - - * src/autofit/aflatin.c (af_latin_metrics_init_widths): Add some - FT_TRACE calls. - -2012-11-13 Werner Lemberg - - [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 - - [autofit] Minor improvement. - - * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Fix - loop. - -2012-11-10 Werner Lemberg - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [smooth] Improve tracing. - - * src/smooth/ftgrays.c (gray_sweep): Trace last sweep line of - current band also. - -2012-10-20 Alexei Podtelezhnikov - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [psaux] Fix some value overflows. - - * src/psaux/psconv.c (PS_Conv_ToFixed): Implement it. - -2012-10-17 Bram Tassyns - - [cff] Fix value overflow. - - * src/cff/cffparse.c (cff_parse_fixed_scaled): Implement it. - -2012-10-17 Werner Lemberg - - [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 - - 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 - - [autofit] Minor optimization. - - * src/autofit/afglobals.c (af_face_globals_compute_script_coverage): - Add loop condition. - -2012-09-29 Werner Lemberg - - [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 - - [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 - - [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 - - [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 - - [type1] Fix Savannah bug #37350. - - * src/type1/t1parse.c (T1_Get_Private_Dict) : Check for ASCII - storage only if we actually have at least four bytes. - -2012-09-15 Werner Lemberg - - [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 - - [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 - - * src/autofit/afmodule.c: s/FT_Err_/AF_Err_/. - -2012-09-15 Werner Lemberg - - [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) , - af_autofitter_init: - Handle default script. - - * src/autofit/afglobal.h: Updated. - -2012-09-15 Werner Lemberg - - 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 - - [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 - - [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 - - [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 - - * src/autofit/afmodule.c: s/FT_Autofitter/AF_Module/. - -2012-09-12 Werner Lemberg - - [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 - - [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 - - [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 - - 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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - 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 - - * 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 - - [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 - - [autofit] Improve recognition of flat segments. - - Problem reported by Brad Dunzer . - - * 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 - - [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 - - [type1] Fix Savannah bug #37000. - - * src/type1/t1load.c (parse_encoding): Fix order of checks. - -2012-07-17 Werner Lemberg - - [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 - - [type1] Fix Savannah bug #36832. - - * src/type1/t1load.c (parse_charstrings): Reject negative number of - glyphs. - -2012-07-13 Werner Lemberg - - [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 - - Revert the last commit 45337b07. - - * src/base/ftstroke.c (FT_Stroker_New): Revert the previous change. - -2012-07-11 Alexei Podtelezhnikov - - [ftstroke] Fix uninitialized return value. - - * src/base/ftstroke.c (FT_Stroker_New): Return FT_Err_Ok instead. - -2012-07-11 Werner Lemberg - - [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 - - 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 - - [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 - - Fix strict-aliasing warning. - - * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast. - -2012-07-07 Dave Thomas - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - 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 - - [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 - - Fix CFLAGS and LDFLAGS share configure test. - - * builds/unix/configure.raw: Fix typo. - -2012-06-28 Werner Lemberg - - [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 - - Fix conditional compilation. - - * src/base/basepic.c: Use FT_CONFIG_OPTION_MAC_FONTS. - -2012-06-27 Werner Lemberg - - 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 - - [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 - - [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 - - [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 - - * 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 - - * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Improve spacing. - - * docs/CHANGES: Updated. - -2012-06-14 suzuki toshiya - - * 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 - - * docs/CHANGES: Updated. - -2012-06-14 suzuki toshiya - - [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 ; 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 - - [ftraster] Fix rounding issue causing visual artifacts. - - Problem reported by jola ; 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 - - * 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 - - * docs/CHANGES: Updated. - -2012-05-28 Alexei Podtelezhnikov - - 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 - - [type1] Fix Savannah bug #36386. - - * src/type1/t1load.c (t1_load_keyword): Ignore keyword if context is - not valid. - -2012-04-07 Werner Lemberg - - Remove compiler warning. - - * src/truetype/ttgload.c (TT_Load_Glyph) - [!TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Access `glyph->face' directly. - -2012-03-28 Werner Lemberg - - [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 - - [bdflib] Remove redundant macro. - - * src/bdf/bdflib.c (isdigok): Remove and replace with sbitset, which - is exactly the same. - -2012-03-20 suzuki toshiya - - [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 - - [bdf] Improvement to Savannah bug #35656. - - * src/bdf/bdflib.c (isdigok): Add cast, as suggested in report. - -2012-03-17 Chris Liddell - - [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 - - [bdf] Really fix Savannah bug #35658. - - * src/bdf/bdflib.c (_bdf_list_split): Add one more `field' initializer. - -2012-03-14 Yann Droneaud - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - Prepare source code for amalgamation. - - * include/freetype/freetype.h: Swap order of preprocessor blocks. - -2012-03-08 Werner Lemberg - - * 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 - - [bdf] Add missing overflow check. - - * src/bdf/bdflib.c (_bdf_parse_glyphs) : Add threshold for - `glyph->bpr'. - -2012-03-07 Vinnie Falco - - 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 - - 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 - - [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 - - [truetype] Fix Savannah bug #35689. - - * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check first outline - point. - -2012-03-01 Werner Lemberg - - [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 - - [winfonts] Fix Savannah bug #35659. - - * src/winfonts/winfnt.c (FNT_Face_Init): Check number of glyphs. - -2012-03-01 Werner Lemberg - - [bdf] Fix Savannah bug #35658. - - * src/bdf/bdflib.c (_bdf_list_split): Initialize `field' elements - properly. - -2012-03-01 Werner Lemberg - - [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 - - [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 - - [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 - - [bdf] Fix Savannah bug #35641. - - * src/bdf/bdflib.c (_bdf_parse_glyphs) : 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 - - [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 - - [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 - - [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 - - [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 - - 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) - , - src/gxvalid/gxvcommn.c (GXV_32BIT_ALIGNMENT_VALIDATE), - src/gxvalid/gxvfeat.c (gxv_feat_setting_validate): Replace `%' with - `&' operator. - -2012-02-29 Werner Lemberg - - [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) : - Implement it. - -2012-02-26 Alexei Podtelezhnikov - - [type42] Minor code optimization (again). - - * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change. - -2012-02-26 Mateusz Jurczyk - Werner Lemberg - - [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 - - [type42] Minor code optimization. - - * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of - modulo operator. - -2012-02-26 Werner Lemberg - - * docs/CHANGES: Updated. - -2012-02-26 Werner Lemberg - - [type1] Fix Savannah bug #35608. - - * src/type1/t1parse.c (T1_Get_Private_Dict): Reject too short - dictionaries. - -2012-02-26 Werner Lemberg - - [bdf] Support `ENCODING -1 ' format. - - * src/bdf/bdflib.c (_bdf_parse_glyphs) : Implement it. - -2012-02-26 Werner Lemberg - - [bdf] Fix Savannah bug #35607. - - * src/bdf/bdflib.c (_bdf_parse_glyphs) : Normalize - negative encoding values. - -2012-02-26 Werner Lemberg - - [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 - - [pcf] Fix Savannah bug #35603. - - * src/pcf/pcfread.c (pcf_get_properties): Assure final zero byte in - `strings' array. - -2012-02-25 Werner Lemberg - - [type42] Fix Savannah bug #35602. - - * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size' more - thoroughly. - -2012-02-25 Werner Lemberg - - [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 - - [bdf] Fix Savannah bugs #35597 and #35598. - - * src/bdf/bdflib.c (_bdf_is_atom): Fix handling of property value. - -2012-02-24  Vinnie Falco - - 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 - - Prepare source code for amalgamation (5/6). - - * include/freetype/fterrors.h: Undefine FT_KEEP_ERR_PREFIX after - using it. - -2012-02-22  Vinnie Falco - - 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 - - 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 - - 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 - - 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 - - [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 - - [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 - - We don't use `extensions'. - - * include/freetype/internal/ftobjs.h (FT_DriverRec): Remove - `extensions' field. - -2012-02-11 Werner Lemberg - - 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 - - [autofit] Harmonize function arguments. - - * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for - `load_flags'. - -2012-02-07 Werner Lemberg - - * src/cff/cffobjs.c (cff_face_init): Remove unnecessary casts. - -2012-01-17 suzuki toshiya - - [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 - - [raccess] Modify for PIC build. - - Based on the patch provided by Erik Dahlstrom , - 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 - - Remove trailing spaces. - -2012-01-16 suzuki toshiya - - 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 - - [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 - - [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 - - 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 - - Make pspic.c to include module error header to fix multi build. - - * src/psnames/pspic.c: Include `psnamerr.h'. - -2012-01-14 suzuki toshiya - - [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 - - [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 - - 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 - - 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 - - [truetype] Fix IP instruction if x_ppem != y_ppem. - - * src/truetype/ttinterp.c (Ins_IP): Scale `orus' coordinates - properly. - -2012-01-02 Werner Lemberg - - 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 - - Add some variable initializations. - Reported by Richard COOK . - - * 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 - - 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 - - * src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing. - -2011-12-02 suzuki toshiya - - [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 - - 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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [bdf] Improve tracing. - - * src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros. - (_bdf_parse_glyphs): Use them. - -2011-11-26 Werner Lemberg - - 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 - - [cid] Fix error code. - - * src/cid/cidparse.c (cid_parser_new): Do it. - -2011-11-26 Werner Lemberg - - [cff] Fix error code. - - * src/cff/cffload.c (cff_font_load): Do it. - -2011-11-26 Werner Lemberg - - 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 - - [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 - - * include/freetype/fterrors.h: Remove dead code. - -2011-11-15 Werner Lemberg - - * docs/releases: Updated. - -2011-11-15 Werner Lemberg - - * 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 - - 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 - - [cid] Various loading fixes. - - * src/cid/cidload.c (cid_load_keyword) , - (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 - - * 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 - - [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 - - [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 - - [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 - - * 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 - - Fix handling of transformations if no renderer is present. - - * src/base/ftobjs.c (FT_Load_Glyph): Thinko. - -2011-10-15 Kal Conley - - Fix conditions for autohinting. - - * src/base/ftobjs.c (FT_Load_Glyph): Handle - FT_LOAD_IGNORE_TRANSFORM. - -2011-10-07 suzuki toshiya - - [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 - - 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 - - [psnames] Handle zapfdingbats. - Problem reported by Nicolas Rougier . - - * 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 - - [type1] Fix Savannah bug #34189. - - * src/type1/t1load.c (T1_Open_Face): Initialize - `face->len_buildchar'. - -2011-09-26 Werner Lemberg - - [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] - : Identify as SID. - -2011-09-17 Werner Lemberg - - 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 - - [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 - - Slightly improve LZW_CLEAR handling. - - * src/lzw/ftzopen.c (ft_lzwstate_io) : - 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 - - Add explicit LZW decompression stack size limit. - - Stack larger than 1<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 - - 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) : First - code in valid LZW stream must be 0..255. - : In the special KwKwK case, code == free_ent, - code > free_ent is invalid. - -2011-09-09 Werner Lemberg - - Better tracing of metrics. - - * src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with - FT_TRACE. - -2011-09-07 Werner Lemberg - - [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 - - Better tracing of metrics. - - * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): - Decorate with FT_TRACE. - -2011-08-25 Werner Lemberg - - [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 - - Fix Savannah bug #34022. - - * README, docs/INSTALL: Remove references to UPGRADE.UNIX. - -2011-08-15 Werner Lemberg - - Fix Savannah bug #34018. - - * docs/UPGRADE.UNIX: Removed. Obsolete. - -2011-08-15 David Bevan - - Fix Savannah bug #33992. - - * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix border case. - -2011-08-12 Werner Lemberg - - [cff] Fix Savannah bug #33975. - - * src/cff/cffparse.c (cff_parse_font_matrix): Fix typo. - -2011-07-29 Werner Lemberg - - * 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 - - [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 - - [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 - - 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 - - * src/base/ftpatent.c (FT_Face_SetUnpatentedHinting): Fix typo. - -2011-07-16 Steven Chu - - [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 . - - [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 - - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) - : Better handling of subroutine index 0. - From Matthias Drochner . - -2011-07-10 Алексей Подтележников - - [psaux] Optimize previous commit. - - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) - : Move error check down to avoid testing twice for - good cases. - -2011-07-08 Werner Lemberg - - [psaux] Add better argument check for `callothersubr'. - - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) - : Reject negative arguments. - -2011-07-07 Werner Lemberg - - [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 - - 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 - - [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 - - * docs/CHANGES: Updated. - -2011-07-02 David Bevan - - [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 - - * builds/toplevel.mk: We use git, not CVS, thus skip `.gitignore'. - -2011-06-29 Werner Lemberg - - [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 - - * 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 - - * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix change - from 2011-05-04. - -2011-06-19 suzuki toshiya - - [gxvalid] make the `prop' validation tracing verbose. - - * src/gxvalid/gxvprop.c: Add tracing messages for errors. - -2011-06-19 suzuki toshiya - - [autogen.sh] Reflect environment variable LIBTOOLIZE. - -2011-06-18 Werner Lemberg - - Update license documentation. - - * docs/GPL.TXT: Renamed to... - * docs/GPLv2.TXT: This. - - * docs/LICENSE.TXT: Updated. - -2011-06-14 suzuki toshiya - - 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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - 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 - - 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 - - [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 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 - - [autofit] Improve tracing of hinting process. - - * src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message - `ADJUST'. - -2011-05-26 Werner Lemberg - - [autofit] Fix trace message. - - * src/autofit/aflatin.c (af_latin_hint_edges): Show correct value in - tracing message. - -2011-05-24 Daniel Zimmermann - - 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 - - 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 - - [autofit] Make trace message for CJK bluezone more verbose. - -2011-05-08 Just Fill Bugs - suzuki toshiya - - [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 - - [autofit] Remove unused struct member. - - * src/autofit/aflatin.h (AF_LatinAxis): Remove `control_overshoot'. - -2011-05-04 Werner Lemberg - - * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Simplify. - -2011-05-01 Just Fill Bugs - Werner Lemberg - - [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 - - 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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - 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 - - [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 - - 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 - - Synchronize config files. - - * builds/unix/ftconfig.in: Copy missing assembler routines from - include/freetype/config/ftconfig.h. - -2011-04-13 Werner Lemberg - - [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 - - 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 - - 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 - - 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 - - * src/autofit/aftypes.h (AF_OutlineRec): Removed, unused. - -2011-03-24 Werner Lemberg - - * 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 - - * src/truetype/ttpload.c (tt_face_load_loca): Fix mismatch warning. - -2011-03-20 Werner Lemberg - - * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts. - -2011-03-19 Werner Lemberg - - 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 - - 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 - - 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 . - - * src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field. - Suggested by Graham Asher. - -2011-03-09 Werner Lemberg - - 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 - - [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 - - * docs/CHANGES: Updated. - -2011-03-07 Alexei Podtelezhnikov - - 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 - - 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 - - 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 - - [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 - - * docs/PROBLEMS: Mention rendering differences on different - platforms. - Suggested and worded by Jason Owen . - -2011-02-24 Werner Lemberg - - [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 - - * src/autofit/afhints.h (AF_GlyphHints): Remove unused field. - -2011-02-20 suzuki toshiya - - [cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'. - Found by , 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 - - 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 - - [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 - - 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 - - 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 - - * src/autofit/afdummy.c: Include `aferrors.h'. - Problem reported by Chris Liddell . - -2011-02-01 Werner Lemberg - - [cff] Ignore unknown operators in charstrings. - Patch suggested by Miles.Lau . - - * 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 - - [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 - - [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 - - [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 - - [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 - - * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message. - -2011-01-30 LIU Sun-Liang - - [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 - - [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 - - 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 - - [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 - - 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 - - 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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - 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 - - 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 - - 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 - - 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 - - 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 - - * 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 - - */rules.mk: Handle `*pic.c' files. - -2010-12-31 Werner Lemberg - - * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 64. - Problem reported by Tom Bishop . - -2010-12-31 Werner Lemberg - - 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 - - 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 - - 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 - - Fix parameter handling of `FT_Set_Renderer'. - Reported by Kirill Tishin . - - * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'. - -2010-12-09 Werner Lemberg - - [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 . - - * 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 - - * 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 - - [ftsmooth]: Minor code simplification. - - * src/smooth/ftgrays (gray_render_cubic): Do only one comparison - instead of two. - -2010-11-26 Johnson Y. Yan - - [truetype] Better multi-threading support. - - * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone - references. - -2010-11-23 John Tytgat - - * 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 - - [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 - - [truetype] Fix `loca' handling for inconsistent number of glyphs. - Reported by Johnson Y. Yan . - - * 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 - - [sfnt] Ignore all errors while loading `OS/2' table. - Suggested by Johnson Y. Yan . - - * src/sfnt/sfobjs.c (sfnt_load_face): Do it. - -2010-11-18 Johnson Y. Yan - - [type1] Fix matrix normalization. - - * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling - factor. - -2010-11-18 Werner Lemberg - - [type1] Improve guard against malformed data. - Based on a patch submitted by Johnson Y. Yan - - - * src/type1/t1load.c (read_binary_data): Check `size'. - -2010-11-17 Werner Lemberg - - [sfnt] While tracing, output table checksums also. - - * src/sfnt/ttload.c (tt_face_load_font_dir): Do it. - -2010-11-04 suzuki toshiya - - [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 - - [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 - - [ftraster] Minor fixes. - - Reported by Tom Bishop . - - * src/raster/ftraster.c (ULong): Remove unused typedef. - (TWorker): Remove unused variable `precision_mask'. - -2010-10-28 Werner Lemberg - - [ftraster] Fix rendering. - - Problem reported by Tom Bishop ; 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 - - 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 - - [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 - - [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 - - 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 - - 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 - - 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 - - [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 - - [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 - - 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 - - [truetype] Fix Savannah bug #31310. - - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against - invalid `runcnt' values. - -2010-10-08 Chris Liddell - - [sfnt] Fix Savannah bug #31275. - - * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H. - -2010-10-06 Werner Lemberg - - [truetype] Improve error handling of `SHZ' bytecode instruction. - Problem reported by Chris Evans . - - * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'. - -2010-10-05 Werner Lemberg - - 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 - - * 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 - - Avoid `configure' issues with symbolic links. - Based on a patch from Alexander Stohr . - - * configure: Compare directories using `ls -id'. - Check existence of `reference' subdirectory before creating it. - -2010-10-02 Werner Lemberg - - [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 - - [smooth] Fix splitting of cubics for negative values. - - Reported by Róbert Márki ; 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 - - [truetype] Fix Savannah bug #31040. - - * src/truetype/ttinterp.c (free_buffer_in_size): Remove. - (TT_RunIns): Updated. - -2010-09-20 suzuki toshiya - - [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 - David Bevan - - [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 - - 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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - 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 - - 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 - - Fix minor issues reported by . - - * 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 - - 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 - - [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 - - [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 - - [ftraster] Pacify compiler. - - * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is - not used. - -2010-08-29 Werner Lemberg - - [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ć . - -2010-08-28 suzuki toshiya - - 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 - - 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 - - [cache] Fix Savannah bug #30788. - - * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for - NULL too. - -2010-08-10 Werner Lemberg - - 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 - - * 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 - - 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 - - [raster] Fix valgrind warning. - - * src/raster/ftraster.c (Decompose_Curve) : Access point[0] - only if we don't hit `limit'. - -2010-08-06 suzuki toshiya - - 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 - - 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 - - [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 - - [type42] Fix Savannah bug #30656. - - * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative - string_size. - Fix comparison. - -2010-08-05 suzuki toshiya - - [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 - - Fix Savannah bug #30644. - - * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison. - -2010-08-04 Werner Lemberg - - `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 - - [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 - - 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 - - * 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 - - [cff] Final try to fix `hintmask' and `cntrmask' limit check. - - Problem reported by Tobias Wolf . - - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : Sigh. I'm apparently too silly to fix this - correctly in less than three tries. - -2010-07-12 Werner Lemberg - - * 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 - - Remove C++ warnings. - - */*: Initialize pointers where necessary to make g++ happy. - -2010-07-12 malc - Richard Henderson - - 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 - - Fix C++ compilation issue. - - * src/tools/apinames.c (names_dump) : Fix - type of `dot' variable. - -2010-07-10 suzuki toshiya - - 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 - - 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 - - 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 - - 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 - - [truetype] Fix Savannah bug #30361. - - * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check. - -2010-07-06 Werner Lemberg - - Pacify compiler. - - * src/cff/cffload.c (cff_index_get_pointers): Initialize - `new_bytes'. - -2010-07-05 Eugene A. Shatokhin - - 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 - - Fix Savannah bug #30030. - - * builds/win32/*/freetype.vcproj: Add ftxf86.c. - -2010-07-05 Werner Lemberg - - [cff] Next try to fix `hintmask' and `cntrmask' limit check. - - Problem reported by malc . - - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : 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 - - 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 - - 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 - - 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 - - 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 - - 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 - - [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 - - [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 - - [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 - - 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 - - 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 - - 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 - - Fix minor tracing issues. - - * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels. - -2010-06-27 Werner Lemberg - - [cff] Really fix `hintmask' and `cntrmask' limit check. - - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : Fix thinko and handle tracing also. - -2010-06-27 Werner Lemberg - - Fix valgrind warning. - - * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize - `result' array. - -2010-06-27 Werner Lemberg - - [cff] Fix memory leak. - - * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in - case of errors. - -2010-06-27 Werner Lemberg - - [cff] Protect against invalid `hintmask' and `cntrmask' operators. - - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : Ensure that we don't exceed `limit' while parsing - the bit masks of the `hintmask' and `cntrmask' operators. - -2010-06-26 Werner Lemberg - - Fix PFR change 2010-06-24. - - * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against - invalid indices. - -2010-06-26 Werner Lemberg - - 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 - - Fix last PFR change. - - * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic. - -2010-06-26 Werner Lemberg - - [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 - - 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 - - [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 - - [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 - - 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 - - [pcf] Fix Savannah bug #30247. - - * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with - zero metrics. - -2010-06-24 Graham Asher - - * 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 - - */*: Use module specific error names where appropriate. - -2010-06-24 Werner Lemberg - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [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 - - [cff]: Improve debugging output. - - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : Implement it. - -2010-06-10 Graham Asher - - 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 - - [cff] Fix Savannah bug #30082. - - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : Protect against stack underflow. - -2010-06-08 Werner Lemberg - - [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 - - 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 - - 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 - - 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 - - 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 - - [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 - - 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 - - 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 - - * docs/formats.txt: Give pointer to PCF documentation. - Information provided by Alan Coopersmith - . - -2010-05-10 Ken Sharp - - [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 - - [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ń - - [psaux] Fix Savannah bug #27999. - - * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove - selected entry, not all. - -2010-04-06 Jonathan Kew - - [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 - - [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 - - Add new function `FT_Library_SetLcdFilterWeights'. - - This is based on code written by Lifter - . 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 - - [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 - - Fix `multi build' for Tytgat's CFF driver improvement. - - * src/base/cffload.h (cff_index_get_name): Added. - -2010-03-12 suzuki toshiya - - 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 - - [raster] Fix Savannah bug #27442. - - * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'. - -2010-03-09 Werner Lemberg - - [cff] Remove unused variable. - Reported by Graham. - - * src/cff/cffparse.c (cff_parse_real): Remove `rest'. - -2010-03-02 John Tytgat - - [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 - - 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 - - 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 - - [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 +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/freetype/ChangeLog.21 b/freetype/ChangeLog.21 index d6371d17..300a094f 100644 --- a/freetype/ChangeLog.21 +++ b/freetype/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/freetype/ChangeLog.24 b/freetype/ChangeLog.24 new file mode 100644 index 00000000..01eb3b75 --- /dev/null +++ b/freetype/ChangeLog.24 @@ -0,0 +1,6360 @@ +2013-05-08 Werner Lemberg + + * 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 + + * docs/CHANGES: Updated. + +2013-05-08 Werner Lemberg + + * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Typo. + +2013-05-05 Werner Lemberg + + Synchronize `ftconfig.h'. + + * builds/unix/ftconfig.in: Updated. + +2013-05-05 Werner Lemberg + + Fix compilation with C++. + + * src/base/md5.c (body): Use proper cast. + +2013-05-05 Werner Lemberg + + 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 + + [raster] Fix clang issues. + + Fix suggested by . + + * src/raster/ftraster.c (ULong): New typedef. + (SCALED): Add proper cast. + +2013-05-04 Werner Lemberg + + Fix clang fixes. + + * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate): Use + correct types. + + * src/cff/cf2intrp.c (cf2_interpT2CharString) : 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 + + [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 + + 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 + + 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) : 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 + + * src/cff/cf2blues.c: Remove dead code. + +2013-05-02 Chris Liddell + + * src/cff/cffgload.c: Include FT_CFF_DRIVER_H. + +2013-04-27 Werner Lemberg + + * docs/CHANGES: Updated. + * README: Improved. + +2013-04-13 Werner Lemberg + + [cff] Add a new Type 2 interpreter and hinter. + + This work, written by Dave Arnold 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 + + [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 + + 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 + + [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 + + [bdf] Fix Savannah bug #38589. + + * src/bdf/bdflib.c (_bdf_readstream): Thinko. + +2013-03-31 Werner Lemberg + + * configure: Use egrep, not grep. + + Problem reported Mojca Miklavec . + +2013-03-29 Werner Lemberg + + * include/freetype/ftlcdfil.h: Add description of color filtering. + + Based on a contribution from Antti S. Lankila + (Savannah bug #38607). + +2013-03-23 Werner Lemberg + + [autofit] Minor. + + * src/autofit/afmodule.c (af_property_set): Typo. + (af_autofitter_init, af_autofitter_done): Use cast. + +2013-03-21 Werner Lemberg + + * configure: Automatically test for `gmake' also. + + Suggested by Mojca Miklavec . + +2013-03-21 Peter Breitenlohner + + 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 + + Fix Savannah patch #7971. + + * configure: Handle MAKE environment variable also. + +2013-03-17 Werner Lemberg + + 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 + + [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 + + * src/pshinter/pshpic.h (GET_PIC): Use correct container. + +2013-03-15 Werner Lemberg + + * 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 + + */*: 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 + + 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 + + */*: Use FT_Err_Ok only. + + This is a purely mechanical conversion. + +2013-03-14 Werner Lemberg + + */*: 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 + + 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 + + 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 + + [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 + + 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 + + [cff] Set `linear{Hori,Vert}Advance' for embedded bitmaps also. + + Problem reported by Khaled Hosny . + + * src/cff/cffgload.c (cff_slot_load): Implement it. + +2013-02-23 Alexei Podtelezhnikov + + [base] Fix commit ab02d9e8. + + * src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22. + +2013-02-19 Alexei Podtelezhnikov + + [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 + + [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 + + 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 + + * 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 + + * 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 + + [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 + + [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 + + Fix Savannah bug #38227. + + * builds/unix/freetype-config.in: Set LC_ALL. + +2013-02-01 Werner Lemberg + + 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 + + [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 + + [base] Small optimization of BBox calculation. + + * src/base/ftbbox.c (BBox_Cubic_Check): Use FT_MSB function in + scaling algorithm. + +2013-01-26 Infinality + + [truetype] Minor formatting fix. + + * src/truetype/ttinterp.c: Updated. + (DO_RS): Fix indentation. + +2013-01-26 Infinality + + [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 + + [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 + + [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 + + 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 + + [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 + + [base] Fix `make multi'. + + * src/base/ftoutln.c, src/base/fttrigon.c: Include + FT_INTERNAL_CALC_H. + +2013-01-25 David 'Digit' Turner + + [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 + + [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 + + [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 + + [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 + + [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 + + [base] Fix integer overflow. + + * src/base/ftoutln.c (FT_Outline_Get_Orientation): Scale the + coordinates down to avoid overflow. + +2013-01-23 Alexei Podtelezhnikov + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + 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 + + [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 + + [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 + + [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 + + [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 + + [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 + + * src/pshinter/pshalgo.h: Remove unused code. + +2012-12-27 Werner Lemberg + + * src/truetype/ttgload.c (tt_loader_init): Add more tracing. + +2012-12-23 Werner Lemberg + + [type1] Fix handling of /FontBBox in MM fonts. + Problem reported by Del Merritt + + 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) : + Implement it. + +2012-12-21 Alexei Podtelezhnikov + + * src/tools/cordic.py: Bring up to date with trigonometric core. + +2012-12-21 Werner Lemberg + + Check parameters of `FT_Outline_New'. + Problem reported by Robin Watts . + + * 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 + + * 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 + + [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 + + * src/base/ftobjs.c (ft_property_do): Fix compiler warning. + +2012-12-19 Alexei Podtelezhnikov + + * src/base/ftrfork.c (FT_Raccess_Guess): Switch to FT_Int counters. + +2012-12-19 Alexei Podtelezhnikov + + [base] Clean up trigonometric core. + + * src/base/fttrrigon.c (ft_trig_pseudo_polarize): Align algorithm + with `ft_trig_pseudo_rotate'. + +2012-12-18 Infinality + + [truetype] Minor performance enhancement. + + * src/truetype/ttgload.c: (TT_Process_Simple_Glyph): Use FT_MulFix + instead of FT_MulDiv. + +2012-12-17 Infinality + + [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 + + 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 + + [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 + + [sfnt] Fix Savannah bug #37936. + + * src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak. + +2012-12-15 Alexei Podtelezhnikov + + [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 + + [bdf] Fix Savannah bug #37907. + + * src/bdf/bdflib.c (_bdf_parse_glyphs) : Normalize + negative second parameter of `ENCODING' field also. + +2012-12-15 Werner Lemberg + + [bdf] Fix Savannah bug #37906. + + * src/bdf/bdflib.c (_bdf_parse_glyphs) : Use correct array + size for checking `glyph_enc'. + +2012-12-15 Werner Lemberg + + [bdf] Fix Savannah bug #37905. + + * src/bdf/bdflib.c (_bdf_parse_start) : 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 + + [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 + + [type1] Another fix for 2012-09-17 commit. + + * src/type1/t1parse.c (T1_Get_Private_Dict) : Correctly set + `limit' value. + +2012-12-06 Alexei Podtelezhnikov + + [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 + + [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 + + [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 + + [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 + + [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 + + [configure] Preserve customized `ftoption.h'. + + Problem reported by Del Merritt . + + * builds/unix/configure.raw : Don't + remove existing FreeType configuration files. + +2012-11-29 John Tytgat + + [type1] Fix Savannah bug #37831. + + The bug report also contains a patch. + + * src/type1/t1parse.c (T1_Get_Private_Dict) : Really fix + change from 2012-09-17. + +2012-11-28 Alexei Podtelezhnikov + + [truetype] Fix formatting and typo. + +2012-11-27 Alexei Podtelezhnikov + + [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 + + [ftstroke] Minor improvement. + + * src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with + FT_MulDiv. + +2012-11-17 Werner Lemberg + + * src/base/fttrigon.c (ft_trig_downscale): Make 64bit version work. + +2012-11-15 Alexei Podtelezhnikov + + [base] Fix integer overflows in dd5718c7d67a. + + * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use FT_MulDiv. + +2012-11-15 Werner Lemberg + + [autofit] Trace stem widths. + + * src/autofit/aflatin.c (af_latin_metrics_init_widths): Add some + FT_TRACE calls. + +2012-11-13 Werner Lemberg + + [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 + + [autofit] Minor improvement. + + * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Fix + loop. + +2012-11-10 Werner Lemberg + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [smooth] Improve tracing. + + * src/smooth/ftgrays.c (gray_sweep): Trace last sweep line of + current band also. + +2012-10-20 Alexei Podtelezhnikov + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [psaux] Fix some value overflows. + + * src/psaux/psconv.c (PS_Conv_ToFixed): Implement it. + +2012-10-17 Bram Tassyns + + [cff] Fix value overflow. + + * src/cff/cffparse.c (cff_parse_fixed_scaled): Implement it. + +2012-10-17 Werner Lemberg + + [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 + + 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 + + [autofit] Minor optimization. + + * src/autofit/afglobals.c (af_face_globals_compute_script_coverage): + Add loop condition. + +2012-09-29 Werner Lemberg + + [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 + + [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 + + [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 + + [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 + + [type1] Fix Savannah bug #37350. + + * src/type1/t1parse.c (T1_Get_Private_Dict) : Check for ASCII + storage only if we actually have at least four bytes. + +2012-09-15 Werner Lemberg + + [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 + + [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 + + * src/autofit/afmodule.c: s/FT_Err_/AF_Err_/. + +2012-09-15 Werner Lemberg + + [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) , + af_autofitter_init: + Handle default script. + + * src/autofit/afglobal.h: Updated. + +2012-09-15 Werner Lemberg + + 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 + + [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 + + [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 + + [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 + + * src/autofit/afmodule.c: s/FT_Autofitter/AF_Module/. + +2012-09-12 Werner Lemberg + + [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 + + [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 + + [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 + + 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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + 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 + + * 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 + + [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 + + [autofit] Improve recognition of flat segments. + + Problem reported by Brad Dunzer . + + * 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 + + [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 + + [type1] Fix Savannah bug #37000. + + * src/type1/t1load.c (parse_encoding): Fix order of checks. + +2012-07-17 Werner Lemberg + + [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 + + [type1] Fix Savannah bug #36832. + + * src/type1/t1load.c (parse_charstrings): Reject negative number of + glyphs. + +2012-07-13 Werner Lemberg + + [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 + + Revert the last commit 45337b07. + + * src/base/ftstroke.c (FT_Stroker_New): Revert the previous change. + +2012-07-11 Alexei Podtelezhnikov + + [ftstroke] Fix uninitialized return value. + + * src/base/ftstroke.c (FT_Stroker_New): Return FT_Err_Ok instead. + +2012-07-11 Werner Lemberg + + [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 + + 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 + + [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 + + Fix strict-aliasing warning. + + * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast. + +2012-07-07 Dave Thomas + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + 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 + + [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 + + Fix CFLAGS and LDFLAGS share configure test. + + * builds/unix/configure.raw: Fix typo. + +2012-06-28 Werner Lemberg + + [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 + + Fix conditional compilation. + + * src/base/basepic.c: Use FT_CONFIG_OPTION_MAC_FONTS. + +2012-06-27 Werner Lemberg + + 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 + + [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 + + [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 + + [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 + + * 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 + + * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Improve spacing. + + * docs/CHANGES: Updated. + +2012-06-14 suzuki toshiya + + * 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 + + * docs/CHANGES: Updated. + +2012-06-14 suzuki toshiya + + [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 ; 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 + + [ftraster] Fix rounding issue causing visual artifacts. + + Problem reported by jola ; 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 + + * 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 + + * docs/CHANGES: Updated. + +2012-05-28 Alexei Podtelezhnikov + + 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 + + [type1] Fix Savannah bug #36386. + + * src/type1/t1load.c (t1_load_keyword): Ignore keyword if context is + not valid. + +2012-04-07 Werner Lemberg + + Remove compiler warning. + + * src/truetype/ttgload.c (TT_Load_Glyph) + [!TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Access `glyph->face' directly. + +2012-03-28 Werner Lemberg + + [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 + + [bdflib] Remove redundant macro. + + * src/bdf/bdflib.c (isdigok): Remove and replace with sbitset, which + is exactly the same. + +2012-03-20 suzuki toshiya + + [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 + + [bdf] Improvement to Savannah bug #35656. + + * src/bdf/bdflib.c (isdigok): Add cast, as suggested in report. + +2012-03-17 Chris Liddell + + [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 + + [bdf] Really fix Savannah bug #35658. + + * src/bdf/bdflib.c (_bdf_list_split): Add one more `field' initializer. + +2012-03-14 Yann Droneaud + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + Prepare source code for amalgamation. + + * include/freetype/freetype.h: Swap order of preprocessor blocks. + +2012-03-08 Werner Lemberg + + * 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 + + [bdf] Add missing overflow check. + + * src/bdf/bdflib.c (_bdf_parse_glyphs) : Add threshold for + `glyph->bpr'. + +2012-03-07 Vinnie Falco + + 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 + + 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 + + [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 + + [truetype] Fix Savannah bug #35689. + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check first outline + point. + +2012-03-01 Werner Lemberg + + [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 + + [winfonts] Fix Savannah bug #35659. + + * src/winfonts/winfnt.c (FNT_Face_Init): Check number of glyphs. + +2012-03-01 Werner Lemberg + + [bdf] Fix Savannah bug #35658. + + * src/bdf/bdflib.c (_bdf_list_split): Initialize `field' elements + properly. + +2012-03-01 Werner Lemberg + + [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 + + [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 + + [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 + + [bdf] Fix Savannah bug #35641. + + * src/bdf/bdflib.c (_bdf_parse_glyphs) : 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 + + [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 + + [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 + + [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 + + [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 + + 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) + , + src/gxvalid/gxvcommn.c (GXV_32BIT_ALIGNMENT_VALIDATE), + src/gxvalid/gxvfeat.c (gxv_feat_setting_validate): Replace `%' with + `&' operator. + +2012-02-29 Werner Lemberg + + [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) : + Implement it. + +2012-02-26 Alexei Podtelezhnikov + + [type42] Minor code optimization (again). + + * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change. + +2012-02-26 Mateusz Jurczyk + Werner Lemberg + + [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 + + [type42] Minor code optimization. + + * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of + modulo operator. + +2012-02-26 Werner Lemberg + + * docs/CHANGES: Updated. + +2012-02-26 Werner Lemberg + + [type1] Fix Savannah bug #35608. + + * src/type1/t1parse.c (T1_Get_Private_Dict): Reject too short + dictionaries. + +2012-02-26 Werner Lemberg + + [bdf] Support `ENCODING -1 ' format. + + * src/bdf/bdflib.c (_bdf_parse_glyphs) : Implement it. + +2012-02-26 Werner Lemberg + + [bdf] Fix Savannah bug #35607. + + * src/bdf/bdflib.c (_bdf_parse_glyphs) : Normalize + negative encoding values. + +2012-02-26 Werner Lemberg + + [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 + + [pcf] Fix Savannah bug #35603. + + * src/pcf/pcfread.c (pcf_get_properties): Assure final zero byte in + `strings' array. + +2012-02-25 Werner Lemberg + + [type42] Fix Savannah bug #35602. + + * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size' more + thoroughly. + +2012-02-25 Werner Lemberg + + [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 + + [bdf] Fix Savannah bugs #35597 and #35598. + + * src/bdf/bdflib.c (_bdf_is_atom): Fix handling of property value. + +2012-02-24  Vinnie Falco + + 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 + + Prepare source code for amalgamation (5/6). + + * include/freetype/fterrors.h: Undefine FT_KEEP_ERR_PREFIX after + using it. + +2012-02-22  Vinnie Falco + + 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 + + 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 + + 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 + + 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 + + [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 + + [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 + + We don't use `extensions'. + + * include/freetype/internal/ftobjs.h (FT_DriverRec): Remove + `extensions' field. + +2012-02-11 Werner Lemberg + + 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 + + [autofit] Harmonize function arguments. + + * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for + `load_flags'. + +2012-02-07 Werner Lemberg + + * src/cff/cffobjs.c (cff_face_init): Remove unnecessary casts. + +2012-01-17 suzuki toshiya + + [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 + + [raccess] Modify for PIC build. + + Based on the patch provided by Erik Dahlstrom , + 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 + + Remove trailing spaces. + +2012-01-16 suzuki toshiya + + 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 + + [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 + + [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 + + 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 + + Make pspic.c to include module error header to fix multi build. + + * src/psnames/pspic.c: Include `psnamerr.h'. + +2012-01-14 suzuki toshiya + + [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 + + [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 + + 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 + + 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 + + [truetype] Fix IP instruction if x_ppem != y_ppem. + + * src/truetype/ttinterp.c (Ins_IP): Scale `orus' coordinates + properly. + +2012-01-02 Werner Lemberg + + 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 + + Add some variable initializations. + Reported by Richard COOK . + + * 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 + + 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 + + * src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing. + +2011-12-02 suzuki toshiya + + [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 + + 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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [bdf] Improve tracing. + + * src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros. + (_bdf_parse_glyphs): Use them. + +2011-11-26 Werner Lemberg + + 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 + + [cid] Fix error code. + + * src/cid/cidparse.c (cid_parser_new): Do it. + +2011-11-26 Werner Lemberg + + [cff] Fix error code. + + * src/cff/cffload.c (cff_font_load): Do it. + +2011-11-26 Werner Lemberg + + 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 + + [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 + + * include/freetype/fterrors.h: Remove dead code. + +2011-11-15 Werner Lemberg + + * docs/releases: Updated. + +2011-11-15 Werner Lemberg + + * 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 + + 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 + + [cid] Various loading fixes. + + * src/cid/cidload.c (cid_load_keyword) , + (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 + + * 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 + + [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 + + [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 + + [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 + + * 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 + + Fix handling of transformations if no renderer is present. + + * src/base/ftobjs.c (FT_Load_Glyph): Thinko. + +2011-10-15 Kal Conley + + Fix conditions for autohinting. + + * src/base/ftobjs.c (FT_Load_Glyph): Handle + FT_LOAD_IGNORE_TRANSFORM. + +2011-10-07 suzuki toshiya + + [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 + + 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 + + [psnames] Handle zapfdingbats. + Problem reported by Nicolas Rougier . + + * 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 + + [type1] Fix Savannah bug #34189. + + * src/type1/t1load.c (T1_Open_Face): Initialize + `face->len_buildchar'. + +2011-09-26 Werner Lemberg + + [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] + : Identify as SID. + +2011-09-17 Werner Lemberg + + 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 + + [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 + + Slightly improve LZW_CLEAR handling. + + * src/lzw/ftzopen.c (ft_lzwstate_io) : + 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 + + Add explicit LZW decompression stack size limit. + + Stack larger than 1<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 + + 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) : First + code in valid LZW stream must be 0..255. + : In the special KwKwK case, code == free_ent, + code > free_ent is invalid. + +2011-09-09 Werner Lemberg + + Better tracing of metrics. + + * src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with + FT_TRACE. + +2011-09-07 Werner Lemberg + + [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 + + Better tracing of metrics. + + * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): + Decorate with FT_TRACE. + +2011-08-25 Werner Lemberg + + [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 + + Fix Savannah bug #34022. + + * README, docs/INSTALL: Remove references to UPGRADE.UNIX. + +2011-08-15 Werner Lemberg + + Fix Savannah bug #34018. + + * docs/UPGRADE.UNIX: Removed. Obsolete. + +2011-08-15 David Bevan + + Fix Savannah bug #33992. + + * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix border case. + +2011-08-12 Werner Lemberg + + [cff] Fix Savannah bug #33975. + + * src/cff/cffparse.c (cff_parse_font_matrix): Fix typo. + +2011-07-29 Werner Lemberg + + * 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 + + [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 + + [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 + + 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 + + * src/base/ftpatent.c (FT_Face_SetUnpatentedHinting): Fix typo. + +2011-07-16 Steven Chu + + [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 . + + [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 + + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) + : Better handling of subroutine index 0. + From Matthias Drochner . + +2011-07-10 Алексей Подтележников + + [psaux] Optimize previous commit. + + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) + : Move error check down to avoid testing twice for + good cases. + +2011-07-08 Werner Lemberg + + [psaux] Add better argument check for `callothersubr'. + + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) + : Reject negative arguments. + +2011-07-07 Werner Lemberg + + [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 + + 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 + + [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 + + * docs/CHANGES: Updated. + +2011-07-02 David Bevan + + [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 + + * builds/toplevel.mk: We use git, not CVS, thus skip `.gitignore'. + +2011-06-29 Werner Lemberg + + [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 + + * 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 + + * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix change + from 2011-05-04. + +2011-06-19 suzuki toshiya + + [gxvalid] make the `prop' validation tracing verbose. + + * src/gxvalid/gxvprop.c: Add tracing messages for errors. + +2011-06-19 suzuki toshiya + + [autogen.sh] Reflect environment variable LIBTOOLIZE. + +2011-06-18 Werner Lemberg + + Update license documentation. + + * docs/GPL.TXT: Renamed to... + * docs/GPLv2.TXT: This. + + * docs/LICENSE.TXT: Updated. + +2011-06-14 suzuki toshiya + + 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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + 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 + + 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 + + [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 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 + + [autofit] Improve tracing of hinting process. + + * src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message + `ADJUST'. + +2011-05-26 Werner Lemberg + + [autofit] Fix trace message. + + * src/autofit/aflatin.c (af_latin_hint_edges): Show correct value in + tracing message. + +2011-05-24 Daniel Zimmermann + + 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 + + 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 + + [autofit] Make trace message for CJK bluezone more verbose. + +2011-05-08 Just Fill Bugs + suzuki toshiya + + [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 + + [autofit] Remove unused struct member. + + * src/autofit/aflatin.h (AF_LatinAxis): Remove `control_overshoot'. + +2011-05-04 Werner Lemberg + + * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Simplify. + +2011-05-01 Just Fill Bugs + Werner Lemberg + + [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 + + 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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + 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 + + [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 + + 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 + + Synchronize config files. + + * builds/unix/ftconfig.in: Copy missing assembler routines from + include/freetype/config/ftconfig.h. + +2011-04-13 Werner Lemberg + + [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 + + 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 + + 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 + + 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 + + * src/autofit/aftypes.h (AF_OutlineRec): Removed, unused. + +2011-03-24 Werner Lemberg + + * 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 + + * src/truetype/ttpload.c (tt_face_load_loca): Fix mismatch warning. + +2011-03-20 Werner Lemberg + + * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts. + +2011-03-19 Werner Lemberg + + 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 + + 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 + + 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 . + + * src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field. + Suggested by Graham Asher. + +2011-03-09 Werner Lemberg + + 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 + + [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 + + * docs/CHANGES: Updated. + +2011-03-07 Alexei Podtelezhnikov + + 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 + + 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 + + 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 + + [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 + + * docs/PROBLEMS: Mention rendering differences on different + platforms. + Suggested and worded by Jason Owen . + +2011-02-24 Werner Lemberg + + [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 + + * src/autofit/afhints.h (AF_GlyphHints): Remove unused field. + +2011-02-20 suzuki toshiya + + [cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'. + Found by , 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 + + 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 + + [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 + + 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 + + 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 + + * src/autofit/afdummy.c: Include `aferrors.h'. + Problem reported by Chris Liddell . + +2011-02-01 Werner Lemberg + + [cff] Ignore unknown operators in charstrings. + Patch suggested by Miles.Lau . + + * 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 + + [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 + + [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 + + [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 + + [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 + + * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message. + +2011-01-30 LIU Sun-Liang + + [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 + + [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 + + 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 + + [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 + + 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 + + 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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + 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 + + 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 + + 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 + + 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 + + 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 + + * 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 + + */rules.mk: Handle `*pic.c' files. + +2010-12-31 Werner Lemberg + + * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 64. + Problem reported by Tom Bishop . + +2010-12-31 Werner Lemberg + + 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 + + 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 + + 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 + + Fix parameter handling of `FT_Set_Renderer'. + Reported by Kirill Tishin . + + * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'. + +2010-12-09 Werner Lemberg + + [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 . + + * 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 + + * 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 + + [ftsmooth]: Minor code simplification. + + * src/smooth/ftgrays (gray_render_cubic): Do only one comparison + instead of two. + +2010-11-26 Johnson Y. Yan + + [truetype] Better multi-threading support. + + * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone + references. + +2010-11-23 John Tytgat + + * 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 + + [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 + + [truetype] Fix `loca' handling for inconsistent number of glyphs. + Reported by Johnson Y. Yan . + + * 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 + + [sfnt] Ignore all errors while loading `OS/2' table. + Suggested by Johnson Y. Yan . + + * src/sfnt/sfobjs.c (sfnt_load_face): Do it. + +2010-11-18 Johnson Y. Yan + + [type1] Fix matrix normalization. + + * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling + factor. + +2010-11-18 Werner Lemberg + + [type1] Improve guard against malformed data. + Based on a patch submitted by Johnson Y. Yan + + + * src/type1/t1load.c (read_binary_data): Check `size'. + +2010-11-17 Werner Lemberg + + [sfnt] While tracing, output table checksums also. + + * src/sfnt/ttload.c (tt_face_load_font_dir): Do it. + +2010-11-04 suzuki toshiya + + [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 + + [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 + + [ftraster] Minor fixes. + + Reported by Tom Bishop . + + * src/raster/ftraster.c (ULong): Remove unused typedef. + (TWorker): Remove unused variable `precision_mask'. + +2010-10-28 Werner Lemberg + + [ftraster] Fix rendering. + + Problem reported by Tom Bishop ; 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 + + 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 + + [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 + + [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 + + 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 + + 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 + + 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 + + [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 + + [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 + + 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 + + [truetype] Fix Savannah bug #31310. + + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against + invalid `runcnt' values. + +2010-10-08 Chris Liddell + + [sfnt] Fix Savannah bug #31275. + + * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H. + +2010-10-06 Werner Lemberg + + [truetype] Improve error handling of `SHZ' bytecode instruction. + Problem reported by Chris Evans . + + * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'. + +2010-10-05 Werner Lemberg + + 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 + + * 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 + + Avoid `configure' issues with symbolic links. + Based on a patch from Alexander Stohr . + + * configure: Compare directories using `ls -id'. + Check existence of `reference' subdirectory before creating it. + +2010-10-02 Werner Lemberg + + [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 + + [smooth] Fix splitting of cubics for negative values. + + Reported by Róbert Márki ; 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 + + [truetype] Fix Savannah bug #31040. + + * src/truetype/ttinterp.c (free_buffer_in_size): Remove. + (TT_RunIns): Updated. + +2010-09-20 suzuki toshiya + + [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 + David Bevan + + [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 + + 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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + 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 + + 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 + + Fix minor issues reported by . + + * 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 + + 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 + + [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 + + [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 + + [ftraster] Pacify compiler. + + * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is + not used. + +2010-08-29 Werner Lemberg + + [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ć . + +2010-08-28 suzuki toshiya + + 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 + + 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 + + [cache] Fix Savannah bug #30788. + + * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for + NULL too. + +2010-08-10 Werner Lemberg + + 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 + + * 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 + + 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 + + [raster] Fix valgrind warning. + + * src/raster/ftraster.c (Decompose_Curve) : Access point[0] + only if we don't hit `limit'. + +2010-08-06 suzuki toshiya + + 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 + + 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 + + [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 + + [type42] Fix Savannah bug #30656. + + * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative + string_size. + Fix comparison. + +2010-08-05 suzuki toshiya + + [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 + + Fix Savannah bug #30644. + + * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison. + +2010-08-04 Werner Lemberg + + `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 + + [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 + + 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 + + * 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 + + [cff] Final try to fix `hintmask' and `cntrmask' limit check. + + Problem reported by Tobias Wolf . + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) + : Sigh. I'm apparently too silly to fix this + correctly in less than three tries. + +2010-07-12 Werner Lemberg + + * 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 + + Remove C++ warnings. + + */*: Initialize pointers where necessary to make g++ happy. + +2010-07-12 malc + Richard Henderson + + 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 + + Fix C++ compilation issue. + + * src/tools/apinames.c (names_dump) : Fix + type of `dot' variable. + +2010-07-10 suzuki toshiya + + 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 + + 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 + + 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 + + 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 + + [truetype] Fix Savannah bug #30361. + + * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check. + +2010-07-06 Werner Lemberg + + Pacify compiler. + + * src/cff/cffload.c (cff_index_get_pointers): Initialize + `new_bytes'. + +2010-07-05 Eugene A. Shatokhin + + 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 + + Fix Savannah bug #30030. + + * builds/win32/*/freetype.vcproj: Add ftxf86.c. + +2010-07-05 Werner Lemberg + + [cff] Next try to fix `hintmask' and `cntrmask' limit check. + + Problem reported by malc . + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) + : 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + [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 + + [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 + + [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 + + 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 + + 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 + + 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 + + Fix minor tracing issues. + + * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels. + +2010-06-27 Werner Lemberg + + [cff] Really fix `hintmask' and `cntrmask' limit check. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) + : Fix thinko and handle tracing also. + +2010-06-27 Werner Lemberg + + Fix valgrind warning. + + * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize + `result' array. + +2010-06-27 Werner Lemberg + + [cff] Fix memory leak. + + * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in + case of errors. + +2010-06-27 Werner Lemberg + + [cff] Protect against invalid `hintmask' and `cntrmask' operators. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) + : Ensure that we don't exceed `limit' while parsing + the bit masks of the `hintmask' and `cntrmask' operators. + +2010-06-26 Werner Lemberg + + Fix PFR change 2010-06-24. + + * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against + invalid indices. + +2010-06-26 Werner Lemberg + + 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 + + Fix last PFR change. + + * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic. + +2010-06-26 Werner Lemberg + + [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 + + 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 + + [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 + + [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 + + 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 + + [pcf] Fix Savannah bug #30247. + + * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with + zero metrics. + +2010-06-24 Graham Asher + + * 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 + + */*: Use module specific error names where appropriate. + +2010-06-24 Werner Lemberg + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [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 + + [cff]: Improve debugging output. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) + : Implement it. + +2010-06-10 Graham Asher + + 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 + + [cff] Fix Savannah bug #30082. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) + : Protect against stack underflow. + +2010-06-08 Werner Lemberg + + [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 + + 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 + + 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 + + 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 + + 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 + + [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 + + 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 + + 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 + + * docs/formats.txt: Give pointer to PCF documentation. + Information provided by Alan Coopersmith + . + +2010-05-10 Ken Sharp + + [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 + + [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ń + + [psaux] Fix Savannah bug #27999. + + * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove + selected entry, not all. + +2010-04-06 Jonathan Kew + + [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 + + [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 + + Add new function `FT_Library_SetLcdFilterWeights'. + + This is based on code written by Lifter + . 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 + + [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 + + Fix `multi build' for Tytgat's CFF driver improvement. + + * src/base/cffload.h (cff_index_get_name): Added. + +2010-03-12 suzuki toshiya + + 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 + + [raster] Fix Savannah bug #27442. + + * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'. + +2010-03-09 Werner Lemberg + + [cff] Remove unused variable. + Reported by Graham. + + * src/cff/cffparse.c (cff_parse_real): Remove `rest'. + +2010-03-02 John Tytgat + + [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 + + 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 + + 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 + + [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/freetype/Jamfile b/freetype/Jamfile index a097dffd..16e097ed 100644 --- a/freetype/Jamfile +++ b/freetype/Jamfile @@ -1,6 +1,6 @@ # FreeType 2 top Jamfile. # -# Copyright 2001-2011, 2013 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, @@ -195,7 +195,7 @@ rule RefDoc actions RefDoc { - python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.5.1 --output=$(DOC_DIR) $(FT2_INCLUDE)/*.h $(FT2_INCLUDE)/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/freetype/PaxHeaders.18661/CMakeLists.txt b/freetype/PaxHeaders.18661/CMakeLists.txt deleted file mode 100644 index 36fc64bb..00000000 --- a/freetype/PaxHeaders.18661/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384329146.392446647 -30 atime=1385276983.361964415 -30 ctime=1384329146.393446635 diff --git a/freetype/PaxHeaders.18661/ChangeLog b/freetype/PaxHeaders.18661/ChangeLog deleted file mode 100644 index a14d8fcb..00000000 --- a/freetype/PaxHeaders.18661/ChangeLog +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335664.370350857 -30 atime=1385335672.175253282 -30 ctime=1385335664.370350857 diff --git a/freetype/PaxHeaders.18661/ChangeLog.20 b/freetype/PaxHeaders.18661/ChangeLog.20 deleted file mode 100644 index d4cd4054..00000000 --- a/freetype/PaxHeaders.18661/ChangeLog.20 +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385276983.302965153 -30 ctime=1374498495.714319741 diff --git a/freetype/PaxHeaders.18661/ChangeLog.21 b/freetype/PaxHeaders.18661/ChangeLog.21 deleted file mode 100644 index aa8a2304..00000000 --- a/freetype/PaxHeaders.18661/ChangeLog.21 +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385276983.317964965 -26 ctime=1374498498.09329 diff --git a/freetype/PaxHeaders.18661/ChangeLog.22 b/freetype/PaxHeaders.18661/ChangeLog.22 deleted file mode 100644 index c4338b5b..00000000 --- a/freetype/PaxHeaders.18661/ChangeLog.22 +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385276983.341964665 -30 ctime=1374498496.743306877 diff --git a/freetype/PaxHeaders.18661/ChangeLog.23 b/freetype/PaxHeaders.18661/ChangeLog.23 deleted file mode 100644 index 7cbc6e6c..00000000 --- a/freetype/PaxHeaders.18661/ChangeLog.23 +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385276983.345964615 -30 ctime=1374498498.104289862 diff --git a/freetype/PaxHeaders.18661/Jamfile b/freetype/PaxHeaders.18661/Jamfile deleted file mode 100644 index 8ba6f9d1..00000000 --- a/freetype/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1385044911.04402723 -29 atime=1385335585.38333833 -29 ctime=1385044911.04402723 diff --git a/freetype/PaxHeaders.18661/Jamrules b/freetype/PaxHeaders.18661/Jamrules deleted file mode 100644 index 79f93723..00000000 --- a/freetype/PaxHeaders.18661/Jamrules +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385276983.382964153 -30 ctime=1374498498.114289737 diff --git a/freetype/PaxHeaders.18661/Makefile b/freetype/PaxHeaders.18661/Makefile deleted file mode 100644 index 2f296f55..00000000 --- a/freetype/PaxHeaders.18661/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384329134.388596716 -30 atime=1385335771.950005926 -30 ctime=1384329134.388596716 diff --git a/freetype/PaxHeaders.18661/README b/freetype/PaxHeaders.18661/README deleted file mode 100644 index 7046b0b5..00000000 --- a/freetype/PaxHeaders.18661/README +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1385044911.17602558 -30 atime=1385335585.424337818 -29 ctime=1385044911.17602558 diff --git a/freetype/PaxHeaders.18661/README.git b/freetype/PaxHeaders.18661/README.git deleted file mode 100644 index 37e9d956..00000000 --- a/freetype/PaxHeaders.18661/README.git +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382595666.449020468 -30 atime=1385276983.400963928 -30 ctime=1382595666.449020468 diff --git a/freetype/PaxHeaders.18661/autogen.sh b/freetype/PaxHeaders.18661/autogen.sh deleted file mode 100644 index e8d82161..00000000 --- a/freetype/PaxHeaders.18661/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384258011.078056612 -30 atime=1385276983.285965365 -30 ctime=1384258011.078056612 diff --git a/freetype/PaxHeaders.18661/builds b/freetype/PaxHeaders.18661/builds deleted file mode 100644 index 42b7e3ea..00000000 --- a/freetype/PaxHeaders.18661/builds +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335774.039979798 -30 atime=1385335774.073979373 -30 ctime=1385335774.039979798 diff --git a/freetype/PaxHeaders.18661/configure b/freetype/PaxHeaders.18661/configure deleted file mode 100644 index df6536c1..00000000 --- a/freetype/PaxHeaders.18661/configure +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335783.87685682 -29 ctime=1385335783.70485897 diff --git a/freetype/PaxHeaders.18661/devel b/freetype/PaxHeaders.18661/devel deleted file mode 100644 index 21481c3f..00000000 --- a/freetype/PaxHeaders.18661/devel +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.814982611 -30 atime=1385335774.461974522 -30 ctime=1385335773.814982611 diff --git a/freetype/PaxHeaders.18661/docs b/freetype/PaxHeaders.18661/docs deleted file mode 100644 index f7647099..00000000 --- a/freetype/PaxHeaders.18661/docs +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335772.746995962 -30 atime=1385335783.897856557 -30 ctime=1385335772.746995962 diff --git a/freetype/PaxHeaders.18661/include b/freetype/PaxHeaders.18661/include deleted file mode 100644 index 6787d7ae..00000000 --- a/freetype/PaxHeaders.18661/include +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335772.936993587 -29 atime=1385335774.45897456 -30 ctime=1385335772.936993587 diff --git a/freetype/PaxHeaders.18661/modules.cfg b/freetype/PaxHeaders.18661/modules.cfg deleted file mode 100644 index a3444afe..00000000 --- a/freetype/PaxHeaders.18661/modules.cfg +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384257746.282367014 -30 atime=1385335760.267151982 -30 ctime=1384257746.282367014 diff --git a/freetype/PaxHeaders.18661/objs b/freetype/PaxHeaders.18661/objs deleted file mode 100644 index f956b043..00000000 --- a/freetype/PaxHeaders.18661/objs +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335774.917968822 -30 atime=1385335786.748820916 -30 ctime=1385335774.917968822 diff --git a/freetype/PaxHeaders.18661/src b/freetype/PaxHeaders.18661/src deleted file mode 100644 index 2aa3bb90..00000000 --- a/freetype/PaxHeaders.18661/src +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.278989312 -30 atime=1385335784.566848194 -30 ctime=1385335773.278989312 diff --git a/freetype/PaxHeaders.18661/version.sed b/freetype/PaxHeaders.18661/version.sed deleted file mode 100644 index c47e0a86..00000000 --- a/freetype/PaxHeaders.18661/version.sed +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385276983.417963715 -29 ctime=1374498498.03329075 diff --git a/freetype/PaxHeaders.18661/vms_make.com b/freetype/PaxHeaders.18661/vms_make.com deleted file mode 100644 index 81bbc8a3..00000000 --- a/freetype/PaxHeaders.18661/vms_make.com +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1384258761.84367075 -29 atime=1385276983.43596349 -29 ctime=1384258761.84367075 diff --git a/freetype/README b/freetype/README index c694282a..f00a1ab7 100644 --- a/freetype/README +++ b/freetype/README @@ -1,4 +1,4 @@ - FreeType 2.5.1 + FreeType 2.5.5 ============== Homepage: http://www.freetype.org @@ -16,7 +16,7 @@ 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 @@ -24,9 +24,9 @@ and download one of the following files. - freetype-doc-2.5.1.tar.bz2 - freetype-doc-2.5.1.tar.gz - ftdoc251.zip + freetype-doc-2.5.5.tar.bz2 + freetype-doc-2.5.5.tar.gz + ftdoc255.zip To view the documentation online, go to @@ -53,15 +53,15 @@ 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! @@ -70,7 +70,7 @@ ---------------------------------------------------------------------- -Copyright 2006-2013 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/freetype/autogen.sh b/freetype/autogen.sh old mode 100644 new mode 100755 diff --git a/freetype/builds/PaxHeaders.18661/amiga b/freetype/builds/PaxHeaders.18661/amiga deleted file mode 100644 index 37ca2dac..00000000 --- a/freetype/builds/PaxHeaders.18661/amiga +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.905981473 -30 atime=1385335786.859819528 -30 ctime=1385335773.905981473 diff --git a/freetype/builds/PaxHeaders.18661/ansi b/freetype/builds/PaxHeaders.18661/ansi deleted file mode 100644 index 480780ac..00000000 --- a/freetype/builds/PaxHeaders.18661/ansi +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335774.037979823 -30 atime=1385335787.199815277 -30 ctime=1385335774.037979823 diff --git a/freetype/builds/PaxHeaders.18661/atari b/freetype/builds/PaxHeaders.18661/atari deleted file mode 100644 index efe6c9c3..00000000 --- a/freetype/builds/PaxHeaders.18661/atari +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.864981986 -29 atime=1385335786.85481959 -30 ctime=1385335773.864981986 diff --git a/freetype/builds/PaxHeaders.18661/beos b/freetype/builds/PaxHeaders.18661/beos deleted file mode 100644 index f4b2a21c..00000000 --- a/freetype/builds/PaxHeaders.18661/beos +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.849982173 -30 atime=1385335774.089979173 -30 ctime=1385335773.849982173 diff --git a/freetype/builds/PaxHeaders.18661/compiler b/freetype/builds/PaxHeaders.18661/compiler deleted file mode 100644 index a02cdba3..00000000 --- a/freetype/builds/PaxHeaders.18661/compiler +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.890981661 -30 atime=1385335774.873969372 -30 ctime=1385335773.890981661 diff --git a/freetype/builds/PaxHeaders.18661/detect.mk b/freetype/builds/PaxHeaders.18661/detect.mk deleted file mode 100644 index 1a550bce..00000000 --- a/freetype/builds/PaxHeaders.18661/detect.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384257040.011196618 -30 atime=1385335759.859157083 -30 ctime=1384257040.011196618 diff --git a/freetype/builds/PaxHeaders.18661/dos b/freetype/builds/PaxHeaders.18661/dos deleted file mode 100644 index d9e06da2..00000000 --- a/freetype/builds/PaxHeaders.18661/dos +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.843982248 -29 atime=1385335774.09097916 -30 ctime=1385335773.843982248 diff --git a/freetype/builds/PaxHeaders.18661/exports.mk b/freetype/builds/PaxHeaders.18661/exports.mk deleted file mode 100644 index 3796c70b..00000000 --- a/freetype/builds/PaxHeaders.18661/exports.mk +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335774.45897456 -30 ctime=1374498497.987291325 diff --git a/freetype/builds/PaxHeaders.18661/freetype.mk b/freetype/builds/PaxHeaders.18661/freetype.mk deleted file mode 100644 index 88a3baba..00000000 --- a/freetype/builds/PaxHeaders.18661/freetype.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384258291.849546485 -29 atime=1385335759.86015707 -30 ctime=1384258291.849546485 diff --git a/freetype/builds/PaxHeaders.18661/link_dos.mk b/freetype/builds/PaxHeaders.18661/link_dos.mk deleted file mode 100644 index 844c83f8..00000000 --- a/freetype/builds/PaxHeaders.18661/link_dos.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.197815302 -30 ctime=1374498498.023290875 diff --git a/freetype/builds/PaxHeaders.18661/link_std.mk b/freetype/builds/PaxHeaders.18661/link_std.mk deleted file mode 100644 index f6a896a5..00000000 --- a/freetype/builds/PaxHeaders.18661/link_std.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.457974572 -30 ctime=1374498498.015290975 diff --git a/freetype/builds/PaxHeaders.18661/mac b/freetype/builds/PaxHeaders.18661/mac deleted file mode 100644 index 5d4b54b1..00000000 --- a/freetype/builds/PaxHeaders.18661/mac +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.924981236 -30 atime=1385335786.869819403 -30 ctime=1385335773.924981236 diff --git a/freetype/builds/PaxHeaders.18661/modules.mk b/freetype/builds/PaxHeaders.18661/modules.mk deleted file mode 100644 index cc2ad3d4..00000000 --- a/freetype/builds/PaxHeaders.18661/modules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335771.982005526 -28 ctime=1374498497.9492918 diff --git a/freetype/builds/PaxHeaders.18661/newline b/freetype/builds/PaxHeaders.18661/newline deleted file mode 100644 index 52ded014..00000000 --- a/freetype/builds/PaxHeaders.18661/newline +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.197815302 -28 ctime=1374498497.9972912 diff --git a/freetype/builds/PaxHeaders.18661/os2 b/freetype/builds/PaxHeaders.18661/os2 deleted file mode 100644 index 55e08c56..00000000 --- a/freetype/builds/PaxHeaders.18661/os2 +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.834982361 -29 atime=1385335774.09097916 -30 ctime=1385335773.834982361 diff --git a/freetype/builds/PaxHeaders.18661/symbian b/freetype/builds/PaxHeaders.18661/symbian deleted file mode 100644 index ee7616ef..00000000 --- a/freetype/builds/PaxHeaders.18661/symbian +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.957980823 -30 atime=1385335787.127816177 -30 ctime=1385335773.957980823 diff --git a/freetype/builds/PaxHeaders.18661/toplevel.mk b/freetype/builds/PaxHeaders.18661/toplevel.mk deleted file mode 100644 index d7bcf751..00000000 --- a/freetype/builds/PaxHeaders.18661/toplevel.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256999.202706795 -30 atime=1385335759.862157045 -30 ctime=1384256999.202706795 diff --git a/freetype/builds/PaxHeaders.18661/unix b/freetype/builds/PaxHeaders.18661/unix deleted file mode 100644 index 9ed1d55e..00000000 --- a/freetype/builds/PaxHeaders.18661/unix +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335783.762858245 -30 atime=1385335786.940818515 -30 ctime=1385335783.762858245 diff --git a/freetype/builds/PaxHeaders.18661/vms b/freetype/builds/PaxHeaders.18661/vms deleted file mode 100644 index e876a8ac..00000000 --- a/freetype/builds/PaxHeaders.18661/vms +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.909981423 -30 atime=1385335786.865819453 -30 ctime=1385335773.909981423 diff --git a/freetype/builds/PaxHeaders.18661/wince b/freetype/builds/PaxHeaders.18661/wince deleted file mode 100644 index f74268a3..00000000 --- a/freetype/builds/PaxHeaders.18661/wince +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.827982448 -30 atime=1385335786.785820453 -30 ctime=1385335773.827982448 diff --git a/freetype/builds/PaxHeaders.18661/windows b/freetype/builds/PaxHeaders.18661/windows deleted file mode 100644 index 0906d453..00000000 --- a/freetype/builds/PaxHeaders.18661/windows +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335774.023979998 -30 atime=1385335774.089979173 -30 ctime=1385335774.023979998 diff --git a/freetype/builds/amiga/PaxHeaders.18661/README b/freetype/builds/amiga/PaxHeaders.18661/README deleted file mode 100644 index 2d134ee8..00000000 --- a/freetype/builds/amiga/PaxHeaders.18661/README +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256699.382455064 -30 atime=1385335759.837157358 -30 ctime=1384256699.382455064 diff --git a/freetype/builds/amiga/PaxHeaders.18661/include b/freetype/builds/amiga/PaxHeaders.18661/include deleted file mode 100644 index 7ed5f144..00000000 --- a/freetype/builds/amiga/PaxHeaders.18661/include +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1385335772.61999755 -30 atime=1385335772.674996863 -29 ctime=1385335772.61999755 diff --git a/freetype/builds/amiga/PaxHeaders.18661/makefile b/freetype/builds/amiga/PaxHeaders.18661/makefile deleted file mode 100644 index 19863a57..00000000 --- a/freetype/builds/amiga/PaxHeaders.18661/makefile +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256653.087033836 -30 atime=1385335759.855157133 -30 ctime=1384256653.087033836 diff --git a/freetype/builds/amiga/PaxHeaders.18661/makefile.os4 b/freetype/builds/amiga/PaxHeaders.18661/makefile.os4 deleted file mode 100644 index 8a202d12..00000000 --- a/freetype/builds/amiga/PaxHeaders.18661/makefile.os4 +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256831.316805657 -29 atime=1385335759.85615712 -30 ctime=1384256831.316805657 diff --git a/freetype/builds/amiga/PaxHeaders.18661/smakefile b/freetype/builds/amiga/PaxHeaders.18661/smakefile deleted file mode 100644 index d2fe111b..00000000 --- a/freetype/builds/amiga/PaxHeaders.18661/smakefile +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256845.205632023 -30 atime=1385335759.857157108 -30 ctime=1384256845.205632023 diff --git a/freetype/builds/amiga/PaxHeaders.18661/src b/freetype/builds/amiga/PaxHeaders.18661/src deleted file mode 100644 index 8ca24bc7..00000000 --- a/freetype/builds/amiga/PaxHeaders.18661/src +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335772.624997488 -30 atime=1385335772.674996863 -30 ctime=1385335772.624997488 diff --git a/freetype/builds/amiga/include/PaxHeaders.18661/config b/freetype/builds/amiga/include/PaxHeaders.18661/config deleted file mode 100644 index 4450fe4a..00000000 --- a/freetype/builds/amiga/include/PaxHeaders.18661/config +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.897981573 -30 atime=1385335786.859819528 -30 ctime=1385335773.897981573 diff --git a/freetype/builds/amiga/include/config/PaxHeaders.18661/ftconfig.h b/freetype/builds/amiga/include/config/PaxHeaders.18661/ftconfig.h deleted file mode 100644 index 3c8fa330..00000000 --- a/freetype/builds/amiga/include/config/PaxHeaders.18661/ftconfig.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256772.669538849 -30 atime=1385335759.491161683 -30 ctime=1384256772.669538849 diff --git a/freetype/builds/amiga/include/config/PaxHeaders.18661/ftmodule.h b/freetype/builds/amiga/include/config/PaxHeaders.18661/ftmodule.h deleted file mode 100644 index 74587721..00000000 --- a/freetype/builds/amiga/include/config/PaxHeaders.18661/ftmodule.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335759.839157333 -29 ctime=1374498497.91329225 diff --git a/freetype/builds/amiga/src/PaxHeaders.18661/base b/freetype/builds/amiga/src/PaxHeaders.18661/base deleted file mode 100644 index d6eb93d0..00000000 --- a/freetype/builds/amiga/src/PaxHeaders.18661/base +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.901981523 -30 atime=1385335786.859819528 -30 ctime=1385335773.901981523 diff --git a/freetype/builds/amiga/src/base/PaxHeaders.18661/ftdebug.c b/freetype/builds/amiga/src/base/PaxHeaders.18661/ftdebug.c deleted file mode 100644 index c83fae6f..00000000 --- a/freetype/builds/amiga/src/base/PaxHeaders.18661/ftdebug.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256805.016134461 -30 atime=1385335759.858157095 -30 ctime=1384256805.016134461 diff --git a/freetype/builds/amiga/src/base/PaxHeaders.18661/ftsystem.c b/freetype/builds/amiga/src/base/PaxHeaders.18661/ftsystem.c deleted file mode 100644 index 11112cc3..00000000 --- a/freetype/builds/amiga/src/base/PaxHeaders.18661/ftsystem.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.863819478 -30 ctime=1374498497.903292375 diff --git a/freetype/builds/ansi/PaxHeaders.18661/ansi-def.mk b/freetype/builds/ansi/PaxHeaders.18661/ansi-def.mk deleted file mode 100644 index b30ef3bc..00000000 --- a/freetype/builds/ansi/PaxHeaders.18661/ansi-def.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.199815277 -30 ctime=1374498498.022290888 diff --git a/freetype/builds/ansi/PaxHeaders.18661/ansi.mk b/freetype/builds/ansi/PaxHeaders.18661/ansi.mk deleted file mode 100644 index 2a46a58b..00000000 --- a/freetype/builds/ansi/PaxHeaders.18661/ansi.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.199815277 -28 ctime=1374498498.0212909 diff --git a/freetype/builds/atari/PaxHeaders.18661/ATARI.H b/freetype/builds/atari/PaxHeaders.18661/ATARI.H deleted file mode 100644 index 505b3c09..00000000 --- a/freetype/builds/atari/PaxHeaders.18661/ATARI.H +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.856819565 -30 ctime=1374498497.944291863 diff --git a/freetype/builds/atari/PaxHeaders.18661/FNames.SIC b/freetype/builds/atari/PaxHeaders.18661/FNames.SIC deleted file mode 100644 index 937101ae..00000000 --- a/freetype/builds/atari/PaxHeaders.18661/FNames.SIC +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.856819565 -30 ctime=1374498497.948291813 diff --git a/freetype/builds/atari/PaxHeaders.18661/FREETYPE.PRJ b/freetype/builds/atari/PaxHeaders.18661/FREETYPE.PRJ deleted file mode 100644 index d04f90fe..00000000 --- a/freetype/builds/atari/PaxHeaders.18661/FREETYPE.PRJ +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.855819578 -30 ctime=1374498497.946291838 diff --git a/freetype/builds/atari/PaxHeaders.18661/README.TXT b/freetype/builds/atari/PaxHeaders.18661/README.TXT deleted file mode 100644 index 95b01625..00000000 --- a/freetype/builds/atari/PaxHeaders.18661/README.TXT +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.855819578 -30 ctime=1374498497.947291825 diff --git a/freetype/builds/atari/PaxHeaders.18661/deflinejoiner.awk b/freetype/builds/atari/PaxHeaders.18661/deflinejoiner.awk deleted file mode 100644 index 74b677e7..00000000 --- a/freetype/builds/atari/PaxHeaders.18661/deflinejoiner.awk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.855819578 -29 ctime=1374498497.94529185 diff --git a/freetype/builds/atari/PaxHeaders.18661/gen-purec-patch.sh b/freetype/builds/atari/PaxHeaders.18661/gen-purec-patch.sh deleted file mode 100644 index 0ae9c7f7..00000000 --- a/freetype/builds/atari/PaxHeaders.18661/gen-purec-patch.sh +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335786.85481959 -30 ctime=1374498497.942291888 diff --git a/freetype/builds/atari/gen-purec-patch.sh b/freetype/builds/atari/gen-purec-patch.sh old mode 100644 new mode 100755 diff --git a/freetype/builds/beos/PaxHeaders.18661/beos-def.mk b/freetype/builds/beos/PaxHeaders.18661/beos-def.mk deleted file mode 100644 index b481ba50..00000000 --- a/freetype/builds/beos/PaxHeaders.18661/beos-def.mk +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335786.85481959 -30 ctime=1374498497.834293238 diff --git a/freetype/builds/beos/PaxHeaders.18661/beos.mk b/freetype/builds/beos/PaxHeaders.18661/beos.mk deleted file mode 100644 index 1ca87475..00000000 --- a/freetype/builds/beos/PaxHeaders.18661/beos.mk +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335786.85481959 -30 ctime=1374498497.836293213 diff --git a/freetype/builds/beos/PaxHeaders.18661/detect.mk b/freetype/builds/beos/PaxHeaders.18661/detect.mk deleted file mode 100644 index f2e7f1a0..00000000 --- a/freetype/builds/beos/PaxHeaders.18661/detect.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335771.974005626 -28 ctime=1374498497.8372932 diff --git a/freetype/builds/cmake/iOS.cmake b/freetype/builds/cmake/iOS.cmake new file mode 100644 index 00000000..a41a7acf --- /dev/null +++ b/freetype/builds/cmake/iOS.cmake @@ -0,0 +1,275 @@ +# iOS.cmake +# +# Copyright 2014 by +# David Turner, Robert Wilhelm, and Werner Lemberg. +# +# Written by David Wimsey +# +# 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/freetype/builds/compiler/PaxHeaders.18661/ansi-cc.mk b/freetype/builds/compiler/PaxHeaders.18661/ansi-cc.mk deleted file mode 100644 index 9e35eaf1..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/ansi-cc.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.859819528 -30 ctime=1374498497.924292113 diff --git a/freetype/builds/compiler/PaxHeaders.18661/bcc-dev.mk b/freetype/builds/compiler/PaxHeaders.18661/bcc-dev.mk deleted file mode 100644 index eb806960..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/bcc-dev.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.857819553 -30 ctime=1374498497.927292075 diff --git a/freetype/builds/compiler/PaxHeaders.18661/bcc.mk b/freetype/builds/compiler/PaxHeaders.18661/bcc.mk deleted file mode 100644 index a0ef8ada..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/bcc.mk +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335786.85881954 -30 ctime=1374498497.923292125 diff --git a/freetype/builds/compiler/PaxHeaders.18661/emx.mk b/freetype/builds/compiler/PaxHeaders.18661/emx.mk deleted file mode 100644 index 1fb4d49e..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/emx.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.857819553 -28 ctime=1374498497.9252921 diff --git a/freetype/builds/compiler/PaxHeaders.18661/gcc-dev.mk b/freetype/builds/compiler/PaxHeaders.18661/gcc-dev.mk deleted file mode 100644 index 099a832a..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/gcc-dev.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.448974685 -30 ctime=1382596802.907812778 diff --git a/freetype/builds/compiler/PaxHeaders.18661/gcc.mk b/freetype/builds/compiler/PaxHeaders.18661/gcc.mk deleted file mode 100644 index 19bc5690..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/gcc.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.859819528 -30 ctime=1374498497.922292138 diff --git a/freetype/builds/compiler/PaxHeaders.18661/intelc.mk b/freetype/builds/compiler/PaxHeaders.18661/intelc.mk deleted file mode 100644 index a289e489..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/intelc.mk +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335786.85881954 -30 ctime=1374498497.928292063 diff --git a/freetype/builds/compiler/PaxHeaders.18661/unix-lcc.mk b/freetype/builds/compiler/PaxHeaders.18661/unix-lcc.mk deleted file mode 100644 index 308efda9..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/unix-lcc.mk +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335786.85881954 -29 ctime=1374498497.92129215 diff --git a/freetype/builds/compiler/PaxHeaders.18661/visualage.mk b/freetype/builds/compiler/PaxHeaders.18661/visualage.mk deleted file mode 100644 index b9a1b47a..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/visualage.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.856819565 -30 ctime=1374498497.926292088 diff --git a/freetype/builds/compiler/PaxHeaders.18661/visualc.mk b/freetype/builds/compiler/PaxHeaders.18661/visualc.mk deleted file mode 100644 index 32fd9330..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/visualc.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.857819553 -30 ctime=1374498497.930292038 diff --git a/freetype/builds/compiler/PaxHeaders.18661/watcom.mk b/freetype/builds/compiler/PaxHeaders.18661/watcom.mk deleted file mode 100644 index 9fc5d207..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/watcom.mk +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335786.85881954 -29 ctime=1374498497.92929205 diff --git a/freetype/builds/compiler/PaxHeaders.18661/win-lcc.mk b/freetype/builds/compiler/PaxHeaders.18661/win-lcc.mk deleted file mode 100644 index e2abeac0..00000000 --- a/freetype/builds/compiler/PaxHeaders.18661/win-lcc.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.856819565 -30 ctime=1374498497.931292025 diff --git a/freetype/builds/detect.mk b/freetype/builds/detect.mk index ce407baf..ff4045d5 100644 --- a/freetype/builds/detect.mk +++ b/freetype/builds/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2003, 2006, 2008, 2013 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, @@ -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/freetype/builds/dos/PaxHeaders.18661/detect.mk b/freetype/builds/dos/PaxHeaders.18661/detect.mk deleted file mode 100644 index c61cabf0..00000000 --- a/freetype/builds/dos/PaxHeaders.18661/detect.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335771.974005626 -30 ctime=1374498497.995291225 diff --git a/freetype/builds/dos/PaxHeaders.18661/dos-def.mk b/freetype/builds/dos/PaxHeaders.18661/dos-def.mk deleted file mode 100644 index 9b39f5b6..00000000 --- a/freetype/builds/dos/PaxHeaders.18661/dos-def.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.853819603 -30 ctime=1374498497.994291238 diff --git a/freetype/builds/dos/PaxHeaders.18661/dos-emx.mk b/freetype/builds/dos/PaxHeaders.18661/dos-emx.mk deleted file mode 100644 index 065b1909..00000000 --- a/freetype/builds/dos/PaxHeaders.18661/dos-emx.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.853819603 -30 ctime=1374498497.996291213 diff --git a/freetype/builds/dos/PaxHeaders.18661/dos-gcc.mk b/freetype/builds/dos/PaxHeaders.18661/dos-gcc.mk deleted file mode 100644 index 82431e64..00000000 --- a/freetype/builds/dos/PaxHeaders.18661/dos-gcc.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.853819603 -29 ctime=1374498497.99329125 diff --git a/freetype/builds/dos/PaxHeaders.18661/dos-wat.mk b/freetype/builds/dos/PaxHeaders.18661/dos-wat.mk deleted file mode 100644 index 445b8278..00000000 --- a/freetype/builds/dos/PaxHeaders.18661/dos-wat.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.853819603 -30 ctime=1374498497.992291263 diff --git a/freetype/builds/dos/detect.mk b/freetype/builds/dos/detect.mk index 700a1226..3e5e967e 100644 --- a/freetype/builds/dos/detect.mk +++ b/freetype/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/freetype/builds/freetype.mk b/freetype/builds/freetype.mk index 2a58db32..8b2e2eac 100644 --- a/freetype/builds/freetype.mk +++ b/freetype/builds/freetype.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2006, 2008, 2013 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, @@ -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/' directories; @@ -147,13 +155,14 @@ ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),) FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_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="" \ $(FTOPTION_FLAG) -FT_CC = $(CC) $(FT_CFLAGS) FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS) @@ -288,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/freetype/builds/mac/PaxHeaders.18661/FreeType.m68k_cfm.make.txt b/freetype/builds/mac/PaxHeaders.18661/FreeType.m68k_cfm.make.txt deleted file mode 100644 index e892ab8c..00000000 --- a/freetype/builds/mac/PaxHeaders.18661/FreeType.m68k_cfm.make.txt +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.924818715 -30 ctime=1374498498.012291013 diff --git a/freetype/builds/mac/PaxHeaders.18661/FreeType.m68k_far.make.txt b/freetype/builds/mac/PaxHeaders.18661/FreeType.m68k_far.make.txt deleted file mode 100644 index c8b5fa7c..00000000 --- a/freetype/builds/mac/PaxHeaders.18661/FreeType.m68k_far.make.txt +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.940818515 -27 ctime=1374498498.013291 diff --git a/freetype/builds/mac/PaxHeaders.18661/FreeType.ppc_carbon.make.txt b/freetype/builds/mac/PaxHeaders.18661/FreeType.ppc_carbon.make.txt deleted file mode 100644 index e5592134..00000000 --- a/freetype/builds/mac/PaxHeaders.18661/FreeType.ppc_carbon.make.txt +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.940818515 -30 ctime=1374498498.007291075 diff --git a/freetype/builds/mac/PaxHeaders.18661/FreeType.ppc_classic.make.txt b/freetype/builds/mac/PaxHeaders.18661/FreeType.ppc_classic.make.txt deleted file mode 100644 index 1616f37d..00000000 --- a/freetype/builds/mac/PaxHeaders.18661/FreeType.ppc_classic.make.txt +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.924818715 -30 ctime=1374498498.008291063 diff --git a/freetype/builds/mac/PaxHeaders.18661/README b/freetype/builds/mac/PaxHeaders.18661/README deleted file mode 100644 index d0616128..00000000 --- a/freetype/builds/mac/PaxHeaders.18661/README +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1383506957.470300723 -30 atime=1385335786.939818528 -30 ctime=1383506957.470300723 diff --git a/freetype/builds/mac/PaxHeaders.18661/ascii2mpw.py b/freetype/builds/mac/PaxHeaders.18661/ascii2mpw.py deleted file mode 100644 index ad4eef0a..00000000 --- a/freetype/builds/mac/PaxHeaders.18661/ascii2mpw.py +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.940818515 -30 ctime=1374498498.014290988 diff --git a/freetype/builds/mac/PaxHeaders.18661/ftlib.prj.xml b/freetype/builds/mac/PaxHeaders.18661/ftlib.prj.xml deleted file mode 100644 index 38ec9238..00000000 --- a/freetype/builds/mac/PaxHeaders.18661/ftlib.prj.xml +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335786.89081914 -30 ctime=1374498498.006291088 diff --git a/freetype/builds/mac/PaxHeaders.18661/ftmac.c b/freetype/builds/mac/PaxHeaders.18661/ftmac.c deleted file mode 100644 index a50559d6..00000000 --- a/freetype/builds/mac/PaxHeaders.18661/ftmac.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375345015.526327894 -30 atime=1385335786.889819153 -30 ctime=1375345015.526327894 diff --git a/freetype/builds/mac/ascii2mpw.py b/freetype/builds/mac/ascii2mpw.py old mode 100644 new mode 100755 diff --git a/freetype/builds/mac/freetype-Info.plist b/freetype/builds/mac/freetype-Info.plist new file mode 100644 index 00000000..b3d114da --- /dev/null +++ b/freetype/builds/mac/freetype-Info.plist @@ -0,0 +1,36 @@ + + + + + + + CFBundleDevelopmentRegion + English + + CFBundleExecutable + FreeType + + CFBundleGetInfoString + FreeType ${PROJECT_VERSION} + + CFBundleInfoDictionaryVersion + 6.0 + + CFBundleName + FreeType + + CFBundlePackageType + FMWK + + CFBundleShortVersionString + ${PROJECT_VERSION} + + CFBundleSignature + ???? + + CFBundleVersion + ${PROJECT_VERSION} + + + diff --git a/freetype/builds/mac/ftmac.c b/freetype/builds/mac/ftmac.c index 40f6bd20..27b5511c 100644 --- a/freetype/builds/mac/ftmac.c +++ b/freetype/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-2008, 2013 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, */ @@ -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 ) { @@ -381,7 +384,7 @@ 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 ) ) @@ -420,7 +423,7 @@ 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, @@ -1238,6 +1241,9 @@ 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_THROW( Invalid_File_Format ); @@ -1442,6 +1448,8 @@ typedef short ResourceIndex; UInt8 pathname[PATH_MAX]; + /* test for valid `library' and `aface' delayed to `FT_Open_Face' */ + if ( !ref ) return FT_THROW( Invalid_Argument ); diff --git a/freetype/builds/modules.mk b/freetype/builds/modules.mk index c4a882cb..3c1b083d 100644 --- a/freetype/builds/modules.mk +++ b/freetype/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/freetype/builds/os2/PaxHeaders.18661/detect.mk b/freetype/builds/os2/PaxHeaders.18661/detect.mk deleted file mode 100644 index a4651dbf..00000000 --- a/freetype/builds/os2/PaxHeaders.18661/detect.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335771.974005626 -30 ctime=1374498497.850293038 diff --git a/freetype/builds/os2/PaxHeaders.18661/os2-def.mk b/freetype/builds/os2/PaxHeaders.18661/os2-def.mk deleted file mode 100644 index 9f700161..00000000 --- a/freetype/builds/os2/PaxHeaders.18661/os2-def.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.839819778 -30 ctime=1374498497.846293088 diff --git a/freetype/builds/os2/PaxHeaders.18661/os2-dev.mk b/freetype/builds/os2/PaxHeaders.18661/os2-dev.mk deleted file mode 100644 index 886f928c..00000000 --- a/freetype/builds/os2/PaxHeaders.18661/os2-dev.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.840819765 -30 ctime=1374498497.847293075 diff --git a/freetype/builds/os2/PaxHeaders.18661/os2-gcc.mk b/freetype/builds/os2/PaxHeaders.18661/os2-gcc.mk deleted file mode 100644 index 2207fec5..00000000 --- a/freetype/builds/os2/PaxHeaders.18661/os2-gcc.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.839819778 -30 ctime=1374498497.848293063 diff --git a/freetype/builds/symbian/PaxHeaders.18661/bld.inf b/freetype/builds/symbian/PaxHeaders.18661/bld.inf deleted file mode 100644 index c4ecb1cd..00000000 --- a/freetype/builds/symbian/PaxHeaders.18661/bld.inf +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256971.535052688 -30 atime=1385335759.861157058 -30 ctime=1384256971.535052688 diff --git a/freetype/builds/symbian/PaxHeaders.18661/freetype.mmp b/freetype/builds/symbian/PaxHeaders.18661/freetype.mmp deleted file mode 100644 index 566c97d2..00000000 --- a/freetype/builds/symbian/PaxHeaders.18661/freetype.mmp +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.128816165 -29 ctime=1374498497.84129315 diff --git a/freetype/builds/toplevel.mk b/freetype/builds/toplevel.mk index 96820285..16d4be83 100644 --- a/freetype/builds/toplevel.mk +++ b/freetype/builds/toplevel.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2001, 2003, 2006, 2008-2010, 2012, 2013 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'. @@ -220,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/freetype/builds/unix/PaxHeaders.18661/aclocal.m4 b/freetype/builds/unix/PaxHeaders.18661/aclocal.m4 deleted file mode 100644 index 382ced9a..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/aclocal.m4 +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335781.312888874 -30 atime=1385335781.425887461 -30 ctime=1385335781.312888874 diff --git a/freetype/builds/unix/PaxHeaders.18661/config.guess b/freetype/builds/unix/PaxHeaders.18661/config.guess deleted file mode 100644 index b63c03af..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/config.guess +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1385335783.80085777 -30 atime=1385335786.993817853 -29 ctime=1385335783.80085777 diff --git a/freetype/builds/unix/PaxHeaders.18661/config.sub b/freetype/builds/unix/PaxHeaders.18661/config.sub deleted file mode 100644 index 3723940f..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/config.sub +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335783.818857545 -30 atime=1385335787.001817753 -30 ctime=1385335783.818857545 diff --git a/freetype/builds/unix/PaxHeaders.18661/configure b/freetype/builds/unix/PaxHeaders.18661/configure deleted file mode 100644 index 4423eda5..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/configure +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1385335783.69285912 -30 atime=1385335786.941818503 -29 ctime=1385335783.69285912 diff --git a/freetype/builds/unix/PaxHeaders.18661/configure.ac b/freetype/builds/unix/PaxHeaders.18661/configure.ac deleted file mode 100644 index 174815c2..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/configure.ac +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335778.397925316 -30 atime=1385335778.569923166 -30 ctime=1385335778.397925316 diff --git a/freetype/builds/unix/PaxHeaders.18661/configure.raw b/freetype/builds/unix/PaxHeaders.18661/configure.raw deleted file mode 100644 index 9ff25920..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/configure.raw +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044999.536920917 -30 atime=1385335585.474337193 -30 ctime=1385044999.536920917 diff --git a/freetype/builds/unix/PaxHeaders.18661/detect.mk b/freetype/builds/unix/PaxHeaders.18661/detect.mk deleted file mode 100644 index a3ba1bcc..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/detect.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335771.963005764 -30 ctime=1374498497.970291538 diff --git a/freetype/builds/unix/PaxHeaders.18661/freetype-config.in b/freetype/builds/unix/PaxHeaders.18661/freetype-config.in deleted file mode 100644 index 814a57f4..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/freetype-config.in +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384259616.147990476 -30 atime=1385335759.863157033 -30 ctime=1384259616.147990476 diff --git a/freetype/builds/unix/PaxHeaders.18661/freetype2.in b/freetype/builds/unix/PaxHeaders.18661/freetype2.in deleted file mode 100644 index 9defeabb..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/freetype2.in +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384260824.716881286 -30 atime=1385335759.879156833 -30 ctime=1384260824.716881286 diff --git a/freetype/builds/unix/PaxHeaders.18661/freetype2.m4 b/freetype/builds/unix/PaxHeaders.18661/freetype2.m4 deleted file mode 100644 index 3a5e99e4..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/freetype2.m4 +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335778.606922703 -30 ctime=1374498497.955291725 diff --git a/freetype/builds/unix/PaxHeaders.18661/ft-munmap.m4 b/freetype/builds/unix/PaxHeaders.18661/ft-munmap.m4 deleted file mode 100644 index 772cd110..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/ft-munmap.m4 +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335778.605922716 -30 ctime=1374498497.956291713 diff --git a/freetype/builds/unix/PaxHeaders.18661/ftconfig.in b/freetype/builds/unix/PaxHeaders.18661/ftconfig.in deleted file mode 100644 index 5fd4ed9a..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/ftconfig.in +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384257211.700050212 -29 atime=1385335759.88015682 -30 ctime=1384257211.700050212 diff --git a/freetype/builds/unix/PaxHeaders.18661/ftsystem.c b/freetype/builds/unix/PaxHeaders.18661/ftsystem.c deleted file mode 100644 index ee3484ed..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/ftsystem.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384257159.409703932 -30 atime=1385335759.881156808 -30 ctime=1384257159.409703932 diff --git a/freetype/builds/unix/PaxHeaders.18661/install-sh b/freetype/builds/unix/PaxHeaders.18661/install-sh deleted file mode 100644 index 908e07cf..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/install-sh +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335781.770883148 -30 atime=1385335786.997817803 -30 ctime=1385335783.702858995 diff --git a/freetype/builds/unix/PaxHeaders.18661/install.mk b/freetype/builds/unix/PaxHeaders.18661/install.mk deleted file mode 100644 index 88a8843c..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/install.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384331910.170894662 -29 atime=1385335758.52917371 -30 ctime=1384331910.170894662 diff --git a/freetype/builds/unix/PaxHeaders.18661/ltmain.sh b/freetype/builds/unix/PaxHeaders.18661/ltmain.sh deleted file mode 100644 index 51887b87..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/ltmain.sh +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335781.833882361 -29 atime=1385335787.01081764 -30 ctime=1385335781.833882361 diff --git a/freetype/builds/unix/PaxHeaders.18661/mkinstalldirs b/freetype/builds/unix/PaxHeaders.18661/mkinstalldirs deleted file mode 100644 index 71764e75..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/mkinstalldirs +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.127816177 -29 ctime=1385335783.70085902 diff --git a/freetype/builds/unix/PaxHeaders.18661/unix-cc.in b/freetype/builds/unix/PaxHeaders.18661/unix-cc.in deleted file mode 100644 index f4646bf9..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/unix-cc.in +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.001817753 -30 ctime=1374498497.954291738 diff --git a/freetype/builds/unix/PaxHeaders.18661/unix-def.in b/freetype/builds/unix/PaxHeaders.18661/unix-def.in deleted file mode 100644 index c42b24f7..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/unix-def.in +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1376844381.56045925 -29 atime=1385335787.12681619 -29 ctime=1376844381.56045925 diff --git a/freetype/builds/unix/PaxHeaders.18661/unix-dev.mk b/freetype/builds/unix/PaxHeaders.18661/unix-dev.mk deleted file mode 100644 index 4498f0cb..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/unix-dev.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.228977435 -29 ctime=1374498497.96129165 diff --git a/freetype/builds/unix/PaxHeaders.18661/unix-lcc.mk b/freetype/builds/unix/PaxHeaders.18661/unix-lcc.mk deleted file mode 100644 index 2f0c5a15..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/unix-lcc.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.060817015 -28 ctime=1374498497.9572917 diff --git a/freetype/builds/unix/PaxHeaders.18661/unix.mk b/freetype/builds/unix/PaxHeaders.18661/unix.mk deleted file mode 100644 index e3a52d28..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/unix.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.127816177 -30 ctime=1374498497.962291638 diff --git a/freetype/builds/unix/PaxHeaders.18661/unixddef.mk b/freetype/builds/unix/PaxHeaders.18661/unixddef.mk deleted file mode 100644 index c41bbbd3..00000000 --- a/freetype/builds/unix/PaxHeaders.18661/unixddef.mk +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335774.41897506 -30 ctime=1374498497.975291475 diff --git a/freetype/builds/unix/aclocal.m4 b/freetype/builds/unix/aclocal.m4 index 94c65087..2c031649 100644 --- a/freetype/builds/unix/aclocal.m4 +++ b/freetype/builds/unix/aclocal.m4 @@ -14,9 +14,7 @@ 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 @@ -24,36 +22,30 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun # 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 +# 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. # -# This file is part of GNU Libtool. +# 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 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. -# -# 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 . ]) -# serial 57 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -105,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' @@ -144,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"} @@ -193,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 @@ -212,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 @@ -223,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 @@ -283,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. @@ -429,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"`']) @@ -454,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 ]) @@ -482,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], @@ -508,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], @@ -555,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\\\\\\"" @@ -568,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\\\\\\"" @@ -584,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). @@ -606,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 @@ -629,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. @@ -651,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 ) @@ -664,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 @@ -693,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 @@ -713,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 @@ -747,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 @@ -764,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" @@ -783,7 +774,6 @@ _LT_EOF [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS @@ -980,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 @@ -998,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 @@ -1016,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], @@ -1038,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 @@ -1048,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= @@ -1093,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 @@ -1135,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])], @@ -1153,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]) @@ -1173,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 @@ -1202,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]) ;; @@ -1231,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 ;; #( @@ -1250,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 # --------------- @@ -1265,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" @@ -1318,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 @@ -1330,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 ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1351,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*) @@ -1369,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 @@ -1389,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*) @@ -1398,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 ;; *) @@ -1414,7 +1458,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK @@ -1433,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 @@ -1445,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 @@ -1476,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" ;; *) @@ -1512,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 @@ -1539,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]) @@ -1561,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 @@ -1580,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]) @@ -1604,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*) @@ -1644,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` @@ -1694,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 @@ -1725,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) @@ -1753,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 @@ -1802,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 @@ -1828,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 @@ -1849,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 @@ -1859,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]) ]) ]) ]) @@ -1905,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], @@ -1929,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 @@ -1939,9 +1992,9 @@ else ]) fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -2033,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 @@ -2044,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 @@ -2072,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 @@ -2085,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 @@ -2107,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 @@ -2136,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]) @@ -2167,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 @@ -2190,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--; } @@ -2225,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 @@ -2234,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= @@ -2254,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]]*) @@ -2266,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.so # instead of lib.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 @@ -2310,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 ;; @@ -2329,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" @@ -2342,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 @@ -2351,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~ @@ -2368,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' @@ -2387,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*) @@ -2415,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'` @@ -2428,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' @@ -2442,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 @@ -2455,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`' @@ -2469,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 ;; @@ -2488,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 @@ -2518,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 ;; @@ -2555,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" @@ -2570,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 ;; @@ -2580,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, ... @@ -2594,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 @@ -2606,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 @@ -2614,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= @@ -2634,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 ;; @@ -2644,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 @@ -2695,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 @@ -2710,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 ;; @@ -2719,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' + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + 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 - 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 - else - shlibpath_overrides_runpath=yes - fi + 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 ;; @@ -2766,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*) @@ -2781,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 @@ -2792,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 @@ -2804,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) @@ -2826,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 ;; @@ -2838,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' @@ -2861,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 @@ -2869,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 ;; @@ -2879,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], @@ -2932,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 : @@ -2980,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 @@ -3002,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 @@ -3029,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` ;; @@ -3052,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. @@ -3063,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 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 @@ -3249,10 +3306,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3291,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 ;; @@ -3313,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)$' @@ -3407,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 @@ -3444,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=: @@ -3466,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 @@ -3513,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 @@ -3526,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 ]) @@ -3553,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 @@ -3571,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]) @@ -3594,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' ;; @@ -3646,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 ;; @@ -3679,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= @@ -3704,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'" @@ -3758,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 @@ -3788,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} }; @@ -3808,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 @@ -3831,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= @@ -3858,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 @@ -3879,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*) @@ -3900,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 @@ -3966,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 @@ -4007,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 @@ -4043,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 @@ -4051,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' @@ -4196,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*) @@ -4217,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 @@ -4305,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 @@ -4313,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). @@ -4333,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*) @@ -4342,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' @@ -4369,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) @@ -4466,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 @@ -4495,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)= ;; @@ -4571,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 @@ -4617,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 @@ -4635,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 ;; @@ -4643,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 @@ -4653,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 @@ -4675,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 ... @@ -4705,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 @@ -4724,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) @@ -4740,7 +4867,7 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach 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 @@ -4750,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 @@ -4758,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' ;; @@ -4823,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 @@ -4872,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 ;; @@ -4891,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 @@ -4904,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 @@ -4919,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 @@ -4938,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)= @@ -4962,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 @@ -4970,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 @@ -4993,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 @@ -5016,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 @@ -5041,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 ;; @@ -5104,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) @@ -5134,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 @@ -5152,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 @@ -5172,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. @@ -5222,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 @@ -5256,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, [], [ @@ -5282,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 @@ -5300,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. @@ -5311,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; }]], @@ -5333,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 @@ -5362,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 ;; @@ -5370,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 @@ -5406,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' @@ -5438,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 @@ -5465,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 @@ -5479,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 @@ -5531,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 ;; @@ -5582,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 @@ -5609,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. @@ -5689,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 @@ -5735,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. @@ -5774,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' @@ -5793,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 @@ -5802,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 @@ -5816,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 @@ -5865,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;" @@ -5907,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 @@ -5971,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 @@ -6010,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 @@ -6034,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' @@ -6091,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 ;; @@ -6101,7 +6223,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach 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 @@ -6129,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 @@ -6224,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 @@ -6247,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. @@ -6256,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 @@ -6270,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 @@ -6304,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 @@ -6321,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 @@ -6349,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 @@ -6373,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 @@ -6396,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. @@ -6406,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. @@ -6423,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' @@ -6489,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 ;; *) @@ -6508,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 @@ -6569,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 @@ -6600,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 @@ -6620,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 @@ -6645,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 @@ -6705,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 @@ -6715,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' ;; @@ -6732,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 @@ -6763,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 @@ -6776,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 ;; @@ -6852,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 @@ -6882,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 @@ -6904,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 @@ -6994,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 @@ -7016,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 @@ -7033,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= @@ -7050,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 @@ -7105,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 ;; @@ -7128,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 ;; @@ -7142,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]) @@ -7162,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 @@ -7202,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 @@ -7224,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"} @@ -7238,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 @@ -7260,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 @@ -7281,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 @@ -7293,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 @@ -7334,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 @@ -7356,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"} @@ -7372,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 @@ -7394,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 @@ -7418,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 @@ -7428,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 @@ -7462,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. @@ -7495,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 @@ -7529,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. @@ -7562,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 @@ -7578,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 @@ -7588,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= @@ -7617,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 ]) @@ -7726,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 @@ -7743,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 @@ -7769,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 @@ -7813,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], @@ -7975,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])]) @@ -8004,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 ]) @@ -8050,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 @@ -8084,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: @@ -8120,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: @@ -8129,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], @@ -8144,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) @@ -8183,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], @@ -8198,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) @@ -8237,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], @@ -8252,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) @@ -8276,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: @@ -8293,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@:>@], @@ -8306,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 @@ -8331,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: @@ -8354,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 @@ -8387,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])], @@ -8398,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 @@ -8478,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 @@ -8487,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 @@ -8513,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. # @@ -8527,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 @@ -8600,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/freetype/builds/unix/config.guess b/freetype/builds/unix/config.guess old mode 100644 new mode 100755 index b79252d6..6c32c864 --- a/freetype/builds/unix/config.guess +++ b/freetype/builds/unix/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2013-06-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 @@ -24,12 +24,12 @@ timestamp='2013-06-10' # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# 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 with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2013 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." @@ -149,7 +149,7 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac @@ -579,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 @@ -826,7 +827,7 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -969,10 +970,10 @@ EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} exit ;; - or32:Linux:*:*) + or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) @@ -1260,16 +1261,26 @@ EOF if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - 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 + 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 ;; @@ -1361,154 +1372,6 @@ EOF exit ;; esac -eval $set_cc_for_build -cat >$dummy.c < -# include -#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 - 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 -# 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 <. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -68,7 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2013 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." @@ -283,8 +283,10 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ @@ -296,11 +298,11 @@ case $basic_machine in | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or1k | 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 \ @@ -311,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) @@ -325,6 +328,9 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none @@ -402,8 +408,10 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ @@ -415,6 +423,7 @@ case $basic_machine in | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -432,6 +441,7 @@ case $basic_machine in | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -769,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 @@ -824,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 @@ -1369,14 +1386,14 @@ case $os in | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -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*) @@ -1594,9 +1611,6 @@ case $basic_machine in mips*-*) os=-elf ;; - or1k-*) - os=-elf - ;; or32-*) os=-coff ;; diff --git a/freetype/builds/unix/configure b/freetype/builds/unix/configure old mode 100644 new mode 100755 index 14d7bc95..08357a9c --- a/freetype/builds/unix/configure +++ b/freetype/builds/unix/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for FreeType 2.5.1. +# Generated by GNU Autoconf 2.69 for FreeType 2.5.5. # # Report bugs to . # @@ -198,7 +198,6 @@ test -x / || exit 1" 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='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -206,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 @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='FreeType' PACKAGE_TARNAME='freetype' -PACKAGE_VERSION='2.5.1' -PACKAGE_STRING='FreeType 2.5.1' +PACKAGE_VERSION='2.5.5' +PACKAGE_STRING='FreeType 2.5.5' PACKAGE_BUGREPORT='freetype@nongnu.org' PACKAGE_URL='' @@ -638,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 @@ -655,28 +676,16 @@ ac_ct_DUMPBIN DUMPBIN LD FGREP +EGREP +GREP SED LIBTOOL OBJDUMP DLLTOOL AS -SYSTEM_ZLIB -FT2_EXTRA_LIBS -LIBPNG -LIBBZ2 -LIBZ -ftmac_c -XX_ANSIFLAGS -XX_CFLAGS -FTSYS_SRC -EGREP -GREP -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -RMDIR -EXEEXT_BUILD -CC_BUILD +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG CPP OBJEXT EXEEXT @@ -736,17 +745,6 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking -enable_biarch_config -enable_mmap -with_zlib -with_bzip2 -with_png -with_old_mac_fonts -with_fsspec -with_fsref -with_quickdraw_toolbox -with_quickdraw_carbon -with_ats enable_shared enable_static with_pic @@ -754,6 +752,18 @@ 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 ' ac_precious_vars='build_alias host_alias @@ -763,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. @@ -1304,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.5.1 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]... @@ -1369,7 +1390,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of FreeType 2.5.1:";; + short | recursive ) echo "Configuration of FreeType 2.5.5:";; esac cat <<\_ACEOF @@ -1377,22 +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 - --without-png do not support png compressed OpenType embedded - bitmaps + --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) @@ -1404,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 @@ -1419,6 +1447,23 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory 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. @@ -1486,7 +1531,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -FreeType configure 2.5.1 +FreeType configure 2.5.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1575,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 @@ -1617,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 declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 @@ -1708,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 @@ -1922,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 || - 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 declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 @@ -2084,7 +2129,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by FreeType $as_me 2.5.1, which was +It was created by FreeType $as_me 2.5.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2440,7 +2485,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Don't forget to update docs/VERSION.DLL! -version_info='17:0:11' +version_info='17:4:11' ft_version=`echo $version_info | tr : .` @@ -3481,6 +3526,7931 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + +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_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$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 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 +done + done +IFS=$as_save_IFS + + ;; +esac +fi +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 + + +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_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 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 +done + done +IFS=$as_save_IFS + + ;; +esac +fi +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 + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + 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 + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +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; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2.444.28-053d' +macro_revision='2.4.2.444.28' + + + + + + + + + + + + + +ltmain=$ac_aux_dir/ltmain.sh + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +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 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_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 +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + 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" + 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 +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_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_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +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 : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_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 fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + 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 +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_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 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "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_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_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_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +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 no = "$withval" || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +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 + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + 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 + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +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 + for ac_dir in $PATH; do + 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 + # 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 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM=$NM +else + 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 + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + 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 + # Check to see if the nm accepts a BSD-compat flag. + # 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 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + 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 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 + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; 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_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$ac_tool_prefix$ac_prog" + $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 +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_ac_ct_DUMPBIN="$ac_prog" + $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 +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + 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 + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; 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, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring=ABCD + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + 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` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + 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` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + 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 + 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` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test yes != "$GCC"; then + reload_cmds=false + fi + ;; + darwin*) + 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 + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump" + $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 +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; 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_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_ac_ct_OBJDUMP="objdump" + $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 +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + 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 + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +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. +# '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 +# 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]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +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. + 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 + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +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)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool" + $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 +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; 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_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_ac_ct_DLLTOOL="dlltool" + $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 +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + 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 + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # 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 + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd=$ECHO + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; 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_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # 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_AR="$ac_tool_prefix$ac_prog" + $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 +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_ac_ct_AR="$ac_prog" + $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 +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + 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 + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + 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 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +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 no = "$lt_cv_ar_at_file"; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; 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_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" + $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 +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; 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_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_ac_ct_STRIP="strip" + $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 +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + 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 + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" + $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 +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; 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_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_ac_ct_RANLIB="ranlib" + $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 +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + 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 + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog" + $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 +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test ia64 = "$host_cpu"; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + 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"\ +$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"\ +$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= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # 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, + # 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=\"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'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + 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 + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + 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 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#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 + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + 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 + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test yes = "$pipe_works"; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $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 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +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 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 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE=32 + ;; + *ELF-64*) + HPUX_IA64_MODE=64 + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # 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 yes = "$lt_cv_prog_gnu_ld"; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +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 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 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + 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" + ;; + powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + 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; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 + +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 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 + fi + ;; +*-*solaris*) + # 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 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + 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 + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +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. +set dummy ${ac_tool_prefix}mt; 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_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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_MANIFEST_TOOL="${ac_tool_prefix}mt" + $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 +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; 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_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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_ac_ct_MANIFEST_TOOL="mt" + $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 +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + 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 + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +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 yes != "$lt_cv_path_mainfest_tool"; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; 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_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil" + $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 +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; 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_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_ac_ct_DSYMUTIL="dsymutil" + $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 +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + 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 + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; 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_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit" + $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 +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; 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_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_ac_ct_NMEDIT="nmedit" + $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 +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + 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 + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; 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_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ac_tool_prefix}lipo" + $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 +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; 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_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_ac_ct_LIPO="lipo" + $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 +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + 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 + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; 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_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool" + $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 +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; 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_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_ac_ct_OTOOL="otool" + $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 +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + 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 + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; 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_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64" + $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 +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; 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_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_ac_ct_OTOOL64="otool64" + $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 +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + 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 + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +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 + # 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 + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + 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 0 = "$_lt_result"; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + 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 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _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' ;; + 10.[012]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test yes = "$lt_cv_apple_cc_single_mod"; then + _lt_dar_single_mod='$single_module' + fi + 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' + fi + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + 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 +#include +#include +#include + +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 + +_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 + +_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 +#include +#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 +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; 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_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as" + $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 +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; 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_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_ac_ct_AS="as" + $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 +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + 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 + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool" + $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 +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; 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_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_ac_ct_DLLTOOL="dlltool" + $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 +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + 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 + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump" + $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 +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; 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_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_ac_ct_OBJDUMP="objdump" + $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 +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + 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 + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + enable_dlopen=no + + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + pic_mode=default +fi + + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + 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, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +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 set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# 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 + +old_CC=$CC +old_CFLAGS=$CFLAGS + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + 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 + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + 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 -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 + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac +fi + +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; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + 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 + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + 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 -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 + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac +fi + +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; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC=$CC +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +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" ## 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 + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +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 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 + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + 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 ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + lt_prog_compiler_pic='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + 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'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + 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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + 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). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='$wl-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + 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) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +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" ## 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 + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +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 yes = "$lt_cv_prog_compiler_pic_works"; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +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 + 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 + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + 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 yes = "$lt_cv_prog_compiler_static_works"; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # 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 + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # 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 + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +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; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + 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 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 + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # 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'. + 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 + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # 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 yes != "$GCC"; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd* | bitrig*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # 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 yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + 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' + # 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' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + 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 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + 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_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach 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' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _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' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + 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, 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' + 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' + # 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' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + 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 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' + 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' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + 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' + 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' + 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' + + 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' + 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' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + 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' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + 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' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_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' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** 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 +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # 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' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + 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' + else + ld_shlibs=no + fi + ;; + esac + + if test no = "$ld_shlibs"; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + 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 + fi + ;; + + aix[4-9]*) + 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= + 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 + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='$wl-f,' + + 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` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + else + # not using gcc + 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 yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + fi + fi + + 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 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 set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +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 + fi + +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 -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 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" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +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 + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + 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 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' + 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' + fi + fi + ;; + + amigaos*) + 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_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + 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 + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # 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' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + 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. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + 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 + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + 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" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + 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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + fi + 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' + ;; + + hpux10*) + 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 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' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + 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' + ;; + 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+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' + ;; + ia64*) + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + 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 + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + 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 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 + + ;; + esac + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + 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 + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + 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. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +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" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + 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 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' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + 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_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + 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__`"; 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' + else + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + 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' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + 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_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' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + 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' + 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_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' + ;; + *) + 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' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + 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 is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + 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 + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + 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' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='$wl-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + 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' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # 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' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + 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' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='$wl-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test no = "$ld_shlibs" && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > 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; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test yes = "$GCC"; then + case $host_os in + 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' ;; + 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 + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # 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` + # ...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" + 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; + 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; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # 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'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +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' + 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' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + 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' + 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 + # 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 + : + else + can_build_shared=no + fi + ;; + esac + # 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 yes = "$aix_use_runtimelinking"; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.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' + 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' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + 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' + ;; + 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%'\''`; $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' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +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' + 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" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # 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'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + 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' + + 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' + ;; + 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' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + 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 + 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'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~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'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + 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' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +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' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + 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' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +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' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + 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 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" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + 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' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + 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' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +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' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + 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 + fi ;; + 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' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + 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" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +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 | 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # 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 + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + 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' + 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' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +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' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + 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' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd* | bitrig*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + 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 + need_lib_prefix=no + library_names_spec='$libname$shared_ext $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +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' + 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 + ;; + +rdos*) + dynamic_linker=no + ;; + +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' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + 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 yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; + +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' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + 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' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +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' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + 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' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + 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' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +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' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test no = "$dynamic_linker" && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +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 set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$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 yes = "$hardcode_automatic"; then + + # We can hardcode non-existent directories. + 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + 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_libs= + ;; + + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; + + darwin*) + # 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 : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $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 dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=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_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 +else + + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +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 +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; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $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 shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=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_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 +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 +else + { $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 : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $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 dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=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_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 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $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 dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=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_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 +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; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $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 dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=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_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 +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + 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 yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$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 yes = "$cross_compiling"; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* 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)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + 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" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + 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 yes = "$cross_compiling"; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* 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)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + 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" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $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 + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # 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 +$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 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 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 ia64 != "$host_cpu" && test no = "$aix_use_runtimelinking"; then + test yes = "$enable_shared" && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$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 yes = "$enable_shared" || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + + # checks for native programs to generate building tool if test ${cross_compiling} = yes; then @@ -3788,138 +11758,6 @@ 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" - 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 ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : @@ -4032,23 +11870,6 @@ $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` @@ -4578,49 +12399,84 @@ done # get compiler flags right -# we try to make the compiler work for C89-strict source. -# even if C compiler is GCC and C89 flags are available, -# some system headers (e.g. Android Bionic libc) is broken -# in C89 mode. we have to check the compilation finishes -# successfully. +# +# 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" - XX_ANSIFLAGS="" - for a in -pedantic -ansi - do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc compiler flag ${a} to assure ANSI C works correctly" >&5 + 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 + orig_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + + +#include + + int main () { -{puts("");return 0;} + + + { + 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 "$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}" + XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}" else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $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 + CFLAGS="${orig_CFLAGS}" + done + ;; + esac else case "$host" in *-dec-osf*) @@ -4638,17 +12494,136 @@ 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 -# don't quote AS_HELP_STRING! # Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then : withval=$with_zlib; +else + with_zlib=auto fi -if test x$with_zlib != xno && test -z "$LIBZ"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzsetparams in -lz" >&5 + +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 @@ -4687,29 +12662,138 @@ $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' + 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 != xno && test -n "$LIBZ"; then - SYSTEM_ZLIB=yes + +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 -# don't quote AS_HELP_STRING! # Check whether --with-bzip2 was given. if test "${with_bzip2+set}" = set; then : withval=$with_bzip2; +else + with_bzip2=auto 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 + +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 @@ -4748,47 +12832,281 @@ $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' + 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 != xno && test -n "$LIBBZ2"; then - SYSTEM_LIBBZ2=yes + +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 -HAVE_LIBPNG=no # Check whether --with-png was given. if test "${with_png+set}" = set; then : withval=$with_png; +else + with_png=auto fi -if test x$with_png != xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng" >&5 -$as_echo_n "checking for libpng... " >&6; } - if test -z "$LIBPNG_CFLAGS" -a -z "$LIBPNG_LDFLAGS"; then - if ! which libpng-config >/dev/null; then - as_fn_error $? "\`libpng-config' not found; -either set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment variables, -or pass \`--without-png' to the \`configure' script." "$LINENO" 5 - elif test ${cross_compiling} = yes; then - as_fn_error $? "\`libpng-config' should not be used in cross-building; -either set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment variables, -or pass \`--without-png' to the \`configure' script." "$LINENO" 5 - fi - LIBPNG="`libpng-config --libs`" - LIBPNG_CFLAGS="`libpng-config --cflags`" - LIBPNG_LDFLAGS="`libpng-config --ldflags`" + +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 - HAVE_LIBPNG=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBPNG_LDFLAGS" >&5 -$as_echo "$LIBPNG_LDFLAGS" >&6; } + +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 @@ -4846,7 +13164,6 @@ set ${save_config_args} 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 : @@ -4857,8 +13174,8 @@ 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" + ft2_extra_libs="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices" + LDFLAGS="$LDFLAGS $ft2_extra_libs" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4989,7 +13306,7 @@ 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="" + ft2_extra_libs="" LDFLAGS="${orig_LDFLAGS}" CFLAGS="$CFLAGS -DDARWIN_NO_CARBON" fi @@ -5006,7 +13323,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. # Check whether --with-fsspec was given. @@ -5160,7 +13477,7 @@ rm -f core conftest.err conftest.$ac_objext \ 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. @@ -5222,7 +13539,7 @@ rm -f core conftest.err conftest.$ac_objext \ 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. @@ -5296,7 +13613,6 @@ 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 : @@ -5372,6 +13688,46 @@ $as_echo "$as_me: WARNING: 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'` @@ -5379,7449 +13735,6 @@ esac -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.2' -macro_revision='1.3337' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -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 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_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 -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - 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" - 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 -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_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_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $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 : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_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 fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - 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 -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_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 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "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_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_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_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -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 -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; 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 - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - 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" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -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 - for ac_dir in $PATH; do - 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" - # 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 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - 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 - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - 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 - # Check to see if the nm accepts a BSD-compat flag. - # 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 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - 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" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; 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_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$ac_tool_prefix$ac_prog" - $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 -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; 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_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_ac_ct_DUMPBIN="$ac_prog" - $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 -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - 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 - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; 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, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # 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` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - 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` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$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 - 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` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${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 - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump" - $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 -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; 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_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_ac_ct_OBJDUMP="objdump" - $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 -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - 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 - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -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. -# '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. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -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 - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - 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 - 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)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool" - $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 -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; 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_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_ac_ct_DLLTOOL="dlltool" - $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 -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - 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 - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -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 - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; 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_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # 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_AR="$ac_tool_prefix$ac_prog" - $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 -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; 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_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_ac_ct_AR="$ac_prog" - $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 -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - 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 - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; 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 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -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 - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; 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_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" - $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 -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; 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_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_ac_ct_STRIP="strip" - $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 -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - 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 - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" - $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 -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; 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_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_ac_ct_RANLIB="ranlib" - $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 -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - 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 - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; 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_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog" - $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 -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# 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'" - -# 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'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # 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. - # 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};"\ -" \$ 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))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - 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 - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - 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 - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#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 - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - 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 - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $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 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && 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. - echo 'int i;' > 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 - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - 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 - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > 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 - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - 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; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -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 - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -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 - -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 - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > 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 - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - 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" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -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. -set dummy ${ac_tool_prefix}mt; 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_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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_MANIFEST_TOOL="${ac_tool_prefix}mt" - $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 -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; 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_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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_ac_ct_MANIFEST_TOOL="mt" - $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 -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - 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 - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -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 - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; 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_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil" - $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 -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; 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_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_ac_ct_DSYMUTIL="dsymutil" - $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 -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - 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 - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; 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_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit" - $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 -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; 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_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_ac_ct_NMEDIT="nmedit" - $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 -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - 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 - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; 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_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ac_tool_prefix}lipo" - $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 -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; 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_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_ac_ct_LIPO="lipo" - $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 -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - 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 - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; 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_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool" - $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 -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; 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_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_ac_ct_OTOOL="otool" - $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 -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - 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 - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; 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_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64" - $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 -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; 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_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_ac_ct_OTOOL64="otool64" - $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 -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - 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 - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -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 - # 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 - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - 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 - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _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 - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _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' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; 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' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; 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_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as" - $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 -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; 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_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_ac_ct_AS="as" - $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 -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - 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 - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool" - $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 -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; 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_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_ac_ct_DLLTOOL="dlltool" - $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 -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - 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 - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump" - $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 -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; 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_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_ac_ct_OBJDUMP="objdump" - $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 -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - 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 - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - enable_dlopen=no - - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - 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," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -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 - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# 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" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - 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 - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - 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 -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" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -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; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - 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 - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - 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 -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" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -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; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -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 - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -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" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -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 - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test "$GCC" = yes; 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 - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - 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'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - 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). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -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" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -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 - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -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" - 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 - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - 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 - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$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 - # 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; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - 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;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # 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'. - 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 - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # 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 - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # 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 - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - 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' - # 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' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 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 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - 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_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach 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' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _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' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - 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' - else - ld_shlibs=no - fi - ;; - - haiku*) - 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' - # 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' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; 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 - 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' - 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' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--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' - 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' - 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' - - if test "x$supports_anon_versioning" = xyes; 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' - 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' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; 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' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - 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' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_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' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** 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 -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # 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' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - 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' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # 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 - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; 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="" - 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 - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # 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 - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; 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` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; 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' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - 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 - # 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 - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -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" - fi - -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" - else - if test "$host_cpu" = ia64; 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" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -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" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - 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 - # We only use this code for GNU lds that support --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' - fi - fi - ;; - - amigaos*) - 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_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - 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=' - # 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 - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # 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' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - 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. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - 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\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; 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}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - 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' - 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' - fi - 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' - ;; - - 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' - 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' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - 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 - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - 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}+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' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - 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 - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - 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' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - 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 - ;; - esac - 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' - # 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. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -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" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - 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' - 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' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - 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_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - 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 - 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' - 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 - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - 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' - 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' - fi - archive_cmds_need_lc='no' - 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' - 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_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' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - 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' - 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' - 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_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' - ;; - *) - 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' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - 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 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' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; 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' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - 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' - 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' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT 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' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - 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' - 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' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > 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; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -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 - case $host_os in - 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" ;; - 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 - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # 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` - 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 - 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; - 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; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # 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'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -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' - 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' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - 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 - # 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 - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not 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 using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.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}' - 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' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - 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}' - ;; - 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' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -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' - 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" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # 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'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - 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}' - - 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}' - ;; - 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}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - 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" - 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'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~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'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - 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' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - 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' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - 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 - 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" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - 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' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - 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' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - 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}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - 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}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # 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 - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - 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' - 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' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -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}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - 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' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - 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 - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -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}' - 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" - ;; - -rdos*) - dynamic_linker=no - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - 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 - need_lib_prefix=no - fi - need_version=yes - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - 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' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; 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' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - 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}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -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 - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; 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" -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" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$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 - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # 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 - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -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 - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - 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_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # 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 : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $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 dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=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_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" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - 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" -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; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $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 shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=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_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" -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" -else - { $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 : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $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 dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=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_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" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $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 dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=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_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" -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; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $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 dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=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_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" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$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 : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* 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)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - 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} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -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 - 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 : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* 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)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - 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} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $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 - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which 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 -$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 - - # 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 - 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 - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -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" - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - @@ -12829,18 +13742,23 @@ CC="$lt_save_CC" # changing LDFLAGS value should only be done after # lt_cv_prog_compiler_static_works test -if test x$SYSTEM_ZLIB = xyes; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" - LDFLAGS="$LDFLAGS $LIBZ" + +if test "$have_zlib" != no; then + CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" + LDFLAGS="$LDFLAGS $ZLIB_LIBS" fi -if test x$SYSTEM_LIBBZ2 = xyes; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" - LDFLAGS="$LDFLAGS $LIBBZ2" +if test "$have_bzip2" != no; then + CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" + LDFLAGS="$LDFLAGS $BZIP2_LIBS" fi -if test x$HAVE_LIBPNG = xyes; then +if test "$have_libpng" != no; then CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG" - LDFLAGS="$LDFLAGS $LIBPNG_LDFLAGS" + 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 @@ -13370,7 +14288,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by FreeType $as_me 2.5.1, which 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 @@ -13436,7 +14354,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -FreeType config.status 2.5.1 +FreeType config.status 2.5.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -13619,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"`' @@ -13739,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 \ @@ -13776,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\\\\\\"" @@ -13806,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\\\\\\"" @@ -13815,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' @@ -14403,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 +# 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 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. -# -# 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 . # The names of the tagged configurations supported by this script. -available_tags="" +available_tags='' # ### BEGIN LIBTOOL CONFIG @@ -14591,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. @@ -14787,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 @@ -14851,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 @@ -14860,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 @@ -14870,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" @@ -15076,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/freetype/builds/unix/configure.ac b/freetype/builds/unix/configure.ac index a28e836e..f6f75469 100644 --- a/freetype/builds/unix/configure.ac +++ b/freetype/builds/unix/configure.ac @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright 2001-2013 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.5.1], [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='17:0:11' +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 @@ -206,30 +210,68 @@ AC_CHECK_FUNCS([memcpy memmove]) # get compiler flags right -# we try to make the compiler work for C89-strict source. -# even if C compiler is GCC and C89 flags are available, -# some system headers (e.g. Android Bionic libc) is broken -# in C89 mode. we have to check the compilation finishes -# successfully. +# +# 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" - XX_ANSIFLAGS="" - for a in -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 ],[{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 + 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 + + ], + [ + + { + 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*) @@ -247,62 +289,214 @@ 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 - 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 != xno && test -n "$LIBBZ2"; then - SYSTEM_LIBBZ2=yes + +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 -HAVE_LIBPNG=no AC_ARG_WITH([png], - AS_HELP_STRING([--without-png], - [do not support png compressed OpenType embedded bitmaps])) -if test x$with_png != xno; then - AC_MSG_CHECKING([for libpng]) - if test -z "$LIBPNG_CFLAGS" -a -z "$LIBPNG_LDFLAGS"; then - if ! which libpng-config >/dev/null; then - AC_MSG_ERROR([`libpng-config' not found; -either set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment variables, -or pass `--without-png' to the `configure' script.]) - elif test ${cross_compiling} = yes; then - AC_MSG_ERROR([`libpng-config' should not be used in cross-building; -either set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment variables, -or pass `--without-png' to the `configure' script.]) - fi - LIBPNG="`libpng-config --libs`" - LIBPNG_CFLAGS="`libpng-config --cflags`" - LIBPNG_LDFLAGS="`libpng-config --ldflags`" + [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 - HAVE_LIBPNG=yes - AC_MSG_RESULT([$LIBPNG_LDFLAGS]) + 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_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 @@ -354,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([ @@ -448,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 @@ -463,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], @@ -572,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], @@ -614,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], @@ -668,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)])) @@ -719,33 +911,77 @@ case "$CFLAGS" in esac -AC_SUBST([ftmac_c]) -AC_SUBST([LIBZ]) -AC_SUBST([LIBBZ2]) -AC_SUBST([LIBPNG]) -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'` -LT_INIT(win32-dll) +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'` + + +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 x$SYSTEM_ZLIB = xyes; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" - LDFLAGS="$LDFLAGS $LIBZ" + +if test "$have_zlib" != no; then + CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" + LDFLAGS="$LDFLAGS $ZLIB_LIBS" fi -if test x$SYSTEM_LIBBZ2 = xyes; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" - LDFLAGS="$LDFLAGS $LIBBZ2" +if test "$have_bzip2" != no; then + CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" + LDFLAGS="$LDFLAGS $BZIP2_LIBS" fi -if test x$HAVE_LIBPNG = xyes; then +if test "$have_libpng" != no; then CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG" - LDFLAGS="$LDFLAGS $LIBPNG_LDFLAGS" + 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]) @@ -773,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/freetype/builds/unix/configure.raw b/freetype/builds/unix/configure.raw index 508be9a3..72543cf8 100644 --- a/freetype/builds/unix/configure.raw +++ b/freetype/builds/unix/configure.raw @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright 2001-2013 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='17:0:11' +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 @@ -206,30 +210,68 @@ AC_CHECK_FUNCS([memcpy memmove]) # get compiler flags right -# we try to make the compiler work for C89-strict source. -# even if C compiler is GCC and C89 flags are available, -# some system headers (e.g. Android Bionic libc) is broken -# in C89 mode. we have to check the compilation finishes -# successfully. +# +# 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" - XX_ANSIFLAGS="" - for a in -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 ],[{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 + 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 + + ], + [ + + { + 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*) @@ -247,62 +289,214 @@ 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 - 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 != xno && test -n "$LIBBZ2"; then - SYSTEM_LIBBZ2=yes + +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 -HAVE_LIBPNG=no AC_ARG_WITH([png], - AS_HELP_STRING([--without-png], - [do not support png compressed OpenType embedded bitmaps])) -if test x$with_png != xno; then - AC_MSG_CHECKING([for libpng]) - if test -z "$LIBPNG_CFLAGS" -a -z "$LIBPNG_LDFLAGS"; then - if ! which libpng-config >/dev/null; then - AC_MSG_ERROR([`libpng-config' not found; -either set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment variables, -or pass `--without-png' to the `configure' script.]) - elif test ${cross_compiling} = yes; then - AC_MSG_ERROR([`libpng-config' should not be used in cross-building; -either set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment variables, -or pass `--without-png' to the `configure' script.]) - fi - LIBPNG="`libpng-config --libs`" - LIBPNG_CFLAGS="`libpng-config --cflags`" - LIBPNG_LDFLAGS="`libpng-config --ldflags`" + [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 - HAVE_LIBPNG=yes - AC_MSG_RESULT([$LIBPNG_LDFLAGS]) + 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_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 @@ -354,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([ @@ -448,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 @@ -463,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], @@ -572,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], @@ -614,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], @@ -668,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)])) @@ -719,33 +911,77 @@ case "$CFLAGS" in esac -AC_SUBST([ftmac_c]) -AC_SUBST([LIBZ]) -AC_SUBST([LIBBZ2]) -AC_SUBST([LIBPNG]) -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'` -LT_INIT(win32-dll) +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'` + + +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 x$SYSTEM_ZLIB = xyes; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" - LDFLAGS="$LDFLAGS $LIBZ" + +if test "$have_zlib" != no; then + CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" + LDFLAGS="$LDFLAGS $ZLIB_LIBS" fi -if test x$SYSTEM_LIBBZ2 = xyes; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" - LDFLAGS="$LDFLAGS $LIBBZ2" +if test "$have_bzip2" != no; then + CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" + LDFLAGS="$LDFLAGS $BZIP2_LIBS" fi -if test x$HAVE_LIBPNG = xyes; then +if test "$have_libpng" != no; then CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG" - LDFLAGS="$LDFLAGS $LIBPNG_LDFLAGS" + 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]) @@ -773,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/freetype/builds/unix/freetype-config.in b/freetype/builds/unix/freetype-config.in index e4c504d0..ebc311f0 100644 --- a/freetype/builds/unix/freetype-config.in +++ b/freetype/builds/unix/freetype-config.in @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright 2000-2005, 2008, 2009, 2013 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, @@ -38,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 } @@ -88,6 +90,9 @@ while test $# -gt 0 ; do --libtool) echo_libtool=yes ;; + --static) + show_static=yes + ;; *) usage 1 1>&2 ;; @@ -137,7 +142,11 @@ if test "$echo_cflags" = "yes" ; then fi if test "$echo_libs" = "yes" ; then - libs="-lfreetype %LIBZ% %LIBBZ2% %LIBPNG% %FT2_EXTRA_LIBS%" + libs="-lfreetype" + staticlibs="%LIBSSTATIC_CONFIG%" + if test "$show_static" = "yes" ; then + libs="$staticlibs" + fi if test "${SYSROOT}$libdir" != "/usr/lib" && test "${SYSROOT}$libdir" != "/usr/lib64"; then echo -L${SYSROOT}$libdir $libs diff --git a/freetype/builds/unix/freetype2.in b/freetype/builds/unix/freetype2.in index 5e545b6f..a488d960 100644 --- a/freetype/builds/unix/freetype2.in +++ b/freetype/builds/unix/freetype2.in @@ -1,12 +1,14 @@ -prefix="%prefix%" -exec_prefix="%exec_prefix%" -libdir="%libdir%" -includedir="%includedir%/freetype2" +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% Requires: +Requires.private: %REQUIRES_PRIVATE% Libs: -L${libdir} -lfreetype -Libs.private: %LIBZ% %LIBBZ2% %LIBPNG% %FT2_EXTRA_LIBS% +Libs.private: %LIBS_PRIVATE% Cflags: -I${includedir} diff --git a/freetype/builds/unix/freetype2.m4 b/freetype/builds/unix/freetype2.m4 index 3d0ecb35..3a806d90 100644 --- a/freetype/builds/unix/freetype2.m4 +++ b/freetype/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/freetype/builds/unix/ftconfig.in b/freetype/builds/unix/ftconfig.in index ddaea25d..e66f3eab 100644 --- a/freetype/builds/unix/ftconfig.in +++ b/freetype/builds/unix/ftconfig.in @@ -4,7 +4,7 @@ /* */ /* UNIX-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2004, 2006-2009, 2011, 2013 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, */ @@ -296,7 +296,16 @@ FT_BEGIN_HEADER #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 @@ -330,31 +339,10 @@ FT_BEGIN_HEADER #define FT_INT64 long long int #define FT_UINT64 unsigned long long int +#endif /* _MSC_VER */ + #endif /* FT_SIZEOF_LONG == 8 */ - - /*************************************************************************/ - /* */ - /* A 64-bit data type will create compilation problems if you compile */ - /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ - /* is defined. You can however ignore this rule by defining the */ - /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ - /* */ -#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) - -#ifdef __STDC__ - - /* Undefine the 64-bit macros in strict ANSI compilation mode. */ - /* Since `#undef' doesn't survive in configuration header files */ - /* we use the postprocessing facility of AC_CONFIG_HEADERS to */ - /* replace the leading `/' with `#'. */ -/undef FT_LONG64 -/undef FT_INT64 - -#endif /* __STDC__ */ - -#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ - #ifdef FT_LONG64 typedef FT_INT64 FT_Int64; typedef FT_UINT64 FT_UInt64; @@ -366,219 +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( __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) */ -#ifdef __clang__ - "add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ -#else - "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ -#endif - "adds %1, %1, %0\n\t" /* %1 += %0 */ - "adc %2, %2, #0\n\t" /* %2 += carry */ - "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ - "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; - - - 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_INLINED FT_MULFIX_ASSEMBLER -#endif -#endif - - #ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x diff --git a/freetype/builds/unix/ftsystem.c b/freetype/builds/unix/ftsystem.c index 3ddc64f1..7f7b3acb 100644 --- a/freetype/builds/unix/ftsystem.c +++ b/freetype/builds/unix/ftsystem.c @@ -317,7 +317,8 @@ } total_read_count = 0; - do { + do + { ssize_t read_count; diff --git a/freetype/builds/unix/install-sh b/freetype/builds/unix/install-sh old mode 100644 new mode 100755 index a9244eb0..04367377 --- a/freetype/builds/unix/install-sh +++ b/freetype/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;; + # 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 + *[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 + # 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 + 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;; + 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 + 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/ + 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 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 rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff --git a/freetype/builds/unix/install.mk b/freetype/builds/unix/install.mk index 9cd95487..83525ee4 100644 --- a/freetype/builds/unix/install.mk +++ b/freetype/builds/unix/install.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2002, 2003, 2006, 2013 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, @@ -33,7 +33,8 @@ install: $(PROJECT_LIBRARY) $(DESTDIR)$(libdir)/pkgconfig \ $(DESTDIR)$(includedir)/freetype2/config \ $(DESTDIR)$(bindir) \ - $(DESTDIR)$(datadir)/aclocal + $(DESTDIR)$(datadir)/aclocal \ + $(DESTDIR)$(mandir)/man1 $(LIBTOOL) --mode=install $(INSTALL) \ $(PROJECT_LIBRARY) $(DESTDIR)$(libdir) -for P in $(PUBLIC_H) ; do \ @@ -58,6 +59,8 @@ install: $(PROJECT_LIBRARY) $(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: @@ -69,6 +72,7 @@ uninstall: -$(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/freetype/builds/unix/ltmain.sh b/freetype/builds/unix/ltmain.sh index 63ae69dc..08f3a26e 100644 --- a/freetype/builds/unix/ltmain.sh +++ b/freetype/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 , 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,166 +26,670 @@ # 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 . -# 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 . -# GNU libtool home page: . -# General help using GNU software: . 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 . + +# 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 + + + +## ------------------------- ## +## 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.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.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"} +: ${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}"} + + +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## + +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' + +# Same as above, but do not quote variable references. +sed_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' + +# 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" + + +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# 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. + +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. + +# 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=: + +# 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 # 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" +progpath=$0 + +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` + +# Make sure we have an absolute progpath for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` + progdir=`cd "$progdir" && pwd` + progpath=$progdir/$progname + ;; + *) + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS=$_G_IFS + test -x "$progdir/$progname" && break + done + IFS=$_G_IFS + test -n "$progdir" || progdir=`pwd` + progpath=$progdir/$progname + ;; +esac +## ----------------- ## +## Standard options. ## +## ----------------- ## -: ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} +# 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. -# 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. +opt_dry_run=false +opt_quiet=false +opt_verbose=false -exit_status=$EXIT_SUCCESS +# 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= -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" +# 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 -dirname="s,/[^/]*$,," -basename="s,^.*/,," +# 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 -# func_dirname file append nondir_replacement + +## -------------------- ## +## 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 () +{ + $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=: +} + + +## ----------------- ## +## 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 () +{ + $debug_cmd + + 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. -func_dirname () +eval '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 + $debug_cmd + + '"$_d"' +}' -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} # func_basename may be replaced by extended shell implementation - - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function +# 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 @@ -190,263 +697,327 @@ func_basename () # 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 () +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval '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}" + $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... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# 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 () +{ + $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_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# 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_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 () +{ + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= + + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + + # 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 "$_G_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + _G_dir_list=$_G_directory_path:$_G_dir_list + + # If the last portion added has no slash in it, the list is done + case $_G_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` + done + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` + + 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 "$_G_dir" 2>/dev/null || : + done + IFS=$func_mkdir_p_IFS + + # Bail out if we (or some other process) failed to create a directory. + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} # func_dirname_and_basename may be replaced by extended shell implementation +} -# 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 () +# func_mktempdir [BASENAME] +# ------------------------- +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, BASENAME is the basename for that directory. +func_mktempdir () { - 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 + $debug_cmd + _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 + _G_tmpdir=$_G_template-$$ + else + + # If mktemp works, use that first and foremost + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` + + if test ! -d "$_G_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + _G_tmpdir=$_G_template-${RANDOM-0}$$ + + func_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" + fi + + $ECHO "$_G_tmpdir" +} -# 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,/*$,/,' # 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 + $debug_cmd + + # 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 "") - # 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 -} - -# 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 + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return ;; - $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 + # 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_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 + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; 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 "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi - - # 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 + # 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 } -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - 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' - -# 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" - -# 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 () +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () { - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -} + $debug_cmd -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} + $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 @@ -454,450 +1025,1106 @@ func_verbose () : } -# 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_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () { - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} + $debug_cmd -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + 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=. - # bash bug again: : } -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} -# 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" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# 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= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_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" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` - done - my_dir_list=`$ECHO "$my_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 - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_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'" - fi -} - - -# func_mktempdir [string] -# 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. -func_mktempdir () -{ - my_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}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_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'" - fi - - $ECHO "$my_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 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 () { - 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\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac + 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 +# 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 - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $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 . + +# 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 '_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 + $debug_cmd - $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 + 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 - -exit_cmd=: + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} - - - -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" - -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -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= - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () { - 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 () + 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 $? +} + + +# 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: + +# Set a version string. +scriptversion='(GNU libtool) 2.4.2.444.28-053d' + + +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () { - func_quote_for_eval "${2}" - eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -} # func_append_quoted may be replaced by extended shell implementation + $debug_cmd + + _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 +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=$long_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) + 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 . +GNU libtool home page: . +General help using GNU software: ." -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} # func_lo2o may be replaced by extended shell implementation +# 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_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} # func_xform may be replaced by extended shell implementation - - -# 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" + 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 + # 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 - - - -# 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 - - -# 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_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () { - # 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) ;; + $debug_mode - # 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 - ;; + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; + nonopt= + preserve_args= - # 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 ;; + # 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 - done - # Validate options: - - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi - - # preserve --debug - test "$opt_debug" = : || func_append preserve_args " --debug" - - 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" - fi - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # 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 - - # 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 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 +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd + + # 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 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 + + + +# 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 + + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + 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 + + $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." + } + + # 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 </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 . $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 *) <_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 < #include +#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 < 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/freetype/builds/unix/mkinstalldirs b/freetype/builds/unix/mkinstalldirs old mode 100644 new mode 100755 diff --git a/freetype/builds/unix/pkg.m4 b/freetype/builds/unix/pkg.m4 new file mode 100644 index 00000000..f26f84c9 --- /dev/null +++ b/freetype/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 . +# +# 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 .])[]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/freetype/builds/unix/unix-def.in b/freetype/builds/unix/unix-def.in index 491e9748..4c06a05c 100644 --- a/freetype/builds/unix/unix-def.in +++ b/freetype/builds/unix/unix-def.in @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2002, 2004, 2006, 2008, 2013 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, @@ -34,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 @@ -55,15 +56,15 @@ bindir := @bindir@ includedir := @includedir@ datarootdir := @datarootdir@ datadir := @datadir@ +mandir := @mandir@ version_info := @version_info@ # Variables needed for `freetype-config' and `freetype.pc'. # -FT2_EXTRA_LIBS := @FT2_EXTRA_LIBS@ -LIBBZ2 := @LIBBZ2@ -LIBZ := @LIBZ@ -LIBPNG := @LIBPNG@ +REQUIRES_PRIVATE := @REQUIRES_PRIVATE@ +LIBS_PRIVATE := @LIBS_PRIVATE@ +LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@ build_libtool_libs := @build_libtool_libs@ ft_version := @ft_version@ @@ -100,35 +101,43 @@ NO_OUTPUT := 2> /dev/null $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in rm -f $@ $@.tmp - sed -e 's|%FT2_EXTRA_LIBS%|$(FT2_EXTRA_LIBS)|' \ - -e 's|%LIBBZ2%|$(LIBBZ2)|' \ - -e 's|%LIBZ%|$(LIBZ)|' \ - -e 's|%LIBPNG%|$(LIBPNG)|' \ + 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)|' \ - $< \ + -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|%FT2_EXTRA_LIBS%|$(FT2_EXTRA_LIBS)|' \ - -e 's|%LIBBZ2%|$(LIBBZ2)|' \ - -e 's|%LIBZ%|$(LIBZ)|' \ - -e 's|%LIBPNG%|$(LIBPNG)|' \ + 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)|' \ - -e 's|%ft_version%|$(ft_version)|' \ - -e 's|%includedir%|$(includedir)|' \ - -e 's|%libdir%|$(libdir)|' \ - -e 's|%prefix%|$(prefix)|' \ - $< \ + -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 $@ diff --git a/freetype/builds/vms/PaxHeaders.18661/ftconfig.h b/freetype/builds/vms/PaxHeaders.18661/ftconfig.h deleted file mode 100644 index 64907f85..00000000 --- a/freetype/builds/vms/PaxHeaders.18661/ftconfig.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256889.780074766 -30 atime=1385335759.882156795 -30 ctime=1384256889.780074766 diff --git a/freetype/builds/vms/PaxHeaders.18661/ftsystem.c b/freetype/builds/vms/PaxHeaders.18661/ftsystem.c deleted file mode 100644 index 53592fbf..00000000 --- a/freetype/builds/vms/PaxHeaders.18661/ftsystem.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.869819403 -30 ctime=1374498497.936291963 diff --git a/freetype/builds/vms/ftconfig.h b/freetype/builds/vms/ftconfig.h index 3fb8f84f..b3096512 100644 --- a/freetype/builds/vms/ftconfig.h +++ b/freetype/builds/vms/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* VMS-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2004, 2006-2008, 2011, 2013 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, */ @@ -239,7 +239,16 @@ FT_BEGIN_HEADER #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 @@ -273,28 +282,10 @@ FT_BEGIN_HEADER #define FT_INT64 long long int #define FT_UINT64 unsigned long long int +#endif /* _MSC_VER */ + #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 ) - -#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_LONG64 typedef FT_INT64 FT_Int64; typedef FT_UINT64 FT_UInt64; @@ -306,215 +297,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( __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) */ - "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) - : "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; - - - 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_INLINED FT_MULFIX_ASSEMBLER -#endif -#endif - - #ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x diff --git a/freetype/builds/wince/PaxHeaders.18661/ftdebug.c b/freetype/builds/wince/PaxHeaders.18661/ftdebug.c deleted file mode 100644 index f90fa27e..00000000 --- a/freetype/builds/wince/PaxHeaders.18661/ftdebug.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256622.573415309 -30 atime=1385335759.883156783 -30 ctime=1384256622.573415309 diff --git a/freetype/builds/wince/PaxHeaders.18661/vc2005-ce b/freetype/builds/wince/PaxHeaders.18661/vc2005-ce deleted file mode 100644 index b6da49e0..00000000 --- a/freetype/builds/wince/PaxHeaders.18661/vc2005-ce +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.825982473 -29 atime=1385335786.81482009 -30 ctime=1385335773.825982473 diff --git a/freetype/builds/wince/PaxHeaders.18661/vc2008-ce b/freetype/builds/wince/PaxHeaders.18661/vc2008-ce deleted file mode 100644 index e0eb193e..00000000 --- a/freetype/builds/wince/PaxHeaders.18661/vc2008-ce +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.819982548 -30 atime=1385335786.785820453 -30 ctime=1385335773.819982548 diff --git a/freetype/builds/wince/vc2005-ce/PaxHeaders.18661/freetype.sln b/freetype/builds/wince/vc2005-ce/PaxHeaders.18661/freetype.sln deleted file mode 100644 index 9e624c70..00000000 --- a/freetype/builds/wince/vc2005-ce/PaxHeaders.18661/freetype.sln +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335786.81882004 -30 ctime=1374498497.870292788 diff --git a/freetype/builds/wince/vc2005-ce/PaxHeaders.18661/freetype.vcproj b/freetype/builds/wince/vc2005-ce/PaxHeaders.18661/freetype.vcproj deleted file mode 100644 index 42b8c21b..00000000 --- a/freetype/builds/wince/vc2005-ce/PaxHeaders.18661/freetype.vcproj +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.383022992 -30 atime=1385335585.506336793 -30 ctime=1385044911.383022992 diff --git a/freetype/builds/wince/vc2005-ce/PaxHeaders.18661/index.html b/freetype/builds/wince/vc2005-ce/PaxHeaders.18661/index.html deleted file mode 100644 index 1457b2b4..00000000 --- a/freetype/builds/wince/vc2005-ce/PaxHeaders.18661/index.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.407022692 -29 atime=1385335585.52733653 -30 ctime=1385044911.407022692 diff --git a/freetype/builds/wince/vc2005-ce/freetype.vcproj b/freetype/builds/wince/vc2005-ce/freetype.vcproj index f4c42e08..0d6d7612 100644 --- a/freetype/builds/wince/vc2005-ce/freetype.vcproj +++ b/freetype/builds/wince/vc2005-ce/freetype.vcproj @@ -21,7 +21,7 @@ - + @@ -41,7 +41,7 @@ - + @@ -61,7 +61,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -101,7 +101,7 @@ - + @@ -121,7 +121,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -161,7 +161,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -201,7 +201,7 @@ - + @@ -221,7 +221,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -261,7 +261,7 @@ - + @@ -281,7 +281,7 @@ - + @@ -301,7 +301,7 @@ - + @@ -321,7 +321,7 @@ - + @@ -341,7 +341,7 @@ - + @@ -361,7 +361,7 @@ - + @@ -381,7 +381,7 @@ - + @@ -401,7 +401,7 @@ - + @@ -421,7 +421,7 @@ - + @@ -441,7 +441,7 @@ - + @@ -461,7 +461,7 @@ - + @@ -481,7 +481,7 @@ - + @@ -501,7 +501,7 @@ - + @@ -521,7 +521,7 @@ - + @@ -541,7 +541,7 @@ - + @@ -561,7 +561,7 @@ - + @@ -581,7 +581,7 @@ - + @@ -601,7 +601,7 @@ - + @@ -621,7 +621,7 @@ - + @@ -641,7 +641,7 @@ - + @@ -661,7 +661,7 @@ - + @@ -681,7 +681,7 @@ - + @@ -701,7 +701,7 @@ - + @@ -721,7 +721,7 @@ - + @@ -741,7 +741,7 @@ - + @@ -758,7 +758,7 @@ - + diff --git a/freetype/builds/wince/vc2005-ce/index.html b/freetype/builds/wince/vc2005-ce/index.html index fac9e731..e2160f68 100644 --- a/freetype/builds/wince/vc2005-ce/index.html +++ b/freetype/builds/wince/vc2005-ce/index.html @@ -21,14 +21,14 @@ the following targets:
  • PPC/SP WM6 (Windows Mobile 6)
  • -It compiles the following libraries from the FreeType 2.5.1 sources:

    +It compiles the following libraries from the FreeType 2.5.5 sources:

      -    freetype251.lib     - release build; single threaded
      -    freetype251_D.lib   - debug build;   single threaded
      -    freetype251MT.lib   - release build; multi-threaded
      -    freetype251MT_D.lib - debug build;   multi-threaded
      + 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

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/freetype/builds/wince/vc2008-ce/PaxHeaders.18661/freetype.sln b/freetype/builds/wince/vc2008-ce/PaxHeaders.18661/freetype.sln deleted file mode 100644 index 13f5b755..00000000 --- a/freetype/builds/wince/vc2008-ce/PaxHeaders.18661/freetype.sln +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.797820303 -29 ctime=1374498497.88929255 diff --git a/freetype/builds/wince/vc2008-ce/PaxHeaders.18661/freetype.vcproj b/freetype/builds/wince/vc2008-ce/PaxHeaders.18661/freetype.vcproj deleted file mode 100644 index fd93ef8b..00000000 --- a/freetype/builds/wince/vc2008-ce/PaxHeaders.18661/freetype.vcproj +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.435022342 -30 atime=1385335585.542336343 -30 ctime=1385044911.435022342 diff --git a/freetype/builds/wince/vc2008-ce/PaxHeaders.18661/index.html b/freetype/builds/wince/vc2008-ce/PaxHeaders.18661/index.html deleted file mode 100644 index e88ef5f8..00000000 --- a/freetype/builds/wince/vc2008-ce/PaxHeaders.18661/index.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.462022005 -30 atime=1385335585.554336193 -30 ctime=1385044911.462022005 diff --git a/freetype/builds/wince/vc2008-ce/freetype.vcproj b/freetype/builds/wince/vc2008-ce/freetype.vcproj index 14990c1f..d2aaf39a 100644 --- a/freetype/builds/wince/vc2008-ce/freetype.vcproj +++ b/freetype/builds/wince/vc2008-ce/freetype.vcproj @@ -88,7 +88,7 @@ /> PPC/SP WM6 (Windows Mobile 6) -It compiles the following libraries from the FreeType 2.5.1 sources:

    +It compiles the following libraries from the FreeType 2.5.5 sources:

      -    freetype251.lib     - release build; single threaded
      -    freetype251_D.lib   - debug build;   single threaded
      -    freetype251MT.lib   - release build; multi-threaded
      -    freetype251MT_D.lib - debug build;   multi-threaded
      + 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

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/freetype/builds/windows/PaxHeaders.18661/detect.mk b/freetype/builds/windows/PaxHeaders.18661/detect.mk deleted file mode 100644 index 4882b93b..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/detect.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335771.978005576 -30 ctime=1374498497.792293763 diff --git a/freetype/builds/windows/PaxHeaders.18661/ftdebug.c b/freetype/builds/windows/PaxHeaders.18661/ftdebug.c deleted file mode 100644 index 2489f938..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/ftdebug.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384257103.384404344 -30 atime=1385335759.906156495 -30 ctime=1384257103.384404344 diff --git a/freetype/builds/windows/PaxHeaders.18661/vc2005 b/freetype/builds/windows/PaxHeaders.18661/vc2005 deleted file mode 100644 index 06be95e3..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/vc2005 +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335774.021980023 -29 atime=1385335787.19481534 -30 ctime=1385335774.021980023 diff --git a/freetype/builds/windows/PaxHeaders.18661/vc2008 b/freetype/builds/windows/PaxHeaders.18661/vc2008 deleted file mode 100644 index a1c2e99f..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/vc2008 +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.973980623 -29 atime=1385335787.14681594 -30 ctime=1385335773.973980623 diff --git a/freetype/builds/windows/PaxHeaders.18661/vc2010 b/freetype/builds/windows/PaxHeaders.18661/vc2010 deleted file mode 100644 index 59b8b91f..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/vc2010 +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.999980298 -30 atime=1385335787.183815477 -30 ctime=1385335773.999980298 diff --git a/freetype/builds/windows/PaxHeaders.18661/visualc b/freetype/builds/windows/PaxHeaders.18661/visualc deleted file mode 100644 index cf6c47aa..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/visualc +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.991980398 -30 atime=1385335787.180815515 -30 ctime=1385335773.991980398 diff --git a/freetype/builds/windows/PaxHeaders.18661/visualce b/freetype/builds/windows/PaxHeaders.18661/visualce deleted file mode 100644 index dc6e3518..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/visualce +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.981980523 -30 atime=1385335787.163815727 -30 ctime=1385335773.981980523 diff --git a/freetype/builds/windows/PaxHeaders.18661/w32-bcc.mk b/freetype/builds/windows/PaxHeaders.18661/w32-bcc.mk deleted file mode 100644 index a0a7d9b6..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/w32-bcc.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551177.171073722 -30 atime=1385335787.192815365 -30 ctime=1382551177.171073722 diff --git a/freetype/builds/windows/PaxHeaders.18661/w32-bccd.mk b/freetype/builds/windows/PaxHeaders.18661/w32-bccd.mk deleted file mode 100644 index f1da6871..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/w32-bccd.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551166.711204488 -29 atime=1385335787.14681594 -30 ctime=1382551166.711204488 diff --git a/freetype/builds/windows/PaxHeaders.18661/w32-dev.mk b/freetype/builds/windows/PaxHeaders.18661/w32-dev.mk deleted file mode 100644 index e3478fbf..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/w32-dev.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551188.503932041 -29 atime=1385335787.14681594 -30 ctime=1382551188.503932041 diff --git a/freetype/builds/windows/PaxHeaders.18661/w32-gcc.mk b/freetype/builds/windows/PaxHeaders.18661/w32-gcc.mk deleted file mode 100644 index ef6a8ead..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/w32-gcc.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551196.737829104 -30 atime=1385335787.193815352 -30 ctime=1382551196.737829104 diff --git a/freetype/builds/windows/PaxHeaders.18661/w32-icc.mk b/freetype/builds/windows/PaxHeaders.18661/w32-icc.mk deleted file mode 100644 index 4c4f4ce1..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/w32-icc.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551204.445732741 -30 atime=1385335787.193815352 -30 ctime=1382551204.445732741 diff --git a/freetype/builds/windows/PaxHeaders.18661/w32-intl.mk b/freetype/builds/windows/PaxHeaders.18661/w32-intl.mk deleted file mode 100644 index c43f8365..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/w32-intl.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551213.731616652 -30 atime=1385335787.193815352 -30 ctime=1382551213.731616652 diff --git a/freetype/builds/windows/PaxHeaders.18661/w32-lcc.mk b/freetype/builds/windows/PaxHeaders.18661/w32-lcc.mk deleted file mode 100644 index 08a58960..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/w32-lcc.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551222.368508676 -30 atime=1385335787.192815365 -30 ctime=1382551222.368508676 diff --git a/freetype/builds/windows/PaxHeaders.18661/w32-mingw32.mk b/freetype/builds/windows/PaxHeaders.18661/w32-mingw32.mk deleted file mode 100644 index 2a9b2672..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/w32-mingw32.mk +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1382551231.18539845 -29 atime=1385335787.19481534 -29 ctime=1382551231.18539845 diff --git a/freetype/builds/windows/PaxHeaders.18661/w32-vcc.mk b/freetype/builds/windows/PaxHeaders.18661/w32-vcc.mk deleted file mode 100644 index bb939e02..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/w32-vcc.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551242.301259482 -30 atime=1385335787.133816102 -30 ctime=1382551242.301259482 diff --git a/freetype/builds/windows/PaxHeaders.18661/w32-wat.mk b/freetype/builds/windows/PaxHeaders.18661/w32-wat.mk deleted file mode 100644 index 924fe124..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/w32-wat.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551249.647167646 -29 atime=1385335787.19481534 -30 ctime=1382551249.647167646 diff --git a/freetype/builds/windows/PaxHeaders.18661/win32-def.mk b/freetype/builds/windows/PaxHeaders.18661/win32-def.mk deleted file mode 100644 index 5a924b29..00000000 --- a/freetype/builds/windows/PaxHeaders.18661/win32-def.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551277.222822903 -29 atime=1385335787.19481534 -30 ctime=1382551277.222822903 diff --git a/freetype/builds/windows/detect.mk b/freetype/builds/windows/detect.mk index 19065396..9dca2612 100644 --- a/freetype/builds/windows/detect.mk +++ b/freetype/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/freetype/builds/windows/vc2005/PaxHeaders.18661/freetype.sln b/freetype/builds/windows/vc2005/PaxHeaders.18661/freetype.sln deleted file mode 100644 index 1726cfc0..00000000 --- a/freetype/builds/windows/vc2005/PaxHeaders.18661/freetype.sln +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.195815327 -30 ctime=1374498497.761294151 diff --git a/freetype/builds/windows/vc2005/PaxHeaders.18661/freetype.vcproj b/freetype/builds/windows/vc2005/PaxHeaders.18661/freetype.vcproj deleted file mode 100644 index 6f25bff1..00000000 --- a/freetype/builds/windows/vc2005/PaxHeaders.18661/freetype.vcproj +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.186025455 -29 atime=1385335585.57533593 -30 ctime=1385044911.186025455 diff --git a/freetype/builds/windows/vc2005/PaxHeaders.18661/index.html b/freetype/builds/windows/vc2005/PaxHeaders.18661/index.html deleted file mode 100644 index bf1156e1..00000000 --- a/freetype/builds/windows/vc2005/PaxHeaders.18661/index.html +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1385044911.19602533 -30 atime=1385335585.589335755 -29 ctime=1385044911.19602533 diff --git a/freetype/builds/windows/vc2005/freetype.vcproj b/freetype/builds/windows/vc2005/freetype.vcproj index fe90e63f..038336f8 100644 --- a/freetype/builds/windows/vc2005/freetype.vcproj +++ b/freetype/builds/windows/vc2005/freetype.vcproj @@ -16,7 +16,7 @@ - + @@ -33,7 +33,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -84,7 +84,7 @@ - + @@ -101,7 +101,7 @@ - + diff --git a/freetype/builds/windows/vc2005/index.html b/freetype/builds/windows/vc2005/index.html index a80a4cb4..4929dcdd 100644 --- a/freetype/builds/windows/vc2005/index.html +++ b/freetype/builds/windows/vc2005/index.html @@ -11,14 +11,14 @@

    This directory contains project files for Visual C++, named freetype.vcproj, and Visual Studio, called freetype.sln. It -compiles the following libraries from the FreeType 2.5.1 sources:

    +compiles the following libraries from the FreeType 2.5.5 sources:

      -    freetype251.lib     - release build; single threaded
      -    freetype251_D.lib   - debug build;   single threaded
      -    freetype251MT.lib   - release build; multi-threaded
      -    freetype251MT_D.lib - debug build;   multi-threaded
      + 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

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/freetype/builds/windows/vc2008/PaxHeaders.18661/freetype.sln b/freetype/builds/windows/vc2008/PaxHeaders.18661/freetype.sln deleted file mode 100644 index eed0b937..00000000 --- a/freetype/builds/windows/vc2008/PaxHeaders.18661/freetype.sln +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335787.16281574 -30 ctime=1374498497.750294288 diff --git a/freetype/builds/windows/vc2008/PaxHeaders.18661/freetype.vcproj b/freetype/builds/windows/vc2008/PaxHeaders.18661/freetype.vcproj deleted file mode 100644 index e11977c7..00000000 --- a/freetype/builds/windows/vc2008/PaxHeaders.18661/freetype.vcproj +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.207025193 -30 atime=1385335585.590335743 -30 ctime=1385044911.207025193 diff --git a/freetype/builds/windows/vc2008/PaxHeaders.18661/index.html b/freetype/builds/windows/vc2008/PaxHeaders.18661/index.html deleted file mode 100644 index 36b8b412..00000000 --- a/freetype/builds/windows/vc2008/PaxHeaders.18661/index.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.218025055 -30 atime=1385335585.594335693 -30 ctime=1385044911.218025055 diff --git a/freetype/builds/windows/vc2008/freetype.vcproj b/freetype/builds/windows/vc2008/freetype.vcproj index 74f88e94..2ec86733 100644 --- a/freetype/builds/windows/vc2008/freetype.vcproj +++ b/freetype/builds/windows/vc2008/freetype.vcproj @@ -70,7 +70,7 @@ /> This directory contains project files for Visual C++, named freetype.vcproj, and Visual Studio, called freetype.sln. It -compiles the following libraries from the FreeType 2.5.1 sources:

    +compiles the following libraries from the FreeType 2.5.5 sources:

      -    freetype251.lib     - release build; single threaded
      -    freetype251_D.lib   - debug build;   single threaded
      -    freetype251MT.lib   - release build; multi-threaded
      -    freetype251MT_D.lib - debug build;   multi-threaded
      + 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

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.sln b/freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.sln deleted file mode 100644 index f4f7d5a7..00000000 --- a/freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.sln +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382549352.415886301 -30 atime=1385335787.183815477 -30 ctime=1382549352.415886301 diff --git a/freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.vcxproj b/freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.vcxproj deleted file mode 100644 index c75b67ef..00000000 --- a/freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.vcxproj +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.247024693 -30 atime=1385335585.596335668 -30 ctime=1385044911.247024693 diff --git a/freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.vcxproj.filters b/freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.vcxproj.filters deleted file mode 100644 index 128ef14e..00000000 --- a/freetype/builds/windows/vc2010/PaxHeaders.18661/freetype.vcxproj.filters +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384258495.642998716 -30 atime=1385335759.917156357 -30 ctime=1384258495.642998716 diff --git a/freetype/builds/windows/vc2010/PaxHeaders.18661/index.html b/freetype/builds/windows/vc2010/PaxHeaders.18661/index.html deleted file mode 100644 index 6d3a3bad..00000000 --- a/freetype/builds/windows/vc2010/PaxHeaders.18661/index.html +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1385044911.26402448 -30 atime=1385335585.608335518 -29 ctime=1385044911.26402448 diff --git a/freetype/builds/windows/vc2010/freetype.sln b/freetype/builds/windows/vc2010/freetype.sln index 48d41830..ce0b15b2 100644 --- a/freetype/builds/windows/vc2010/freetype.sln +++ b/freetype/builds/windows/vc2010/freetype.sln @@ -5,20 +5,24 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "freetype.vcxpro 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 Singlethreaded|x64 = Debug Singlethreaded|x64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|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 Singlethreaded|x64 = Release Singlethreaded|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|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 @@ -27,10 +31,10 @@ Global {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|Win32.Build.0 = Debug Singlethreaded|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}.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}.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 @@ -39,10 +43,6 @@ Global {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|Win32.Build.0 = Release Singlethreaded|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 - {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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/freetype/builds/windows/vc2010/freetype.user.props b/freetype/builds/windows/vc2010/freetype.user.props new file mode 100644 index 00000000..78310d46 --- /dev/null +++ b/freetype/builds/windows/vc2010/freetype.user.props @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/freetype/builds/windows/vc2010/freetype.vcxproj b/freetype/builds/windows/vc2010/freetype.vcxproj index c73a39ce..b1ac565e 100644 --- a/freetype/builds/windows/vc2010/freetype.vcxproj +++ b/freetype/builds/windows/vc2010/freetype.vcxproj @@ -1,6 +1,14 @@  + + Debug + Win32 + + + Debug + x64 + Debug Multithreaded Win32 @@ -17,12 +25,12 @@ Debug Singlethreaded x64 - - Debug + + Release Win32 - - Debug + + Release x64 @@ -41,19 +49,23 @@ Release Singlethreaded x64 - - Release - Win32 - - - Release - x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + StaticLibrary false @@ -78,25 +90,13 @@ MultiByte v100 - + StaticLibrary false MultiByte v100 - - StaticLibrary - false - MultiByte - v100 - - - StaticLibrary - false - MultiByte - v100 - - + StaticLibrary false MultiByte @@ -114,13 +114,13 @@ MultiByte v100 - + StaticLibrary false MultiByte v100 - + StaticLibrary false MultiByte @@ -131,18 +131,36 @@ <_ProjectFileVersion>10.0.30319.1 - .\..\..\..\objs\win32\vc2010\ - .\..\..\..\objs\release\ - .\..\..\..\objs\win32\vc2010\ - .\..\..\..\objs\release_mt\ - .\..\..\..\objs\win32\vc2010\ - .\..\..\..\objs\release_st\ - .\..\..\..\objs\win32\vc2010\ - .\..\..\..\objs\debug\ - .\..\..\..\objs\win32\vc2010\ - .\..\..\..\objs\debug_st\ - .\..\..\..\objs\win32\vc2010\ - .\..\..\..\objs\debug_mt\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + .\..\..\..\objs\vc2010\$(Platform)\ + .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\ + AllRules.ruleset + AllRules.ruleset + + + + AllRules.ruleset AllRules.ruleset @@ -155,12 +173,12 @@ - AllRules.ruleset - AllRules.ruleset - - - - + AllRules.ruleset + AllRules.ruleset + + + + AllRules.ruleset AllRules.ruleset @@ -173,180 +191,25 @@ - AllRules.ruleset - AllRules.ruleset - - - - - freetype251_D - freetype251_D - freetype251MT_D - freetype251MT_D - freetype251ST_D - freetype251ST_D - freetype251 - freetype251 - freetype251MT - freetype251MT - freetype251ST - freetype251ST + freetype255d + freetype255d + freetype255MTd + freetype255MTd + freetype255STd + freetype255STd + freetype255 + freetype255 + freetype255MT + freetype255MT + freetype255ST + freetype255ST - - .\..\..\..\objs\win64\vc2010\ - .\..\..\..\objs\debug\ - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - true - Level4 - - - Default - 4001 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - true - Level4 - - - Default - 4001 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreaded - true - true - Level4 - - - Default - 4001 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreaded - true - true - Level4 - - - Default - 4001 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreaded - true - true - Level4 - - - Default - 4001 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreaded - true - true - Level4 - - - Default - 4001 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - + Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL true @@ -355,20 +218,26 @@ Default 4001 true + false + $(OutDir)$(TargetName).pdb + Disabled - _DEBUG;%(PreprocessorDefinitions) + _DEBUG;$(UserDefines);%(PreprocessorDefinitions) 0x0409 true + MachineX86 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL true @@ -377,64 +246,26 @@ Default 4001 true + false + $(OutDir)$(TargetName).pdb + Disabled - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - true - Level4 - ProgramDatabase - Default - 4001 - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - true - Level4 - ProgramDatabase - Default - 4001 - true - - - _DEBUG;%(PreprocessorDefinitions) + _DEBUG;$(UserDefines);%(PreprocessorDefinitions) 0x0409 true + MachineX64 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;$(UserDefines);%(PreprocessorDefinitions) false false EnableFastChecks @@ -445,20 +276,26 @@ Default 4001 true + false + $(OutDir)$(TargetName).pdb + Disabled - _DEBUG;%(PreprocessorDefinitions) + _DEBUG;$(UserDefines);%(PreprocessorDefinitions) 0x0409 true + MachineX86 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;$(UserDefines);%(PreprocessorDefinitions) false false EnableFastChecks @@ -469,13 +306,317 @@ Default 4001 true + false + $(OutDir)$(TargetName).pdb + Disabled - _DEBUG;%(PreprocessorDefinitions) + _DEBUG;$(UserDefines);%(PreprocessorDefinitions) 0x0409 true + MachineX64 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) + + + + + Disabled + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + true + Level4 + ProgramDatabase + Default + 4001 + true + false + $(OutDir)$(TargetName).pdb + Disabled + + + _DEBUG;$(UserDefines);%(PreprocessorDefinitions) + 0x0409 + + + true + MachineX86 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) + + + + + Disabled + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + true + Level4 + ProgramDatabase + Default + 4001 + true + false + $(OutDir)$(TargetName).pdb + Disabled + + + _DEBUG;$(UserDefines);%(PreprocessorDefinitions) + 0x0409 + + + true + MachineX64 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) + + + + + Full + AnySuitable + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + true + Level4 + Default + 4001 + true + false + StreamingSIMDExtensions2 + false + false + false + + + true + + + true + Neither + true + + + NDEBUG;$(UserDefines);%(PreprocessorDefinitions) + 0x0409 + + + true + true + MachineX86 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) + + + + + Full + AnySuitable + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + true + Level4 + Default + 4001 + true + false + StreamingSIMDExtensions2 + false + false + false + + + true + + + true + Neither + true + + + NDEBUG;$(UserDefines);%(PreprocessorDefinitions) + 0x0409 + + + true + true + MachineX64 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) + + + + + Full + AnySuitable + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + true + MultiThreaded + true + true + Level4 + Default + 4001 + true + false + StreamingSIMDExtensions2 + false + false + false + false + + + true + + + true + Neither + true + + + NDEBUG;$(UserDefines);%(PreprocessorDefinitions) + 0x0409 + + + true + true + MachineX86 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) + + + + + Full + AnySuitable + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + true + MultiThreaded + true + true + Level4 + Default + 4001 + true + false + StreamingSIMDExtensions2 + false + false + false + false + + + true + + + true + Neither + true + + + NDEBUG;$(UserDefines);%(PreprocessorDefinitions) + 0x0409 + + + true + true + MachineX64 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) + + + + + Full + AnySuitable + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + true + MultiThreaded + true + true + Level4 + Default + 4001 + true + false + StreamingSIMDExtensions2 + false + false + false + + + true + + + true + Neither + true + + + NDEBUG;$(UserDefines);%(PreprocessorDefinitions) + 0x0409 + + + + true + MachineX86 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) + + + + + Full + AnySuitable + $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + true + MultiThreaded + true + true + Level4 + Default + 4001 + true + false + StreamingSIMDExtensions2 + false + false + false + + + true + + + true + Neither + true + + + NDEBUG;$(UserDefines);%(PreprocessorDefinitions) + 0x0409 + + + + true + MachineX64 + $(UserLibraryDirectories);%(AdditionalLibraryDirectories) + $(UserDependencies);%(AdditionalDependencies) @@ -1574,4 +1715,4 @@ - + \ No newline at end of file diff --git a/freetype/builds/windows/vc2010/index.html b/freetype/builds/windows/vc2010/index.html index c6e2b946..cb205aa7 100644 --- a/freetype/builds/windows/vc2010/index.html +++ b/freetype/builds/windows/vc2010/index.html @@ -9,18 +9,19 @@ FreeType 2 Project Files for VS.NET 2010 or newer -

    This directory contains a project file for Visual C++ newer), named -freetype.vcxproj, and Visual Studio, called freetype.sln. -It compiles the following libraries from the FreeType 2.5.1 sources:

    +

    This directory contains a project file for Visual C++ (VS.NET 2010 +or newer), named freetype.vcxproj, and Visual Studio, called +freetype.sln. It compiles the following libraries from the +FreeType 2.5.5 sources:

      -freetype251.lib     - release build
      -freetype251_D.lib   - debug build
      -freetype251ST.lib   - release build; single threaded
      -freetype251ST_D.lib - debug build;   single threaded
      -freetype251MT.lib   - release build; multi-threaded
      -freetype251MT_D.lib - debug build;   multi-threaded
      +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

    Both Win32 and x64 builds are supported.

    @@ -29,13 +30,23 @@ freetype251MT_D.lib - debug build; multi-threaded archives are already stored this way, so no further action is required. If you use some .tar.*z archives, be sure to configure your extracting tool to convert the line endings. For example, with WinZip, you should activate the TAR -file smart CR/LF Conversion option. Alternatively, you may consider +href="http://www.winzip.com">WinZip, you should activate the TAR +file smart CR/LF Conversion option. Alternatively, you may consider using the unix2dos or u2d utilities that are floating around, which specifically deal with this particular problem. -

    Build directories are placed in the top-level objs +

    Build directories are placed in the top-level objs\vc2010 directory.

    +

    Customization of the FreeType library is done by editing the +ftoptions.h header file in the top-level devel path. +Alternatively, you may copy the file to another directory and change the +include directory in freetype.users.props.

    + +

    To configure library dependencies like zlib and libpng, +edit the freetype.users.props file in this directory. It also +simplifies automated (command-line) builds using msbuild.

    + diff --git a/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.dsp b/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.dsp deleted file mode 100644 index 60a0f9bf..00000000 --- a/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.dsp +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.273024368 -30 atime=1385335585.608335518 -30 ctime=1385044911.273024368 diff --git a/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.dsw b/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.dsw deleted file mode 100644 index d5d85578..00000000 --- a/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.dsw +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.181815502 -30 ctime=1374498497.811293525 diff --git a/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.sln b/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.sln deleted file mode 100644 index f71ae1cb..00000000 --- a/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.sln +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.181815502 -30 ctime=1374498497.816293463 diff --git a/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.vcproj b/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.vcproj deleted file mode 100644 index 69fafa56..00000000 --- a/freetype/builds/windows/visualc/PaxHeaders.18661/freetype.vcproj +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.285024218 -30 atime=1385335585.610335493 -30 ctime=1385044911.285024218 diff --git a/freetype/builds/windows/visualc/PaxHeaders.18661/index.html b/freetype/builds/windows/visualc/PaxHeaders.18661/index.html deleted file mode 100644 index 9ced8a33..00000000 --- a/freetype/builds/windows/visualc/PaxHeaders.18661/index.html +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1385044911.29602408 -29 atime=1385335585.61133548 -29 ctime=1385044911.29602408 diff --git a/freetype/builds/windows/visualc/freetype.dsp b/freetype/builds/windows/visualc/freetype.dsp index 7fb0fff5..6ccae36b 100644 --- a/freetype/builds/windows/visualc/freetype.dsp +++ b/freetype/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\freetype251.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\freetype251_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded" @@ -102,8 +102,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype251_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype251MT_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" @@ -126,8 +126,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype251.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype251MT.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\freetype251.lib" -# ADD LIB32 /out:"..\..\..\objs\freetype251ST.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\freetype251_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype251ST_D.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255ST_D.lib" -!ENDIF +!ENDIF # Begin Target diff --git a/freetype/builds/windows/visualc/freetype.vcproj b/freetype/builds/windows/visualc/freetype.vcproj index 0195f754..43b11dff 100644 --- a/freetype/builds/windows/visualc/freetype.vcproj +++ b/freetype/builds/windows/visualc/freetype.vcproj @@ -69,7 +69,7 @@ /> This directory contains project files for Visual C++, named freetype.dsp, and Visual Studio, called freetype.sln. It -compiles the following libraries from the FreeType 2.5.1 sources:

    +compiles the following libraries from the FreeType 2.5.5 sources:

      -    freetype251.lib     - release build; single threaded
      -    freetype251_D.lib   - debug build;   single threaded
      -    freetype251MT.lib   - release build; multi-threaded
      -    freetype251MT_D.lib - debug build;   multi-threaded
      + 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

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/freetype/builds/windows/visualce/PaxHeaders.18661/freetype.dsp b/freetype/builds/windows/visualce/PaxHeaders.18661/freetype.dsp deleted file mode 100644 index f67b5023..00000000 --- a/freetype/builds/windows/visualce/PaxHeaders.18661/freetype.dsp +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1385044911.30402398 -29 atime=1385335585.61133548 -29 ctime=1385044911.30402398 diff --git a/freetype/builds/windows/visualce/PaxHeaders.18661/freetype.dsw b/freetype/builds/windows/visualce/PaxHeaders.18661/freetype.dsw deleted file mode 100644 index 731f4866..00000000 --- a/freetype/builds/windows/visualce/PaxHeaders.18661/freetype.dsw +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335787.164815715 -30 ctime=1374498497.768294063 diff --git a/freetype/builds/windows/visualce/PaxHeaders.18661/freetype.vcproj b/freetype/builds/windows/visualce/PaxHeaders.18661/freetype.vcproj deleted file mode 100644 index ec5b0490..00000000 --- a/freetype/builds/windows/visualce/PaxHeaders.18661/freetype.vcproj +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.339023543 -30 atime=1385335585.612335468 -30 ctime=1385044911.339023543 diff --git a/freetype/builds/windows/visualce/PaxHeaders.18661/index.html b/freetype/builds/windows/visualce/PaxHeaders.18661/index.html deleted file mode 100644 index 59b8e771..00000000 --- a/freetype/builds/windows/visualce/PaxHeaders.18661/index.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044911.367023192 -30 atime=1385335585.642335093 -30 ctime=1385044911.367023192 diff --git a/freetype/builds/windows/visualce/freetype.dsp b/freetype/builds/windows/visualce/freetype.dsp index 7fb0fff5..6ccae36b 100644 --- a/freetype/builds/windows/visualce/freetype.dsp +++ b/freetype/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\freetype251.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\freetype251_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded" @@ -102,8 +102,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype251_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype251MT_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" @@ -126,8 +126,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype251.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype251MT.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\freetype251.lib" -# ADD LIB32 /out:"..\..\..\objs\freetype251ST.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\freetype251_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype251ST_D.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255ST_D.lib" -!ENDIF +!ENDIF # Begin Target diff --git a/freetype/builds/windows/visualce/freetype.vcproj b/freetype/builds/windows/visualce/freetype.vcproj index 776e14c5..edc30788 100644 --- a/freetype/builds/windows/visualce/freetype.vcproj +++ b/freetype/builds/windows/visualce/freetype.vcproj @@ -87,7 +87,7 @@ /> PPC/SP WM6 (Windows Mobile 6) -It compiles the following libraries from the FreeType 2.5.1 sources:

    +It compiles the following libraries from the FreeType 2.5.5 sources:

      -    freetype251.lib     - release build; single threaded
      -    freetype251_D.lib   - debug build;   single threaded
      -    freetype251MT.lib   - release build; multi-threaded
      -    freetype251MT_D.lib - debug build;   multi-threaded
      + 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

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/freetype/builds/windows/win32-def.mk b/freetype/builds/windows/win32-def.mk index a65ea4f0..61af5df0 100644 --- a/freetype/builds/windows/win32-def.mk +++ b/freetype/builds/windows/win32-def.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2005, 2006, 2013 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, @@ -17,7 +17,7 @@ DELETE := del CAT := type SEP := $(strip \ ) BUILD_DIR := $(TOP_DIR)/builds/windows -PLATFORM := win32 +PLATFORM := windows # The executable file extension (for tools). NOTE: WE INCLUDE THE DOT HERE !! # diff --git a/freetype/configure b/freetype/configure old mode 100644 new mode 100755 diff --git a/freetype/devel/PaxHeaders.18661/ft2build.h b/freetype/devel/PaxHeaders.18661/ft2build.h deleted file mode 100644 index 7e2399ee..00000000 --- a/freetype/devel/PaxHeaders.18661/ft2build.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384333136.476563731 -29 atime=1385335758.54917346 -30 ctime=1384333136.476563731 diff --git a/freetype/devel/PaxHeaders.18661/ftoption.h b/freetype/devel/PaxHeaders.18661/ftoption.h deleted file mode 100644 index 631ea2cb..00000000 --- a/freetype/devel/PaxHeaders.18661/ftoption.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256096.575991181 -30 atime=1385335759.945156007 -30 ctime=1384256096.575991181 diff --git a/freetype/devel/ftoption.h b/freetype/devel/ftoption.h index 27d1bd9a..10027bb5 100644 --- a/freetype/devel/ftoption.h +++ b/freetype/devel/ftoption.h @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2013 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, */ @@ -61,7 +61,7 @@ FT_BEGIN_HEADER /* that are statically linked to the library at compile time. By */ /* default, this file is . */ /* */ - /* We highly recommend using the third method whenever possible. */ + /* We highly recommend using the third method whenever possible. */ /* */ /*************************************************************************/ @@ -205,7 +205,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* PNG bitmap support. */ + /* PNG bitmap support. */ /* */ /* FreeType now handles loading color bitmap glyphs in the PNG format. */ /* This requires help from the external libpng library. Uncompressed */ @@ -217,6 +217,19 @@ FT_BEGIN_HEADER #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, */ @@ -758,6 +771,30 @@ FT_BEGIN_HEADER /*************************************************************************/ + /*************************************************************************/ + /* */ + /* 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 */ @@ -807,8 +844,8 @@ FT_BEGIN_HEADER /* - * This macro is obsolete. Support has been removed in FreeType - * version 2.5. + * This macro is obsolete. Support has been removed in FreeType + * version 2.5. */ /* #define FT_CONFIG_OPTION_OLD_INTERNALS */ @@ -824,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/freetype/docs/CHANGES b/freetype/docs/CHANGES index 8a8bfd50..bbc31104 100644 --- a/freetype/docs/CHANGES +++ b/freetype/docs/CHANGES @@ -1,3 +1,177 @@ + +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 @@ -168,6 +342,9 @@ CHANGES BETWEEN 2.4.12 and 2.5 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. diff --git a/freetype/docs/INSTALL.CROSS b/freetype/docs/INSTALL.CROSS index 005d4429..d372adcf 100644 --- a/freetype/docs/INSTALL.CROSS +++ b/freetype/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=' and - `--build=' 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=' and + `--build=' 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 \ @@ -58,22 +59,63 @@ INSTALL.UNIX for required tools and the basic self-building procedure. 2.2. The prefix to install FreeType2 Setting `--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/'. + 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 FreeType2 is used as a part of - the target system, the prefix to install should reflect the file - system structure of the target system. + 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, 2012 by suzuki toshiya +Copyright 2006, 2008, 2012, 2014 by suzuki toshiya David Turner, Robert Wilhelm, and Werner Lemberg. diff --git a/freetype/docs/INSTALL.GNU b/freetype/docs/INSTALL.GNU index c2ff299a..3b9e0a2d 100644 --- a/freetype/docs/INSTALL.GNU +++ b/freetype/docs/INSTALL.GNU @@ -52,7 +52,7 @@ instructions in the file `INSTALL.UNIX' instead. The following settings are used: - platform win32 + platform windows compiler gcc configuration directory .\builds\windows configuration rules .\builds\windows\w32-gcc.mk @@ -148,7 +148,7 @@ instructions in the file `INSTALL.UNIX' instead. ---------------------------------------------------------------------- -Copyright 2003, 2004, 2005, 2006, 2008, 2013 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/freetype/docs/INSTALL.UNIX b/freetype/docs/INSTALL.UNIX index 7175ca09..251c749a 100644 --- a/freetype/docs/INSTALL.UNIX +++ b/freetype/docs/INSTALL.UNIX @@ -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-2007, 2013 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/freetype/docs/PaxHeaders.18661/CHANGES b/freetype/docs/PaxHeaders.18661/CHANGES deleted file mode 100644 index c98502a8..00000000 --- a/freetype/docs/PaxHeaders.18661/CHANGES +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385035107.806584564 -30 atime=1385335592.220252857 -30 ctime=1385035107.806584564 diff --git a/freetype/docs/PaxHeaders.18661/CMAKE b/freetype/docs/PaxHeaders.18661/CMAKE deleted file mode 100644 index f200f984..00000000 --- a/freetype/docs/PaxHeaders.18661/CMAKE +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382596346.748515554 -30 atime=1385335760.902144043 -30 ctime=1382596346.748515554 diff --git a/freetype/docs/PaxHeaders.18661/CUSTOMIZE b/freetype/docs/PaxHeaders.18661/CUSTOMIZE deleted file mode 100644 index 956d4657..00000000 --- a/freetype/docs/PaxHeaders.18661/CUSTOMIZE +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256244.587140787 -29 atime=1385335759.94815597 -30 ctime=1384256244.587140787 diff --git a/freetype/docs/PaxHeaders.18661/DEBUG b/freetype/docs/PaxHeaders.18661/DEBUG deleted file mode 100644 index cde0c187..00000000 --- a/freetype/docs/PaxHeaders.18661/DEBUG +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256543.925398544 -30 atime=1385335759.949155957 -30 ctime=1384256543.925398544 diff --git a/freetype/docs/PaxHeaders.18661/FTL.TXT b/freetype/docs/PaxHeaders.18661/FTL.TXT deleted file mode 100644 index eef1593f..00000000 --- a/freetype/docs/PaxHeaders.18661/FTL.TXT +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335783.91285637 -30 ctime=1374498495.734319491 diff --git a/freetype/docs/PaxHeaders.18661/GPLv2.TXT b/freetype/docs/PaxHeaders.18661/GPLv2.TXT deleted file mode 100644 index 43731d81..00000000 --- a/freetype/docs/PaxHeaders.18661/GPLv2.TXT +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.043854732 -30 ctime=1374498495.737319454 diff --git a/freetype/docs/PaxHeaders.18661/INSTALL b/freetype/docs/PaxHeaders.18661/INSTALL deleted file mode 100644 index 67d238b2..00000000 --- a/freetype/docs/PaxHeaders.18661/INSTALL +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382596430.001474749 -30 atime=1385335784.079854282 -30 ctime=1382596430.001474749 diff --git a/freetype/docs/PaxHeaders.18661/INSTALL.ANY b/freetype/docs/PaxHeaders.18661/INSTALL.ANY deleted file mode 100644 index 45e5741e..00000000 --- a/freetype/docs/PaxHeaders.18661/INSTALL.ANY +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256337.335981267 -30 atime=1385335759.949155957 -30 ctime=1384256337.335981267 diff --git a/freetype/docs/PaxHeaders.18661/INSTALL.CROSS b/freetype/docs/PaxHeaders.18661/INSTALL.CROSS deleted file mode 100644 index a6fa32e7..00000000 --- a/freetype/docs/PaxHeaders.18661/INSTALL.CROSS +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.003855232 -30 ctime=1374498495.735319479 diff --git a/freetype/docs/PaxHeaders.18661/INSTALL.GNU b/freetype/docs/PaxHeaders.18661/INSTALL.GNU deleted file mode 100644 index e1b77e03..00000000 --- a/freetype/docs/PaxHeaders.18661/INSTALL.GNU +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382551624.236484635 -30 atime=1385335784.070854395 -30 ctime=1382551624.236484635 diff --git a/freetype/docs/PaxHeaders.18661/INSTALL.MAC b/freetype/docs/PaxHeaders.18661/INSTALL.MAC deleted file mode 100644 index 58f0d038..00000000 --- a/freetype/docs/PaxHeaders.18661/INSTALL.MAC +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.009855157 -30 ctime=1374498495.743319379 diff --git a/freetype/docs/PaxHeaders.18661/INSTALL.UNIX b/freetype/docs/PaxHeaders.18661/INSTALL.UNIX deleted file mode 100644 index 5cff6b58..00000000 --- a/freetype/docs/PaxHeaders.18661/INSTALL.UNIX +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335783.911856382 -30 ctime=1374498495.733319504 diff --git a/freetype/docs/PaxHeaders.18661/INSTALL.VMS b/freetype/docs/PaxHeaders.18661/INSTALL.VMS deleted file mode 100644 index 5a4924dc..00000000 --- a/freetype/docs/PaxHeaders.18661/INSTALL.VMS +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335784.00485522 -30 ctime=1374498495.742319391 diff --git a/freetype/docs/PaxHeaders.18661/LICENSE.TXT b/freetype/docs/PaxHeaders.18661/LICENSE.TXT deleted file mode 100644 index b65f0bd8..00000000 --- a/freetype/docs/PaxHeaders.18661/LICENSE.TXT +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.042854745 -30 ctime=1374498495.730319541 diff --git a/freetype/docs/PaxHeaders.18661/MAKEPP b/freetype/docs/PaxHeaders.18661/MAKEPP deleted file mode 100644 index 340bf577..00000000 --- a/freetype/docs/PaxHeaders.18661/MAKEPP +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.070854395 -30 ctime=1374498495.739319429 diff --git a/freetype/docs/PaxHeaders.18661/PROBLEMS b/freetype/docs/PaxHeaders.18661/PROBLEMS deleted file mode 100644 index f9a3f6df..00000000 --- a/freetype/docs/PaxHeaders.18661/PROBLEMS +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.009855157 -30 ctime=1374498495.731319529 diff --git a/freetype/docs/PaxHeaders.18661/TODO b/freetype/docs/PaxHeaders.18661/TODO deleted file mode 100644 index 08cc1d8c..00000000 --- a/freetype/docs/PaxHeaders.18661/TODO +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335783.898856545 -30 ctime=1374498495.763319129 diff --git a/freetype/docs/PaxHeaders.18661/VERSION.DLL b/freetype/docs/PaxHeaders.18661/VERSION.DLL deleted file mode 100644 index 1ad0485d..00000000 --- a/freetype/docs/PaxHeaders.18661/VERSION.DLL +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044710.547533782 -30 atime=1385335592.273252195 -30 ctime=1385044710.547533782 diff --git a/freetype/docs/PaxHeaders.18661/formats.txt b/freetype/docs/PaxHeaders.18661/formats.txt deleted file mode 100644 index f778e82b..00000000 --- a/freetype/docs/PaxHeaders.18661/formats.txt +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335783.917856307 -30 ctime=1374498495.764319116 diff --git a/freetype/docs/PaxHeaders.18661/raster.txt b/freetype/docs/PaxHeaders.18661/raster.txt deleted file mode 100644 index d3f2128c..00000000 --- a/freetype/docs/PaxHeaders.18661/raster.txt +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.005855207 -30 ctime=1374498495.729319554 diff --git a/freetype/docs/PaxHeaders.18661/reference b/freetype/docs/PaxHeaders.18661/reference deleted file mode 100644 index a33076ee..00000000 --- a/freetype/docs/PaxHeaders.18661/reference +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335777.031942393 -30 atime=1385335783.917856307 -30 ctime=1385335777.031942393 diff --git a/freetype/docs/PaxHeaders.18661/release b/freetype/docs/PaxHeaders.18661/release deleted file mode 100644 index 03e99d1a..00000000 --- a/freetype/docs/PaxHeaders.18661/release +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385051730.349790701 -30 atime=1385335592.858244881 -30 ctime=1385051730.349790701 diff --git a/freetype/docs/VERSION.DLL b/freetype/docs/VERSION.DLL index ee6ccdfb..dd492619 100644 --- a/freetype/docs/VERSION.DLL +++ b/freetype/docs/VERSION.DLL @@ -52,6 +52,10 @@ on _most_ systems, but not all of them: 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 @@ -111,7 +115,7 @@ other release numbers. ------------------------------------------------------------------------ -Copyright 2002-2013 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/freetype/docs/freetype-config.1 b/freetype/docs/freetype-config.1 new file mode 100644 index 00000000..7b4a118f --- /dev/null +++ b/freetype/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 , +with further refinements from the FreeType team. +. +. +.\" eof diff --git a/freetype/docs/reference/PaxHeaders.18661/README b/freetype/docs/reference/PaxHeaders.18661/README deleted file mode 100644 index bf56d523..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/README +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335783.94885592 -30 ctime=1374498495.762319141 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-auto_hinter.html b/freetype/docs/reference/PaxHeaders.18661/ft2-auto_hinter.html deleted file mode 100644 index e5d4b682..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-auto_hinter.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335777.025942468 -30 atime=1385335783.926856195 -30 ctime=1385335777.025942468 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-base_interface.html b/freetype/docs/reference/PaxHeaders.18661/ft2-base_interface.html deleted file mode 100644 index f30a16fd..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-base_interface.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.571948144 -29 atime=1385335783.95685582 -30 ctime=1385335776.571948144 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-basic_types.html b/freetype/docs/reference/PaxHeaders.18661/ft2-basic_types.html deleted file mode 100644 index fd9635e9..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-basic_types.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.673946869 -30 atime=1385335783.939856032 -30 ctime=1385335776.673946869 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-bdf_fonts.html b/freetype/docs/reference/PaxHeaders.18661/ft2-bdf_fonts.html deleted file mode 100644 index 1941c1d4..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-bdf_fonts.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.679946794 -30 atime=1385335783.995855332 -30 ctime=1385335776.679946794 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-bitmap_handling.html b/freetype/docs/reference/PaxHeaders.18661/ft2-bitmap_handling.html deleted file mode 100644 index 0485141a..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-bitmap_handling.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.778945556 -30 atime=1385335783.998855295 -30 ctime=1385335776.778945556 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-bzip2.html b/freetype/docs/reference/PaxHeaders.18661/ft2-bzip2.html deleted file mode 100644 index 132b1ce3..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-bzip2.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.817945069 -30 atime=1385335783.935856082 -30 ctime=1385335776.817945069 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-cache_subsystem.html b/freetype/docs/reference/PaxHeaders.18661/ft2-cache_subsystem.html deleted file mode 100644 index 4ae1f6e3..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-cache_subsystem.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.625947469 -30 atime=1385335783.982855495 -30 ctime=1385335776.625947469 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-cff_driver.html b/freetype/docs/reference/PaxHeaders.18661/ft2-cff_driver.html deleted file mode 100644 index 963998bc..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-cff_driver.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.771945644 -30 atime=1385335783.989855407 -30 ctime=1385335776.771945644 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-cid_fonts.html b/freetype/docs/reference/PaxHeaders.18661/ft2-cid_fonts.html deleted file mode 100644 index b4643bd5..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-cid_fonts.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.821945019 -30 atime=1385335783.955855832 -30 ctime=1385335776.821945019 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-computations.html b/freetype/docs/reference/PaxHeaders.18661/ft2-computations.html deleted file mode 100644 index e4c96f6b..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-computations.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.948943431 -30 atime=1385335783.922856245 -30 ctime=1385335776.948943431 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-font_formats.html b/freetype/docs/reference/PaxHeaders.18661/ft2-font_formats.html deleted file mode 100644 index 5dc67826..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-font_formats.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.736946081 -30 atime=1385335783.949855907 -30 ctime=1385335776.736946081 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-gasp_table.html b/freetype/docs/reference/PaxHeaders.18661/ft2-gasp_table.html deleted file mode 100644 index cfb7ba17..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-gasp_table.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.871944393 -30 atime=1385335783.998855295 -30 ctime=1385335776.871944393 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-glyph_management.html b/freetype/docs/reference/PaxHeaders.18661/ft2-glyph_management.html deleted file mode 100644 index 7318ba26..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-glyph_management.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.708946431 -30 atime=1385335783.950855895 -30 ctime=1385335776.708946431 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-glyph_stroker.html b/freetype/docs/reference/PaxHeaders.18661/ft2-glyph_stroker.html deleted file mode 100644 index 128d8d83..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-glyph_stroker.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.420950032 -30 atime=1385335783.991855382 -30 ctime=1385335776.420950032 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-glyph_variants.html b/freetype/docs/reference/PaxHeaders.18661/ft2-glyph_variants.html deleted file mode 100644 index ed773535..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-glyph_variants.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.735946094 -30 atime=1385335783.973855607 -30 ctime=1385335776.735946094 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-gx_validation.html b/freetype/docs/reference/PaxHeaders.18661/ft2-gx_validation.html deleted file mode 100644 index 352de5ef..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-gx_validation.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.726946206 -30 atime=1385335783.935856082 -30 ctime=1385335776.726946206 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-gzip.html b/freetype/docs/reference/PaxHeaders.18661/ft2-gzip.html deleted file mode 100644 index ce266bf9..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-gzip.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335777.029942418 -30 atime=1385335783.935856082 -30 ctime=1385335777.029942418 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-header_file_macros.html b/freetype/docs/reference/PaxHeaders.18661/ft2-header_file_macros.html deleted file mode 100644 index 13b1d796..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-header_file_macros.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.844944731 -30 atime=1385335783.942855995 -30 ctime=1385335776.844944731 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-incremental.html b/freetype/docs/reference/PaxHeaders.18661/ft2-incremental.html deleted file mode 100644 index 6697090b..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-incremental.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.642947256 -30 atime=1385335783.937856057 -30 ctime=1385335776.642947256 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-index.html b/freetype/docs/reference/PaxHeaders.18661/ft2-index.html deleted file mode 100644 index cb1fc03a..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-index.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.386950457 -30 atime=1385335783.917856307 -30 ctime=1385335776.386950457 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-lcd_filtering.html b/freetype/docs/reference/PaxHeaders.18661/ft2-lcd_filtering.html deleted file mode 100644 index 788643e8..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-lcd_filtering.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335777.016942581 -30 atime=1385335783.949855907 -30 ctime=1385335777.016942581 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-list_processing.html b/freetype/docs/reference/PaxHeaders.18661/ft2-list_processing.html deleted file mode 100644 index 41a4bf65..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-list_processing.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335777.040942281 -30 atime=1385335783.942855995 -30 ctime=1385335777.040942281 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-lzw.html b/freetype/docs/reference/PaxHeaders.18661/ft2-lzw.html deleted file mode 100644 index 0b067409..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-lzw.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335777.031942393 -30 atime=1385335783.935856082 -30 ctime=1385335777.031942393 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-mac_specific.html b/freetype/docs/reference/PaxHeaders.18661/ft2-mac_specific.html deleted file mode 100644 index 99c0faae..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-mac_specific.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335777.001942768 -30 atime=1385335783.995855332 -30 ctime=1385335777.001942768 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-module_management.html b/freetype/docs/reference/PaxHeaders.18661/ft2-module_management.html deleted file mode 100644 index d8904770..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-module_management.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.866944456 -30 atime=1385335783.973855607 -30 ctime=1385335776.866944456 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-multiple_masters.html b/freetype/docs/reference/PaxHeaders.18661/ft2-multiple_masters.html deleted file mode 100644 index 9ef3095b..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-multiple_masters.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.691946644 -30 atime=1385335783.978855545 -30 ctime=1385335776.691946644 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-ot_validation.html b/freetype/docs/reference/PaxHeaders.18661/ft2-ot_validation.html deleted file mode 100644 index 188399f6..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-ot_validation.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.425949969 -30 atime=1385335783.931856132 -30 ctime=1385335776.425949969 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-outline_processing.html b/freetype/docs/reference/PaxHeaders.18661/ft2-outline_processing.html deleted file mode 100644 index b71c8eb1..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-outline_processing.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.815945094 -30 atime=1385335783.999855282 -30 ctime=1385335776.815945094 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-pfr_fonts.html b/freetype/docs/reference/PaxHeaders.18661/ft2-pfr_fonts.html deleted file mode 100644 index 697cf01d..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-pfr_fonts.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335777.006942706 -30 atime=1385335783.971855632 -30 ctime=1385335777.006942706 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-quick_advance.html b/freetype/docs/reference/PaxHeaders.18661/ft2-quick_advance.html deleted file mode 100644 index 5457c591..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-quick_advance.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.761945769 -30 atime=1385335783.986855445 -30 ctime=1385335776.761945769 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-raster.html b/freetype/docs/reference/PaxHeaders.18661/ft2-raster.html deleted file mode 100644 index 40b9d51d..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-raster.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.891944143 -30 atime=1385335783.917856307 -30 ctime=1385335776.891944143 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-sfnt_names.html b/freetype/docs/reference/PaxHeaders.18661/ft2-sfnt_names.html deleted file mode 100644 index 9d764695..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-sfnt_names.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.632947381 -29 atime=1385335783.94885592 -30 ctime=1385335776.632947381 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-sizes_management.html b/freetype/docs/reference/PaxHeaders.18661/ft2-sizes_management.html deleted file mode 100644 index d713cf2b..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-sizes_management.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.991942893 -30 atime=1385335783.991855382 -30 ctime=1385335776.991942893 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-system_interface.html b/freetype/docs/reference/PaxHeaders.18661/ft2-system_interface.html deleted file mode 100644 index 787e228c..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-system_interface.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.580948031 -30 atime=1385335783.931856132 -30 ctime=1385335776.580948031 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-toc.html b/freetype/docs/reference/PaxHeaders.18661/ft2-toc.html deleted file mode 100644 index 52d84665..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-toc.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.380950532 -30 atime=1385335783.978855545 -30 ctime=1385335776.380950532 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-truetype_engine.html b/freetype/docs/reference/PaxHeaders.18661/ft2-truetype_engine.html deleted file mode 100644 index 00a99677..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-truetype_engine.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.711946394 -30 atime=1385335783.935856082 -30 ctime=1385335776.711946394 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-truetype_tables.html b/freetype/docs/reference/PaxHeaders.18661/ft2-truetype_tables.html deleted file mode 100644 index ffa2ba3e..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-truetype_tables.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.932943631 -29 atime=1385335783.98885542 -30 ctime=1385335776.932943631 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-tt_driver.html b/freetype/docs/reference/PaxHeaders.18661/ft2-tt_driver.html deleted file mode 100644 index f4e41696..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-tt_driver.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.584947981 -30 atime=1385335783.973855607 -30 ctime=1385335776.584947981 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-type1_tables.html b/freetype/docs/reference/PaxHeaders.18661/ft2-type1_tables.html deleted file mode 100644 index 04ffd9d9..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-type1_tables.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.754945856 -29 atime=1385335783.95285587 -30 ctime=1385335776.754945856 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-user_allocation.html b/freetype/docs/reference/PaxHeaders.18661/ft2-user_allocation.html deleted file mode 100644 index 7658d87e..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-user_allocation.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.642947256 -30 atime=1385335783.931856132 -30 ctime=1385335776.642947256 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-version.html b/freetype/docs/reference/PaxHeaders.18661/ft2-version.html deleted file mode 100644 index e5c6e764..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-version.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.716946331 -30 atime=1385335783.950855895 -30 ctime=1385335776.716946331 diff --git a/freetype/docs/reference/PaxHeaders.18661/ft2-winfnt_fonts.html b/freetype/docs/reference/PaxHeaders.18661/ft2-winfnt_fonts.html deleted file mode 100644 index b24cf10b..00000000 --- a/freetype/docs/reference/PaxHeaders.18661/ft2-winfnt_fonts.html +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335776.395950344 -30 atime=1385335783.978855545 -30 ctime=1385335776.395950344 diff --git a/freetype/docs/reference/ft2-auto_hinter.html b/freetype/docs/reference/ft2-auto_hinter.html index 4d9eb1e6..71dede41 100644 --- a/freetype/docs/reference/ft2-auto_hinter.html +++ b/freetype/docs/reference/ft2-auto_hinter.html @@ -3,57 +3,121 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference -

    - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -The auto-hinter -

    +

    The auto-hinter

    Synopsis

    - - - - -
    glyph-to-script-mapfallback-script
    FT_AUTOHINTER_SCRIPT_XXXincrease-x-height
    FT_Prop_GlyphToScriptMapFT_Prop_IncreaseXHeight


    + + + + + +
    glyph-to-script-mapdefault-script
    FT_AUTOHINTER_SCRIPT_XXXincrease-x-height
    FT_Prop_GlyphToScriptMapFT_Prop_IncreaseXHeight
    fallback-script
    + -

    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.

    -

    -
    -

    glyph-to-script-map

    -
    + +
    +

    glyph-to-script-map

    +

    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.

    @@ -77,39 +141,29 @@ The auto-hinter FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT ); -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_AUTOHINTER_SCRIPT_XXX

    -
    -Defined in FT_AUTOHINTER_H (ftautoh.h). -

    -
    +
    + -#define FT_AUTOHINTER_SCRIPT_NONE 0 -#define FT_AUTOHINTER_SCRIPT_LATIN 1 -#define FT_AUTOHINTER_SCRIPT_CJK 2 -#define FT_AUTOHINTER_SCRIPT_INDIC 3 +
    +

    FT_AUTOHINTER_SCRIPT_XXX

    +

    Defined in FT_AUTOHINTER_H (ftautoh.h).

    +
    +#define FT_AUTOHINTER_SCRIPT_NONE   0
    +#define FT_AUTOHINTER_SCRIPT_LATIN  1
    +#define FT_AUTOHINTER_SCRIPT_CJK    2
    +#define FT_AUTOHINTER_SCRIPT_INDIC  3
    +
    -

    -

    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
    + +

    values

    + + - - - - - -
    FT_AUTOHINTER_SCRIPT_NONE

    Don't auto-hint this glyph.

    FT_AUTOHINTER_SCRIPT_LATIN
    +
    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.

    @@ -144,8 +198,7 @@ Defined in FT_AUTOHINTER_H (ftautoh.h).
     

    FT_AUTOHINTER_SCRIPT_CJK
    +
    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.

    @@ -184,8 +237,7 @@ Defined in FT_AUTOHINTER_H (ftautoh.h).
     

    FT_AUTOHINTER_SCRIPT_INDIC
    +
    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.

    @@ -200,41 +252,31 @@ Defined in FT_AUTOHINTER_H (ftautoh.h).
     

    Note that currently Indic support is rudimentary only, missing blue zone support.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Prop_GlyphToScriptMap

    -
    -Defined in FT_AUTOHINTER_H (ftautoh.h). -

    -
    +
    + - typedef struct FT_Prop_GlyphToScriptMap_ - { - FT_Face face; - FT_Byte* map; +
    +

    FT_Prop_GlyphToScriptMap

    +

    Defined in FT_AUTOHINTER_H (ftautoh.h).

    +
    +  typedef struct  FT_Prop_GlyphToScriptMap_
    +  {
    +    FT_Face   face;
    +    FT_Byte*  map;
     
    -   } FT_Prop_GlyphToScriptMap;
    +  } FT_Prop_GlyphToScriptMap;
    +
    -

    -

    Experimental only

    The data exchange structure for the glyph-to-script-map property.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    fallback-script

    -
    +
    + + +
    +

    fallback-script

    +

    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.

    @@ -247,20 +289,41 @@ Defined in FT_AUTOHINTER_H (ftautoh.h).
       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 glyph will affect this face.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    increase-x-height

    -
    +

    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.

    + +
    + + +
    +

    default-script

    + +

    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.

    + +
    +
    + +
    +

    increase-x-height

    +

    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;
    @@ -278,40 +341,30 @@ Defined in FT_AUTOHINTER_H (ftautoh.h).
       FT_Property_Set( library, "autofitter",
                                 "increase-x-height", &prop );
     
    -

    -
    note
    + +

    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).

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Prop_IncreaseXHeight

    -
    -Defined in FT_AUTOHINTER_H (ftautoh.h). -

    -
    +
    + - typedef struct FT_Prop_IncreaseXHeight_ - { - FT_Face face; - FT_UInt limit; +
    +

    FT_Prop_IncreaseXHeight

    +

    Defined in FT_AUTOHINTER_H (ftautoh.h).

    +
    +  typedef struct  FT_Prop_IncreaseXHeight_
    +  {
    +    FT_Face  face;
    +    FT_UInt  limit;
     
    -   } FT_Prop_IncreaseXHeight;
    +  } FT_Prop_IncreaseXHeight;
    +
    -

    -

    The data exchange structure for the increase-x-height property.

    -

    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-base_interface.html b/freetype/docs/reference/ft2-base_interface.html index 628eb3e2..4547b6f1 100644 --- a/freetype/docs/reference/ft2-base_interface.html +++ b/freetype/docs/reference/ft2-base_interface.html @@ -3,323 +3,378 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Base Interface -

    +

    Base Interface

    Synopsis

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FT_LibraryFT_IS_TRICKYFT_Load_Glyph
    FT_FaceFT_HAS_COLORFT_Load_Char
    FT_SizeFT_STYLE_FLAG_XXXFT_LOAD_XXX
    FT_GlyphSlotFT_Size_InternalFT_LOAD_TARGET_XXX
    FT_CharMapFT_Size_MetricsFT_LOAD_TARGET_MODE
    FT_EncodingFT_SizeRecFT_Set_Transform
    FT_Glyph_MetricsFT_SubGlyphFT_Render_Mode
    FT_Bitmap_SizeFT_Slot_Internalft_render_mode_xxx
    FT_ModuleFT_GlyphSlotRecFT_Render_Glyph
    FT_DriverFT_Init_FreeTypeFT_Kerning_Mode
    FT_RendererFT_Done_FreeTypeft_kerning_default
    FT_ENC_TAGFT_OPEN_XXXft_kerning_unfitted
    ft_encoding_xxxFT_Parameterft_kerning_unscaled
    FT_CharMapRecFT_Open_ArgsFT_Get_Kerning
    FT_Face_InternalFT_New_FaceFT_Get_Track_Kerning
    FT_FaceRecFT_New_Memory_FaceFT_Get_Glyph_Name
    FT_FACE_FLAG_XXXFT_Open_FaceFT_Get_Postscript_Name
    FT_HAS_HORIZONTALFT_Attach_FileFT_Select_Charmap
    FT_HAS_VERTICALFT_Attach_StreamFT_Set_Charmap
    FT_HAS_KERNINGFT_Reference_FaceFT_Get_Charmap_Index
    FT_IS_SCALABLEFT_Done_FaceFT_Get_Char_Index
    FT_IS_SFNTFT_Select_SizeFT_Get_First_Char
    FT_IS_FIXED_WIDTHFT_Size_Request_TypeFT_Get_Next_Char
    FT_HAS_FIXED_SIZESFT_Size_RequestRecFT_Get_Name_Index
    FT_HAS_FAST_GLYPHSFT_Size_RequestFT_SUBGLYPH_FLAG_XXX
    FT_HAS_GLYPH_NAMESFT_Request_SizeFT_Get_SubGlyph_Info
    FT_HAS_MULTIPLE_MASTERSFT_Set_Char_SizeFT_FSTYPE_XXX
    FT_IS_CID_KEYEDFT_Set_Pixel_SizesFT_Get_FSType_Flags


    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FT_LibraryFT_Glyph_MetricsFT_LOAD_COLOR
    FT_FaceFT_SubGlyph 
    FT_Size FT_LOAD_VERTICAL_LAYOUT
    FT_GlyphSlotFT_Bitmap_SizeFT_LOAD_IGNORE_TRANSFORM
    FT_CharMap FT_LOAD_FORCE_AUTOHINT
    FT_EncodingFT_Init_FreeTypeFT_LOAD_NO_RECURSE
    FT_ENC_TAGFT_Done_FreeTypeFT_LOAD_PEDANTIC
       
    FT_FaceRecFT_New_FaceFT_LOAD_TARGET_NORMAL
     FT_Done_FaceFT_LOAD_TARGET_LIGHT
    FT_FACE_FLAG_SCALABLEFT_Reference_FaceFT_LOAD_TARGET_MONO
    FT_FACE_FLAG_FIXED_SIZESFT_New_Memory_FaceFT_LOAD_TARGET_LCD
    FT_FACE_FLAG_FIXED_WIDTHFT_Open_FaceFT_LOAD_TARGET_LCD_V
    FT_FACE_FLAG_HORIZONTALFT_Open_Args 
    FT_FACE_FLAG_VERTICALFT_ParameterFT_LOAD_TARGET_MODE
    FT_FACE_FLAG_COLORFT_Attach_File 
    FT_FACE_FLAG_SFNTFT_Attach_StreamFT_Render_Glyph
    FT_FACE_FLAG_CID_KEYED FT_Render_Mode
    FT_FACE_FLAG_TRICKYFT_Set_Char_SizeFT_Get_Kerning
    FT_FACE_FLAG_KERNINGFT_Set_Pixel_SizesFT_Kerning_Mode
    FT_FACE_FLAG_MULTIPLE_MASTERSFT_Request_SizeFT_Get_Track_Kerning
    FT_FACE_FLAG_GLYPH_NAMESFT_Select_SizeFT_Get_Glyph_Name
    FT_FACE_FLAG_EXTERNAL_STREAMFT_Size_Request_TypeFT_Get_Postscript_Name
    FT_FACE_FLAG_HINTERFT_Size_RequestRec 
    FT_FACE_FLAG_TRICKYFT_Size_RequestFT_CharMapRec
     FT_Set_TransformFT_Select_Charmap
    FT_HAS_HORIZONTALFT_Load_GlyphFT_Set_Charmap
    FT_HAS_VERTICALFT_Get_Char_IndexFT_Get_Charmap_Index
    FT_HAS_KERNINGFT_Get_First_Char 
    FT_HAS_FIXED_SIZESFT_Get_Next_CharFT_Get_FSType_Flags
    FT_HAS_GLYPH_NAMESFT_Get_Name_IndexFT_Get_SubGlyph_Info
    FT_HAS_MULTIPLE_MASTERSFT_Load_Char 
    FT_HAS_COLOR FT_Face_Internal
     FT_OPEN_MEMORYFT_Size_Internal
    FT_IS_SFNTFT_OPEN_STREAMFT_Slot_Internal
    FT_IS_SCALABLEFT_OPEN_PATHNAME 
    FT_IS_FIXED_WIDTHFT_OPEN_DRIVERFT_FACE_FLAG_XXX
    FT_IS_CID_KEYEDFT_OPEN_PARAMSFT_STYLE_FLAG_XXX
    FT_IS_TRICKY FT_OPEN_XXX
     FT_LOAD_DEFAULTFT_LOAD_XXX
    FT_STYLE_FLAG_BOLDFT_LOAD_RENDERFT_LOAD_TARGET_XXX
    FT_STYLE_FLAG_ITALICFT_LOAD_MONOCHROMEFT_SUBGLYPH_FLAG_XXX
     FT_LOAD_LINEAR_DESIGNFT_FSTYPE_XXX
    FT_SizeRecFT_LOAD_NO_SCALE 
    FT_Size_MetricsFT_LOAD_NO_HINTINGFT_HAS_FAST_GLYPHS
     FT_LOAD_NO_BITMAP
    FT_GlyphSlotRecFT_LOAD_NO_AUTOHINT
    -
    -

    This section describes the public high-level API of FreeType 2.

    -

    -
    -

    FT_Library

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
     
    +

    This section describes the most important public high-level API functions of FreeType 2.

    + +
    +

    FT_Library

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct FT_LibraryRec_  *FT_Library;
    +
    -

    -

    A handle to a FreeType library instance. Each ‘library’ is completely independent from the others; it is the ‘root’ of a set of objects like fonts, faces, sizes, etc.

    It also embeds a memory manager (see FT_Memory), as well as a scan-line converter object (see FT_Raster).

    In multi-threaded applications, make sure that the same FT_Library object or any of its children doesn't get accessed in parallel.

    -

    -
    note
    + +

    note

    Library objects are normally created by FT_Init_FreeType, and destroyed with FT_Done_FreeType. If you need reference-counting (cf. FT_Reference_Library), use FT_New_Library and FT_Done_Library.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Face

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Face

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct FT_FaceRec_*  FT_Face;
    +
    -

    -

    A handle to a given typographic face object. A face object models a given typeface, in a given style.

    -

    -
    note
    + +

    note

    Each face object also owns a single FT_GlyphSlot object, as well as one or more FT_Size objects.

    Use FT_New_Face or FT_Open_Face to create a new face object from a given filepathname or a custom input stream.

    Use FT_Done_Face to destroy it (along with its slot and sizes).

    -
    -
    also
    + +

    also

    See FT_FaceRec for the publicly accessible fields of a given face object.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Size

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Size

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct FT_SizeRec_*  FT_Size;
    +
    -

    -

    A handle to an object used to model a face scaled to a given character size.

    -

    -
    note
    + +

    note

    Each FT_Face has an active FT_Size object that is used by functions like FT_Load_Glyph to determine the scaling transformation that in turn is used to load and hint glyphs and metrics.

    You can use FT_Set_Char_Size, FT_Set_Pixel_Sizes, FT_Request_Size or even FT_Select_Size to change the content (i.e., the scaling values) of the active FT_Size.

    You can use FT_New_Size to create additional size objects for a given FT_Face, but they won't be used by other functions until you activate it through FT_Activate_Size. Only one size can be activated at any given time per face.

    -
    -
    also
    + +

    also

    See FT_SizeRec for the publicly accessible fields of a given size object.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_GlyphSlot

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_GlyphSlot

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct FT_GlyphSlotRec_*  FT_GlyphSlot;
    +
    -

    -

    A handle to a given ‘glyph slot’. A slot is a container where it is possible to load any of the glyphs contained in its parent face.

    In other words, each time you call FT_Load_Glyph or FT_Load_Char, the slot's content is erased by the new glyph data, i.e., the glyph's metrics, its image (bitmap or outline), and other control information.

    -

    -
    also
    + +

    also

    See FT_GlyphSlotRec for the publicly accessible glyph fields.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CharMap

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_CharMap

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct FT_CharMapRec_*  FT_CharMap;
    +
    -

    -

    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.

    Each face object owns zero or more charmaps, but only one of them can be ‘active’ and used by FT_Get_Char_Index or FT_Load_Char.

    The list of available charmaps in a face is available through the ‘face->num_charmaps’ and ‘face->charmaps’ fields of FT_FaceRec.

    The currently active charmap is available as ‘face->charmap’. You should call FT_Set_Charmap to change it.

    -

    -
    note
    + +

    note

    When a new face is created (either through FT_New_Face or FT_Open_Face), the library looks for a Unicode charmap within the list and automatically activates it.

    -
    -
    also
    + +

    also

    See FT_CharMapRec for the publicly accessible fields of a given character map.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Encoding

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Encoding

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef enum  FT_Encoding_
       {
    -    FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
    +    FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
     
    -    FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
    -    FT_ENC_TAG( FT_ENCODING_UNICODE,   'u', 'n', 'i', 'c' ),
    +    FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
    +    FT_ENC_TAG( FT_ENCODING_UNICODE,   'u', 'n', 'i', 'c' ),
     
    -    FT_ENC_TAG( FT_ENCODING_SJIS,    's', 'j', 'i', 's' ),
    -    FT_ENC_TAG( FT_ENCODING_GB2312,  'g', 'b', ' ', ' ' ),
    -    FT_ENC_TAG( FT_ENCODING_BIG5,    'b', 'i', 'g', '5' ),
    -    FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
    -    FT_ENC_TAG( FT_ENCODING_JOHAB,   'j', 'o', 'h', 'a' ),
    +    FT_ENC_TAG( FT_ENCODING_SJIS,    's', 'j', 'i', 's' ),
    +    FT_ENC_TAG( FT_ENCODING_GB2312,  'g', 'b', ' ', ' ' ),
    +    FT_ENC_TAG( FT_ENCODING_BIG5,    'b', 'i', 'g', '5' ),
    +    FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
    +    FT_ENC_TAG( FT_ENCODING_JOHAB,   'j', 'o', 'h', 'a' ),
     
         /* for backwards compatibility */
    -    FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,
    -    FT_ENCODING_MS_GB2312  = FT_ENCODING_GB2312,
    -    FT_ENCODING_MS_BIG5    = FT_ENCODING_BIG5,
    -    FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
    -    FT_ENCODING_MS_JOHAB   = FT_ENCODING_JOHAB,
    +    FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,
    +    FT_ENCODING_MS_GB2312  = FT_ENCODING_GB2312,
    +    FT_ENCODING_MS_BIG5    = FT_ENCODING_BIG5,
    +    FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
    +    FT_ENCODING_MS_JOHAB   = FT_ENCODING_JOHAB,
     
    -    FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
    -    FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT,   'A', 'D', 'B', 'E' ),
    -    FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM,   'A', 'D', 'B', 'C' ),
    -    FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1,  'l', 'a', 't', '1' ),
    +    FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
    +    FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT,   'A', 'D', 'B', 'E' ),
    +    FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM,   'A', 'D', 'B', 'C' ),
    +    FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1,  'l', 'a', 't', '1' ),
     
    -    FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
    +    FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
     
    -    FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
    +    FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
     
       } FT_Encoding;
     
    -

    -
    + + /* 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 +#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 +#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 +#define ft_encoding_sjis FT_ENCODING_SJIS +#define ft_encoding_gb2312 FT_ENCODING_GB2312 +#define ft_encoding_big5 FT_ENCODING_BIG5 +#define ft_encoding_wansung FT_ENCODING_WANSUNG +#define ft_encoding_johab FT_ENCODING_JOHAB + +#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD +#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT +#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM +#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN + +

    An enumeration used to specify character sets supported by charmaps. Used in the FT_Select_Charmap API function.

    -

    -
    note
    + +

    note

    Despite the name, this enumeration lists specific character repertories (i.e., charsets), and not text encoding methods (e.g., UTF-8, UTF-16, etc.).

    Other encodings might be defined in the future.

    -
    -
    values
    -

    - -
    FT_ENCODING_NONE + +

    values

    + + - - - - - - - - - - - - - - - - - - - - - - - -
    FT_ENCODING_NONE

    The encoding value 0 is reserved.

    FT_ENCODING_UNICODE +
    FT_ENCODING_UNICODE

    Corresponds to the Unicode character set. This value covers all versions of the Unicode repertoire, including ASCII and Latin-1. Most fonts include a Unicode charmap, but not all of them.

    For example, if you want to access Unicode value U+1F028 (and the font contains it), use value 0x1F028 as the input value for FT_Get_Char_Index.

    FT_ENCODING_MS_SYMBOL +
    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.kostis.net/charsets/symbol.htm’.

    FT_ENCODING_SJIS +
    FT_ENCODING_SJIS

    Corresponds to Japanese SJIS encoding. More info at at ‘http://en.wikipedia.org/wiki/Shift_JIS’. See note on multi-byte encodings below.

    FT_ENCODING_GB2312 +
    FT_ENCODING_GB2312

    Corresponds to an encoding system for Simplified Chinese as used used in mainland China.

    FT_ENCODING_BIG5 +
    FT_ENCODING_BIG5

    Corresponds to an encoding system for Traditional Chinese as used in Taiwan and Hong Kong.

    FT_ENCODING_WANSUNG +
    FT_ENCODING_WANSUNG

    Corresponds to the Korean encoding system known as Wansung. For more information see ‘http://msdn.microsoft.com/en-US/goglobal/cc305154’.

    FT_ENCODING_JOHAB +
    FT_ENCODING_JOHAB

    The Korean standard character set (KS C 5601-1992), which corresponds to MS Windows code page 1361. This character set includes all possible Hangeul character combinations.

    FT_ENCODING_ADOBE_LATIN_1
    +
    FT_ENCODING_ADOBE_LATIN_1

    Corresponds to a Latin-1 encoding as defined in a Type 1 PostScript font. It is limited to 256 character codes.

    FT_ENCODING_ADOBE_STANDARD
    +
    FT_ENCODING_ADOBE_STANDARD

    Corresponds to the Adobe Standard encoding, as found in Type 1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.

    FT_ENCODING_ADOBE_EXPERT
    +
    FT_ENCODING_ADOBE_EXPERT

    Corresponds to the Adobe Expert encoding, as found in Type 1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.

    FT_ENCODING_ADOBE_CUSTOM
    +
    FT_ENCODING_ADOBE_CUSTOM

    Corresponds to a custom encoding, as found in Type 1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.

    FT_ENCODING_APPLE_ROMAN
    +
    FT_ENCODING_APPLE_ROMAN

    Corresponds to the 8-bit Apple roman encoding. Many TrueType and OpenType fonts contain a charmap for this encoding, since older versions of Mac OS are able to use it.

    FT_ENCODING_OLD_LATIN_2
    +
    FT_ENCODING_OLD_LATIN_2

    This value is deprecated and was never used nor reported by FreeType. Don't use or test for it.

    FT_ENCODING_MS_SJIS +
    FT_ENCODING_MS_SJIS

    Same as FT_ENCODING_SJIS. Deprecated.

    FT_ENCODING_MS_GB2312 +
    FT_ENCODING_MS_GB2312

    Same as FT_ENCODING_GB2312. Deprecated.

    FT_ENCODING_MS_BIG5 +
    FT_ENCODING_MS_BIG5

    Same as FT_ENCODING_BIG5. Deprecated.

    FT_ENCODING_MS_WANSUNG +
    FT_ENCODING_MS_WANSUNG

    Same as FT_ENCODING_WANSUNG. Deprecated.

    FT_ENCODING_MS_JOHAB +
    FT_ENCODING_MS_JOHAB

    Same as FT_ENCODING_JOHAB. Deprecated.

    -
    -
    note
    + +

    note

    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.

    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 FT_Get_BDF_Charset_ID to find out which encoding is really present. If, for example, the ‘cs_registry’ field is ‘KOI8’ and the ‘cs_encoding’ field is ‘R’, the font is encoded in KOI8-R.

    FT_ENCODING_NONE is always set (with a single exception) by the winfonts driver. Use FT_Get_WinFNT_Header and examine the ‘charset’ field of the FT_WinFNT_HeaderRec structure to find out which encoding is really present. For example, FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for Russian).

    @@ -327,195 +382,14 @@ Defined in FT_FREETYPE_H (freetype.h).

    If ‘platform_id’ is TT_PLATFORM_MACINTOSH, use the function 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

    to get an idea how to do that. Basically, if the language ID is 0, don't use it, otherwise subtract 1 from the language ID. Then examine ‘encoding_id’. If, for example, ‘encoding_id’ is TT_MAC_ID_ROMAN and the language ID (minus 1) is ‘TT_MAC_LANGID_GREEK’, it is the Greek encoding, not Roman. TT_MAC_ID_ARABIC with ‘TT_MAC_LANGID_FARSI’ means the Farsi variant the Arabic encoding.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Glyph_Metrics

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct  FT_Glyph_Metrics_
    -  {
    -    FT_Pos  width;
    -    FT_Pos  height;
    -
    -    FT_Pos  horiBearingX;
    -    FT_Pos  horiBearingY;
    -    FT_Pos  horiAdvance;
    -
    -    FT_Pos  vertBearingX;
    -    FT_Pos  vertBearingY;
    -    FT_Pos  vertAdvance;
    -
    -  } FT_Glyph_Metrics;
    -
    -

    -
    -

    A structure used to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag FT_LOAD_NO_SCALE has been used while loading the glyph, values are expressed in font units instead.

    -

    -
    fields
    -

    - - - - - - - - - -
    width -

    The glyph's width.

    -
    height -

    The glyph's height.

    -
    horiBearingX -

    Left side bearing for horizontal layout.

    -
    horiBearingY -

    Top side bearing for horizontal layout.

    -
    horiAdvance -

    Advance width for horizontal layout.

    -
    vertBearingX -

    Left side bearing for vertical layout.

    -
    vertBearingY -

    Top side bearing for vertical layout. Larger positive values mean further below the vertical glyph origin.

    -
    vertAdvance -

    Advance height for vertical layout. Positive values mean the glyph has a positive advance downward.

    -
    -
    -
    note
    -

    If not disabled with FT_LOAD_NO_HINTING, the values represent dimensions of the hinted glyph (in case hinting is applicable).

    -

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Bitmap_Size

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct  FT_Bitmap_Size_
    -  {
    -    FT_Short  height;
    -    FT_Short  width;
    -
    -    FT_Pos    size;
    -
    -    FT_Pos    x_ppem;
    -    FT_Pos    y_ppem;
    -
    -  } FT_Bitmap_Size;
    -
    -

    -
    -

    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 ‘available_sizes’ field of FT_Face.

    -

    -
    fields
    -

    - - - - - - -
    height -

    The vertical distance, in pixels, between two consecutive baselines. It is always positive.

    -
    width -

    The average width, in pixels, of all glyphs in the strike.

    -
    size -

    The nominal size of the strike in 26.6 fractional points. This field is not very useful.

    -
    x_ppem -

    The horizontal ppem (nominal width) in 26.6 fractional pixels.

    -
    y_ppem -

    The vertical ppem (nominal height) in 26.6 fractional pixels.

    -
    -
    -
    note
    -

    Windows FNT: The nominal size given in a FNT font is not reliable. Thus when the driver finds it incorrect, it sets ‘size’ to some calculated values and sets ‘x_ppem’ and ‘y_ppem’ to the pixel width and height given in the font, respectively.

    -

    TrueType embedded bitmaps: ‘size’, ‘width’, and ‘height’ values are not contained in the bitmap strike itself. They are computed from the global font parameters.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Module

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct FT_ModuleRec_*  FT_Module;
    -
    -

    -
    -

    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.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Driver

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct FT_DriverRec_*  FT_Driver;
    -
    -

    -
    -

    A handle to a given FreeType font driver object. Each font driver is a special module capable of creating faces from font files.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Renderer

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct FT_RendererRec_*  FT_Renderer;
    -
    -

    -
    -

    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.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_ENC_TAG

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_ENC_TAG

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
     #ifndef FT_ENC_TAG
     #define FT_ENC_TAG( value, a, b, c, d )         \
               value = ( ( (FT_UInt32)(a) << 24 ) |  \
    @@ -524,127 +398,24 @@ Defined in FT_FREETYPE_H (freetype.h).
                           (FT_UInt32)(d)         )
     
     #endif /* FT_ENC_TAG */
    +
    -

    -

    This macro converts four-letter tags into an unsigned long. It is used to define ‘encoding’ identifiers (see FT_Encoding).

    -

    -
    note
    + +

    note

    Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this:

       #define FT_ENC_TAG( value, a, b, c, d )  value                   
     

    to get a simple enumeration without assigning special numbers.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    ft_encoding_xxx

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define ft_encoding_none            FT_ENCODING_NONE
    -#define ft_encoding_unicode         FT_ENCODING_UNICODE
    -#define ft_encoding_symbol          FT_ENCODING_MS_SYMBOL
    -#define ft_encoding_latin_1         FT_ENCODING_ADOBE_LATIN_1
    -#define ft_encoding_latin_2         FT_ENCODING_OLD_LATIN_2
    -#define ft_encoding_sjis            FT_ENCODING_SJIS
    -#define ft_encoding_gb2312          FT_ENCODING_GB2312
    -#define ft_encoding_big5            FT_ENCODING_BIG5
    -#define ft_encoding_wansung         FT_ENCODING_WANSUNG
    -#define ft_encoding_johab           FT_ENCODING_JOHAB
    -
    -#define ft_encoding_adobe_standard  FT_ENCODING_ADOBE_STANDARD
    -#define ft_encoding_adobe_expert    FT_ENCODING_ADOBE_EXPERT
    -#define ft_encoding_adobe_custom    FT_ENCODING_ADOBE_CUSTOM
    -#define ft_encoding_apple_roman     FT_ENCODING_APPLE_ROMAN
    -
    -

    -
    -

    These constants are deprecated; use the corresponding FT_Encoding values instead.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_CharMapRec

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct  FT_CharMapRec_
    -  {
    -    FT_Face      face;
    -    FT_Encoding  encoding;
    -    FT_UShort    platform_id;
    -    FT_UShort    encoding_id;
    -
    -  } FT_CharMapRec;
    -
    -

    -
    -

    The base charmap structure.

    -

    -
    fields
    -

    - - - - - -
    face -

    A handle to the parent face object.

    -
    encoding -

    An FT_Encoding tag identifying the charmap. Use this with FT_Select_Charmap.

    -
    platform_id -

    An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and should be emulated for other formats.

    -
    encoding_id -

    A platform specific encoding number. This also comes from the TrueType specification and should be emulated similarly.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Face_Internal

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct FT_Face_InternalRec_*  FT_Face_Internal;
    -
    -

    -
    -

    An opaque handle to an ‘FT_Face_InternalRec’ structure, used to model private data of a given FT_Face object.

    -

    This structure might change between releases of FreeType 2 and is not generally available to client applications.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_FaceRec

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_FaceRec

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct  FT_FaceRec_
       {
         FT_Long           num_faces;
    @@ -688,7 +459,7 @@ Defined in FT_FREETYPE_H (freetype.h).
     
         /*@private begin */
     
    -    FT_Driver         driver;
    +    FT_Driver         driver;
         FT_Memory         memory;
         FT_Stream         stream;
     
    @@ -702,517 +473,292 @@ Defined in FT_FREETYPE_H (freetype.h).
         /*@private end */
     
       } FT_FaceRec;
    +
    -

    -

    FreeType root face class structure. A face object models a typeface in a font file.

    -

    -
    fields
    -

    - -
    num_faces + +

    fields

    + + - - - - - - - - - - - - - - - - - - - - - - -
    num_faces

    The number of faces in the font file. Some font formats can have multiple faces in a font file.

    face_index +
    face_index

    The index of the face in the font file. It is set to 0 if there is only one face in the font file.

    face_flags +
    face_flags

    A set of bit flags that give important information about the face; see FT_FACE_FLAG_XXX for the details.

    style_flags +
    style_flags

    A set of bit flags indicating the style of the face; see FT_STYLE_FLAG_XXX for the details.

    num_glyphs +
    num_glyphs

    The number of glyphs in the face. If the face is scalable and has sbits (see ‘num_fixed_sizes’), it is set to the number of outline glyphs.

    For CID-keyed fonts, this value gives the highest CID used in the font.

    family_name +
    family_name

    The face's family name. This is an ASCII 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 fonts. Some formats (TrueType & 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).

    style_name +
    style_name

    The face's style name. This is an ASCII 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 is optional, and can be set to NULL. As for ‘family_name’, some formats provide localized and Unicode versions of this string. Applications should use the format specific interface to access them.

    num_fixed_sizes +
    num_fixed_sizes

    The number of bitmap strikes in the face. Even if the face is scalable, there might still be bitmap strikes, which are called ‘sbits’ in that case.

    available_sizes +
    available_sizes

    An array of FT_Bitmap_Size for all bitmap strikes in the face. It is set to NULL if there is no bitmap strike.

    num_charmaps +
    num_charmaps

    The number of charmaps in the face.

    charmaps +
    charmaps

    An array of the charmaps of the face.

    generic +
    generic

    A field reserved for client uses. See the FT_Generic type description.

    bbox +
    bbox

    The font bounding box. Coordinates are 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 ‘maximum ascender’, and ‘bbox.yMin’ as the ‘minimum descender’. Only relevant for scalable formats.

    Note that the bounding box might be off by (at least) one pixel for hinted fonts. See FT_Size_Metrics for further discussion.

    units_per_EM +
    units_per_EM

    The number of font units per EM square for this face. This is typically 2048 for TrueType fonts, and 1000 for Type 1 fonts. Only relevant for scalable formats.

    ascender +
    ascender

    The typographic ascender of the face, expressed in font units. For font formats not having this information, it is set to ‘bbox.yMax’. Only relevant for scalable formats.

    descender +
    descender

    The typographic descender of the face, expressed in font units. For font formats not having this information, it is set to ‘bbox.yMin’. Note that this field is usually negative. Only relevant for scalable formats.

    height +
    height

    This value is the vertical distance between two consecutive baselines, expressed in font units. It is always positive. Only relevant for scalable formats.

    If you want the global glyph height, use ‘ascender - descender’.

    max_advance_width +
    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 +
    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 vertical metrics. Only relevant for scalable formats.

    underline_position +
    underline_position

    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.

    underline_thickness +
    underline_thickness

    The thickness, in font units, of the underline for this face. Only relevant for scalable formats.

    glyph +
    glyph

    The face's associated glyph slot(s).

    size +
    size

    The current active size for this face.

    charmap +
    charmap

    The current active charmap for this face.

    -
    -
    note
    + +

    note

    Fields may be changed after a call to FT_Attach_File or FT_Attach_Stream.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_FACE_FLAG_XXX

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )
    -#define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )
    -#define FT_FACE_FLAG_FIXED_WIDTH       ( 1L <<  2 )
    -#define FT_FACE_FLAG_SFNT              ( 1L <<  3 )
    -#define FT_FACE_FLAG_HORIZONTAL        ( 1L <<  4 )
    -#define FT_FACE_FLAG_VERTICAL          ( 1L <<  5 )
    -#define FT_FACE_FLAG_KERNING           ( 1L <<  6 )
    -#define FT_FACE_FLAG_FAST_GLYPHS       ( 1L <<  7 )
    -#define FT_FACE_FLAG_MULTIPLE_MASTERS  ( 1L <<  8 )
    -#define FT_FACE_FLAG_GLYPH_NAMES       ( 1L <<  9 )
    -#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )
    -#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 )
    -
    -

    -
    -

    A list of bit flags used in the ‘face_flags’ field of the FT_FaceRec structure. They inform client applications of properties of the corresponding face.

    -

    -
    values
    -

    - - - - - - - - - - - - - - - - - - - - - - - -
    FT_FACE_FLAG_SCALABLE -

    Indicates that the face contains outline glyphs. This doesn't prevent bitmap strikes, i.e., a face can have both this and and FT_FACE_FLAG_FIXED_SIZES set.

    -
    FT_FACE_FLAG_FIXED_SIZES
    -

    Indicates that the face contains bitmap strikes. See also the ‘num_fixed_sizes’ and ‘available_sizes’ fields of FT_FaceRec.

    -
    FT_FACE_FLAG_FIXED_WIDTH
    -

    Indicates that the face contains fixed-width characters (like Courier, Lucido, MonoType, etc.).

    -
    FT_FACE_FLAG_SFNT -

    Indicates that the face uses the ‘sfnt’ storage scheme. For now, this means TrueType and OpenType.

    -
    FT_FACE_FLAG_HORIZONTAL
    -

    Indicates that the face contains horizontal glyph metrics. This should be set for all common formats.

    -
    FT_FACE_FLAG_VERTICAL -

    Indicates that the face contains vertical glyph metrics. This is only available in some formats, not all of them.

    -
    FT_FACE_FLAG_KERNING -

    Indicates that the face contains kerning information. If set, the kerning distance can be retrieved through the function FT_Get_Kerning. Otherwise the function always return the vector (0,0). Note that FreeType doesn't handle kerning data from the ‘GPOS’ table (as present in some OpenType fonts).

    -
    FT_FACE_FLAG_FAST_GLYPHS
    -

    THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.

    -
    FT_FACE_FLAG_MULTIPLE_MASTERS
    -

    Indicates that the font contains multiple masters and is capable of interpolating between them. See the multiple-masters specific API for details.

    -
    FT_FACE_FLAG_GLYPH_NAMES
    -

    Indicates that the font contains glyph names that can be retrieved through FT_Get_Glyph_Name. Note that some TrueType fonts contain broken glyph name tables. Use the function FT_Has_PS_Glyph_Names when needed.

    -
    FT_FACE_FLAG_EXTERNAL_STREAM
    -

    Used internally by FreeType to indicate that a face's stream was provided by the client application and should not be destroyed when FT_Done_Face is called. Don't read or test this flag.

    -
    FT_FACE_FLAG_HINTER -

    Set if the font driver has a hinting machine of its own. For example, with TrueType fonts, it makes sense to use data from the SFNT ‘gasp’ table only if the native TrueType hinting engine (with the bytecode interpreter) is available and active.

    -
    FT_FACE_FLAG_CID_KEYED -

    Set if the font is CID-keyed. In that case, the font is not accessed by glyph indices but by CID values. For subsetted CID-keyed fonts this has the consequence that not all index values are a valid argument to FT_Load_Glyph. Only the CID values for which corresponding glyphs in the subsetted font exist make FT_Load_Glyph return successfully; in all other cases you get an ‘FT_Err_Invalid_Argument’ error.

    -

    Note that CID-keyed fonts that are in an SFNT wrapper don't have this flag set since the glyphs are accessed in the normal way (using contiguous indices); the ‘CID-ness’ isn't visible to the application.

    -
    FT_FACE_FLAG_TRICKY -

    Set if the font is ‘tricky’, this is, it always needs the font format's native hinting engine to get a reasonable result. A typical example is the Chinese font ‘mingli.ttf’ that uses TrueType bytecode instructions to move and scale all of its subglyphs.

    -

    It is not possible to autohint such fonts using FT_LOAD_FORCE_AUTOHINT; it will also ignore FT_LOAD_NO_HINTING. You have to set both FT_LOAD_NO_HINTING and FT_LOAD_NO_AUTOHINT to really disable hinting; however, you probably never want this except for demonstration purposes.

    -

    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.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_HAS_HORIZONTAL

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_HAS_HORIZONTAL

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
     #define FT_HAS_HORIZONTAL( face ) \
    -          ( face->face_flags & FT_FACE_FLAG_HORIZONTAL )
    +          ( face->face_flags & FT_FACE_FLAG_HORIZONTAL )
    +
    -

    -

    A macro that returns true whenever a face object contains horizontal metrics (this is true for all font formats though).

    -

    -
    also
    + +

    also

    FT_HAS_VERTICAL can be used to check for vertical metrics.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_HAS_VERTICAL

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_HAS_VERTICAL

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
     #define FT_HAS_VERTICAL( face ) \
    -          ( face->face_flags & FT_FACE_FLAG_VERTICAL )
    +          ( face->face_flags & FT_FACE_FLAG_VERTICAL )
    +
    -

    -

    A macro that returns true whenever a face object contains real vertical metrics (and not only synthesized ones).

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_HAS_KERNING

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_HAS_KERNING

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
     #define FT_HAS_KERNING( face ) \
    -          ( face->face_flags & FT_FACE_FLAG_KERNING )
    +          ( face->face_flags & FT_FACE_FLAG_KERNING )
    +
    -

    -

    A macro that returns true whenever a face object contains kerning data that can be accessed with FT_Get_Kerning.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_IS_SCALABLE

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + -#define FT_IS_SCALABLE( face ) \ - ( face->face_flags & FT_FACE_FLAG_SCALABLE ) +
    +

    FT_HAS_FIXED_SIZES

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_HAS_FIXED_SIZES( face ) \
    +          ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
    +
    -

    -
    -

    A macro that returns true whenever a face object contains a scalable font face (true for TrueType, Type 1, Type 42, CID, OpenType/CFF, and PFR font formats.

    -

    -
    -
    - - -
    [Index][TOC]
    +

    A macro that returns true whenever a face object contains some embedded bitmaps. See the ‘available_sizes’ field of the FT_FaceRec structure.

    -
    -

    FT_IS_SFNT

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_HAS_GLYPH_NAMES

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_HAS_GLYPH_NAMES( face ) \
    +          ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
    +
    + +

    A macro that returns true whenever a face object contains some glyph names that can be accessed through FT_Get_Glyph_Name.

    + +
    +
    + +
    +

    FT_HAS_MULTIPLE_MASTERS

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_HAS_MULTIPLE_MASTERS( face ) \
    +          ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
    +
    + +

    A macro that returns true whenever a face object contains some multiple masters. The functions provided by FT_MULTIPLE_MASTERS_H are then available to choose the exact design you want.

    + +
    +
    + +
    +

    FT_HAS_COLOR

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_HAS_COLOR( face ) \
    +          ( face->face_flags & FT_FACE_FLAG_COLOR )
    +
    + +

    A macro that returns true whenever a face object contains tables for color glyphs.

    + +
    +
    + +
    +

    FT_IS_SFNT

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
     #define FT_IS_SFNT( face ) \
    -          ( face->face_flags & FT_FACE_FLAG_SFNT )
    +          ( face->face_flags & FT_FACE_FLAG_SFNT )
    +
    -

    -

    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.

    If this macro is true, all functions defined in FT_SFNT_NAMES_H and FT_TRUETYPE_TABLES_H are available.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_IS_FIXED_WIDTH

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_IS_SCALABLE

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_IS_SCALABLE( face ) \
    +          ( face->face_flags & FT_FACE_FLAG_SCALABLE )
    +
    + +

    A macro that returns true whenever a face object contains a scalable font face (true for TrueType, Type 1, Type 42, CID, OpenType/CFF, and PFR font formats.

    + +
    +
    + +
    +

    FT_IS_FIXED_WIDTH

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
     #define FT_IS_FIXED_WIDTH( face ) \
    -          ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
    +          ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
    +
    -

    -

    A macro that returns true whenever a face object contains a font face that contains fixed-width (or ‘monospace’, ‘fixed-pitch’, etc.) glyphs.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_HAS_FIXED_SIZES

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define FT_HAS_FIXED_SIZES( face ) \
    -          ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
    -
    -

    -
    -

    A macro that returns true whenever a face object contains some embedded bitmaps. See the ‘available_sizes’ field of the FT_FaceRec structure.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_HAS_FAST_GLYPHS

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define FT_HAS_FAST_GLYPHS( face )  0
    -
    -

    -
    -

    Deprecated.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_HAS_GLYPH_NAMES

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define FT_HAS_GLYPH_NAMES( face ) \
    -          ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
    -
    -

    -
    -

    A macro that returns true whenever a face object contains some glyph names that can be accessed through FT_Get_Glyph_Name.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_HAS_MULTIPLE_MASTERS

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define FT_HAS_MULTIPLE_MASTERS( face ) \
    -          ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
    -
    -

    -
    -

    A macro that returns true whenever a face object contains some multiple masters. The functions provided by FT_MULTIPLE_MASTERS_H are then available to choose the exact design you want.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_IS_CID_KEYED

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_IS_CID_KEYED

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
     #define FT_IS_CID_KEYED( face ) \
    -          ( face->face_flags & FT_FACE_FLAG_CID_KEYED )
    +          ( face->face_flags & FT_FACE_FLAG_CID_KEYED )
    +
    -

    -

    A macro that returns true whenever a face object contains a CID-keyed font. See the discussion of FT_FACE_FLAG_CID_KEYED for more details.

    If this macro is true, all functions defined in FT_CID_H are available.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_IS_TRICKY

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_IS_TRICKY

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
     #define FT_IS_TRICKY( face ) \
    -          ( face->face_flags & FT_FACE_FLAG_TRICKY )
    +          ( face->face_flags & FT_FACE_FLAG_TRICKY )
    +
    -

    -

    A macro that returns true whenever a face represents a ‘tricky’ font. See the discussion of FT_FACE_FLAG_TRICKY for more details.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_HAS_COLOR

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + -#define FT_HAS_COLOR( face ) \ - ( face->face_flags & FT_FACE_FLAG_COLOR ) +
    +

    FT_SizeRec

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct  FT_SizeRec_
    +  {
    +    FT_Face           face;      /* parent face object              */
    +    FT_Generic        generic;   /* generic pointer for client uses */
    +    FT_Size_Metrics   metrics;   /* size metrics                    */
    +    FT_Size_Internal  internal;
     
    -

    -
    -

    A macro that returns true whenever a face object contains tables for color glyphs.

    -

    -
    -
    - - -
    [Index][TOC]
    + } FT_SizeRec; + -
    -

    FT_STYLE_FLAG_XXX

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +

    FreeType root size class structure. A size object models a face object at a given size.

    -#define FT_STYLE_FLAG_ITALIC ( 1 << 0 ) -#define FT_STYLE_FLAG_BOLD ( 1 << 1 ) - -

    -
    -

    A list of bit-flags used to indicate the style of a given face. These are used in the ‘style_flags’ field of FT_FaceRec.

    -

    -
    values
    -

    - -
    FT_STYLE_FLAG_ITALIC -

    Indicates that a given face style is italic or oblique.

    +

    fields

    + + - +
    face +

    Handle to the parent face object.

    FT_STYLE_FLAG_BOLD -

    Indicates that a given face is bold.

    +
    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.

    -
    -
    note
    -

    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 ‘OS/2’ table in SFNT based fonts).

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Size_Internal

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct FT_Size_InternalRec_*  FT_Size_Internal;
    -
    -

    -
    -

    An opaque handle to an ‘FT_Size_InternalRec’ structure, used to model private data of a given FT_Size object.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Size_Metrics

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Size_Metrics

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct  FT_Size_Metrics_
       {
         FT_UShort  x_ppem;      /* horizontal pixels per EM               */
    @@ -1227,141 +773,51 @@ Defined in FT_FREETYPE_H (freetype.h).
         FT_Pos     max_advance; /* max horizontal advance, in 26.6 pixels */
     
       } FT_Size_Metrics;
    +
    -

    -

    The size metrics structure gives the metrics of a size object.

    -

    -
    fields
    -

    - -
    x_ppem + +

    fields

    + + - - - - - - -
    x_ppem

    The width of the scaled EM square in pixels, hence the term ‘ppem’ (pixels per EM). It is also referred to as ‘nominal width’.

    y_ppem +
    y_ppem

    The height of the scaled EM square in pixels, hence the term ‘ppem’ (pixels per EM). It is also referred to as ‘nominal height’.

    x_scale +
    x_scale

    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.

    y_scale +
    y_scale

    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.

    ascender +
    ascender

    The ascender in 26.6 fractional pixels. See FT_FaceRec for the details.

    descender +
    descender

    The descender in 26.6 fractional pixels. See FT_FaceRec for the details.

    height +
    height

    The height in 26.6 fractional pixels. See FT_FaceRec for the details.

    max_advance +
    max_advance

    The maximum advance width in 26.6 fractional pixels. See FT_FaceRec for the details.

    -
    -
    note
    + +

    note

    The scaling values, if relevant, are determined first during a size changing operation. The remaining fields are then set by the driver. For scalable formats, they are usually set to scaled values of the corresponding fields in FT_FaceRec.

    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!

    Indeed, the only way to get the exact metrics is to render all glyphs. As this would be a definite performance hit, it is up to client applications to perform such computations.

    The FT_Size_Metrics structure is valid for bitmap fonts also.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_SizeRec

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct  FT_SizeRec_
    -  {
    -    FT_Face           face;      /* parent face object              */
    -    FT_Generic        generic;   /* generic pointer for client uses */
    -    FT_Size_Metrics   metrics;   /* size metrics                    */
    -    FT_Size_Internal  internal;
    -
    -  } FT_SizeRec;
    -
    -

    -
    -

    FreeType root size class structure. A size object models a face object at a given size.

    -

    -
    fields
    -

    - - - - -
    face -

    Handle to the parent face 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 size object.

    -
    metrics -

    Metrics for this size object. This field is read-only.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_SubGlyph

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct FT_SubGlyphRec_*  FT_SubGlyph;
    -
    -

    -
    -

    The subglyph structure is an internal object used to describe subglyphs (for example, in the case of composites).

    -

    -
    note
    -

    The subglyph implementation is not part of the high-level API, hence the forward structure declaration.

    -

    You can however retrieve subglyph information with FT_Get_SubGlyph_Info.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Slot_Internal

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct FT_Slot_InternalRec_*  FT_Slot_Internal;
    -
    -

    -
    -

    An opaque handle to an ‘FT_Slot_InternalRec’ structure, used to model private data of a given FT_GlyphSlot object.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_GlyphSlotRec

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_GlyphSlotRec

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct  FT_GlyphSlotRec_
       {
         FT_Library        library;
    @@ -1397,84 +853,82 @@ Defined in FT_FREETYPE_H (freetype.h).
         FT_Slot_Internal  internal;
     
       } FT_GlyphSlotRec;
    +
    -

    -

    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.

    -

    -
    fields
    -

    - -
    library + +

    fields

    + + - - - - - - - - - - - - - - - - - - -
    library

    A handle to the FreeType library instance this slot belongs to.

    face +
    face

    A handle to the parent face object.

    next +
    next

    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 ‘next’ field.

    generic +
    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 +
    metrics

    The metrics of the last loaded glyph in the slot. The returned values depend on the last load flags (see the FT_Load_Glyph API function) and can be expressed either in 26.6 fractional pixels or font units.

    Note that even when the glyph image is transformed, the metrics are not.

    linearHoriAdvance +
    linearHoriAdvance

    The advance width of the unhinted glyph. Its value is expressed in 16.16 fractional pixels, unless FT_LOAD_LINEAR_DESIGN is set when loading the glyph. This field can be important to perform correct WYSIWYG layout. Only relevant for outline glyphs.

    linearVertAdvance +
    linearVertAdvance

    The advance height of the unhinted glyph. Its value is expressed in 16.16 fractional pixels, unless FT_LOAD_LINEAR_DESIGN is set when loading the glyph. This field can be important to perform correct WYSIWYG layout. Only relevant for outline glyphs.

    advance +
    advance

    This shorthand is, depending on FT_LOAD_IGNORE_TRANSFORM, the transformed (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.

    format +
    format

    This field indicates the format of the image contained in the glyph slot. Typically FT_GLYPH_FORMAT_BITMAP, FT_GLYPH_FORMAT_OUTLINE, or FT_GLYPH_FORMAT_COMPOSITE, but others are possible.

    bitmap +
    bitmap

    This field is used as a bitmap descriptor when the slot format is FT_GLYPH_FORMAT_BITMAP. Note that the address and content of the bitmap buffer can 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 positive.

    +
    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 +
    outline

    The outline descriptor for the current glyph image if its format is FT_GLYPH_FORMAT_OUTLINE. Once a glyph is loaded, ‘outline’ can be transformed, distorted, embolded, etc. However, it must not be freed.

    num_subglyphs -

    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 FT_LOAD_NO_RECURSE flag. For now this is internal to FreeType.

    +
    num_subglyphs +

    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 FT_LOAD_NO_RECURSE flag.

    subglyphs +
    subglyphs

    An array of subglyph descriptors for composite glyphs. There are ‘num_subglyphs’ elements in there. Currently internal to FreeType.

    control_data +
    control_data

    Certain font drivers can also return the control data for a given glyph image (e.g. TrueType bytecode, Type 1 charstrings, etc.). This field is a pointer to such data.

    control_len +
    control_len

    This is the length in bytes of the control data.

    other +
    other

    Really wicked formats can use this pointer to present their own glyph image to client applications. Note that the application needs to know about the image format.

    lsb_delta +
    lsb_delta

    The difference between hinted and unhinted left side bearing while autohinting is active. Zero otherwise.

    rsb_delta +
    rsb_delta

    The difference between hinted and unhinted right side bearing while autohinting is active. Zero otherwise.

    -
    -
    note
    + +

    note

    If FT_Load_Glyph is called with default flags (see FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in its native format (e.g., an outline glyph for TrueType and Type 1 formats).

    This image can later be converted into a bitmap by calling FT_Render_Glyph. This function finds the current renderer for the native image's format, then invokes it.

    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 ‘slot->bitmap’.

    Note that ‘slot->bitmap_left’ and ‘slot->bitmap_top’ 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, ‘slot->format’ is also changed to FT_GLYPH_FORMAT_BITMAP.

    -
    -
    note
    + +

    note

    Here a small pseudo code fragment that shows how to use ‘lsb_delta’ and ‘rsb_delta’:

       FT_Pos  origin_x       = 0;                                      
    @@ -1499,192 +953,382 @@ Defined in FT_FREETYPE_H (freetype.h).
         origin_x += face->glyph->advance.x;                            
       endfor                                                           
     
    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Init_FreeType

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Glyph_Metrics

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct  FT_Glyph_Metrics_
    +  {
    +    FT_Pos  width;
    +    FT_Pos  height;
    +
    +    FT_Pos  horiBearingX;
    +    FT_Pos  horiBearingY;
    +    FT_Pos  horiAdvance;
    +
    +    FT_Pos  vertBearingX;
    +    FT_Pos  vertBearingY;
    +    FT_Pos  vertAdvance;
    +
    +  } FT_Glyph_Metrics;
    +
    + +

    A structure used to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag FT_LOAD_NO_SCALE has been used while loading the glyph, values are expressed in font units instead.

    + +

    fields

    + + + + + + + + + +
    width +

    The glyph's width.

    +
    height +

    The glyph's height.

    +
    horiBearingX +

    Left side bearing for horizontal layout.

    +
    horiBearingY +

    Top side bearing for horizontal layout.

    +
    horiAdvance +

    Advance width for horizontal layout.

    +
    vertBearingX +

    Left side bearing for vertical layout.

    +
    vertBearingY +

    Top side bearing for vertical layout. Larger positive values mean further below the vertical glyph origin.

    +
    vertAdvance +

    Advance height for vertical layout. Positive values mean the glyph has a positive advance downward.

    +
    + +

    note

    +

    If not disabled with FT_LOAD_NO_HINTING, the values represent dimensions of the hinted glyph (in case hinting is applicable).

    +

    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.

    + +
    +
    + +
    +

    FT_SubGlyph

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct FT_SubGlyphRec_*  FT_SubGlyph;
    +
    + +

    The subglyph structure is an internal object used to describe subglyphs (for example, in the case of composites).

    + +

    note

    +

    The subglyph implementation is not part of the high-level API, hence the forward structure declaration.

    +

    You can however retrieve subglyph information with FT_Get_SubGlyph_Info.

    + +
    +
    + +
    +

    FT_Bitmap_Size

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct  FT_Bitmap_Size_
    +  {
    +    FT_Short  height;
    +    FT_Short  width;
    +
    +    FT_Pos    size;
    +
    +    FT_Pos    x_ppem;
    +    FT_Pos    y_ppem;
    +
    +  } FT_Bitmap_Size;
    +
    + +

    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 ‘available_sizes’ field of FT_Face.

    + +

    fields

    + + + + + + +
    height +

    The vertical distance, in pixels, between two consecutive baselines. It is always positive.

    +
    width +

    The average width, in pixels, of all glyphs in the strike.

    +
    size +

    The nominal size of the strike in 26.6 fractional points. This field is not very useful.

    +
    x_ppem +

    The horizontal ppem (nominal width) in 26.6 fractional pixels.

    +
    y_ppem +

    The vertical ppem (nominal height) in 26.6 fractional pixels.

    +
    + +

    note

    +

    Windows FNT: The nominal size given in a FNT font is not reliable. Thus when the driver finds it incorrect, it sets ‘size’ to some calculated values and sets ‘x_ppem’ and ‘y_ppem’ to the pixel width and height given in the font, respectively.

    +

    TrueType embedded bitmaps: ‘size’, ‘width’, and ‘height’ values are not contained in the bitmap strike itself. They are computed from the global font parameters.

    + +
    +
    + +
    +

    FT_Init_FreeType

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Error )
       FT_Init_FreeType( FT_Library  *alibrary );
    +
    -

    -

    Initialize a new FreeType library object. The set of modules that are registered by this function is determined at build time.

    -

    -
    output
    -

    - -
    alibrary + +

    output

    + +
    alibrary

    A handle to a new library object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    In case you want to provide your own memory allocating routines, use FT_New_Library instead, followed by a call to FT_Add_Default_Modules (or a series of calls to FT_Add_Module).

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Done_FreeType

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Done_FreeType

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Error )
       FT_Done_FreeType( FT_Library  library );
    +
    -

    -

    Destroy a given FreeType library object and all of its children, including resources, drivers, faces, sizes, etc.

    -

    -
    input
    -

    - -
    library + +

    input

    + +
    library

    A handle to the target library object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_OPEN_XXX

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + -#define FT_OPEN_MEMORY 0x1 -#define FT_OPEN_STREAM 0x2 -#define FT_OPEN_PATHNAME 0x4 -#define FT_OPEN_DRIVER 0x8 -#define FT_OPEN_PARAMS 0x10 +
    +

    FT_New_Face

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_New_Face( FT_Library   library,
    +               const char*  filepathname,
    +               FT_Long      face_index,
    +               FT_Face     *aface );
    +
    -#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 */ +

    This function calls FT_Open_Face to open a font by its pathname.

    -

    -
    -

    A list of bit-field constants used within the ‘flags’ field of the FT_Open_Args structure.

    -

    -
    values
    -

    - - - - - - - - - - -
    FT_OPEN_MEMORY -

    This is a memory-based stream.

    -
    FT_OPEN_STREAM -

    Copy the stream from the ‘stream’ field.

    -
    FT_OPEN_PATHNAME -

    Create a new input stream from a C path name.

    -
    FT_OPEN_DRIVER -

    Use the ‘driver’ field.

    -
    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.

    +

    inout

    + +
    library +

    A handle to the library resource.

    -
    -
    note
    -

    The ‘FT_OPEN_MEMORY’, ‘FT_OPEN_STREAM’, and ‘FT_OPEN_PATHNAME’ flags are mutually exclusive.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Parameter

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef struct  FT_Parameter_
    -  {
    -    FT_ULong    tag;
    -    FT_Pointer  data;
    -
    -  } FT_Parameter;
    -
    -

    -
    -

    A simple structure used to pass more or less generic parameters to FT_Open_Face.

    -

    -
    fields
    -

    - -
    tag -

    A four-byte identification tag.

    +

    input

    + + -
    pathname +

    A path to the font file.

    data -

    A pointer to the parameter data.

    +
    face_index +

    The index of the face within the font. The first face has index 0.

    -
    -
    note
    -

    The ID and function of parameters are driver-specific. See the various FT_PARAM_TAG_XXX flags for more information.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Open_Args

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +

    output

    + + +
    aface +

    A handle to a new face object. If ‘face_index’ is greater than or equal to zero, it must be non-NULL. See FT_Open_Face for more details.

    +
    +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    Use FT_Done_Face to destroy the created FT_Face object (along with its slot and sizes).

    + +
    + + +
    +

    FT_Done_Face

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Done_Face( FT_Face  face );
    +
    + +

    Discard a given face object, as well as all of its child slots and sizes.

    + +

    input

    + + +
    face +

    A handle to a target face object.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    See the discussion of reference counters in the description of FT_Reference_Face.

    + +
    +
    + +
    +

    FT_Reference_Face

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Reference_Face( FT_Face  face );
    +
    + +

    A counter gets initialized to 1 at the time an FT_Face structure is created. This function increments the counter. FT_Done_Face then only destroys a face if the counter is 1, otherwise it simply decrements the counter.

    +

    This function helps in managing life-cycles of structures that reference FT_Face objects.

    + +

    input

    + + +
    face +

    A handle to a target face object.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    since

    +

    2.4.2

    + +
    +
    + +
    +

    FT_New_Memory_Face

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_New_Memory_Face( FT_Library      library,
    +                      const FT_Byte*  file_base,
    +                      FT_Long         file_size,
    +                      FT_Long         face_index,
    +                      FT_Face        *aface );
    +
    + +

    This function calls FT_Open_Face to open a font that has been loaded into memory.

    + +

    inout

    + + +
    library +

    A handle to the library resource.

    +
    + +

    input

    + + + + +
    file_base +

    A pointer to the beginning of the font data.

    +
    file_size +

    The size of the memory chunk used by the font data.

    +
    face_index +

    The index of the face within the font. The first face has index 0.

    +
    + +

    output

    + + +
    aface +

    A handle to a new face object. If ‘face_index’ is greater than or equal to zero, it must be non-NULL. See FT_Open_Face for more details.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    You must not deallocate the memory before calling FT_Done_Face.

    + +
    +
    + +
    +

    FT_Open_Face

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Open_Face( FT_Library           library,
    +                const FT_Open_Args*  args,
    +                FT_Long              face_index,
    +                FT_Face             *aface );
    +
    + +

    Create a face object from a given resource described by FT_Open_Args.

    + +

    inout

    + + +
    library +

    A handle to the library resource.

    +
    + +

    input

    + + + +
    args +

    A pointer to an ‘FT_Open_Args’ structure that must be filled by the caller.

    +
    face_index +

    The index of the face within the font. The first face has index 0.

    +
    + +

    output

    + + +
    aface +

    A handle to a new face object. If ‘face_index’ is greater than or equal to zero, it must be non-NULL. See note below.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    Unlike FreeType 1.x, this function automatically creates a glyph slot for the face object that can be accessed directly through ‘face->glyph’.

    +

    FT_Open_Face can be used to quickly check whether the font format of a given font resource is supported by FreeType. If the ‘face_index’ field is negative, the function's return value is 0 if the font format is recognized, or non-zero otherwise; the function returns a more or less empty face handle in ‘*aface’ (if ‘aface’ isn't NULL). The only useful field in this special case is ‘face->num_faces’ that gives the number of faces within the font file. After examination, the returned FT_Face structure should be deallocated with a call to FT_Done_Face.

    +

    Each new face object created with this function also owns a default FT_Size object, accessible as ‘face->size’.

    +

    One FT_Library instance can have multiple face objects, this is, FT_Open_Face and its siblings can be called multiple times using the same ‘library’ argument.

    +

    See the discussion of reference counters in the description of FT_Reference_Face.

    + +
    +
    + +
    +

    FT_Open_Args

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct  FT_Open_Args_
       {
         FT_UInt         flags;
    @@ -1692,494 +1336,355 @@ Defined in FT_FREETYPE_H (freetype.h).
         FT_Long         memory_size;
         FT_String*      pathname;
         FT_Stream       stream;
    -    FT_Module       driver;
    +    FT_Module       driver;
         FT_Int          num_params;
         FT_Parameter*   params;
     
       } FT_Open_Args;
    +
    -

    -

    A structure used to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions FT_Open_Face and FT_Attach_Stream.

    -

    -
    fields
    -

    - -
    flags + +

    fields

    + + - - - - - - -
    flags

    A set of bit flags indicating how to use the structure.

    memory_base +
    memory_base

    The first byte of the file in memory.

    memory_size +
    memory_size

    The size in bytes of the file in memory.

    pathname +
    pathname

    A pointer to an 8-bit file pathname.

    stream +
    stream

    A handle to a source stream object.

    driver +
    driver

    This field is exclusively used by FT_Open_Face; it simply specifies the font driver to use to open the face. If set to 0, FreeType tries to load the face with each one of the drivers in its list.

    num_params +
    num_params

    The number of extra parameters.

    params +
    params

    Extra parameters passed to the font driver when opening a new face.

    -
    -
    note
    + +

    note

    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 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 custom input stream ‘stream’ is used.

    -

    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 open the file with the driver whose handler is in ‘driver’.

    -

    If the ‘FT_OPEN_PARAMS’ bit is set, the parameters given by ‘num_params’ and ‘params’ is used. They are ignored otherwise.

    +

    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 custom input stream ‘stream’ is used.

    +

    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 open the file with the driver whose handler is in ‘driver’.

    +

    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 as ‘const’; this is missing for API backwards compatibility. In other words, applications should treat them as read-only.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_New_Face

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + - FT_EXPORT( FT_Error ) - FT_New_Face( FT_Library library, - const char* filepathname, - FT_Long face_index, - FT_Face *aface ); +
    +

    FT_Parameter

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct  FT_Parameter_
    +  {
    +    FT_ULong    tag;
    +    FT_Pointer  data;
     
    -

    -
    -

    This function calls FT_Open_Face to open a font by its pathname.

    -

    -
    inout
    -

    - -
    library -

    A handle to the library resource.

    + } FT_Parameter; + + +

    A simple structure used to pass more or less generic parameters to FT_Open_Face.

    + +

    fields

    + + +
    tag +

    A four-byte identification tag.

    +
    data +

    A pointer to the parameter data.

    -
    -
    input
    -

    - - - -
    pathname -

    A path to the font file.

    -
    face_index -

    The index of the face within the font. The first face has index 0.

    -
    -
    -
    output
    -

    - - -
    aface -

    A handle to a new face object. If ‘face_index’ is greater than or equal to zero, it must be non-NULL. See FT_Open_Face for more details.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    Use FT_Done_Face to destroy the created FT_Face object (along with its slot and sizes).

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_New_Memory_Face

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +

    note

    +

    The ID and function of parameters are driver-specific. See the various FT_PARAM_TAG_XXX flags for more information.

    - FT_EXPORT( FT_Error ) - FT_New_Memory_Face( FT_Library library, - const FT_Byte* file_base, - FT_Long file_size, - FT_Long face_index, - FT_Face *aface ); - -

    -
    -

    This function calls FT_Open_Face to open a font that has been loaded into memory.

    -

    -
    inout
    -

    - - -
    library -

    A handle to the library resource.

    -
    -
    -
    input
    -

    - - - - -
    file_base -

    A pointer to the beginning of the font data.

    -
    file_size -

    The size of the memory chunk used by the font data.

    -
    face_index -

    The index of the face within the font. The first face has index 0.

    -
    -
    -
    output
    -

    - - -
    aface -

    A handle to a new face object. If ‘face_index’ is greater than or equal to zero, it must be non-NULL. See FT_Open_Face for more details.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    You must not deallocate the memory before calling FT_Done_Face.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Open_Face

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Open_Face( FT_Library           library,
    -                const FT_Open_Args*  args,
    -                FT_Long              face_index,
    -                FT_Face             *aface );
    -
    -

    -
    -

    Create a face object from a given resource described by FT_Open_Args.

    -

    -
    inout
    -

    - - -
    library -

    A handle to the library resource.

    -
    -
    -
    input
    -

    - - - -
    args -

    A pointer to an ‘FT_Open_Args’ structure that must be filled by the caller.

    -
    face_index -

    The index of the face within the font. The first face has index 0.

    -
    -
    -
    output
    -

    - - -
    aface -

    A handle to a new face object. If ‘face_index’ is greater than or equal to zero, it must be non-NULL. See note below.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    Unlike FreeType 1.x, this function automatically creates a glyph slot for the face object that can be accessed directly through ‘face->glyph’.

    -

    FT_Open_Face can be used to quickly check whether the font format of a given font resource is supported by FreeType. If the ‘face_index’ field is negative, the function's return value is 0 if the font format is recognized, or non-zero otherwise; the function returns a more or less empty face handle in ‘*aface’ (if ‘aface’ isn't NULL). The only useful field in this special case is ‘face->num_faces’ that gives the number of faces within the font file. After examination, the returned FT_Face structure should be deallocated with a call to FT_Done_Face.

    -

    Each new face object created with this function also owns a default FT_Size object, accessible as ‘face->size’.

    -

    One FT_Library instance can have multiple face objects, this is, FT_Open_Face and its siblings can be called multiple times using the same ‘library’ argument.

    -

    See the discussion of reference counters in the description of FT_Reference_Face.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Attach_File

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Attach_File

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Error )
       FT_Attach_File( FT_Face      face,
                       const char*  filepathname );
    +
    -

    -

    This function calls FT_Attach_Stream to attach a file.

    -

    -
    inout
    -

    - -
    face + +

    inout

    + +
    face

    The target face object.

    -
    -
    input
    -

    - -
    filepathname + +

    input

    + +
    filepathname

    The pathname.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Attach_Stream

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Attach_Stream

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Error )
       FT_Attach_Stream( FT_Face        face,
                         FT_Open_Args*  parameters );
    +
    -

    -

    ‘Attach’ 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 1 font to get the kerning values and other metrics.

    -

    -
    inout
    -

    - -
    face + +

    inout

    + +
    face

    The target face object.

    -
    -
    input
    -

    - -
    parameters + +

    input

    + +
    parameters

    A pointer to FT_Open_Args that must be filled by the caller.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The meaning of the ‘attach’ (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).

    Client applications are expected to know what they are doing when invoking this function. Most drivers simply do not implement file attachments.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Reference_Face

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Set_Char_Size

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Error )
    -  FT_Reference_Face( FT_Face  face );
    +  FT_Set_Char_Size( FT_Face     face,
    +                    FT_F26Dot6  char_width,
    +                    FT_F26Dot6  char_height,
    +                    FT_UInt     horz_resolution,
    +                    FT_UInt     vert_resolution );
    +
    -

    -
    -

    A counter gets initialized to 1 at the time an FT_Face structure is created. This function increments the counter. FT_Done_Face then only destroys a face if the counter is 1, otherwise it simply decrements the counter.

    -

    This function helps in managing life-cycles of structures that reference FT_Face objects.

    -

    -
    input
    -

    - -
    face +

    This function calls FT_Request_Size to request the nominal size (in points).

    + +

    inout

    + +
    face

    A handle to a target face object.

    -
    -
    return
    + +

    input

    + + + + + +
    char_width +

    The nominal width, in 26.6 fractional points.

    +
    char_height +

    The nominal height, in 26.6 fractional points.

    +
    horz_resolution +

    The horizontal resolution in dpi.

    +
    vert_resolution +

    The vertical resolution in dpi.

    +
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    since
    -

    2.4.2

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Done_Face

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +

    note

    +

    If either the character width or height is zero, it is set equal to the other value.

    +

    If either the horizontal or vertical resolution is zero, it is set equal to the other value.

    +

    A character width or height smaller than 1pt is set to 1pt; if both resolution values are zero, they are set to 72dpi.

    +

    Don't use this function if you are using the FreeType cache API.

    +
    + + +
    +

    FT_Set_Pixel_Sizes

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Error )
    -  FT_Done_Face( FT_Face  face );
    +  FT_Set_Pixel_Sizes( FT_Face  face,
    +                      FT_UInt  pixel_width,
    +                      FT_UInt  pixel_height );
    +
    -

    -
    -

    Discard a given face object, as well as all of its child slots and sizes.

    -

    -
    input
    -

    - -
    face +

    This function calls FT_Request_Size to request the nominal size (in pixels).

    + +

    inout

    + + +
    face +

    A handle to the target face object.

    +
    + +

    input

    + + + +
    pixel_width +

    The nominal width, in pixels.

    +
    pixel_height +

    The nominal height, in pixels.

    +
    + +

    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_Request_Size

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Request_Size( FT_Face          face,
    +                   FT_Size_Request  req );
    +
    + +

    Resize the scale of the active FT_Size object in a face.

    + +

    inout

    + +
    face

    A handle to a target face object.

    -
    -
    return
    + +

    input

    + + +
    req +

    A pointer to a FT_Size_RequestRec.

    +
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    -

    See the discussion of reference counters in the description of FT_Reference_Face.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Select_Size

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +

    note

    +

    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 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_Select_Size

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Error )
       FT_Select_Size( FT_Face  face,
                       FT_Int   strike_index );
    +
    -

    -

    Select a bitmap strike.

    -

    -
    inout
    -

    - -
    face + +

    inout

    + +
    face

    A handle to a target face object.

    -
    -
    input
    -

    - -
    strike_index + +

    input

    + +
    strike_index

    The index of the bitmap strike in the ‘available_sizes’ field of FT_FaceRec structure.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Size_Request_Type

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Size_Request_Type

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef enum  FT_Size_Request_Type_
       {
    -    FT_SIZE_REQUEST_TYPE_NOMINAL,
    -    FT_SIZE_REQUEST_TYPE_REAL_DIM,
    -    FT_SIZE_REQUEST_TYPE_BBOX,
    -    FT_SIZE_REQUEST_TYPE_CELL,
    -    FT_SIZE_REQUEST_TYPE_SCALES,
    +    FT_SIZE_REQUEST_TYPE_NOMINAL,
    +    FT_SIZE_REQUEST_TYPE_REAL_DIM,
    +    FT_SIZE_REQUEST_TYPE_BBOX,
    +    FT_SIZE_REQUEST_TYPE_CELL,
    +    FT_SIZE_REQUEST_TYPE_SCALES,
     
         FT_SIZE_REQUEST_TYPE_MAX
     
       } FT_Size_Request_Type;
    +
    -

    -

    An enumeration type that lists the supported size request types.

    -

    -
    values
    -

    - - -
    FT_SIZE_REQUEST_TYPE_NOMINAL
    + +

    values

    + + - - - - - - - -
    FT_SIZE_REQUEST_TYPE_NOMINAL

    The nominal size. The ‘units_per_EM’ field of FT_FaceRec is used to determine both scaling values.

    FT_SIZE_REQUEST_TYPE_REAL_DIM
    +
    FT_SIZE_REQUEST_TYPE_REAL_DIM

    The real dimension. The sum of the the ‘ascender’ and (minus of) the ‘descender’ fields of FT_FaceRec are used to determine both scaling values.

    FT_SIZE_REQUEST_TYPE_BBOX
    +
    FT_SIZE_REQUEST_TYPE_BBOX

    The font bounding box. The width and height of the ‘bbox’ field of FT_FaceRec are used to determine the horizontal and vertical scaling value, respectively.

    FT_SIZE_REQUEST_TYPE_CELL
    +
    FT_SIZE_REQUEST_TYPE_CELL

    The ‘max_advance_width’ field of FT_FaceRec is used to determine the horizontal scaling value; the vertical scaling value is determined the same way as FT_SIZE_REQUEST_TYPE_REAL_DIM 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.

    FT_SIZE_REQUEST_TYPE_SCALES
    +
    FT_SIZE_REQUEST_TYPE_SCALES

    Specify the scaling values directly.

    -
    -
    note
    + +

    note

    The above descriptions only apply to scalable formats. For bitmap formats, the behaviour is up to the driver.

    See the note section of FT_Size_Metrics if you wonder how size requesting relates to scaling values.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Size_RequestRec

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Size_RequestRec

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct  FT_Size_RequestRec_
       {
         FT_Size_Request_Type  type;
    @@ -2189,1145 +1694,181 @@ Defined in FT_FREETYPE_H (freetype.h).
         FT_UInt               vertResolution;
     
       } FT_Size_RequestRec;
    +
    -

    -

    A structure used to model a size request.

    -

    -
    fields
    -

    - -
    type + +

    fields

    + + - - - -
    type

    See FT_Size_Request_Type.

    width +
    width

    The desired width.

    height +
    height

    The desired height.

    horiResolution +
    horiResolution

    The horizontal resolution. If set to zero, ‘width’ is treated as a 26.6 fractional pixel value.

    vertResolution +
    vertResolution

    The vertical resolution. If set to zero, ‘height’ is treated as a 26.6 fractional pixel value.

    -
    -
    note
    + +

    note

    If ‘width’ is zero, then the horizontal scaling value is set equal to the vertical scaling value, and vice versa.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Size_Request

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Size_Request

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       typedef struct FT_Size_RequestRec_  *FT_Size_Request;
    -
    -

    -
    -

    A handle to a size request structure.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Request_Size

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Request_Size( FT_Face          face,
    -                   FT_Size_Request  req );
    -
    -

    -
    -

    Resize the scale of the active FT_Size object in a face.

    -

    -
    inout
    -

    - - -
    face -

    A handle to a target face object.

    -
    -
    -
    input
    -

    - - -
    req -

    A pointer to a FT_Size_RequestRec.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    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 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

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Set_Char_Size

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Set_Char_Size( FT_Face     face,
    -                    FT_F26Dot6  char_width,
    -                    FT_F26Dot6  char_height,
    -                    FT_UInt     horz_resolution,
    -                    FT_UInt     vert_resolution );
    -
    -

    -
    -

    This function calls FT_Request_Size to request the nominal size (in points).

    -

    -
    inout
    -

    - - -
    face -

    A handle to a target face object.

    -
    -
    -
    input
    -

    - - - - - -
    char_width -

    The nominal width, in 26.6 fractional points.

    -
    char_height -

    The nominal height, in 26.6 fractional points.

    -
    horz_resolution -

    The horizontal resolution in dpi.

    -
    vert_resolution -

    The vertical resolution in dpi.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    If either the character width or height is zero, it is set equal to the other value.

    -

    If either the horizontal or vertical resolution is zero, it is set equal to the other value.

    -

    A character width or height smaller than 1pt is set to 1pt; if both resolution values are zero, they are set to 72dpi.

    -

    Don't use this function if you are using the FreeType cache API.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Set_Pixel_Sizes

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Set_Pixel_Sizes( FT_Face  face,
    -                      FT_UInt  pixel_width,
    -                      FT_UInt  pixel_height );
    -
    -

    -
    -

    This function calls FT_Request_Size to request the nominal size (in pixels).

    -

    -
    inout
    -

    - - -
    face -

    A handle to the target face object.

    -
    -
    -
    input
    -

    - - - -
    pixel_width -

    The nominal width, in pixels.

    -
    pixel_height -

    The nominal height, in pixels.

    -
    -
    -
    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.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Load_Glyph

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Load_Glyph( FT_Face   face,
    -                 FT_UInt   glyph_index,
    -                 FT_Int32  load_flags );
    -
    -

    -
    -

    A function used to load a single glyph into the glyph slot of a face object.

    -

    -
    inout
    -

    - - -
    face -

    A handle to the target face object where the glyph is loaded.

    -
    -
    -
    input
    -

    - - - -
    glyph_index -

    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.

    -
    load_flags -

    A flag indicating what to load for this glyph. The FT_LOAD_XXX 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).

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    The loaded glyph may be transformed. See FT_Set_Transform for the details.

    -

    For subsetted CID-keyed fonts, ‘FT_Err_Invalid_Argument’ 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 FT_FACE_FLAG_CID_KEYED flag for more details.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Load_Char

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Load_Char( FT_Face   face,
    -                FT_ULong  char_code,
    -                FT_Int32  load_flags );
    -
    -

    -
    -

    A function used to load a single glyph into the glyph slot of a face object, according to its character code.

    -

    -
    inout
    -

    - - -
    face -

    A handle to a target face object where the glyph is loaded.

    -
    -
    -
    input
    -

    - - - -
    char_code -

    The glyph's character code, according to the current charmap used in the face.

    -
    load_flags -

    A flag indicating what to load for this glyph. The FT_LOAD_XXX 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).

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    This function simply calls FT_Get_Char_Index and FT_Load_Glyph.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_LOAD_XXX

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define FT_LOAD_DEFAULT                      0x0
    -#define FT_LOAD_NO_SCALE                     ( 1L << 0 )
    -#define FT_LOAD_NO_HINTING                   ( 1L << 1 )
    -#define FT_LOAD_RENDER                       ( 1L << 2 )
    -#define FT_LOAD_NO_BITMAP                    ( 1L << 3 )
    -#define FT_LOAD_VERTICAL_LAYOUT              ( 1L << 4 )
    -#define FT_LOAD_FORCE_AUTOHINT               ( 1L << 5 )
    -#define FT_LOAD_CROP_BITMAP                  ( 1L << 6 )
    -#define FT_LOAD_PEDANTIC                     ( 1L << 7 )
    -#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH  ( 1L << 9 )
    -#define FT_LOAD_NO_RECURSE                   ( 1L << 10 )
    -#define FT_LOAD_IGNORE_TRANSFORM             ( 1L << 11 )
    -#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 )
    -
    -

    -
    -

    A list of bit-field constants used with FT_Load_Glyph to indicate what kind of operations to perform during glyph loading.

    -

    -
    values
    -

    - - - - - - - - - - - - - - - - - - - - -
    FT_LOAD_DEFAULT -

    Corresponding to 0, this value is used as the default glyph load operation. In this case, the following happens:

    -

    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).

    -

    2. If no embedded bitmap is searched or found, FreeType looks for a scalable outline. If one is found, it is loaded from the font file, scaled to device pixels, then ‘hinted’ to the pixel grid in order to optimize it. The outline data can be accessed from the glyph slot (see note below).

    -

    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.

    -
    FT_LOAD_NO_SCALE -

    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 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.

    -
    FT_LOAD_RENDER -

    Call FT_Render_Glyph after the glyph is loaded. By default, the glyph is rendered in FT_RENDER_MODE_NORMAL mode. This can be overridden by FT_LOAD_TARGET_XXX or FT_LOAD_MONOCHROME.

    -

    This flag is unset by FT_LOAD_NO_SCALE.

    -
    FT_LOAD_NO_BITMAP -

    Ignore bitmap strikes when loading. Bitmap-only fonts ignore this flag.

    -

    FT_LOAD_NO_SCALE always sets this flag.

    -
    FT_LOAD_VERTICAL_LAYOUT
    -

    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 in fonts. By default, FreeType tries to handle broken fonts also.

    -

    In particular, errors from the TrueType bytecode engine are not passed to the application if this flag is not set; this might 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.

    -

    This flag implies FT_LOAD_NO_SCALE and FT_LOAD_IGNORE_TRANSFORM.

    -
    FT_LOAD_IGNORE_TRANSFORM
    -

    Indicates that the transform matrix set by FT_Set_Transform should be ignored.

    -
    FT_LOAD_MONOCHROME -

    This flag is used with FT_LOAD_RENDER to indicate that you want to render an outline glyph to a 1-bit monochrome bitmap glyph, with 8 pixels packed into each byte of the bitmap data.

    -

    Note that this has no effect on the hinting algorithm used. You should rather use FT_LOAD_TARGET_MONO so that the monochrome-optimized hinting algorithm is used.

    -
    FT_LOAD_LINEAR_DESIGN -

    Indicates that the ‘linearHoriAdvance’ and ‘linearVertAdvance’ fields of FT_GlyphSlotRec should be kept in font units. See FT_GlyphSlotRec for details.

    -
    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.

    -
    -
    -
    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 disable hinting by setting FT_LOAD_NO_HINTING or change the precedence by setting FT_LOAD_FORCE_AUTOHINT. You can also set FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be used at all.

    -

    See the description of FT_FACE_FLAG_TRICKY for a special exception (affecting only a handful of Asian fonts).

    -

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_LOAD_TARGET_XXX

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define FT_LOAD_TARGET_( x )   ( (FT_Int32)( (x) & 15 ) << 16 )
    -
    -#define FT_LOAD_TARGET_NORMAL  FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
    -#define FT_LOAD_TARGET_LIGHT   FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT  )
    -#define FT_LOAD_TARGET_MONO    FT_LOAD_TARGET_( FT_RENDER_MODE_MONO   )
    -#define FT_LOAD_TARGET_LCD     FT_LOAD_TARGET_( FT_RENDER_MODE_LCD    )
    -#define FT_LOAD_TARGET_LCD_V   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V  )
    -
    -

    -
    -

    A list of values that are used to select a specific hinting algorithm to use by the hinter. You should OR one of these values to your ‘load_flags’ when calling FT_Load_Glyph.

    -

    Note that font's native hinters may ignore the hinting algorithm you have specified (e.g., the TrueType bytecode interpreter). You can set FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.

    -

    Also note that FT_LOAD_TARGET_LIGHT is an exception, in that it always implies FT_LOAD_FORCE_AUTOHINT.

    -

    -
    values
    -

    - - - - - - -
    FT_LOAD_TARGET_NORMAL -

    This corresponds to the default hinting algorithm, optimized for standard gray-level rendering. For monochrome output, use FT_LOAD_TARGET_MONO instead.

    -
    FT_LOAD_TARGET_LIGHT -

    A lighter hinting algorithm for non-monochrome modes. Many generated glyphs are more fuzzy but better resemble its original shape. A bit like rendering on Mac OS X.

    -

    As a special exception, this target implies FT_LOAD_FORCE_AUTOHINT.

    -
    FT_LOAD_TARGET_MONO -

    Strong hinting algorithm that should only be used for monochrome output. The result is probably unpleasant if the glyph is rendered in non-monochrome modes.

    -
    FT_LOAD_TARGET_LCD -

    A variant of FT_LOAD_TARGET_NORMAL optimized for horizontally decimated LCD displays.

    -
    FT_LOAD_TARGET_LCD_V -

    A variant of FT_LOAD_TARGET_NORMAL optimized for vertically decimated LCD displays.

    -
    -
    -
    note
    -

    You should use only one of the FT_LOAD_TARGET_XXX values in your ‘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 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’ hinting algorithm and have the results rendered in horizontal LCD pixel mode, with code like

    -
    -  FT_Load_Glyph( face, glyph_index,
    -                 load_flags | FT_LOAD_TARGET_LIGHT );
    -
    -  FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
     
    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_LOAD_TARGET_MODE

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +

    A handle to a size request structure.

    -#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) ) - -

    -
    -

    Return the FT_Render_Mode corresponding to a given FT_LOAD_TARGET_XXX value.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Set_Transform

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Set_Transform

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( void )
       FT_Set_Transform( FT_Face     face,
                         FT_Matrix*  matrix,
                         FT_Vector*  delta );
    +
    -

    -

    A function used to set the transformation that is applied to glyph images when they are loaded into a glyph slot through FT_Load_Glyph.

    -

    -
    inout
    -

    - -
    face + +

    inout

    + +
    face

    A handle to the source face object.

    -
    -
    input
    -

    - -
    matrix + +

    input

    + + -
    matrix

    A pointer to the transformation's 2x2 matrix. Use 0 for the identity matrix.

    delta +
    delta

    A pointer to the translation vector. Use 0 for the null vector.

    -
    -
    note
    + +

    note

    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 FT_Set_Char_Size or FT_Set_Pixel_Sizes.

    Note that this also transforms the ‘face.glyph.advance’ field, but not the values in ‘face.glyph.metrics’.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Render_Mode

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  typedef enum  FT_Render_Mode_
    -  {
    -    FT_RENDER_MODE_NORMAL = 0,
    -    FT_RENDER_MODE_LIGHT,
    -    FT_RENDER_MODE_MONO,
    -    FT_RENDER_MODE_LCD,
    -    FT_RENDER_MODE_LCD_V,
    -
    -    FT_RENDER_MODE_MAX
    -
    -  } FT_Render_Mode;
    -
    -

    -
    -

    An enumeration type that lists the render modes supported by FreeType 2. Each mode corresponds to a specific type of scanline conversion performed on the outline.

    -

    For bitmap fonts and embedded bitmaps the ‘bitmap->pixel_mode’ field in the FT_GlyphSlotRec structure gives the format of the returned bitmap.

    -

    All modes except FT_RENDER_MODE_MONO use 256 levels of opacity.

    -

    -
    values
    -

    - - - - - - -
    FT_RENDER_MODE_NORMAL -

    This is the default render mode; it corresponds to 8-bit anti-aliased bitmaps.

    -
    FT_RENDER_MODE_LIGHT -

    This is equivalent to FT_RENDER_MODE_NORMAL. It is only defined as a separate value because render modes are also used indirectly to define hinting algorithm selectors. See FT_LOAD_TARGET_XXX for details.

    -
    FT_RENDER_MODE_MONO -

    This mode corresponds to 1-bit bitmaps (with 2 levels of opacity).

    -
    FT_RENDER_MODE_LCD -

    This mode corresponds to horizontal RGB and BGR sub-pixel displays like LCD screens. It produces 8-bit bitmaps that are 3 times the width of the original glyph outline in pixels, and which use the FT_PIXEL_MODE_LCD mode.

    -
    FT_RENDER_MODE_LCD_V -

    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 times the height of the original glyph outline in pixels and use the FT_PIXEL_MODE_LCD_V mode.

    -
    -
    -
    note
    -

    The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be filtered to reduce color-fringes by using FT_Library_SetLcdFilter (not active in the default builds). It is up to the caller to either call FT_Library_SetLcdFilter (if available) or do the filtering itself.

    -

    The selected render mode only affects vector glyphs of a font. Embedded bitmaps often have a different pixel mode like FT_PIXEL_MODE_MONO. You can use FT_Bitmap_Convert to transform them into 8-bit pixmaps.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    ft_render_mode_xxx

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define ft_render_mode_normal  FT_RENDER_MODE_NORMAL
    -#define ft_render_mode_mono    FT_RENDER_MODE_MONO
    -
    -

    -
    -

    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

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Render_Glyph

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Load_Glyph

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Error )
    -  FT_Render_Glyph( FT_GlyphSlot    slot,
    -                   FT_Render_Mode  render_mode );
    +  FT_Load_Glyph( FT_Face   face,
    +                 FT_UInt   glyph_index,
    +                 FT_Int32  load_flags );
    +
    -

    -
    -

    Convert a given glyph image to a bitmap. It does so by inspecting the glyph image format, finding the relevant renderer, and invoking it.

    -

    -
    inout
    -

    - -
    slot -

    A handle to the glyph slot containing the image to convert.

    +

    A function used to load a single glyph into the glyph slot of a face object.

    + +

    inout

    + +
    face +

    A handle to the target face object where the glyph is loaded.

    -
    -
    input
    -

    - -
    render_mode -

    This is the render mode used to render the glyph image into a bitmap. See FT_Render_Mode for a list of possible values.

    + +

    input

    + + +
    glyph_index +

    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.

    +
    load_flags +

    A flag indicating what to load for this glyph. The FT_LOAD_XXX 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).

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Kerning_Mode

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +

    note

    +

    The loaded glyph may be transformed. See FT_Set_Transform for the details.

    +

    For subsetted CID-keyed fonts, ‘FT_Err_Invalid_Argument’ 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 FT_FACE_FLAG_CID_KEYED flag for more details.

    - typedef enum FT_Kerning_Mode_ - { - FT_KERNING_DEFAULT = 0, - FT_KERNING_UNFITTED, - FT_KERNING_UNSCALED - - } FT_Kerning_Mode; - -

    -
    -

    An enumeration used to specify which kerning values to return in FT_Get_Kerning.

    -

    -
    values
    -

    - - - - -
    FT_KERNING_DEFAULT -

    Return scaled and grid-fitted kerning distances (value is 0).

    -
    FT_KERNING_UNFITTED -

    Return scaled but un-grid-fitted kerning distances.

    -
    FT_KERNING_UNSCALED -

    Return the kerning vector in original font units.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    ft_kerning_default

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define ft_kerning_default   FT_KERNING_DEFAULT
    -
    -

    -
    -

    This constant is deprecated. Please use FT_KERNING_DEFAULT instead.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    ft_kerning_unfitted

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define ft_kerning_unfitted  FT_KERNING_UNFITTED
    -
    -

    -
    -

    This constant is deprecated. Please use FT_KERNING_UNFITTED instead.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    ft_kerning_unscaled

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -#define ft_kerning_unscaled  FT_KERNING_UNSCALED
    -
    -

    -
    -

    This constant is deprecated. Please use FT_KERNING_UNSCALED instead.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Get_Kerning

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Get_Kerning( FT_Face     face,
    -                  FT_UInt     left_glyph,
    -                  FT_UInt     right_glyph,
    -                  FT_UInt     kern_mode,
    -                  FT_Vector  *akerning );
    -
    -

    -
    -

    Return the kerning vector between two glyphs of a same face.

    -

    -
    input
    -

    - - - - - -
    face -

    A handle to a source face object.

    -
    left_glyph -

    The index of the left glyph in the kern pair.

    -
    right_glyph -

    The index of the right glyph in the kern pair.

    -
    kern_mode -

    See FT_Kerning_Mode for more information. Determines the scale and dimension of the returned kerning vector.

    -
    -
    -
    output
    -

    - - -
    akerning -

    The kerning vector. This is either in font units or in pixels (26.6 format) for scalable formats, and in pixels for fixed-sizes formats.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    Only horizontal layouts (left-to-right & 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.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Get_Track_Kerning

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Get_Track_Kerning( FT_Face    face,
    -                        FT_Fixed   point_size,
    -                        FT_Int     degree,
    -                        FT_Fixed*  akerning );
    -
    -

    -
    -

    Return the track kerning for a given face object at a given size.

    -

    -
    input
    -

    - - - - -
    face -

    A handle to a source face object.

    -
    point_size -

    The point size in 16.16 fractional points.

    -
    degree -

    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.

    -
    -
    -
    output
    -

    - - -
    akerning -

    The kerning in 16.16 fractional points, to be uniformly applied between all glyphs.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    Currently, only the Type 1 font driver supports track kerning, using data from AFM files (if attached with FT_Attach_File or FT_Attach_Stream).

    -

    Only very few AFM files come with track kerning data; please refer to the Adobe's AFM specification for more details.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Get_Glyph_Name

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Get_Glyph_Name( FT_Face     face,
    -                     FT_UInt     glyph_index,
    -                     FT_Pointer  buffer,
    -                     FT_UInt     buffer_max );
    -
    -

    -
    -

    Retrieve the ASCII name of a given glyph in a face. This only works for those faces where FT_HAS_GLYPH_NAMES(face) returns 1.

    -

    -
    input
    -

    - - - - -
    face -

    A handle to a source face object.

    -
    glyph_index -

    The glyph index.

    -
    buffer_max -

    The maximum number of bytes available in the buffer.

    -
    -
    -
    output
    -

    - - -
    buffer -

    A pointer to a target buffer where the name is copied to.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    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 ‘buffer’ is set to 0 to indicate an empty name.

    -

    The glyph name is truncated to fit within the buffer if it is too long. The returned string is always zero-terminated.

    -

    Be aware that FreeType reorders glyph indices internally so that 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 ‘ftoptions.h’.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Get_Postscript_Name

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( const char* )
    -  FT_Get_Postscript_Name( FT_Face  face );
    -
    -

    -
    -

    Retrieve the ASCII PostScript name of a given face, if available. This only works with PostScript and TrueType fonts.

    -

    -
    input
    -

    - - -
    face -

    A handle to the source face object.

    -
    -
    -
    return
    -

    A pointer to the face's PostScript name. NULL if unavailable.

    -
    -
    note
    -

    The returned pointer is owned by the face and is destroyed with it.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Select_Charmap

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Select_Charmap( FT_Face      face,
    -                     FT_Encoding  encoding );
    -
    -

    -
    -

    Select a given charmap by its encoding tag (as listed in ‘freetype.h’).

    -

    -
    inout
    -

    - - -
    face -

    A handle to the source face object.

    -
    -
    -
    input
    -

    - - -
    encoding -

    A handle to the selected encoding.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    This function returns an error if no charmap in the face corresponds to the encoding queried here.

    -

    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 (‘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.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Set_Charmap

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Set_Charmap( FT_Face     face,
    -                  FT_CharMap  charmap );
    -
    -

    -
    -

    Select a given charmap for character code to glyph index mapping.

    -

    -
    inout
    -

    - - -
    face -

    A handle to the source face object.

    -
    -
    -
    input
    -

    - - -
    charmap -

    A handle to the selected charmap.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    This function returns an error if the charmap is not part of the face (i.e., if it is not listed in the ‘face->charmaps’ table).

    -

    It also fails if a type 14 charmap is selected.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Get_Charmap_Index

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    -
    -  FT_EXPORT( FT_Int )
    -  FT_Get_Charmap_Index( FT_CharMap  charmap );
    -
    -

    -
    -

    Retrieve index of a given charmap.

    -

    -
    input
    -

    - - -
    charmap -

    A handle to a charmap.

    -
    -
    -
    return
    -

    The index into the array of character maps within the face to which ‘charmap’ belongs. If an error occurs, -1 is returned.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Get_Char_Index

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Get_Char_Index

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_UInt )
       FT_Get_Char_Index( FT_Face   face,
                          FT_ULong  charcode );
    +
    -

    -

    Return the glyph index of a given character code. This function uses a charmap object to do the mapping.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the source face object.

    charcode +
    charcode

    The character code.

    -
    -
    return
    + +

    return

    The glyph index. 0 means ‘undefined character code’.

    -
    -
    note
    + +

    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’. 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.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_First_Char

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Get_First_Char

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_ULong )
       FT_Get_First_Char( FT_Face   face,
                          FT_UInt  *agindex );
    +
    -

    -

    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.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    A handle to the source face object.

    -
    -
    output
    -

    - -
    agindex + +

    output

    + +
    agindex

    Glyph index of first character code. 0 if charmap is empty.

    -
    -
    return
    + +

    return

    The charmap's first character code.

    -
    -
    note
    + +

    note

    You should use this function with FT_Get_Next_Char to be able to parse all character codes available in a given charmap. The code should look like this:

       FT_ULong  charcode;                                              
    @@ -3343,159 +1884,572 @@ Defined in FT_FREETYPE_H (freetype.h).
       }                                                                
     

    Note that ‘*agindex’ is set to 0 if the charmap is empty. The result itself can be 0 in two cases: if the charmap is empty or if the value 0 is the first valid character code.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_Next_Char

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Get_Next_Char

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_ULong )
       FT_Get_Next_Char( FT_Face    face,
                         FT_ULong   char_code,
                         FT_UInt   *agindex );
    +
    -

    -

    This function is used to return the next character code in the current charmap of a given face following the value ‘char_code’, as well as the corresponding glyph index.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the source face object.

    char_code +
    char_code

    The starting character code.

    -
    -
    output
    -

    - -
    agindex + +

    output

    + +
    agindex

    Glyph index of next character code. 0 if charmap is empty.

    -
    -
    return
    + +

    return

    The charmap's next character code.

    -
    -
    note
    + +

    note

    You should use this function with FT_Get_First_Char to walk over all character codes available in a given charmap. See the note for this function for a simple code example.

    Note that ‘*agindex’ is set to 0 when there are no more codes in the charmap.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_Name_Index

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Get_Name_Index

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_UInt )
       FT_Get_Name_Index( FT_Face     face,
                          FT_String*  glyph_name );
    +
    -

    -

    Return the glyph index of a given glyph name. This function uses driver specific objects to do the translation.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the source face object.

    glyph_name +
    glyph_name

    The glyph name.

    -
    -
    return
    + +

    return

    The glyph index. 0 means ‘undefined character code’.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_SUBGLYPH_FLAG_XXX

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + -#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 -#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 -#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 -#define FT_SUBGLYPH_FLAG_SCALE 8 -#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 -#define FT_SUBGLYPH_FLAG_2X2 0x80 -#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 +
    +

    FT_Load_Char

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Load_Char( FT_Face   face,
    +                FT_ULong  char_code,
    +                FT_Int32  load_flags );
    +
    -

    -
    -

    A list of constants used to describe subglyphs. Please refer to the TrueType specification for the meaning of the various flags.

    -

    -
    values
    -

    - - - - - - - - - - - - -
    FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS
    -

    -
    FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES
    -

    -
    FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID
    -

    -
    FT_SUBGLYPH_FLAG_SCALE -

    -
    FT_SUBGLYPH_FLAG_XY_SCALE
    -

    -
    FT_SUBGLYPH_FLAG_2X2 -

    -
    FT_SUBGLYPH_FLAG_USE_MY_METRICS
    -

    +

    A function used to load a single glyph into the glyph slot of a face object, according to its character code.

    + +

    inout

    + +
    face +

    A handle to a target face object where the glyph is loaded.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_SubGlyph_Info

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +

    input

    + + + +
    char_code +

    The glyph's character code, according to the current charmap used in the face.

    +
    load_flags +

    A flag indicating what to load for this glyph. The FT_LOAD_XXX 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).

    +
    +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    This function simply calls FT_Get_Char_Index and FT_Load_Glyph.

    + +
    + + +
    +

    FT_LOAD_TARGET_MODE

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_LOAD_TARGET_MODE( x )  ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
    +
    + +

    Return the FT_Render_Mode corresponding to a given FT_LOAD_TARGET_XXX value.

    + +
    +
    + +
    +

    FT_Render_Glyph

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Render_Glyph( FT_GlyphSlot    slot,
    +                   FT_Render_Mode  render_mode );
    +
    + +

    Convert a given glyph image to a bitmap. It does so by inspecting the glyph image format, finding the relevant renderer, and invoking it.

    + +

    inout

    + + +
    slot +

    A handle to the glyph slot containing the image to convert.

    +
    + +

    input

    + + +
    render_mode +

    This is the render mode used to render the glyph image into a bitmap. See FT_Render_Mode for a list of possible values.

    +
    + +

    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_Render_Mode

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef enum  FT_Render_Mode_
    +  {
    +    FT_RENDER_MODE_NORMAL = 0,
    +    FT_RENDER_MODE_LIGHT,
    +    FT_RENDER_MODE_MONO,
    +    FT_RENDER_MODE_LCD,
    +    FT_RENDER_MODE_LCD_V,
    +
    +    FT_RENDER_MODE_MAX
    +
    +  } FT_Render_Mode;
    +
    +
    +  /* 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
    +
    + +

    An enumeration type that lists the render modes supported by FreeType 2. Each mode corresponds to a specific type of scanline conversion performed on the outline.

    +

    For bitmap fonts and embedded bitmaps the ‘bitmap->pixel_mode’ field in the FT_GlyphSlotRec structure gives the format of the returned bitmap.

    +

    All modes except FT_RENDER_MODE_MONO use 256 levels of opacity.

    + +

    values

    + + + + + + +
    FT_RENDER_MODE_NORMAL +

    This is the default render mode; it corresponds to 8-bit anti-aliased bitmaps.

    +
    FT_RENDER_MODE_LIGHT +

    This is equivalent to FT_RENDER_MODE_NORMAL. It is only defined as a separate value because render modes are also used indirectly to define hinting algorithm selectors. See FT_LOAD_TARGET_XXX for details.

    +
    FT_RENDER_MODE_MONO +

    This mode corresponds to 1-bit bitmaps (with 2 levels of opacity).

    +
    FT_RENDER_MODE_LCD +

    This mode corresponds to horizontal RGB and BGR sub-pixel displays like LCD screens. It produces 8-bit bitmaps that are 3 times the width of the original glyph outline in pixels, and which use the FT_PIXEL_MODE_LCD mode.

    +
    FT_RENDER_MODE_LCD_V +

    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 times the height of the original glyph outline in pixels and use the FT_PIXEL_MODE_LCD_V mode.

    +
    + +

    note

    +

    The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be filtered to reduce color-fringes by using FT_Library_SetLcdFilter (not active in the default builds). It is up to the caller to either call FT_Library_SetLcdFilter (if available) or do the filtering itself.

    +

    The selected render mode only affects vector glyphs of a font. Embedded bitmaps often have a different pixel mode like FT_PIXEL_MODE_MONO. You can use FT_Bitmap_Convert to transform them into 8-bit pixmaps.

    + +
    +
    + +
    +

    FT_Get_Kerning

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Get_Kerning( FT_Face     face,
    +                  FT_UInt     left_glyph,
    +                  FT_UInt     right_glyph,
    +                  FT_UInt     kern_mode,
    +                  FT_Vector  *akerning );
    +
    + +

    Return the kerning vector between two glyphs of a same face.

    + +

    input

    + + + + + +
    face +

    A handle to a source face object.

    +
    left_glyph +

    The index of the left glyph in the kern pair.

    +
    right_glyph +

    The index of the right glyph in the kern pair.

    +
    kern_mode +

    See FT_Kerning_Mode for more information. Determines the scale and dimension of the returned kerning vector.

    +
    + +

    output

    + + +
    akerning +

    The kerning vector. This is either in font units or in pixels (26.6 format) for scalable formats, and in pixels for fixed-sizes formats.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    Only horizontal layouts (left-to-right & 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.

    + +
    +
    + +
    +

    FT_Kerning_Mode

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef enum  FT_Kerning_Mode_
    +  {
    +    FT_KERNING_DEFAULT  = 0,
    +    FT_KERNING_UNFITTED,
    +    FT_KERNING_UNSCALED
    +
    +  } FT_Kerning_Mode;
    +
    +
    +  /* these constants are deprecated; use the corresponding */
    +  /* `FT_Kerning_Mode' values instead                      */
    +#define ft_kerning_default   FT_KERNING_DEFAULT
    +#define ft_kerning_unfitted  FT_KERNING_UNFITTED
    +#define ft_kerning_unscaled  FT_KERNING_UNSCALED
    +
    + +

    An enumeration used to specify which kerning values to return in FT_Get_Kerning.

    + +

    values

    + + + + +
    FT_KERNING_DEFAULT +

    Return scaled and grid-fitted kerning distances (value is 0).

    +
    FT_KERNING_UNFITTED +

    Return scaled but un-grid-fitted kerning distances.

    +
    FT_KERNING_UNSCALED +

    Return the kerning vector in original font units.

    +
    + +
    +
    + +
    +

    FT_Get_Track_Kerning

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Get_Track_Kerning( FT_Face    face,
    +                        FT_Fixed   point_size,
    +                        FT_Int     degree,
    +                        FT_Fixed*  akerning );
    +
    + +

    Return the track kerning for a given face object at a given size.

    + +

    input

    + + + + +
    face +

    A handle to a source face object.

    +
    point_size +

    The point size in 16.16 fractional points.

    +
    degree +

    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.

    +
    + +

    output

    + + +
    akerning +

    The kerning in 16.16 fractional points, to be uniformly applied between all glyphs.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    Currently, only the Type 1 font driver supports track kerning, using data from AFM files (if attached with FT_Attach_File or FT_Attach_Stream).

    +

    Only very few AFM files come with track kerning data; please refer to the Adobe's AFM specification for more details.

    + +
    +
    + +
    +

    FT_Get_Glyph_Name

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Get_Glyph_Name( FT_Face     face,
    +                     FT_UInt     glyph_index,
    +                     FT_Pointer  buffer,
    +                     FT_UInt     buffer_max );
    +
    + +

    Retrieve the ASCII name of a given glyph in a face. This only works for those faces where FT_HAS_GLYPH_NAMES(face) returns 1.

    + +

    input

    + + + + +
    face +

    A handle to a source face object.

    +
    glyph_index +

    The glyph index.

    +
    buffer_max +

    The maximum number of bytes available in the buffer.

    +
    + +

    output

    + + +
    buffer +

    A pointer to a target buffer where the name is copied to.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    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 ‘buffer’ is set to 0 to indicate an empty name.

    +

    The glyph name is truncated to fit within the buffer if it is too long. The returned string is always zero-terminated.

    +

    Be aware that FreeType reorders glyph indices internally so that glyph index 0 always corresponds to the ‘missing glyph’ (called ‘.notdef’).

    +

    This function always returns an error if the config macro ‘FT_CONFIG_OPTION_NO_GLYPH_NAMES’ is not defined in ‘ftoptions.h’.

    + +
    +
    + +
    +

    FT_Get_Postscript_Name

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( const char* )
    +  FT_Get_Postscript_Name( FT_Face  face );
    +
    + +

    Retrieve the ASCII PostScript name of a given face, if available. This only works with PostScript and TrueType fonts.

    + +

    input

    + + +
    face +

    A handle to the source face object.

    +
    + +

    return

    +

    A pointer to the face's PostScript name. NULL if unavailable.

    + +

    note

    +

    The returned pointer is owned by the face and is destroyed with it.

    + +
    +
    + +
    +

    FT_CharMapRec

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct  FT_CharMapRec_
    +  {
    +    FT_Face      face;
    +    FT_Encoding  encoding;
    +    FT_UShort    platform_id;
    +    FT_UShort    encoding_id;
    +
    +  } FT_CharMapRec;
    +
    + +

    The base charmap structure.

    + +

    fields

    + + + + + +
    face +

    A handle to the parent face object.

    +
    encoding +

    An FT_Encoding tag identifying the charmap. Use this with FT_Select_Charmap.

    +
    platform_id +

    An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and should be emulated for other formats.

    +
    encoding_id +

    A platform specific encoding number. This also comes from the TrueType specification and should be emulated similarly.

    +
    + +
    +
    + +
    +

    FT_Select_Charmap

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Select_Charmap( FT_Face      face,
    +                     FT_Encoding  encoding );
    +
    + +

    Select a given charmap by its encoding tag (as listed in ‘freetype.h’).

    + +

    inout

    + + +
    face +

    A handle to the source face object.

    +
    + +

    input

    + + +
    encoding +

    A handle to the selected encoding.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    This function returns an error if no charmap in the face corresponds to the encoding queried here.

    +

    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 (‘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_Set_Charmap

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Set_Charmap( FT_Face     face,
    +                  FT_CharMap  charmap );
    +
    + +

    Select a given charmap for character code to glyph index mapping.

    + +

    inout

    + + +
    face +

    A handle to the source face object.

    +
    + +

    input

    + + +
    charmap +

    A handle to the selected charmap.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    This function returns an error if the charmap is not part of the face (i.e., if it is not listed in the ‘face->charmaps’ table).

    +

    It also fails if a type 14 charmap is selected.

    + +
    +
    + +
    +

    FT_Get_Charmap_Index

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_Int )
    +  FT_Get_Charmap_Index( FT_CharMap  charmap );
    +
    + +

    Retrieve index of a given charmap.

    + +

    input

    + + +
    charmap +

    A handle to a charmap.

    +
    + +

    return

    +

    The index into the array of character maps within the face to which ‘charmap’ belongs. If an error occurs, -1 is returned.

    + +
    +
    + +
    +

    FT_Get_FSType_Flags

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  FT_EXPORT( FT_UShort )
    +  FT_Get_FSType_Flags( FT_Face  face );
    +
    + +

    Return the fsType flags for a font.

    + +

    input

    + + +
    face +

    A handle to the source face object.

    +
    + +

    return

    +

    The fsType flags, FT_FSTYPE_XXX.

    + +

    note

    +

    Use this function rather than directly reading the ‘fs_type’ field in the PS_FontInfoRec structure, which is only guaranteed to return the correct results for Type 1 fonts.

    + +

    since

    +

    2.3.8

    + +
    +
    + +
    +

    FT_Get_SubGlyph_Info

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_SubGlyph_Info( FT_GlyphSlot  glyph,
                             FT_UInt       sub_index,
    @@ -3504,147 +2458,482 @@ Defined in FT_FREETYPE_H (freetype.h).
                             FT_Int       *p_arg1,
                             FT_Int       *p_arg2,
                             FT_Matrix    *p_transform );
    +
    -

    -

    Retrieve a description of a given subglyph. Only use it if ‘glyph->format’ is FT_GLYPH_FORMAT_COMPOSITE; an error is returned otherwise.

    -

    -
    input
    -

    - -
    glyph + +

    input

    + + -
    glyph

    The source glyph slot.

    sub_index +
    sub_index

    The index of the subglyph. Must be less than ‘glyph->num_subglyphs’.

    -
    -
    output
    -

    - -
    p_index + +

    output

    + + - - - -
    p_index

    The glyph index of the subglyph.

    p_flags +
    p_flags

    The subglyph flags, see FT_SUBGLYPH_FLAG_XXX.

    p_arg1 +
    p_arg1

    The subglyph's first argument (if any).

    p_arg2 +
    p_arg2

    The subglyph's second argument (if any).

    p_transform +
    p_transform

    The subglyph transformation (if any).

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The values of ‘*p_arg1’, ‘*p_arg2’, and ‘*p_transform’ must be interpreted depending on the flags returned in ‘*p_flags’. See the TrueType specification for details.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_FSTYPE_XXX

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + -#define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 -#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 -#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004 -#define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008 -#define FT_FSTYPE_NO_SUBSETTING 0x0100 -#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200 +
    +

    FT_Face_Internal

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct FT_Face_InternalRec_*  FT_Face_Internal;
    +
    + +

    An opaque handle to an ‘FT_Face_InternalRec’ structure, used to model private data of a given FT_Face object.

    +

    This structure might change between releases of FreeType 2 and is not generally available to client applications.

    + +
    +
    + +
    +

    FT_Size_Internal

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct FT_Size_InternalRec_*  FT_Size_Internal;
    +
    + +

    An opaque handle to an ‘FT_Size_InternalRec’ structure, used to model private data of a given FT_Size object.

    + +
    +
    + +
    +

    FT_Slot_Internal

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct FT_Slot_InternalRec_*  FT_Slot_Internal;
    +
    + +

    An opaque handle to an ‘FT_Slot_InternalRec’ structure, used to model private data of a given FT_GlyphSlot object.

    + +
    +
    + +
    +

    FT_FACE_FLAG_XXX

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )
    +#define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )
    +#define FT_FACE_FLAG_FIXED_WIDTH       ( 1L <<  2 )
    +#define FT_FACE_FLAG_SFNT              ( 1L <<  3 )
    +#define FT_FACE_FLAG_HORIZONTAL        ( 1L <<  4 )
    +#define FT_FACE_FLAG_VERTICAL          ( 1L <<  5 )
    +#define FT_FACE_FLAG_KERNING           ( 1L <<  6 )
    +#define FT_FACE_FLAG_FAST_GLYPHS       ( 1L <<  7 )
    +#define FT_FACE_FLAG_MULTIPLE_MASTERS  ( 1L <<  8 )
    +#define FT_FACE_FLAG_GLYPH_NAMES       ( 1L <<  9 )
    +#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )
    +#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 )
    +
    + +

    A list of bit flags used in the ‘face_flags’ field of the FT_FaceRec structure. They inform client applications of properties of the corresponding face.

    + +

    values

    + + + + + + + + + + + + + + + + +
    FT_FACE_FLAG_SCALABLE +

    Indicates that the face contains outline glyphs. This doesn't prevent bitmap strikes, i.e., a face can have both this and and FT_FACE_FLAG_FIXED_SIZES set.

    +
    FT_FACE_FLAG_FIXED_SIZES +

    Indicates that the face contains bitmap strikes. See also the ‘num_fixed_sizes’ and ‘available_sizes’ fields of FT_FaceRec.

    +
    FT_FACE_FLAG_FIXED_WIDTH +

    Indicates that the face contains fixed-width characters (like Courier, Lucido, MonoType, etc.).

    +
    FT_FACE_FLAG_SFNT +

    Indicates that the face uses the ‘sfnt’ storage scheme. For now, this means TrueType and OpenType.

    +
    FT_FACE_FLAG_HORIZONTAL +

    Indicates that the face contains horizontal glyph metrics. This should be set for all common formats.

    +
    FT_FACE_FLAG_VERTICAL +

    Indicates that the face contains vertical glyph metrics. This is only available in some formats, not all of them.

    +
    FT_FACE_FLAG_KERNING +

    Indicates that the face contains kerning information. If set, the kerning distance can be retrieved through the function FT_Get_Kerning. Otherwise the function always return the vector (0,0). Note that FreeType doesn't handle kerning data from the ‘GPOS’ table (as present in some OpenType fonts).

    +
    FT_FACE_FLAG_FAST_GLYPHS +

    THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.

    +
    FT_FACE_FLAG_MULTIPLE_MASTERS +

    Indicates that the font contains multiple masters and is capable of interpolating between them. See the multiple-masters specific API for details.

    +
    FT_FACE_FLAG_GLYPH_NAMES +

    Indicates that the font contains glyph names that can be retrieved through FT_Get_Glyph_Name. Note that some TrueType fonts contain broken glyph name tables. Use the function FT_Has_PS_Glyph_Names when needed.

    +
    FT_FACE_FLAG_EXTERNAL_STREAM +

    Used internally by FreeType to indicate that a face's stream was provided by the client application and should not be destroyed when FT_Done_Face is called. Don't read or test this flag.

    +
    FT_FACE_FLAG_HINTER +

    Set if the font driver has a hinting machine of its own. For example, with TrueType fonts, it makes sense to use data from the SFNT ‘gasp’ table only if the native TrueType hinting engine (with the bytecode interpreter) is available and active.

    +
    FT_FACE_FLAG_CID_KEYED +

    Set if the font is CID-keyed. In that case, the font is not accessed by glyph indices but by CID values. For subsetted CID-keyed fonts this has the consequence that not all index values are a valid argument to FT_Load_Glyph. Only the CID values for which corresponding glyphs in the subsetted font exist make FT_Load_Glyph return successfully; in all other cases you get an ‘FT_Err_Invalid_Argument’ error.

    +

    Note that CID-keyed fonts that are in an SFNT wrapper don't have this flag set since the glyphs are accessed in the normal way (using contiguous indices); the ‘CID-ness’ isn't visible to the application.

    +
    FT_FACE_FLAG_TRICKY +

    Set if the font is ‘tricky’, this is, it always needs the font format's native hinting engine to get a reasonable result. A typical example is the Chinese font ‘mingli.ttf’ that uses TrueType bytecode instructions to move and scale all of its subglyphs.

    +

    It is not possible to autohint such fonts using FT_LOAD_FORCE_AUTOHINT; it will also ignore FT_LOAD_NO_HINTING. You have to set both FT_LOAD_NO_HINTING and FT_LOAD_NO_AUTOHINT to really disable hinting; however, you probably never want this except for demonstration purposes.

    +

    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.

    +
    + +
    +
    + +
    +

    FT_STYLE_FLAG_XXX

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_STYLE_FLAG_ITALIC  ( 1 << 0 )
    +#define FT_STYLE_FLAG_BOLD    ( 1 << 1 )
    +
    + +

    A list of bit-flags used to indicate the style of a given face. These are used in the ‘style_flags’ field of FT_FaceRec.

    + +

    values

    + + + +
    FT_STYLE_FLAG_ITALIC +

    Indicates that a given face style is italic or oblique.

    +
    FT_STYLE_FLAG_BOLD +

    Indicates that a given face is bold.

    +
    + +

    note

    +

    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 ‘OS/2’ table in SFNT based fonts).

    + +
    +
    + +
    +

    FT_OPEN_XXX

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_OPEN_MEMORY    0x1
    +#define FT_OPEN_STREAM    0x2
    +#define FT_OPEN_PATHNAME  0x4
    +#define FT_OPEN_DRIVER    0x8
    +#define FT_OPEN_PARAMS    0x10
    +
    +
    +  /* 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
    +
    + +

    A list of bit-field constants used within the ‘flags’ field of the FT_Open_Args structure.

    + +

    values

    + + + + + + +
    FT_OPEN_MEMORY +

    This is a memory-based stream.

    +
    FT_OPEN_STREAM +

    Copy the stream from the ‘stream’ field.

    +
    FT_OPEN_PATHNAME +

    Create a new input stream from a C path name.

    +
    FT_OPEN_DRIVER +

    Use the ‘driver’ field.

    +
    FT_OPEN_PARAMS +

    Use the ‘num_params’ and ‘params’ fields.

    +
    + +

    note

    +

    The ‘FT_OPEN_MEMORY’, ‘FT_OPEN_STREAM’, and ‘FT_OPEN_PATHNAME’ flags are mutually exclusive.

    + +
    +
    + +
    +

    FT_LOAD_XXX

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_LOAD_DEFAULT                      0x0
    +#define FT_LOAD_NO_SCALE                     ( 1L << 0 )
    +#define FT_LOAD_NO_HINTING                   ( 1L << 1 )
    +#define FT_LOAD_RENDER                       ( 1L << 2 )
    +#define FT_LOAD_NO_BITMAP                    ( 1L << 3 )
    +#define FT_LOAD_VERTICAL_LAYOUT              ( 1L << 4 )
    +#define FT_LOAD_FORCE_AUTOHINT               ( 1L << 5 )
    +#define FT_LOAD_CROP_BITMAP                  ( 1L << 6 )
    +#define FT_LOAD_PEDANTIC                     ( 1L << 7 )
    +#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH  ( 1L << 9 )
    +#define FT_LOAD_NO_RECURSE                   ( 1L << 10 )
    +#define FT_LOAD_IGNORE_TRANSFORM             ( 1L << 11 )
    +#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 )
    +
    + +

    A list of bit-field constants used with FT_Load_Glyph to indicate what kind of operations to perform during glyph loading.

    + +

    values

    + + + + + + + + + + + + + + + + + +
    FT_LOAD_DEFAULT +

    Corresponding to 0, this value is used as the default glyph load operation. In this case, the following happens:

    +

    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).

    +

    2. If no embedded bitmap is searched or found, FreeType looks for a scalable outline. If one is found, it is loaded from the font file, scaled to device pixels, then ‘hinted’ to the pixel grid in order to optimize it. The outline data can be accessed from the glyph slot (see note below).

    +

    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.

    +
    FT_LOAD_NO_SCALE +

    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 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.

    +
    FT_LOAD_RENDER +

    Call FT_Render_Glyph after the glyph is loaded. By default, the glyph is rendered in FT_RENDER_MODE_NORMAL mode. This can be overridden by FT_LOAD_TARGET_XXX or FT_LOAD_MONOCHROME.

    +

    This flag is unset by FT_LOAD_NO_SCALE.

    +
    FT_LOAD_NO_BITMAP +

    Ignore bitmap strikes when loading. Bitmap-only fonts ignore this flag.

    +

    FT_LOAD_NO_SCALE always sets this flag.

    +
    FT_LOAD_VERTICAL_LAYOUT +

    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_PEDANTIC +

    Indicates that the font driver should perform pedantic verifications during glyph loading. This is mostly used to detect broken glyphs in fonts. By default, FreeType tries to handle broken fonts also.

    +

    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.

    +
    FT_LOAD_NO_RECURSE +

    Indicate that the font driver should not load composite glyphs recursively. Instead, it should set the ‘num_subglyph’ and ‘subglyphs’ values of the glyph slot accordingly, and set ‘glyph->format’ to FT_GLYPH_FORMAT_COMPOSITE. The description of subglyphs can then be accessed with FT_Get_SubGlyph_Info.

    +

    This flag implies FT_LOAD_NO_SCALE and FT_LOAD_IGNORE_TRANSFORM.

    +
    FT_LOAD_IGNORE_TRANSFORM +

    Indicates that the transform matrix set by FT_Set_Transform should be ignored.

    +
    FT_LOAD_MONOCHROME +

    This flag is used with FT_LOAD_RENDER to indicate that you want to render an outline glyph to a 1-bit monochrome bitmap glyph, with 8 pixels packed into each byte of the bitmap data.

    +

    Note that this has no effect on the hinting algorithm used. You should rather use FT_LOAD_TARGET_MONO so that the monochrome-optimized hinting algorithm is used.

    +
    FT_LOAD_LINEAR_DESIGN +

    Indicates that the ‘linearHoriAdvance’ and ‘linearVertAdvance’ fields of FT_GlyphSlotRec should be kept in font units. See FT_GlyphSlotRec for details.

    +
    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 disable hinting by setting FT_LOAD_NO_HINTING or change the precedence by setting FT_LOAD_FORCE_AUTOHINT. You can also set FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be used at all.

    +

    See the description of FT_FACE_FLAG_TRICKY for a special exception (affecting only a handful of Asian fonts).

    +

    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.

    + +
    +
    + +
    +

    FT_LOAD_TARGET_XXX

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_LOAD_TARGET_( x )   ( (FT_Int32)( (x) & 15 ) << 16 )
    +
    +#define FT_LOAD_TARGET_NORMAL  FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
    +#define FT_LOAD_TARGET_LIGHT   FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT  )
    +#define FT_LOAD_TARGET_MONO    FT_LOAD_TARGET_( FT_RENDER_MODE_MONO   )
    +#define FT_LOAD_TARGET_LCD     FT_LOAD_TARGET_( FT_RENDER_MODE_LCD    )
    +#define FT_LOAD_TARGET_LCD_V   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V  )
    +
    + +

    A list of values that are used to select a specific hinting algorithm to use by the hinter. You should OR one of these values to your ‘load_flags’ when calling FT_Load_Glyph.

    +

    Note that font's native hinters may ignore the hinting algorithm you have specified (e.g., the TrueType bytecode interpreter). You can set FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.

    +

    Also note that FT_LOAD_TARGET_LIGHT is an exception, in that it always implies FT_LOAD_FORCE_AUTOHINT.

    + +

    values

    + + + + + + +
    FT_LOAD_TARGET_NORMAL +

    This corresponds to the default hinting algorithm, optimized for standard gray-level rendering. For monochrome output, use FT_LOAD_TARGET_MONO instead.

    +
    FT_LOAD_TARGET_LIGHT +

    A lighter hinting algorithm for non-monochrome modes. Many generated glyphs are more fuzzy but better resemble its original shape. A bit like rendering on Mac OS X.

    +

    As a special exception, this target implies FT_LOAD_FORCE_AUTOHINT.

    +
    FT_LOAD_TARGET_MONO +

    Strong hinting algorithm that should only be used for monochrome output. The result is probably unpleasant if the glyph is rendered in non-monochrome modes.

    +
    FT_LOAD_TARGET_LCD +

    A variant of FT_LOAD_TARGET_NORMAL optimized for horizontally decimated LCD displays.

    +
    FT_LOAD_TARGET_LCD_V +

    A variant of FT_LOAD_TARGET_NORMAL optimized for vertically decimated LCD displays.

    +
    + +

    note

    +

    You should use only one of the FT_LOAD_TARGET_XXX values in your ‘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 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’ hinting algorithm and have the results rendered in horizontal LCD pixel mode, with code like

    +
    +  FT_Load_Glyph( face, glyph_index,
    +                 load_flags | FT_LOAD_TARGET_LIGHT );
    +
    +  FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
    +
    + +
    +
    + +
    +

    FT_SUBGLYPH_FLAG_XXX

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1
    +#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2
    +#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4
    +#define FT_SUBGLYPH_FLAG_SCALE                   8
    +#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40
    +#define FT_SUBGLYPH_FLAG_2X2                  0x80
    +#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200
    +
    + +

    A list of constants used to describe subglyphs. Please refer to the TrueType specification for the meaning of the various flags.

    + +

    values

    + + + + + + + + +
    FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS +

    +
    FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES +

    +
    FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID +

    +
    FT_SUBGLYPH_FLAG_SCALE +

    +
    FT_SUBGLYPH_FLAG_XY_SCALE +

    +
    FT_SUBGLYPH_FLAG_2X2 +

    +
    FT_SUBGLYPH_FLAG_USE_MY_METRICS +

    +
    + +
    +
    + +
    +

    FT_FSTYPE_XXX

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_FSTYPE_INSTALLABLE_EMBEDDING         0x0000
    +#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING  0x0002
    +#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING   0x0004
    +#define FT_FSTYPE_EDITABLE_EMBEDDING            0x0008
    +#define FT_FSTYPE_NO_SUBSETTING                 0x0100
    +#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY         0x0200
    +
    -

    -

    A list of bit flags used in the ‘fsType’ field of the OS/2 table in a TrueType or OpenType font and the ‘FSType’ entry in a PostScript font. These bit flags are returned by FT_Get_FSType_Flags; they inform client applications of embedding and subsetting restrictions associated with a font.

    See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for more details.

    -

    -
    values
    -

    - - -
    FT_FSTYPE_INSTALLABLE_EMBEDDING
    + +

    values

    + + - - - - - - - - - -
    FT_FSTYPE_INSTALLABLE_EMBEDDING

    Fonts with no fsType bit set may be embedded and permanently installed on the remote system by an application.

    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING
    +
    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING

    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.

    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING
    +
    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING

    If this bit is set, the font may be embedded and temporarily loaded on the remote system. Documents containing Preview & Print fonts must be opened ‘read-only’; no edits can be applied to the document.

    FT_FSTYPE_EDITABLE_EMBEDDING
    +
    FT_FSTYPE_EDITABLE_EMBEDDING

    If this bit is set, the font may be embedded but must only be installed temporarily on other systems. In contrast to Preview & Print fonts, documents containing editable fonts may be opened for reading, editing is permitted, and changes may be saved.

    FT_FSTYPE_NO_SUBSETTING
    +
    FT_FSTYPE_NO_SUBSETTING

    If this bit is set, the font may not be subsetted prior to embedding.

    FT_FSTYPE_BITMAP_EMBEDDING_ONLY
    +
    FT_FSTYPE_BITMAP_EMBEDDING_ONLY

    If this bit is set, only bitmaps contained in the font may be embedded; no outline data may be embedded. If there are no bitmaps available in the font, then the font is unembeddable.

    -
    -
    note
    + +

    note

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_FSType_Flags

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + - FT_EXPORT( FT_UShort ) - FT_Get_FSType_Flags( FT_Face face ); +
    +

    FT_HAS_FAST_GLYPHS

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +#define FT_HAS_FAST_GLYPHS( face )  0
    +
    -

    -
    -

    Return the fsType flags for a font.

    -

    -
    input
    -

    - - -
    face -

    A handle to the source face object.

    -
    -
    -
    return
    -

    The fsType flags, FT_FSTYPE_XXX.

    -
    -
    note
    -

    Use this function rather than directly reading the ‘fs_type’ field in the PS_FontInfoRec structure, which is only guaranteed to return the correct results for Type 1 fonts.

    -
    -
    since
    -

    2.3.8

    -
    -
    -
    - - -
    [Index][TOC]
    +

    Deprecated.

    + +
    + diff --git a/freetype/docs/reference/ft2-basic_types.html b/freetype/docs/reference/ft2-basic_types.html index 5fee28c7..e39573d5 100644 --- a/freetype/docs/reference/ft2-basic_types.html +++ b/freetype/docs/reference/ft2-basic_types.html @@ -3,934 +3,847 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Basic Data Types -

    +

    Basic Data Types

    Synopsis

    - - - - - - - - - - - - - - - - -
    FT_ByteFT_PtrDistFT_Pixel_Mode
    FT_BytesFT_Stringft_pixel_mode_xxx
    FT_CharFT_TagFT_Palette_Mode
    FT_IntFT_ErrorFT_Bitmap
    FT_UIntFT_FixedFT_IMAGE_TAG
    FT_Int16FT_PointerFT_Glyph_Format
    FT_UInt16FT_Posft_glyph_format_xxx
    FT_Int32FT_VectorFT_Data
    FT_UInt32FT_BBoxFT_Generic_Finalizer
    FT_ShortFT_MatrixFT_Generic
    FT_UShortFT_FWordFT_MAKE_TAG
    FT_LongFT_UFWordFT_Int64
    FT_ULongFT_F2Dot14FT_UInt64
    FT_BoolFT_UnitVector
    FT_OffsetFT_F26Dot6


    + + + + + + + + + + + + + + + + +
    FT_ByteFT_BoolFT_UnitVector
    FT_BytesFT_OffsetFT_F26Dot6
    FT_CharFT_PtrDistFT_Data
    FT_IntFT_String 
    FT_UIntFT_TagFT_MAKE_TAG
    FT_Int16FT_Error 
    FT_UInt16FT_FixedFT_Generic
    FT_Int32FT_PointerFT_Generic_Finalizer
    FT_UInt32FT_Pos 
    FT_Int64FT_VectorFT_Bitmap
    FT_UInt64FT_BBoxFT_Pixel_Mode
    FT_ShortFT_MatrixFT_Palette_Mode
    FT_UShortFT_FWordFT_Glyph_Format
    FT_LongFT_UFWordFT_IMAGE_TAG
    FT_ULongFT_F2Dot14
    + -

    This section contains the basic data types defined by FreeType 2, ranging from simple scalar types to bitmap descriptors. More font-specific structures are defined in a different section.

    -

    -
    -

    FT_Byte

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
     
    +
    +

    FT_Byte

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef unsigned char  FT_Byte;
    +
    -

    -

    A simple typedef for the unsigned char type.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Bytes

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Bytes

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef const FT_Byte*  FT_Bytes;
    +
    -

    -

    A typedef for constant memory areas.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Char

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Char

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef signed char  FT_Char;
    +
    -

    -

    A simple typedef for the signed char type.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Int

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Int

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef signed int  FT_Int;
    +
    -

    -

    A typedef for the int type.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_UInt

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_UInt

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef unsigned int  FT_UInt;
    +
    -

    -

    A typedef for the unsigned int type.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Int16

    -
    -Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h). -

    -
    +
    + +
    +

    FT_Int16

    +

    Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).

    +
       typedef signed short  FT_Int16;
    +
    -

    -

    A typedef for a 16bit signed integer type.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_UInt16

    -
    -Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h). -

    -
    +
    + +
    +

    FT_UInt16

    +

    Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).

    +
       typedef unsigned short  FT_UInt16;
    +
    -

    -

    A typedef for a 16bit unsigned integer type.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Int32

    -
    -Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h). -

    -
    +
    + +
    +

    FT_Int32

    +

    Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).

    +
       typedef signed XXX  FT_Int32;
    +
    -

    -

    A typedef for a 32bit signed integer type. The size depends on the configuration.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_UInt32

    -
    -Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h). -

    -
    +
    + +
    +

    FT_UInt32

    +

    Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).

    +
       typedef unsigned XXX  FT_UInt32;
    +
    +
    +
    -

    -
    -
    - - -
    [Index][TOC]
    +
    +

    FT_Int64

    +

    Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).

    +
    +  typedef signed XXX  FT_Int64;
    +
    +
    +
    -
    -

    FT_Short

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    +

    FT_UInt64

    +

    Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h).

    +
    +  typedef unsigned XXX  FT_UInt64;
    +
    +
    +
    +
    +

    FT_Short

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef signed short  FT_Short;
    +
    -

    -

    A typedef for signed short.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_UShort

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_UShort

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef unsigned short  FT_UShort;
    +
    -

    -

    A typedef for unsigned short.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Long

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Long

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef signed long  FT_Long;
    +
    -

    -

    A typedef for signed long.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ULong

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_ULong

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef unsigned long  FT_ULong;
    +
    -

    -

    A typedef for unsigned long.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Bool

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Bool

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef unsigned char  FT_Bool;
    +
    -

    -

    A typedef of unsigned char, used for simple booleans. As usual, values 1 and 0 represent true and false, respectively.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Offset

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Offset

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef size_t  FT_Offset;
    +
    -

    -

    This is equivalent to the ANSI C ‘size_t’ type, i.e., the largest unsigned integer type used to express a file size or position, or a memory block size.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_PtrDist

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_PtrDist

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef ft_ptrdiff_t  FT_PtrDist;
    +
    -

    -

    This is equivalent to the ANSI C ‘ptrdiff_t’ type, i.e., the largest signed integer type used to express the distance between two pointers.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_String

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_String

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef char  FT_String;
    +
    -

    -

    A simple typedef for the char type, usually used for strings.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Tag

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Tag

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef FT_UInt32  FT_Tag;
    +
    -

    -

    A typedef for 32-bit tags (as used in the SFNT format).

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Error

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Error

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef int  FT_Error;
    +
    -

    -

    The FreeType error code type. A value of 0 is always interpreted as a successful operation.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Fixed

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Fixed

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef signed long  FT_Fixed;
    +
    -

    -

    This type is used to store 16.16 fixed-point values, like scaling values or matrix coefficients.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Pointer

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Pointer

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef void*  FT_Pointer;
    +
    -

    -

    A simple typedef for a typeless pointer.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Pos

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Pos

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef signed long  FT_Pos;
    +
    -

    -

    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.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Vector

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Vector

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef struct  FT_Vector_
       {
         FT_Pos  x;
         FT_Pos  y;
     
       } FT_Vector;
    +
    -

    -

    A simple structure used to store a 2D vector; coordinates are of the FT_Pos type.

    -

    -
    fields
    -

    - -
    x + +

    fields

    + + -
    x

    The horizontal coordinate.

    y +
    y

    The vertical coordinate.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_BBox

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_BBox

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef struct  FT_BBox_
       {
         FT_Pos  xMin, yMin;
         FT_Pos  xMax, yMax;
     
       } FT_BBox;
    +
    -

    -

    A structure used to hold an outline's bounding box, i.e., the coordinates of its extrema in the horizontal and vertical directions.

    -

    -
    fields
    -

    - -
    xMin + +

    fields

    + + - - -
    xMin

    The horizontal minimum (left-most).

    yMin +
    yMin

    The vertical minimum (bottom-most).

    xMax +
    xMax

    The horizontal maximum (right-most).

    yMax +
    yMax

    The vertical maximum (top-most).

    -
    -
    note
    + +

    note

    The bounding box is specified with the coordinates of the lower left and the upper right corner. In PostScript, those values are often called (llx,lly) and (urx,ury), respectively.

    If ‘yMin’ is negative, this value gives the glyph's descender. Otherwise, the glyph doesn't descend below the baseline. Similarly, if ‘ymax’ is positive, this value gives the glyph's ascender.

    ‘xMin’ gives the horizontal distance from the glyph's origin to the left edge of the glyph's bounding box. If ‘xMin’ is negative, the glyph extends to the left of the origin.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Matrix

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_Matrix

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef struct  FT_Matrix_
       {
         FT_Fixed  xx, xy;
         FT_Fixed  yx, yy;
     
       } FT_Matrix;
    +
    -

    -

    A simple structure used to store a 2x2 matrix. Coefficients are in 16.16 fixed-point format. The computation performed is:

        x' = x*xx + y*xy                                             
        y' = x*yx + y*yy                                             
     
    -

    -
    fields
    -

    - -
    xx + +

    fields

    + + - - -
    xx

    Matrix coefficient.

    xy +
    xy

    Matrix coefficient.

    yx +
    yx

    Matrix coefficient.

    yy +
    yy

    Matrix coefficient.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_FWord

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_FWord

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef signed short  FT_FWord;   /* distance in FUnits */
    +
    -

    -

    A signed 16-bit integer used to store a distance in original font units.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_UFWord

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_UFWord

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef unsigned short  FT_UFWord;  /* unsigned distance */
    +
    -

    -

    An unsigned 16-bit integer used to store a distance in original font units.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_F2Dot14

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_F2Dot14

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef signed short  FT_F2Dot14;
    +
    -

    -

    A signed 2.14 fixed-point type used for unit vectors.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_UnitVector

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_UnitVector

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef struct  FT_UnitVector_
       {
         FT_F2Dot14  x;
         FT_F2Dot14  y;
     
       } FT_UnitVector;
    +
    -

    -

    A simple structure used to store a 2D vector unit vector. Uses FT_F2Dot14 types.

    -

    -
    fields
    -

    - -
    x + +

    fields

    + + -
    x

    Horizontal coordinate.

    y +
    y

    Vertical coordinate.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_F26Dot6

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_F26Dot6

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef signed long  FT_F26Dot6;
    +
    -

    -

    A signed 26.6 fixed-point type used for vectorial pixel coordinates.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Pixel_Mode

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + - typedef enum FT_Pixel_Mode_ +
    +

    FT_Data

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
    +  typedef struct  FT_Data_
       {
    -    FT_PIXEL_MODE_NONE = 0,
    -    FT_PIXEL_MODE_MONO,
    -    FT_PIXEL_MODE_GRAY,
    -    FT_PIXEL_MODE_GRAY2,
    -    FT_PIXEL_MODE_GRAY4,
    -    FT_PIXEL_MODE_LCD,
    -    FT_PIXEL_MODE_LCD_V,
    -    FT_PIXEL_MODE_BGRA,
    +    const FT_Byte*  pointer;
    +    FT_Int          length;
     
    -    FT_PIXEL_MODE_MAX      /* do not remove */
    +  } FT_Data;
    +
    - } FT_Pixel_Mode; +

    Read-only binary data represented as a pointer and a length.

    -

    -
    -

    An enumeration type used to describe the format of pixels in a given bitmap. Note that additional formats may be added in the future.

    -

    -
    values
    -

    - -
    FT_PIXEL_MODE_NONE -

    Value 0 is reserved.

    +

    fields

    + + - - - - - - -
    pointer +

    The data.

    FT_PIXEL_MODE_MONO -

    A monochrome bitmap, using 1 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.

    -
    FT_PIXEL_MODE_GRAY -

    An 8-bit bitmap, generally used to represent anti-aliased glyph images. Each pixel is stored in one byte. Note that the number of ‘gray’ levels is stored in the ‘num_grays’ field of the FT_Bitmap structure (it generally is 256).

    -
    FT_PIXEL_MODE_GRAY2 -

    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.

    -
    FT_PIXEL_MODE_GRAY4 -

    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.

    -
    FT_PIXEL_MODE_LCD -

    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 FT_RENDER_MODE_LCD.

    -
    FT_PIXEL_MODE_LCD_V -

    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 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.

    +
    length +

    The length of the data in bytes.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    ft_pixel_mode_xxx

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + -#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 +
    +

    FT_MAKE_TAG

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
    +#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
    +          (FT_Tag)                        \
    +          ( ( (FT_ULong)_x1 << 24 ) |     \
    +            ( (FT_ULong)_x2 << 16 ) |     \
    +            ( (FT_ULong)_x3 <<  8 ) |     \
    +              (FT_ULong)_x4         )
    +
    -

    -
    -

    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.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    +

    This macro converts four-letter tags that are used to label TrueType tables into an unsigned long, to be used within FreeType.

    -
    -

    FT_Palette_Mode

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +

    note

    +

    The produced values must be 32-bit integers. Don't redefine this macro.

    - typedef enum FT_Palette_Mode_ +
    + + +
    +

    FT_Generic

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
    +  typedef struct  FT_Generic_
       {
    -    ft_palette_mode_rgb = 0,
    -    ft_palette_mode_rgba,
    +    void*                 data;
    +    FT_Generic_Finalizer  finalizer;
     
    -    ft_palette_mode_max   /* do not remove */
    +  } FT_Generic;
    +
    - } FT_Palette_Mode; +

    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.

    +

    Some FreeType object contains a ‘generic’ field, of type FT_Generic, which usage is left to client applications and font servers.

    +

    It can be used to store a pointer to client-specific data, as well as the address of a ‘finalizer’ 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 ‘finalizer’ field).

    -

    -
    -

    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.

    +

    fields

    + + -
    data +

    A typeless pointer to any client-specified data. This field is completely ignored by the FreeType library.

    ft_palette_mode_rgba -

    The palette is an array of 4-byte RGBA records.

    +
    finalizer +

    A pointer to a ‘generic finalizer’ function, which will be called when the object is destroyed. If this field is set to NULL, no code will be called.

    -
    -
    note
    -

    As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by FreeType, these types are not handled by the library itself.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Bitmap

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Generic_Finalizer

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
    +  typedef void  (*FT_Generic_Finalizer)(void*  object);
    +
    + +

    Describe a function used to destroy the ‘client’ data of any FreeType object. See the description of the FT_Generic type for details of usage.

    + +

    input

    +

    The address of the FreeType object that is under finalization. Its client data is accessed through its ‘generic’ field.

    + +
    +
    + +
    +

    FT_Bitmap

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       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;
    +
    -

    -

    A structure used to describe a bitmap or pixmap to the raster. Note that we now manage pixmaps of various depths through the ‘pixel_mode’ field.

    -

    -
    fields
    -

    - -
    rows + +

    fields

    + + - - - - - - -
    rows

    The number of bitmap rows.

    width +
    width

    The number of pixels in bitmap row.

    pitch +
    pitch

    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 ‘down’ flow, and negative when it has an ‘up’ flow. In all cases, the pitch is an offset to add to a bitmap pointer in order to go down one row.

    Note that ‘padding’ means the alignment of a bitmap to a byte border, and FreeType functions normally align to the smallest possible integer value.

    For the B/W rasterizer, ‘pitch’ is always an even number.

    To change the pitch of a bitmap (say, to make it a multiple of 4), use FT_Bitmap_Convert. Alternatively, you might use callback functions to directly render to the application's surface; see the file ‘example2.cpp’ in the tutorial for a demonstration.

    buffer +
    buffer

    A typeless pointer to the bitmap buffer. This value should be aligned on 32-bit boundaries in most cases.

    num_grays +
    num_grays

    This field is only used with FT_PIXEL_MODE_GRAY; it gives the number of gray levels used in the bitmap.

    pixel_mode +
    pixel_mode

    The pixel mode, i.e., how pixel bits are stored. See FT_Pixel_Mode for possible values.

    palette_mode +
    palette_mode

    This field is intended for paletted pixel modes; it indicates how the palette is stored. Not used currently.

    palette +
    palette

    A typeless pointer to the bitmap palette; this field is intended for paletted pixel modes. Not used currently.

    -
    -
    note
    + +

    note

    For now, the only pixel modes supported by FreeType are mono and grays. However, drivers might be added in the future to support more ‘colorful’ options.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_IMAGE_TAG

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Pixel_Mode

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
    +  typedef enum  FT_Pixel_Mode_
    +  {
    +    FT_PIXEL_MODE_NONE = 0,
    +    FT_PIXEL_MODE_MONO,
    +    FT_PIXEL_MODE_GRAY,
    +    FT_PIXEL_MODE_GRAY2,
    +    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;
    +
    +
    +  /* 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
    +
    + +

    An enumeration type used to describe the format of pixels in a given bitmap. Note that additional formats may be added in the future.

    + +

    values

    + + + + + + + + + +
    FT_PIXEL_MODE_NONE +

    Value 0 is reserved.

    +
    FT_PIXEL_MODE_MONO +

    A monochrome bitmap, using 1 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.

    +
    FT_PIXEL_MODE_GRAY +

    An 8-bit bitmap, generally used to represent anti-aliased glyph images. Each pixel is stored in one byte. Note that the number of ‘gray’ levels is stored in the ‘num_grays’ field of the FT_Bitmap structure (it generally is 256).

    +
    FT_PIXEL_MODE_GRAY2 +

    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.

    +
    FT_PIXEL_MODE_GRAY4 +

    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.

    +
    FT_PIXEL_MODE_LCD +

    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 FT_RENDER_MODE_LCD.

    +
    FT_PIXEL_MODE_LCD_V +

    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 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.

    +
    + +
    +
    + +
    +

    FT_Glyph_Format

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
    +  typedef enum  FT_Glyph_Format_
    +  {
    +    FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
    +
    +    FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
    +    FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ),
    +    FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ),
    +    FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' )
    +
    +  } FT_Glyph_Format;
    +
    +
    +  /* 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
    +#define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE
    +#define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER
    +
    + +

    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.

    + +

    values

    + + + + + + +
    FT_GLYPH_FORMAT_NONE +

    The value 0 is reserved.

    +
    FT_GLYPH_FORMAT_COMPOSITE +

    The glyph image is a composite of several other images. This format is only used with FT_LOAD_NO_RECURSE, and is used to report compound glyphs (like accented characters).

    +
    FT_GLYPH_FORMAT_BITMAP +

    The glyph image is a bitmap, and can be described as an FT_Bitmap. You generally need to access the ‘bitmap’ field of the FT_GlyphSlotRec structure to read it.

    +
    FT_GLYPH_FORMAT_OUTLINE +

    The glyph image is a vectorial outline made of line segments and Bézier arcs; it can be described as an FT_Outline; you generally want to access the ‘outline’ field of the FT_GlyphSlotRec structure to read it.

    +
    FT_GLYPH_FORMAT_PLOTTER +

    The glyph image is a vectorial path with no inside and outside contours. Some Type 1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as FT_Outline, but FreeType isn't currently capable of rendering them correctly.

    +
    + +
    +
    + +
    +

    FT_IMAGE_TAG

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
     #ifndef FT_IMAGE_TAG
     #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \
               value = ( ( (unsigned long)_x1 << 24 ) | \
    @@ -938,273 +851,19 @@ Defined in FT_IMAGE_H (ftimage.h).
                         ( (unsigned long)_x3 << 8  ) | \
                           (unsigned long)_x4         )
     #endif /* FT_IMAGE_TAG */
    +
    -

    -

    This macro converts four-letter tags to an unsigned long type.

    -

    -
    note
    + +

    note

    Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this:

       #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  value         
     

    to get a simple enumeration without assigning special numbers.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Glyph_Format

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    -
    -  typedef enum  FT_Glyph_Format_
    -  {
    -    FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
    -
    -    FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
    -    FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ),
    -    FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ),
    -    FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' )
    -
    -  } FT_Glyph_Format;
    -
    -

    -
    -

    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.

    -

    -
    values
    -

    - - - - - - - - - -
    FT_GLYPH_FORMAT_NONE -

    The value 0 is reserved.

    -
    FT_GLYPH_FORMAT_COMPOSITE
    -

    The glyph image is a composite of several other images. This format is only used with FT_LOAD_NO_RECURSE, and is used to report compound glyphs (like accented characters).

    -
    FT_GLYPH_FORMAT_BITMAP -

    The glyph image is a bitmap, and can be described as an FT_Bitmap. You generally need to access the ‘bitmap’ field of the FT_GlyphSlotRec structure to read it.

    -
    FT_GLYPH_FORMAT_OUTLINE
    -

    The glyph image is a vectorial outline made of line segments and Bézier arcs; it can be described as an FT_Outline; you generally want to access the ‘outline’ field of the FT_GlyphSlotRec structure to read it.

    -
    FT_GLYPH_FORMAT_PLOTTER
    -

    The glyph image is a vectorial path with no inside and outside contours. Some Type 1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as FT_Outline, but FreeType isn't currently capable of rendering them correctly.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    ft_glyph_format_xxx

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    -
    -#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
    -#define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE
    -#define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER
    -
    -

    -
    -

    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.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Data

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    -
    -  typedef struct  FT_Data_
    -  {
    -    const FT_Byte*  pointer;
    -    FT_Int          length;
    -
    -  } FT_Data;
    -
    -

    -
    -

    Read-only binary data represented as a pointer and a length.

    -

    -
    fields
    -

    - - - -
    pointer -

    The data.

    -
    length -

    The length of the data in bytes.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Generic_Finalizer

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    -
    -  typedef void  (*FT_Generic_Finalizer)(void*  object);
    -
    -

    -
    -

    Describe a function used to destroy the ‘client’ data of any FreeType object. See the description of the FT_Generic type for details of usage.

    -

    -
    input
    -

    The address of the FreeType object that is under finalization. Its client data is accessed through its ‘generic’ field.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Generic

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    -
    -  typedef struct  FT_Generic_
    -  {
    -    void*                 data;
    -    FT_Generic_Finalizer  finalizer;
    -
    -  } FT_Generic;
    -
    -

    -
    -

    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.

    -

    Some FreeType object contains a ‘generic’ field, of type FT_Generic, which usage is left to client applications and font servers.

    -

    It can be used to store a pointer to client-specific data, as well as the address of a ‘finalizer’ 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 ‘finalizer’ field).

    -

    -
    fields
    -

    - - - -
    data -

    A typeless pointer to any client-specified data. This field is completely ignored by the FreeType library.

    -
    finalizer -

    A pointer to a ‘generic finalizer’ function, which will be called when the object is destroyed. If this field is set to NULL, no code will be called.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_MAKE_TAG

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    -
    -#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
    -          (FT_Tag)                        \
    -          ( ( (FT_ULong)_x1 << 24 ) |     \
    -            ( (FT_ULong)_x2 << 16 ) |     \
    -            ( (FT_ULong)_x3 <<  8 ) |     \
    -              (FT_ULong)_x4         )
    -
    -

    -
    -

    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 this macro.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Int64

    -
    -Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h). -

    -
    -
    -  typedef signed XXX  FT_Int64;
    -
    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_UInt64

    -
    -Defined in FT_CONFIG_CONFIG_H (config/ftconfig.h). -

    -
    -
    -  typedef unsigned XXX  FT_UInt64;
    -
    -

    -
    -
    - - -
    [Index][TOC]
    +
    + diff --git a/freetype/docs/reference/ft2-bdf_fonts.html b/freetype/docs/reference/ft2-bdf_fonts.html index 6def92bb..daf2307c 100644 --- a/freetype/docs/reference/ft2-bdf_fonts.html +++ b/freetype/docs/reference/ft2-bdf_fonts.html @@ -3,126 +3,169 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -BDF and PCF Files -

    +

    BDF and PCF Files

    Synopsis

    - - - -
    FT_PropertyTypeBDF_PropertyRecFT_Get_BDF_Property
    BDF_PropertyFT_Get_BDF_Charset_ID


    + + + +
    BDF_PropertyTypeBDF_PropertyRecFT_Get_BDF_Property
    BDF_PropertyFT_Get_BDF_Charset_ID
    + -

    This section contains the declaration of functions specific to BDF and PCF fonts.

    -

    -
    -

    FT_PropertyType

    -
    -Defined in FT_BDF_H (ftbdf.h). -

    -
     
    +
    +

    BDF_PropertyType

    +

    Defined in FT_BDF_H (ftbdf.h).

    +
       typedef enum  BDF_PropertyType_
       {
    -    BDF_PROPERTY_TYPE_NONE     = 0,
    -    BDF_PROPERTY_TYPE_ATOM     = 1,
    -    BDF_PROPERTY_TYPE_INTEGER  = 2,
    -    BDF_PROPERTY_TYPE_CARDINAL = 3
    +    BDF_PROPERTY_TYPE_NONE     = 0,
    +    BDF_PROPERTY_TYPE_ATOM     = 1,
    +    BDF_PROPERTY_TYPE_INTEGER  = 2,
    +    BDF_PROPERTY_TYPE_CARDINAL = 3
     
    -  } BDF_PropertyType;
    +  } BDF_PropertyType;
    +
    -

    -

    A list of BDF property types.

    -

    -
    values
    -

    - -
    BDF_PROPERTY_TYPE_NONE + +

    values

    + + - - - - -
    BDF_PROPERTY_TYPE_NONE

    Value 0 is used to indicate a missing property.

    BDF_PROPERTY_TYPE_ATOM +
    BDF_PROPERTY_TYPE_ATOM

    Property is a string atom.

    BDF_PROPERTY_TYPE_INTEGER
    +
    BDF_PROPERTY_TYPE_INTEGER

    Property is a 32-bit signed integer.

    BDF_PROPERTY_TYPE_CARDINAL
    +
    BDF_PROPERTY_TYPE_CARDINAL

    Property is a 32-bit unsigned integer.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    BDF_Property

    -
    -Defined in FT_BDF_H (ftbdf.h). -

    -
    +
    + +
    +

    BDF_Property

    +

    Defined in FT_BDF_H (ftbdf.h).

    +
       typedef struct BDF_PropertyRec_*  BDF_Property;
    +
    -

    -

    A handle to a BDF_PropertyRec structure to model a given BDF/PCF property.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    BDF_PropertyRec

    -
    -Defined in FT_BDF_H (ftbdf.h). -

    -
    +
    + +
    +

    BDF_PropertyRec

    +

    Defined in FT_BDF_H (ftbdf.h).

    +
       typedef struct  BDF_PropertyRec_
       {
    -    BDF_PropertyType  type;
    +    BDF_PropertyType  type;
         union {
           const char*     atom;
           FT_Int32        integer;
    @@ -131,130 +174,107 @@ Defined in FT_BDF_H (ftbdf.h).
         } u;
     
       } BDF_PropertyRec;
    +
    -

    -

    This structure models a given BDF/PCF property.

    -

    -
    fields
    -

    - -
    type + +

    fields

    + + - - -
    type

    The property type.

    u.atom -

    The atom string, if type is BDF_PROPERTY_TYPE_ATOM.

    +
    u.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.

    +
    u.integer +

    A signed integer, if type is BDF_PROPERTY_TYPE_INTEGER.

    u.cardinal -

    An unsigned integer, if type is BDF_PROPERTY_TYPE_CARDINAL.

    +
    u.cardinal +

    An unsigned integer, if type is BDF_PROPERTY_TYPE_CARDINAL.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_BDF_Charset_ID

    -
    -Defined in FT_BDF_H (ftbdf.h). -

    -
    +
    + +
    +

    FT_Get_BDF_Charset_ID

    +

    Defined in FT_BDF_H (ftbdf.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_BDF_Charset_ID( FT_Face       face,
                              const char*  *acharset_encoding,
                              const char*  *acharset_registry );
    +
    -

    -

    Retrieve a BDF font character set identity, according to the BDF specification.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    A handle to the input face.

    -
    -
    output
    -

    - -
    acharset_encoding + +

    output

    + + -
    acharset_encoding

    Charset encoding, as a C string, owned by the face.

    acharset_registry +
    acharset_registry

    Charset registry, as a C string, owned by the face.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function only works with BDF faces, returning an error otherwise.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_BDF_Property

    -
    -Defined in FT_BDF_H (ftbdf.h). -

    -
    +
    + +
    +

    FT_Get_BDF_Property

    +

    Defined in FT_BDF_H (ftbdf.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_BDF_Property( FT_Face           face,
                            const char*       prop_name,
                            BDF_PropertyRec  *aproperty );
    +
    -

    -

    Retrieve a BDF property from a BDF or PCF font file.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the input face.

    name +
    name

    The property name.

    -
    -
    output
    -

    - -
    aproperty + +

    output

    + +
    aproperty

    The property.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function works with BDF and PCF fonts. It returns an error otherwise. It also returns an error if the property is not in the font.

    A ‘property’ is a either key-value pair within the STARTPROPERTIES ... ENDPROPERTIES block of a BDF font or a key-value pair from the ‘info->props’ array within a ‘FontRec’ structure of a PCF font.

    -

    Integer properties are always stored as ‘signed’ within PCF fonts; consequently, BDF_PROPERTY_TYPE_CARDINAL is a possible return value for BDF fonts only.

    -

    In case of error, ‘aproperty->type’ is always set to BDF_PROPERTY_TYPE_NONE.

    -
    -
    -
    - - -
    [Index][TOC]
    +

    Integer properties are always stored as ‘signed’ within PCF fonts; consequently, BDF_PROPERTY_TYPE_CARDINAL is a possible return value for BDF fonts only.

    +

    In case of error, ‘aproperty->type’ is always set to BDF_PROPERTY_TYPE_NONE.

    + +
    + diff --git a/freetype/docs/reference/ft2-bitmap_handling.html b/freetype/docs/reference/ft2-bitmap_handling.html index 1d0c2503..a0eec744 100644 --- a/freetype/docs/reference/ft2-bitmap_handling.html +++ b/freetype/docs/reference/ft2-bitmap_handling.html @@ -3,300 +3,313 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Bitmap Handling -

    +

    Bitmap Handling

    Synopsis

    - - - -
    FT_Bitmap_NewFT_Bitmap_EmboldenFT_GlyphSlot_Own_Bitmap
    FT_Bitmap_CopyFT_Bitmap_ConvertFT_Bitmap_Done


    + + + +
    FT_Bitmap_NewFT_Bitmap_EmboldenFT_GlyphSlot_Own_Bitmap
    FT_Bitmap_CopyFT_Bitmap_ConvertFT_Bitmap_Done
    -
    -

    This section contains functions for converting FT_Bitmap objects.

    -

    -
    -

    FT_Bitmap_New

    -
    -Defined in FT_BITMAP_H (ftbitmap.h). -

    -
     
    +

    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’).

    + +
    +

    FT_Bitmap_New

    +

    Defined in FT_BITMAP_H (ftbitmap.h).

    +
       FT_EXPORT( void )
       FT_Bitmap_New( FT_Bitmap  *abitmap );
    +
    -

    -

    Initialize a pointer to an FT_Bitmap structure.

    -

    -
    inout
    -

    - -
    abitmap + +

    inout

    + +
    abitmap

    A pointer to the bitmap structure.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Bitmap_Copy

    -
    -Defined in FT_BITMAP_H (ftbitmap.h). -

    -
    +
    + +
    +

    FT_Bitmap_Copy

    +

    Defined in FT_BITMAP_H (ftbitmap.h).

    +
       FT_EXPORT( FT_Error )
       FT_Bitmap_Copy( FT_Library        library,
                       const FT_Bitmap  *source,
                       FT_Bitmap        *target);
    +
    -

    -

    Copy a bitmap into another one.

    -

    -
    input
    -

    - -
    library + +

    input

    + + -
    library

    A handle to a library object.

    source +
    source

    A handle to the source bitmap.

    -
    -
    output
    -

    - -
    target + +

    output

    + +
    target

    A handle to the target bitmap.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Bitmap_Embolden

    -
    -Defined in FT_BITMAP_H (ftbitmap.h). -

    -
    +
    + +
    +

    FT_Bitmap_Embolden

    +

    Defined in FT_BITMAP_H (ftbitmap.h).

    +
       FT_EXPORT( FT_Error )
       FT_Bitmap_Embolden( FT_Library  library,
                           FT_Bitmap*  bitmap,
                           FT_Pos      xStrength,
                           FT_Pos      yStrength );
    +
    -

    -

    Embolden a bitmap. The new bitmap will be about ‘xStrength’ pixels wider and ‘yStrength’ pixels higher. The left and bottom borders are kept unchanged.

    -

    -
    input
    -

    - -
    library + +

    input

    + + - -
    library

    A handle to a library object.

    xStrength +
    xStrength

    How strong the glyph is emboldened horizontally. Expressed in 26.6 pixel format.

    yStrength +
    yStrength

    How strong the glyph is emboldened vertically. Expressed in 26.6 pixel format.

    -
    -
    inout
    -

    - -
    bitmap + +

    inout

    + +
    bitmap

    A handle to the target bitmap.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The current implementation restricts ‘xStrength’ to be less than or equal to 8 if bitmap is of pixel_mode FT_PIXEL_MODE_MONO.

    If you want to embolden the bitmap owned by a FT_GlyphSlotRec, you should call FT_GlyphSlot_Own_Bitmap on the slot first.

    -
    -
    -
    - - -
    [Index][TOC]
    +

    Bitmaps in FT_PIXEL_MODE_GRAY2 and FT_PIXEL_MODE_GRAY@ format are converted to FT_PIXEL_MODE_GRAY format (i.e., 8bpp).

    -
    -

    FT_Bitmap_Convert

    -
    -Defined in FT_BITMAP_H (ftbitmap.h). -

    -
    +
    + +
    +

    FT_Bitmap_Convert

    +

    Defined in FT_BITMAP_H (ftbitmap.h).

    +
       FT_EXPORT( FT_Error )
       FT_Bitmap_Convert( FT_Library        library,
                          const FT_Bitmap  *source,
                          FT_Bitmap        *target,
                          FT_Int            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 + +

    input

    + + - -
    library

    A handle to a library object.

    source +
    source

    The source bitmap.

    alignment +
    alignment

    The pitch of the bitmap is a multiple of this parameter. Common values are 1, 2, or 4.

    -
    -
    output
    -

    - -
    target + +

    output

    + +
    target

    The target bitmap.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    It is possible to call FT_Bitmap_Convert multiple times without calling FT_Bitmap_Done (the memory is simply reallocated).

    Use FT_Bitmap_Done to finally remove the bitmap object.

    The ‘library’ argument is taken to have access to FreeType's memory handling functions.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_GlyphSlot_Own_Bitmap

    -
    -Defined in FT_BITMAP_H (ftbitmap.h). -

    -
    +
    + +
    +

    FT_GlyphSlot_Own_Bitmap

    +

    Defined in FT_BITMAP_H (ftbitmap.h).

    +
       FT_EXPORT( FT_Error )
       FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot  slot );
    +
    -

    -

    Make sure that a glyph slot owns ‘slot->bitmap’.

    -

    -
    input
    -

    - -
    slot + +

    input

    + +
    slot

    The glyph slot.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function is to be used in combination with FT_Bitmap_Embolden.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Bitmap_Done

    -
    -Defined in FT_BITMAP_H (ftbitmap.h). -

    -
    +
    + +
    +

    FT_Bitmap_Done

    +

    Defined in FT_BITMAP_H (ftbitmap.h).

    +
       FT_EXPORT( FT_Error )
       FT_Bitmap_Done( FT_Library  library,
                       FT_Bitmap  *bitmap );
    +
    -

    -

    Destroy a bitmap object created with FT_Bitmap_New.

    -

    -
    input
    -

    - -
    library + +

    input

    + + -
    library

    A handle to a library object.

    bitmap +
    bitmap

    The bitmap object to be freed.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The ‘library’ argument is taken to have access to FreeType's memory handling functions.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-bzip2.html b/freetype/docs/reference/ft2-bzip2.html index 7548b85a..dc33973b 100644 --- a/freetype/docs/reference/ft2-bzip2.html +++ b/freetype/docs/reference/ft2-bzip2.html @@ -3,92 +3,147 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -BZIP2 Streams -

    +

    BZIP2 Streams

    Synopsis

    - - -
    FT_Stream_OpenBzip2


    + + +
    FT_Stream_OpenBzip2
    + -

    This section contains the declaration of Bzip2-specific functions.

    -

    -
    -

    FT_Stream_OpenBzip2

    -
    -Defined in FT_BZIP2_H (ftbzip2.h). -

    -
     
    +
    +

    FT_Stream_OpenBzip2

    +

    Defined in FT_BZIP2_H (ftbzip2.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stream_OpenBzip2( FT_Stream  stream,
                            FT_Stream  source );
    +
    -

    -

    Open a new stream to parse bzip2-compressed font files. This is mainly used to support the compressed ‘*.pcf.bz2’ fonts that come with XFree86.

    -

    -
    input
    -

    - -
    stream + +

    input

    + + -
    stream

    The target embedding stream.

    source +
    source

    The source stream.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The source stream must be opened before calling this function.

    Calling the internal function ‘FT_Stream_Close’ on the new stream will not call ‘FT_Stream_Close’ on the source stream. None of the stream objects will be released to the heap.

    The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream.

    In certain builds of the library, bzip2 compression recognition is automatically handled when calling FT_New_Face or FT_Open_Face. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a bzip2 compressed stream from it and re-open the face with it.

    This function may return ‘FT_Err_Unimplemented_Feature’ if your build of FreeType was not compiled with bzip2 support.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-cache_subsystem.html b/freetype/docs/reference/ft2-cache_subsystem.html index 62384a59..18650de7 100644 --- a/freetype/docs/reference/ft2-cache_subsystem.html +++ b/freetype/docs/reference/ft2-cache_subsystem.html @@ -3,62 +3,128 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Cache Sub-System -

    +

    Cache Sub-System

    Synopsis

    - - - - - - - - - - - - - - - -
    FTC_ManagerFTC_CMapCache_New
    FTC_FaceIDFTC_CMapCache_Lookup
    FTC_Face_RequesterFTC_ImageTypeRec
    FTC_NodeFTC_ImageType
    FTC_Manager_NewFTC_ImageCache
    FTC_Manager_ResetFTC_ImageCache_New
    FTC_Manager_DoneFTC_ImageCache_Lookup
    FTC_Manager_LookupFaceFTC_ImageCache_LookupScaler
    FTC_ScalerRecFTC_SBit
    FTC_ScalerFTC_SBitRec
    FTC_Manager_LookupSizeFTC_SBitCache
    FTC_Node_UnrefFTC_SBitCache_New
    FTC_Manager_RemoveFaceIDFTC_SBitCache_Lookup
    FTC_CMapCacheFTC_SBitCache_LookupScaler


    + + + + + + + + + + + + + + + + + + +
    FTC_Manager 
    FTC_FaceIDFTC_SBit
    FTC_Face_RequesterFTC_SBitCache
     FTC_SBitCache_New
    FTC_Manager_NewFTC_SBitCache_Lookup
    FTC_Manager_Reset 
    FTC_Manager_DoneFTC_CMapCache
    FTC_Manager_LookupFaceFTC_CMapCache_New
    FTC_Manager_LookupSizeFTC_CMapCache_Lookup
    FTC_Manager_RemoveFaceID 
     FTC_ScalerRec
    FTC_NodeFTC_Scaler
    FTC_Node_UnrefFTC_ImageTypeRec
     FTC_ImageType
    FTC_ImageCacheFTC_ImageCache_LookupScaler
    FTC_ImageCache_NewFTC_SBitRec
    FTC_ImageCache_LookupFTC_SBitCache_LookupScaler
    + -

    This section describes the FreeType 2 cache sub-system, which is used to limit the number of concurrently opened FT_Face and FT_Size objects, as well as caching information like character maps and glyph images while limiting their maximum memory usage.

    Note that all types and functions begin with the ‘FTC_’ prefix.

    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:

    @@ -72,135 +138,88 @@ Cache Sub-System

    If you want to use the FT_Glyph caching, call FTC_ImageCache, then later use FTC_ImageCache_Lookup to retrieve the corresponding FT_Glyph objects from the cache.

    If you need lots of small bitmaps, it is much more memory efficient to call FTC_SBitCache_New followed by FTC_SBitCache_Lookup. This returns FTC_SBitRec structures, which are used to store small bitmaps directly. (A small bitmap is one whose metrics and dimensions all fit into 8-bit integers).

    We hope to also provide a kerning cache in the near future.

    -

    -
    -

    FTC_Manager

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
     
    +
    +

    FTC_Manager

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       typedef struct FTC_ManagerRec_*  FTC_Manager;
    +
    -

    -

    This object corresponds to one instance of the cache-subsystem. It is used to cache one or more FT_Face objects, along with corresponding FT_Size objects.

    The manager intentionally limits the total number of opened FT_Face and FT_Size objects to control memory usage. See the ‘max_faces’ and ‘max_sizes’ parameters of FTC_Manager_New.

    The manager is also used to cache ‘nodes’ of various types while limiting their total memory usage.

    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.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_FaceID

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_FaceID

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       typedef FT_Pointer  FTC_FaceID;
    +
    -

    -

    An opaque pointer type that is used to identity face objects. The contents of such objects is application-dependent.

    These pointers are typically used to point to a user-defined structure containing a font file path, and face index.

    -

    -
    note
    + +

    note

    Never use NULL as a valid FTC_FaceID.

    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.

    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 FTC_Manager_RemoveFaceID before any other cache function.

    Failure to do so will result in incorrect behaviour or even memory leaks and crashes.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_Face_Requester

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_Face_Requester

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       typedef FT_Error
       (*FTC_Face_Requester)( FTC_FaceID  face_id,
                              FT_Library  library,
    -                         FT_Pointer  request_data,
    +                         FT_Pointer  req_data,
                              FT_Face*    aface );
    +
    -

    -

    A callback function provided by client applications. It is used by the cache manager to translate a given FTC_FaceID into a new valid FT_Face object, on demand.

    -

    -
    input
    -

    - -
    face_id + +

    input

    + + - -
    face_id

    The face ID to resolve.

    library +
    library

    A handle to a FreeType library object.

    req_data +
    req_data

    Application-provided request data (see note below).

    -
    -
    output
    -

    - -
    aface + +

    output

    + +
    aface

    A new FT_Face handle.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The third parameter ‘req_data’ is the same as the one passed by the client when FTC_Manager_New is called.

    The face requester should not perform funny things on the returned face object, like creating a new FT_Size for it, or setting a transformation through FT_Set_Transform!

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_Node

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  typedef struct FTC_NodeRec_*  FTC_Node;
    -
    -

    -
    -

    An opaque handle to a cache node object. Each cache node is reference-counted. A node with a count of 0 might be flushed out of a full cache whenever a lookup request is performed.

    -

    If you look up nodes, you have the ability to ‘acquire’ them, i.e., to increment their reference count. This will prevent the node from being flushed out of the cache until you explicitly ‘release’ it (see FTC_Node_Unref).

    -

    See also FTC_SBitCache_Lookup and FTC_ImageCache_Lookup.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_Manager_New

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_Manager_New

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       FT_EXPORT( FT_Error )
       FTC_Manager_New( FT_Library          library,
                        FT_UInt             max_faces,
    @@ -209,165 +228,516 @@ Defined in FT_CACHE_H (ftcache.h).
                        FTC_Face_Requester  requester,
                        FT_Pointer          req_data,
                        FTC_Manager        *amanager );
    +
    -

    -

    Create a new cache manager.

    -

    -
    input
    -

    - -
    library + +

    input

    + + - - - - -
    library

    The parent FreeType library handle to use.

    max_faces +
    max_faces

    Maximum number of opened FT_Face objects managed by this cache instance. Use 0 for defaults.

    max_sizes +
    max_sizes

    Maximum number of opened FT_Size objects managed by this cache instance. Use 0 for defaults.

    max_bytes +
    max_bytes

    Maximum number of bytes to use for cached data nodes. Use 0 for defaults. Note that this value does not account for managed FT_Face and FT_Size objects.

    requester +
    requester

    An application-provided callback used to translate face IDs into real FT_Face objects.

    req_data +
    req_data

    A generic pointer that is passed to the requester each time it is called (see FTC_Face_Requester).

    -
    -
    output
    -

    - -
    amanager + +

    output

    + +
    amanager

    A handle to a new manager object. 0 in case of failure.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_Manager_Reset

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_Manager_Reset

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       FT_EXPORT( void )
       FTC_Manager_Reset( FTC_Manager  manager );
    +
    -

    -

    Empty a given cache manager. This simply gets rid of all the currently cached FT_Face and FT_Size objects within the manager.

    -

    -
    inout
    -

    - -
    manager + +

    inout

    + +
    manager

    A handle to the manager.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_Manager_Done

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_Manager_Done

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       FT_EXPORT( void )
       FTC_Manager_Done( FTC_Manager  manager );
    +
    -

    -

    Destroy a given manager after emptying it.

    -

    -
    input
    -

    - -
    manager + +

    input

    + +
    manager

    A handle to the target cache manager object.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_Manager_LookupFace

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_Manager_LookupFace

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       FT_EXPORT( FT_Error )
       FTC_Manager_LookupFace( FTC_Manager  manager,
                               FTC_FaceID   face_id,
                               FT_Face     *aface );
    +
    -

    -

    Retrieve the FT_Face object that corresponds to a given face ID through a cache manager.

    -

    -
    input
    -

    - -
    manager + +

    input

    + + -
    manager

    A handle to the cache manager.

    face_id +
    face_id

    The ID of the face object.

    -
    -
    output
    -

    - -
    aface + +

    output

    + +
    aface

    A handle to the face object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The returned FT_Face object is always owned by the manager. You 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’, use FTC_Manager_LookupSize instead.

    Never change the face's transformation matrix (i.e., never call the FT_Set_Transform function) on a returned face! If you need to transform glyphs, do it yourself after glyph loading.

    When you perform a lookup, out-of-memory errors are detected within the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.

    If a lookup fails with ‘FT_Err_Out_Of_Memory’ the cache has already been completely flushed, and still no memory was available for the operation.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_ScalerRec

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_Manager_LookupSize

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FTC_Manager_LookupSize( FTC_Manager  manager,
    +                          FTC_Scaler   scaler,
    +                          FT_Size     *asize );
    +
    + +

    Retrieve the FT_Size object that corresponds to a given FTC_ScalerRec pointer through a cache manager.

    + +

    input

    + + + +
    manager +

    A handle to the cache manager.

    +
    scaler +

    A scaler handle.

    +
    + +

    output

    + + +
    asize +

    A handle to the size object.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    The returned FT_Size object is always owned by the manager. You should never try to discard it by yourself.

    +

    You can access the parent FT_Face object simply as ‘size->face’ if you need it. Note that this object is also owned by the manager.

    + +

    note

    +

    When you perform a lookup, out-of-memory errors are detected within the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.

    +

    If a lookup fails with ‘FT_Err_Out_Of_Memory’ the cache has already been completely flushed, and still no memory is available for the operation.

    + +
    +
    + +
    +

    FTC_Manager_RemoveFaceID

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  FT_EXPORT( void )
    +  FTC_Manager_RemoveFaceID( FTC_Manager  manager,
    +                            FTC_FaceID   face_id );
    +
    + +

    A special function used to indicate to the cache manager that a given FTC_FaceID is no longer valid, either because its content changed, or because it was deallocated or uninstalled.

    + +

    input

    + + + +
    manager +

    The cache manager handle.

    +
    face_id +

    The FTC_FaceID to be removed.

    +
    + +

    note

    +

    This function flushes all nodes from the cache corresponding to this ‘face_id’, with the exception of nodes with a non-null reference count.

    +

    Such nodes are however modified internally so as to never appear in later lookups with the same ‘face_id’ value, and to be immediately destroyed when released by all their users.

    + +
    +
    + +
    +

    FTC_Node

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  typedef struct FTC_NodeRec_*  FTC_Node;
    +
    + +

    An opaque handle to a cache node object. Each cache node is reference-counted. A node with a count of 0 might be flushed out of a full cache whenever a lookup request is performed.

    +

    If you look up nodes, you have the ability to ‘acquire’ them, i.e., to increment their reference count. This will prevent the node from being flushed out of the cache until you explicitly ‘release’ it (see FTC_Node_Unref).

    +

    See also FTC_SBitCache_Lookup and FTC_ImageCache_Lookup.

    + +
    +
    + +
    +

    FTC_Node_Unref

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  FT_EXPORT( void )
    +  FTC_Node_Unref( FTC_Node     node,
    +                  FTC_Manager  manager );
    +
    + +

    Decrement a cache node's internal reference count. When the count reaches 0, it is not destroyed but becomes eligible for subsequent cache flushes.

    + +

    input

    + + + +
    node +

    The cache node handle.

    +
    manager +

    The cache manager handle.

    +
    + +
    +
    + +
    +

    FTC_ImageCache

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  typedef struct FTC_ImageCacheRec_*  FTC_ImageCache;
    +
    + +

    A handle to a glyph image cache object. They are designed to hold many distinct glyph images while not exceeding a certain memory threshold.

    + +
    +
    + +
    +

    FTC_ImageCache_New

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FTC_ImageCache_New( FTC_Manager      manager,
    +                      FTC_ImageCache  *acache );
    +
    + +

    Create a new glyph image cache.

    + +

    input

    + + +
    manager +

    The parent manager for the image cache.

    +
    + +

    output

    + + +
    acache +

    A handle to the new glyph image cache object.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +
    +
    + +
    +

    FTC_ImageCache_Lookup

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FTC_ImageCache_Lookup( FTC_ImageCache  cache,
    +                         FTC_ImageType   type,
    +                         FT_UInt         gindex,
    +                         FT_Glyph       *aglyph,
    +                         FTC_Node       *anode );
    +
    + +

    Retrieve a given glyph image from a glyph image cache.

    + +

    input

    + + + + +
    cache +

    A handle to the source glyph image cache.

    +
    type +

    A pointer to a glyph image type descriptor.

    +
    gindex +

    The glyph index to retrieve.

    +
    + +

    output

    + + + +
    aglyph +

    The corresponding FT_Glyph object. 0 in case of failure.

    +
    anode +

    Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    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 FT_Glyph_Copy and modify the new one.

    +

    If ‘anode’ is not 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 FT_Glyph) will always be kept in the cache until you call FTC_Node_Unref to ‘release’ it.

    +

    If ‘anode’ is NULL, the cache node is left unchanged, which means that the FT_Glyph 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!

    + +
    +
    + +
    +

    FTC_SBit

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  typedef struct FTC_SBitRec_*  FTC_SBit;
    +
    + +

    A handle to a small bitmap descriptor. See the FTC_SBitRec structure for details.

    + +
    +
    + +
    +

    FTC_SBitCache

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  typedef struct FTC_SBitCacheRec_*  FTC_SBitCache;
    +
    + +

    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 FTC_ImageCache.

    + +
    +
    + +
    +

    FTC_SBitCache_New

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FTC_SBitCache_New( FTC_Manager     manager,
    +                     FTC_SBitCache  *acache );
    +
    + +

    Create a new cache to store small glyph bitmaps.

    + +

    input

    + + +
    manager +

    A handle to the source cache manager.

    +
    + +

    output

    + + +
    acache +

    A handle to the new sbit cache. NULL in case of error.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +
    +
    + +
    +

    FTC_SBitCache_Lookup

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FTC_SBitCache_Lookup( FTC_SBitCache    cache,
    +                        FTC_ImageType    type,
    +                        FT_UInt          gindex,
    +                        FTC_SBit        *sbit,
    +                        FTC_Node        *anode );
    +
    + +

    Look up a given small glyph bitmap in a given sbit cache and ‘lock’ it to prevent its flushing from the cache until needed.

    + +

    input

    + + + + +
    cache +

    A handle to the source sbit cache.

    +
    type +

    A pointer to the glyph image type descriptor.

    +
    gindex +

    The glyph index.

    +
    + +

    output

    + + + +
    sbit +

    A handle to a small bitmap descriptor.

    +
    anode +

    Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    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.

    +

    The descriptor's ‘buffer’ field is set to 0 to indicate a missing glyph bitmap.

    +

    If ‘anode’ is not 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 FTC_Node_Unref to ‘release’ it.

    +

    If ‘anode’ 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!

    + +
    +
    + +
    +

    FTC_CMapCache

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  typedef struct FTC_CMapCacheRec_*  FTC_CMapCache;
    +
    + +

    An opaque handle used to model a charmap cache. This cache is to hold character codes -> glyph indices mappings.

    + +
    +
    + +
    +

    FTC_CMapCache_New

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FTC_CMapCache_New( FTC_Manager     manager,
    +                     FTC_CMapCache  *acache );
    +
    + +

    Create a new charmap cache.

    + +

    input

    + + +
    manager +

    A handle to the cache manager.

    +
    + +

    output

    + + +
    acache +

    A new cache handle. NULL in case of error.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    note

    +

    Like all other caches, this one will be destroyed with the cache manager.

    + +
    +
    + +
    +

    FTC_CMapCache_Lookup

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
    +  FT_EXPORT( FT_UInt )
    +  FTC_CMapCache_Lookup( FTC_CMapCache  cache,
    +                        FTC_FaceID     face_id,
    +                        FT_Int         cmap_index,
    +                        FT_UInt32      char_code );
    +
    + +

    Translate a character code into a glyph index, using the charmap cache.

    + +

    input

    + + + + + +
    cache +

    A charmap cache handle.

    +
    face_id +

    The source face ID.

    +
    cmap_index +

    The index of the charmap in the source face. Any negative value means to use the cache FT_Face's default charmap.

    +
    char_code +

    The character code (in the corresponding charmap).

    +
    + +

    return

    +

    Glyph index. 0 means ‘no glyph’.

    + +
    +
    + +
    +

    FTC_ScalerRec

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       typedef struct  FTC_ScalerRec_
       {
         FTC_FaceID  face_id;
    @@ -378,294 +748,54 @@ Defined in FT_CACHE_H (ftcache.h).
         FT_UInt     y_res;
     
       } FTC_ScalerRec;
    +
    -

    -

    A structure used to describe a given character size in either pixels or points to the cache manager. See FTC_Manager_LookupSize.

    -

    -
    fields
    -

    - -
    face_id + +

    fields

    + + - - - - -
    face_id

    The source face ID.

    width +
    width

    The character width.

    height +
    height

    The character height.

    pixel +
    pixel

    A Boolean. If 1, the ‘width’ and ‘height’ fields are interpreted as integer pixel character sizes. Otherwise, they are expressed as 1/64th of points.

    x_res +
    x_res

    Only used when ‘pixel’ is value 0 to indicate the horizontal resolution in dpi.

    y_res +
    y_res

    Only used when ‘pixel’ is value 0 to indicate the vertical resolution in dpi.

    -
    -
    note
    + +

    note

    This type is mainly used to retrieve FT_Size objects through the cache manager.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_Scaler

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_Scaler

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       typedef struct FTC_ScalerRec_*  FTC_Scaler;
    +
    -

    -

    A handle to an FTC_ScalerRec structure.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_Manager_LookupSize

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FTC_Manager_LookupSize( FTC_Manager  manager,
    -                          FTC_Scaler   scaler,
    -                          FT_Size     *asize );
    -
    -

    -
    -

    Retrieve the FT_Size object that corresponds to a given FTC_ScalerRec pointer through a cache manager.

    -

    -
    input
    -

    - - - -
    manager -

    A handle to the cache manager.

    -
    scaler -

    A scaler handle.

    -
    -
    -
    output
    -

    - - -
    asize -

    A handle to the size object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    The returned FT_Size object is always owned by the manager. You should never try to discard it by yourself.

    -

    You can access the parent FT_Face object simply as ‘size->face’ if you need it. Note that this object is also owned by the manager.

    -
    -
    note
    -

    When you perform a lookup, out-of-memory errors are detected within the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.

    -

    If a lookup fails with ‘FT_Err_Out_Of_Memory’ the cache has already been completely flushed, and still no memory is available for the operation.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_Node_Unref

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FTC_Node_Unref( FTC_Node     node,
    -                  FTC_Manager  manager );
    -
    -

    -
    -

    Decrement a cache node's internal reference count. When the count reaches 0, it is not destroyed but becomes eligible for subsequent cache flushes.

    -

    -
    input
    -

    - - - -
    node -

    The cache node handle.

    -
    manager -

    The cache manager handle.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_Manager_RemoveFaceID

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FTC_Manager_RemoveFaceID( FTC_Manager  manager,
    -                            FTC_FaceID   face_id );
    -
    -

    -
    -

    A special function used to indicate to the cache manager that a given FTC_FaceID is no longer valid, either because its content changed, or because it was deallocated or uninstalled.

    -

    -
    input
    -

    - - - -
    manager -

    The cache manager handle.

    -
    face_id -

    The FTC_FaceID to be removed.

    -
    -
    -
    note
    -

    This function flushes all nodes from the cache corresponding to this ‘face_id’, with the exception of nodes with a non-null reference count.

    -

    Such nodes are however modified internally so as to never appear in later lookups with the same ‘face_id’ value, and to be immediately destroyed when released by all their users.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_CMapCache

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  typedef struct FTC_CMapCacheRec_*  FTC_CMapCache;
    -
    -

    -
    -

    An opaque handle used to model a charmap cache. This cache is to hold character codes -> glyph indices mappings.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_CMapCache_New

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FTC_CMapCache_New( FTC_Manager     manager,
    -                     FTC_CMapCache  *acache );
    -
    -

    -
    -

    Create a new charmap cache.

    -

    -
    input
    -

    - - -
    manager -

    A handle to the cache manager.

    -
    -
    -
    output
    -

    - - -
    acache -

    A new cache handle. NULL in case of error.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    Like all other caches, this one will be destroyed with the cache manager.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_CMapCache_Lookup

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  FT_EXPORT( FT_UInt )
    -  FTC_CMapCache_Lookup( FTC_CMapCache  cache,
    -                        FTC_FaceID     face_id,
    -                        FT_Int         cmap_index,
    -                        FT_UInt32      char_code );
    -
    -

    -
    -

    Translate a character code into a glyph index, using the charmap cache.

    -

    -
    input
    -

    - - - - - -
    cache -

    A charmap cache handle.

    -
    face_id -

    The source face ID.

    -
    cmap_index -

    The index of the charmap in the source face. Any negative value means to use the cache FT_Face's default charmap.

    -
    char_code -

    The character code (in the corresponding charmap).

    -
    -
    -
    return
    -

    Glyph index. 0 means ‘no glyph’.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_ImageTypeRec

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_ImageTypeRec

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       typedef struct  FTC_ImageTypeRec_
       {
         FTC_FaceID  face_id;
    @@ -674,176 +804,45 @@ Defined in FT_CACHE_H (ftcache.h).
         FT_Int32    flags;
     
       } FTC_ImageTypeRec;
    +
    -

    -

    A structure used to model the type of images in a glyph cache.

    -

    -
    fields
    -

    - -
    face_id + +

    fields

    + + - - -
    face_id

    The face ID.

    width +
    width

    The width in pixels.

    height +
    height

    The height in pixels.

    flags +
    flags

    The load flags, as in FT_Load_Glyph.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_ImageType

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_ImageType

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       typedef struct FTC_ImageTypeRec_*  FTC_ImageType;
    +
    -

    -

    A handle to an FTC_ImageTypeRec structure.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_ImageCache

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  typedef struct FTC_ImageCacheRec_*  FTC_ImageCache;
    -
    -

    -
    -

    A handle to a glyph image cache object. They are designed to hold many distinct glyph images while not exceeding a certain memory threshold.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_ImageCache_New

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FTC_ImageCache_New( FTC_Manager      manager,
    -                      FTC_ImageCache  *acache );
    -
    -

    -
    -

    Create a new glyph image cache.

    -

    -
    input
    -

    - - -
    manager -

    The parent manager for the image cache.

    -
    -
    -
    output
    -

    - - -
    acache -

    A handle to the new glyph image cache object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_ImageCache_Lookup

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FTC_ImageCache_Lookup( FTC_ImageCache  cache,
    -                         FTC_ImageType   type,
    -                         FT_UInt         gindex,
    -                         FT_Glyph       *aglyph,
    -                         FTC_Node       *anode );
    -
    -

    -
    -

    Retrieve a given glyph image from a glyph image cache.

    -

    -
    input
    -

    - - - - -
    cache -

    A handle to the source glyph image cache.

    -
    type -

    A pointer to a glyph image type descriptor.

    -
    gindex -

    The glyph index to retrieve.

    -
    -
    -
    output
    -

    - - - -
    aglyph -

    The corresponding FT_Glyph object. 0 in case of failure.

    -
    anode -

    Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    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 FT_Glyph_Copy and modify the new one.

    -

    If ‘anode’ is not 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 FT_Glyph) will always be kept in the cache until you call FTC_Node_Unref to ‘release’ it.

    -

    If ‘anode’ is NULL, the cache node is left unchanged, which means that the FT_Glyph 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!

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_ImageCache_LookupScaler

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_ImageCache_LookupScaler

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       FT_EXPORT( FT_Error )
       FTC_ImageCache_LookupScaler( FTC_ImageCache  cache,
                                    FTC_Scaler      scaler,
    @@ -851,80 +850,52 @@ Defined in FT_CACHE_H (ftcache.h).
                                    FT_UInt         gindex,
                                    FT_Glyph       *aglyph,
                                    FTC_Node       *anode );
    +
    -

    -

    A variant of FTC_ImageCache_Lookup that uses an FTC_ScalerRec to specify the face ID and its size.

    -

    -
    input
    -

    - -
    cache + +

    input

    + + - - -
    cache

    A handle to the source glyph image cache.

    scaler +
    scaler

    A pointer to a scaler descriptor.

    load_flags +
    load_flags

    The corresponding load flags.

    gindex +
    gindex

    The glyph index to retrieve.

    -
    -
    output
    -

    - -
    aglyph + +

    output

    + + -
    aglyph

    The corresponding FT_Glyph object. 0 in case of failure.

    anode +
    anode

    Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    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 FT_Glyph_Copy and modify the new one.

    If ‘anode’ is not 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 FT_Glyph) will always be kept in the cache until you call FTC_Node_Unref to ‘release’ it.

    If ‘anode’ is NULL, the cache node is left unchanged, which means that the FT_Glyph 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!

    Calls to FT_Set_Char_Size and friends have no effect on cached glyphs; you should always use the FreeType cache API instead.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_SBit

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  typedef struct FTC_SBitRec_*  FTC_SBit;
    -
    -

    -
    -

    A handle to a small bitmap descriptor. See the FTC_SBitRec structure for details.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_SBitRec

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_SBitRec

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       typedef struct  FTC_SBitRec_
       {
         FT_Byte   width;
    @@ -941,176 +912,51 @@ Defined in FT_CACHE_H (ftcache.h).
         FT_Byte*  buffer;
     
       } FTC_SBitRec;
    +
    -

    -

    A very compact structure used to describe a small glyph bitmap.

    -

    -
    fields
    -

    - -
    width + +

    fields

    + + - - - - - - - - -
    width

    The bitmap width in pixels.

    height +
    height

    The bitmap height in pixels.

    left +
    left

    The horizontal distance from the pen position to the left bitmap border (a.k.a. ‘left side bearing’, or ‘lsb’).

    top +
    top

    The vertical distance from the pen position (on the baseline) to the upper bitmap border (a.k.a. ‘top side bearing’). The distance is positive for upwards y coordinates.

    format +
    format

    The format of the glyph bitmap (monochrome or gray).

    max_grays +
    max_grays

    Maximum gray level value (in the range 1 to 255).

    pitch +
    pitch

    The number of bytes per bitmap line. May be positive or negative.

    xadvance +
    xadvance

    The horizontal advance width in pixels.

    yadvance +
    yadvance

    The vertical advance height in pixels.

    buffer +
    buffer

    A pointer to the bitmap pixels.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FTC_SBitCache

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  typedef struct FTC_SBitCacheRec_*  FTC_SBitCache;
    -
    -

    -
    -

    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 FTC_ImageCache.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_SBitCache_New

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FTC_SBitCache_New( FTC_Manager     manager,
    -                     FTC_SBitCache  *acache );
    -
    -

    -
    -

    Create a new cache to store small glyph bitmaps.

    -

    -
    input
    -

    - - -
    manager -

    A handle to the source cache manager.

    -
    -
    -
    output
    -

    - - -
    acache -

    A handle to the new sbit cache. NULL in case of error.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_SBitCache_Lookup

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FTC_SBitCache_Lookup( FTC_SBitCache    cache,
    -                        FTC_ImageType    type,
    -                        FT_UInt          gindex,
    -                        FTC_SBit        *sbit,
    -                        FTC_Node        *anode );
    -
    -

    -
    -

    Look up a given small glyph bitmap in a given sbit cache and ‘lock’ it to prevent its flushing from the cache until needed.

    -

    -
    input
    -

    - - - - -
    cache -

    A handle to the source sbit cache.

    -
    type -

    A pointer to the glyph image type descriptor.

    -
    gindex -

    The glyph index.

    -
    -
    -
    output
    -

    - - - -
    sbit -

    A handle to a small bitmap descriptor.

    -
    anode -

    Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    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.

    -

    The descriptor's ‘buffer’ field is set to 0 to indicate a missing glyph bitmap.

    -

    If ‘anode’ is not 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 FTC_Node_Unref to ‘release’ it.

    -

    If ‘anode’ 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!

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FTC_SBitCache_LookupScaler

    -
    -Defined in FT_CACHE_H (ftcache.h). -

    -
    +
    + +
    +

    FTC_SBitCache_LookupScaler

    +

    Defined in FT_CACHE_H (ftcache.h).

    +
       FT_EXPORT( FT_Error )
       FTC_SBitCache_LookupScaler( FTC_SBitCache  cache,
                                   FTC_Scaler     scaler,
    @@ -1118,53 +964,47 @@ Defined in FT_CACHE_H (ftcache.h).
                                   FT_UInt        gindex,
                                   FTC_SBit      *sbit,
                                   FTC_Node      *anode );
    +
    -

    -

    A variant of FTC_SBitCache_Lookup that uses an FTC_ScalerRec to specify the face ID and its size.

    -

    -
    input
    -

    - -
    cache + +

    input

    + + - - -
    cache

    A handle to the source sbit cache.

    scaler +
    scaler

    A pointer to the scaler descriptor.

    load_flags +
    load_flags

    The corresponding load flags.

    gindex +
    gindex

    The glyph index.

    -
    -
    output
    -

    - -
    sbit + +

    output

    + + -
    sbit

    A handle to a small bitmap descriptor.

    anode +
    anode

    Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    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.

    The descriptor's ‘buffer’ field is set to 0 to indicate a missing glyph bitmap.

    If ‘anode’ is not 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 FTC_Node_Unref to ‘release’ it.

    If ‘anode’ 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!

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-cff_driver.html b/freetype/docs/reference/ft2-cff_driver.html index a4b6b880..f1de5661 100644 --- a/freetype/docs/reference/ft2-cff_driver.html +++ b/freetype/docs/reference/ft2-cff_driver.html @@ -3,50 +3,113 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -The CFF driver -

    +

    The CFF driver

    Synopsis

    - - - -
    hinting-engineno-stem-darkening
    FT_CFF_HINTING_XXXdarkening-parameters


    + + + +
    hinting-enginedarkening-parametersFT_CFF_HINTING_XXX
    no-stem-darkening 
    + -

    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

    @@ -57,10 +120,10 @@ The CFF driver

    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.

    -

    -
    -

    hinting-engine

    -
    + +
    +

    hinting-engine

    +

    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).

    @@ -74,51 +137,16 @@ The CFF driver FT_Property_Set( library, "cff", "hinting-engine", &hinting_engine ); -

    -
    note
    + +

    note

    This property can be used with FT_Property_Get also.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CFF_HINTING_XXX

    -
    -Defined in FT_CFF_DRIVER_H (ftcffdrv.h). -

    -
    +
    + -#define FT_CFF_HINTING_FREETYPE 0 -#define FT_CFF_HINTING_ADOBE 1 +
    +

    no-stem-darkening

    -

    -
    -

    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.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    no-stem-darkening

    -

    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.

    @@ -131,19 +159,16 @@ Defined in FT_CFF_DRIVER_H (ftcffdrv.h).
       FT_Property_Set( library, "cff",
                                 "no-stem-darkening", &no_stem_darkening );
     
    -

    -
    note
    -

    This property can be used with FT_Property_Get also.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    darkening-parameters

    -
    +

    note

    +

    This property can be used with FT_Property_Get also.

    + +
    + + +
    +

    darkening-parameters

    +

    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
    @@ -151,7 +176,7 @@ Defined in FT_CFF_DRIVER_H (ftcffdrv.h).
       stem width  = 1.667px: darkening amount = 0.275px
       stem width >= 2.333px: darkening amount = 0px
     
    -

    and piecewise linear in-between. Using the ‘darkening-parameters’ property, these four control points can be changed, as the following example demonstrates.

    +

    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
    @@ -166,15 +191,35 @@ Defined in FT_CFF_DRIVER_H (ftcffdrv.h).
                                 "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
    + +

    note

    This property can be used with FT_Property_Get also.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + + +
    +

    FT_CFF_HINTING_XXX

    +

    Defined in FT_CFF_DRIVER_H (ftcffdrv.h).

    +
    +#define FT_CFF_HINTING_FREETYPE  0
    +#define FT_CFF_HINTING_ADOBE     1
    +
    + +

    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.

    +
    + +
    +
    diff --git a/freetype/docs/reference/ft2-cid_fonts.html b/freetype/docs/reference/ft2-cid_fonts.html index 59837d5d..cb0b506f 100644 --- a/freetype/docs/reference/ft2-cid_fonts.html +++ b/freetype/docs/reference/ft2-cid_fonts.html @@ -3,202 +3,238 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -CID Fonts -

    +

    CID Fonts

    Synopsis

    - - - - -
    FT_Get_CID_Registry_Ordering_Supplement
    FT_Get_CID_Is_Internally_CID_Keyed
    FT_Get_CID_From_Glyph_Index


    + + + + +
    FT_Get_CID_Registry_Ordering_Supplement
    FT_Get_CID_Is_Internally_CID_Keyed
    FT_Get_CID_From_Glyph_Index
    + -

    This section contains the declaration of CID-keyed font specific functions.

    -

    -
    -

    FT_Get_CID_Registry_Ordering_Supplement

    -
    -Defined in FT_CID_H (ftcid.h). -

    -
     
    +
    +

    FT_Get_CID_Registry_Ordering_Supplement

    +

    Defined in FT_CID_H (ftcid.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_CID_Registry_Ordering_Supplement( FT_Face       face,
                                                const char*  *registry,
                                                const char*  *ordering,
                                                FT_Int       *supplement);
    +
    -

    -

    Retrieve the Registry/Ordering/Supplement triple (also known as the "R/O/S") from a CID-keyed font.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    A handle to the input face.

    -
    -
    output
    -

    - -
    registry + +

    output

    + + - -
    registry

    The registry, as a C string, owned by the face.

    ordering +
    ordering

    The ordering, as a C string, owned by the face.

    supplement +
    supplement

    The supplement.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function only works with CID faces, returning an error otherwise.

    -
    -
    since
    + +

    since

    2.3.6

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_CID_Is_Internally_CID_Keyed

    -
    -Defined in FT_CID_H (ftcid.h). -

    -
    +
    + +
    +

    FT_Get_CID_Is_Internally_CID_Keyed

    +

    Defined in FT_CID_H (ftcid.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_CID_Is_Internally_CID_Keyed( FT_Face   face,
                                           FT_Bool  *is_cid );
    +
    -

    -

    Retrieve the type of the input face, CID keyed or not. In constrast to the FT_IS_CID_KEYED macro this function returns successfully also for CID-keyed fonts in an SNFT wrapper.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    A handle to the input face.

    -
    -
    output
    -

    - -
    is_cid + +

    output

    + +
    is_cid

    The type of the face as an FT_Bool.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function only works with CID faces and OpenType fonts, returning an error otherwise.

    -
    -
    since
    + +

    since

    2.3.9

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_CID_From_Glyph_Index

    -
    -Defined in FT_CID_H (ftcid.h). -

    -
    +
    + +
    +

    FT_Get_CID_From_Glyph_Index

    +

    Defined in FT_CID_H (ftcid.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_CID_From_Glyph_Index( FT_Face   face,
                                    FT_UInt   glyph_index,
                                    FT_UInt  *cid );
    +
    -

    -

    Retrieve the CID of the input glyph index.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the input face.

    glyph_index +
    glyph_index

    The input glyph index.

    -
    -
    output
    -

    - -
    cid + +

    output

    + +
    cid

    The CID as an FT_UInt.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function only works with CID faces and OpenType fonts, returning an error otherwise.

    -
    -
    since
    + +

    since

    2.3.9

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-computations.html b/freetype/docs/reference/ft2-computations.html index 361498ec..a7771ef4 100644 --- a/freetype/docs/reference/ft2-computations.html +++ b/freetype/docs/reference/ft2-computations.html @@ -3,830 +3,698 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Computations -

    +

    Computations

    Synopsis

    - - - - - - - - - -
    FT_MulDivFT_Matrix_InvertFT_Tan
    FT_MulFixFT_AngleFT_Atan2
    FT_DivFixFT_ANGLE_PIFT_Angle_Diff
    FT_RoundFixFT_ANGLE_2PIFT_Vector_Unit
    FT_CeilFixFT_ANGLE_PI2FT_Vector_Rotate
    FT_FloorFixFT_ANGLE_PI4FT_Vector_Length
    FT_Vector_TransformFT_SinFT_Vector_Polarize
    FT_Matrix_MultiplyFT_CosFT_Vector_From_Polar


    + + + + + + + + + + +
    FT_MulDiv FT_Atan2
    FT_MulFixFT_AngleFT_Angle_Diff
    FT_DivFixFT_ANGLE_PIFT_Vector_Unit
    FT_RoundFixFT_ANGLE_2PIFT_Vector_Rotate
    FT_CeilFixFT_ANGLE_PI2FT_Vector_Length
    FT_FloorFixFT_ANGLE_PI4FT_Vector_Polarize
    FT_Vector_TransformFT_SinFT_Vector_From_Polar
    FT_Matrix_MultiplyFT_Cos
    FT_Matrix_InvertFT_Tan
    + -

    This section contains various functions used to perform computations on 16.16 fixed-float numbers or 2d vectors.

    -

    -
    -

    FT_MulDiv

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
     
    +
    +

    FT_MulDiv

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Long )
       FT_MulDiv( FT_Long  a,
                  FT_Long  b,
                  FT_Long  c );
    +
    -

    -

    A very simple function used to perform the computation ‘(a*b)/c’ with maximum accuracy (it uses a 64-bit intermediate integer whenever necessary).

    This function isn't necessarily as fast as some processor specific operations, but is at least completely portable.

    -

    -
    input
    -

    - -
    a + +

    input

    + + - -
    a

    The first multiplier.

    b +
    b

    The second multiplier.

    c +
    c

    The divisor.

    -
    -
    return
    + +

    return

    The result of ‘(a*b)/c’. This function never traps when trying to divide by zero; it simply returns ‘MaxInt’ or ‘MinInt’ depending on the signs of ‘a’ and ‘b’.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_MulFix

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_MulFix

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Long )
       FT_MulFix( FT_Long  a,
                  FT_Long  b );
    +
    -

    -

    A very simple function used to perform the computation ‘(a*b)/0x10000’ with maximum accuracy. Most of the time this is used to multiply a given value by a 16.16 fixed-point factor.

    -

    -
    input
    -

    - -
    a + +

    input

    + + -
    a

    The first multiplier.

    b +
    b

    The second multiplier. Use a 16.16 factor here whenever possible (see note below).

    -
    -
    return
    + +

    return

    The result of ‘(a*b)/0x10000’.

    -
    -
    note
    + +

    note

    This function has been optimized for the case where the absolute value of ‘a’ is less than 2048, and ‘b’ 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.

    As a conclusion, always try to place a 16.16 factor as the second argument of this function; this can make a great difference.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_DivFix

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_DivFix

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Long )
       FT_DivFix( FT_Long  a,
                  FT_Long  b );
    +
    -

    -

    A very simple function used to perform the computation ‘(a*0x10000)/b’ with maximum accuracy. Most of the time, this is used to divide a given value by a 16.16 fixed-point factor.

    -

    -
    input
    -

    - -
    a -

    The first multiplier.

    + +

    input

    + + -
    a +

    The numerator.

    b -

    The second multiplier. Use a 16.16 factor here whenever possible (see note below).

    +
    b +

    The denominator. Use a 16.16 factor here.

    -
    -
    return
    + +

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_RoundFix

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_RoundFix

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Fixed )
       FT_RoundFix( FT_Fixed  a );
    +
    -

    -

    A very simple function used to round a 16.16 fixed number.

    -

    -
    input
    -

    - -
    a + +

    input

    + +
    a

    The number to be rounded.

    -
    -
    return
    + +

    return

    The result of ‘(a + 0x8000) & -0x10000’.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CeilFix

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_CeilFix

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Fixed )
       FT_CeilFix( FT_Fixed  a );
    +
    -

    -

    A very simple function used to compute the ceiling function of a 16.16 fixed number.

    -

    -
    input
    -

    - -
    a + +

    input

    + +
    a

    The number for which the ceiling function is to be computed.

    -
    -
    return
    + +

    return

    The result of ‘(a + 0x10000 - 1) & -0x10000’.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_FloorFix

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_FloorFix

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Fixed )
       FT_FloorFix( FT_Fixed  a );
    +
    -

    -

    A very simple function used to compute the floor function of a 16.16 fixed number.

    -

    -
    input
    -

    - -
    a + +

    input

    + +
    a

    The number for which the floor function is to be computed.

    -
    -
    return
    + +

    return

    The result of ‘a & -0x10000’.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Vector_Transform

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Vector_Transform

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( void )
       FT_Vector_Transform( FT_Vector*        vec,
                            const FT_Matrix*  matrix );
    +
    -

    -

    Transform a single vector through a 2x2 matrix.

    -

    -
    inout
    -

    - -
    vector + +

    inout

    + +
    vector

    The target vector to transform.

    -
    -
    input
    -

    - -
    matrix + +

    input

    + +
    matrix

    A pointer to the source 2x2 matrix.

    -
    -
    note
    + +

    note

    The result is undefined if either ‘vector’ or ‘matrix’ is invalid.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Matrix_Multiply

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_Matrix_Multiply

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       FT_EXPORT( void )
       FT_Matrix_Multiply( const FT_Matrix*  a,
                           FT_Matrix*        b );
    +
    -

    -

    Perform the matrix operation ‘b = a*b’.

    -

    -
    input
    -

    - -
    a + +

    input

    + +
    a

    A pointer to matrix ‘a’.

    -
    -
    inout
    -

    - -
    b + +

    inout

    + +
    b

    A pointer to matrix ‘b’.

    -
    -
    note
    + +

    note

    The result is undefined if either ‘a’ or ‘b’ is zero.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Matrix_Invert

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_Matrix_Invert

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       FT_EXPORT( FT_Error )
       FT_Matrix_Invert( FT_Matrix*  matrix );
    +
    -

    -

    Invert a 2x2 matrix. Return an error if it can't be inverted.

    -

    -
    inout
    -

    - -
    matrix + +

    inout

    + +
    matrix

    A pointer to the target matrix. Remains untouched in case of error.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Angle

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Angle

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       typedef FT_Fixed  FT_Angle;
    +
    -

    -

    This type is used to model angle values in FreeType. Note that the angle is a 16.16 fixed-point value expressed in degrees.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ANGLE_PI

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_ANGLE_PI

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
     #define FT_ANGLE_PI  ( 180L << 16 )
    +
    -

    -

    The angle pi expressed in FT_Angle units.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ANGLE_2PI

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_ANGLE_2PI

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
     #define FT_ANGLE_2PI  ( FT_ANGLE_PI * 2 )
    +
    -

    -

    The angle 2*pi expressed in FT_Angle units.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ANGLE_PI2

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_ANGLE_PI2

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
     #define FT_ANGLE_PI2  ( FT_ANGLE_PI / 2 )
    +
    -

    -

    The angle pi/2 expressed in FT_Angle units.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ANGLE_PI4

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_ANGLE_PI4

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
     #define FT_ANGLE_PI4  ( FT_ANGLE_PI / 4 )
    +
    -

    -

    The angle pi/4 expressed in FT_Angle units.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Sin

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Sin

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       FT_EXPORT( FT_Fixed )
       FT_Sin( FT_Angle  angle );
    +
    -

    -

    Return the sinus of a given angle in fixed-point format.

    -

    -
    input
    -

    - -
    angle + +

    input

    + +
    angle

    The input angle.

    -
    -
    return
    + +

    return

    The sinus value.

    -
    -
    note
    + +

    note

    If you need both the sinus and cosinus for a given angle, use the function FT_Vector_Unit.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Cos

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Cos

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       FT_EXPORT( FT_Fixed )
       FT_Cos( FT_Angle  angle );
    +
    -

    -

    Return the cosinus of a given angle in fixed-point format.

    -

    -
    input
    -

    - -
    angle + +

    input

    + +
    angle

    The input angle.

    -
    -
    return
    + +

    return

    The cosinus value.

    -
    -
    note
    + +

    note

    If you need both the sinus and cosinus for a given angle, use the function FT_Vector_Unit.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Tan

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Tan

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       FT_EXPORT( FT_Fixed )
       FT_Tan( FT_Angle  angle );
    +
    -

    -

    Return the tangent of a given angle in fixed-point format.

    -

    -
    input
    -

    - -
    angle + +

    input

    + +
    angle

    The input angle.

    -
    -
    return
    + +

    return

    The tangent value.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Atan2

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Atan2

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       FT_EXPORT( FT_Angle )
       FT_Atan2( FT_Fixed  x,
                 FT_Fixed  y );
    +
    -

    -

    Return the arc-tangent corresponding to a given vector (x,y) in the 2d plane.

    -

    -
    input
    -

    - -
    x + +

    input

    + + -
    x

    The horizontal vector coordinate.

    y +
    y

    The vertical vector coordinate.

    -
    -
    return
    + +

    return

    The arc-tangent value (i.e. angle).

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Angle_Diff

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Angle_Diff

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       FT_EXPORT( FT_Angle )
       FT_Angle_Diff( FT_Angle  angle1,
                      FT_Angle  angle2 );
    +
    -

    -

    Return the difference between two angles. The result is always constrained to the ]-PI..PI] interval.

    -

    -
    input
    -

    - -
    angle1 + +

    input

    + + -
    angle1

    First angle.

    angle2 +
    angle2

    Second angle.

    -
    -
    return
    + +

    return

    Constrained value of ‘value2-value1’.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Vector_Unit

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Vector_Unit

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       FT_EXPORT( void )
       FT_Vector_Unit( FT_Vector*  vec,
                       FT_Angle    angle );
    +
    -

    -

    Return the unit vector corresponding to a given angle. After the call, the value of ‘vec.x’ will be ‘sin(angle)’, and the value of ‘vec.y’ will be ‘cos(angle)’.

    This function is useful to retrieve both the sinus and cosinus of a given angle quickly.

    -

    -
    output
    -

    - -
    vec + +

    output

    + +
    vec

    The address of target vector.

    -
    -
    input
    -

    - -
    angle -

    The address of angle.

    + +

    input

    + +
    angle +

    The input angle.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Vector_Rotate

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Vector_Rotate

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       FT_EXPORT( void )
       FT_Vector_Rotate( FT_Vector*  vec,
                         FT_Angle    angle );
    +
    -

    -

    Rotate a vector by a given angle.

    -

    -
    inout
    -

    - -
    vec + +

    inout

    + +
    vec

    The address of target vector.

    -
    -
    input
    -

    - -
    angle -

    The address of angle.

    + +

    input

    + +
    angle +

    The input angle.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Vector_Length

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Vector_Length

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       FT_EXPORT( FT_Fixed )
       FT_Vector_Length( FT_Vector*  vec );
    +
    -

    -

    Return the length of a given vector.

    -

    -
    input
    -

    - -
    vec + +

    input

    + +
    vec

    The address of target vector.

    -
    -
    return
    + +

    return

    The vector length, expressed in the same units that the original vector coordinates.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Vector_Polarize

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Vector_Polarize

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       FT_EXPORT( void )
       FT_Vector_Polarize( FT_Vector*  vec,
                           FT_Fixed   *length,
                           FT_Angle   *angle );
    +
    -

    -

    Compute both the length and angle of a given vector.

    -

    -
    input
    -

    - -
    vec + +

    input

    + +
    vec

    The address of source vector.

    -
    -
    output
    -

    - -
    length + +

    output

    + + -
    length

    The vector length.

    angle +
    angle

    The vector angle.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Vector_From_Polar

    -
    -Defined in FT_TRIGONOMETRY_H (fttrigon.h). -

    -
    +
    + +
    +

    FT_Vector_From_Polar

    +

    Defined in FT_TRIGONOMETRY_H (fttrigon.h).

    +
       FT_EXPORT( void )
       FT_Vector_From_Polar( FT_Vector*  vec,
                             FT_Fixed    length,
                             FT_Angle    angle );
    +
    -

    -

    Compute vector coordinates from a length and angle.

    -

    -
    output
    -

    - -
    vec + +

    output

    + +
    vec

    The address of source vector.

    -
    -
    input
    -

    - -
    length + +

    input

    + + -
    length

    The vector length.

    angle +
    angle

    The vector angle.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-font_formats.html b/freetype/docs/reference/ft2-font_formats.html index 1a641253..508cee2a 100644 --- a/freetype/docs/reference/ft2-font_formats.html +++ b/freetype/docs/reference/ft2-font_formats.html @@ -3,82 +3,137 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Font Formats -

    +

    Font Formats

    Synopsis

    - - -
    FT_Get_X11_Font_Format


    + + +
    FT_Get_X11_Font_Format
    + -

    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.

    This function is in the X11/xf86 namespace for historical reasons and in no way depends on that windowing system.

    -

    -
    -

    FT_Get_X11_Font_Format

    -
    -Defined in FT_XFREE86_H (ftxf86.h). -

    -
     
    +
    +

    FT_Get_X11_Font_Format

    +

    Defined in FT_XFREE86_H (ftxf86.h).

    +
       FT_EXPORT( const char* )
       FT_Get_X11_Font_Format( FT_Face  face );
    +
    -

    -

    Return a string describing the format of a given face, using values 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’.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    Input face handle.

    -
    -
    return
    + +

    return

    Font format string. NULL in case of error.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-gasp_table.html b/freetype/docs/reference/ft2-gasp_table.html index bf3bba83..3b56119a 100644 --- a/freetype/docs/reference/ft2-gasp_table.html +++ b/freetype/docs/reference/ft2-gasp_table.html @@ -3,140 +3,185 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Gasp Table -

    +

    Gasp Table

    Synopsis

    - - -
    FT_GASP_XXXFT_Get_Gasp


    + + +
    FT_GASP_XXXFT_Get_Gasp
    + -

    The function FT_Get_Gasp can be used to query a TrueType or OpenType font for specific entries in its ‘gasp’ table, if any. This is mainly useful when implementing native TrueType hinting with the bytecode interpreter to duplicate the Windows text rendering results.

    -

    -
    -

    FT_GASP_XXX

    -
    -Defined in FT_GASP_H (ftgasp.h). -

    -
     
    -#define FT_GASP_NO_TABLE               -1
    -#define FT_GASP_DO_GRIDFIT           0x01
    -#define FT_GASP_DO_GRAY              0x02
    -#define FT_GASP_SYMMETRIC_SMOOTHING  0x08
    -#define FT_GASP_SYMMETRIC_GRIDFIT    0x10
    +
    +

    FT_GASP_XXX

    +

    Defined in FT_GASP_H (ftgasp.h).

    +
    +#define FT_GASP_NO_TABLE               -1
    +#define FT_GASP_DO_GRIDFIT           0x01
    +#define FT_GASP_DO_GRAY              0x02
    +#define FT_GASP_SYMMETRIC_SMOOTHING  0x08
    +#define FT_GASP_SYMMETRIC_GRIDFIT    0x10
    +
    -

    -

    A list of values and/or bit-flags returned by the FT_Get_Gasp function.

    -

    -
    values
    -

    - -
    FT_GASP_NO_TABLE + +

    values

    + + - - - - - -
    FT_GASP_NO_TABLE

    This special value means that there is no GASP table in this face. It is up to the client to decide what to do.

    FT_GASP_DO_GRIDFIT +
    FT_GASP_DO_GRIDFIT

    Grid-fitting and hinting should be performed at the specified ppem. This really means TrueType bytecode interpretation. If this bit is not set, no hinting gets applied.

    FT_GASP_DO_GRAY +
    FT_GASP_DO_GRAY

    Anti-aliased rendering should be performed at the specified ppem. If not set, do monochrome rendering.

    FT_GASP_SYMMETRIC_SMOOTHING
    +
    FT_GASP_SYMMETRIC_SMOOTHING

    If set, smoothing along multiple axes must be used with ClearType.

    FT_GASP_SYMMETRIC_GRIDFIT
    +
    FT_GASP_SYMMETRIC_GRIDFIT

    Grid-fitting must be used with ClearType's symmetric smoothing.

    -
    -
    note
    + +

    note

    The bit-flags ‘FT_GASP_DO_GRIDFIT’ and ‘FT_GASP_DO_GRAY’ are to be used for standard font rasterization only. Independently of that, ‘FT_GASP_SYMMETRIC_SMOOTHING’ and ‘FT_GASP_SYMMETRIC_GRIDFIT’ are to be used if ClearType is enabled (and ‘FT_GASP_DO_GRIDFIT’ and ‘FT_GASP_DO_GRAY’ are consequently ignored).

    ‘ClearType’ is Microsoft's implementation of LCD rendering, partly protected by patents.

    -
    -
    since
    + +

    since

    2.3.0

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_Gasp

    -
    -Defined in FT_GASP_H (ftgasp.h). -

    -
    +
    + +
    +

    FT_Get_Gasp

    +

    Defined in FT_GASP_H (ftgasp.h).

    +
       FT_EXPORT( FT_Int )
       FT_Get_Gasp( FT_Face  face,
                    FT_UInt  ppem );
    +
    -

    -

    Read the ‘gasp’ table from a TrueType or OpenType font file and return the entry corresponding to a given character pixel size.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    The source face handle.

    ppem +
    ppem

    The vertical character pixel size.

    -
    -
    return
    + +

    return

    Bit flags (see FT_GASP_XXX), or FT_GASP_NO_TABLE if there is no ‘gasp’ table in the face.

    -
    -
    since
    + +

    since

    2.3.0

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-glyph_management.html b/freetype/docs/reference/ft2-glyph_management.html index 940b429f..017db1f1 100644 --- a/freetype/docs/reference/ft2-glyph_management.html +++ b/freetype/docs/reference/ft2-glyph_management.html @@ -3,84 +3,137 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Glyph Management -

    +

    Glyph Management

    Synopsis

    - - - - - - -
    FT_GlyphFT_OutlineGlyphRecft_glyph_bbox_xxx
    FT_GlyphRecFT_Get_GlyphFT_Glyph_Get_CBox
    FT_BitmapGlyphFT_Glyph_CopyFT_Glyph_To_Bitmap
    FT_BitmapGlyphRecFT_Glyph_TransformFT_Done_Glyph
    FT_OutlineGlyphFT_Glyph_BBox_Mode


    + + + + + + +
    FT_GlyphFT_OutlineGlyphRecFT_Glyph_Get_CBox
    FT_GlyphRecFT_Get_GlyphFT_Glyph_To_Bitmap
    FT_BitmapGlyphFT_Glyph_CopyFT_Done_Glyph
    FT_BitmapGlyphRecFT_Glyph_Transform
    FT_OutlineGlyphFT_Glyph_BBox_Mode
    + -

    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.

    -

    -
    -

    FT_Glyph

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
     
    +
    +

    FT_Glyph

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       typedef struct FT_GlyphRec_*  FT_Glyph;
    +
    -

    -

    Handle to an object used to model generic glyph images. It is a pointer to the FT_GlyphRec structure and can contain a glyph bitmap or pointer.

    -

    -
    note
    + +

    note

    Glyph objects are not owned by the library. You must thus release them manually (through FT_Done_Glyph) before calling FT_Done_FreeType.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_GlyphRec

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_GlyphRec

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       typedef struct  FT_GlyphRec_
       {
         FT_Library             library;
    @@ -89,60 +142,45 @@ Defined in FT_GLYPH_H (ftglyph.h).
         FT_Vector              advance;
     
       } FT_GlyphRec;
    +
    -

    -

    The root glyph structure contains a given glyph image plus its advance width in 16.16 fixed-point format.

    -

    -
    fields
    -

    - -
    library + +

    fields

    + + - - -
    library

    A handle to the FreeType library object.

    clazz +
    clazz

    A pointer to the glyph's class. Private.

    format +
    format

    The format of the glyph's image.

    advance +
    advance

    A 16.16 vector that gives the glyph's advance width.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_BitmapGlyph

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_BitmapGlyph

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       typedef struct FT_BitmapGlyphRec_*  FT_BitmapGlyph;
    +
    -

    -

    A handle to an object used to model a bitmap glyph image. This is a sub-class of FT_Glyph, and a pointer to FT_BitmapGlyphRec.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_BitmapGlyphRec

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_BitmapGlyphRec

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       typedef struct  FT_BitmapGlyphRec_
       {
         FT_GlyphRec  root;
    @@ -151,353 +189,256 @@ Defined in FT_GLYPH_H (ftglyph.h).
         FT_Bitmap    bitmap;
     
       } FT_BitmapGlyphRec;
    +
    -

    -

    A structure used for bitmap glyph images. This really is a ‘sub-class’ of FT_GlyphRec.

    -

    -
    fields
    -

    - -
    root + +

    fields

    + + - - -
    root

    The root FT_Glyph fields.

    left +
    left

    The left-side bearing, i.e., the horizontal distance from the current pen position to the left border of the glyph bitmap.

    top +
    top

    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 y!

    bitmap +
    bitmap

    A descriptor for the bitmap.

    -
    -
    note
    + +

    note

    You can typecast an FT_Glyph to FT_BitmapGlyph if you have ‘glyph->format == FT_GLYPH_FORMAT_BITMAP’. This lets you access the bitmap's contents easily.

    The corresponding pixel buffer is always owned by FT_BitmapGlyph and is thus created and destroyed with it.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_OutlineGlyph

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_OutlineGlyph

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       typedef struct FT_OutlineGlyphRec_*  FT_OutlineGlyph;
    +
    -

    -

    A handle to an object used to model an outline glyph image. This is a sub-class of FT_Glyph, and a pointer to FT_OutlineGlyphRec.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_OutlineGlyphRec

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_OutlineGlyphRec

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       typedef struct  FT_OutlineGlyphRec_
       {
         FT_GlyphRec  root;
         FT_Outline   outline;
     
       } FT_OutlineGlyphRec;
    +
    -

    -

    A structure used for outline (vectorial) glyph images. This really is a ‘sub-class’ of FT_GlyphRec.

    -

    -
    fields
    -

    - -
    root + +

    fields

    + + -
    root

    The root FT_Glyph fields.

    outline +
    outline

    A descriptor for the outline.

    -
    -
    note
    + +

    note

    You can typecast an FT_Glyph to FT_OutlineGlyph if you have ‘glyph->format == FT_GLYPH_FORMAT_OUTLINE’. This lets you access the outline's content easily.

    As the outline is extracted from a glyph slot, its coordinates are expressed normally in 26.6 pixels, unless the flag FT_LOAD_NO_SCALE was used in FT_Load_Glyph() or FT_Load_Char().

    The outline's tables are always owned by the object and are destroyed with it.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_Glyph

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_Get_Glyph

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_Glyph( FT_GlyphSlot  slot,
                     FT_Glyph     *aglyph );
    +
    -

    -

    A function used to extract a glyph image from a slot. Note that the created FT_Glyph object must be released with FT_Done_Glyph.

    -

    -
    input
    -

    - -
    slot + +

    input

    + +
    slot

    A handle to the source glyph slot.

    -
    -
    output
    -

    - -
    aglyph + +

    output

    + +
    aglyph

    A handle to the glyph object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Glyph_Copy

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_Glyph_Copy

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       FT_EXPORT( FT_Error )
       FT_Glyph_Copy( FT_Glyph   source,
                      FT_Glyph  *target );
    +
    -

    -

    A function used to copy a glyph image. Note that the created FT_Glyph object must be released with FT_Done_Glyph.

    -

    -
    input
    -

    - -
    source + +

    input

    + +
    source

    A handle to the source glyph object.

    -
    -
    output
    -

    - -
    target + +

    output

    + +
    target

    A handle to the target glyph object. 0 in case of error.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Glyph_Transform

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_Glyph_Transform

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       FT_EXPORT( FT_Error )
       FT_Glyph_Transform( FT_Glyph    glyph,
                           FT_Matrix*  matrix,
                           FT_Vector*  delta );
    +
    -

    -

    Transform a glyph image if its format is scalable.

    -

    -
    inout
    -

    - -
    glyph + +

    inout

    + +
    glyph

    A handle to the target glyph object.

    -
    -
    input
    -

    - -
    matrix + +

    input

    + + -
    matrix

    A pointer to a 2x2 matrix to apply.

    delta +
    delta

    A pointer to a 2d vector to apply. Coordinates are expressed in 1/64th of a pixel.

    -
    -
    return
    + +

    return

    FreeType error code (if not 0, the glyph format is not scalable).

    -
    -
    note
    + +

    note

    The 2x2 transformation matrix is also applied to the glyph's advance vector.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Glyph_BBox_Mode

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_Glyph_BBox_Mode

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       typedef enum  FT_Glyph_BBox_Mode_
       {
    -    FT_GLYPH_BBOX_UNSCALED  = 0,
    -    FT_GLYPH_BBOX_SUBPIXELS = 0,
    -    FT_GLYPH_BBOX_GRIDFIT   = 1,
    -    FT_GLYPH_BBOX_TRUNCATE  = 2,
    -    FT_GLYPH_BBOX_PIXELS    = 3
    +    FT_GLYPH_BBOX_UNSCALED  = 0,
    +    FT_GLYPH_BBOX_SUBPIXELS = 0,
    +    FT_GLYPH_BBOX_GRIDFIT   = 1,
    +    FT_GLYPH_BBOX_TRUNCATE  = 2,
    +    FT_GLYPH_BBOX_PIXELS    = 3
     
       } FT_Glyph_BBox_Mode;
     
    -

    -
    + + /* 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 +#define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE +#define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS + +

    The mode how the values of FT_Glyph_Get_CBox are returned.

    -

    -
    values
    -

    - -
    FT_GLYPH_BBOX_UNSCALED + +

    values

    + + - - - - -
    FT_GLYPH_BBOX_UNSCALED

    Return unscaled font units.

    FT_GLYPH_BBOX_SUBPIXELS
    +
    FT_GLYPH_BBOX_SUBPIXELS

    Return unfitted 26.6 coordinates.

    FT_GLYPH_BBOX_GRIDFIT +
    FT_GLYPH_BBOX_GRIDFIT

    Return grid-fitted 26.6 coordinates.

    FT_GLYPH_BBOX_TRUNCATE +
    FT_GLYPH_BBOX_TRUNCATE

    Return coordinates in integer pixels.

    FT_GLYPH_BBOX_PIXELS +
    FT_GLYPH_BBOX_PIXELS

    Return grid-fitted pixel coordinates.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    ft_glyph_bbox_xxx

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    -
    -#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
    -#define ft_glyph_bbox_truncate   FT_GLYPH_BBOX_TRUNCATE
    -#define ft_glyph_bbox_pixels     FT_GLYPH_BBOX_PIXELS
    -
    -

    -
    -

    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.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Glyph_Get_CBox

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_Glyph_Get_CBox

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       FT_EXPORT( void )
       FT_Glyph_Get_CBox( FT_Glyph  glyph,
                          FT_UInt   bbox_mode,
                          FT_BBox  *acbox );
    +
    -

    -

    Return a glyph's ‘control box’. 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).

    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.

    -

    -
    input
    -

    - -
    glyph + +

    input

    + + -
    glyph

    A handle to the source glyph object.

    mode +
    mode

    The mode that indicates how to interpret the returned bounding box values.

    -
    -
    output
    -

    - -
    acbox + +

    output

    + +
    acbox

    The glyph coordinate bounding box. Coordinates are expressed in 1/64th of pixels if it is grid-fitted.

    -
    -
    note
    + +

    note

    Coordinates are relative to the glyph origin, using the y upwards convention.

    If the glyph has been loaded with FT_LOAD_NO_SCALE, ‘bbox_mode’ must be set to FT_GLYPH_BBOX_UNSCALED to get unscaled font units in 26.6 pixel format. The value FT_GLYPH_BBOX_SUBPIXELS is another name for this constant.

    If the font is tricky and the glyph has been loaded with FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get reasonable values for the CBox it is necessary to load the glyph at a large ppem value (so that the hinting instructions can properly shift and scale the subglyphs), then extracting the CBox, which can be eventually converted back to font units.

    @@ -515,56 +456,47 @@ Defined in FT_GLYPH_H (ftglyph.h).

    To get the bbox in pixel coordinates, set ‘bbox_mode’ to FT_GLYPH_BBOX_TRUNCATE.

    To get the bbox in grid-fitted pixel coordinates, set ‘bbox_mode’ to FT_GLYPH_BBOX_PIXELS.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Glyph_To_Bitmap

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_Glyph_To_Bitmap

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       FT_EXPORT( FT_Error )
       FT_Glyph_To_Bitmap( FT_Glyph*       the_glyph,
                           FT_Render_Mode  render_mode,
                           FT_Vector*      origin,
                           FT_Bool         destroy );
    +
    -

    -

    Convert a given glyph object to a bitmap glyph object.

    -

    -
    inout
    -

    - -
    the_glyph + +

    inout

    + +
    the_glyph

    A pointer to a handle to the target glyph.

    -
    -
    input
    -

    - -
    render_mode + +

    input

    + + - -
    render_mode

    An enumeration that describes how the data is rendered.

    origin +
    origin

    A pointer to a vector used to translate the glyph image before rendering. Can be 0 (if no translation). The origin is expressed in 26.6 pixels.

    destroy +
    destroy

    A boolean that indicates that the original glyph image should be destroyed by this function. It is never destroyed in case of error.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function does nothing if the glyph format isn't scalable.

    The glyph image is translated with the ‘origin’ vector before rendering.

    The first parameter is a pointer to an FT_Glyph handle, that will be replaced by this function (with newly allocated data). Typically, you would use (omitting error handling):

    @@ -634,40 +566,29 @@ Defined in FT_GLYPH_H (ftglyph.h). for ( idx = 0; i < MAX_GLYPHS; i++ ) FT_Done_Glyph( glyphs[idx] ); -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Done_Glyph

    -
    -Defined in FT_GLYPH_H (ftglyph.h). -

    -
    +
    + +
    +

    FT_Done_Glyph

    +

    Defined in FT_GLYPH_H (ftglyph.h).

    +
       FT_EXPORT( void )
       FT_Done_Glyph( FT_Glyph  glyph );
    +
    -

    -

    Destroy a given glyph.

    -

    -
    input
    -

    - -
    glyph + +

    input

    + +
    glyph

    A handle to the target glyph object.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-glyph_stroker.html b/freetype/docs/reference/ft2-glyph_stroker.html index 36080a8b..d5daa46c 100644 --- a/freetype/docs/reference/ft2-glyph_stroker.html +++ b/freetype/docs/reference/ft2-glyph_stroker.html @@ -3,938 +3,817 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Glyph Stroker -

    +

    Glyph Stroker

    Synopsis

    - - - - - - - - - - - - -
    FT_StrokerFT_Stroker_EndSubPath
    FT_Stroker_LineJoinFT_Stroker_LineTo
    FT_Stroker_LineCapFT_Stroker_ConicTo
    FT_StrokerBorderFT_Stroker_CubicTo
    FT_Outline_GetInsideBorderFT_Stroker_GetBorderCounts
    FT_Outline_GetOutsideBorderFT_Stroker_ExportBorder
    FT_Stroker_NewFT_Stroker_GetCounts
    FT_Stroker_SetFT_Stroker_Export
    FT_Stroker_RewindFT_Stroker_Done
    FT_Stroker_ParseOutlineFT_Glyph_Stroke
    FT_Stroker_BeginSubPathFT_Glyph_StrokeBorder


    + + + + + + + + + + + + + + + + +
    FT_StrokerFT_Stroker_ParseOutline
     FT_Stroker_Done
    FT_Stroker_LineJoin 
    FT_Stroker_LineCapFT_Stroker_BeginSubPath
    FT_StrokerBorderFT_Stroker_EndSubPath
      
    FT_Outline_GetInsideBorderFT_Stroker_LineTo
    FT_Outline_GetOutsideBorderFT_Stroker_ConicTo
     FT_Stroker_CubicTo
    FT_Glyph_Stroke 
    FT_Glyph_StrokeBorderFT_Stroker_GetBorderCounts
     FT_Stroker_ExportBorder
    FT_Stroker_NewFT_Stroker_GetCounts
    FT_Stroker_SetFT_Stroker_Export
    FT_Stroker_Rewind
    + -

    This component generates stroked outlines of a given vectorial glyph. It also allows you to retrieve the ‘outside’ and/or the ‘inside’ borders of the stroke.

    This can be useful to generate ‘bordered’ glyph, i.e., glyphs displayed with a coloured (and anti-aliased) border around their shape.

    -

    -
    -

    FT_Stroker

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
     
    +
    +

    FT_Stroker

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       typedef struct FT_StrokerRec_*  FT_Stroker;
    +
    -

    -
    -

    Opaque handler to a path stroker object.

    -

    -
    -
    - - -
    [Index][TOC]
    +

    Opaque handle to a path stroker object.

    -
    -

    FT_Stroker_LineJoin

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +

    -

    These values determine how two joining lines are rendered in a stroker.

    -

    -
    values
    -

    - - -
    FT_STROKER_LINEJOIN_ROUND
    + +

    values

    + + - - - - - - - -
    FT_STROKER_LINEJOIN_ROUND

    Used to render rounded line joins. Circular arcs are used to join two lines smoothly.

    FT_STROKER_LINEJOIN_BEVEL
    +
    FT_STROKER_LINEJOIN_BEVEL

    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.

    FT_STROKER_LINEJOIN_MITER_FIXED
    +
    FT_STROKER_LINEJOIN_MITER_FIXED

    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.

    FT_STROKER_LINEJOIN_MITER_VARIABLE
    +
    FT_STROKER_LINEJOIN_MITER_VARIABLE

    FT_STROKER_LINEJOIN_MITER
    +
    FT_STROKER_LINEJOIN_MITER

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_LineCap

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_LineCap

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       typedef enum  FT_Stroker_LineCap_
       {
    -    FT_STROKER_LINECAP_BUTT = 0,
    -    FT_STROKER_LINECAP_ROUND,
    -    FT_STROKER_LINECAP_SQUARE
    +    FT_STROKER_LINECAP_BUTT = 0,
    +    FT_STROKER_LINECAP_ROUND,
    +    FT_STROKER_LINECAP_SQUARE
     
       } FT_Stroker_LineCap;
    +
    -

    -

    These values determine how the end of opened sub-paths are rendered in a stroke.

    -

    -
    values
    -

    - - -
    FT_STROKER_LINECAP_BUTT
    + +

    values

    + + - - - -
    FT_STROKER_LINECAP_BUTT

    The end of lines is rendered as a full stop on the last point itself.

    FT_STROKER_LINECAP_ROUND
    +
    FT_STROKER_LINECAP_ROUND

    The end of lines is rendered as a half-circle around the last point.

    FT_STROKER_LINECAP_SQUARE
    +
    FT_STROKER_LINECAP_SQUARE

    The end of lines is rendered as a square around the last point.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_StrokerBorder

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_StrokerBorder

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       typedef enum  FT_StrokerBorder_
       {
    -    FT_STROKER_BORDER_LEFT = 0,
    -    FT_STROKER_BORDER_RIGHT
    +    FT_STROKER_BORDER_LEFT = 0,
    +    FT_STROKER_BORDER_RIGHT
     
       } FT_StrokerBorder;
    +
    -

    -

    These values are used to select a given stroke border in FT_Stroker_GetBorderCounts and FT_Stroker_ExportBorder.

    -

    -
    values
    -

    - -
    FT_STROKER_BORDER_LEFT + +

    values

    + + - -
    FT_STROKER_BORDER_LEFT

    Select the left border, relative to the drawing direction.

    FT_STROKER_BORDER_RIGHT
    +
    FT_STROKER_BORDER_RIGHT

    Select the right border, relative to the drawing direction.

    -
    -
    note
    + +

    note

    Applications are generally interested in the ‘inside’ and ‘outside’ borders. However, there is no direct mapping between these and the ‘left’ and ‘right’ ones, since this really depends on the glyph's drawing orientation, which varies between font formats.

    You can however use FT_Outline_GetInsideBorder and FT_Outline_GetOutsideBorder to get these.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_GetInsideBorder

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Outline_GetInsideBorder

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_StrokerBorder )
       FT_Outline_GetInsideBorder( FT_Outline*  outline );
    +
    -

    -

    Retrieve the FT_StrokerBorder value corresponding to the ‘inside’ borders of a given outline.

    -

    -
    input
    -

    - -
    outline + +

    input

    + +
    outline

    The source outline handle.

    -
    -
    return
    + +

    return

    The border index. FT_STROKER_BORDER_RIGHT for empty or invalid outlines.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_GetOutsideBorder

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Outline_GetOutsideBorder

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_StrokerBorder )
       FT_Outline_GetOutsideBorder( FT_Outline*  outline );
    +
    -

    -

    Retrieve the FT_StrokerBorder value corresponding to the ‘outside’ borders of a given outline.

    -

    -
    input
    -

    - -
    outline + +

    input

    + +
    outline

    The source outline handle.

    -
    -
    return
    + +

    return

    The border index. FT_STROKER_BORDER_LEFT for empty or invalid outlines.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_New

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Glyph_Stroke

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Glyph_Stroke( FT_Glyph    *pglyph,
    +                   FT_Stroker   stroker,
    +                   FT_Bool      destroy );
    +
    + +

    Stroke a given outline glyph object with a given stroker.

    + +

    inout

    + + +
    pglyph +

    Source glyph handle on input, new glyph handle on output.

    +
    + +

    input

    + + + +
    stroker +

    A stroker handle.

    +
    destroy +

    A Boolean. If 1, the source glyph object is destroyed on success.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    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_Glyph_StrokeBorder

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Glyph_StrokeBorder( FT_Glyph    *pglyph,
    +                         FT_Stroker   stroker,
    +                         FT_Bool      inside,
    +                         FT_Bool      destroy );
    +
    + +

    Stroke a given outline glyph object with a given stroker, but only return either its inside or outside border.

    + +

    inout

    + + +
    pglyph +

    Source glyph handle on input, new glyph handle on output.

    +
    + +

    input

    + + + + +
    stroker +

    A stroker handle.

    +
    inside +

    A Boolean. If 1, return the inside border, otherwise the outside border.

    +
    destroy +

    A Boolean. If 1, the source glyph object is destroyed on success.

    +
    + +

    return

    +

    FreeType error code. 0 means success.

    + +

    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_Stroker_New

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stroker_New( FT_Library   library,
                       FT_Stroker  *astroker );
    +
    -

    -

    Create a new stroker object.

    -

    -
    input
    -

    - -
    library + +

    input

    + +
    library

    FreeType library handle.

    -
    -
    output
    -

    - -
    astroker + +

    output

    + +
    astroker

    A new stroker object handle. NULL in case of error.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_Set

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_Set

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( void )
       FT_Stroker_Set( FT_Stroker           stroker,
                       FT_Fixed             radius,
                       FT_Stroker_LineCap   line_cap,
                       FT_Stroker_LineJoin  line_join,
                       FT_Fixed             miter_limit );
    +
    -

    -

    Reset a stroker object's attributes.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + + - - - -
    stroker

    The target stroker handle.

    radius +
    radius

    The border radius.

    line_cap +
    line_cap

    The line cap style.

    line_join +
    line_join

    The line join style.

    miter_limit +
    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.

    -
    -
    note
    + +

    note

    The radius is expressed in the same units as the outline coordinates.

    -
    -
    -
    - - -
    [Index][TOC]
    +

    This function calls FT_Stroker_Rewind automatically.

    -
    -

    FT_Stroker_Rewind

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_Rewind

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( void )
       FT_Stroker_Rewind( FT_Stroker  stroker );
    +
    -

    -

    Reset a stroker object without changing its attributes. You should call this function before beginning a new series of calls to FT_Stroker_BeginSubPath or FT_Stroker_EndSubPath.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + +
    stroker

    The target stroker handle.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_ParseOutline

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_ParseOutline

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stroker_ParseOutline( FT_Stroker   stroker,
                                FT_Outline*  outline,
                                FT_Bool      opened );
    +
    -

    -

    A convenience function used to parse a whole outline with the stroker. The resulting outline(s) can be retrieved later by functions like FT_Stroker_GetCounts and FT_Stroker_Export.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + + - -
    stroker

    The target stroker handle.

    outline +
    outline

    The source outline.

    opened +
    opened

    A boolean. If 1, the outline is treated as an open path instead of a closed one.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    If ‘opened’ is 0 (the default), the outline is treated as a closed path, and the stroker generates two distinct ‘border’ outlines.

    If ‘opened’ is 1, the outline is processed as an open path, and the stroker generates a single ‘stroke’ outline.

    This function calls FT_Stroker_Rewind automatically.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_BeginSubPath

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_Done

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
    +  FT_EXPORT( void )
    +  FT_Stroker_Done( FT_Stroker  stroker );
    +
    + +

    Destroy a stroker object.

    + +

    input

    + + +
    stroker +

    A stroker handle. Can be NULL.

    +
    + +
    +
    + +
    +

    FT_Stroker_BeginSubPath

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stroker_BeginSubPath( FT_Stroker  stroker,
                                FT_Vector*  to,
                                FT_Bool     open );
    +
    -

    -

    Start a new sub-path in the stroker.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + + - -
    stroker

    The target stroker handle.

    to +
    to

    A pointer to the start vector.

    open +
    open

    A boolean. If 1, the sub-path is treated as an open one.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function is useful when you need to stroke a path that is not stored as an FT_Outline object.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_EndSubPath

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_EndSubPath

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stroker_EndSubPath( FT_Stroker  stroker );
    +
    -

    -

    Close the current sub-path in the stroker.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + +
    stroker

    The target stroker handle.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    You should call this function after FT_Stroker_BeginSubPath. If the subpath was not ‘opened’, this function ‘draws’ a single line segment to the start position when needed.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_LineTo

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_LineTo

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stroker_LineTo( FT_Stroker  stroker,
                          FT_Vector*  to );
    +
    -

    -

    ‘Draw’ a single line segment in the stroker's current sub-path, from the last position.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + + -
    stroker

    The target stroker handle.

    to +
    to

    A pointer to the destination point.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    You should call this function between FT_Stroker_BeginSubPath and FT_Stroker_EndSubPath.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_ConicTo

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_ConicTo

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stroker_ConicTo( FT_Stroker  stroker,
                           FT_Vector*  control,
                           FT_Vector*  to );
    +
    -

    -

    ‘Draw’ a single quadratic Bézier in the stroker's current sub-path, from the last position.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + + - -
    stroker

    The target stroker handle.

    control +
    control

    A pointer to a Bézier control point.

    to +
    to

    A pointer to the destination point.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    You should call this function between FT_Stroker_BeginSubPath and FT_Stroker_EndSubPath.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_CubicTo

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_CubicTo

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stroker_CubicTo( FT_Stroker  stroker,
                           FT_Vector*  control1,
                           FT_Vector*  control2,
                           FT_Vector*  to );
    +
    -

    -

    ‘Draw’ a single cubic Bézier in the stroker's current sub-path, from the last position.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + + - - -
    stroker

    The target stroker handle.

    control1 +
    control1

    A pointer to the first Bézier control point.

    control2 +
    control2

    A pointer to second Bézier control point.

    to +
    to

    A pointer to the destination point.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    You should call this function between FT_Stroker_BeginSubPath and FT_Stroker_EndSubPath.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_GetBorderCounts

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_GetBorderCounts

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stroker_GetBorderCounts( FT_Stroker        stroker,
                                   FT_StrokerBorder  border,
                                   FT_UInt          *anum_points,
                                   FT_UInt          *anum_contours );
    +
    -

    -

    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 ‘border’ or ‘stroke’ outlines generated by the stroker.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + + -
    stroker

    The target stroker handle.

    border +
    border

    The border index.

    -
    -
    output
    -

    - -
    anum_points + +

    output

    + + -
    anum_points

    The number of points.

    anum_contours +
    anum_contours

    The number of contours.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    When an outline, or a sub-path, is ‘closed’, the stroker generates 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 points, while the ‘right’ border becomes empty.

    Use the function FT_Stroker_GetCounts instead if you want to retrieve the counts associated to both borders.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_ExportBorder

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_ExportBorder

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( void )
       FT_Stroker_ExportBorder( FT_Stroker        stroker,
                                FT_StrokerBorder  border,
                                FT_Outline*       outline );
    +
    -

    -

    Call this function after FT_Stroker_GetBorderCounts to export the corresponding border to your own FT_Outline structure.

    Note that this function appends the border points and contours to your outline, but does not try to resize its arrays.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + + - -
    stroker

    The target stroker handle.

    border +
    border

    The border index.

    outline +
    outline

    The target outline handle.

    -
    -
    note
    + +

    note

    Always call this function after FT_Stroker_GetBorderCounts to get sure that there is enough room in your FT_Outline object to receive all new data.

    -

    When an outline, or a sub-path, is ‘closed’, the stroker generates two independent ‘border’ outlines, named ‘left’ and ‘right’

    +

    When an outline, or a sub-path, is ‘closed’, the stroker generates 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 points, while the ‘right’ border becomes empty.

    Use the function FT_Stroker_Export instead if you want to retrieve all borders at once.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_GetCounts

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_GetCounts

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stroker_GetCounts( FT_Stroker  stroker,
                             FT_UInt    *anum_points,
                             FT_UInt    *anum_contours );
    +
    -

    -

    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.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + +
    stroker

    The target stroker handle.

    -
    -
    output
    -

    - -
    anum_points + +

    output

    + + -
    anum_points

    The number of points.

    anum_contours +
    anum_contours

    The number of contours.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_Export

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    +
    + +
    +

    FT_Stroker_Export

    +

    Defined in FT_STROKER_H (ftstroke.h).

    +
       FT_EXPORT( void )
       FT_Stroker_Export( FT_Stroker   stroker,
                          FT_Outline*  outline );
    +
    -

    -

    Call this function after FT_Stroker_GetBorderCounts to export all borders to your own FT_Outline structure.

    Note that this function appends the border points and contours to your outline, but does not try to resize its arrays.

    -

    -
    input
    -

    - -
    stroker + +

    input

    + + -
    stroker

    The target stroker handle.

    outline +
    outline

    The target outline handle.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stroker_Done

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FT_Stroker_Done( FT_Stroker  stroker );
    -
    -

    -
    -

    Destroy a stroker object.

    -

    -
    input
    -

    - - -
    stroker -

    A stroker handle. Can be NULL.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Glyph_Stroke

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Glyph_Stroke( FT_Glyph    *pglyph,
    -                   FT_Stroker   stroker,
    -                   FT_Bool      destroy );
    -
    -

    -
    -

    Stroke a given outline glyph object with a given stroker.

    -

    -
    inout
    -

    - - -
    pglyph -

    Source glyph handle on input, new glyph handle on output.

    -
    -
    -
    input
    -

    - - - -
    stroker -

    A stroker handle.

    -
    destroy -

    A Boolean. If 1, the source glyph object is destroyed on success.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Glyph_StrokeBorder

    -
    -Defined in FT_STROKER_H (ftstroke.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Glyph_StrokeBorder( FT_Glyph    *pglyph,
    -                         FT_Stroker   stroker,
    -                         FT_Bool      inside,
    -                         FT_Bool      destroy );
    -
    -

    -
    -

    Stroke a given outline glyph object with a given stroker, but only return either its inside or outside border.

    -

    -
    inout
    -

    - - -
    pglyph -

    Source glyph handle on input, new glyph handle on output.

    -
    -
    -
    input
    -

    - - - - -
    stroker -

    A stroker handle.

    -
    inside -

    A Boolean. If 1, return the inside border, otherwise the outside border.

    -
    destroy -

    A Boolean. If 1, the source glyph object is destroyed on success.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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.

    -
    -
    -
    - - -
    [Index][TOC]
    +
    + diff --git a/freetype/docs/reference/ft2-glyph_variants.html b/freetype/docs/reference/ft2-glyph_variants.html index a7d35fcf..a19db11e 100644 --- a/freetype/docs/reference/ft2-glyph_variants.html +++ b/freetype/docs/reference/ft2-glyph_variants.html @@ -3,267 +3,290 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Glyph Variants -

    +

    Glyph Variants

    Synopsis

    - - - - -
    FT_Face_GetCharVariantIndexFT_Face_GetVariantsOfChar
    FT_Face_GetCharVariantIsDefaultFT_Face_GetCharsOfVariant
    FT_Face_GetVariantSelectors


    + + + + +
    FT_Face_GetCharVariantIndexFT_Face_GetVariantsOfChar
    FT_Face_GetCharVariantIsDefaultFT_Face_GetCharsOfVariant
    FT_Face_GetVariantSelectors
    + -

    Many CJK characters have variant forms. They are a sort of grey area somewhere between being totally irrelevant and semantically distinct; for this reason, the Unicode consortium decided to introduce Ideographic Variation Sequences (IVS), consisting of a Unicode base character and one of 240 variant selectors (U+E0100-U+E01EF), instead of further extending the already huge code range for CJK characters.

    An IVS is registered and unique; for further details please refer to Unicode Technical Standard #37, the Ideographic Variation Database:

    http://www.unicode.org/reports/tr37/

    -

    To date (November 2012), the character with the most variants is U+9089, having 31 such IVS.

    +

    To date (November 2014), the character with the most variants is U+9089, having 32 such IVS.

    Adobe and MS decided to support IVS with a new cmap subtable (format 14). It is an odd subtable because it is not a mapping of input code points to glyphs, but contains lists of all variants supported by the font.

    A variant may be either ‘default’ or ‘non-default’. A default variant is the one you will get for that code point if you look it up in the standard Unicode cmap. A non-default variant is a different glyph.

    -

    -
    -

    FT_Face_GetCharVariantIndex

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
     
    +
    +

    FT_Face_GetCharVariantIndex

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_UInt )
       FT_Face_GetCharVariantIndex( FT_Face   face,
                                    FT_ULong  charcode,
                                    FT_ULong  variantSelector );
    +
    -

    -

    Return the glyph index of a given character code as modified by the variation selector.

    -

    -
    input
    -

    - -
    face + +

    input

    + + - -
    face

    A handle to the source face object.

    charcode +
    charcode

    The character code point in Unicode.

    variantSelector +
    variantSelector

    The Unicode code point of the variation selector.

    -
    -
    return
    + +

    return

    The glyph index. 0 means either ‘undefined character code’, or ‘undefined selector code’, or ‘no variation selector cmap subtable’, or ‘current CharMap is not Unicode’.

    -
    -
    note
    + +

    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’.

    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.

    -
    -
    since
    + +

    since

    2.3.6

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Face_GetCharVariantIsDefault

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Face_GetCharVariantIsDefault

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_Int )
       FT_Face_GetCharVariantIsDefault( FT_Face   face,
                                        FT_ULong  charcode,
                                        FT_ULong  variantSelector );
    +
    -

    -

    Check whether this variant of this Unicode character is the one to be found in the ‘cmap’.

    -

    -
    input
    -

    - -
    face + +

    input

    + + - -
    face

    A handle to the source face object.

    charcode +
    charcode

    The character codepoint in Unicode.

    variantSelector +
    variantSelector

    The Unicode codepoint of the variation selector.

    -
    -
    return
    + +

    return

    1 if found in the standard (Unicode) cmap, 0 if found in the variation selector cmap, or -1 if it is not a variant.

    -
    -
    note
    + +

    note

    This function is only meaningful if the font has a variation selector cmap subtable.

    -
    -
    since
    + +

    since

    2.3.6

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Face_GetVariantSelectors

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Face_GetVariantSelectors

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_UInt32* )
       FT_Face_GetVariantSelectors( FT_Face  face );
    +
    -

    -

    Return a zero-terminated list of Unicode variant selectors found in the font.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    A handle to the source face object.

    -
    -
    return
    + +

    return

    A pointer to an array of selector code points, or NULL if there is no valid variant selector cmap subtable.

    -
    -
    note
    + +

    note

    The last item in the array is 0; the array is owned by the FT_Face object but can be overwritten or released on the next call to a FreeType function.

    -
    -
    since
    + +

    since

    2.3.6

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Face_GetVariantsOfChar

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Face_GetVariantsOfChar

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_UInt32* )
       FT_Face_GetVariantsOfChar( FT_Face   face,
                                  FT_ULong  charcode );
    +
    -

    -

    Return a zero-terminated list of Unicode variant selectors found for the specified character code.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the source face object.

    charcode +
    charcode

    The character codepoint in Unicode.

    -
    -
    return
    + +

    return

    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.

    -
    -
    note
    + +

    note

    The last item in the array is 0; the array is owned by the FT_Face object but can be overwritten or released on the next call to a FreeType function.

    -
    -
    since
    + +

    since

    2.3.6

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Face_GetCharsOfVariant

    -
    -Defined in FT_FREETYPE_H (freetype.h). -

    -
    +
    + +
    +

    FT_Face_GetCharsOfVariant

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
       FT_EXPORT( FT_UInt32* )
       FT_Face_GetCharsOfVariant( FT_Face   face,
                                  FT_ULong  variantSelector );
    +
    -

    -

    Return a zero-terminated list of Unicode character codes found for the specified variant selector.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the source face object.

    variantSelector +
    variantSelector

    The variant selector code point in Unicode.

    -
    -
    return
    + +

    return

    A list of all the code points that are specified by this selector (both default and non-default codes are returned) or NULL if there is no valid cmap or the variant selector is invalid.

    -
    -
    note
    + +

    note

    The last item in the array is 0; the array is owned by the FT_Face object but can be overwritten or released on the next call to a FreeType function.

    -
    -
    since
    + +

    since

    2.3.6

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-gx_validation.html b/freetype/docs/reference/ft2-gx_validation.html index b70e1b94..ff2eef6a 100644 --- a/freetype/docs/reference/ft2-gx_validation.html +++ b/freetype/docs/reference/ft2-gx_validation.html @@ -3,354 +3,360 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -TrueTypeGX/AAT Validation -

    +

    TrueTypeGX/AAT Validation

    Synopsis

    - - - - -
    FT_VALIDATE_GX_LENGTHFT_TrueTypeGX_FreeFT_ClassicKern_Free
    FT_VALIDATE_GXXXXFT_VALIDATE_CKERNXXX
    FT_TrueTypeGX_ValidateFT_ClassicKern_Validate


    - -
    -

    This section contains the declaration of functions to validate some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop, lcar).

    -

    -
    -

    FT_VALIDATE_GX_LENGTH

    -
    -Defined in FT_GX_VALIDATE_H (ftgxval.h). -

    -
    -
    -#define FT_VALIDATE_GX_LENGTH     (FT_VALIDATE_GX_LAST_INDEX + 1)
    -
    -

    -
    -

    The number of tables checked in this module. Use it as a parameter for the ‘table-length’ argument of function FT_TrueTypeGX_Validate.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_VALIDATE_GXXXX

    -
    -Defined in FT_GX_VALIDATE_H (ftgxval.h). -

    -
    -
    -#define FT_VALIDATE_feat  FT_VALIDATE_GX_BITFIELD( feat )
    -#define FT_VALIDATE_mort  FT_VALIDATE_GX_BITFIELD( mort )
    -#define FT_VALIDATE_morx  FT_VALIDATE_GX_BITFIELD( morx )
    -#define FT_VALIDATE_bsln  FT_VALIDATE_GX_BITFIELD( bsln )
    -#define FT_VALIDATE_just  FT_VALIDATE_GX_BITFIELD( just )
    -#define FT_VALIDATE_kern  FT_VALIDATE_GX_BITFIELD( kern )
    -#define FT_VALIDATE_opbd  FT_VALIDATE_GX_BITFIELD( opbd )
    -#define FT_VALIDATE_trak  FT_VALIDATE_GX_BITFIELD( trak )
    -#define FT_VALIDATE_prop  FT_VALIDATE_GX_BITFIELD( prop )
    -#define FT_VALIDATE_lcar  FT_VALIDATE_GX_BITFIELD( lcar )
    -
    -#define FT_VALIDATE_GX  ( FT_VALIDATE_feat | \
    -                          FT_VALIDATE_mort | \
    -                          FT_VALIDATE_morx | \
    -                          FT_VALIDATE_bsln | \
    -                          FT_VALIDATE_just | \
    -                          FT_VALIDATE_kern | \
    -                          FT_VALIDATE_opbd | \
    -                          FT_VALIDATE_trak | \
    -                          FT_VALIDATE_prop | \
    -                          FT_VALIDATE_lcar )
    -
    -

    -
    -

    A list of bit-field constants used with FT_TrueTypeGX_Validate to indicate which TrueTypeGX/AAT Type tables should be validated.

    -

    -
    values
    -

    - - - - - - - - - - - - +
    FT_VALIDATE_feat -

    Validate ‘feat’ table.

    -
    FT_VALIDATE_mort -

    Validate ‘mort’ table.

    -
    FT_VALIDATE_morx -

    Validate ‘morx’ table.

    -
    FT_VALIDATE_bsln -

    Validate ‘bsln’ table.

    -
    FT_VALIDATE_just -

    Validate ‘just’ table.

    -
    FT_VALIDATE_kern -

    Validate ‘kern’ table.

    -
    FT_VALIDATE_opbd -

    Validate ‘opbd’ table.

    -
    FT_VALIDATE_trak -

    Validate ‘trak’ table.

    -
    FT_VALIDATE_prop -

    Validate ‘prop’ table.

    -
    FT_VALIDATE_lcar -

    Validate ‘lcar’ table.

    -
    FT_VALIDATE_GX -

    Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop and lcar).

    -
    + + +
    FT_TrueTypeGX_ValidateFT_ClassicKern_ValidateFT_VALIDATE_GX_LENGTH
    FT_TrueTypeGX_FreeFT_ClassicKern_FreeFT_VALIDATE_GXXXX
      FT_VALIDATE_CKERNXXX
    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_TrueTypeGX_Validate

    -
    -Defined in FT_GX_VALIDATE_H (ftgxval.h). -

    -
     
    +

    This section contains the declaration of functions to validate some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop, lcar).

    + +
    +

    FT_TrueTypeGX_Validate

    +

    Defined in FT_GX_VALIDATE_H (ftgxval.h).

    +
       FT_EXPORT( FT_Error )
       FT_TrueTypeGX_Validate( FT_Face   face,
                               FT_UInt   validation_flags,
                               FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],
                               FT_UInt   table_length );
    +
    -

    -

    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).

    -

    -
    input
    -

    - -
    face + +

    input

    + + - -
    face

    A handle to the input face.

    validation_flags +
    validation_flags

    A bit field that specifies the tables to be validated. See FT_VALIDATE_GXXXX for possible values.

    table_length +
    table_length

    The size of the ‘tables’ array. Normally, FT_VALIDATE_GX_LENGTH should be passed.

    -
    -
    output
    -

    - -
    tables + +

    output

    + +
    tables

    The array where all validated sfnt tables are stored. The array itself must be allocated by a client.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function only works with TrueTypeGX fonts, returning an error otherwise.

    After use, the application should deallocate the buffers pointed to by each ‘tables’ element, by calling FT_TrueTypeGX_Free. 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.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_TrueTypeGX_Free

    -
    -Defined in FT_GX_VALIDATE_H (ftgxval.h). -

    -
    +
    + +
    +

    FT_TrueTypeGX_Free

    +

    Defined in FT_GX_VALIDATE_H (ftgxval.h).

    +
       FT_EXPORT( void )
       FT_TrueTypeGX_Free( FT_Face   face,
                           FT_Bytes  table );
    +
    -

    -

    Free the buffer allocated by TrueTypeGX validator.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the input face.

    table +
    table

    The pointer to the buffer allocated by FT_TrueTypeGX_Validate.

    -
    -
    note
    + +

    note

    This function must be used to free the buffer allocated by FT_TrueTypeGX_Validate only.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_VALIDATE_CKERNXXX

    -
    -Defined in FT_GX_VALIDATE_H (ftgxval.h). -

    -
    -
    -#define FT_VALIDATE_MS     ( FT_VALIDATE_GX_START << 0 )
    -#define FT_VALIDATE_APPLE  ( FT_VALIDATE_GX_START << 1 )
    -
    -#define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
    -
    -

    -
    -

    A list of bit-field constants used with FT_ClassicKern_Validate to indicate the classic kern dialect or dialects. If the selected type doesn't fit, FT_ClassicKern_Validate regards the table as invalid.

    -

    -
    values
    -

    - - - - -
    FT_VALIDATE_MS -

    Handle the ‘kern’ table as a classic Microsoft kern table.

    -
    FT_VALIDATE_APPLE -

    Handle the ‘kern’ table as a classic Apple kern table.

    -
    FT_VALIDATE_CKERN -

    Handle the ‘kern’ as either classic Apple or Microsoft kern table.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_ClassicKern_Validate

    -
    -Defined in FT_GX_VALIDATE_H (ftgxval.h). -

    -
    +
    + +
    +

    FT_ClassicKern_Validate

    +

    Defined in FT_GX_VALIDATE_H (ftgxval.h).

    +
       FT_EXPORT( FT_Error )
       FT_ClassicKern_Validate( FT_Face    face,
                                FT_UInt    validation_flags,
                                FT_Bytes  *ckern_table );
    +
    -

    -

    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).

    The ‘kern’ table validator in FT_TrueTypeGX_Validate 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.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the input face.

    validation_flags +
    validation_flags

    A bit field that specifies the dialect to be validated. See FT_VALIDATE_CKERNXXX for possible values.

    -
    -
    output
    -

    - -
    ckern_table + +

    output

    + +
    ckern_table

    A pointer to the kern table.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    After use, the application should deallocate the buffers pointed to by ‘ckern_table’, by calling FT_ClassicKern_Free. A NULL value indicates that the table doesn't exist in the font.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ClassicKern_Free

    -
    -Defined in FT_GX_VALIDATE_H (ftgxval.h). -

    -
    +
    + +
    +

    FT_ClassicKern_Free

    +

    Defined in FT_GX_VALIDATE_H (ftgxval.h).

    +
       FT_EXPORT( void )
       FT_ClassicKern_Free( FT_Face   face,
                            FT_Bytes  table );
    +
    -

    -

    Free the buffer allocated by classic Kern validator.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the input face.

    table +
    table

    The pointer to the buffer that is allocated by FT_ClassicKern_Validate.

    -
    -
    note
    + +

    note

    This function must be used to free the buffer allocated by FT_ClassicKern_Validate only.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + + +
    +

    FT_VALIDATE_GX_LENGTH

    +

    Defined in FT_GX_VALIDATE_H (ftgxval.h).

    +
    +#define FT_VALIDATE_GX_LENGTH     (FT_VALIDATE_GX_LAST_INDEX + 1)
    +
    + +

    The number of tables checked in this module. Use it as a parameter for the ‘table-length’ argument of function FT_TrueTypeGX_Validate.

    + +
    +
    + +
    +

    FT_VALIDATE_GXXXX

    +

    Defined in FT_GX_VALIDATE_H (ftgxval.h).

    +
    +#define FT_VALIDATE_feat  FT_VALIDATE_GX_BITFIELD( feat )
    +#define FT_VALIDATE_mort  FT_VALIDATE_GX_BITFIELD( mort )
    +#define FT_VALIDATE_morx  FT_VALIDATE_GX_BITFIELD( morx )
    +#define FT_VALIDATE_bsln  FT_VALIDATE_GX_BITFIELD( bsln )
    +#define FT_VALIDATE_just  FT_VALIDATE_GX_BITFIELD( just )
    +#define FT_VALIDATE_kern  FT_VALIDATE_GX_BITFIELD( kern )
    +#define FT_VALIDATE_opbd  FT_VALIDATE_GX_BITFIELD( opbd )
    +#define FT_VALIDATE_trak  FT_VALIDATE_GX_BITFIELD( trak )
    +#define FT_VALIDATE_prop  FT_VALIDATE_GX_BITFIELD( prop )
    +#define FT_VALIDATE_lcar  FT_VALIDATE_GX_BITFIELD( lcar )
    +
    +#define FT_VALIDATE_GX  ( FT_VALIDATE_feat | \
    +                          FT_VALIDATE_mort | \
    +                          FT_VALIDATE_morx | \
    +                          FT_VALIDATE_bsln | \
    +                          FT_VALIDATE_just | \
    +                          FT_VALIDATE_kern | \
    +                          FT_VALIDATE_opbd | \
    +                          FT_VALIDATE_trak | \
    +                          FT_VALIDATE_prop | \
    +                          FT_VALIDATE_lcar )
    +
    + +

    A list of bit-field constants used with FT_TrueTypeGX_Validate to indicate which TrueTypeGX/AAT Type tables should be validated.

    + +

    values

    + + + + + + + + + + + + +
    FT_VALIDATE_feat +

    Validate ‘feat’ table.

    +
    FT_VALIDATE_mort +

    Validate ‘mort’ table.

    +
    FT_VALIDATE_morx +

    Validate ‘morx’ table.

    +
    FT_VALIDATE_bsln +

    Validate ‘bsln’ table.

    +
    FT_VALIDATE_just +

    Validate ‘just’ table.

    +
    FT_VALIDATE_kern +

    Validate ‘kern’ table.

    +
    FT_VALIDATE_opbd +

    Validate ‘opbd’ table.

    +
    FT_VALIDATE_trak +

    Validate ‘trak’ table.

    +
    FT_VALIDATE_prop +

    Validate ‘prop’ table.

    +
    FT_VALIDATE_lcar +

    Validate ‘lcar’ table.

    +
    FT_VALIDATE_GX +

    Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop and lcar).

    +
    + +
    +
    + +
    +

    FT_VALIDATE_CKERNXXX

    +

    Defined in FT_GX_VALIDATE_H (ftgxval.h).

    +
    +#define FT_VALIDATE_MS     ( FT_VALIDATE_GX_START << 0 )
    +#define FT_VALIDATE_APPLE  ( FT_VALIDATE_GX_START << 1 )
    +
    +#define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
    +
    + +

    A list of bit-field constants used with FT_ClassicKern_Validate to indicate the classic kern dialect or dialects. If the selected type doesn't fit, FT_ClassicKern_Validate regards the table as invalid.

    + +

    values

    + + + + +
    FT_VALIDATE_MS +

    Handle the ‘kern’ table as a classic Microsoft kern table.

    +
    FT_VALIDATE_APPLE +

    Handle the ‘kern’ table as a classic Apple kern table.

    +
    FT_VALIDATE_CKERN +

    Handle the ‘kern’ as either classic Apple or Microsoft kern table.

    +
    + +
    +
    diff --git a/freetype/docs/reference/ft2-gzip.html b/freetype/docs/reference/ft2-gzip.html index ac4c3e6b..c7e5a84f 100644 --- a/freetype/docs/reference/ft2-gzip.html +++ b/freetype/docs/reference/ft2-gzip.html @@ -3,152 +3,197 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -GZIP Streams -

    +

    GZIP Streams

    Synopsis

    - - -
    FT_Stream_OpenGzipFT_Gzip_Uncompress


    + + +
    FT_Stream_OpenGzipFT_Gzip_Uncompress
    + -

    This section contains the declaration of Gzip-specific functions.

    -

    -
    -

    FT_Stream_OpenGzip

    -
    -Defined in FT_GZIP_H (ftgzip.h). -

    -
     
    +
    +

    FT_Stream_OpenGzip

    +

    Defined in FT_GZIP_H (ftgzip.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stream_OpenGzip( FT_Stream  stream,
                           FT_Stream  source );
    +
    -

    -

    Open a new stream to parse gzip-compressed font files. This is mainly used to support the compressed ‘*.pcf.gz’ fonts that come with XFree86.

    -

    -
    input
    -

    - -
    stream + +

    input

    + + -
    stream

    The target embedding stream.

    source +
    source

    The source stream.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The source stream must be opened before calling this function.

    Calling the internal function ‘FT_Stream_Close’ on the new stream will not call ‘FT_Stream_Close’ on the source stream. None of the stream objects will be released to the heap.

    The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream.

    In certain builds of the library, gzip compression recognition is automatically handled when calling FT_New_Face or FT_Open_Face. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a gzipped stream from it and re-open the face with it.

    This function may return ‘FT_Err_Unimplemented_Feature’ if your build of FreeType was not compiled with zlib support.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Gzip_Uncompress

    -
    -Defined in FT_GZIP_H (ftgzip.h). -

    -
    +
    + +
    +

    FT_Gzip_Uncompress

    +

    Defined in FT_GZIP_H (ftgzip.h).

    +
       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 );
    +
    -

    -

    Decompress a zipped input buffer into an output buffer. This function is modeled after zlib's ‘uncompress’ function.

    -

    -
    input
    -

    - -
    memory + +

    input

    + + - -
    memory

    A FreeType memory handle.

    input +
    input

    The input buffer.

    input_len +
    input_len

    The length of the input buffer.

    -
    -
    output
    -

    - -
    output + +

    output

    + +
    output

    The output buffer.

    -
    -
    inout
    -

    - -
    output_len + +

    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
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function may return ‘FT_Err_Unimplemented_Feature’ if your build of FreeType was not compiled with zlib support.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-header_file_macros.html b/freetype/docs/reference/ft2-header_file_macros.html index 43a03ccc..35954db9 100644 --- a/freetype/docs/reference/ft2-header_file_macros.html +++ b/freetype/docs/reference/ft2-header_file_macros.html @@ -3,73 +3,136 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Header File Macros -

    +

    Header File Macros

    Synopsis

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FT_CONFIG_CONFIG_HFT_LZW_H
    FT_CONFIG_STANDARD_LIBRARY_HFT_BZIP2_H
    FT_CONFIG_OPTIONS_HFT_WINFONTS_H
    FT_CONFIG_MODULES_HFT_GLYPH_H
    FT_FREETYPE_HFT_BITMAP_H
    FT_ERRORS_HFT_BBOX_H
    FT_MODULE_ERRORS_HFT_CACHE_H
    FT_SYSTEM_HFT_CACHE_IMAGE_H
    FT_IMAGE_HFT_CACHE_SMALL_BITMAPS_H
    FT_TYPES_HFT_CACHE_CHARMAP_H
    FT_LIST_HFT_MAC_H
    FT_OUTLINE_HFT_MULTIPLE_MASTERS_H
    FT_SIZES_HFT_SFNT_NAMES_H
    FT_MODULE_HFT_OPENTYPE_VALIDATE_H
    FT_RENDER_HFT_GX_VALIDATE_H
    FT_AUTOHINTER_HFT_PFR_H
    FT_CFF_DRIVER_HFT_STROKER_H
    FT_TRUETYPE_DRIVER_HFT_SYNTHESIS_H
    FT_TYPE1_TABLES_HFT_XFREE86_H
    FT_TRUETYPE_IDS_HFT_TRIGONOMETRY_H
    FT_TRUETYPE_TABLES_HFT_LCD_FILTER_H
    FT_TRUETYPE_TAGS_HFT_UNPATENTED_HINTING_H
    FT_BDF_HFT_INCREMENTAL_H
    FT_CID_HFT_GASP_H
    FT_GZIP_HFT_ADVANCES_H


    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FT_CONFIG_CONFIG_HFT_LZW_H
    FT_CONFIG_STANDARD_LIBRARY_HFT_BZIP2_H
    FT_CONFIG_OPTIONS_HFT_WINFONTS_H
    FT_CONFIG_MODULES_HFT_GLYPH_H
    FT_FREETYPE_HFT_BITMAP_H
    FT_ERRORS_HFT_BBOX_H
    FT_MODULE_ERRORS_HFT_CACHE_H
    FT_SYSTEM_HFT_CACHE_IMAGE_H
    FT_IMAGE_HFT_CACHE_SMALL_BITMAPS_H
    FT_TYPES_HFT_CACHE_CHARMAP_H
    FT_LIST_HFT_MAC_H
    FT_OUTLINE_HFT_MULTIPLE_MASTERS_H
    FT_SIZES_HFT_SFNT_NAMES_H
    FT_MODULE_HFT_OPENTYPE_VALIDATE_H
    FT_RENDER_HFT_GX_VALIDATE_H
    FT_AUTOHINTER_HFT_PFR_H
    FT_CFF_DRIVER_HFT_STROKER_H
    FT_TRUETYPE_DRIVER_HFT_SYNTHESIS_H
    FT_TYPE1_TABLES_HFT_XFREE86_H
    FT_TRUETYPE_IDS_HFT_TRIGONOMETRY_H
    FT_TRUETYPE_TABLES_HFT_LCD_FILTER_H
    FT_TRUETYPE_TAGS_HFT_UNPATENTED_HINTING_H
    FT_BDF_HFT_INCREMENTAL_H
    FT_CID_HFT_GASP_H
    FT_GZIP_HFT_ADVANCES_H
    + -

    The following macros are defined to the name of specific FreeType 2 header files. They can be used directly in #include statements as in:

       #include FT_FREETYPE_H                                           
    @@ -78,825 +141,575 @@ Header File Macros
     

    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 naming rule required by DOS (and ‘FT_MULTIPLE_MASTERS_H’ is a lot more meaningful than ‘ftmm.h’).

    The second reason is that it allows for more flexibility in the way FreeType 2 is installed on a given system.

    -

    -
    -

    FT_CONFIG_CONFIG_H

    -
     
    +
    +

    FT_CONFIG_CONFIG_H

    +
     #ifndef FT_CONFIG_CONFIG_H
     #define FT_CONFIG_CONFIG_H  <config/ftconfig.h>
     #endif
    +
    -

    -

    A macro used in #include statements to name the file containing FreeType 2 configuration data.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CONFIG_STANDARD_LIBRARY_H

    -
    +
    + +
    +

    FT_CONFIG_STANDARD_LIBRARY_H

    +
     #ifndef FT_CONFIG_STANDARD_LIBRARY_H
     #define FT_CONFIG_STANDARD_LIBRARY_H  <config/ftstdlib.h>
     #endif
    +
    -

    -

    A macro used in #include statements to name the file containing FreeType 2 interface to the standard C library functions.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CONFIG_OPTIONS_H

    -
    +
    + +
    +

    FT_CONFIG_OPTIONS_H

    +
     #ifndef FT_CONFIG_OPTIONS_H
     #define FT_CONFIG_OPTIONS_H  <config/ftoption.h>
     #endif
    +
    -

    -

    A macro used in #include statements to name the file containing FreeType 2 project-specific configuration options.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CONFIG_MODULES_H

    -
    +
    + +
    +

    FT_CONFIG_MODULES_H

    +
     #ifndef FT_CONFIG_MODULES_H
     #define FT_CONFIG_MODULES_H  <config/ftmodule.h>
     #endif
    +
    -

    -

    A macro used in #include statements to name the file containing the list of FreeType 2 modules that are statically linked to new library instances in FT_Init_FreeType.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_FREETYPE_H

    -
    +
    + +
    +

    FT_FREETYPE_H

    +
     #define FT_FREETYPE_H  <freetype.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the base FreeType 2 API.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ERRORS_H

    -
    +
    + +
    +

    FT_ERRORS_H

    +
     #define FT_ERRORS_H  <fterrors.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the list of FreeType 2 error codes (and messages).

    It is included by FT_FREETYPE_H.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_MODULE_ERRORS_H

    -
    +
    + +
    +

    FT_MODULE_ERRORS_H

    +
     #define FT_MODULE_ERRORS_H  <ftmoderr.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the list of FreeType 2 module error offsets (and messages).

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_SYSTEM_H

    -
    +
    + +
    +

    FT_SYSTEM_H

    +
     #define FT_SYSTEM_H  <ftsystem.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 interface to low-level operations (i.e., memory management and stream i/o).

    It is included by FT_FREETYPE_H.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_IMAGE_H

    -
    +
    + +
    +

    FT_IMAGE_H

    +
     #define FT_IMAGE_H  <ftimage.h>
    +
    -

    -

    A macro used in #include statements to name the file containing type definitions related to glyph images (i.e., bitmaps, outlines, scan-converter parameters).

    It is included by FT_FREETYPE_H.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_TYPES_H

    -
    +
    + +
    +

    FT_TYPES_H

    +
     #define FT_TYPES_H  <fttypes.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the basic data types defined by FreeType 2.

    It is included by FT_FREETYPE_H.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_LIST_H

    -
    +
    + +
    +

    FT_LIST_H

    +
     #define FT_LIST_H  <ftlist.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the list management API of FreeType 2.

    (Most applications will never need to include this file.)

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_OUTLINE_H

    -
    +
    + +
    +

    FT_OUTLINE_H

    +
     #define FT_OUTLINE_H  <ftoutln.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the scalable outline management API of FreeType 2.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_SIZES_H

    -
    +
    + +
    +

    FT_SIZES_H

    +
     #define FT_SIZES_H  <ftsizes.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the API which manages multiple FT_Size objects per face.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_MODULE_H

    -
    +
    + +
    +

    FT_MODULE_H

    +
     #define FT_MODULE_H  <ftmodapi.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the module management API of FreeType 2.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_RENDER_H

    -
    +
    + +
    +

    FT_RENDER_H

    +
     #define FT_RENDER_H  <ftrender.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the renderer module management API of FreeType 2.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_AUTOHINTER_H

    -
    +
    + +
    +

    FT_AUTOHINTER_H

    +
     #define FT_AUTOHINTER_H  <ftautoh.h>
    +
    -

    -

    A macro used in #include statements to name the file containing structures and macros related to the auto-hinting module.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CFF_DRIVER_H

    -
    +
    + +
    +

    FT_CFF_DRIVER_H

    +
     #define FT_CFF_DRIVER_H  <ftcffdrv.h>
    +
    -

    -

    A macro used in #include statements to name the file containing structures and macros related to the CFF driver module.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_TRUETYPE_DRIVER_H

    -
    +
    + +
    +

    FT_TRUETYPE_DRIVER_H

    +
     #define FT_TRUETYPE_DRIVER_H  <ftttdrv.h>
    +
    -

    -

    A macro used in #include statements to name the file containing structures and macros related to the TrueType driver module.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_TYPE1_TABLES_H

    -
    +
    + +
    +

    FT_TYPE1_TABLES_H

    +
     #define FT_TYPE1_TABLES_H  <t1tables.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the types and API specific to the Type 1 format.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_TRUETYPE_IDS_H

    -
    +
    + +
    +

    FT_TRUETYPE_IDS_H

    +
     #define FT_TRUETYPE_IDS_H  <ttnameid.h>
    +
    -

    -

    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 large set of constant macro definitions, taken from the TrueType and OpenType specifications.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_TRUETYPE_TABLES_H

    -
    +
    + +
    +

    FT_TRUETYPE_TABLES_H

    +
     #define FT_TRUETYPE_TABLES_H  <tttables.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the types and API specific to the TrueType (as well as OpenType) format.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_TRUETYPE_TAGS_H

    -
    +
    + +
    +

    FT_TRUETYPE_TAGS_H

    +
     #define FT_TRUETYPE_TAGS_H  <tttags.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the definitions of TrueType four-byte ‘tags’ which identify blocks in SFNT-based font formats (i.e., TrueType and OpenType).

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_BDF_H

    -
    +
    + +
    +

    FT_BDF_H

    +
     #define FT_BDF_H  <ftbdf.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the definitions of an API which accesses BDF-specific strings from a face.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CID_H

    -
    +
    + +
    +

    FT_CID_H

    +
     #define FT_CID_H  <ftcid.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the definitions of an API which access CID font information from a face.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_GZIP_H

    -
    +
    + +
    +

    FT_GZIP_H

    +
     #define FT_GZIP_H  <ftgzip.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the definitions of an API which supports gzip-compressed files.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_LZW_H

    -
    +
    + +
    +

    FT_LZW_H

    +
     #define FT_LZW_H  <ftlzw.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the definitions of an API which supports LZW-compressed files.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_BZIP2_H

    -
    +
    + +
    +

    FT_BZIP2_H

    +
     #define FT_BZIP2_H  <ftbzip2.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the definitions of an API which supports bzip2-compressed files.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_WINFONTS_H

    -
    +
    + +
    +

    FT_WINFONTS_H

    +
     #define FT_WINFONTS_H   <ftwinfnt.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the definitions of an API which supports Windows FNT files.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_GLYPH_H

    -
    +
    + +
    +

    FT_GLYPH_H

    +
     #define FT_GLYPH_H  <ftglyph.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the API of the optional glyph management component.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_BITMAP_H

    -
    +
    + +
    +

    FT_BITMAP_H

    +
     #define FT_BITMAP_H  <ftbitmap.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the API of the optional bitmap conversion component.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_BBOX_H

    -
    +
    + +
    +

    FT_BBOX_H

    +
     #define FT_BBOX_H  <ftbbox.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the API of the optional exact bounding box computation routines.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CACHE_H

    -
    +
    + +
    +

    FT_CACHE_H

    +
     #define FT_CACHE_H  <ftcache.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the API of the optional FreeType 2 cache sub-system.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CACHE_IMAGE_H

    -
    +
    + +
    +

    FT_CACHE_IMAGE_H

    +
     #define FT_CACHE_IMAGE_H  FT_CACHE_H
    +
    -

    -

    A macro used in #include statements to name the file containing the ‘glyph image’ API of the FreeType 2 cache sub-system.

    It is used to define a cache for FT_Glyph elements. You can also use the API defined in FT_CACHE_SMALL_BITMAPS_H if you only need to store small glyph bitmaps, as it will use less memory.

    This macro is deprecated. Simply include FT_CACHE_H to have all glyph image-related cache declarations.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CACHE_SMALL_BITMAPS_H

    -
    +
    + +
    +

    FT_CACHE_SMALL_BITMAPS_H

    +
     #define FT_CACHE_SMALL_BITMAPS_H  FT_CACHE_H
    +
    -

    -

    A macro used in #include statements to name the file containing the ‘small bitmaps’ API of the FreeType 2 cache sub-system.

    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 FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, including scalable outlines.

    This macro is deprecated. Simply include FT_CACHE_H to have all small bitmaps-related cache declarations.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_CACHE_CHARMAP_H

    -
    +
    + +
    +

    FT_CACHE_CHARMAP_H

    +
     #define FT_CACHE_CHARMAP_H  FT_CACHE_H
    +
    -

    -

    A macro used in #include statements to name the file containing the ‘charmap’ API of the FreeType 2 cache sub-system.

    This macro is deprecated. Simply include FT_CACHE_H to have all charmap-based cache declarations.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_MAC_H

    -
    +
    + +
    +

    FT_MAC_H

    +
     #define FT_MAC_H  <ftmac.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the Macintosh-specific FreeType 2 API. The latter is used to access fonts embedded in resource forks.

    This header file must be explicitly included by client applications compiled on the Mac (note that the base API still works though).

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_MULTIPLE_MASTERS_H

    -
    +
    + +
    +

    FT_MULTIPLE_MASTERS_H

    +
     #define FT_MULTIPLE_MASTERS_H  <ftmm.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the optional multiple-masters management API of FreeType 2.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_SFNT_NAMES_H

    -
    +
    + +
    +

    FT_SFNT_NAMES_H

    +
     #define FT_SFNT_NAMES_H  <ftsnames.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the optional FreeType 2 API which accesses embedded ‘name’ strings in SFNT-based font formats (i.e., TrueType and OpenType).

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_OPENTYPE_VALIDATE_H

    -
    +
    + +
    +

    FT_OPENTYPE_VALIDATE_H

    +
     #define FT_OPENTYPE_VALIDATE_H  <ftotval.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the optional FreeType 2 API which validates OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF).

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_GX_VALIDATE_H

    -
    +
    + +
    +

    FT_GX_VALIDATE_H

    +
     #define FT_GX_VALIDATE_H  <ftgxval.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the optional FreeType 2 API which validates TrueTypeGX/AAT tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop).

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_PFR_H

    -
    +
    + +
    +

    FT_PFR_H

    +
     #define FT_PFR_H  <ftpfr.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 API which accesses PFR-specific data.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_STROKER_H

    -
    +
    + +
    +

    FT_STROKER_H

    +
     #define FT_STROKER_H  <ftstroke.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 API which provides functions to stroke outline paths.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_SYNTHESIS_H

    -
    +
    + +
    +

    FT_SYNTHESIS_H

    +
     #define FT_SYNTHESIS_H  <ftsynth.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 API which performs artificial obliquing and emboldening.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_XFREE86_H

    -
    +
    + +
    +

    FT_XFREE86_H

    +
     #define FT_XFREE86_H  <ftxf86.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 API which provides functions specific to the XFree86 and X.Org X11 servers.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_TRIGONOMETRY_H

    -
    +
    + +
    +

    FT_TRIGONOMETRY_H

    +
     #define FT_TRIGONOMETRY_H  <fttrigon.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 API which performs trigonometric computations (e.g., cosines and arc tangents).

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_LCD_FILTER_H

    -
    +
    + +
    +

    FT_LCD_FILTER_H

    +
     #define FT_LCD_FILTER_H  <ftlcdfil.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 API which performs color filtering for subpixel rendering.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_UNPATENTED_HINTING_H

    -
    +
    + +
    +

    FT_UNPATENTED_HINTING_H

    +
     #define FT_UNPATENTED_HINTING_H  <ttunpat.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 API which performs color filtering for subpixel rendering.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_INCREMENTAL_H

    -
    +
    + +
    +

    FT_INCREMENTAL_H

    +
     #define FT_INCREMENTAL_H  <ftincrem.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 API which performs color filtering for subpixel rendering.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_GASP_H

    -
    +
    + +
    +

    FT_GASP_H

    +
     #define FT_GASP_H  <ftgasp.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 API which returns entries from the TrueType GASP table.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ADVANCES_H

    -
    +
    + +
    +

    FT_ADVANCES_H

    +
     #define FT_ADVANCES_H  <ftadvanc.h>
    +
    -

    -

    A macro used in #include statements to name the file containing the FreeType 2 API which returns individual and ranged glyph advances.

    -

    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-header_inclusion.html b/freetype/docs/reference/ft2-header_inclusion.html new file mode 100644 index 00000000..4171decb --- /dev/null +++ b/freetype/docs/reference/ft2-header_inclusion.html @@ -0,0 +1,117 @@ + + + + +FreeType-2.5.5 API Reference + + + + + +

    FreeType-2.5.5 API Reference

    + +

    FreeType's header inclusion scheme

    + +

    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.

    + + + diff --git a/freetype/docs/reference/ft2-incremental.html b/freetype/docs/reference/ft2-incremental.html index cba592e4..26225c25 100644 --- a/freetype/docs/reference/ft2-incremental.html +++ b/freetype/docs/reference/ft2-incremental.html @@ -3,87 +3,140 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Incremental Loading -

    +

    Incremental Loading

    Synopsis

    - - - - - - -
    FT_IncrementalFT_Incremental_GetGlyphMetricsFunc
    FT_Incremental_MetricsRecFT_Incremental_FuncsRec
    FT_Incremental_MetricsFT_Incremental_InterfaceRec
    FT_Incremental_GetGlyphDataFuncFT_Incremental_Interface
    FT_Incremental_FreeGlyphDataFuncFT_PARAM_TAG_INCREMENTAL


    + + + + + + +
    FT_IncrementalFT_Incremental_GetGlyphMetricsFunc
    FT_Incremental_MetricsRecFT_Incremental_FuncsRec
    FT_Incremental_MetricsFT_Incremental_InterfaceRec
    FT_Incremental_GetGlyphDataFuncFT_Incremental_Interface
    FT_Incremental_FreeGlyphDataFuncFT_PARAM_TAG_INCREMENTAL
    -
    -

    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,

    + +

    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.

    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.

    To enable this mode, you must use FT_Open_Face, passing an FT_Parameter with the FT_PARAM_TAG_INCREMENTAL tag and an FT_Incremental_Interface value. See the comments for FT_Incremental_InterfaceRec for an example.

    -

    -
    -

    FT_Incremental

    -
    -Defined in FT_INCREMENTAL_H (ftincrem.h). -

    -
     
    +
    +

    FT_Incremental

    +

    Defined in FT_INCREMENTAL_H (ftincrem.h).

    +
       typedef struct FT_IncrementalRec_*  FT_Incremental;
    +
    -

    -

    An opaque type describing a user-provided object used to implement ‘incremental’ 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.

    -

    -
    note
    + +

    note

    It is up to client applications to create and implement FT_Incremental objects, as long as they provide implementations for the methods FT_Incremental_GetGlyphDataFunc, FT_Incremental_FreeGlyphDataFunc and FT_Incremental_GetGlyphMetricsFunc.

    See the description of FT_Incremental_InterfaceRec to understand how to use incremental objects with FreeType.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Incremental_MetricsRec

    -
    -Defined in FT_INCREMENTAL_H (ftincrem.h). -

    -
    +
    + +
    +

    FT_Incremental_MetricsRec

    +

    Defined in FT_INCREMENTAL_H (ftincrem.h).

    +
       typedef struct  FT_Incremental_MetricsRec_
       {
         FT_Long  bearing_x;
    @@ -92,193 +145,152 @@ Defined in FT_INCREMENTAL_H (ftincrem.h).
         FT_Long  advance_v;     /* since 2.3.12 */
     
       } FT_Incremental_MetricsRec;
    +
    -

    -

    A small structure used to contain the basic glyph metrics returned by the FT_Incremental_GetGlyphMetricsFunc method.

    -

    -
    fields
    -

    - -
    bearing_x + +

    fields

    + + - - -
    bearing_x

    Left bearing, in font units.

    bearing_y +
    bearing_y

    Top bearing, in font units.

    advance +
    advance

    Horizontal component of glyph advance, in font units.

    advance_v +
    advance_v

    Vertical component of glyph advance, in font units.

    -
    -
    note
    + +

    note

    These correspond to horizontal or vertical metrics depending on the value of the ‘vertical’ argument to the function FT_Incremental_GetGlyphMetricsFunc.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Incremental_Metrics

    -
    -Defined in FT_INCREMENTAL_H (ftincrem.h). -

    -
    +
    + +
    +

    FT_Incremental_Metrics

    +

    Defined in FT_INCREMENTAL_H (ftincrem.h).

    +
        typedef struct FT_Incremental_MetricsRec_*  FT_Incremental_Metrics;
    +
    -

    -

    A handle to an FT_Incremental_MetricsRec structure.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Incremental_GetGlyphDataFunc

    -
    -Defined in FT_INCREMENTAL_H (ftincrem.h). -

    -
    +
    + +
    +

    FT_Incremental_GetGlyphDataFunc

    +

    Defined in FT_INCREMENTAL_H (ftincrem.h).

    +
       typedef FT_Error
       (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental  incremental,
                                           FT_UInt         glyph_index,
                                           FT_Data*        adata );
    +
    -

    -

    A function called by FreeType to access a given glyph's data bytes during FT_Load_Glyph or FT_Load_Char if incremental loading is enabled.

    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 ‘glyf’ table. For PostScript formats, it must correspond to the unencrypted charstring bytes, without any ‘lenIV’ header. It is undefined for any other format.

    -

    -
    input
    -

    - -
    incremental + +

    input

    + + -
    incremental

    Handle to an opaque FT_Incremental handle provided by the client application.

    glyph_index +
    glyph_index

    Index of relevant glyph.

    -
    -
    output
    -

    - -
    adata + +

    output

    + +
    adata

    A structure describing the returned glyph data bytes (which will be accessed as a read-only byte block).

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    If this function returns successfully the method FT_Incremental_FreeGlyphDataFunc will be called later to release the data bytes.

    Nested calls to FT_Incremental_GetGlyphDataFunc can happen for compound glyphs.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Incremental_FreeGlyphDataFunc

    -
    -Defined in FT_INCREMENTAL_H (ftincrem.h). -

    -
    +
    + +
    +

    FT_Incremental_FreeGlyphDataFunc

    +

    Defined in FT_INCREMENTAL_H (ftincrem.h).

    +
       typedef void
       (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental  incremental,
                                            FT_Data*        data );
    +
    -

    -

    A function used to release the glyph data bytes returned by a successful call to FT_Incremental_GetGlyphDataFunc.

    -

    -
    input
    -

    - -
    incremental + +

    input

    + + -
    incremental

    A handle to an opaque FT_Incremental handle provided by the client application.

    data +
    data

    A structure describing the glyph data bytes (which will be accessed as a read-only byte block).

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Incremental_GetGlyphMetricsFunc

    -
    -Defined in FT_INCREMENTAL_H (ftincrem.h). -

    -
    +
    + +
    +

    FT_Incremental_GetGlyphMetricsFunc

    +

    Defined in FT_INCREMENTAL_H (ftincrem.h).

    +
       typedef FT_Error
       (*FT_Incremental_GetGlyphMetricsFunc)
                           ( FT_Incremental              incremental,
                             FT_UInt                     glyph_index,
                             FT_Bool                     vertical,
                             FT_Incremental_MetricsRec  *ametrics );
    +
    -

    -

    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.

    -

    -
    input
    -

    - -
    incremental + +

    input

    + + - - -
    incremental

    A handle to an opaque FT_Incremental handle provided by the client application.

    glyph_index +
    glyph_index

    Index of relevant glyph.

    vertical +
    vertical

    If true, return vertical metrics.

    ametrics +
    ametrics

    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.

    -
    -
    output
    -

    - -
    ametrics + +

    output

    + +
    ametrics

    The replacement glyph metrics in font units.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Incremental_FuncsRec

    -
    -Defined in FT_INCREMENTAL_H (ftincrem.h). -

    -
    +
    + +
    +

    FT_Incremental_FuncsRec

    +

    Defined in FT_INCREMENTAL_H (ftincrem.h).

    +
       typedef struct  FT_Incremental_FuncsRec_
       {
         FT_Incremental_GetGlyphDataFunc     get_glyph_data;
    @@ -286,47 +298,38 @@ Defined in FT_INCREMENTAL_H (ftincrem.h).
         FT_Incremental_GetGlyphMetricsFunc  get_glyph_metrics;
     
       } FT_Incremental_FuncsRec;
    +
    -

    -

    A table of functions for accessing fonts that load data incrementally. Used in FT_Incremental_InterfaceRec.

    -

    -
    fields
    -

    - -
    get_glyph_data + +

    fields

    + + - -
    get_glyph_data

    The function to get glyph data. Must not be null.

    free_glyph_data +
    free_glyph_data

    The function to release glyph data. Must not be null.

    get_glyph_metrics +
    get_glyph_metrics

    The function to get glyph metrics. May be null if the font does not provide overriding glyph metrics.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Incremental_InterfaceRec

    -
    -Defined in FT_INCREMENTAL_H (ftincrem.h). -

    -
    +
    + +
    +

    FT_Incremental_InterfaceRec

    +

    Defined in FT_INCREMENTAL_H (ftincrem.h).

    +
       typedef struct  FT_Incremental_InterfaceRec_
       {
         const FT_Incremental_FuncsRec*  funcs;
         FT_Incremental                  object;
     
       } FT_Incremental_InterfaceRec;
    +
    -

    -

    A structure to be used with FT_Open_Face to indicate that the user wants to support incremental glyph loading. You should use it with FT_PARAM_TAG_INCREMENTAL as in the following example:

       FT_Incremental_InterfaceRec  inc_int;
    @@ -352,50 +355,33 @@ Defined in FT_INCREMENTAL_H (ftincrem.h).
       error = FT_Open_Face( library, &open_args, index, &face );
       ...
     
    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Incremental_Interface

    -
    -Defined in FT_INCREMENTAL_H (ftincrem.h). -

    -
    +
    + +
    +

    FT_Incremental_Interface

    +

    Defined in FT_INCREMENTAL_H (ftincrem.h).

    +
       typedef FT_Incremental_InterfaceRec*   FT_Incremental_Interface;
    +
    -

    -

    A pointer to an FT_Incremental_InterfaceRec structure.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_PARAM_TAG_INCREMENTAL

    -
    -Defined in FT_INCREMENTAL_H (ftincrem.h). -

    -
    +
    + +
    +

    FT_PARAM_TAG_INCREMENTAL

    +

    Defined in FT_INCREMENTAL_H (ftincrem.h).

    +
     #define FT_PARAM_TAG_INCREMENTAL  FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
    +
    -

    -

    A constant used as the tag of FT_Parameter structures to indicate an incremental loading object to be used by FreeType.

    -

    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-index.html b/freetype/docs/reference/ft2-index.html index ad93bca7..2e16e94a 100644 --- a/freetype/docs/reference/ft2-index.html +++ b/freetype/docs/reference/ft2-index.html @@ -3,303 +3,379 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - -
    [TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    BDF_PROPERTY_TYPE_ATOMFT_LCD_FILTER_HFT_Stroker_ParseOutline
    BDF_PROPERTY_TYPE_CARDINALFT_LCD_FILTER_LEGACYFT_Stroker_Rewind
    BDF_PROPERTY_TYPE_INTEGERFT_LCD_FILTER_LIGHTFT_Stroker_Set
    BDF_PROPERTY_TYPE_NONEFT_LCD_FILTER_NONEFT_StrokerBorder
    BDF_PropertyFT_LcdFilterFT_SUBGLYPH_FLAG_2X2
    BDF_PropertyRecFT_LIST_HFT_SUBGLYPH_FLAG_ARGS_ARE_WORDS
    CID_FaceDictFT_LibraryFT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES
    CID_FaceDictRecFT_Library_SetLcdFilterFT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID
    CID_FaceInfoFT_Library_SetLcdFilterWeightsFT_SUBGLYPH_FLAG_SCALE
    CID_FaceInfoRecFT_Library_VersionFT_SUBGLYPH_FLAG_USE_MY_METRICS
    CID_InfoFT_ListFT_SUBGLYPH_FLAG_XXX
    darkening-parametersFT_List_AddFT_SUBGLYPH_FLAG_XY_SCALE
    FREETYPE_MAJORFT_List_DestructorFT_SubGlyph
    FREETYPE_MINORFT_List_FinalizeFT_SYNTHESIS_H
    FREETYPE_PATCHFT_List_FindFT_SYSTEM_H
    FREETYPE_XXXFT_List_InsertFT_Tag
    FT_Activate_SizeFT_List_IterateFT_Tan
    FT_ADVANCE_FLAG_FAST_ONLYFT_List_IteratorFT_TRIGONOMETRY_H
    FT_ADVANCES_HFT_List_RemoveFT_TRUETYPE_DRIVER_H
    FT_Add_Default_ModulesFT_List_UpFT_TRUETYPE_ENGINE_TYPE_NONE
    FT_Add_ModuleFT_ListNodeFT_TRUETYPE_ENGINE_TYPE_PATENTED
    FT_Alloc_FuncFT_ListNodeRecFT_TRUETYPE_ENGINE_TYPE_UNPATENTED
    FT_ANGLE_2PIFT_ListRecFT_TRUETYPE_IDS_H
    FT_ANGLE_PIFT_LOAD_COLORFT_TRUETYPE_TABLES_H
    FT_ANGLE_PI2FT_LOAD_CROP_BITMAPFT_TRUETYPE_TAGS_H
    FT_ANGLE_PI4FT_LOAD_DEFAULTFT_TrueTypeEngineType
    FT_AngleFT_LOAD_FORCE_AUTOHINTFT_TrueTypeGX_Free
    FT_Angle_DiffFT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTHFT_TrueTypeGX_Validate
    FT_Atan2FT_LOAD_IGNORE_TRANSFORMFT_TYPE1_TABLES_H
    FT_Attach_FileFT_LOAD_LINEAR_DESIGNFT_TYPES_H
    FT_Attach_StreamFT_LOAD_MONOCHROMEFT_UFWord
    FT_AUTOHINTER_HFT_LOAD_NO_AUTOHINTFT_UInt
    FT_AUTOHINTER_SCRIPT_CJKFT_LOAD_NO_BITMAPFT_UInt16
    FT_AUTOHINTER_SCRIPT_INDICFT_LOAD_NO_HINTINGFT_UInt32
    FT_AUTOHINTER_SCRIPT_LATINFT_LOAD_NO_RECURSEFT_UInt64
    FT_AUTOHINTER_SCRIPT_NONEFT_LOAD_NO_SCALEFT_ULong
    FT_AUTOHINTER_SCRIPT_XXXFT_LOAD_PEDANTICFT_UNPATENTED_HINTING_H
    FT_BBOX_HFT_LOAD_RENDERFT_UnitVector
    FT_BBoxFT_LOAD_TARGET_LCDFT_UShort
    FT_BDF_HFT_LOAD_TARGET_LCD_VFT_VALIDATE_APPLE
    FT_BITMAP_HFT_LOAD_TARGET_LIGHTFT_VALIDATE_BASE
    FT_BitmapFT_LOAD_TARGET_MODEFT_VALIDATE_bsln
    FT_Bitmap_ConvertFT_LOAD_TARGET_MONOFT_VALIDATE_CKERN
    FT_Bitmap_CopyFT_LOAD_TARGET_NORMALFT_VALIDATE_CKERNXXX
    FT_Bitmap_DoneFT_LOAD_TARGET_XXXFT_VALIDATE_feat
    FT_Bitmap_EmboldenFT_LOAD_VERTICAL_LAYOUTFT_VALIDATE_GDEF
    FT_Bitmap_NewFT_LOAD_XXXFT_VALIDATE_GPOS
    FT_Bitmap_SizeFT_Load_CharFT_VALIDATE_GSUB
    FT_BitmapGlyphFT_Load_GlyphFT_VALIDATE_GX
    FT_BitmapGlyphRecFT_Load_Sfnt_TableFT_VALIDATE_GX_LENGTH
    FT_BoolFT_LongFT_VALIDATE_GXXXX
    FT_ByteFT_LZW_HFT_VALIDATE_JSTF
    FT_BytesFT_MAC_HFT_VALIDATE_just
    FT_BZIP2_HFT_MAKE_TAGFT_VALIDATE_kern
    FT_CACHE_CHARMAP_HFT_MatrixFT_VALIDATE_lcar
    FT_CACHE_HFT_Matrix_InvertFT_VALIDATE_MATH
    FT_CACHE_IMAGE_HFT_Matrix_MultiplyFT_VALIDATE_MS
    FT_CACHE_SMALL_BITMAPS_HFT_MemoryFT_VALIDATE_mort
    FT_CeilFixFT_MemoryRecFT_VALIDATE_morx
    FT_CFF_DRIVER_HFT_MM_AxisFT_VALIDATE_OT
    FT_CFF_HINTING_ADOBEFT_MM_VarFT_VALIDATE_OTXXX
    FT_CFF_HINTING_FREETYPEFT_MODULE_ERRORS_HFT_VALIDATE_opbd
    FT_CFF_HINTING_XXXFT_MODULE_HFT_VALIDATE_prop
    FT_CharFT_ModuleFT_VALIDATE_trak
    FT_CharMapFT_Module_ClassFT_Var_Axis
    FT_CharMapRecFT_Module_ConstructorFT_Var_Named_Style
    FT_CID_HFT_Module_DestructorFT_Vector
    FT_ClassicKern_FreeFT_Module_RequesterFT_Vector_From_Polar
    FT_ClassicKern_ValidateFT_MULTIPLE_MASTERS_HFT_Vector_Length
    FT_CONFIG_CONFIG_HFT_MulDivFT_Vector_Polarize
    FT_CONFIG_MODULES_HFT_MulFixFT_Vector_Rotate
    FT_CONFIG_OPTIONS_HFT_Multi_MasterFT_Vector_Transform
    FT_CONFIG_STANDARD_LIBRARY_HFT_New_FaceFT_Vector_Unit
    FT_CosFT_New_Face_From_FONDFT_WINFONTS_H
    FT_DataFT_New_Face_From_FSRefFT_WinFNT_Header
    FT_DivFixFT_New_Face_From_FSSpecFT_WinFNT_HeaderRec
    FT_Done_FaceFT_New_LibraryFT_WinFNT_ID_CP1250
    FT_Done_FreeTypeFT_New_Memory_FaceFT_WinFNT_ID_CP1251
    FT_Done_GlyphFT_New_SizeFT_WinFNT_ID_CP1252
    FT_Done_LibraryFT_OffsetFT_WinFNT_ID_CP1253
    FT_Done_SizeFT_OPEN_DRIVERFT_WinFNT_ID_CP1254
    FT_DriverFT_OPEN_MEMORYFT_WinFNT_ID_CP1255
    FT_ENC_TAGFT_OPEN_PARAMSFT_WinFNT_ID_CP1256
    FT_ENCODING_ADOBE_CUSTOMFT_OPEN_PATHNAMEFT_WinFNT_ID_CP1257
    FT_ENCODING_ADOBE_EXPERTFT_OPEN_STREAMFT_WinFNT_ID_CP1258
    FT_ENCODING_ADOBE_LATIN_1FT_OPEN_XXXFT_WinFNT_ID_CP1361
    FT_ENCODING_ADOBE_STANDARDFT_OPENTYPE_VALIDATE_HFT_WinFNT_ID_CP874
    FT_ENCODING_APPLE_ROMANFT_Open_ArgsFT_WinFNT_ID_CP932
    FT_ENCODING_BIG5FT_Open_FaceFT_WinFNT_ID_CP936
    FT_ENCODING_GB2312FT_OpenType_FreeFT_WinFNT_ID_CP949
    FT_ENCODING_JOHABFT_OpenType_ValidateFT_WinFNT_ID_CP950
    FT_ENCODING_MS_BIG5FT_ORIENTATION_FILL_LEFTFT_WinFNT_ID_DEFAULT
    FT_ENCODING_MS_GB2312FT_ORIENTATION_FILL_RIGHTFT_WinFNT_ID_MAC
    FT_ENCODING_MS_JOHABFT_ORIENTATION_NONEFT_WinFNT_ID_OEM
    FT_ENCODING_MS_SJISFT_ORIENTATION_POSTSCRIPTFT_WinFNT_ID_SYMBOL
    FT_ENCODING_MS_SYMBOLFT_ORIENTATION_TRUETYPEFT_WinFNT_ID_XXX
    FT_ENCODING_MS_WANSUNGFT_OrientationFT_XFREE86_H
    FT_ENCODING_NONEFT_OUTLINE_EVEN_ODD_FILLFTC_CMapCache
    FT_ENCODING_OLD_LATIN_2FT_OUTLINE_FLAGSFTC_CMapCache_Lookup
    FT_ENCODING_SJISFT_OUTLINE_HFTC_CMapCache_New
    FT_ENCODING_UNICODEFT_OUTLINE_HIGH_PRECISIONFTC_Face_Requester
    FT_ENCODING_WANSUNGFT_OUTLINE_IGNORE_DROPOUTSFTC_FaceID
    FT_EncodingFT_OUTLINE_INCLUDE_STUBSFTC_ImageCache
    FT_ERRORS_HFT_OUTLINE_NONEFTC_ImageCache_Lookup
    FT_ErrorFT_OUTLINE_OWNERFTC_ImageCache_LookupScaler
    FT_F26Dot6FT_OUTLINE_REVERSE_FILLFTC_ImageCache_New
    FT_F2Dot14FT_OUTLINE_SINGLE_PASSFTC_ImageType
    FT_FACE_FLAG_CID_KEYEDFT_OUTLINE_SMART_DROPOUTSFTC_ImageTypeRec
    FT_FACE_FLAG_COLORFT_OutlineFTC_Manager
    FT_FACE_FLAG_EXTERNAL_STREAMFT_Outline_CheckFTC_Manager_Done
    FT_FACE_FLAG_FAST_GLYPHSFT_Outline_ConicToFuncFTC_Manager_LookupFace
    FT_FACE_FLAG_FIXED_SIZESFT_Outline_CopyFTC_Manager_LookupSize
    FT_FACE_FLAG_FIXED_WIDTHFT_Outline_CubicToFuncFTC_Manager_New
    FT_FACE_FLAG_GLYPH_NAMESFT_Outline_DecomposeFTC_Manager_RemoveFaceID
    FT_FACE_FLAG_HINTERFT_Outline_DoneFTC_Manager_Reset
    FT_FACE_FLAG_HORIZONTALFT_Outline_EmboldenFTC_Node
    FT_FACE_FLAG_KERNINGFT_Outline_EmboldenXYFTC_Node_Unref
    FT_FACE_FLAG_MULTIPLE_MASTERSFT_Outline_FuncsFTC_SBit
    FT_FACE_FLAG_SCALABLEFT_Outline_Get_BBoxFTC_SBitCache
    FT_FACE_FLAG_SFNTFT_Outline_Get_BitmapFTC_SBitCache_Lookup
    FT_FACE_FLAG_TRICKYFT_Outline_Get_CBoxFTC_SBitCache_LookupScaler
    FT_FACE_FLAG_VERTICALFT_Outline_Get_OrientationFTC_SBitCache_New
    FT_FACE_FLAG_XXXFT_Outline_GetInsideBorderFTC_SBitRec
    FT_FaceFT_Outline_GetOutsideBorderFTC_Scaler
    FT_Face_CheckTrueTypePatentsFT_Outline_LineToFuncFTC_ScalerRec
    FT_Face_GetCharsOfVariantFT_Outline_MoveToFuncfallback-script
    FT_Face_GetCharVariantIndexFT_Outline_Newft_encoding_xxx
    FT_Face_GetCharVariantIsDefaultFT_Outline_Renderft_glyph_bbox_gridfit
    FT_Face_GetVariantSelectorsFT_Outline_Reverseft_glyph_bbox_pixels
    FT_Face_GetVariantsOfCharFT_Outline_Transformft_glyph_bbox_subpixels
    FT_Face_InternalFT_Outline_Translateft_glyph_bbox_truncate
    FT_Face_SetUnpatentedHintingFT_OutlineGlyphft_glyph_bbox_unscaled
    FT_FaceRecFT_OutlineGlyphRecft_glyph_bbox_xxx
    FT_FixedFT_PARAM_TAG_IGNORE_PREFERRED_FAMILYft_glyph_format_bitmap
    FT_FloorFixFT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILYft_glyph_format_composite
    FT_FREETYPE_HFT_PARAM_TAG_INCREMENTALft_glyph_format_none
    FT_Free_FuncFT_PARAM_TAG_UNPATENTED_HINTINGft_glyph_format_outline
    FT_FSTYPE_BITMAP_EMBEDDING_ONLYFT_Palette_Modeft_glyph_format_plotter
    FT_FSTYPE_EDITABLE_EMBEDDINGFT_Parameterft_glyph_format_xxx
    FT_FSTYPE_INSTALLABLE_EMBEDDINGFT_PFR_Hft_kerning_default
    FT_FSTYPE_NO_SUBSETTINGFT_PIXEL_MODE_BGRAft_kerning_unfitted
    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDINGFT_PIXEL_MODE_GRAYft_kerning_unscaled
    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDINGFT_PIXEL_MODE_GRAY2ft_open_driver
    FT_FSTYPE_XXXFT_PIXEL_MODE_GRAY4ft_open_memory
    FT_FWordFT_PIXEL_MODE_LCDft_open_params
    FT_GASP_DO_GRAYFT_PIXEL_MODE_LCD_Vft_open_pathname
    FT_GASP_DO_GRIDFITFT_PIXEL_MODE_MONOft_open_stream
    FT_GASP_HFT_PIXEL_MODE_NONEft_outline_even_odd_fill
    FT_GASP_NO_TABLEFT_Pixel_Modeft_outline_flags
    FT_GASP_SYMMETRIC_GRIDFITFT_Pointerft_outline_high_precision
    FT_GASP_SYMMETRIC_SMOOTHINGFT_Posft_outline_ignore_dropouts
    FT_GASP_XXXFT_Prop_GlyphToScriptMapft_outline_none
    FT_GenericFT_Prop_IncreaseXHeightft_outline_owner
    FT_Generic_FinalizerFT_Property_Getft_outline_reverse_fill
    FT_Get_AdvanceFT_Property_Setft_outline_single_pass
    FT_Get_AdvancesFT_PropertyTypeft_palette_mode_rgb
    FT_Get_BDF_Charset_IDFT_PtrDistft_palette_mode_rgba
    FT_Get_BDF_PropertyFT_RASTER_FLAG_AAft_pixel_mode_grays
    FT_Get_Char_IndexFT_RASTER_FLAG_CLIPft_pixel_mode_mono
    FT_Get_Charmap_IndexFT_RASTER_FLAG_DEFAULTft_pixel_mode_none
    FT_Get_CID_From_Glyph_IndexFT_RASTER_FLAG_DIRECTft_pixel_mode_pal2
    FT_Get_CID_Is_Internally_CID_KeyedFT_RASTER_FLAG_XXXft_pixel_mode_pal4
    FT_Get_CID_Registry_Ordering_SupplementFT_Rasterft_pixel_mode_xxx
    FT_Get_CMap_FormatFT_Raster_BitSet_Funcft_render_mode_mono
    FT_Get_CMap_Language_IDFT_Raster_BitTest_Funcft_render_mode_normal
    FT_Get_First_CharFT_Raster_DoneFuncft_render_mode_xxx
    FT_Get_FSType_FlagsFT_Raster_Funcsglyph-to-script-map
    FT_Get_GaspFT_Raster_NewFunchinting-engine
    FT_Get_GlyphFT_Raster_Paramsincrease-x-height
    FT_Get_Glyph_NameFT_Raster_RenderFuncinterpreter-version
    FT_Get_KerningFT_Raster_ResetFuncno-stem-darkening
    FT_Get_MM_VarFT_Raster_SetModeFuncPS_Dict_Keys
    FT_Get_ModuleFT_RENDER_HPS_FontInfo
    FT_Get_Multi_MasterFT_RENDER_MODE_LCDPS_FontInfoRec
    FT_Get_Name_IndexFT_RENDER_MODE_LCD_VPS_Private
    FT_Get_Next_CharFT_RENDER_MODE_LIGHTPS_PrivateRec
    FT_Get_PFR_AdvanceFT_RENDER_MODE_MONOT1_Blend_Flags
    FT_Get_PFR_KerningFT_RENDER_MODE_NORMALT1_EncodingType
    FT_Get_PFR_MetricsFT_Realloc_FuncT1_FontInfo
    FT_Get_Postscript_NameFT_Reference_FaceT1_Private
    FT_Get_PS_Font_InfoFT_Reference_LibraryTT_ADOBE_ID_CUSTOM
    FT_Get_PS_Font_PrivateFT_Remove_ModuleTT_ADOBE_ID_EXPERT
    FT_Get_PS_Font_ValueFT_Render_GlyphTT_ADOBE_ID_LATIN_1
    FT_Get_RendererFT_Render_ModeTT_ADOBE_ID_STANDARD
    FT_Get_Sfnt_NameFT_RendererTT_ADOBE_ID_XXX
    FT_Get_Sfnt_Name_CountFT_Renderer_ClassTT_APPLE_ID_DEFAULT
    FT_Get_Sfnt_TableFT_Request_SizeTT_APPLE_ID_ISO_10646
    FT_Get_SubGlyph_InfoFT_RoundFixTT_APPLE_ID_UNICODE_1_1
    FT_Get_Track_KerningFT_Select_CharmapTT_APPLE_ID_UNICODE_2_0
    FT_Get_TrueType_Engine_TypeFT_Select_SizeTT_APPLE_ID_UNICODE_32
    FT_Get_WinFNT_HeaderFT_Set_Char_SizeTT_APPLE_ID_VARIANT_SELECTOR
    FT_Get_X11_Font_FormatFT_Set_CharmapTT_APPLE_ID_XXX
    FT_GetFile_From_Mac_ATS_NameFT_Set_Debug_HookTT_Header
    FT_GetFile_From_Mac_NameFT_Set_MM_Blend_CoordinatesTT_HoriHeader
    FT_GetFilePath_From_Mac_ATS_NameFT_Set_MM_Design_CoordinatesTT_INTERPRETER_VERSION_35
    FT_GLYPH_BBOX_GRIDFITFT_Set_Pixel_SizesTT_INTERPRETER_VERSION_38
    FT_GLYPH_BBOX_PIXELSFT_Set_RendererTT_INTERPRETER_VERSION_XXX
    FT_GLYPH_BBOX_SUBPIXELSFT_Set_TransformTT_ISO_ID_10646
    FT_GLYPH_BBOX_TRUNCATEFT_Set_Var_Blend_CoordinatesTT_ISO_ID_7BIT_ASCII
    FT_GLYPH_BBOX_UNSCALEDFT_Set_Var_Design_CoordinatesTT_ISO_ID_8859_1
    FT_GLYPH_FORMAT_BITMAPFT_SFNT_NAMES_HTT_ISO_ID_XXX
    FT_GLYPH_FORMAT_COMPOSITEFT_Sfnt_Table_InfoTT_MAC_ID_ARABIC
    FT_GLYPH_FORMAT_NONEFT_Sfnt_TagTT_MAC_ID_ARMENIAN
    FT_GLYPH_FORMAT_OUTLINEFT_SfntNameTT_MAC_ID_BENGALI
    FT_GLYPH_FORMAT_PLOTTERFT_ShortTT_MAC_ID_BURMESE
    FT_GLYPH_HFT_SIZE_REQUEST_TYPE_BBOXTT_MAC_ID_DEVANAGARI
    FT_GlyphFT_SIZE_REQUEST_TYPE_CELLTT_MAC_ID_GEEZ
    FT_Glyph_BBox_ModeFT_SIZE_REQUEST_TYPE_NOMINALTT_MAC_ID_GEORGIAN
    FT_Glyph_CopyFT_SIZE_REQUEST_TYPE_REAL_DIMTT_MAC_ID_GREEK
    FT_Glyph_FormatFT_SIZE_REQUEST_TYPE_SCALESTT_MAC_ID_GUJARATI
    FT_Glyph_Get_CBoxFT_SIZES_HTT_MAC_ID_GURMUKHI
    FT_Glyph_MetricsFT_SinTT_MAC_ID_HEBREW
    FT_Glyph_StrokeFT_SizeTT_MAC_ID_JAPANESE
    FT_Glyph_StrokeBorderFT_Size_InternalTT_MAC_ID_KANNADA
    FT_Glyph_To_BitmapFT_Size_MetricsTT_MAC_ID_KHMER
    FT_Glyph_TransformFT_Size_RequestTT_MAC_ID_KOREAN
    FT_GlyphRecFT_Size_Request_TypeTT_MAC_ID_LAOTIAN
    FT_GlyphSlotFT_Size_RequestRecTT_MAC_ID_MALAYALAM
    FT_GlyphSlot_Own_BitmapFT_SizeRecTT_MAC_ID_MALDIVIAN
    FT_GlyphSlotRecFT_Slot_InternalTT_MAC_ID_MONGOLIAN
    FT_GX_VALIDATE_HFT_SpanTT_MAC_ID_ORIYA
    FT_GZIP_HFT_SpanFuncTT_MAC_ID_ROMAN
    FT_Gzip_UncompressFT_STROKER_BORDER_LEFTTT_MAC_ID_RSYMBOL
    FT_HAS_COLORFT_STROKER_BORDER_RIGHTTT_MAC_ID_RUSSIAN
    FT_HAS_FAST_GLYPHSFT_STROKER_HTT_MAC_ID_SIMPLIFIED_CHINESE
    FT_HAS_FIXED_SIZESFT_STROKER_LINECAP_BUTTTT_MAC_ID_SINDHI
    FT_HAS_GLYPH_NAMESFT_STROKER_LINECAP_ROUNDTT_MAC_ID_SINHALESE
    FT_HAS_HORIZONTALFT_STROKER_LINECAP_SQUARETT_MAC_ID_SLAVIC
    FT_HAS_KERNINGFT_STROKER_LINEJOIN_BEVELTT_MAC_ID_TAMIL
    FT_HAS_MULTIPLE_MASTERSFT_STROKER_LINEJOIN_MITERTT_MAC_ID_TELUGU
    FT_HAS_VERTICALFT_STROKER_LINEJOIN_MITER_FIXEDTT_MAC_ID_THAI
    FT_Has_PS_Glyph_NamesFT_STROKER_LINEJOIN_MITER_VARIABLETT_MAC_ID_TIBETAN
    FT_IMAGE_HFT_STROKER_LINEJOIN_ROUNDTT_MAC_ID_TRADITIONAL_CHINESE
    FT_IMAGE_TAGFT_STYLE_FLAG_BOLDTT_MAC_ID_UNINTERP
    FT_INCREMENTAL_HFT_STYLE_FLAG_ITALICTT_MAC_ID_VIETNAMESE
    FT_IncrementalFT_STYLE_FLAG_XXXTT_MAC_ID_XXX
    FT_Incremental_FreeGlyphDataFuncFT_StreamTT_MaxProfile
    FT_Incremental_FuncsRecFT_Stream_CloseFuncTT_MS_ID_BIG_5
    FT_Incremental_GetGlyphDataFuncFT_Stream_IoFuncTT_MS_ID_GB2312
    FT_Incremental_GetGlyphMetricsFuncFT_Stream_OpenBzip2TT_MS_ID_JOHAB
    FT_Incremental_InterfaceFT_Stream_OpenGzipTT_MS_ID_SJIS
    FT_Incremental_InterfaceRecFT_Stream_OpenLZWTT_MS_ID_SYMBOL_CS
    FT_Incremental_MetricsFT_StreamDescTT_MS_ID_UCS_4
    FT_Incremental_MetricsRecFT_StreamRecTT_MS_ID_UNICODE_CS
    FT_Init_FreeTypeFT_StringTT_MS_ID_WANSUNG
    FT_IntFT_StrokerTT_MS_ID_XXX
    FT_Int16FT_Stroker_BeginSubPathTT_OS2
    FT_Int32FT_Stroker_ConicToTT_PCLT
    FT_Int64FT_Stroker_CubicToTT_PLATFORM_ADOBE
    FT_IS_CID_KEYEDFT_Stroker_DoneTT_PLATFORM_APPLE_UNICODE
    FT_IS_FIXED_WIDTHFT_Stroker_EndSubPathTT_PLATFORM_CUSTOM
    FT_IS_SCALABLEFT_Stroker_ExportTT_PLATFORM_ISO
    FT_IS_SFNTFT_Stroker_ExportBorderTT_PLATFORM_MACINTOSH
    FT_IS_TRICKYFT_Stroker_GetBorderCountsTT_PLATFORM_MICROSOFT
    FT_KERNING_DEFAULTFT_Stroker_GetCountsTT_PLATFORM_XXX
    FT_KERNING_UNFITTEDFT_Stroker_LineCapTT_Postscript
    FT_KERNING_UNSCALEDFT_Stroker_LineJoinTT_VertHeader
    FT_Kerning_ModeFT_Stroker_LineTo
    FT_LCD_FILTER_DEFAULTFT_Stroker_New
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    BDF_PROPERTY_TYPE_ATOMFT_Library_SetLcdFilterWeightsFT_SYSTEM_H
    BDF_PROPERTY_TYPE_CARDINALFT_Library_VersionFT_Tag
    BDF_PROPERTY_TYPE_INTEGERFT_ListFT_Tan
    BDF_PROPERTY_TYPE_NONEFT_List_AddFT_TRIGONOMETRY_H
    BDF_PropertyFT_List_DestructorFT_TRUETYPE_DRIVER_H
    BDF_PropertyRecFT_List_FinalizeFT_TRUETYPE_ENGINE_TYPE_NONE
    BDF_PropertyTypeFT_List_FindFT_TRUETYPE_ENGINE_TYPE_PATENTED
    CID_FaceDictFT_List_InsertFT_TRUETYPE_ENGINE_TYPE_UNPATENTED
    CID_FaceDictRecFT_List_IterateFT_TRUETYPE_IDS_H
    CID_FaceInfoFT_List_IteratorFT_TRUETYPE_TABLES_H
    CID_FaceInfoRecFT_List_RemoveFT_TRUETYPE_TAGS_H
    CID_FontDictFT_List_UpFT_TrueTypeEngineType
    CID_InfoFT_ListNodeFT_TrueTypeGX_Free
    darkening-parametersFT_ListNodeRecFT_TrueTypeGX_Validate
    default-scriptFT_ListRecFT_TYPE1_TABLES_H
    FREETYPE_MAJORFT_LOAD_COLORFT_TYPES_H
    FREETYPE_MINORFT_LOAD_CROP_BITMAPFT_UFWord
    FREETYPE_PATCHFT_LOAD_DEFAULTFT_UInt
    FREETYPE_XXXFT_LOAD_FORCE_AUTOHINTFT_UInt16
    FT_Activate_SizeFT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTHFT_UInt32
    FT_ADVANCE_FLAG_FAST_ONLYFT_LOAD_IGNORE_TRANSFORMFT_UInt64
    FT_ADVANCES_HFT_LOAD_LINEAR_DESIGNFT_ULong
    FT_Add_Default_ModulesFT_LOAD_MONOCHROMEFT_UNPATENTED_HINTING_H
    FT_Add_ModuleFT_LOAD_NO_AUTOHINTFT_UnitVector
    FT_Alloc_FuncFT_LOAD_NO_BITMAPFT_UShort
    FT_ANGLE_2PIFT_LOAD_NO_HINTINGFT_VALIDATE_APPLE
    FT_ANGLE_PIFT_LOAD_NO_RECURSEFT_VALIDATE_BASE
    FT_ANGLE_PI2FT_LOAD_NO_SCALEFT_VALIDATE_bsln
    FT_ANGLE_PI4FT_LOAD_PEDANTICFT_VALIDATE_CKERN
    FT_AngleFT_LOAD_RENDERFT_VALIDATE_CKERNXXX
    FT_Angle_DiffFT_LOAD_TARGET_LCDFT_VALIDATE_feat
    FT_Atan2FT_LOAD_TARGET_LCD_VFT_VALIDATE_GDEF
    FT_Attach_FileFT_LOAD_TARGET_LIGHTFT_VALIDATE_GPOS
    FT_Attach_StreamFT_LOAD_TARGET_MODEFT_VALIDATE_GSUB
    FT_AUTOHINTER_HFT_LOAD_TARGET_MONOFT_VALIDATE_GX
    FT_AUTOHINTER_SCRIPT_CJKFT_LOAD_TARGET_NORMALFT_VALIDATE_GX_LENGTH
    FT_AUTOHINTER_SCRIPT_INDICFT_LOAD_TARGET_XXXFT_VALIDATE_GXXXX
    FT_AUTOHINTER_SCRIPT_LATINFT_LOAD_VERTICAL_LAYOUTFT_VALIDATE_JSTF
    FT_AUTOHINTER_SCRIPT_NONEFT_LOAD_XXXFT_VALIDATE_just
    FT_AUTOHINTER_SCRIPT_XXXFT_Load_CharFT_VALIDATE_kern
    FT_BBOX_HFT_Load_GlyphFT_VALIDATE_lcar
    FT_BBoxFT_Load_Sfnt_TableFT_VALIDATE_MATH
    FT_BDF_HFT_LongFT_VALIDATE_MS
    FT_BITMAP_HFT_LZW_HFT_VALIDATE_mort
    FT_BitmapFT_MAC_HFT_VALIDATE_morx
    FT_Bitmap_ConvertFT_MAKE_TAGFT_VALIDATE_OT
    FT_Bitmap_CopyFT_MatrixFT_VALIDATE_OTXXX
    FT_Bitmap_DoneFT_Matrix_InvertFT_VALIDATE_opbd
    FT_Bitmap_EmboldenFT_Matrix_MultiplyFT_VALIDATE_prop
    FT_Bitmap_NewFT_MemoryFT_VALIDATE_trak
    FT_Bitmap_SizeFT_MemoryRecFT_Var_Axis
    FT_BitmapGlyphFT_MM_AxisFT_Var_Named_Style
    FT_BitmapGlyphRecFT_MM_VarFT_Vector
    FT_BoolFT_MODULE_ERRORS_HFT_Vector_From_Polar
    FT_ByteFT_MODULE_HFT_Vector_Length
    FT_BytesFT_ModuleFT_Vector_Polarize
    FT_BZIP2_HFT_Module_ClassFT_Vector_Rotate
    FT_CACHE_CHARMAP_HFT_Module_ConstructorFT_Vector_Transform
    FT_CACHE_HFT_Module_DestructorFT_Vector_Unit
    FT_CACHE_IMAGE_HFT_Module_RequesterFT_WINFONTS_H
    FT_CACHE_SMALL_BITMAPS_HFT_MULTIPLE_MASTERS_HFT_WinFNT_Header
    FT_CeilFixFT_MulDivFT_WinFNT_HeaderRec
    FT_CFF_DRIVER_HFT_MulFixFT_WinFNT_ID_CP1250
    FT_CFF_HINTING_ADOBEFT_Multi_MasterFT_WinFNT_ID_CP1251
    FT_CFF_HINTING_FREETYPEFT_New_FaceFT_WinFNT_ID_CP1252
    FT_CFF_HINTING_XXXFT_New_Face_From_FONDFT_WinFNT_ID_CP1253
    FT_CharFT_New_Face_From_FSRefFT_WinFNT_ID_CP1254
    FT_CharMapFT_New_Face_From_FSSpecFT_WinFNT_ID_CP1255
    FT_CharMapRecFT_New_LibraryFT_WinFNT_ID_CP1256
    FT_CID_HFT_New_Memory_FaceFT_WinFNT_ID_CP1257
    FT_ClassicKern_FreeFT_New_SizeFT_WinFNT_ID_CP1258
    FT_ClassicKern_ValidateFT_OffsetFT_WinFNT_ID_CP1361
    FT_CONFIG_CONFIG_HFT_OPEN_DRIVERFT_WinFNT_ID_CP874
    FT_CONFIG_MODULES_HFT_OPEN_MEMORYFT_WinFNT_ID_CP932
    FT_CONFIG_OPTIONS_HFT_OPEN_PARAMSFT_WinFNT_ID_CP936
    FT_CONFIG_STANDARD_LIBRARY_HFT_OPEN_PATHNAMEFT_WinFNT_ID_CP949
    FT_CosFT_OPEN_STREAMFT_WinFNT_ID_CP950
    FT_DataFT_OPEN_XXXFT_WinFNT_ID_DEFAULT
    FT_DivFixFT_OPENTYPE_VALIDATE_HFT_WinFNT_ID_MAC
    FT_Done_FaceFT_Open_ArgsFT_WinFNT_ID_OEM
    FT_Done_FreeTypeFT_Open_FaceFT_WinFNT_ID_SYMBOL
    FT_Done_GlyphFT_OpenType_FreeFT_WinFNT_ID_XXX
    FT_Done_LibraryFT_OpenType_ValidateFT_XFREE86_H
    FT_Done_SizeFT_ORIENTATION_FILL_LEFTFTC_CMapCache
    FT_DriverFT_ORIENTATION_FILL_RIGHTFTC_CMapCache_Lookup
    FT_ENC_TAGFT_ORIENTATION_NONEFTC_CMapCache_New
    FT_ENCODING_ADOBE_CUSTOMFT_ORIENTATION_POSTSCRIPTFTC_Face_Requester
    FT_ENCODING_ADOBE_EXPERTFT_ORIENTATION_TRUETYPEFTC_FaceID
    FT_ENCODING_ADOBE_LATIN_1FT_OrientationFTC_ImageCache
    FT_ENCODING_ADOBE_STANDARDFT_OUTLINE_EVEN_ODD_FILLFTC_ImageCache_Lookup
    FT_ENCODING_APPLE_ROMANFT_OUTLINE_HFTC_ImageCache_LookupScaler
    FT_ENCODING_BIG5FT_OUTLINE_HIGH_PRECISIONFTC_ImageCache_New
    FT_ENCODING_GB2312FT_OUTLINE_IGNORE_DROPOUTSFTC_ImageType
    FT_ENCODING_JOHABFT_OUTLINE_INCLUDE_STUBSFTC_ImageTypeRec
    FT_ENCODING_MS_BIG5FT_OUTLINE_NONEFTC_Manager
    FT_ENCODING_MS_GB2312FT_OUTLINE_OWNERFTC_Manager_Done
    FT_ENCODING_MS_JOHABFT_OUTLINE_REVERSE_FILLFTC_Manager_LookupFace
    FT_ENCODING_MS_SJISFT_OUTLINE_SINGLE_PASSFTC_Manager_LookupSize
    FT_ENCODING_MS_SYMBOLFT_OUTLINE_SMART_DROPOUTSFTC_Manager_New
    FT_ENCODING_MS_WANSUNGFT_OUTLINE_XXXFTC_Manager_RemoveFaceID
    FT_ENCODING_NONEFT_OutlineFTC_Manager_Reset
    FT_ENCODING_OLD_LATIN_2FT_Outline_CheckFTC_Node
    FT_ENCODING_SJISFT_Outline_ConicToFuncFTC_Node_Unref
    FT_ENCODING_UNICODEFT_Outline_CopyFTC_SBit
    FT_ENCODING_WANSUNGFT_Outline_CubicToFuncFTC_SBitCache
    FT_EncodingFT_Outline_DecomposeFTC_SBitCache_Lookup
    FT_ERRORS_HFT_Outline_DoneFTC_SBitCache_LookupScaler
    FT_ErrorFT_Outline_EmboldenFTC_SBitCache_New
    FT_F26Dot6FT_Outline_EmboldenXYFTC_SBitRec
    FT_F2Dot14FT_Outline_FuncsFTC_Scaler
    FT_FACE_FLAG_CID_KEYEDFT_Outline_Get_BBoxFTC_ScalerRec
    FT_FACE_FLAG_COLORFT_Outline_Get_Bitmapfallback-script
    FT_FACE_FLAG_EXTERNAL_STREAMFT_Outline_Get_CBoxglyph-to-script-map
    FT_FACE_FLAG_FAST_GLYPHSFT_Outline_Get_Orientationhinting-engine
    FT_FACE_FLAG_FIXED_SIZESFT_Outline_GetInsideBorderincrease-x-height
    FT_FACE_FLAG_FIXED_WIDTHFT_Outline_GetOutsideBorderinterpreter-version
    FT_FACE_FLAG_GLYPH_NAMESFT_Outline_LineToFuncno-stem-darkening
    FT_FACE_FLAG_HINTERFT_Outline_MoveToFuncPS_DICT_BLUE_FUZZ
    FT_FACE_FLAG_HORIZONTALFT_Outline_NewPS_DICT_BLUE_SCALE
    FT_FACE_FLAG_KERNINGFT_Outline_RenderPS_DICT_BLUE_SHIFT
    FT_FACE_FLAG_MULTIPLE_MASTERSFT_Outline_ReversePS_DICT_BLUE_VALUE
    FT_FACE_FLAG_SCALABLEFT_Outline_TransformPS_DICT_CHAR_STRING
    FT_FACE_FLAG_SFNTFT_Outline_TranslatePS_DICT_CHAR_STRING_KEY
    FT_FACE_FLAG_TRICKYFT_OutlineGlyphPS_DICT_ENCODING_ENTRY
    FT_FACE_FLAG_VERTICALFT_OutlineGlyphRecPS_DICT_ENCODING_TYPE
    FT_FACE_FLAG_XXXFT_PARAM_TAG_IGNORE_PREFERRED_FAMILYPS_DICT_FAMILY_BLUE
    FT_FaceFT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILYPS_DICT_FAMILY_NAME
    FT_Face_CheckTrueTypePatentsFT_PARAM_TAG_INCREMENTALPS_DICT_FAMILY_OTHER_BLUE
    FT_Face_GetCharsOfVariantFT_PARAM_TAG_UNPATENTED_HINTINGPS_DICT_FONT_BBOX
    FT_Face_GetCharVariantIndexFT_ParameterPS_DICT_FONT_MATRIX
    FT_Face_GetCharVariantIsDefaultFT_PFR_HPS_DICT_FONT_NAME
    FT_Face_GetVariantSelectorsFT_PIXEL_MODE_BGRAPS_DICT_FONT_TYPE
    FT_Face_GetVariantsOfCharFT_PIXEL_MODE_GRAYPS_DICT_FORCE_BOLD
    FT_Face_InternalFT_PIXEL_MODE_GRAY2PS_DICT_FS_TYPE
    FT_Face_SetUnpatentedHintingFT_PIXEL_MODE_GRAY4PS_DICT_FULL_NAME
    FT_FaceRecFT_PIXEL_MODE_LCDPS_DICT_IS_FIXED_PITCH
    FT_FixedFT_PIXEL_MODE_LCD_VPS_DICT_ITALIC_ANGLE
    FT_FloorFixFT_PIXEL_MODE_MONOPS_DICT_LANGUAGE_GROUP
    FT_FREETYPE_HFT_PIXEL_MODE_NONEPS_DICT_LEN_IV
    FT_Free_FuncFT_Pixel_ModePS_DICT_MIN_FEATURE
    FT_FSTYPE_BITMAP_EMBEDDING_ONLYFT_PointerPS_DICT_NOTICE
    FT_FSTYPE_EDITABLE_EMBEDDINGFT_PosPS_DICT_NUM_BLUE_VALUES
    FT_FSTYPE_INSTALLABLE_EMBEDDINGFT_Prop_GlyphToScriptMapPS_DICT_NUM_CHAR_STRINGS
    FT_FSTYPE_NO_SUBSETTINGFT_Prop_IncreaseXHeightPS_DICT_NUM_FAMILY_BLUES
    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDINGFT_Property_GetPS_DICT_NUM_FAMILY_OTHER_BLUES
    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDINGFT_Property_SetPS_DICT_NUM_OTHER_BLUES
    FT_FSTYPE_XXXFT_PtrDistPS_DICT_NUM_STEM_SNAP_H
    FT_FWordFT_RASTER_FLAG_AAPS_DICT_NUM_STEM_SNAP_V
    FT_GASP_DO_GRAYFT_RASTER_FLAG_CLIPPS_DICT_NUM_SUBRS
    FT_GASP_DO_GRIDFITFT_RASTER_FLAG_DEFAULTPS_DICT_OTHER_BLUE
    FT_GASP_HFT_RASTER_FLAG_DIRECTPS_DICT_PAINT_TYPE
    FT_GASP_NO_TABLEFT_RASTER_FLAG_XXXPS_DICT_PASSWORD
    FT_GASP_SYMMETRIC_GRIDFITFT_RasterPS_DICT_RND_STEM_UP
    FT_GASP_SYMMETRIC_SMOOTHINGFT_Raster_BitSet_FuncPS_DICT_STD_HW
    FT_GASP_XXXFT_Raster_BitTest_FuncPS_DICT_STD_VW
    FT_GenericFT_Raster_DoneFuncPS_DICT_STEM_SNAP_H
    FT_Generic_FinalizerFT_Raster_FuncsPS_DICT_STEM_SNAP_V
    FT_Get_AdvanceFT_Raster_NewFuncPS_DICT_SUBR
    FT_Get_AdvancesFT_Raster_ParamsPS_DICT_UNDERLINE_POSITION
    FT_Get_BDF_Charset_IDFT_Raster_RenderFuncPS_DICT_UNDERLINE_THICKNESS
    FT_Get_BDF_PropertyFT_Raster_ResetFuncPS_DICT_UNIQUE_ID
    FT_Get_Char_IndexFT_Raster_SetModeFuncPS_DICT_VERSION
    FT_Get_Charmap_IndexFT_RENDER_HPS_DICT_WEIGHT
    FT_Get_CID_From_Glyph_IndexFT_RENDER_MODE_LCDPS_Dict_Keys
    FT_Get_CID_Is_Internally_CID_KeyedFT_RENDER_MODE_LCD_VPS_FontInfo
    FT_Get_CID_Registry_Ordering_SupplementFT_RENDER_MODE_LIGHTPS_FontInfoRec
    FT_Get_CMap_FormatFT_RENDER_MODE_MONOPS_Private
    FT_Get_CMap_Language_IDFT_RENDER_MODE_NORMALPS_PrivateRec
    FT_Get_First_CharFT_Realloc_FuncT1_BLEND_BLUE_SCALE
    FT_Get_FSType_FlagsFT_Reference_FaceT1_BLEND_BLUE_SHIFT
    FT_Get_GaspFT_Reference_LibraryT1_BLEND_BLUE_VALUES
    FT_Get_GlyphFT_Remove_ModuleT1_BLEND_FAMILY_BLUES
    FT_Get_Glyph_NameFT_Render_GlyphT1_BLEND_FAMILY_OTHER_BLUES
    FT_Get_KerningFT_Render_ModeT1_BLEND_FORCE_BOLD
    FT_Get_MM_VarFT_RendererT1_BLEND_ITALIC_ANGLE
    FT_Get_ModuleFT_Renderer_ClassT1_BLEND_OTHER_BLUES
    FT_Get_Multi_MasterFT_Request_SizeT1_BLEND_STANDARD_HEIGHT
    FT_Get_Name_IndexFT_RoundFixT1_BLEND_STANDARD_WIDTH
    FT_Get_Next_CharFT_Select_CharmapT1_BLEND_STEM_SNAP_HEIGHTS
    FT_Get_PFR_AdvanceFT_Select_SizeT1_BLEND_STEM_SNAP_WIDTHS
    FT_Get_PFR_KerningFT_Set_Char_SizeT1_BLEND_UNDERLINE_POSITION
    FT_Get_PFR_MetricsFT_Set_CharmapT1_BLEND_UNDERLINE_THICKNESS
    FT_Get_Postscript_NameFT_Set_Debug_HookT1_Blend_Flags
    FT_Get_PS_Font_InfoFT_Set_MM_Blend_CoordinatesT1_ENCODING_TYPE_ARRAY
    FT_Get_PS_Font_PrivateFT_Set_MM_Design_CoordinatesT1_ENCODING_TYPE_EXPERT
    FT_Get_PS_Font_ValueFT_Set_Pixel_SizesT1_ENCODING_TYPE_ISOLATIN1
    FT_Get_RendererFT_Set_RendererT1_ENCODING_TYPE_NONE
    FT_Get_Sfnt_NameFT_Set_TransformT1_ENCODING_TYPE_STANDARD
    FT_Get_Sfnt_Name_CountFT_Set_Var_Blend_CoordinatesT1_EncodingType
    FT_Get_Sfnt_TableFT_Set_Var_Design_CoordinatesT1_FontInfo
    FT_Get_SubGlyph_InfoFT_SFNT_HEADT1_Private
    FT_Get_Track_KerningFT_SFNT_HHEATT_ADOBE_ID_CUSTOM
    FT_Get_TrueType_Engine_TypeFT_SFNT_MAXPTT_ADOBE_ID_EXPERT
    FT_Get_WinFNT_HeaderFT_SFNT_NAMES_HTT_ADOBE_ID_LATIN_1
    FT_Get_X11_Font_FormatFT_SFNT_OS2TT_ADOBE_ID_STANDARD
    FT_GetFile_From_Mac_ATS_NameFT_SFNT_PCLTTT_ADOBE_ID_XXX
    FT_GetFile_From_Mac_NameFT_SFNT_POSTTT_APPLE_ID_DEFAULT
    FT_GetFilePath_From_Mac_ATS_NameFT_SFNT_VHEATT_APPLE_ID_ISO_10646
    FT_GLYPH_BBOX_GRIDFITFT_Sfnt_Table_InfoTT_APPLE_ID_UNICODE_1_1
    FT_GLYPH_BBOX_PIXELSFT_Sfnt_TagTT_APPLE_ID_UNICODE_2_0
    FT_GLYPH_BBOX_SUBPIXELSFT_SfntNameTT_APPLE_ID_UNICODE_32
    FT_GLYPH_BBOX_TRUNCATEFT_ShortTT_APPLE_ID_VARIANT_SELECTOR
    FT_GLYPH_BBOX_UNSCALEDFT_SIZE_REQUEST_TYPE_BBOXTT_APPLE_ID_XXX
    FT_GLYPH_FORMAT_BITMAPFT_SIZE_REQUEST_TYPE_CELLTT_Header
    FT_GLYPH_FORMAT_COMPOSITEFT_SIZE_REQUEST_TYPE_NOMINALTT_HoriHeader
    FT_GLYPH_FORMAT_NONEFT_SIZE_REQUEST_TYPE_REAL_DIMTT_INTERPRETER_VERSION_35
    FT_GLYPH_FORMAT_OUTLINEFT_SIZE_REQUEST_TYPE_SCALESTT_INTERPRETER_VERSION_38
    FT_GLYPH_FORMAT_PLOTTERFT_SIZES_HTT_INTERPRETER_VERSION_XXX
    FT_GLYPH_HFT_SinTT_ISO_ID_10646
    FT_GlyphFT_SizeTT_ISO_ID_7BIT_ASCII
    FT_Glyph_BBox_ModeFT_Size_InternalTT_ISO_ID_8859_1
    FT_Glyph_CopyFT_Size_MetricsTT_ISO_ID_XXX
    FT_Glyph_FormatFT_Size_RequestTT_MAC_ID_ARABIC
    FT_Glyph_Get_CBoxFT_Size_Request_TypeTT_MAC_ID_ARMENIAN
    FT_Glyph_MetricsFT_Size_RequestRecTT_MAC_ID_BENGALI
    FT_Glyph_StrokeFT_SizeRecTT_MAC_ID_BURMESE
    FT_Glyph_StrokeBorderFT_Slot_InternalTT_MAC_ID_DEVANAGARI
    FT_Glyph_To_BitmapFT_SpanTT_MAC_ID_GEEZ
    FT_Glyph_TransformFT_SpanFuncTT_MAC_ID_GEORGIAN
    FT_GlyphRecFT_STROKER_BORDER_LEFTTT_MAC_ID_GREEK
    FT_GlyphSlotFT_STROKER_BORDER_RIGHTTT_MAC_ID_GUJARATI
    FT_GlyphSlot_Own_BitmapFT_STROKER_HTT_MAC_ID_GURMUKHI
    FT_GlyphSlotRecFT_STROKER_LINECAP_BUTTTT_MAC_ID_HEBREW
    FT_GX_VALIDATE_HFT_STROKER_LINECAP_ROUNDTT_MAC_ID_JAPANESE
    FT_GZIP_HFT_STROKER_LINECAP_SQUARETT_MAC_ID_KANNADA
    FT_Gzip_UncompressFT_STROKER_LINEJOIN_BEVELTT_MAC_ID_KHMER
    FT_HAS_COLORFT_STROKER_LINEJOIN_MITERTT_MAC_ID_KOREAN
    FT_HAS_FAST_GLYPHSFT_STROKER_LINEJOIN_MITER_FIXEDTT_MAC_ID_LAOTIAN
    FT_HAS_FIXED_SIZESFT_STROKER_LINEJOIN_MITER_VARIABLETT_MAC_ID_MALAYALAM
    FT_HAS_GLYPH_NAMESFT_STROKER_LINEJOIN_ROUNDTT_MAC_ID_MALDIVIAN
    FT_HAS_HORIZONTALFT_STYLE_FLAG_BOLDTT_MAC_ID_MONGOLIAN
    FT_HAS_KERNINGFT_STYLE_FLAG_ITALICTT_MAC_ID_ORIYA
    FT_HAS_MULTIPLE_MASTERSFT_STYLE_FLAG_XXXTT_MAC_ID_ROMAN
    FT_HAS_VERTICALFT_StreamTT_MAC_ID_RSYMBOL
    FT_Has_PS_Glyph_NamesFT_Stream_CloseFuncTT_MAC_ID_RUSSIAN
    FT_IMAGE_HFT_Stream_IoFuncTT_MAC_ID_SIMPLIFIED_CHINESE
    FT_IMAGE_TAGFT_Stream_OpenBzip2TT_MAC_ID_SINDHI
    FT_INCREMENTAL_HFT_Stream_OpenGzipTT_MAC_ID_SINHALESE
    FT_IncrementalFT_Stream_OpenLZWTT_MAC_ID_SLAVIC
    FT_Incremental_FreeGlyphDataFuncFT_StreamDescTT_MAC_ID_TAMIL
    FT_Incremental_FuncsRecFT_StreamRecTT_MAC_ID_TELUGU
    FT_Incremental_GetGlyphDataFuncFT_StringTT_MAC_ID_THAI
    FT_Incremental_GetGlyphMetricsFuncFT_StrokerTT_MAC_ID_TIBETAN
    FT_Incremental_InterfaceFT_Stroker_BeginSubPathTT_MAC_ID_TRADITIONAL_CHINESE
    FT_Incremental_InterfaceRecFT_Stroker_ConicToTT_MAC_ID_UNINTERP
    FT_Incremental_MetricsFT_Stroker_CubicToTT_MAC_ID_VIETNAMESE
    FT_Incremental_MetricsRecFT_Stroker_DoneTT_MAC_ID_XXX
    FT_Init_FreeTypeFT_Stroker_EndSubPathTT_MaxProfile
    FT_IntFT_Stroker_ExportTT_MS_ID_BIG_5
    FT_Int16FT_Stroker_ExportBorderTT_MS_ID_GB2312
    FT_Int32FT_Stroker_GetBorderCountsTT_MS_ID_JOHAB
    FT_Int64FT_Stroker_GetCountsTT_MS_ID_SJIS
    FT_IS_CID_KEYEDFT_Stroker_LineCapTT_MS_ID_SYMBOL_CS
    FT_IS_FIXED_WIDTHFT_Stroker_LineJoinTT_MS_ID_UCS_4
    FT_IS_SCALABLEFT_Stroker_LineToTT_MS_ID_UNICODE_CS
    FT_IS_SFNTFT_Stroker_NewTT_MS_ID_WANSUNG
    FT_IS_TRICKYFT_Stroker_ParseOutlineTT_MS_ID_XXX
    FT_KERNING_DEFAULTFT_Stroker_RewindTT_OS2
    FT_KERNING_UNFITTEDFT_Stroker_SetTT_PCLT
    FT_KERNING_UNSCALEDFT_StrokerBorderTT_PLATFORM_ADOBE
    FT_Kerning_ModeFT_SUBGLYPH_FLAG_2X2TT_PLATFORM_APPLE_UNICODE
    FT_LCD_FILTER_DEFAULTFT_SUBGLYPH_FLAG_ARGS_ARE_WORDSTT_PLATFORM_CUSTOM
    FT_LCD_FILTER_HFT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUESTT_PLATFORM_ISO
    FT_LCD_FILTER_LEGACYFT_SUBGLYPH_FLAG_ROUND_XY_TO_GRIDTT_PLATFORM_MACINTOSH
    FT_LCD_FILTER_LIGHTFT_SUBGLYPH_FLAG_SCALETT_PLATFORM_MICROSOFT
    FT_LCD_FILTER_NONEFT_SUBGLYPH_FLAG_USE_MY_METRICSTT_PLATFORM_XXX
    FT_LcdFilterFT_SUBGLYPH_FLAG_XXXTT_Postscript
    FT_LIST_HFT_SUBGLYPH_FLAG_XY_SCALETT_VertHeader
    FT_LibraryFT_SubGlyph
    FT_Library_SetLcdFilterFT_SYNTHESIS_H

    - -
    [TOC]
    + -
    generated on Mon Nov 25 00:29:36 2013
    +
    generated on Tue Dec 30 21:42:54 2014
    diff --git a/freetype/docs/reference/ft2-lcd_filtering.html b/freetype/docs/reference/ft2-lcd_filtering.html index a3b30690..768fbf02 100644 --- a/freetype/docs/reference/ft2-lcd_filtering.html +++ b/freetype/docs/reference/ft2-lcd_filtering.html @@ -3,53 +3,116 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -LCD Filtering -

    +

    LCD Filtering

    Synopsis

    - - - -
    FT_LcdFilterFT_Library_SetLcdFilterWeights
    FT_Library_SetLcdFilter


    + + + +
    FT_LcdFilterFT_Library_SetLcdFilterWeights
    FT_Library_SetLcdFilter
    + -

    The FT_Library_SetLcdFilter API can be used to specify a low-pass filter, which is then applied to LCD-optimized bitmaps generated through FT_Render_Glyph. This is useful to reduce color fringes that would occur with unfiltered rendering.

    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

    +

    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    ,
     
    @@ -63,144 +126,120 @@ LCD Filtering [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.

    -

    -
    -

    FT_LcdFilter

    -
    -Defined in FT_LCD_FILTER_H (ftlcdfil.h). -

    -
     
    +
    +

    FT_LcdFilter

    +

    Defined in FT_LCD_FILTER_H (ftlcdfil.h).

    +
       typedef enum  FT_LcdFilter_
       {
    -    FT_LCD_FILTER_NONE    = 0,
    -    FT_LCD_FILTER_DEFAULT = 1,
    -    FT_LCD_FILTER_LIGHT   = 2,
    -    FT_LCD_FILTER_LEGACY  = 16,
    +    FT_LCD_FILTER_NONE    = 0,
    +    FT_LCD_FILTER_DEFAULT = 1,
    +    FT_LCD_FILTER_LIGHT   = 2,
    +    FT_LCD_FILTER_LEGACY  = 16,
     
         FT_LCD_FILTER_MAX   /* do not remove */
     
       } FT_LcdFilter;
    +
    -

    -

    A list of values to identify various types of LCD filters.

    -

    -
    values
    -

    - -
    FT_LCD_FILTER_NONE + +

    values

    + + - - -
    FT_LCD_FILTER_NONE

    Do not perform filtering. When used with subpixel rendering, this results in sometimes severe color fringes.

    FT_LCD_FILTER_DEFAULT +
    FT_LCD_FILTER_DEFAULT

    The default filter reduces color fringes considerably, at the cost of a slight blurriness in the output.

    FT_LCD_FILTER_LIGHT +
    FT_LCD_FILTER_LIGHT

    The light filter is a variant that produces less blurriness at the cost of slightly more color fringes than the default one. It might be better, depending on taste, your monitor, or your personal vision.

    FT_LCD_FILTER_LEGACY +
    FT_LCD_FILTER_LEGACY

    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 and high-quality hinted fonts are used.

    This filter is only provided for comparison purposes, and might be disabled or stay unsupported in the future.

    -
    -
    since
    + +

    since

    2.3.0

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Library_SetLcdFilter

    -
    -Defined in FT_LCD_FILTER_H (ftlcdfil.h). -

    -
    +
    + +
    +

    FT_Library_SetLcdFilter

    +

    Defined in FT_LCD_FILTER_H (ftlcdfil.h).

    +
       FT_EXPORT( FT_Error )
       FT_Library_SetLcdFilter( FT_Library    library,
                                FT_LcdFilter  filter );
    +
    -

    -

    This function is used to apply color filtering to LCD decimated bitmaps, like the ones used when calling FT_Render_Glyph with FT_RENDER_MODE_LCD or FT_RENDER_MODE_LCD_V.

    -

    -
    input
    -

    - -
    library + +

    input

    + + -
    library

    A handle to the target library instance.

    filter +
    filter

    The filter type.

    You can use FT_LCD_FILTER_NONE here to disable this feature, or FT_LCD_FILTER_DEFAULT to use a default filter that should work well on most LCD screens.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This feature is always disabled by default. Clients must make an explicit call to this function with a ‘filter’ value other than FT_LCD_FILTER_NONE in order to enable it.

    Due to PATENTS covering subpixel rendering, this function doesn't do anything except returning ‘FT_Err_Unimplemented_Feature’ if the configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined in your build of the library, which should correspond to all default builds of FreeType.

    The filter affects glyph bitmaps rendered through FT_Render_Glyph, FT_Outline_Get_Bitmap, FT_Load_Glyph, and FT_Load_Char.

    It does not affect the output of FT_Outline_Render and FT_Outline_Get_Bitmap.

    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 FT_RENDER_MODE_LCD, the filter adds up to 3 pixels to the left, and up to 3 pixels to the right.

    The bitmap offset values are adjusted correctly, so clients shouldn't need to modify their layout and glyph positioning code when enabling the filter.

    -
    -
    since
    + +

    since

    2.3.0

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Library_SetLcdFilterWeights

    -
    -Defined in FT_LCD_FILTER_H (ftlcdfil.h). -

    -
    +
    + +
    +

    FT_Library_SetLcdFilterWeights

    +

    Defined in FT_LCD_FILTER_H (ftlcdfil.h).

    +
       FT_EXPORT( FT_Error )
       FT_Library_SetLcdFilterWeights( FT_Library      library,
                                       unsigned char  *weights );
    +
    -

    -

    Use this function to override the filter weights selected by FT_Library_SetLcdFilter. By default, FreeType uses the quintuple (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10, 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and FT_LCD_FILTER_LEGACY.

    -

    -
    input
    -

    - -
    library + +

    input

    + + -
    library

    A handle to the target library instance.

    weights +
    weights

    A pointer to an array; the function copies the first five bytes and uses them to specify the filter weights.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    Due to PATENTS covering subpixel rendering, this function doesn't do anything except returning ‘FT_Err_Unimplemented_Feature’ if the configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined in your build of the library, which should correspond to all default builds of FreeType.

    This function must be called after FT_Library_SetLcdFilter to have any effect.

    -
    -
    since
    + +

    since

    2.4.0

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-list_processing.html b/freetype/docs/reference/ft2-list_processing.html index 3572295a..2617e504 100644 --- a/freetype/docs/reference/ft2-list_processing.html +++ b/freetype/docs/reference/ft2-list_processing.html @@ -3,135 +3,173 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -List Processing -

    +

    List Processing

    Synopsis

    - - - - - - -
    FT_ListFT_List_AddFT_List_Iterate
    FT_ListNodeFT_List_InsertFT_List_Destructor
    FT_ListRecFT_List_RemoveFT_List_Finalize
    FT_ListNodeRecFT_List_Up
    FT_List_FindFT_List_Iterator


    + + + + + + +
    FT_ListFT_List_AddFT_List_Iterate
    FT_ListNodeFT_List_InsertFT_List_Iterator
    FT_ListRecFT_List_FindFT_List_Finalize
    FT_ListNodeRecFT_List_RemoveFT_List_Destructor
     FT_List_Up
    + -

    This section contains various definitions related to list processing using doubly-linked nodes.

    -

    -
    -

    FT_List

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
     
    +
    +

    FT_List

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef struct FT_ListRec_*  FT_List;
    +
    -

    -

    A handle to a list record (see FT_ListRec).

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ListNode

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_ListNode

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef struct FT_ListNodeRec_*  FT_ListNode;
    +
    -

    -

    Many elements and objects in FreeType are listed through an FT_List record (see FT_ListRec). As its name suggests, an FT_ListNode is a handle to a single list element.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ListRec

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_ListRec

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef struct  FT_ListRec_
       {
         FT_ListNode  head;
         FT_ListNode  tail;
     
       } FT_ListRec;
    +
    -

    -

    A structure used to hold a simple doubly-linked list. These are used in many parts of FreeType.

    -

    -
    fields
    -

    - -
    head + +

    fields

    + + -

    The head (first element) of doubly-linked list.

    tail +
    tail

    The tail (last element) of doubly-linked list.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_ListNodeRec

    -
    -Defined in FT_TYPES_H (fttypes.h). -

    -
    +
    + +
    +

    FT_ListNodeRec

    +

    Defined in FT_TYPES_H (fttypes.h).

    +
       typedef struct  FT_ListNodeRec_
       {
         FT_ListNode  prev;
    @@ -139,348 +177,270 @@ Defined in FT_TYPES_H (fttypes.h).
         void*        data;
     
       } FT_ListNodeRec;
    +
    -

    -

    A structure used to hold a single list element.

    -

    -
    fields
    -

    - -
    prev + +

    fields

    + + - -
    prev

    The previous element in the list. NULL if first.

    next +
    next

    The next element in the list. NULL if last.

    data +
    data

    A typeless pointer to the listed object.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_List_Find

    -
    -Defined in FT_LIST_H (ftlist.h). -

    -
    -
    -  FT_EXPORT( FT_ListNode )
    -  FT_List_Find( FT_List  list,
    -                void*    data );
    -
    -

    -
    -

    Find the list node for a given listed object.

    -

    -
    input
    -

    - - - -
    list -

    A pointer to the parent list.

    -
    data -

    The address of the listed object.

    -
    -
    -
    return
    -

    List node. NULL if it wasn't found.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_List_Add

    -
    -Defined in FT_LIST_H (ftlist.h). -

    -
    +
    + +
    +

    FT_List_Add

    +

    Defined in FT_LIST_H (ftlist.h).

    +
       FT_EXPORT( void )
       FT_List_Add( FT_List      list,
                    FT_ListNode  node );
    +
    -

    -

    Append an element to the end of a list.

    -

    -
    inout
    -

    - -
    list + +

    inout

    + + -
    list

    A pointer to the parent list.

    node +
    node

    The node to append.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_List_Insert

    -
    -Defined in FT_LIST_H (ftlist.h). -

    -
    +
    + +
    +

    FT_List_Insert

    +

    Defined in FT_LIST_H (ftlist.h).

    +
       FT_EXPORT( void )
       FT_List_Insert( FT_List      list,
                       FT_ListNode  node );
    +
    -

    -

    Insert an element at the head of a list.

    -

    -
    inout
    -

    - -
    list + +

    inout

    + + -
    list

    A pointer to parent list.

    node +
    node

    The node to insert.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_List_Remove

    -
    -Defined in FT_LIST_H (ftlist.h). -

    -
    +
    + +
    +

    FT_List_Find

    +

    Defined in FT_LIST_H (ftlist.h).

    +
    +  FT_EXPORT( FT_ListNode )
    +  FT_List_Find( FT_List  list,
    +                void*    data );
    +
    + +

    Find the list node for a given listed object.

    + +

    input

    + + + +
    list +

    A pointer to the parent list.

    +
    data +

    The address of the listed object.

    +
    + +

    return

    +

    List node. NULL if it wasn't found.

    + +
    +
    + +
    +

    FT_List_Remove

    +

    Defined in FT_LIST_H (ftlist.h).

    +
       FT_EXPORT( void )
       FT_List_Remove( FT_List      list,
                       FT_ListNode  node );
    +
    -

    -

    Remove a node from a list. This function doesn't check whether the node is in the list!

    -

    -
    input
    -

    - -
    node + +

    input

    + +
    node

    The node to remove.

    -
    -
    inout
    -

    - -
    list + +

    inout

    + +
    list

    A pointer to the parent list.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_List_Up

    -
    -Defined in FT_LIST_H (ftlist.h). -

    -
    +
    + +
    +

    FT_List_Up

    +

    Defined in FT_LIST_H (ftlist.h).

    +
       FT_EXPORT( void )
       FT_List_Up( FT_List      list,
                   FT_ListNode  node );
    +
    -

    -

    Move a node to the head/top of a list. Used to maintain LRU lists.

    -

    -
    inout
    -

    - -
    list + +

    inout

    + + -
    list

    A pointer to the parent list.

    node +
    node

    The node to move.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_List_Iterator

    -
    -Defined in FT_LIST_H (ftlist.h). -

    -
    -
    -  typedef FT_Error
    -  (*FT_List_Iterator)( FT_ListNode  node,
    -                       void*        user );
    -
    -

    -
    -

    An FT_List iterator function that is called during a list parse by FT_List_Iterate.

    -

    -
    input
    -

    - - - -
    node -

    The current iteration list node.

    -
    user -

    A typeless pointer passed to FT_List_Iterate. Can be used to point to the iteration's state.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_List_Iterate

    -
    -Defined in FT_LIST_H (ftlist.h). -

    -
    +
    + +
    +

    FT_List_Iterate

    +

    Defined in FT_LIST_H (ftlist.h).

    +
       FT_EXPORT( FT_Error )
       FT_List_Iterate( FT_List           list,
                        FT_List_Iterator  iterator,
                        void*             user );
    +
    -

    -

    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.

    -

    -
    input
    -

    - -
    list + +

    input

    + + - -
    list

    A handle to the list.

    iterator +
    iterator

    An iterator function, called on each node of the list.

    user +
    user

    A user-supplied field that is passed as the second argument to the iterator.

    -
    -
    return
    + +

    return

    The result (a FreeType error code) of the last iterator call.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_List_Destructor

    -
    -Defined in FT_LIST_H (ftlist.h). -

    -
    +
    + - typedef void - (*FT_List_Destructor)( FT_Memory memory, - void* data, - void* user ); +
    +

    FT_List_Iterator

    +

    Defined in FT_LIST_H (ftlist.h).

    +
    +  typedef FT_Error
    +  (*FT_List_Iterator)( FT_ListNode  node,
    +                       void*        user );
    +
    -

    -
    -

    An FT_List iterator function that is called during a list finalization by FT_List_Finalize to destroy all elements in a given list.

    -

    -
    input
    -

    - -
    system -

    The current system object.

    +

    An FT_List iterator function that is called during a list parse by FT_List_Iterate.

    + +

    input

    + + - -
    node +

    The current iteration list node.

    data -

    The current object to destroy.

    -
    user -

    A typeless pointer passed to FT_List_Iterate. It can be used to point to the iteration's state.

    +
    user +

    A typeless pointer passed to FT_List_Iterate. Can be used to point to the iteration's state.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_List_Finalize

    -
    -Defined in FT_LIST_H (ftlist.h). -

    -
    +
    + +
    +

    FT_List_Finalize

    +

    Defined in FT_LIST_H (ftlist.h).

    +
       FT_EXPORT( void )
       FT_List_Finalize( FT_List             list,
                         FT_List_Destructor  destroy,
                         FT_Memory           memory,
                         void*               user );
    +
    -

    -

    Destroy all elements in the list as well as the list itself.

    -

    -
    input
    -

    - -
    list + +

    input

    + + - - -
    list

    A handle to the list.

    destroy -

    A list destructor that will be applied to each element of the list.

    +
    destroy +

    A list destructor that will be applied to each element of the list. Set this to NULL if not needed.

    memory +
    memory

    The current memory object that handles deallocation.

    user +
    user

    A user-supplied field that is passed as the last argument to the destructor.

    -
    -
    note
    + +

    note

    This function expects that all nodes added by FT_List_Add or FT_List_Insert have been dynamically allocated.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + + +
    +

    FT_List_Destructor

    +

    Defined in FT_LIST_H (ftlist.h).

    +
    +  typedef void
    +  (*FT_List_Destructor)( FT_Memory  memory,
    +                         void*      data,
    +                         void*      user );
    +
    + +

    An FT_List iterator function that is called during a list finalization by FT_List_Finalize to destroy all elements in a given list.

    + +

    input

    + + + + +
    system +

    The current system object.

    +
    data +

    The current object to destroy.

    +
    user +

    A typeless pointer passed to FT_List_Iterate. It can be used to point to the iteration's state.

    +
    + +
    +
    diff --git a/freetype/docs/reference/ft2-lzw.html b/freetype/docs/reference/ft2-lzw.html index 30d7c096..5f500e64 100644 --- a/freetype/docs/reference/ft2-lzw.html +++ b/freetype/docs/reference/ft2-lzw.html @@ -3,92 +3,147 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -LZW Streams -

    +

    LZW Streams

    Synopsis

    - - -
    FT_Stream_OpenLZW


    + + +
    FT_Stream_OpenLZW
    + -

    This section contains the declaration of LZW-specific functions.

    -

    -
    -

    FT_Stream_OpenLZW

    -
    -Defined in FT_LZW_H (ftlzw.h). -

    -
     
    +
    +

    FT_Stream_OpenLZW

    +

    Defined in FT_LZW_H (ftlzw.h).

    +
       FT_EXPORT( FT_Error )
       FT_Stream_OpenLZW( FT_Stream  stream,
                          FT_Stream  source );
    +
    -

    -

    Open a new stream to parse LZW-compressed font files. This is mainly used to support the compressed ‘*.pcf.Z’ fonts that come with XFree86.

    -

    -
    input
    -

    - -
    stream + +

    input

    + + -
    stream

    The target embedding stream.

    source +
    source

    The source stream.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The source stream must be opened before calling this function.

    Calling the internal function ‘FT_Stream_Close’ on the new stream will not call ‘FT_Stream_Close’ on the source stream. None of the stream objects will be released to the heap.

    The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream

    In certain builds of the library, LZW compression recognition is automatically handled when calling FT_New_Face or FT_Open_Face. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a LZW stream from it and re-open the face with it.

    This function may return ‘FT_Err_Unimplemented_Feature’ if your build of FreeType was not compiled with LZW support.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-mac_specific.html b/freetype/docs/reference/ft2-mac_specific.html index 4b456199..ca66af63 100644 --- a/freetype/docs/reference/ft2-mac_specific.html +++ b/freetype/docs/reference/ft2-mac_specific.html @@ -3,366 +3,372 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Mac Specific Interface -

    +

    Mac Specific Interface

    Synopsis

    - - - - -
    FT_New_Face_From_FONDFT_GetFilePath_From_Mac_ATS_Name
    FT_GetFile_From_Mac_NameFT_New_Face_From_FSSpec
    FT_GetFile_From_Mac_ATS_NameFT_New_Face_From_FSRef


    + + + + +
    FT_New_Face_From_FONDFT_GetFilePath_From_Mac_ATS_Name
    FT_GetFile_From_Mac_NameFT_New_Face_From_FSSpec
    FT_GetFile_From_Mac_ATS_NameFT_New_Face_From_FSRef
    + -

    The following definitions are only available if FreeType is compiled on a Macintosh.

    -

    -
    -

    FT_New_Face_From_FOND

    -
    -Defined in FT_MAC_H (ftmac.h). -

    -
     
    +
    +

    FT_New_Face_From_FOND

    +

    Defined in FT_MAC_H (ftmac.h).

    +
       FT_EXPORT( FT_Error )
       FT_New_Face_From_FOND( FT_Library  library,
                              Handle      fond,
                              FT_Long     face_index,
                              FT_Face    *aface )
                            FT_DEPRECATED_ATTRIBUTE;
    +
    -

    -

    Create a new face object from a FOND resource.

    -

    -
    inout
    -

    - -
    library + +

    inout

    + +
    library

    A handle to the library resource.

    -
    -
    input
    -

    - -
    fond + +

    input

    + + -
    fond

    A FOND resource.

    face_index +
    face_index

    Only supported for the -1 ‘sanity check’ special case.

    -
    -
    output
    -

    - -
    aface + +

    output

    + +
    aface

    A handle to a new face object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    notes
    + +

    notes

    This function can be used to create FT_Face objects from fonts that are installed in the system as follows.

       fond = GetResource( 'FOND', fontName );                          
       error = FT_New_Face_From_FOND( library, fond, 0, &face );        
     
    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_GetFile_From_Mac_Name

    -
    -Defined in FT_MAC_H (ftmac.h). -

    -
    +
    + +
    +

    FT_GetFile_From_Mac_Name

    +

    Defined in FT_MAC_H (ftmac.h).

    +
       FT_EXPORT( FT_Error )
       FT_GetFile_From_Mac_Name( const char*  fontName,
                                 FSSpec*      pathSpec,
                                 FT_Long*     face_index )
                               FT_DEPRECATED_ATTRIBUTE;
    +
    -

    -

    Return an FSSpec for the disk file containing the named font.

    -

    -
    input
    -

    - -
    fontName + +

    input

    + +
    fontName

    Mac OS name of the font (e.g., Times New Roman Bold).

    -
    -
    output
    -

    - -
    pathSpec + +

    output

    + + -
    pathSpec

    FSSpec to the file. For passing to FT_New_Face_From_FSSpec.

    face_index +
    face_index

    Index of the face. For passing to FT_New_Face_From_FSSpec.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_GetFile_From_Mac_ATS_Name

    -
    -Defined in FT_MAC_H (ftmac.h). -

    -
    +
    + +
    +

    FT_GetFile_From_Mac_ATS_Name

    +

    Defined in FT_MAC_H (ftmac.h).

    +
       FT_EXPORT( FT_Error )
       FT_GetFile_From_Mac_ATS_Name( const char*  fontName,
                                     FSSpec*      pathSpec,
                                     FT_Long*     face_index )
                                   FT_DEPRECATED_ATTRIBUTE;
    +
    -

    -

    Return an FSSpec for the disk file containing the named font.

    -

    -
    input
    -

    - -
    fontName + +

    input

    + +
    fontName

    Mac OS name of the font in ATS framework.

    -
    -
    output
    -

    - -
    pathSpec + +

    output

    + + -
    pathSpec

    FSSpec to the file. For passing to FT_New_Face_From_FSSpec.

    face_index +
    face_index

    Index of the face. For passing to FT_New_Face_From_FSSpec.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_GetFilePath_From_Mac_ATS_Name

    -
    -Defined in FT_MAC_H (ftmac.h). -

    -
    +
    + +
    +

    FT_GetFilePath_From_Mac_ATS_Name

    +

    Defined in FT_MAC_H (ftmac.h).

    +
       FT_EXPORT( FT_Error )
       FT_GetFilePath_From_Mac_ATS_Name( const char*  fontName,
                                         UInt8*       path,
                                         UInt32       maxPathSize,
                                         FT_Long*     face_index )
                                       FT_DEPRECATED_ATTRIBUTE;
    +
    -

    -

    Return a pathname of the disk file and face index for given font name that is handled by ATS framework.

    -

    -
    input
    -

    - -
    fontName + +

    input

    + +
    fontName

    Mac OS name of the font in ATS framework.

    -
    -
    output
    -

    - -
    path + +

    output

    + + - -
    path

    Buffer to store pathname of the file. For passing to FT_New_Face. The client must allocate this buffer before calling this function.

    maxPathSize +
    maxPathSize

    Lengths of the buffer ‘path’ that client allocated.

    face_index +
    face_index

    Index of the face. For passing to FT_New_Face.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_New_Face_From_FSSpec

    -
    -Defined in FT_MAC_H (ftmac.h). -

    -
    +
    + +
    +

    FT_New_Face_From_FSSpec

    +

    Defined in FT_MAC_H (ftmac.h).

    +
       FT_EXPORT( FT_Error )
       FT_New_Face_From_FSSpec( FT_Library     library,
                                const FSSpec  *spec,
                                FT_Long        face_index,
                                FT_Face       *aface )
                              FT_DEPRECATED_ATTRIBUTE;
    +
    -

    -

    Create a new face object from a given resource and typeface index using an FSSpec to the font file.

    -

    -
    inout
    -

    - -
    library + +

    inout

    + +
    library

    A handle to the library resource.

    -
    -
    input
    -

    - -
    spec + +

    input

    + + -
    spec

    FSSpec to the font file.

    face_index +
    face_index

    The index of the face within the resource. The first face has index 0.

    -
    -
    output
    -

    - -
    aface + +

    output

    + +
    aface

    A handle to a new face object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    FT_New_Face_From_FSSpec is identical to FT_New_Face except it accepts an FSSpec instead of a path.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_New_Face_From_FSRef

    -
    -Defined in FT_MAC_H (ftmac.h). -

    -
    +
    + +
    +

    FT_New_Face_From_FSRef

    +

    Defined in FT_MAC_H (ftmac.h).

    +
       FT_EXPORT( FT_Error )
       FT_New_Face_From_FSRef( FT_Library    library,
                               const FSRef  *ref,
                               FT_Long       face_index,
                               FT_Face      *aface )
                             FT_DEPRECATED_ATTRIBUTE;
    +
    -

    -

    Create a new face object from a given resource and typeface index using an FSRef to the font file.

    -

    -
    inout
    -

    - -
    library + +

    inout

    + +
    library

    A handle to the library resource.

    -
    -
    input
    -

    - -
    spec + +

    input

    + + -
    spec

    FSRef to the font file.

    face_index +
    face_index

    The index of the face within the resource. The first face has index 0.

    -
    -
    output
    -

    - -
    aface + +

    output

    + +
    aface

    A handle to a new face object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    FT_New_Face_From_FSRef is identical to FT_New_Face except it accepts an FSRef instead of a path.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-module_management.html b/freetype/docs/reference/ft2-module_management.html index f83846bf..a836715e 100644 --- a/freetype/docs/reference/ft2-module_management.html +++ b/freetype/docs/reference/ft2-module_management.html @@ -3,54 +3,120 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Module Management -

    +

    Module Management

    Synopsis

    - - - - - - - -
    FT_Module_ConstructorFT_Remove_ModuleFT_Set_Debug_Hook
    FT_Module_DestructorFT_Property_SetFT_Add_Default_Modules
    FT_Module_RequesterFT_Property_GetFT_Renderer_Class
    FT_Module_ClassFT_Reference_LibraryFT_Get_Renderer
    FT_Add_ModuleFT_New_LibraryFT_Set_Renderer
    FT_Get_ModuleFT_Done_Library


    + + + + + + + + + + +
    FT_ModuleFT_Add_Default_ModulesFT_Renderer
    FT_Module_Constructor FT_Renderer_Class
    FT_Module_DestructorFT_Property_Set 
    FT_Module_RequesterFT_Property_GetFT_Get_Renderer
    FT_Module_Class FT_Set_Renderer
     FT_New_Library 
    FT_Add_ModuleFT_Done_LibraryFT_Set_Debug_Hook
    FT_Get_ModuleFT_Reference_Library 
    FT_Remove_Module FT_Driver
    + -

    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.

    @@ -74,102 +140,87 @@ Module Management
       winfonts                                                         
     

    Note that the FreeType Cache sub-system is not a FreeType module.

    -

    -
    -

    FT_Module_Constructor

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
     
    +
    +

    FT_Module

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct FT_ModuleRec_*  FT_Module;
    +
    + +

    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.

    + +
    +
    + +
    +

    FT_Module_Constructor

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
       typedef FT_Error
    -  (*FT_Module_Constructor)( FT_Module  module );
    +  (*FT_Module_Constructor)( FT_Module  module );
    +
    -

    -

    A function used to initialize (not create) a new module object.

    -

    -
    input
    -

    - -
    module + +

    input

    + +
    module

    The module to initialize.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Module_Destructor

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + +
    +

    FT_Module_Destructor

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
       typedef void
    -  (*FT_Module_Destructor)( FT_Module  module );
    +  (*FT_Module_Destructor)( FT_Module  module );
    +
    -

    -

    A function used to finalize (not destroy) a given module object.

    -

    -
    input
    -

    - -
    module + +

    input

    + +
    module

    The module to finalize.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Module_Requester

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + +
    +

    FT_Module_Requester

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
       typedef FT_Module_Interface
    -  (*FT_Module_Requester)( FT_Module    module,
    +  (*FT_Module_Requester)( FT_Module    module,
                               const char*  name );
    +
    -

    -

    A function used to query a given module for a specific interface.

    -

    -
    input
    -

    - -
    module + +

    input

    + + -
    module

    The module to be searched.

    name +
    name

    The name of the interface in the module.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Module_Class

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + +
    +

    FT_Module_Class

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
       typedef struct  FT_Module_Class_
       {
         FT_ULong               module_flags;
    @@ -185,209 +236,193 @@ Defined in FT_MODULE_H (ftmodapi.h).
         FT_Module_Requester    get_interface;
     
       } FT_Module_Class;
    +
    -

    -

    The module class descriptor.

    -

    -
    fields
    -

    - -
    module_flags + +

    fields

    + + - - - - - - -
    module_flags

    Bit flags describing the module.

    module_size +
    module_size

    The size of one module object/instance in bytes.

    module_name +
    module_name

    The name of the module.

    module_version +
    module_version

    The version, as a 16.16 fixed number (major.minor).

    module_requires +
    module_requires

    The version of FreeType this module requires, as a 16.16 fixed number (major.minor). Starts at version 2.0, i.e., 0x20000.

    module_init +
    module_init

    The initializing function.

    module_done +
    module_done

    The finalizing function.

    get_interface +
    get_interface

    The interface requesting function.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Add_Module

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + +
    +

    FT_Add_Module

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
       FT_EXPORT( FT_Error )
       FT_Add_Module( FT_Library              library,
                      const FT_Module_Class*  clazz );
    +
    -

    -

    Add a new module to a given library instance.

    -

    -
    inout
    -

    - -
    library + +

    inout

    + +
    library

    A handle to the library object.

    -
    -
    input
    -

    - -
    clazz + +

    input

    + +
    clazz

    A pointer to class descriptor for the module.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_Module

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + - FT_EXPORT( FT_Module ) +
    +

    FT_Get_Module

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
    +  FT_EXPORT( FT_Module )
       FT_Get_Module( FT_Library   library,
                      const char*  module_name );
    +
    -

    -

    Find a module by its name.

    -

    -
    input
    -

    - -
    library + +

    input

    + + -
    library

    A handle to the library object.

    module_name +
    module_name

    The module's name (as an ASCII string).

    -
    -
    return
    + +

    return

    A module handle. 0 if none was found.

    -
    -
    note
    + +

    note

    FreeType's internal modules aren't documented very well, and you should look up the source code for details.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Remove_Module

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + +
    +

    FT_Remove_Module

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
       FT_EXPORT( FT_Error )
       FT_Remove_Module( FT_Library  library,
    -                    FT_Module   module );
    +                    FT_Module   module );
    +
    -

    -

    Remove a given module from a library instance.

    -

    -
    inout
    -

    - -
    library + +

    inout

    + +
    library

    A handle to a library object.

    -
    -
    input
    -

    - -
    module + +

    input

    + +
    module

    A handle to a module object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The module object is destroyed by the function in case of success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Property_Set

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + +
    +

    FT_Add_Default_Modules

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
    +  FT_EXPORT( void )
    +  FT_Add_Default_Modules( FT_Library  library );
    +
    + +

    Add the set of default drivers to a given library object. This is only useful when you create a library object with FT_New_Library (usually to plug a custom memory manager).

    + +

    inout

    + + +
    library +

    A handle to a new library object.

    +
    + +
    +
    + +
    +

    FT_Property_Set

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
       FT_EXPORT( FT_Error )
       FT_Property_Set( FT_Library        library,
                        const FT_String*  module_name,
                        const FT_String*  property_name,
                        const void*       value );
    +
    -

    -

    Set a property for a given module.

    -

    -
    input
    -

    - -
    library + +

    input

    + + - - -
    library

    A handle to the library the module is part of.

    module_name +
    module_name

    The module name.

    property_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 +
    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
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    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.

    @@ -399,59 +434,50 @@ Defined in FT_MODULE_H (ftmodapi.h).
     

    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
    + +

    since

    2.4.11

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Property_Get

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + +
    +

    FT_Property_Get

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
       FT_EXPORT( FT_Error )
       FT_Property_Get( FT_Library        library,
                        const FT_String*  module_name,
                        const FT_String*  property_name,
                        void*             value );
    +
    -

    -

    Get a module's property value.

    -

    -
    input
    -

    - -
    library + +

    input

    + + - -
    library

    A handle to the library the module is part of.

    module_name +
    module_name

    The module name.

    property_name +
    property_name

    The property name. Properties are described in the ‘Synopsis’ subsection of the module's documentation.

    -
    -
    inout
    -

    - -
    value + +

    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
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    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’.

    @@ -468,210 +494,118 @@ Defined in FT_MODULE_H (ftmodapi.h).
       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
    + +

    since

    2.4.11

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Reference_Library

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Reference_Library( FT_Library  library );
    -
    -

    -
    -

    A counter gets initialized to 1 at the time an FT_Library structure is created. This function increments the counter. FT_Done_Library then only destroys a library if the counter is 1, otherwise it simply decrements the counter.

    -

    This function helps in managing life-cycles of structures that reference FT_Library objects.

    -

    -
    input
    -

    - - -
    library -

    A handle to a target library object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    since
    -

    2.4.2

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_New_Library

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + +
    +

    FT_New_Library

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
       FT_EXPORT( FT_Error )
       FT_New_Library( FT_Memory    memory,
                       FT_Library  *alibrary );
    +
    -

    -

    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.

    Normally, you would call this function (followed by a call to FT_Add_Default_Modules or a series of calls to FT_Add_Module) instead of FT_Init_FreeType to initialize the FreeType library.

    Don't use FT_Done_FreeType but FT_Done_Library to destroy a library instance.

    -

    -
    input
    -

    - -
    memory + +

    input

    + +
    memory

    A handle to the original memory object.

    -
    -
    output
    -

    - -
    alibrary + +

    output

    + +
    alibrary

    A pointer to handle of a new library object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    See the discussion of reference counters in the description of FT_Reference_Library.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Done_Library

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + +
    +

    FT_Done_Library

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
       FT_EXPORT( FT_Error )
       FT_Done_Library( FT_Library  library );
    +
    -

    -

    Discard a given library object. This closes all drivers and discards all resource objects.

    -

    -
    input
    -

    - -
    library + +

    input

    + +
    library

    A handle to the target library.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    See the discussion of reference counters in the description of FT_Reference_Library.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Set_Debug_Hook

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +
    + - FT_EXPORT( void ) - FT_Set_Debug_Hook( FT_Library library, - FT_UInt hook_index, - FT_DebugHook_Func debug_hook ); +
    +

    FT_Reference_Library

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Reference_Library( FT_Library  library );
    +
    -

    -
    -

    Set a debug hook function for debugging the interpreter of a font format.

    -

    -
    inout
    -

    - -
    library -

    A handle to the library object.

    +

    A counter gets initialized to 1 at the time an FT_Library structure is created. This function increments the counter. FT_Done_Library then only destroys a library if the counter is 1, otherwise it simply decrements the counter.

    +

    This function helps in managing life-cycles of structures that reference FT_Library objects.

    + +

    input

    + +
    library +

    A handle to a target library object.

    -
    -
    input
    -

    - - - -
    hook_index -

    The index of the debug hook. You should use the values defined in ‘ftobjs.h’, e.g., ‘FT_DEBUG_HOOK_TRUETYPE’.

    -
    debug_hook -

    The function used to debug the interpreter.

    -
    -
    -
    note
    -

    Currently, four debug hook slots are available, but only two (for the TrueType and the Type 1 interpreter) are defined.

    -

    Since the internal headers of FreeType are no longer installed, the symbol ‘FT_DEBUG_HOOK_TRUETYPE’ isn't available publicly. This is a bug and will be fixed in a forthcoming release.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Add_Default_Modules

    -
    -Defined in FT_MODULE_H (ftmodapi.h). -

    -
    +

    return

    +

    FreeType error code. 0 means success.

    - FT_EXPORT( void ) - FT_Add_Default_Modules( FT_Library library ); +

    since

    +

    2.4.2

    -

    -
    -

    Add the set of default drivers to a given library object. This is only useful when you create a library object with FT_New_Library (usually to plug a custom memory manager).

    -

    -
    inout
    -

    - - -
    library -

    A handle to a new library object.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    +
    + -
    -

    FT_Renderer_Class

    -
    -Defined in FT_RENDER_H (ftrender.h). -

    -
    +
    +

    FT_Renderer

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct FT_RendererRec_*  FT_Renderer;
    +
    +

    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.

    + +
    +
    + +
    +

    FT_Renderer_Class

    +

    Defined in FT_RENDER_H (ftrender.h).

    +
       typedef struct  FT_Renderer_Class_
       {
         FT_Module_Class            root;
    @@ -686,134 +620,160 @@ Defined in FT_RENDER_H (ftrender.h).
         FT_Raster_Funcs*           raster_class;
     
       } FT_Renderer_Class;
    +
    -

    -

    The renderer module class descriptor.

    -

    -
    fields
    -

    - -
    root + +

    fields

    + + - - - - - -
    root

    The root FT_Module_Class fields.

    glyph_format +
    glyph_format

    The glyph image format this renderer handles.

    render_glyph +
    render_glyph

    A method used to render the image that is in a given glyph slot into a bitmap.

    transform_glyph +
    transform_glyph

    A method used to transform the image that is in a given glyph slot.

    get_glyph_cbox +
    get_glyph_cbox

    A method used to access the glyph's cbox.

    set_mode +
    set_mode

    A method used to pass additional parameters.

    raster_class +
    raster_class

    For FT_GLYPH_FORMAT_OUTLINE renderers only. This is a pointer to its raster's class.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_Renderer

    -
    -Defined in FT_RENDER_H (ftrender.h). -

    -
    +
    + - FT_EXPORT( FT_Renderer ) +
    +

    FT_Get_Renderer

    +

    Defined in FT_RENDER_H (ftrender.h).

    +
    +  FT_EXPORT( FT_Renderer )
       FT_Get_Renderer( FT_Library       library,
                        FT_Glyph_Format  format );
    +
    -

    -

    Retrieve the current renderer for a given glyph format.

    -

    -
    input
    -

    - -
    library + +

    input

    + + -
    library

    A handle to the library object.

    format +
    format

    The glyph format.

    -
    -
    return
    + +

    return

    A renderer handle. 0 if none found.

    -
    -
    note
    + +

    note

    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.

    To add a new renderer, simply use FT_Add_Module. To retrieve a renderer by its name, use FT_Get_Module.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Set_Renderer

    -
    -Defined in FT_RENDER_H (ftrender.h). -

    -
    +
    + +
    +

    FT_Set_Renderer

    +

    Defined in FT_RENDER_H (ftrender.h).

    +
       FT_EXPORT( FT_Error )
       FT_Set_Renderer( FT_Library     library,
    -                   FT_Renderer    renderer,
    +                   FT_Renderer    renderer,
                        FT_UInt        num_params,
                        FT_Parameter*  parameters );
    +
    -

    -

    Set the current renderer to use, and set additional mode.

    -

    -
    inout
    -

    - -
    library + +

    inout

    + +
    library

    A handle to the library object.

    -
    -
    input
    -

    - -
    renderer + +

    input

    + + - -
    renderer

    A handle to the renderer object.

    num_params +
    num_params

    The number of additional parameters.

    parameters +
    parameters

    Additional parameters.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    In case of success, the renderer will be used to convert glyph images in the renderer's known format into bitmaps.

    This doesn't change the current renderer for other formats.

    Currently, only the B/W renderer, if compiled with FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels anti-aliasing mode; this option must be set directly in ‘ftraster.c’ and is undefined by default) accepts a single tag ‘pal5’ to set its gray palette as a character string with 5 elements. Consequently, the third and fourth argument are zero normally.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + + +
    +

    FT_Set_Debug_Hook

    +

    Defined in FT_MODULE_H (ftmodapi.h).

    +
    +  FT_EXPORT( void )
    +  FT_Set_Debug_Hook( FT_Library         library,
    +                     FT_UInt            hook_index,
    +                     FT_DebugHook_Func  debug_hook );
    +
    + +

    Set a debug hook function for debugging the interpreter of a font format.

    + +

    inout

    + + +
    library +

    A handle to the library object.

    +
    + +

    input

    + + + +
    hook_index +

    The index of the debug hook. You should use the values defined in ‘ftobjs.h’, e.g., ‘FT_DEBUG_HOOK_TRUETYPE’.

    +
    debug_hook +

    The function used to debug the interpreter.

    +
    + +

    note

    +

    Currently, four debug hook slots are available, but only two (for the TrueType and the Type 1 interpreter) are defined.

    +

    Since the internal headers of FreeType are no longer installed, the symbol ‘FT_DEBUG_HOOK_TRUETYPE’ isn't available publicly. This is a bug and will be fixed in a forthcoming release.

    + +
    +
    + +
    +

    FT_Driver

    +

    Defined in FT_FREETYPE_H (freetype.h).

    +
    +  typedef struct FT_DriverRec_*  FT_Driver;
    +
    + +

    A handle to a given FreeType font driver object. Each font driver is a special module capable of creating faces from font files.

    + +
    +
    diff --git a/freetype/docs/reference/ft2-multiple_masters.html b/freetype/docs/reference/ft2-multiple_masters.html index c9c8b2f0..ba5115b8 100644 --- a/freetype/docs/reference/ft2-multiple_masters.html +++ b/freetype/docs/reference/ft2-multiple_masters.html @@ -3,64 +3,124 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Multiple Masters -

    +

    Multiple Masters

    Synopsis

    - - - - - - - -
    FT_MM_AxisFT_Get_MM_Var
    FT_Multi_MasterFT_Set_MM_Design_Coordinates
    FT_Var_AxisFT_Set_Var_Design_Coordinates
    FT_Var_Named_StyleFT_Set_MM_Blend_Coordinates
    FT_MM_VarFT_Set_Var_Blend_Coordinates
    FT_Get_Multi_Master


    + + + + + + + +
    FT_MM_AxisFT_Get_MM_Var
    FT_Multi_MasterFT_Set_MM_Design_Coordinates
    FT_Var_AxisFT_Set_Var_Design_Coordinates
    FT_Var_Named_StyleFT_Set_MM_Blend_Coordinates
    FT_MM_VarFT_Set_Var_Blend_Coordinates
    FT_Get_Multi_Master
    + -

    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.

    George Williams has extended this interface to make it work with both Type 1 Multiple Masters fonts and GX distortable (var) fonts. Some of these routines only work with MM fonts, others will work with both types. They are similar enough that a consistent interface makes sense.

    -

    -
    -

    FT_MM_Axis

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
     
    +
    +

    FT_MM_Axis

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       typedef struct  FT_MM_Axis_
       {
         FT_String*  name;
    @@ -68,39 +128,31 @@ Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).
         FT_Long     maximum;
     
       } FT_MM_Axis;
    +
    -

    -

    A simple structure used to model a given axis in design space for Multiple Masters fonts.

    This structure can't be used for GX var fonts.

    -

    -
    fields
    -

    - -
    name + +

    fields

    + + - -
    name

    The axis's name.

    minimum +
    minimum

    The axis's minimum design coordinate.

    maximum +
    maximum

    The axis's maximum design coordinate.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Multi_Master

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
    +
    + +
    +

    FT_Multi_Master

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       typedef struct  FT_Multi_Master_
       {
         FT_UInt     num_axis;
    @@ -108,39 +160,31 @@ Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).
         FT_MM_Axis  axis[T1_MAX_MM_AXIS];
     
       } FT_Multi_Master;
    +
    -

    -

    A structure used to model the axes and space of a Multiple Masters font.

    This structure can't be used for GX var fonts.

    -

    -
    fields
    -

    - -
    num_axis + +

    fields

    + + - -
    num_axis

    Number of axes. Cannot exceed 4.

    num_designs +
    num_designs

    Number of designs; should be normally 2^num_axis even though the Type 1 specification strangely allows for intermediate designs to be present. This number cannot exceed 16.

    axis +
    axis

    A table of axis descriptors.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Var_Axis

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
    +
    + +
    +

    FT_Var_Axis

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       typedef struct  FT_Var_Axis_
       {
         FT_String*  name;
    @@ -153,83 +197,67 @@ Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).
         FT_UInt     strid;
     
       } FT_Var_Axis;
    +
    -

    -

    A simple structure used to model a given axis in design space for Multiple Masters and GX var fonts.

    -

    -
    fields
    -

    - -
    name + +

    fields

    + + - - - - -
    name

    The axis's name. Not always meaningful for GX.

    minimum +
    minimum

    The axis's minimum design coordinate.

    def +
    def

    The axis's default design coordinate. FreeType computes meaningful default values for MM; it is then an integer value, not in 16.16 format.

    maximum +
    maximum

    The axis's maximum design coordinate.

    tag +
    tag

    The axis's tag (the GX equivalent to ‘name’). FreeType provides default values for MM if possible.

    strid +
    strid

    The entry in ‘name’ table (another GX version of ‘name’). Not meaningful for MM.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Var_Named_Style

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
    +
    + +
    +

    FT_Var_Named_Style

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       typedef struct  FT_Var_Named_Style_
       {
         FT_Fixed*  coords;
         FT_UInt    strid;
     
       } FT_Var_Named_Style;
    +
    -

    -

    A simple structure used to model a named style in a GX var font.

    This structure can't be used for MM fonts.

    -

    -
    fields
    -

    - -
    coords + +

    fields

    + + -
    coords

    The design coordinates for this style. This is an array with one entry for each axis.

    strid +
    strid

    The entry in ‘name’ table identifying this style.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_MM_Var

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
    +
    + +
    +

    FT_MM_Var

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       typedef struct  FT_MM_Var_
       {
         FT_UInt              num_axis;
    @@ -239,273 +267,216 @@ Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).
         FT_Var_Named_Style*  namedstyle;
     
       } FT_MM_Var;
    +
    -

    -

    A structure used to model the axes and space of a Multiple Masters or GX var distortable font.

    Some fields are specific to one format and not to the other.

    -

    -
    fields
    -

    - -
    num_axis + +

    fields

    + + - - - -
    num_axis

    The number of axes. The maximum value is 4 for MM; no limit in GX.

    num_designs +
    num_designs

    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).

    num_namedstyles +
    num_namedstyles

    The number of named styles; only meaningful for GX that allows certain design coordinates to have a string ID (in the ‘name’ table) associated with them. The font can tell the user that, for example, Weight=1.5 is ‘Bold’.

    axis +
    axis

    A table of axis descriptors. GX fonts contain slightly more data than MM.

    namedstyles +
    namedstyles

    A table of named styles. Only meaningful with GX.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_Multi_Master

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
    +
    + +
    +

    FT_Get_Multi_Master

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_Multi_Master( FT_Face           face,
                            FT_Multi_Master  *amaster );
    +
    -

    -

    Retrieve the Multiple Master descriptor of a given font.

    This function can't be used with GX fonts.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    A handle to the source face.

    -
    -
    output
    -

    - -
    amaster + +

    output

    + +
    amaster

    The Multiple Masters descriptor.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_MM_Var

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
    +
    + +
    +

    FT_Get_MM_Var

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_MM_Var( FT_Face      face,
                      FT_MM_Var*  *amaster );
    +
    -

    -

    Retrieve the Multiple Master/GX var descriptor of a given font.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    A handle to the source face.

    -
    -
    output
    -

    - -
    amaster + +

    output

    + +
    amaster

    The Multiple Masters/GX var descriptor. Allocates a data structure, which the user must free.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Set_MM_Design_Coordinates

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
    +
    + +
    +

    FT_Set_MM_Design_Coordinates

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       FT_EXPORT( FT_Error )
       FT_Set_MM_Design_Coordinates( FT_Face   face,
                                     FT_UInt   num_coords,
                                     FT_Long*  coords );
    +
    -

    -

    For Multiple Masters fonts, choose an interpolated font design through design coordinates.

    This function can't be used with GX fonts.

    -

    -
    inout
    -

    - -
    face + +

    inout

    + +
    face

    A handle to the source face.

    -
    -
    input
    -

    - -
    num_coords + +

    input

    + + -
    num_coords

    The number of design coordinates (must be equal to the number of axes in the font).

    coords +
    coords

    An array of design coordinates.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Set_Var_Design_Coordinates

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
    +
    + +
    +

    FT_Set_Var_Design_Coordinates

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       FT_EXPORT( FT_Error )
       FT_Set_Var_Design_Coordinates( FT_Face    face,
                                      FT_UInt    num_coords,
                                      FT_Fixed*  coords );
    +
    -

    -

    For Multiple Master or GX Var fonts, choose an interpolated font design through design coordinates.

    -

    -
    inout
    -

    - -
    face + +

    inout

    + +
    face

    A handle to the source face.

    -
    -
    input
    -

    - -
    num_coords + +

    input

    + + -
    num_coords

    The number of design coordinates (must be equal to the number of axes in the font).

    coords +
    coords

    An array of design coordinates.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Set_MM_Blend_Coordinates

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
    +
    + +
    +

    FT_Set_MM_Blend_Coordinates

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       FT_EXPORT( FT_Error )
       FT_Set_MM_Blend_Coordinates( FT_Face    face,
                                    FT_UInt    num_coords,
                                    FT_Fixed*  coords );
    +
    -

    -

    For Multiple Masters and GX var fonts, choose an interpolated font design through normalized blend coordinates.

    -

    -
    inout
    -

    - -
    face + +

    inout

    + +
    face

    A handle to the source face.

    -
    -
    input
    -

    - -
    num_coords + +

    input

    + + -
    num_coords

    The number of design coordinates (must be equal to the number of axes in the font).

    coords +
    coords

    The design coordinates array (each element must be between 0 and 1.0).

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Set_Var_Blend_Coordinates

    -
    -Defined in FT_MULTIPLE_MASTERS_H (ftmm.h). -

    -
    +
    + +
    +

    FT_Set_Var_Blend_Coordinates

    +

    Defined in FT_MULTIPLE_MASTERS_H (ftmm.h).

    +
       FT_EXPORT( FT_Error )
       FT_Set_Var_Blend_Coordinates( FT_Face    face,
                                     FT_UInt    num_coords,
                                     FT_Fixed*  coords );
    +
    -

    -

    This is another name of FT_Set_MM_Blend_Coordinates.

    -

    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-ot_validation.html b/freetype/docs/reference/ft2-ot_validation.html index 4f1ecc07..a4988e18 100644 --- a/freetype/docs/reference/ft2-ot_validation.html +++ b/freetype/docs/reference/ft2-ot_validation.html @@ -3,115 +3,119 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -OpenType Validation -

    +

    OpenType Validation

    Synopsis

    - - -
    FT_VALIDATE_OTXXXFT_OpenType_ValidateFT_OpenType_Free


    - -
    -

    This section contains the declaration of functions to validate some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).

    -

    -
    -

    FT_VALIDATE_OTXXX

    -
    -Defined in FT_OPENTYPE_VALIDATE_H (ftotval.h). -

    -
    -
    -#define FT_VALIDATE_BASE  0x0100
    -#define FT_VALIDATE_GDEF  0x0200
    -#define FT_VALIDATE_GPOS  0x0400
    -#define FT_VALIDATE_GSUB  0x0800
    -#define FT_VALIDATE_JSTF  0x1000
    -#define FT_VALIDATE_MATH  0x2000
    -
    -#define FT_VALIDATE_OT  FT_VALIDATE_BASE | \
    -                        FT_VALIDATE_GDEF | \
    -                        FT_VALIDATE_GPOS | \
    -                        FT_VALIDATE_GSUB | \
    -                        FT_VALIDATE_JSTF | \
    -                        FT_VALIDATE_MATH
    -
    -

    -
    -

    A list of bit-field constants used with FT_OpenType_Validate to indicate which OpenType tables should be validated.

    -

    -
    values
    -

    - - - - - - - - +
    FT_VALIDATE_BASE -

    Validate BASE table.

    -
    FT_VALIDATE_GDEF -

    Validate GDEF table.

    -
    FT_VALIDATE_GPOS -

    Validate GPOS table.

    -
    FT_VALIDATE_GSUB -

    Validate GSUB table.

    -
    FT_VALIDATE_JSTF -

    Validate JSTF table.

    -
    FT_VALIDATE_MATH -

    Validate MATH table.

    -
    FT_VALIDATE_OT -

    Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).

    -
    + +
    FT_OpenType_Validate 
    FT_OpenType_FreeFT_VALIDATE_OTXXX
    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_OpenType_Validate

    -
    -Defined in FT_OPENTYPE_VALIDATE_H (ftotval.h). -

    -
     
    +

    This section contains the declaration of functions to validate some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).

    + +
    +

    FT_OpenType_Validate

    +

    Defined in FT_OPENTYPE_VALIDATE_H (ftotval.h).

    +
       FT_EXPORT( FT_Error )
       FT_OpenType_Validate( FT_Face    face,
                             FT_UInt    validation_flags,
    @@ -120,89 +124,124 @@ Defined in FT_OPENTYPE_VALIDATE_H (ftotval.h).
                             FT_Bytes  *GPOS_table,
                             FT_Bytes  *GSUB_table,
                             FT_Bytes  *JSTF_table );
    +
    -

    -

    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).

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the input face.

    validation_flags +
    validation_flags

    A bit field that specifies the tables to be validated. See FT_VALIDATE_OTXXX for possible values.

    -
    -
    output
    -

    - -
    BASE_table + +

    output

    + + - - - -
    BASE_table

    A pointer to the BASE table.

    GDEF_table +
    GDEF_table

    A pointer to the GDEF table.

    GPOS_table +
    GPOS_table

    A pointer to the GPOS table.

    GSUB_table +
    GSUB_table

    A pointer to the GSUB table.

    JSTF_table +
    JSTF_table

    A pointer to the JSTF table.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function only works with OpenType fonts, returning an error otherwise.

    After use, the application should deallocate the five tables with FT_OpenType_Free. A NULL value indicates that the table either doesn't exist in the font, or the application hasn't asked for validation.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_OpenType_Free

    -
    -Defined in FT_OPENTYPE_VALIDATE_H (ftotval.h). -

    -
    +
    + +
    +

    FT_OpenType_Free

    +

    Defined in FT_OPENTYPE_VALIDATE_H (ftotval.h).

    +
       FT_EXPORT( void )
       FT_OpenType_Free( FT_Face   face,
                         FT_Bytes  table );
    +
    -

    -

    Free the buffer allocated by OpenType validator.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the input face.

    table +
    table

    The pointer to the buffer that is allocated by FT_OpenType_Validate.

    -
    -
    note
    + +

    note

    This function must be used to free the buffer allocated by FT_OpenType_Validate only.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + + +
    +

    FT_VALIDATE_OTXXX

    +

    Defined in FT_OPENTYPE_VALIDATE_H (ftotval.h).

    +
    +#define FT_VALIDATE_BASE  0x0100
    +#define FT_VALIDATE_GDEF  0x0200
    +#define FT_VALIDATE_GPOS  0x0400
    +#define FT_VALIDATE_GSUB  0x0800
    +#define FT_VALIDATE_JSTF  0x1000
    +#define FT_VALIDATE_MATH  0x2000
    +
    +#define FT_VALIDATE_OT  FT_VALIDATE_BASE | \
    +                        FT_VALIDATE_GDEF | \
    +                        FT_VALIDATE_GPOS | \
    +                        FT_VALIDATE_GSUB | \
    +                        FT_VALIDATE_JSTF | \
    +                        FT_VALIDATE_MATH
    +
    + +

    A list of bit-field constants used with FT_OpenType_Validate to indicate which OpenType tables should be validated.

    + +

    values

    + + + + + + + + +
    FT_VALIDATE_BASE +

    Validate BASE table.

    +
    FT_VALIDATE_GDEF +

    Validate GDEF table.

    +
    FT_VALIDATE_GPOS +

    Validate GPOS table.

    +
    FT_VALIDATE_GSUB +

    Validate GSUB table.

    +
    FT_VALIDATE_JSTF +

    Validate JSTF table.

    +
    FT_VALIDATE_MATH +

    Validate MATH table.

    +
    FT_VALIDATE_OT +

    Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).

    +
    + +
    +
    diff --git a/freetype/docs/reference/ft2-outline_processing.html b/freetype/docs/reference/ft2-outline_processing.html index ca3306dd..323efc91 100644 --- a/freetype/docs/reference/ft2-outline_processing.html +++ b/freetype/docs/reference/ft2-outline_processing.html @@ -3,69 +3,131 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Outline Processing -

    +

    Outline Processing

    Synopsis

    - - - - - - - - - - - - - -
    FT_Outlineft_outline_flags
    FT_OUTLINE_FLAGSFT_Outline_MoveToFunc
    FT_Outline_NewFT_Outline_LineToFunc
    FT_Outline_DoneFT_Outline_ConicToFunc
    FT_Outline_CopyFT_Outline_CubicToFunc
    FT_Outline_TranslateFT_Outline_Funcs
    FT_Outline_TransformFT_Outline_Decompose
    FT_Outline_EmboldenFT_Outline_Get_CBox
    FT_Outline_EmboldenXYFT_Outline_Get_Bitmap
    FT_Outline_ReverseFT_Outline_Render
    FT_Outline_CheckFT_Orientation
    FT_Outline_Get_BBoxFT_Outline_Get_Orientation


    + + + + + + + + + + + + + + + +
    FT_OutlineFT_Outline_Get_Bitmap
    FT_Outline_NewFT_Outline_Render
    FT_Outline_DoneFT_Outline_Decompose
    FT_Outline_CopyFT_Outline_Funcs
    FT_Outline_TranslateFT_Outline_MoveToFunc
    FT_Outline_TransformFT_Outline_LineToFunc
    FT_Outline_EmboldenFT_Outline_ConicToFunc
    FT_Outline_EmboldenXYFT_Outline_CubicToFunc
    FT_Outline_Reverse 
    FT_Outline_CheckFT_Orientation
     FT_Outline_Get_Orientation
    FT_Outline_Get_CBox 
    FT_Outline_Get_BBoxFT_OUTLINE_XXX
     
    + -

    This section contains routines used to create and destroy scalable glyph images known as ‘outlines’. These can also be measured, transformed, and converted into bitmaps and pixmaps.

    -

    -
    -

    FT_Outline

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
     
    +
    +

    FT_Outline

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef struct  FT_Outline_
       {
         short       n_contours;      /* number of contours in glyph        */
    @@ -78,130 +140,46 @@ Defined in FT_IMAGE_H (ftimage.h).
         int         flags;           /* outline masks                      */
     
       } FT_Outline;
    +
    - /* Following limits must be consistent with */ - /* FT_Outline.{n_contours,n_points} */ -#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX -#define FT_OUTLINE_POINTS_MAX SHRT_MAX - -

    -

    This structure is used to describe an outline to the scan-line converter.

    -

    -
    fields
    -

    - -
    n_contours + +

    fields

    + + - - - - -
    n_contours

    The number of contours in the outline.

    n_points +
    n_points

    The number of points in the outline.

    points +
    points

    A pointer to an array of ‘n_points’ FT_Vector elements, giving the outline's point coordinates.

    tags +
    tags

    A pointer to an array of ‘n_points’ chars, giving each outline point's type.

    If bit 0 is unset, the point is ‘off’ the curve, i.e., a Bézier control point, while it is ‘on’ if set.

    Bit 1 is meaningful for ‘off’ points only. If set, it indicates a third-order Bézier arc control point; and a second-order control point if unset.

    If bit 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).

    Bits 3 and 4 are reserved for internal purposes.

    contours +
    contours

    An array of ‘n_contours’ shorts, giving the end point of each contour within the outline. For example, the first contour is defined by the points ‘0’ to ‘contours[0]’, the second one is defined by the points ‘contours[0]+1’ to ‘contours[1]’, etc.

    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.

    +
    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_XXX.

    -
    -
    note
    -

    The B/W rasterizer only checks bit 2 in the ‘tags’ array for the first point of each contour. The drop-out mode as given with FT_OUTLINE_IGNORE_DROPOUTS, FT_OUTLINE_SMART_DROPOUTS, and FT_OUTLINE_INCLUDE_STUBS in ‘flags’ is then overridden.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_OUTLINE_FLAGS

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +

    note

    +

    The B/W rasterizer only checks bit 2 in the ‘tags’ array for the first point of each contour. The drop-out mode as given with FT_OUTLINE_IGNORE_DROPOUTS, FT_OUTLINE_SMART_DROPOUTS, and FT_OUTLINE_INCLUDE_STUBS in ‘flags’ is then overridden.

    -#define FT_OUTLINE_NONE 0x0 -#define FT_OUTLINE_OWNER 0x1 -#define FT_OUTLINE_EVEN_ODD_FILL 0x2 -#define FT_OUTLINE_REVERSE_FILL 0x4 -#define FT_OUTLINE_IGNORE_DROPOUTS 0x8 -#define FT_OUTLINE_SMART_DROPOUTS 0x10 -#define FT_OUTLINE_INCLUDE_STUBS 0x20 - -#define FT_OUTLINE_HIGH_PRECISION 0x100 -#define FT_OUTLINE_SINGLE_PASS 0x200 - -

    -
    -

    A list of bit-field constants use for the flags in an outline's ‘flags’ field.

    -

    -
    values
    -

    - - - - - - - - - - - - - - - - -
    FT_OUTLINE_NONE -

    Value 0 is reserved.

    -
    FT_OUTLINE_OWNER -

    If set, this flag indicates that the outline's field arrays (i.e., ‘points’, ‘flags’, and ‘contours’) are ‘owned’ by the outline object, and should thus be freed when it is destroyed.

    -
    FT_OUTLINE_EVEN_ODD_FILL
    -

    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).

    -
    FT_OUTLINE_REVERSE_FILL
    -

    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 1 fonts). This flag is ignored by the scan converter.

    -
    FT_OUTLINE_IGNORE_DROPOUTS
    -

    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.

    -
    FT_OUTLINE_SMART_DROPOUTS
    -

    Select smart dropout control. If unset, use simple dropout control. Ignored if FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more information.

    -
    FT_OUTLINE_INCLUDE_STUBS
    -

    If set, turn pixels on for ‘stubs’, otherwise exclude them. Ignored if FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more information.

    -
    FT_OUTLINE_HIGH_PRECISION
    -

    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.

    -
    FT_OUTLINE_SINGLE_PASS -

    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.

    -
    -
    -
    note
    -

    The flags FT_OUTLINE_IGNORE_DROPOUTS, FT_OUTLINE_SMART_DROPOUTS, and FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth rasterizer.

    -

    There exists a second mechanism to pass the drop-out mode to the B/W rasterizer; see the ‘tags’ field in FT_Outline.

    -

    Please refer to the description of the ‘SCANTYPE’ instruction in the OpenType specification (in file ‘ttinst1.doc’) how simple drop-outs, smart drop-outs, and stubs are defined.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Outline_New

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +
    +

    FT_Outline_New

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
       FT_EXPORT( FT_Error )
       FT_Outline_New( FT_Library   library,
                       FT_UInt      numPoints,
    @@ -214,52 +192,43 @@ Defined in FT_OUTLINE_H (ftoutln.h).
                                FT_UInt      numPoints,
                                FT_Int       numContours,
                                FT_Outline  *anoutline );
    +
    -

    -

    Create a new outline of a given size.

    -

    -
    input
    -

    - -
    library + +

    input

    + + - -
    library

    A handle to the library object from where the outline is allocated. Note however that the new outline will not necessarily be freed, when destroying the library, by FT_Done_FreeType.

    numPoints +
    numPoints

    The maximum number of points within the outline. Must be smaller than or equal to 0xFFFF (65535).

    numContours +
    numContours

    The maximum number of contours within the outline. This value must be in the range 0 to ‘numPoints’.

    -
    -
    output
    -

    - -
    anoutline + +

    output

    + +
    anoutline

    A handle to the new outline.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The reason why this function takes a ‘library’ parameter is simply to use the library's memory allocator.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Done

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +
    +

    FT_Outline_Done

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
       FT_EXPORT( FT_Error )
       FT_Outline_Done( FT_Library   library,
                        FT_Outline*  outline );
    @@ -268,192 +237,154 @@ Defined in FT_OUTLINE_H (ftoutln.h).
       FT_EXPORT( FT_Error )
       FT_Outline_Done_Internal( FT_Memory    memory,
                                 FT_Outline*  outline );
    +
    -

    -

    Destroy an outline created with FT_Outline_New.

    -

    -
    input
    -

    - -
    library + +

    input

    + + -
    library

    A handle of the library object used to allocate the outline.

    outline +
    outline

    A pointer to the outline object to be discarded.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    If the outline's ‘owner’ field is not set, only the outline descriptor will be released.

    The reason why this function takes an ‘library’ parameter is simply to use ft_mem_free().

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Copy

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +
    +

    FT_Outline_Copy

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
       FT_EXPORT( FT_Error )
       FT_Outline_Copy( const FT_Outline*  source,
                        FT_Outline        *target );
    +
    -

    -

    Copy an outline into another one. Both objects must have the same sizes (number of points & number of contours) when this function is called.

    -

    -
    input
    -

    - -
    source + +

    input

    + +
    source

    A handle to the source outline.

    -
    -
    output
    -

    - -
    target + +

    output

    + +
    target

    A handle to the target outline.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Translate

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +
    +

    FT_Outline_Translate

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
       FT_EXPORT( void )
       FT_Outline_Translate( const FT_Outline*  outline,
                             FT_Pos             xOffset,
                             FT_Pos             yOffset );
    +
    -

    -

    Apply a simple translation to the points of an outline.

    -

    -
    inout
    -

    - -
    outline + +

    inout

    + +
    outline

    A pointer to the target outline descriptor.

    -
    -
    input
    -

    - -
    xOffset + +

    input

    + + -
    xOffset

    The horizontal offset.

    yOffset +
    yOffset

    The vertical offset.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Transform

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +
    +

    FT_Outline_Transform

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
       FT_EXPORT( void )
       FT_Outline_Transform( const FT_Outline*  outline,
                             const FT_Matrix*   matrix );
    +
    -

    -

    Apply a simple 2x2 matrix to all of an outline's points. Useful for applying rotations, slanting, flipping, etc.

    -

    -
    inout
    -

    - -
    outline + +

    inout

    + +
    outline

    A pointer to the target outline descriptor.

    -
    -
    input
    -

    - -
    matrix + +

    input

    + +
    matrix

    A pointer to the transformation matrix.

    -
    -
    note
    + +

    note

    You can use FT_Outline_Translate if you need to translate the outline's points.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Embolden

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +
    +

    FT_Outline_Embolden

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
       FT_EXPORT( FT_Error )
       FT_Outline_Embolden( FT_Outline*  outline,
                            FT_Pos       strength );
    +
    -

    -

    Embolden an outline. The new outline will be at most 4 times ‘strength’ pixels wider and higher. You may think of the left and bottom borders as unchanged.

    Negative ‘strength’ values to reduce the outline thickness are possible also.

    -

    -
    inout
    -

    - -
    outline + +

    inout

    + +
    outline

    A handle to the target outline.

    -
    -
    input
    -

    - -
    strength + +

    input

    + +
    strength

    How strong the glyph is emboldened. Expressed in 26.6 pixel format.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    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.

    If you need ‘better’ metrics values you should call FT_Outline_Get_CBox or FT_Outline_Get_BBox.

    Example call:

    @@ -462,367 +393,261 @@ Defined in FT_OUTLINE_H (ftoutln.h). if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) FT_Outline_Embolden( &face->slot->outline, strength ); -
    -
    -
    - - -
    [Index][TOC]
    +

    To get meaningful results, font scaling values must be set with functions like FT_Set_Char_Size before calling FT_Render_Glyph.

    -
    -

    FT_Outline_EmboldenXY

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +
    +

    FT_Outline_EmboldenXY

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
       FT_EXPORT( FT_Error )
       FT_Outline_EmboldenXY( FT_Outline*  outline,
                              FT_Pos       xstrength,
                              FT_Pos       ystrength );
    +
    -

    -

    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.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Reverse

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +
    +

    FT_Outline_Reverse

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
       FT_EXPORT( void )
       FT_Outline_Reverse( FT_Outline*  outline );
    +
    -

    -

    Reverse the drawing direction of an outline. This is used to ensure consistent fill conventions for mirrored glyphs.

    -

    -
    inout
    -

    - -
    outline + +

    inout

    + +
    outline

    A pointer to the target outline descriptor.

    -
    -
    note
    -

    This function toggles the bit flag FT_OUTLINE_REVERSE_FILL in the outline's ‘flags’ field.

    + +

    note

    +

    This function toggles the bit flag FT_OUTLINE_REVERSE_FILL in the outline's ‘flags’ field.

    It shouldn't be used by a normal client application, unless it knows what it is doing.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Check

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +
    +

    FT_Outline_Check

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
       FT_EXPORT( FT_Error )
       FT_Outline_Check( FT_Outline*  outline );
    +
    -

    -

    Check the contents of an outline descriptor.

    -

    -
    input
    -

    - -
    outline + +

    input

    + +
    outline

    A handle to a source outline.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Get_BBox

    -
    -Defined in FT_BBOX_H (ftbbox.h). -

    -
    +
    + +
    +

    FT_Outline_Get_CBox

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
    +  FT_EXPORT( void )
    +  FT_Outline_Get_CBox( const FT_Outline*  outline,
    +                       FT_BBox           *acbox );
    +
    + +

    Return an outline's ‘control box’. 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).

    +

    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.

    + +

    input

    + + +
    outline +

    A pointer to the source outline descriptor.

    +
    + +

    output

    + + +
    acbox +

    The outline's control box.

    +
    + +

    note

    +

    See FT_Glyph_Get_CBox for a discussion of tricky fonts.

    + +
    +
    + +
    +

    FT_Outline_Get_BBox

    +

    Defined in FT_BBOX_H (ftbbox.h).

    +
       FT_EXPORT( FT_Error )
       FT_Outline_Get_BBox( FT_Outline*  outline,
                            FT_BBox     *abbox );
    +
    -

    -

    Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm that returns very quickly when the two boxes coincide. Otherwise, the outline Bézier arcs are traversed to extract their extrema.

    -

    -
    input
    -

    - -
    outline + +

    input

    + +
    outline

    A pointer to the source outline.

    -
    -
    output
    -

    - -
    abbox + +

    output

    + +
    abbox

    The outline's exact bounding box.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    If the font is tricky and the glyph has been loaded with FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get reasonable values for the BBox it is necessary to load the glyph at a large ppem value (so that the hinting instructions can properly shift and scale the subglyphs), then extracting the BBox, which can be eventually converted back to font units.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    ft_outline_flags

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + -#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 -#define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL -#define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS -#define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION -#define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS +
    +

    FT_Outline_Get_Bitmap

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Outline_Get_Bitmap( FT_Library        library,
    +                         FT_Outline*       outline,
    +                         const FT_Bitmap  *abitmap );
    +
    -

    -
    -

    These constants are deprecated. Please use the corresponding FT_OUTLINE_FLAGS values.

    -

    -
    values
    -

    - -
    ft_outline_none -

    See FT_OUTLINE_NONE.

    +

    Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.

    + +

    input

    + + - - - - - - - - - -
    library +

    A handle to a FreeType library object.

    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.

    +
    outline +

    A pointer to the source outline descriptor.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_MoveToFunc

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    -
    -  typedef int
    -  (*FT_Outline_MoveToFunc)( const FT_Vector*  to,
    -                            void*             user );
    -
    -#define FT_Outline_MoveTo_Func  FT_Outline_MoveToFunc
    -
    -

    -
    -

    A function pointer type used to describe the signature of a ‘move to’ function during outline walking/decomposition.

    -

    A ‘move to’ is emitted to start a new contour in an outline.

    -

    -
    input
    -

    - - -
    to -

    A pointer to the target point of the ‘move to’.

    -
    user -

    A typeless pointer, which is passed from the caller of the decomposition function.

    +

    inout

    + +
    abitmap +

    A pointer to the target bitmap descriptor.

    -
    -
    return
    -

    Error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_LineToFunc

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +

    return

    +

    FreeType error code. 0 means success.

    - typedef int - (*FT_Outline_LineToFunc)( const FT_Vector* to, - void* user ); +

    note

    +

    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 ‘abitmap’ should be set accordingly.

    +

    It will use the raster corresponding to the default glyph format.

    +

    The value of the ‘num_grays’ field in ‘abitmap’ is ignored. If you select the gray-level rasterizer, and you want less than 256 gray levels, you have to use FT_Outline_Render directly.

    -#define FT_Outline_LineTo_Func FT_Outline_LineToFunc +
    + -

    -
    -

    A function pointer type used to describe the signature of a ‘line to’ function during outline walking/decomposition.

    -

    A ‘line to’ is emitted to indicate a segment in the outline.

    -

    -
    input
    -

    - -
    to -

    A pointer to the target point of the ‘line to’.

    +
    +

    FT_Outline_Render

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Outline_Render( FT_Library         library,
    +                     FT_Outline*        outline,
    +                     FT_Raster_Params*  params );
    +
    + +

    Render an outline within a bitmap using the current scan-convert. This function uses an FT_Raster_Params structure as an argument, allowing advanced features like direct composition, translucency, etc.

    + +

    input

    + + -
    library +

    A handle to a FreeType library object.

    user -

    A typeless pointer, which is passed from the caller of the decomposition function.

    +
    outline +

    A pointer to the source outline descriptor.

    -
    -
    return
    -

    Error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_ConicToFunc

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    -
    -  typedef int
    -  (*FT_Outline_ConicToFunc)( const FT_Vector*  control,
    -                             const FT_Vector*  to,
    -                             void*             user );
    -
    -#define FT_Outline_ConicTo_Func  FT_Outline_ConicToFunc
    -
    -

    -
    -

    A function pointer type used to describe the signature of a ‘conic to’ function during outline walking or decomposition.

    -

    A ‘conic to’ is emitted to indicate a second-order Bézier arc in the outline.

    -

    -
    input
    -

    - - - -
    control -

    An intermediate control point between the last position and the new target in ‘to’.

    -
    to -

    A pointer to the target end point of the conic arc.

    -
    user -

    A typeless pointer, which is passed from the caller of the decomposition function.

    +

    inout

    + +
    params +

    A pointer to an FT_Raster_Params structure used to describe the rendering operation.

    -
    -
    return
    -

    Error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_CubicToFunc

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +

    return

    +

    FreeType error code. 0 means success.

    - typedef int - (*FT_Outline_CubicToFunc)( const FT_Vector* control1, - const FT_Vector* control2, - const FT_Vector* to, - void* user ); +

    note

    +

    You should know what you are doing and how FT_Raster_Params works to use this function.

    +

    The field ‘params.source’ will be set to ‘outline’ before the scan converter is called, which means that the value you give to it is actually ignored.

    +

    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 FT_RASTER_FLAG_DIRECT value of the ‘flags’ field in the FT_Raster_Params structure for more details.

    -#define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc +
    + -

    -
    -

    A function pointer type used to describe the signature of a ‘cubic to’ function during outline walking or decomposition.

    -

    A ‘cubic to’ is emitted to indicate a third-order Bézier arc.

    -

    -
    input
    -

    - -
    control1 -

    A pointer to the first Bézier control point.

    +
    +

    FT_Outline_Decompose

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
    +  FT_EXPORT( FT_Error )
    +  FT_Outline_Decompose( FT_Outline*              outline,
    +                        const FT_Outline_Funcs*  func_interface,
    +                        void*                    user );
    +
    + +

    Walk over an outline's structure to decompose it into individual segments and Bézier arcs. This function also emits ‘move to’ operations to indicate the start of new contours in the outline.

    + +

    input

    + + - - -
    outline +

    A pointer to the source target.

    control2 -

    A pointer to the second Bézier control point.

    -
    to -

    A pointer to the target end point.

    -
    user -

    A typeless pointer, which is passed from the caller of the decomposition function.

    +
    func_interface +

    A table of ‘emitters’, i.e., function pointers called during decomposition to indicate path operations.

    -
    -
    return
    -

    Error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Funcs

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +

    inout

    + + +
    user +

    A typeless pointer that is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.

    +
    +

    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_Outline_Funcs

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef struct  FT_Outline_Funcs_
       {
         FT_Outline_MoveToFunc   move_to;
    @@ -834,317 +659,306 @@ Defined in FT_IMAGE_H (ftimage.h).
         FT_Pos                  delta;
     
       } FT_Outline_Funcs;
    +
    -

    -

    A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Béziers.

    -

    -
    fields
    -

    - -
    move_to + +

    fields

    + + - - - - -
    move_to

    The ‘move to’ emitter.

    line_to +
    line_to

    The segment emitter.

    conic_to +
    conic_to

    The second-order Bézier arc emitter.

    cubic_to +
    cubic_to

    The third-order Bézier arc emitter.

    shift +
    shift

    The shift that is applied to coordinates before they are sent to the emitter.

    delta +
    delta

    The delta that is applied to coordinates before they are sent to the emitter, but after the shift.

    -
    -
    note
    + +

    note

    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:

       x' = (x << shift) - delta                                        
       y' = (x << shift) - delta                                        
     

    Set the values of ‘shift’ and ‘delta’ to 0 to get the original point coordinates.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Decompose

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + - FT_EXPORT( FT_Error ) - FT_Outline_Decompose( FT_Outline* outline, - const FT_Outline_Funcs* func_interface, - void* user ); +
    +

    FT_Outline_MoveToFunc

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
    +  typedef int
    +  (*FT_Outline_MoveToFunc)( const FT_Vector*  to,
    +                            void*             user );
     
    -

    -
    -

    Walk over an outline's structure to decompose it into individual segments and Bézier arcs. This function also emits ‘move to’ operations to indicate the start of new contours in the outline.

    -

    -
    input
    -

    - -
    outline -

    A pointer to the source target.

    +#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc + + +

    A function pointer type used to describe the signature of a ‘move to’ function during outline walking/decomposition.

    +

    A ‘move to’ is emitted to start a new contour in an outline.

    + +

    input

    + + -
    to +

    A pointer to the target point of the ‘move to’.

    func_interface -

    A table of ‘emitters’, i.e., function pointers called during decomposition to indicate path operations.

    +
    user +

    A typeless pointer, which is passed from the caller of the decomposition function.

    -
    -
    inout
    -

    - -
    user -

    A typeless pointer that is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.

    + +

    return

    +

    Error code. 0 means success.

    + +
    + + +
    +

    FT_Outline_LineToFunc

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
    +  typedef int
    +  (*FT_Outline_LineToFunc)( const FT_Vector*  to,
    +                            void*             user );
    +
    +#define FT_Outline_LineTo_Func  FT_Outline_LineToFunc
    +
    + +

    A function pointer type used to describe the signature of a ‘line to’ function during outline walking/decomposition.

    +

    A ‘line to’ is emitted to indicate a segment in the outline.

    + +

    input

    + + +
    to +

    A pointer to the target point of the ‘line to’.

    +
    user +

    A typeless pointer, which is passed from the caller of the decomposition function.

    -
    -
    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).

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Get_CBox

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +

    return

    +

    Error code. 0 means success.

    - FT_EXPORT( void ) - FT_Outline_Get_CBox( const FT_Outline* outline, - FT_BBox *acbox ); +
    + -

    -
    -

    Return an outline's ‘control box’. 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).

    -

    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.

    -

    -
    input
    -

    - -
    outline -

    A pointer to the source outline descriptor.

    +
    +

    FT_Outline_ConicToFunc

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
    +  typedef int
    +  (*FT_Outline_ConicToFunc)( const FT_Vector*  control,
    +                             const FT_Vector*  to,
    +                             void*             user );
    +
    +#define FT_Outline_ConicTo_Func  FT_Outline_ConicToFunc
    +
    + +

    A function pointer type used to describe the signature of a ‘conic to’ function during outline walking or decomposition.

    +

    A ‘conic to’ is emitted to indicate a second-order Bézier arc in the outline.

    + +

    input

    + + + +
    control +

    An intermediate control point between the last position and the new target in ‘to’.

    +
    to +

    A pointer to the target end point of the conic arc.

    +
    user +

    A typeless pointer, which is passed from the caller of the decomposition function.

    -
    -
    output
    -

    - -
    acbox -

    The outline's control box.

    + +

    return

    +

    Error code. 0 means success.

    + +
    + + +
    +

    FT_Outline_CubicToFunc

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
    +  typedef int
    +  (*FT_Outline_CubicToFunc)( const FT_Vector*  control1,
    +                             const FT_Vector*  control2,
    +                             const FT_Vector*  to,
    +                             void*             user );
    +
    +#define FT_Outline_CubicTo_Func  FT_Outline_CubicToFunc
    +
    + +

    A function pointer type used to describe the signature of a ‘cubic to’ function during outline walking or decomposition.

    +

    A ‘cubic to’ is emitted to indicate a third-order Bézier arc.

    + +

    input

    + + + + +
    control1 +

    A pointer to the first Bézier control point.

    +
    control2 +

    A pointer to the second Bézier control point.

    +
    to +

    A pointer to the target end point.

    +
    user +

    A typeless pointer, which is passed from the caller of the decomposition function.

    -
    -
    note
    -

    See FT_Glyph_Get_CBox for a discussion of tricky fonts.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Get_Bitmap

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +

    return

    +

    Error code. 0 means success.

    - FT_EXPORT( FT_Error ) - FT_Outline_Get_Bitmap( FT_Library library, - FT_Outline* outline, - const FT_Bitmap *abitmap ); - -

    -
    -

    Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.

    -

    -
    input
    -

    - - - -
    library -

    A handle to a FreeType library object.

    -
    outline -

    A pointer to the source outline descriptor.

    -
    -
    -
    inout
    -

    - - -
    abitmap -

    A pointer to the target bitmap descriptor.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    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 ‘abitmap’ should be set accordingly.

    -

    It will use the raster corresponding to the default glyph format.

    -

    The value of the ‘num_grays’ field in ‘abitmap’ is ignored. If you select the gray-level rasterizer, and you want less than 256 gray levels, you have to use FT_Outline_Render directly.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Outline_Render

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Outline_Render( FT_Library         library,
    -                     FT_Outline*        outline,
    -                     FT_Raster_Params*  params );
    -
    -

    -
    -

    Render an outline within a bitmap using the current scan-convert. This function uses an FT_Raster_Params structure as an argument, allowing advanced features like direct composition, translucency, etc.

    -

    -
    input
    -

    - - - -
    library -

    A handle to a FreeType library object.

    -
    outline -

    A pointer to the source outline descriptor.

    -
    -
    -
    inout
    -

    - - -
    params -

    A pointer to an FT_Raster_Params structure used to describe the rendering operation.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    You should know what you are doing and how FT_Raster_Params works to use this function.

    -

    The field ‘params.source’ will be set to ‘outline’ before the scan converter is called, which means that the value you give to it is actually ignored.

    -

    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 FT_RASTER_FLAG_DIRECT value of the ‘flags’ field in the FT_Raster_Params structure for more details.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Orientation

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +

    -

    A list of values used to describe an outline's contour orientation.

    The TrueType and PostScript specifications use different conventions to determine whether outline contours should be filled or unfilled.

    -

    -
    values
    -

    - - -
    FT_ORIENTATION_TRUETYPE
    + +

    values

    + + - - - - - - -
    FT_ORIENTATION_TRUETYPE

    According to the TrueType specification, clockwise contours must be filled, and counter-clockwise ones must be unfilled.

    FT_ORIENTATION_POSTSCRIPT
    +
    FT_ORIENTATION_POSTSCRIPT

    According to the PostScript specification, counter-clockwise contours must be filled, and clockwise ones must be unfilled.

    FT_ORIENTATION_FILL_RIGHT
    +
    FT_ORIENTATION_FILL_RIGHT

    This is identical to FT_ORIENTATION_TRUETYPE, but is used to remember that in TrueType, everything that is to the right of the drawing direction of a contour must be filled.

    FT_ORIENTATION_FILL_LEFT
    +
    FT_ORIENTATION_FILL_LEFT

    This is identical to FT_ORIENTATION_POSTSCRIPT, but is used to remember that in PostScript, everything that is to the left of the drawing direction of a contour must be filled.

    FT_ORIENTATION_NONE +
    FT_ORIENTATION_NONE

    The orientation cannot be determined. That is, different parts of the glyph have different orientation.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Outline_Get_Orientation

    -
    -Defined in FT_OUTLINE_H (ftoutln.h). -

    -
    +
    + +
    +

    FT_Outline_Get_Orientation

    +

    Defined in FT_OUTLINE_H (ftoutln.h).

    +
       FT_EXPORT( FT_Orientation )
       FT_Outline_Get_Orientation( FT_Outline*  outline );
    +
    -

    -

    This function analyzes a glyph outline and tries to compute its 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.

    -

    -
    input
    -

    - -
    outline + +

    input

    + +
    outline

    A handle to the source outline.

    -
    -
    return
    + +

    return

    The orientation.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + + +
    +

    FT_OUTLINE_XXX

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
    +#define FT_OUTLINE_NONE             0x0
    +#define FT_OUTLINE_OWNER            0x1
    +#define FT_OUTLINE_EVEN_ODD_FILL    0x2
    +#define FT_OUTLINE_REVERSE_FILL     0x4
    +#define FT_OUTLINE_IGNORE_DROPOUTS  0x8
    +#define FT_OUTLINE_SMART_DROPOUTS   0x10
    +#define FT_OUTLINE_INCLUDE_STUBS    0x20
    +
    +#define FT_OUTLINE_HIGH_PRECISION   0x100
    +#define FT_OUTLINE_SINGLE_PASS      0x200
    +
    +
    +  /* 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
    +#define ft_outline_reverse_fill     FT_OUTLINE_REVERSE_FILL
    +#define ft_outline_ignore_dropouts  FT_OUTLINE_IGNORE_DROPOUTS
    +#define ft_outline_high_precision   FT_OUTLINE_HIGH_PRECISION
    +#define ft_outline_single_pass      FT_OUTLINE_SINGLE_PASS
    +
    + +

    A list of bit-field constants use for the flags in an outline's ‘flags’ field.

    + +

    values

    + + + + + + + + + + +
    FT_OUTLINE_NONE +

    Value 0 is reserved.

    +
    FT_OUTLINE_OWNER +

    If set, this flag indicates that the outline's field arrays (i.e., ‘points’, ‘flags’, and ‘contours’) are ‘owned’ by the outline object, and should thus be freed when it is destroyed.

    +
    FT_OUTLINE_EVEN_ODD_FILL +

    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).

    +
    FT_OUTLINE_REVERSE_FILL +

    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 1 fonts). This flag is ignored by the scan converter.

    +
    FT_OUTLINE_IGNORE_DROPOUTS +

    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.

    +
    FT_OUTLINE_SMART_DROPOUTS +

    Select smart dropout control. If unset, use simple dropout control. Ignored if FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more information.

    +
    FT_OUTLINE_INCLUDE_STUBS +

    If set, turn pixels on for ‘stubs’, otherwise exclude them. Ignored if FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more information.

    +
    FT_OUTLINE_HIGH_PRECISION +

    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.

    +
    FT_OUTLINE_SINGLE_PASS +

    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.

    +
    + +

    note

    +

    The flags FT_OUTLINE_IGNORE_DROPOUTS, FT_OUTLINE_SMART_DROPOUTS, and FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth rasterizer.

    +

    There exists a second mechanism to pass the drop-out mode to the B/W rasterizer; see the ‘tags’ field in FT_Outline.

    +

    Please refer to the description of the ‘SCANTYPE’ instruction in the OpenType specification (in file ‘ttinst1.doc’) how simple drop-outs, smart drop-outs, and stubs are defined.

    + +
    +
    diff --git a/freetype/docs/reference/ft2-pfr_fonts.html b/freetype/docs/reference/ft2-pfr_fonts.html index 86e42bf4..8f3cb8ab 100644 --- a/freetype/docs/reference/ft2-pfr_fonts.html +++ b/freetype/docs/reference/ft2-pfr_fonts.html @@ -3,204 +3,240 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -PFR Fonts -

    +

    PFR Fonts

    Synopsis

    - - -
    FT_Get_PFR_MetricsFT_Get_PFR_KerningFT_Get_PFR_Advance


    + + +
    FT_Get_PFR_MetricsFT_Get_PFR_KerningFT_Get_PFR_Advance
    + -

    This section contains the declaration of PFR-specific functions.

    -

    -
    -

    FT_Get_PFR_Metrics

    -
    -Defined in FT_PFR_H (ftpfr.h). -

    -
     
    +
    +

    FT_Get_PFR_Metrics

    +

    Defined in FT_PFR_H (ftpfr.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_PFR_Metrics( FT_Face    face,
                           FT_UInt   *aoutline_resolution,
                           FT_UInt   *ametrics_resolution,
                           FT_Fixed  *ametrics_x_scale,
                           FT_Fixed  *ametrics_y_scale );
    +
    -

    -

    Return the outline and metrics resolutions of a given PFR face.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    Handle to the input face. It can be a non-PFR face.

    -
    -
    output
    -

    - -
    aoutline_resolution + +

    output

    + + - - -
    aoutline_resolution

    Outline resolution. This is equivalent to ‘face->units_per_EM’ for non-PFR fonts. Optional (parameter can be NULL).

    ametrics_resolution +
    ametrics_resolution

    Metrics resolution. This is equivalent to ‘outline_resolution’ for non-PFR fonts. Optional (parameter can be NULL).

    ametrics_x_scale +
    ametrics_x_scale

    A 16.16 fixed-point number used to scale distance expressed in metrics units to device sub-pixels. This is equivalent to ‘face->size->x_scale’, but for metrics only. Optional (parameter can be NULL).

    ametrics_y_scale +
    ametrics_y_scale

    Same as ‘ametrics_x_scale’ but for the vertical direction. optional (parameter can be NULL).

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    If the input face is not a PFR, this function will return an error. However, in all cases, it will return valid values.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_PFR_Kerning

    -
    -Defined in FT_PFR_H (ftpfr.h). -

    -
    +
    + +
    +

    FT_Get_PFR_Kerning

    +

    Defined in FT_PFR_H (ftpfr.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_PFR_Kerning( FT_Face     face,
                           FT_UInt     left,
                           FT_UInt     right,
                           FT_Vector  *avector );
    +
    -

    -

    Return the kerning pair corresponding to two glyphs in a PFR face. The distance is expressed in metrics units, unlike the result of FT_Get_Kerning.

    -

    -
    input
    -

    - -
    face + +

    input

    + + - -
    face

    A handle to the input face.

    left +
    left

    Index of the left glyph.

    right +

    Index of the right glyph.

    -
    -
    output
    -

    - -
    avector + +

    output

    + +
    avector

    A kerning vector.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function always return distances in original PFR metrics units. This is unlike FT_Get_Kerning with the FT_KERNING_UNSCALED mode, which always returns distances converted to outline units.

    You can use the value of the ‘x_scale’ and ‘y_scale’ parameters returned by FT_Get_PFR_Metrics to scale these to device sub-pixels.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_PFR_Advance

    -
    -Defined in FT_PFR_H (ftpfr.h). -

    -
    +
    + +
    +

    FT_Get_PFR_Advance

    +

    Defined in FT_PFR_H (ftpfr.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_PFR_Advance( FT_Face   face,
                           FT_UInt   gindex,
                           FT_Pos   *aadvance );
    +
    -

    -

    Return a given glyph advance, expressed in original metrics units, from a PFR font.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the input face.

    gindex +
    gindex

    The glyph index.

    -
    -
    output
    -

    - -
    aadvance + +

    output

    + +
    aadvance

    The glyph advance in metrics units.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    You can use the ‘x_scale’ or ‘y_scale’ results of FT_Get_PFR_Metrics to convert the advance to device sub-pixels (i.e., 1/64th of pixels).

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-quick_advance.html b/freetype/docs/reference/ft2-quick_advance.html index a1ebdf7f..4cffbf83 100644 --- a/freetype/docs/reference/ft2-quick_advance.html +++ b/freetype/docs/reference/ft2-quick_advance.html @@ -3,184 +3,222 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Quick retrieval of advance values -

    +

    Quick retrieval of advance values

    Synopsis

    - - - -
    FT_ADVANCE_FLAG_FAST_ONLYFT_Get_Advances
    FT_Get_Advance


    + + + +
    FT_Get_Advance 
    FT_Get_AdvancesFT_ADVANCE_FLAG_FAST_ONLY
    + -

    This section contains functions to quickly extract advance values without handling glyph outlines, if possible.

    -

    -
    -

    FT_ADVANCE_FLAG_FAST_ONLY

    -
    -Defined in FT_ADVANCES_H (ftadvanc.h). -

    -
    -
    -#define FT_ADVANCE_FLAG_FAST_ONLY  0x20000000UL
    -
    -

    -
    -

    A bit-flag to be OR-ed with the ‘flags’ parameter of the FT_Get_Advance and FT_Get_Advances functions.

    -

    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.

    -

    Typically, glyphs that are either unscaled, unhinted, bitmapped, or light-hinted can have their advance width computed very quickly.

    -

    Normal and bytecode hinted modes that require loading, scaling, and hinting of the glyph outline, are extremely slow by comparison.

    -

    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Get_Advance

    -
    -Defined in FT_ADVANCES_H (ftadvanc.h). -

    -
     
    +
    +

    FT_Get_Advance

    +

    Defined in FT_ADVANCES_H (ftadvanc.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_Advance( FT_Face    face,
                       FT_UInt    gindex,
                       FT_Int32   load_flags,
                       FT_Fixed  *padvance );
    +
    -

    -

    Retrieve the advance value of a given glyph outline in an FT_Face.

    -

    -
    input
    -

    - -
    face + +

    input

    + + - -
    face

    The source FT_Face handle.

    gindex +
    gindex

    The glyph index.

    load_flags +
    load_flags

    A set of bit flags similar to those used when calling FT_Load_Glyph, used to determine what kind of advances you need.

    -
    -
    output
    -

    - -
    padvance + +

    output

    + +
    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. Otherwise, it is the horizontal advance in a horizontal layout.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function may fail if you use FT_ADVANCE_FLAG_FAST_ONLY and if the corresponding font backend doesn't have a quick way to retrieve the advances.

    A scaled advance is returned in 16.16 format but isn't transformed by the affine transformation specified by FT_Set_Transform.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_Advances

    -
    -Defined in FT_ADVANCES_H (ftadvanc.h). -

    -
    +
    + +
    +

    FT_Get_Advances

    +

    Defined in FT_ADVANCES_H (ftadvanc.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_Advances( FT_Face    face,
                        FT_UInt    start,
                        FT_UInt    count,
                        FT_Int32   load_flags,
                        FT_Fixed  *padvances );
    +
    -

    -

    Retrieve the advance values of several glyph outlines in an FT_Face.

    -

    -
    input
    -

    - -
    face + +

    input

    + + - - -
    face

    The source FT_Face handle.

    start +
    start

    The first glyph index.

    count +
    count

    The number of advance values you want to retrieve.

    load_flags +
    load_flags

    A set of bit flags similar to those used when calling FT_Load_Glyph.

    -
    -
    output
    -

    - -
    padvance + +

    output

    + +
    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. Otherwise, they are the horizontal advances in a horizontal layout.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    This function may fail if you use FT_ADVANCE_FLAG_FAST_ONLY and if the corresponding font backend doesn't have a quick way to retrieve the advances.

    Scaled advances are returned in 16.16 format but aren't transformed by the affine transformation specified by FT_Set_Transform.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + + +
    +

    FT_ADVANCE_FLAG_FAST_ONLY

    +

    Defined in FT_ADVANCES_H (ftadvanc.h).

    +
    +#define FT_ADVANCE_FLAG_FAST_ONLY  0x20000000UL
    +
    + +

    A bit-flag to be OR-ed with the ‘flags’ parameter of the FT_Get_Advance and FT_Get_Advances functions.

    +

    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.

    +

    Typically, glyphs that are either unscaled, unhinted, bitmapped, or light-hinted can have their advance width computed very quickly.

    +

    Normal and bytecode hinted modes that require loading, scaling, and hinting of the glyph outline, are extremely slow by comparison.

    + +
    +
    diff --git a/freetype/docs/reference/ft2-raster.html b/freetype/docs/reference/ft2-raster.html index d16280fc..3d406212 100644 --- a/freetype/docs/reference/ft2-raster.html +++ b/freetype/docs/reference/ft2-raster.html @@ -3,81 +3,135 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Scanline Converter -

    +

    Scanline Converter

    Synopsis

    - - - - - - -
    FT_RasterFT_RASTER_FLAG_XXXFT_Raster_SetModeFunc
    FT_SpanFT_Raster_ParamsFT_Raster_RenderFunc
    FT_SpanFuncFT_Raster_NewFuncFT_Raster_Funcs
    FT_Raster_BitTest_FuncFT_Raster_DoneFunc
    FT_Raster_BitSet_FuncFT_Raster_ResetFunc


    + + + + + + + +
    FT_Raster FT_Raster_Funcs
    FT_SpanFT_Raster_NewFunc 
    FT_SpanFuncFT_Raster_DoneFuncFT_Raster_BitTest_Func
     FT_Raster_ResetFuncFT_Raster_BitSet_Func
    FT_Raster_ParamsFT_Raster_SetModeFunc
    FT_RASTER_FLAG_XXXFT_Raster_RenderFunc
    + -

    This section contains technical definitions.

    -

    -
    -

    FT_Raster

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
     
    +
    +

    FT_Raster

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef struct FT_RasterRec_*  FT_Raster;
    +
    -

    -
    -

    A handle (pointer) to a raster object. Each object can be used independently to convert an outline into a bitmap or pixmap.

    -

    -
    -
    - - -
    [Index][TOC]
    +

    An opaque handle (pointer) to a raster object. Each object can be used independently to convert an outline into a bitmap or pixmap.

    -
    -

    FT_Span

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Span

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef struct  FT_Span_
       {
         short           x;
    @@ -85,42 +139,34 @@ Defined in FT_IMAGE_H (ftimage.h).
         unsigned char   coverage;
     
       } FT_Span;
    +
    -

    -
    -

    A structure used to model a single span of gray (or black) pixels when rendering a monochrome or anti-aliased bitmap.

    -

    -
    fields
    -

    - -
    x +

    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.

    len +
    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.

    +
    coverage +

    The span color/coverage, ranging from 0 (background) to 255 (foreground).

    -
    -
    note
    + +

    note

    This structure is used by the span drawing callback type named 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.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_SpanFunc

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_SpanFunc

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef void
       (*FT_SpanFunc)( int             y,
                       int             count,
    @@ -128,439 +174,294 @@ Defined in FT_IMAGE_H (ftimage.h).
                       void*           user );
     
     #define FT_Raster_Span_Func  FT_SpanFunc
    +
    -

    -

    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.

    -

    -
    input
    -

    - -
    y + +

    input

    + + - - -
    y

    The scanline's y coordinate.

    count +
    count

    The number of spans to draw on this scanline.

    spans +
    spans

    A table of ‘count’ spans to draw on the scanline.

    user +
    user

    User-supplied data that is passed to the callback.

    -
    -
    note
    + +

    note

    This callback allows client applications to directly render the gray spans of the anti-aliased bitmap to any kind of surfaces.

    This can be used to write anti-aliased outlines directly to a given background bitmap, and even perform translucency.

    Note that the ‘count’ field cannot be greater than a fixed value defined by the ‘FT_MAX_GRAY_SPANS’ configuration macro in ‘ftoption.h’. By default, this value is set to 32, which means that if there are more than 32 spans on a given scanline, the callback is called several times with the same ‘y’ parameter in order to draw all callbacks.

    Otherwise, the callback is only called once per scan-line, and only for those scanlines that do have ‘gray’ pixels on them.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Raster_BitTest_Func

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    -
    -  typedef int
    -  (*FT_Raster_BitTest_Func)( int    y,
    -                             int    x,
    -                             void*  user );
    -
    -

    -
    -

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Raster_BitSet_Func

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    -
    -  typedef void
    -  (*FT_Raster_BitSet_Func)( int    y,
    -                            int    x,
    -                            void*  user );
    -
    -

    -
    -

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_RASTER_FLAG_XXX

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    -
    -#define FT_RASTER_FLAG_DEFAULT  0x0
    -#define FT_RASTER_FLAG_AA       0x1
    -#define FT_RASTER_FLAG_DIRECT   0x2
    -#define FT_RASTER_FLAG_CLIP     0x4
    -
    -  /* deprecated */
    -#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
    -#define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP
    -
    -

    -
    -

    A list of bit flag constants as used in the ‘flags’ field of a FT_Raster_Params structure.

    -

    -
    values
    -

    - - - - - -
    FT_RASTER_FLAG_DEFAULT -

    This value is 0.

    -
    FT_RASTER_FLAG_AA -

    This flag is set to indicate that an anti-aliased glyph image should be generated. Otherwise, it will be monochrome (1-bit).

    -
    FT_RASTER_FLAG_DIRECT -

    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 must be zeroed before rendering.

    -

    Note that for now, 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 be clipped to a box specified in the ‘clip_box’ field of the FT_Raster_Params structure.

    -

    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.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Raster_Params

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Raster_Params

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef struct  FT_Raster_Params_
       {
         const FT_Bitmap*        target;
         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;
     
       } FT_Raster_Params;
    +
    -

    -

    A structure to hold the arguments used by a raster's render function.

    -

    -
    fields
    -

    - -
    target + +

    fields

    + + - - - - - - - -
    target

    The target bitmap.

    source +
    source

    A pointer to the source glyph image (e.g., an FT_Outline).

    flags +
    flags

    The rendering flags.

    gray_spans +
    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

    User-supplied data that is passed to each drawing callback.

    clip_box +
    clip_box

    An optional clipping box. It is only used in direct rendering mode. Note that coordinates here should be expressed in integer pixels (and not in 26.6 fixed-point units).

    -
    -
    note
    + +

    note

    An anti-aliased glyph bitmap is drawn if the FT_RASTER_FLAG_AA bit flag is set in the ‘flags’ field, otherwise a monochrome bitmap is generated.

    -

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    +

    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. 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.

    -
    -

    FT_Raster_NewFunc

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_RASTER_FLAG_XXX

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
    +#define FT_RASTER_FLAG_DEFAULT  0x0
    +#define FT_RASTER_FLAG_AA       0x1
    +#define FT_RASTER_FLAG_DIRECT   0x2
    +#define FT_RASTER_FLAG_CLIP     0x4
    +
    +  /* 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
    +#define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP
    +
    + +

    A list of bit flag constants as used in the ‘flags’ field of a FT_Raster_Params structure.

    + +

    values

    + + + + + +
    FT_RASTER_FLAG_DEFAULT +

    This value is 0.

    +
    FT_RASTER_FLAG_AA +

    This flag is set to indicate that an anti-aliased glyph image should be generated. Otherwise, it will be monochrome (1-bit).

    +
    FT_RASTER_FLAG_DIRECT +

    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 must be zeroed before rendering.

    +

    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 be clipped to a box specified in the ‘clip_box’ field of the FT_Raster_Params structure.

    +

    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.

    +
    + +
    +
    + +
    +

    FT_Raster_NewFunc

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef int
       (*FT_Raster_NewFunc)( void*       memory,
                             FT_Raster*  raster );
     
     #define FT_Raster_New_Func  FT_Raster_NewFunc
    +
    -

    -

    A function used to create a new raster object.

    -

    -
    input
    -

    - -
    memory + +

    input

    + +
    memory

    A handle to the memory allocator.

    -
    -
    output
    -

    - -
    raster + +

    output

    + +
    raster

    A handle to the new raster object.

    -
    -
    return
    + +

    return

    Error code. 0 means success.

    -
    -
    note
    + +

    note

    The ‘memory’ parameter is a typeless pointer in order to avoid un-wanted dependencies on the rest of the FreeType code. In practice, it is an FT_Memory object, i.e., a handle to the standard FreeType memory allocator. However, this field can be completely ignored by a given raster implementation.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Raster_DoneFunc

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Raster_DoneFunc

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef void
       (*FT_Raster_DoneFunc)( FT_Raster  raster );
     
     #define FT_Raster_Done_Func  FT_Raster_DoneFunc
    +
    -

    -

    A function used to destroy a given raster object.

    -

    -
    input
    -

    - -
    raster + +

    input

    + +
    raster

    A handle to the raster object.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Raster_ResetFunc

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Raster_ResetFunc

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef void
       (*FT_Raster_ResetFunc)( FT_Raster       raster,
                               unsigned char*  pool_base,
                               unsigned long   pool_size );
     
     #define FT_Raster_Reset_Func  FT_Raster_ResetFunc
    +
    -

    -

    FreeType provides an area of memory called the ‘render pool’, 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.

    This function is called each time the render pool changes, or just after a new raster object is created.

    -

    -
    input
    -

    - -
    raster + +

    input

    + + - -
    raster

    A handle to the new raster object.

    pool_base +
    pool_base

    The address in memory of the render pool.

    pool_size +
    pool_size

    The size in bytes of the render pool.

    -
    -
    note
    + +

    note

    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.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Raster_SetModeFunc

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Raster_SetModeFunc

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef int
       (*FT_Raster_SetModeFunc)( FT_Raster      raster,
                                 unsigned long  mode,
                                 void*          args );
     
     #define FT_Raster_Set_Mode_Func  FT_Raster_SetModeFunc
    +
    -

    -

    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 ‘features’ in a given raster module.

    -

    -
    input
    -

    - -
    raster + +

    input

    + + - -
    raster

    A handle to the new raster object.

    mode +
    mode

    A 4-byte tag used to name the mode or property.

    args +
    args

    A pointer to the new mode/property to use.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Raster_RenderFunc

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Raster_RenderFunc

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef int
       (*FT_Raster_RenderFunc)( FT_Raster                raster,
                                const FT_Raster_Params*  params );
     
     #define FT_Raster_Render_Func  FT_Raster_RenderFunc
    +
    -

    -

    Invoke a given raster to scan-convert a given glyph image into a target bitmap.

    -

    -
    input
    -

    - -
    raster + +

    input

    + + -
    raster

    A handle to the raster object.

    params +
    params

    A pointer to an FT_Raster_Params structure used to store the rendering parameters.

    -
    -
    return
    + +

    return

    Error code. 0 means success.

    -
    -
    note
    + +

    note

    The exact format of the source image depends on the raster's glyph format defined in its FT_Raster_Funcs structure. It can be an FT_Outline or anything else in order to support a large array of glyph formats.

    Note also that the render function can fail and return a ‘FT_Err_Unimplemented_Feature’ error code if the raster used does not support direct composition.

    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 that support direct composition).

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Raster_Funcs

    -
    -Defined in FT_IMAGE_H (ftimage.h). -

    -
    +
    + +
    +

    FT_Raster_Funcs

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
       typedef struct  FT_Raster_Funcs_
       {
         FT_Glyph_Format        glyph_format;
    @@ -571,36 +472,61 @@ Defined in FT_IMAGE_H (ftimage.h).
         FT_Raster_DoneFunc     raster_done;
     
       } FT_Raster_Funcs;
    +
    -

    -

    A structure used to describe a given raster class to the library.

    -

    -
    fields
    -

    - -
    glyph_format + +

    fields

    + + - - - -
    glyph_format

    The supported glyph format for this raster.

    raster_new +
    raster_new

    The raster constructor.

    raster_reset +
    raster_reset

    Used to reset the render pool within the raster.

    raster_render +
    raster_render

    A function to render a glyph into a given bitmap.

    raster_done +
    raster_done

    The raster destructor.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + + +
    +

    FT_Raster_BitTest_Func

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
    +  typedef int
    +  (*FT_Raster_BitTest_Func)( int    y,
    +                             int    x,
    +                             void*  user );
    +
    + +

    Deprecated, unimplemented.

    + +
    +
    + +
    +

    FT_Raster_BitSet_Func

    +

    Defined in FT_IMAGE_H (ftimage.h).

    +
    +  typedef void
    +  (*FT_Raster_BitSet_Func)( int    y,
    +                            int    x,
    +                            void*  user );
    +
    + +

    Deprecated, unimplemented.

    + +
    +
    diff --git a/freetype/docs/reference/ft2-sfnt_names.html b/freetype/docs/reference/ft2-sfnt_names.html index 2823381e..3bd918d3 100644 --- a/freetype/docs/reference/ft2-sfnt_names.html +++ b/freetype/docs/reference/ft2-sfnt_names.html @@ -3,64 +3,124 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -SFNT Names -

    +

    SFNT Names

    Synopsis

    - - - - - - -
    FT_SfntName
    FT_Get_Sfnt_Name_Count
    FT_Get_Sfnt_Name
    FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
    FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY


    + + + + + + +
    FT_SfntName
    FT_Get_Sfnt_Name_Count
    FT_Get_Sfnt_Name
    FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
    FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
    + -

    The TrueType and OpenType specifications allow the inclusion of a special ‘names table’ in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.

    The definitions below are used to access them if available.

    Note that this has nothing to do with glyph names!

    -

    -
    -

    FT_SfntName

    -
    -Defined in FT_SFNT_NAMES_H (ftsnames.h). -

    -
     
    +
    +

    FT_SfntName

    +

    Defined in FT_SFNT_NAMES_H (ftsnames.h).

    +
       typedef struct  FT_SfntName_
       {
         FT_UShort  platform_id;
    @@ -72,161 +132,125 @@ Defined in FT_SFNT_NAMES_H (ftsnames.h).
         FT_UInt    string_len;  /* in bytes */
     
       } FT_SfntName;
    +
    -

    -

    A structure used to model an SFNT ‘name’ table entry.

    -

    -
    fields
    -

    - -
    platform_id + +

    fields

    + + - - - - -
    platform_id

    The platform ID for ‘string’.

    encoding_id +
    encoding_id

    The encoding ID for ‘string’.

    language_id +
    language_id

    The language ID for ‘string’.

    name_id +
    name_id

    An identifier for ‘string’.

    string +
    string

    The ‘name’ string. Note that its format differs depending on the (platform,encoding) pair. It can be a Pascal String, a UTF-16 one, etc.

    Generally speaking, the string is not zero-terminated. Please refer to the TrueType specification for details.

    string_len +
    string_len

    The length of ‘string’ in bytes.

    -
    -
    note
    + +

    note

    Possible values for ‘platform_id’, ‘encoding_id’, ‘language_id’, and ‘name_id’ are given in the file ‘ttnameid.h’. For details please refer to the TrueType or OpenType specification.

    See also TT_PLATFORM_XXX, TT_APPLE_ID_XXX, TT_MAC_ID_XXX, TT_ISO_ID_XXX, and TT_MS_ID_XXX.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_Sfnt_Name_Count

    -
    -Defined in FT_SFNT_NAMES_H (ftsnames.h). -

    -
    +
    + +
    +

    FT_Get_Sfnt_Name_Count

    +

    Defined in FT_SFNT_NAMES_H (ftsnames.h).

    +
       FT_EXPORT( FT_UInt )
       FT_Get_Sfnt_Name_Count( FT_Face  face );
    +
    -

    -

    Retrieve the number of name strings in the SFNT ‘name’ table.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    A handle to the source face.

    -
    -
    return
    + +

    return

    The number of strings in the ‘name’ table.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Get_Sfnt_Name

    -
    -Defined in FT_SFNT_NAMES_H (ftsnames.h). -

    -
    +
    + +
    +

    FT_Get_Sfnt_Name

    +

    Defined in FT_SFNT_NAMES_H (ftsnames.h).

    +
       FT_EXPORT( FT_Error )
       FT_Get_Sfnt_Name( FT_Face       face,
                         FT_UInt       idx,
                         FT_SfntName  *aname );
    +
    -

    -

    Retrieve a string of the SFNT ‘name’ table for a given index.

    -

    -
    input
    -

    - -
    face + +

    input

    + + -
    face

    A handle to the source face.

    idx +
    idx

    The index of the ‘name’ string.

    -
    -
    output
    -

    - -
    aname + +

    output

    + +
    aname

    The indexed FT_SfntName structure.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    The ‘string’ array returned in the ‘aname’ structure is not null-terminated. The application should deallocate it if it is no longer in use.

    Use FT_Get_Sfnt_Name_Count to get the total number of available ‘name’ table entries, then do a loop until you get the right platform, encoding, and name ID.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY

    -
    -Defined in FT_SFNT_NAMES_H (ftsnames.h). -

    -
    +
    + +
    +

    FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY

    +

    Defined in FT_SFNT_NAMES_H (ftsnames.h).

    +
     #define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY  FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
    +
    -

    -

    A constant used as the tag of FT_Parameter structures to make FT_Open_Face() ignore preferred family subfamily names in ‘name’ table since OpenType version 1.4. For backwards compatibility with legacy systems that have a 4-face-per-family restriction.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY

    -
    -Defined in FT_SFNT_NAMES_H (ftsnames.h). -

    -
    +
    + +
    +

    FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY

    +

    Defined in FT_SFNT_NAMES_H (ftsnames.h).

    +
     #define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY  FT_MAKE_TAG( 'i', 'g', 'p', 's' )
    +
    -

    -

    A constant used as the tag of FT_Parameter structures to make FT_Open_Face() ignore preferred subfamily names in ‘name’ table since OpenType version 1.4. For backwards compatibility with legacy systems that have a 4-face-per-family restriction.

    -

    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-sizes_management.html b/freetype/docs/reference/ft2-sizes_management.html index ecb6b115..50563eb5 100644 --- a/freetype/docs/reference/ft2-sizes_management.html +++ b/freetype/docs/reference/ft2-sizes_management.html @@ -3,162 +3,200 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -Size Management -

    +

    Size Management

    Synopsis

    - - -
    FT_New_SizeFT_Done_SizeFT_Activate_Size


    + + +
    FT_New_SizeFT_Done_SizeFT_Activate_Size
    + -

    When creating a new face object (e.g., with FT_New_Face), an FT_Size object is automatically created and used to store all pixel-size dependent information, available in the ‘face->size’ field.

    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 FT_New_Size and FT_Done_Size.

    Note that FT_Set_Pixel_Sizes and FT_Set_Char_Size only modify the contents of the current ‘active’ size; you thus need to use FT_Activate_Size to change it.

    99% of applications won't need the functions provided here, especially if they use the caching sub-system, so be cautious when using these.

    -

    -
    -

    FT_New_Size

    -
    -Defined in FT_SIZES_H (ftsizes.h). -

    -
     
    +
    +

    FT_New_Size

    +

    Defined in FT_SIZES_H (ftsizes.h).

    +
       FT_EXPORT( FT_Error )
       FT_New_Size( FT_Face   face,
                    FT_Size*  size );
    +
    -

    -

    Create a new size object from a given face object.

    -

    -
    input
    -

    - -
    face + +

    input

    + +
    face

    A handle to a parent face object.

    -
    -
    output
    -

    - -
    asize + +

    output

    + +
    asize

    A handle to a new size object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    You need to call FT_Activate_Size in order to select the new size for upcoming calls to FT_Set_Pixel_Sizes, FT_Set_Char_Size, FT_Load_Glyph, FT_Load_Char, etc.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Done_Size

    -
    -Defined in FT_SIZES_H (ftsizes.h). -

    -
    +
    + +
    +

    FT_Done_Size

    +

    Defined in FT_SIZES_H (ftsizes.h).

    +
       FT_EXPORT( FT_Error )
       FT_Done_Size( FT_Size  size );
    +
    -

    -

    Discard a given size object. Note that FT_Done_Face automatically discards all size objects allocated with FT_New_Size.

    -

    -
    input
    -

    - -
    size + +

    input

    + +
    size

    A handle to a target size object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Activate_Size

    -
    -Defined in FT_SIZES_H (ftsizes.h). -

    -
    +
    + +
    +

    FT_Activate_Size

    +

    Defined in FT_SIZES_H (ftsizes.h).

    +
       FT_EXPORT( FT_Error )
       FT_Activate_Size( FT_Size  size );
    +
    -

    -

    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 that has been activated last to determine the ‘current character pixel size’.

    This function can be used to ‘activate’ a previously created size object.

    -

    -
    input
    -

    - -
    size + +

    input

    + +
    size

    A handle to a target size object.

    -
    -
    return
    + +

    return

    FreeType error code. 0 means success.

    -
    -
    note
    + +

    note

    If ‘face’ is the size's parent face object, this function changes the value of ‘face->size’ to the input size handle.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-system_interface.html b/freetype/docs/reference/ft2-system_interface.html index 66d044a3..139cbc7f 100644 --- a/freetype/docs/reference/ft2-system_interface.html +++ b/freetype/docs/reference/ft2-system_interface.html @@ -3,193 +3,222 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
    [Index][TOC]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    -System Interface -

    +

    System Interface

    Synopsis

    - - - - - -
    FT_MemoryFT_MemoryRecFT_Stream_CloseFunc
    FT_Alloc_FuncFT_StreamFT_StreamRec
    FT_Free_FuncFT_StreamDesc
    FT_Realloc_FuncFT_Stream_IoFunc


    + + + + + +
    FT_MemoryFT_MemoryRecFT_Stream_CloseFunc
    FT_Alloc_FuncFT_StreamFT_StreamRec
    FT_Free_FuncFT_StreamDesc
    FT_Realloc_FuncFT_Stream_IoFunc
    + -

    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.

    -

    -
    -

    FT_Memory

    -
    -Defined in FT_SYSTEM_H (ftsystem.h). -

    -
     
    +
    +

    FT_Memory

    +

    Defined in FT_SYSTEM_H (ftsystem.h).

    +
       typedef struct FT_MemoryRec_*  FT_Memory;
    +
    -

    -

    A handle to a given memory manager object, defined with an FT_MemoryRec structure.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Alloc_Func

    -
    -Defined in FT_SYSTEM_H (ftsystem.h). -

    -
    +
    + +
    +

    FT_Alloc_Func

    +

    Defined in FT_SYSTEM_H (ftsystem.h).

    +
       typedef void*
       (*FT_Alloc_Func)( FT_Memory  memory,
                         long       size );
    +
    -

    -

    A function used to allocate ‘size’ bytes from ‘memory’.

    -

    -
    input
    -

    - -
    memory + +

    input

    + + -
    memory

    A handle to the source memory manager.

    size +
    size

    The size in bytes to allocate.

    -
    -
    return
    + +

    return

    Address of new memory block. 0 in case of failure.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Free_Func

    -
    -Defined in FT_SYSTEM_H (ftsystem.h). -

    -
    +
    + +
    +

    FT_Free_Func

    +

    Defined in FT_SYSTEM_H (ftsystem.h).

    +
       typedef void
       (*FT_Free_Func)( FT_Memory  memory,
                        void*      block );
    +
    -

    -

    A function used to release a given block of memory.

    -

    -
    input
    -

    - -
    memory + +

    input

    + + -
    memory

    A handle to the source memory manager.

    block +
    block

    The address of the target memory block.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Realloc_Func

    -
    -Defined in FT_SYSTEM_H (ftsystem.h). -

    -
    +
    + +
    +

    FT_Realloc_Func

    +

    Defined in FT_SYSTEM_H (ftsystem.h).

    +
       typedef void*
       (*FT_Realloc_Func)( FT_Memory  memory,
                           long       cur_size,
                           long       new_size,
                           void*      block );
    +
    -

    -

    A function used to re-allocate a given block of memory.

    -

    -
    input
    -

    - -
    memory + +

    input

    + + - - -
    memory

    A handle to the source memory manager.

    cur_size +
    cur_size

    The block's current size in bytes.

    new_size +
    new_size

    The block's requested new size.

    block +
    block

    The block's current address.

    -
    -
    return
    + +

    return

    New block address. 0 in case of memory shortage.

    -
    -
    note
    + +

    note

    In case of error, the old block must still be available.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_MemoryRec

    -
    -Defined in FT_SYSTEM_H (ftsystem.h). -

    -
    +
    + +
    +

    FT_MemoryRec

    +

    Defined in FT_SYSTEM_H (ftsystem.h).

    +
       struct  FT_MemoryRec_
       {
         void*            user;
    @@ -197,158 +226,123 @@ Defined in FT_SYSTEM_H (ftsystem.h).
         FT_Free_Func     free;
         FT_Realloc_Func  realloc;
       };
    +
    -

    -

    A structure used to describe a given memory manager to FreeType 2.

    -

    -
    fields
    -

    - -
    user + +

    fields

    + + - - -
    user

    A generic typeless pointer for user data.

    alloc +
    alloc

    A pointer type to an allocation function.

    free +
    free

    A pointer type to an memory freeing function.

    realloc +
    realloc

    A pointer type to a reallocation function.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stream

    -
    -Defined in FT_SYSTEM_H (ftsystem.h). -

    -
    +
    + +
    +

    FT_Stream

    +

    Defined in FT_SYSTEM_H (ftsystem.h).

    +
       typedef struct FT_StreamRec_*  FT_Stream;
    +
    -

    -

    A handle to an input stream.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_StreamDesc

    -
    -Defined in FT_SYSTEM_H (ftsystem.h). -

    -
    +

    also

    +

    See FT_StreamRec for the publicly accessible fields of a given stream object.

    +
    + + +
    +

    FT_StreamDesc

    +

    Defined in FT_SYSTEM_H (ftsystem.h).

    +
       typedef union  FT_StreamDesc_
       {
         long   value;
         void*  pointer;
     
       } FT_StreamDesc;
    +
    -

    -

    A union type used to store either a long or a pointer. This is used to store a file descriptor or a ‘FILE*’ in an input stream.

    -

    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stream_IoFunc

    -
    -Defined in FT_SYSTEM_H (ftsystem.h). -

    -
    +
    + +
    +

    FT_Stream_IoFunc

    +

    Defined in FT_SYSTEM_H (ftsystem.h).

    +
       typedef unsigned long
       (*FT_Stream_IoFunc)( FT_Stream       stream,
                            unsigned long   offset,
                            unsigned char*  buffer,
                            unsigned long   count );
    +
    -

    -

    A function used to seek and read data from a given input stream.

    -

    -
    input
    -

    - -
    stream + +

    input

    + + - - -
    stream

    A handle to the source stream.

    offset +
    offset

    The offset of read in stream (always from start).

    buffer +
    buffer

    The address of the read buffer.

    count +
    count

    The number of bytes to read from the stream.

    -
    -
    return
    + +

    return

    The number of bytes effectively read by the stream.

    -
    -
    note
    + +

    note

    This function might be called to perform a seek or skip operation with a ‘count’ of 0. A non-zero return value then indicates an error.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_Stream_CloseFunc

    -
    -Defined in FT_SYSTEM_H (ftsystem.h). -

    -
    +
    + +
    +

    FT_Stream_CloseFunc

    +

    Defined in FT_SYSTEM_H (ftsystem.h).

    +
       typedef void
       (*FT_Stream_CloseFunc)( FT_Stream  stream );
    +
    -

    -

    A function used to close a given input stream.

    -

    -
    input
    -

    - -
    stream + +

    input

    + +
    stream

    A handle to the target stream.

    -
    -
    -
    - - -
    [Index][TOC]
    -
    -

    FT_StreamRec

    -
    -Defined in FT_SYSTEM_H (ftsystem.h). -

    -
    +
    + +
    +

    FT_StreamRec

    +

    Defined in FT_SYSTEM_H (ftsystem.h).

    +
       typedef struct  FT_StreamRec_
       {
         unsigned char*       base;
    @@ -365,51 +359,47 @@ Defined in FT_SYSTEM_H (ftsystem.h).
         unsigned char*       limit;
     
       } FT_StreamRec;
    +
    -

    -

    A structure used to describe an input stream.

    -

    -
    input
    -

    - -
    base + +

    input

    + + - - - - - - - - -
    base

    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.

    size +
    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 +
    pos

    The current position within the stream.

    descriptor +
    descriptor

    This field is a union that can hold an integer or a pointer. It is used by stream implementations to store file descriptors or ‘FILE*’ pointers.

    pathname +
    pathname

    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).

    read +
    read

    The stream's input function.

    close +
    close

    The stream's close function.

    memory +
    memory

    The memory manager to use to preload frames. This is set internally by FreeType and shouldn't be touched by stream implementations.

    cursor +
    cursor

    This field is set and used internally by FreeType when parsing frames.

    limit +
    limit

    This field is set and used internally by FreeType when parsing frames.

    -
    -
    -
    - - -
    [Index][TOC]
    + +
    + diff --git a/freetype/docs/reference/ft2-toc.html b/freetype/docs/reference/ft2-toc.html index 19f4867e..61098164 100644 --- a/freetype/docs/reference/ft2-toc.html +++ b/freetype/docs/reference/ft2-toc.html @@ -3,233 +3,268 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - -
    [Index]
    -

    FreeType-2.5.1 API Reference

    + +

    FreeType-2.5.5 API Reference

    -

    Table of Contents

    -

    General Remarks

    • - -
      -User allocation +

      Table of Contents

      +
      +

      General Remarks

      + + +
      +

      How client applications should include FreeType header files.

      +

      How client applications should allocate FreeType data structures.

      -
      -

      Core API

      • - -
        -FreeType Version + +
        +

        Core API

        + + - - - - - - -

        Functions and macros related to FreeType versions.

        -Basic Data Types +

        The basic data types defined by the library.

        -Base Interface +

        The FreeType 2 base font interface.

        -Glyph Variants +

        The FreeType 2 interface to Unicode Ideographic Variation Sequences (IVS), using the SFNT cmap format 14.

        -Glyph Management +

        Generic interface to manage individual glyph data.

        -Mac Specific Interface +

        Only available on the Macintosh.

        -Size Management +

        Managing multiple sizes per face.

        -Header File Macros +

        Macro definitions used to #include specific header files.

        -
        -

        Format-Specific API

        • - -
          -Multiple Masters + +
          +

          Format-Specific API

          + + - - - - - - - - -

          How to manage Multiple Masters fonts.

          -TrueType Tables +

          TrueType specific table types and functions.

          -Type 1 Tables +

          Type 1 (PostScript) specific font tables.

          -SFNT Names +

          Access the names embedded in TrueType and OpenType files.

          -BDF and PCF Files +

          BDF and PCF specific API.

          -CID Fonts +

          CID-keyed font specific API.

          -PFR Fonts +

          PFR/TrueDoc specific API.

          -Window FNT Files +

          Windows FNT specific API.

          -Font Formats +

          Getting the font format.

          -Gasp Table +

          Retrieving TrueType ‘gasp’ table entries.

          -
          -

          Controlling FreeType Modules

          • - -
            -The auto-hinter + +
            +

            Controlling FreeType Modules

            + + - -

            Controlling the auto-hinting module.

            -The CFF driver +

            Controlling the CFF driver module.

            -The TrueType driver +

            Controlling the TrueType driver module.

            -
            -

            Cache Sub-System

            • - -
              -Cache Sub-System + +
              +

              Cache Sub-System

              + +

              How to cache face, size, and glyph data with FreeType 2.

              -
              -

              Support API

              • - -
                -Computations + +
                +

                Support API

                + + - - - - - - - - - - - -

                Crunching fixed numbers and vectors.

                -List Processing +

                Simple management of lists.

                -Outline Processing +

                Functions to create, transform, and render vectorial glyph images.

                -Quick retrieval of advance values +

                Retrieve horizontal and vertical advance values without processing glyph outlines, if possible.

                -Bitmap Handling +

                Handling FT_Bitmap objects.

                -Scanline Converter +

                How vectorial outlines are converted into bitmaps and pixmaps.

                -Glyph Stroker +

                Generating bordered and stroked glyphs.

                -System Interface +

                How FreeType manages memory and i/o.

                -Module Management +

                How to add, upgrade, remove, and control modules from FreeType.

                -GZIP Streams +

                Using gzip-compressed font files.

                -LZW Streams +

                Using LZW-compressed font files.

                -BZIP2 Streams +

                Using bzip2-compressed font files.

                -LCD Filtering +

                Reduce color fringes of LCD-optimized bitmaps.

                -
                -

                Miscellaneous

                • - -
                  -OpenType Validation + +
                  +

                  Miscellaneous

                  + + - - -

                  An API to validate OpenType tables.

                  -Incremental Loading +

                  Custom Glyph Loading.

                  -The TrueType Engine +

                  TrueType bytecode support.

                  -TrueTypeGX/AAT Validation +

                  An API to validate TrueTypeGX/AAT tables.

                  -
                  -

                  Global Index

                  + +
                  - - -
                  [Index]
                  + -
                  generated on Mon Nov 25 00:29:36 2013
                  +
                  generated on Tue Dec 30 21:42:54 2014
                  diff --git a/freetype/docs/reference/ft2-truetype_engine.html b/freetype/docs/reference/ft2-truetype_engine.html index 1875d8f7..d0c467bd 100644 --- a/freetype/docs/reference/ft2-truetype_engine.html +++ b/freetype/docs/reference/ft2-truetype_engine.html @@ -3,130 +3,174 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
                  [Index][TOC]
                  -

                  FreeType-2.5.1 API Reference

                  + +

                  FreeType-2.5.5 API Reference

                  -

                  -The TrueType Engine -

                  +

                  The TrueType Engine

                  Synopsis

                  - - -
                  FT_TrueTypeEngineTypeFT_Get_TrueType_Engine_Type


                  + + +
                  FT_TrueTypeEngineTypeFT_Get_TrueType_Engine_Type
                  + -

                  This section contains a function used to query the level of TrueType bytecode support compiled in this version of the library.

                  -

                  -
                  -

                  FT_TrueTypeEngineType

                  -
                  -Defined in FT_MODULE_H (ftmodapi.h). -

                  -
                   
                  +
                  +

                  FT_TrueTypeEngineType

                  +

                  Defined in FT_MODULE_H (ftmodapi.h).

                  +
                     typedef enum  FT_TrueTypeEngineType_
                     {
                  -    FT_TRUETYPE_ENGINE_TYPE_NONE = 0,
                  -    FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,
                  -    FT_TRUETYPE_ENGINE_TYPE_PATENTED
                  +    FT_TRUETYPE_ENGINE_TYPE_NONE = 0,
                  +    FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,
                  +    FT_TRUETYPE_ENGINE_TYPE_PATENTED
                   
                     } FT_TrueTypeEngineType;
                  +
                  -

                  -

                  A list of values describing which kind of TrueType bytecode engine is implemented in a given FT_Library instance. It is used by the FT_Get_TrueType_Engine_Type function.

                  -

                  -
                  values
                  -

                  - - -
                  FT_TRUETYPE_ENGINE_TYPE_NONE
                  + +

                  values

                  + + - - - -
                  FT_TRUETYPE_ENGINE_TYPE_NONE

                  The library doesn't implement any kind of bytecode interpreter.

                  FT_TRUETYPE_ENGINE_TYPE_UNPATENTED
                  +
                  FT_TRUETYPE_ENGINE_TYPE_UNPATENTED

                  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 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
                  + +

                  since

                  2.2

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Get_TrueType_Engine_Type

                  -
                  -Defined in FT_MODULE_H (ftmodapi.h). -

                  -
                  +
                  + +
                  +

                  FT_Get_TrueType_Engine_Type

                  +

                  Defined in FT_MODULE_H (ftmodapi.h).

                  +
                     FT_EXPORT( FT_TrueTypeEngineType )
                     FT_Get_TrueType_Engine_Type( FT_Library  library );
                  +
                  -

                  -

                  Return an FT_TrueTypeEngineType value to indicate which level of the TrueType virtual machine a given library instance supports.

                  -

                  -
                  input
                  -

                  - -
                  library + +

                  input

                  + +
                  library

                  A library instance.

                  -
                  -
                  return
                  + +

                  return

                  A value indicating which level is supported.

                  -
                  -
                  since
                  + +

                  since

                  2.2

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  + +
                  + diff --git a/freetype/docs/reference/ft2-truetype_tables.html b/freetype/docs/reference/ft2-truetype_tables.html index d3933e75..9c63d67d 100644 --- a/freetype/docs/reference/ft2-truetype_tables.html +++ b/freetype/docs/reference/ft2-truetype_tables.html @@ -3,456 +3,129 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
                  [Index][TOC]
                  -

                  FreeType-2.5.1 API Reference

                  + +

                  FreeType-2.5.5 API Reference

                  -

                  -TrueType Tables -

                  +

                  TrueType Tables

                  Synopsis

                  - - - - - - - - - - - -
                  TT_PLATFORM_XXXTT_Postscript
                  TT_APPLE_ID_XXXTT_PCLT
                  TT_MAC_ID_XXXTT_MaxProfile
                  TT_ISO_ID_XXXFT_Sfnt_Tag
                  TT_MS_ID_XXXFT_Get_Sfnt_Table
                  TT_ADOBE_ID_XXXFT_Load_Sfnt_Table
                  TT_HeaderFT_Sfnt_Table_Info
                  TT_HoriHeaderFT_Get_CMap_Language_ID
                  TT_VertHeaderFT_Get_CMap_Format
                  TT_OS2FT_PARAM_TAG_UNPATENTED_HINTING


                  + + + + + + + + + + + + + +
                  TT_Header 
                  TT_HoriHeaderFT_Get_CMap_Language_ID
                  TT_VertHeaderFT_Get_CMap_Format
                  TT_OS2 
                  TT_PostscriptFT_PARAM_TAG_UNPATENTED_HINTING
                  TT_PCLT 
                  TT_MaxProfileTT_PLATFORM_XXX
                   TT_APPLE_ID_XXX
                  FT_Sfnt_TagTT_MAC_ID_XXX
                  FT_Get_Sfnt_TableTT_ISO_ID_XXX
                  FT_Load_Sfnt_TableTT_MS_ID_XXX
                  FT_Sfnt_Table_InfoTT_ADOBE_ID_XXX
                  + -

                  This section contains the definition of TrueType-specific tables as well as some routines used to access and process them.

                  -

                  -
                  -

                  TT_PLATFORM_XXX

                  -
                  -Defined in FT_TRUETYPE_IDS_H (ttnameid.h). -

                  -
                  -
                  -#define TT_PLATFORM_APPLE_UNICODE  0
                  -#define TT_PLATFORM_MACINTOSH      1
                  -#define TT_PLATFORM_ISO            2 /* deprecated */
                  -#define TT_PLATFORM_MICROSOFT      3
                  -#define TT_PLATFORM_CUSTOM         4
                  -#define TT_PLATFORM_ADOBE          7 /* artificial */
                  -
                  -

                  -
                  -

                  A list of valid values for the ‘platform_id’ identifier code in FT_CharMapRec and FT_SfntName structures.

                  -

                  -
                  values
                  -

                  - - - - - - - - -
                  TT_PLATFORM_APPLE_UNICODE
                  -

                  Used by Apple to indicate a Unicode character map and/or name entry. See TT_APPLE_ID_XXX for corresponding ‘encoding_id’ values. Note that name entries in this format are coded as big-endian UCS-2 character codes only.

                  -
                  TT_PLATFORM_MACINTOSH -

                  Used by Apple to indicate a MacOS-specific charmap and/or name entry. See TT_MAC_ID_XXX for corresponding ‘encoding_id’ 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).

                  -
                  TT_PLATFORM_ISO -

                  This value was used to specify ISO/IEC 10646 charmaps. It is however now deprecated. See TT_ISO_ID_XXX for a list of corresponding ‘encoding_id’ values.

                  -
                  TT_PLATFORM_MICROSOFT -

                  Used by Microsoft to indicate Windows-specific charmaps. See TT_MS_ID_XXX for a list of corresponding ‘encoding_id’ values. Note that most fonts contain a Unicode charmap using (TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS).

                  -
                  TT_PLATFORM_CUSTOM -

                  Used to indicate application-specific charmaps.

                  -
                  TT_PLATFORM_ADOBE -

                  This value isn't part of any font format specification, but is used by FreeType to report Adobe-specific charmaps in an FT_CharMapRec structure. See TT_ADOBE_ID_XXX.

                  -
                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  TT_APPLE_ID_XXX

                  -
                  -Defined in FT_TRUETYPE_IDS_H (ttnameid.h). -

                  -
                  -
                  -#define TT_APPLE_ID_DEFAULT           0 /* Unicode 1.0 */
                  -#define TT_APPLE_ID_UNICODE_1_1       1 /* specify Hangul at U+34xx */
                  -#define TT_APPLE_ID_ISO_10646         2 /* deprecated */
                  -#define TT_APPLE_ID_UNICODE_2_0       3 /* or later */
                  -#define TT_APPLE_ID_UNICODE_32        4 /* 2.0 or later, full repertoire */
                  -#define TT_APPLE_ID_VARIANT_SELECTOR  5 /* variation selector data */
                  -
                  -

                  -
                  -

                  A list of valid values for the ‘encoding_id’ for TT_PLATFORM_APPLE_UNICODE charmaps and name entries.

                  -

                  -
                  values
                  -

                  - - - - - - - - - - -
                  TT_APPLE_ID_DEFAULT -

                  Unicode version 1.0.

                  -
                  TT_APPLE_ID_UNICODE_1_1
                  -

                  Unicode 1.1; specifies Hangul characters starting at U+34xx.

                  -
                  TT_APPLE_ID_ISO_10646 -

                  Deprecated (identical to preceding).

                  -
                  TT_APPLE_ID_UNICODE_2_0
                  -

                  Unicode 2.0 and beyond (UTF-16 BMP only).

                  -
                  TT_APPLE_ID_UNICODE_32 -

                  Unicode 3.1 and beyond, using UTF-32.

                  -
                  TT_APPLE_ID_VARIANT_SELECTOR
                  -

                  From Adobe, not Apple. Not a normal cmap. Specifies variations on a real cmap.

                  -
                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  TT_MAC_ID_XXX

                  -
                  -Defined in FT_TRUETYPE_IDS_H (ttnameid.h). -

                  -
                  -
                  -#define TT_MAC_ID_ROMAN                 0
                  -#define TT_MAC_ID_JAPANESE              1
                  -#define TT_MAC_ID_TRADITIONAL_CHINESE   2
                  -#define TT_MAC_ID_KOREAN                3
                  -#define TT_MAC_ID_ARABIC                4
                  -#define TT_MAC_ID_HEBREW                5
                  -#define TT_MAC_ID_GREEK                 6
                  -#define TT_MAC_ID_RUSSIAN               7
                  -#define TT_MAC_ID_RSYMBOL               8
                  -#define TT_MAC_ID_DEVANAGARI            9
                  -#define TT_MAC_ID_GURMUKHI             10
                  -#define TT_MAC_ID_GUJARATI             11
                  -#define TT_MAC_ID_ORIYA                12
                  -#define TT_MAC_ID_BENGALI              13
                  -#define TT_MAC_ID_TAMIL                14
                  -#define TT_MAC_ID_TELUGU               15
                  -#define TT_MAC_ID_KANNADA              16
                  -#define TT_MAC_ID_MALAYALAM            17
                  -#define TT_MAC_ID_SINHALESE            18
                  -#define TT_MAC_ID_BURMESE              19
                  -#define TT_MAC_ID_KHMER                20
                  -#define TT_MAC_ID_THAI                 21
                  -#define TT_MAC_ID_LAOTIAN              22
                  -#define TT_MAC_ID_GEORGIAN             23
                  -#define TT_MAC_ID_ARMENIAN             24
                  -#define TT_MAC_ID_MALDIVIAN            25
                  -#define TT_MAC_ID_SIMPLIFIED_CHINESE   25
                  -#define TT_MAC_ID_TIBETAN              26
                  -#define TT_MAC_ID_MONGOLIAN            27
                  -#define TT_MAC_ID_GEEZ                 28
                  -#define TT_MAC_ID_SLAVIC               29
                  -#define TT_MAC_ID_VIETNAMESE           30
                  -#define TT_MAC_ID_SINDHI               31
                  -#define TT_MAC_ID_UNINTERP             32
                  -
                  -

                  -
                  -

                  A list of valid values for the ‘encoding_id’ for TT_PLATFORM_MACINTOSH charmaps and name entries.

                  -

                  -
                  values
                  -

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  TT_MAC_ID_ROMAN -

                  -
                  TT_MAC_ID_JAPANESE -

                  -
                  TT_MAC_ID_TRADITIONAL_CHINESE
                  -

                  -
                  TT_MAC_ID_KOREAN -

                  -
                  TT_MAC_ID_ARABIC -

                  -
                  TT_MAC_ID_HEBREW -

                  -
                  TT_MAC_ID_GREEK -

                  -
                  TT_MAC_ID_RUSSIAN -

                  -
                  TT_MAC_ID_RSYMBOL -

                  -
                  TT_MAC_ID_DEVANAGARI -

                  -
                  TT_MAC_ID_GURMUKHI -

                  -
                  TT_MAC_ID_GUJARATI -

                  -
                  TT_MAC_ID_ORIYA -

                  -
                  TT_MAC_ID_BENGALI -

                  -
                  TT_MAC_ID_TAMIL -

                  -
                  TT_MAC_ID_TELUGU -

                  -
                  TT_MAC_ID_KANNADA -

                  -
                  TT_MAC_ID_MALAYALAM -

                  -
                  TT_MAC_ID_SINHALESE -

                  -
                  TT_MAC_ID_BURMESE -

                  -
                  TT_MAC_ID_KHMER -

                  -
                  TT_MAC_ID_THAI -

                  -
                  TT_MAC_ID_LAOTIAN -

                  -
                  TT_MAC_ID_GEORGIAN -

                  -
                  TT_MAC_ID_ARMENIAN -

                  -
                  TT_MAC_ID_MALDIVIAN -

                  -
                  TT_MAC_ID_SIMPLIFIED_CHINESE
                  -

                  -
                  TT_MAC_ID_TIBETAN -

                  -
                  TT_MAC_ID_MONGOLIAN -

                  -
                  TT_MAC_ID_GEEZ -

                  -
                  TT_MAC_ID_SLAVIC -

                  -
                  TT_MAC_ID_VIETNAMESE -

                  -
                  TT_MAC_ID_SINDHI -

                  -
                  TT_MAC_ID_UNINTERP -

                  -
                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  TT_ISO_ID_XXX

                  -
                  -Defined in FT_TRUETYPE_IDS_H (ttnameid.h). -

                  -
                  -
                  -#define TT_ISO_ID_7BIT_ASCII  0
                  -#define TT_ISO_ID_10646       1
                  -#define TT_ISO_ID_8859_1      2
                  -
                  -

                  -
                  -

                  A list of valid values for the ‘encoding_id’ for TT_PLATFORM_ISO charmaps and name entries.

                  -

                  Their use is now deprecated.

                  -

                  -
                  values
                  -

                  - - - - -
                  TT_ISO_ID_7BIT_ASCII -

                  ASCII.

                  -
                  TT_ISO_ID_10646 -

                  ISO/10646.

                  -
                  TT_ISO_ID_8859_1 -

                  Also known as Latin-1.

                  -
                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  TT_MS_ID_XXX

                  -
                  -Defined in FT_TRUETYPE_IDS_H (ttnameid.h). -

                  -
                  -
                  -#define TT_MS_ID_SYMBOL_CS    0
                  -#define TT_MS_ID_UNICODE_CS   1
                  -#define TT_MS_ID_SJIS         2
                  -#define TT_MS_ID_GB2312       3
                  -#define TT_MS_ID_BIG_5        4
                  -#define TT_MS_ID_WANSUNG      5
                  -#define TT_MS_ID_JOHAB        6
                  -#define TT_MS_ID_UCS_4       10
                  -
                  -

                  -
                  -

                  A list of valid values for the ‘encoding_id’ for TT_PLATFORM_MICROSOFT charmaps and name entries.

                  -

                  -
                  values
                  -

                  - - - - - - - - - -
                  TT_MS_ID_SYMBOL_CS -

                  Corresponds to Microsoft symbol encoding. See FT_ENCODING_MS_SYMBOL.

                  -
                  TT_MS_ID_UNICODE_CS -

                  Corresponds to a Microsoft WGL4 charmap, matching Unicode. See FT_ENCODING_UNICODE.

                  -
                  TT_MS_ID_SJIS -

                  Corresponds to SJIS Japanese encoding. See FT_ENCODING_SJIS.

                  -
                  TT_MS_ID_GB2312 -

                  Corresponds to Simplified Chinese as used in Mainland China. See FT_ENCODING_GB2312.

                  -
                  TT_MS_ID_BIG_5 -

                  Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. See FT_ENCODING_BIG5.

                  -
                  TT_MS_ID_WANSUNG -

                  Corresponds to Korean Wansung encoding. See FT_ENCODING_WANSUNG.

                  -
                  TT_MS_ID_JOHAB -

                  Corresponds to Johab encoding. See FT_ENCODING_JOHAB.

                  -
                  TT_MS_ID_UCS_4 -

                  Corresponds to UCS-4 or UTF-32 charmaps. This has been added to the OpenType specification version 1.4 (mid-2001.)

                  -
                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  TT_ADOBE_ID_XXX

                  -
                  -Defined in FT_TRUETYPE_IDS_H (ttnameid.h). -

                  -
                  -
                  -#define TT_ADOBE_ID_STANDARD  0
                  -#define TT_ADOBE_ID_EXPERT    1
                  -#define TT_ADOBE_ID_CUSTOM    2
                  -#define TT_ADOBE_ID_LATIN_1   3
                  -
                  -

                  -
                  -

                  A list of valid values for the ‘encoding_id’ for TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension!

                  -

                  -
                  values
                  -

                  - - - - - -
                  TT_ADOBE_ID_STANDARD -

                  Adobe standard encoding.

                  -
                  TT_ADOBE_ID_EXPERT -

                  Adobe expert encoding.

                  -
                  TT_ADOBE_ID_CUSTOM -

                  Adobe custom encoding.

                  -
                  TT_ADOBE_ID_LATIN_1 -

                  Adobe Latin 1 encoding.

                  -
                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  TT_Header

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                   
                  +
                  +

                  TT_Header

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     typedef struct  TT_Header_
                     {
                       FT_Fixed   Table_Version;
                  @@ -480,24 +153,17 @@ Defined in FT_TRUETYPE_TABLES_H (tttables.h).
                       FT_Short   Glyph_Data_Format;
                   
                     } TT_Header;
                  +
                  -

                  -

                  A structure used to model a TrueType font header table. All fields follow the TrueType specification.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  TT_HoriHeader

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  TT_HoriHeader

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     typedef struct  TT_HoriHeader_
                     {
                       FT_Fixed   Version;
                  @@ -527,82 +193,74 @@ Defined in FT_TRUETYPE_TABLES_H (tttables.h).
                       void*      short_metrics;
                   
                     } TT_HoriHeader;
                  +
                  -

                  -

                  A structure used to model a TrueType horizontal header, the ‘hhea’ table, as well as the corresponding horizontal metrics table, i.e., the ‘hmtx’ table.

                  -

                  -
                  fields
                  -

                  - -
                  Version + +

                  fields

                  + + - - - - - - - - - - - - - -
                  Version

                  The table version.

                  Ascender +
                  Ascender

                  The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.

                  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).

                  You should use the ‘sTypoAscender’ field of the OS/2 table instead if you want the correct one.

                  Descender +
                  Descender

                  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.

                  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).

                  You should use the ‘sTypoDescender’ field of the OS/2 table instead if you want the correct one.

                  Line_Gap +
                  Line_Gap

                  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.

                  advance_Width_Max +
                  advance_Width_Max

                  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.

                  min_Left_Side_Bearing +
                  min_Left_Side_Bearing

                  The minimum left side bearing of all glyphs within the font.

                  min_Right_Side_Bearing +
                  min_Right_Side_Bearing

                  The minimum right side bearing of all glyphs within the font.

                  xMax_Extent +
                  xMax_Extent

                  The maximum horizontal extent (i.e., the ‘width’ of a glyph's bounding box) for all glyphs in the font.

                  caret_Slope_Rise +
                  caret_Slope_Rise

                  The rise coefficient of the cursor's slope of the cursor (slope=rise/run).

                  caret_Slope_Run +
                  caret_Slope_Run

                  The run coefficient of the cursor's slope.

                  Reserved +
                  Reserved

                  8 reserved bytes.

                  metric_Data_Format +
                  metric_Data_Format

                  Always 0.

                  number_Of_HMetrics +
                  number_Of_HMetrics

                  Number of HMetrics entries in the ‘hmtx’ table -- this value can be smaller than the total number of glyphs in the font.

                  long_metrics +
                  long_metrics

                  A pointer into the ‘hmtx’ table.

                  short_metrics +
                  short_metrics

                  A pointer into the ‘hmtx’ table.

                  -
                  -
                  note
                  + +

                  note

                  IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields, which are different.

                  This ensures that a single function in the ‘ttload’ module is able to read both the horizontal and vertical headers.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  TT_VertHeader

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  TT_VertHeader

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     typedef struct  TT_VertHeader_
                     {
                       FT_Fixed   Version;
                  @@ -632,86 +290,77 @@ Defined in FT_TRUETYPE_TABLES_H (tttables.h).
                       void*      short_metrics;
                   
                     } TT_VertHeader;
                  +
                  -

                  -

                  A structure used to model a TrueType vertical header, the ‘vhea’ table, as well as the corresponding vertical metrics table, i.e., the ‘vmtx’ table.

                  -

                  -
                  fields
                  -

                  - -
                  Version + +

                  fields

                  + + - - - - - - - - - - - - - - - -
                  Version

                  The table version.

                  Ascender +
                  Ascender

                  The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.

                  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).

                  You should use the ‘sTypoAscender’ field of the OS/2 table instead if you want the correct one.

                  Descender +
                  Descender

                  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.

                  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).

                  You should use the ‘sTypoDescender’ field of the OS/2 table instead if you want the correct one.

                  Line_Gap +
                  Line_Gap

                  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.

                  advance_Height_Max +
                  advance_Height_Max

                  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.

                  min_Top_Side_Bearing +
                  min_Top_Side_Bearing

                  The minimum top side bearing of all glyphs within the font.

                  min_Bottom_Side_Bearing
                  +
                  min_Bottom_Side_Bearing

                  The minimum bottom side bearing of all glyphs within the font.

                  yMax_Extent +
                  yMax_Extent

                  The maximum vertical extent (i.e., the ‘height’ of a glyph's bounding box) for all glyphs in the font.

                  caret_Slope_Rise +
                  caret_Slope_Rise

                  The rise coefficient of the cursor's slope of the cursor (slope=rise/run).

                  caret_Slope_Run +
                  caret_Slope_Run

                  The run coefficient of the cursor's slope.

                  caret_Offset +
                  caret_Offset

                  The cursor's offset for slanted fonts. This value is ‘reserved’ in vmtx version 1.0.

                  Reserved +
                  Reserved

                  8 reserved bytes.

                  metric_Data_Format +
                  metric_Data_Format

                  Always 0.

                  number_Of_HMetrics +
                  number_Of_HMetrics

                  Number of VMetrics entries in the ‘vmtx’ table -- this value can be smaller than the total number of glyphs in the font.

                  long_metrics +
                  long_metrics

                  A pointer into the ‘vmtx’ table.

                  short_metrics +
                  short_metrics

                  A pointer into the ‘vmtx’ table.

                  -
                  -
                  note
                  + +

                  note

                  IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields, which are different.

                  This ensures that a single function in the ‘ttload’ module is able to read both the horizontal and vertical headers.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  TT_OS2

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  TT_OS2

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     typedef struct  TT_OS2_
                     {
                       FT_UShort  version;                /* 0x0001 - more or 0xFFFF */
                  @@ -768,25 +417,18 @@ Defined in FT_TRUETYPE_TABLES_H (tttables.h).
                       FT_UShort  usUpperOpticalPointSize;       /* in twips (1/20th points) */
                   
                     } TT_OS2;
                  +
                  -

                  -

                  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 that do not include an OS/2 table. In this case, the ‘version’ field is always set to 0xFFFF.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  TT_Postscript

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  TT_Postscript

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     typedef struct  TT_Postscript_
                     {
                       FT_Fixed  FormatType;
                  @@ -803,24 +445,17 @@ Defined in FT_TRUETYPE_TABLES_H (tttables.h).
                       /* load them by default.  See the ttpost.c file.  */
                   
                     } TT_Postscript;
                  +
                  -

                  -

                  A structure used to model a TrueType PostScript table. All fields comply to the TrueType specification. This structure does not reference the PostScript glyph names, which can be nevertheless accessed with the ‘ttpost’ module.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  TT_PCLT

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  TT_PCLT

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     typedef struct  TT_PCLT_
                     {
                       FT_Fixed   Version;
                  @@ -840,24 +475,17 @@ Defined in FT_TRUETYPE_TABLES_H (tttables.h).
                       FT_Byte    Reserved;
                   
                     } TT_PCLT;
                  +
                  -

                  -

                  A structure used to model a TrueType PCLT table. All fields comply to the TrueType specification.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  TT_MaxProfile

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  TT_MaxProfile

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     typedef struct  TT_MaxProfile_
                     {
                       FT_Fixed   version;
                  @@ -877,132 +505,150 @@ Defined in FT_TRUETYPE_TABLES_H (tttables.h).
                       FT_UShort  maxComponentDepth;
                   
                     } TT_MaxProfile;
                  +
                  -

                  -

                  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.

                  -

                  -
                  fields
                  -

                  - -
                  version + +

                  fields

                  + + - - - - - - - - - - - - - -
                  version

                  The version number.

                  numGlyphs +
                  numGlyphs

                  The number of glyphs in this TrueType font.

                  maxPoints +
                  maxPoints

                  The maximum number of points in a non-composite TrueType glyph. See also the structure element ‘maxCompositePoints’.

                  maxContours +
                  maxContours

                  The maximum number of contours in a non-composite TrueType glyph. See also the structure element ‘maxCompositeContours’.

                  maxCompositePoints +
                  maxCompositePoints

                  The maximum number of points in a composite TrueType glyph. See also the structure element ‘maxPoints’.

                  maxCompositeContours +
                  maxCompositeContours

                  The maximum number of contours in a composite TrueType glyph. See also the structure element ‘maxContours’.

                  maxZones +
                  maxZones

                  The maximum number of zones used for glyph hinting.

                  maxTwilightPoints +
                  maxTwilightPoints

                  The maximum number of points in the twilight zone used for glyph hinting.

                  maxStorage +
                  maxStorage

                  The maximum number of elements in the storage area used for glyph hinting.

                  maxFunctionDefs +
                  maxFunctionDefs

                  The maximum number of function definitions in the TrueType bytecode for this font.

                  maxInstructionDefs +
                  maxInstructionDefs

                  The maximum number of instruction definitions in the TrueType bytecode for this font.

                  maxStackElements +
                  maxStackElements

                  The maximum number of stack elements used during bytecode interpretation.

                  maxSizeOfInstructions +
                  maxSizeOfInstructions

                  The maximum number of TrueType opcodes used for glyph hinting.

                  maxComponentElements +
                  maxComponentElements

                  The maximum number of simple (i.e., non- composite) glyphs in a composite glyph.

                  maxComponentDepth +
                  maxComponentDepth

                  The maximum nesting depth of composite glyphs.

                  -
                  -
                  note
                  + +

                  note

                  This structure is only used during font loading.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Sfnt_Tag

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  FT_Sfnt_Tag

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     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 + +

                  An enumeration used to specify the index of an SFNT table. Used in the FT_Get_Sfnt_Table API function.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Get_Sfnt_Table

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +

                  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.

                  +
                  +
                  + + +
                  +

                  FT_Get_Sfnt_Table

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     FT_EXPORT( void* )
                     FT_Get_Sfnt_Table( FT_Face      face,
                                        FT_Sfnt_Tag  tag );
                  +
                  -

                  -

                  Return a pointer to a given SFNT table within a face.

                  -

                  -
                  input
                  -

                  - -
                  face + +

                  input

                  + + -
                  face

                  A handle to the source.

                  tag +
                  tag

                  The index of the SFNT table.

                  -
                  -
                  return
                  + +

                  return

                  A type-less pointer to the table. This will be 0 in case of error, or if the corresponding table was not found OR loaded from the file.

                  Use a typecast according to ‘tag’ to access the structure elements.

                  -
                  -
                  note
                  + +

                  note

                  The table is owned by the face object and disappears with it.

                  This function is only useful to access SFNT tables that are loaded by the sfnt, truetype, and opentype drivers. See FT_Sfnt_Tag for a list.

                  Here an example how to access the ‘vhea’ table:

                  @@ -1011,69 +657,59 @@ Defined in FT_TRUETYPE_TABLES_H (tttables.h). vert_header = - (TT_VertHeader*)FT_Get_Sfnt_Table( face, ft_sfnt_vhea ); + (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Load_Sfnt_Table

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  FT_Load_Sfnt_Table

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     FT_EXPORT( FT_Error )
                     FT_Load_Sfnt_Table( FT_Face    face,
                                         FT_ULong   tag,
                                         FT_Long    offset,
                                         FT_Byte*   buffer,
                                         FT_ULong*  length );
                  +
                  -

                  -

                  Load any font table into client memory.

                  -

                  -
                  input
                  -

                  - -
                  face + +

                  input

                  + + - -
                  face

                  A handle to the source face.

                  tag +
                  tag

                  The four-byte tag of the table to load. Use the value 0 if you want to access the whole font file. Otherwise, you can use one of the definitions found in the FT_TRUETYPE_TAGS_H file, or forge a new one with FT_MAKE_TAG.

                  offset +
                  offset

                  The starting offset in the table (or file if tag == 0).

                  -
                  -
                  output
                  -

                  - -
                  buffer + +

                  output

                  + +
                  buffer

                  The target buffer address. The client must ensure that the memory array is big enough to hold the data.

                  -
                  -
                  inout
                  -

                  - -
                  length + +

                  inout

                  + +
                  length

                  If the ‘length’ parameter is NULL, then try to load the whole table. Return an error code if it fails.

                  Else, if ‘*length’ is 0, exit immediately while returning the table's (or file) full size in it.

                  Else the number of bytes to read from the table or file, from the starting offset.

                  -
                  -
                  return
                  + +

                  return

                  FreeType error code. 0 means success.

                  -
                  -
                  note
                  + +

                  note

                  If you need to determine the table's length you should first call this function with ‘*length’ set to 0, as in the following example:

                     FT_ULong  length = 0;
                  @@ -1089,150 +725,449 @@ Defined in FT_TRUETYPE_TABLES_H (tttables.h).
                     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).

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Sfnt_Table_Info

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  FT_Sfnt_Table_Info

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     FT_EXPORT( FT_Error )
                     FT_Sfnt_Table_Info( FT_Face    face,
                                         FT_UInt    table_index,
                                         FT_ULong  *tag,
                                         FT_ULong  *length );
                  +
                  -

                  -

                  Return information on an SFNT table.

                  -

                  -
                  input
                  -

                  - -
                  face + +

                  input

                  + + -
                  face

                  A handle to the source face.

                  table_index +
                  table_index

                  The index of an SFNT table. The function returns FT_Err_Table_Missing for an invalid value.

                  -
                  -
                  inout
                  -

                  - -
                  tag + +

                  inout

                  + +
                  tag

                  The name tag of the SFNT table. If the value is NULL, ‘table_index’ is ignored, and ‘length’ returns the number of SFNT tables in the font.

                  -
                  -
                  output
                  -

                  - -
                  length + +

                  output

                  + +
                  length

                  The length of the SFNT table (or the number of SFNT tables, depending on ‘tag’).

                  -
                  -
                  return
                  + +

                  return

                  FreeType error code. 0 means success.

                  -
                  -
                  note
                  + +

                  note

                  While parsing fonts, FreeType handles SFNT tables with length zero as missing.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Get_CMap_Language_ID

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  FT_Get_CMap_Language_ID

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     FT_EXPORT( FT_ULong )
                     FT_Get_CMap_Language_ID( FT_CharMap  charmap );
                  +
                  -

                  -

                  Return TrueType/sfnt specific cmap language ID. Definitions of language ID values are in ‘ttnameid.h’.

                  -

                  -
                  input
                  -

                  - -
                  charmap + +

                  input

                  + +
                  charmap

                  The target charmap.

                  -
                  -
                  return
                  + +

                  return

                  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.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Get_CMap_Format

                  -
                  -Defined in FT_TRUETYPE_TABLES_H (tttables.h). -

                  -
                  +
                  + +
                  +

                  FT_Get_CMap_Format

                  +

                  Defined in FT_TRUETYPE_TABLES_H (tttables.h).

                  +
                     FT_EXPORT( FT_Long )
                     FT_Get_CMap_Format( FT_CharMap  charmap );
                  +
                  -

                  -

                  Return TrueType/sfnt specific cmap format.

                  -

                  -
                  input
                  -

                  - -
                  charmap + +

                  input

                  + +
                  charmap

                  The target charmap.

                  -
                  -
                  return
                  + +

                  return

                  The format of ‘charmap’. If ‘charmap’ doesn't belong to a TrueType/sfnt face, return -1.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_PARAM_TAG_UNPATENTED_HINTING

                  -
                  -Defined in FT_UNPATENTED_HINTING_H (ttunpat.h). -

                  -
                  +
                  + +
                  +

                  FT_PARAM_TAG_UNPATENTED_HINTING

                  +

                  Defined in FT_UNPATENTED_HINTING_H (ttunpat.h).

                  +
                   #define FT_PARAM_TAG_UNPATENTED_HINTING  FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
                  +
                  -

                  -

                  A constant used as the tag of an FT_Parameter structure to indicate that unpatented methods only should be used by the TrueType bytecode interpreter for a typeface opened by FT_Open_Face.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  + +
                  + + +
                  +

                  TT_PLATFORM_XXX

                  +

                  Defined in FT_TRUETYPE_IDS_H (ttnameid.h).

                  +
                  +#define TT_PLATFORM_APPLE_UNICODE  0
                  +#define TT_PLATFORM_MACINTOSH      1
                  +#define TT_PLATFORM_ISO            2 /* deprecated */
                  +#define TT_PLATFORM_MICROSOFT      3
                  +#define TT_PLATFORM_CUSTOM         4
                  +#define TT_PLATFORM_ADOBE          7 /* artificial */
                  +
                  + +

                  A list of valid values for the ‘platform_id’ identifier code in FT_CharMapRec and FT_SfntName structures.

                  + +

                  values

                  + + + + + + + +
                  TT_PLATFORM_APPLE_UNICODE +

                  Used by Apple to indicate a Unicode character map and/or name entry. See TT_APPLE_ID_XXX for corresponding ‘encoding_id’ values. Note that name entries in this format are coded as big-endian UCS-2 character codes only.

                  +
                  TT_PLATFORM_MACINTOSH +

                  Used by Apple to indicate a MacOS-specific charmap and/or name entry. See TT_MAC_ID_XXX for corresponding ‘encoding_id’ 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).

                  +
                  TT_PLATFORM_ISO +

                  This value was used to specify ISO/IEC 10646 charmaps. It is however now deprecated. See TT_ISO_ID_XXX for a list of corresponding ‘encoding_id’ values.

                  +
                  TT_PLATFORM_MICROSOFT +

                  Used by Microsoft to indicate Windows-specific charmaps. See TT_MS_ID_XXX for a list of corresponding ‘encoding_id’ values. Note that most fonts contain a Unicode charmap using (TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS).

                  +
                  TT_PLATFORM_CUSTOM +

                  Used to indicate application-specific charmaps.

                  +
                  TT_PLATFORM_ADOBE +

                  This value isn't part of any font format specification, but is used by FreeType to report Adobe-specific charmaps in an FT_CharMapRec structure. See TT_ADOBE_ID_XXX.

                  +
                  + +
                  +
                  + +
                  +

                  TT_APPLE_ID_XXX

                  +

                  Defined in FT_TRUETYPE_IDS_H (ttnameid.h).

                  +
                  +#define TT_APPLE_ID_DEFAULT           0 /* Unicode 1.0 */
                  +#define TT_APPLE_ID_UNICODE_1_1       1 /* specify Hangul at U+34xx */
                  +#define TT_APPLE_ID_ISO_10646         2 /* deprecated */
                  +#define TT_APPLE_ID_UNICODE_2_0       3 /* or later */
                  +#define TT_APPLE_ID_UNICODE_32        4 /* 2.0 or later, full repertoire */
                  +#define TT_APPLE_ID_VARIANT_SELECTOR  5 /* variation selector data */
                  +
                  + +

                  A list of valid values for the ‘encoding_id’ for TT_PLATFORM_APPLE_UNICODE charmaps and name entries.

                  + +

                  values

                  + + + + + + + +
                  TT_APPLE_ID_DEFAULT +

                  Unicode version 1.0.

                  +
                  TT_APPLE_ID_UNICODE_1_1 +

                  Unicode 1.1; specifies Hangul characters starting at U+34xx.

                  +
                  TT_APPLE_ID_ISO_10646 +

                  Deprecated (identical to preceding).

                  +
                  TT_APPLE_ID_UNICODE_2_0 +

                  Unicode 2.0 and beyond (UTF-16 BMP only).

                  +
                  TT_APPLE_ID_UNICODE_32 +

                  Unicode 3.1 and beyond, using UTF-32.

                  +
                  TT_APPLE_ID_VARIANT_SELECTOR +

                  From Adobe, not Apple. Not a normal cmap. Specifies variations on a real cmap.

                  +
                  + +
                  +
                  + +
                  +

                  TT_MAC_ID_XXX

                  +

                  Defined in FT_TRUETYPE_IDS_H (ttnameid.h).

                  +
                  +#define TT_MAC_ID_ROMAN                 0
                  +#define TT_MAC_ID_JAPANESE              1
                  +#define TT_MAC_ID_TRADITIONAL_CHINESE   2
                  +#define TT_MAC_ID_KOREAN                3
                  +#define TT_MAC_ID_ARABIC                4
                  +#define TT_MAC_ID_HEBREW                5
                  +#define TT_MAC_ID_GREEK                 6
                  +#define TT_MAC_ID_RUSSIAN               7
                  +#define TT_MAC_ID_RSYMBOL               8
                  +#define TT_MAC_ID_DEVANAGARI            9
                  +#define TT_MAC_ID_GURMUKHI             10
                  +#define TT_MAC_ID_GUJARATI             11
                  +#define TT_MAC_ID_ORIYA                12
                  +#define TT_MAC_ID_BENGALI              13
                  +#define TT_MAC_ID_TAMIL                14
                  +#define TT_MAC_ID_TELUGU               15
                  +#define TT_MAC_ID_KANNADA              16
                  +#define TT_MAC_ID_MALAYALAM            17
                  +#define TT_MAC_ID_SINHALESE            18
                  +#define TT_MAC_ID_BURMESE              19
                  +#define TT_MAC_ID_KHMER                20
                  +#define TT_MAC_ID_THAI                 21
                  +#define TT_MAC_ID_LAOTIAN              22
                  +#define TT_MAC_ID_GEORGIAN             23
                  +#define TT_MAC_ID_ARMENIAN             24
                  +#define TT_MAC_ID_MALDIVIAN            25
                  +#define TT_MAC_ID_SIMPLIFIED_CHINESE   25
                  +#define TT_MAC_ID_TIBETAN              26
                  +#define TT_MAC_ID_MONGOLIAN            27
                  +#define TT_MAC_ID_GEEZ                 28
                  +#define TT_MAC_ID_SLAVIC               29
                  +#define TT_MAC_ID_VIETNAMESE           30
                  +#define TT_MAC_ID_SINDHI               31
                  +#define TT_MAC_ID_UNINTERP             32
                  +
                  + +

                  A list of valid values for the ‘encoding_id’ for TT_PLATFORM_MACINTOSH charmaps and name entries.

                  + +

                  values

                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  TT_MAC_ID_ROMAN +

                  +
                  TT_MAC_ID_JAPANESE +

                  +
                  TT_MAC_ID_TRADITIONAL_CHINESE +

                  +
                  TT_MAC_ID_KOREAN +

                  +
                  TT_MAC_ID_ARABIC +

                  +
                  TT_MAC_ID_HEBREW +

                  +
                  TT_MAC_ID_GREEK +

                  +
                  TT_MAC_ID_RUSSIAN +

                  +
                  TT_MAC_ID_RSYMBOL +

                  +
                  TT_MAC_ID_DEVANAGARI +

                  +
                  TT_MAC_ID_GURMUKHI +

                  +
                  TT_MAC_ID_GUJARATI +

                  +
                  TT_MAC_ID_ORIYA +

                  +
                  TT_MAC_ID_BENGALI +

                  +
                  TT_MAC_ID_TAMIL +

                  +
                  TT_MAC_ID_TELUGU +

                  +
                  TT_MAC_ID_KANNADA +

                  +
                  TT_MAC_ID_MALAYALAM +

                  +
                  TT_MAC_ID_SINHALESE +

                  +
                  TT_MAC_ID_BURMESE +

                  +
                  TT_MAC_ID_KHMER +

                  +
                  TT_MAC_ID_THAI +

                  +
                  TT_MAC_ID_LAOTIAN +

                  +
                  TT_MAC_ID_GEORGIAN +

                  +
                  TT_MAC_ID_ARMENIAN +

                  +
                  TT_MAC_ID_MALDIVIAN +

                  +
                  TT_MAC_ID_SIMPLIFIED_CHINESE +

                  +
                  TT_MAC_ID_TIBETAN +

                  +
                  TT_MAC_ID_MONGOLIAN +

                  +
                  TT_MAC_ID_GEEZ +

                  +
                  TT_MAC_ID_SLAVIC +

                  +
                  TT_MAC_ID_VIETNAMESE +

                  +
                  TT_MAC_ID_SINDHI +

                  +
                  TT_MAC_ID_UNINTERP +

                  +
                  + +
                  +
                  + +
                  +

                  TT_ISO_ID_XXX

                  +

                  Defined in FT_TRUETYPE_IDS_H (ttnameid.h).

                  +
                  +#define TT_ISO_ID_7BIT_ASCII  0
                  +#define TT_ISO_ID_10646       1
                  +#define TT_ISO_ID_8859_1      2
                  +
                  + +

                  A list of valid values for the ‘encoding_id’ for TT_PLATFORM_ISO charmaps and name entries.

                  +

                  Their use is now deprecated.

                  + +

                  values

                  + + + + +
                  TT_ISO_ID_7BIT_ASCII +

                  ASCII.

                  +
                  TT_ISO_ID_10646 +

                  ISO/10646.

                  +
                  TT_ISO_ID_8859_1 +

                  Also known as Latin-1.

                  +
                  + +
                  +
                  + +
                  +

                  TT_MS_ID_XXX

                  +

                  Defined in FT_TRUETYPE_IDS_H (ttnameid.h).

                  +
                  +#define TT_MS_ID_SYMBOL_CS    0
                  +#define TT_MS_ID_UNICODE_CS   1
                  +#define TT_MS_ID_SJIS         2
                  +#define TT_MS_ID_GB2312       3
                  +#define TT_MS_ID_BIG_5        4
                  +#define TT_MS_ID_WANSUNG      5
                  +#define TT_MS_ID_JOHAB        6
                  +#define TT_MS_ID_UCS_4       10
                  +
                  + +

                  A list of valid values for the ‘encoding_id’ for TT_PLATFORM_MICROSOFT charmaps and name entries.

                  + +

                  values

                  + + + + + + + + + +
                  TT_MS_ID_SYMBOL_CS +

                  Corresponds to Microsoft symbol encoding. See FT_ENCODING_MS_SYMBOL.

                  +
                  TT_MS_ID_UNICODE_CS +

                  Corresponds to a Microsoft WGL4 charmap, matching Unicode. See FT_ENCODING_UNICODE.

                  +
                  TT_MS_ID_SJIS +

                  Corresponds to SJIS Japanese encoding. See FT_ENCODING_SJIS.

                  +
                  TT_MS_ID_GB2312 +

                  Corresponds to Simplified Chinese as used in Mainland China. See FT_ENCODING_GB2312.

                  +
                  TT_MS_ID_BIG_5 +

                  Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. See FT_ENCODING_BIG5.

                  +
                  TT_MS_ID_WANSUNG +

                  Corresponds to Korean Wansung encoding. See FT_ENCODING_WANSUNG.

                  +
                  TT_MS_ID_JOHAB +

                  Corresponds to Johab encoding. See FT_ENCODING_JOHAB.

                  +
                  TT_MS_ID_UCS_4 +

                  Corresponds to UCS-4 or UTF-32 charmaps. This has been added to the OpenType specification version 1.4 (mid-2001.)

                  +
                  + +
                  +
                  + +
                  +

                  TT_ADOBE_ID_XXX

                  +

                  Defined in FT_TRUETYPE_IDS_H (ttnameid.h).

                  +
                  +#define TT_ADOBE_ID_STANDARD  0
                  +#define TT_ADOBE_ID_EXPERT    1
                  +#define TT_ADOBE_ID_CUSTOM    2
                  +#define TT_ADOBE_ID_LATIN_1   3
                  +
                  + +

                  A list of valid values for the ‘encoding_id’ for TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension!

                  + +

                  values

                  + + + + + +
                  TT_ADOBE_ID_STANDARD +

                  Adobe standard encoding.

                  +
                  TT_ADOBE_ID_EXPERT +

                  Adobe expert encoding.

                  +
                  TT_ADOBE_ID_CUSTOM +

                  Adobe custom encoding.

                  +
                  TT_ADOBE_ID_LATIN_1 +

                  Adobe Latin 1 encoding.

                  +
                  + +
                  +
                  diff --git a/freetype/docs/reference/ft2-tt_driver.html b/freetype/docs/reference/ft2-tt_driver.html index f66cfd0e..5d71829e 100644 --- a/freetype/docs/reference/ft2-tt_driver.html +++ b/freetype/docs/reference/ft2-tt_driver.html @@ -3,55 +3,118 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
                  [Index][TOC]
                  -

                  FreeType-2.5.1 API Reference

                  + +

                  FreeType-2.5.5 API Reference

                  -

                  -The TrueType driver -

                  +

                  The TrueType driver

                  Synopsis

                  - - -
                  interpreter-versionTT_INTERPRETER_VERSION_XXX


                  + + +
                  interpreter-versionTT_INTERPRETER_VERSION_XXX
                  + -

                  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’.

                  -

                  -
                  -

                  interpreter-version

                  -
                  + +
                  +

                  interpreter-version

                  +

                  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’.

                  @@ -68,53 +131,53 @@ The TrueType driver "interpreter-version", &interpreter_version ); -

                  -
                  note
                  + +

                  note

                  This property can be used with FT_Property_Get also.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  TT_INTERPRETER_VERSION_XXX

                  -
                  -Defined in FT_TRUETYPE_DRIVER_H (ftttdrv.h). -

                  -
                  +
                  + -#define TT_INTERPRETER_VERSION_35 35 -#define TT_INTERPRETER_VERSION_38 38 +
                  +

                  TT_INTERPRETER_VERSION_XXX

                  +

                  Defined in FT_TRUETYPE_DRIVER_H (ftttdrv.h).

                  +
                  +#define TT_INTERPRETER_VERSION_35  35
                  +#define TT_INTERPRETER_VERSION_38  38
                  +
                  -

                  -

                  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
                  + +

                  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
                  +
                  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
                  + +

                  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.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  +

                  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.

                  + +
                  + diff --git a/freetype/docs/reference/ft2-type1_tables.html b/freetype/docs/reference/ft2-type1_tables.html index 1903210d..71355a9d 100644 --- a/freetype/docs/reference/ft2-type1_tables.html +++ b/freetype/docs/reference/ft2-type1_tables.html @@ -3,63 +3,125 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
                  [Index][TOC]
                  -

                  FreeType-2.5.1 API Reference

                  + +

                  FreeType-2.5.5 API Reference

                  -

                  -Type 1 Tables -

                  +

                  Type 1 Tables

                  Synopsis

                  - - - - - - - -
                  PS_FontInfoRecT1_Blend_FlagsFT_Has_PS_Glyph_Names
                  PS_FontInfoCID_FaceDictRecFT_Get_PS_Font_Info
                  T1_FontInfoCID_FaceDictFT_Get_PS_Font_Private
                  PS_PrivateRecCID_FaceInfoRecT1_EncodingType
                  PS_PrivateCID_FaceInfoPS_Dict_Keys
                  T1_PrivateCID_InfoFT_Get_PS_Font_Value


                  + + + + + + + + + +
                  PS_FontInfoRecCID_FaceInfoT1_EncodingType
                  PS_FontInfo PS_Dict_Keys
                  PS_PrivateRecFT_Has_PS_Glyph_Names 
                  PS_PrivateFT_Get_PS_Font_InfoT1_FontInfo
                   FT_Get_PS_Font_PrivateT1_Private
                  CID_FaceDictRecFT_Get_PS_Font_ValueCID_FontDict
                  CID_FaceDict CID_Info
                  CID_FaceInfoRecT1_Blend_Flags
                  + -

                  This section contains the definition of Type 1-specific tables, including structures related to other PostScript font formats.

                  -

                  -
                  -

                  PS_FontInfoRec

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                   
                  +
                  +

                  PS_FontInfoRec

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     typedef struct  PS_FontInfoRec_
                     {
                       FT_String*  version;
                  @@ -73,62 +135,29 @@ Defined in FT_TYPE1_TABLES_H (t1tables.h).
                       FT_UShort   underline_thickness;
                   
                     } PS_FontInfoRec;
                  +
                  -

                  -

                  A structure used to model a Type 1 or Type 2 FontInfo dictionary. Note that for Multiple Master fonts, each instance has its own FontInfo dictionary.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  PS_FontInfo

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  PS_FontInfo

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     typedef struct PS_FontInfoRec_*  PS_FontInfo;
                  +
                  -

                  -

                  A handle to a PS_FontInfoRec structure.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  T1_FontInfo

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  -
                  -  typedef PS_FontInfoRec  T1_FontInfo;
                  -
                  -

                  -
                  -

                  This type is equivalent to PS_FontInfoRec. It is deprecated but kept to maintain source compatibility between various versions of FreeType.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  PS_PrivateRec

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  PS_PrivateRec

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     typedef struct  PS_PrivateRec_
                     {
                       FT_Int     unique_id;
                  @@ -168,104 +197,29 @@ Defined in FT_TYPE1_TABLES_H (t1tables.h).
                       FT_Short   min_feature[2];
                   
                     } PS_PrivateRec;
                  +
                  -

                  -

                  A structure used to model a Type 1 or Type 2 private dictionary. Note that for Multiple Master fonts, each instance has its own Private dictionary.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  PS_Private

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  PS_Private

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     typedef struct PS_PrivateRec_*  PS_Private;
                  +
                  -

                  -

                  A handle to a PS_PrivateRec structure.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  T1_Private

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  -
                  -  typedef PS_PrivateRec  T1_Private;
                  -
                  -

                  -
                  -

                  This type is equivalent to PS_PrivateRec. It is deprecated but kept to maintain source compatibility between various versions of FreeType.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  T1_Blend_Flags

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  -
                  -  typedef enum  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
                  -
                  -  } T1_Blend_Flags;
                  -
                  -

                  -
                  -

                  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.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  CID_FaceDictRec

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  CID_FaceDictRec

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     typedef struct  CID_FaceDictRec_
                     {
                       PS_PrivateRec  private_dict;
                  @@ -285,43 +239,29 @@ Defined in FT_TYPE1_TABLES_H (t1tables.h).
                       FT_Int         sd_bytes;
                   
                     } CID_FaceDictRec;
                  +
                  -

                  -

                  A structure used to represent data in a CID top-level dictionary.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  CID_FaceDict

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  CID_FaceDict

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     typedef struct CID_FaceDictRec_*  CID_FaceDict;
                  +
                  -

                  -

                  A handle to a CID_FaceDictRec structure.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  CID_FaceInfoRec

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  CID_FaceInfoRec

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     typedef struct  CID_FaceInfoRec_
                     {
                       FT_String*      cid_font_name;
                  @@ -350,327 +290,163 @@ Defined in FT_TYPE1_TABLES_H (t1tables.h).
                       FT_ULong        data_offset;
                   
                     } CID_FaceInfoRec;
                  +
                  -

                  -

                  A structure used to represent CID Face information.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  CID_FaceInfo

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  CID_FaceInfo

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     typedef struct CID_FaceInfoRec_*  CID_FaceInfo;
                  +
                  -

                  -

                  A handle to a CID_FaceInfoRec structure.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  CID_Info

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  -
                  -  typedef CID_FaceInfoRec  CID_Info;
                  -
                  -

                  -
                  -

                  This type is equivalent to CID_FaceInfoRec. It is deprecated but kept to maintain source compatibility between various versions of FreeType.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  FT_Has_PS_Glyph_Names

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  FT_Has_PS_Glyph_Names

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     FT_EXPORT( FT_Int )
                     FT_Has_PS_Glyph_Names( FT_Face  face );
                  +
                  -

                  -

                  Return true if a given face provides reliable PostScript glyph names. This is similar to using the FT_HAS_GLYPH_NAMES macro, except that certain fonts (mostly TrueType) contain incorrect glyph name tables.

                  When this function returns true, the caller is sure that the glyph names returned by FT_Get_Glyph_Name are reliable.

                  -

                  -
                  input
                  -

                  - -
                  face + +

                  input

                  + +
                  face

                  face handle

                  -
                  -
                  return
                  + +

                  return

                  Boolean. True if glyph names are reliable.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Get_PS_Font_Info

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  FT_Get_PS_Font_Info

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     FT_EXPORT( FT_Error )
                     FT_Get_PS_Font_Info( FT_Face      face,
                                          PS_FontInfo  afont_info );
                  +
                  -

                  -

                  Retrieve the PS_FontInfoRec structure corresponding to a given PostScript font.

                  -

                  -
                  input
                  -

                  - -
                  face + +

                  input

                  + +
                  face

                  PostScript face handle.

                  -
                  -
                  output
                  -

                  - -
                  afont_info + +

                  output

                  + +
                  afont_info

                  Output font info structure pointer.

                  -
                  -
                  return
                  + +

                  return

                  FreeType error code. 0 means success.

                  -
                  -
                  note
                  + +

                  note

                  The string pointers within the font info structure are owned by the face and don't need to be freed by the caller.

                  If the font's format is not PostScript-based, this function will return the ‘FT_Err_Invalid_Argument’ error code.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Get_PS_Font_Private

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  FT_Get_PS_Font_Private

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     FT_EXPORT( FT_Error )
                     FT_Get_PS_Font_Private( FT_Face     face,
                                             PS_Private  afont_private );
                  +
                  -

                  -

                  Retrieve the PS_PrivateRec structure corresponding to a given PostScript font.

                  -

                  -
                  input
                  -

                  - -
                  face + +

                  input

                  + +
                  face

                  PostScript face handle.

                  -
                  -
                  output
                  -

                  - -
                  afont_private + +

                  output

                  + +
                  afont_private

                  Output private dictionary structure pointer.

                  -
                  -
                  return
                  + +

                  return

                  FreeType error code. 0 means success.

                  -
                  -
                  note
                  + +

                  note

                  The string pointers within the PS_PrivateRec structure are owned by the face and don't need to be freed by the caller.

                  If the font's format is not PostScript-based, this function returns the ‘FT_Err_Invalid_Argument’ error code.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  T1_EncodingType

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  -
                  -  typedef enum  T1_EncodingType_
                  -  {
                  -    T1_ENCODING_TYPE_NONE = 0,
                  -    T1_ENCODING_TYPE_ARRAY,
                  -    T1_ENCODING_TYPE_STANDARD,
                  -    T1_ENCODING_TYPE_ISOLATIN1,
                  -    T1_ENCODING_TYPE_EXPERT
                  -
                  -  } T1_EncodingType;
                  -
                  -

                  -
                  -

                  An enumeration describing the ‘Encoding’ entry in a Type 1 dictionary.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  PS_Dict_Keys

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  -
                  -  typedef enum  PS_Dict_Keys_
                  -  {
                  -    /* conventionally in the font dictionary */
                  -    PS_DICT_FONT_TYPE,              /* FT_Byte         */
                  -    PS_DICT_FONT_MATRIX,            /* FT_Fixed        */
                  -    PS_DICT_FONT_BBOX,              /* FT_Fixed        */
                  -    PS_DICT_PAINT_TYPE,             /* FT_Byte         */
                  -    PS_DICT_FONT_NAME,              /* FT_String*      */
                  -    PS_DICT_UNIQUE_ID,              /* FT_Int          */
                  -    PS_DICT_NUM_CHAR_STRINGS,       /* FT_Int          */
                  -    PS_DICT_CHAR_STRING_KEY,        /* FT_String*      */
                  -    PS_DICT_CHAR_STRING,            /* FT_String*      */
                  -    PS_DICT_ENCODING_TYPE,          /* T1_EncodingType */
                  -    PS_DICT_ENCODING_ENTRY,         /* FT_String*      */
                  -
                  -    /* conventionally in the font Private dictionary */
                  -    PS_DICT_NUM_SUBRS,              /* FT_Int     */
                  -    PS_DICT_SUBR,                   /* FT_String* */
                  -    PS_DICT_STD_HW,                 /* FT_UShort  */
                  -    PS_DICT_STD_VW,                 /* FT_UShort  */
                  -    PS_DICT_NUM_BLUE_VALUES,        /* FT_Byte    */
                  -    PS_DICT_BLUE_VALUE,             /* FT_Short   */
                  -    PS_DICT_BLUE_FUZZ,              /* FT_Int     */
                  -    PS_DICT_NUM_OTHER_BLUES,        /* FT_Byte    */
                  -    PS_DICT_OTHER_BLUE,             /* FT_Short   */
                  -    PS_DICT_NUM_FAMILY_BLUES,       /* FT_Byte    */
                  -    PS_DICT_FAMILY_BLUE,            /* FT_Short   */
                  -    PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte    */
                  -    PS_DICT_FAMILY_OTHER_BLUE,      /* FT_Short   */
                  -    PS_DICT_BLUE_SCALE,             /* FT_Fixed   */
                  -    PS_DICT_BLUE_SHIFT,             /* FT_Int     */
                  -    PS_DICT_NUM_STEM_SNAP_H,        /* FT_Byte    */
                  -    PS_DICT_STEM_SNAP_H,            /* FT_Short   */
                  -    PS_DICT_NUM_STEM_SNAP_V,        /* FT_Byte    */
                  -    PS_DICT_STEM_SNAP_V,            /* FT_Short   */
                  -    PS_DICT_FORCE_BOLD,             /* FT_Bool    */
                  -    PS_DICT_RND_STEM_UP,            /* FT_Bool    */
                  -    PS_DICT_MIN_FEATURE,            /* FT_Short   */
                  -    PS_DICT_LEN_IV,                 /* FT_Int     */
                  -    PS_DICT_PASSWORD,               /* FT_Long    */
                  -    PS_DICT_LANGUAGE_GROUP,         /* FT_Long    */
                  -
                  -    /* conventionally in the font FontInfo dictionary */
                  -    PS_DICT_VERSION,                /* FT_String* */
                  -    PS_DICT_NOTICE,                 /* FT_String* */
                  -    PS_DICT_FULL_NAME,              /* FT_String* */
                  -    PS_DICT_FAMILY_NAME,            /* FT_String* */
                  -    PS_DICT_WEIGHT,                 /* FT_String* */
                  -    PS_DICT_IS_FIXED_PITCH,         /* FT_Bool    */
                  -    PS_DICT_UNDERLINE_POSITION,     /* FT_Short   */
                  -    PS_DICT_UNDERLINE_THICKNESS,    /* FT_UShort  */
                  -    PS_DICT_FS_TYPE,                /* FT_UShort  */
                  -    PS_DICT_ITALIC_ANGLE,           /* FT_Long    */
                  -
                  -    PS_DICT_MAX = PS_DICT_ITALIC_ANGLE
                  -
                  -  } PS_Dict_Keys;
                  -
                  -

                  -
                  -

                  An enumeration used in calls to FT_Get_PS_Font_Value to identify the Type 1 dictionary entry to retrieve.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  - -
                  -

                  FT_Get_PS_Font_Value

                  -
                  -Defined in FT_TYPE1_TABLES_H (t1tables.h). -

                  -
                  +
                  + +
                  +

                  FT_Get_PS_Font_Value

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                     FT_EXPORT( FT_Long )
                     FT_Get_PS_Font_Value( FT_Face       face,
                                           PS_Dict_Keys  key,
                                           FT_UInt       idx,
                                           void         *value,
                                           FT_Long       value_len );
                  +
                  -

                  -

                  Retrieve the value for the supplied key from a PostScript font.

                  -

                  -
                  input
                  -

                  - -
                  face + +

                  input

                  + + - - - -
                  face

                  PostScript face handle.

                  key +
                  key

                  An enumeration value representing the dictionary key to retrieve.

                  idx +
                  idx

                  For array values, this specifies the index to be returned.

                  value +
                  value

                  A pointer to memory into which to write the value.

                  valen_len +
                  valen_len

                  The size, in bytes, of the memory supplied for the value.

                  -
                  -
                  output
                  -

                  - -
                  value + +

                  output

                  + +
                  value

                  The value matching the above key, if it exists.

                  -
                  -
                  return
                  + +

                  return

                  The amount of memory (in bytes) required to hold the requested value (if it exists, -1 otherwise).

                  -
                  -
                  note
                  + +

                  note

                  The values returned are not pointers into the internal structures of the face, but are ‘fresh’ copies, so that the memory containing them belongs to the calling application. This also enforces the ‘read-only’ nature of these values, i.e., this function cannot be used to manipulate the face.

                  ‘value’ is a void pointer because the values returned can be of various types.

                  If either ‘value’ is NULL or ‘value_len’ is too small, just the required memory size for the requested entry is returned.

                  @@ -678,12 +454,405 @@ Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  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).

                  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.

                  If the font's format is not PostScript-based, this function returns the ‘FT_Err_Invalid_Argument’ error code.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  + +
                  + + +
                  +

                  T1_Blend_Flags

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                  +  typedef enum  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,
                  +
                  +    T1_BLEND_MAX    /* do not remove */
                  +
                  +  } T1_Blend_Flags;
                  +
                  +
                  +  /* 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
                  +#define t1_blend_blue_values          T1_BLEND_BLUE_VALUES
                  +#define t1_blend_other_blues          T1_BLEND_OTHER_BLUES
                  +#define t1_blend_standard_widths      T1_BLEND_STANDARD_WIDTH
                  +#define t1_blend_standard_height      T1_BLEND_STANDARD_HEIGHT
                  +#define t1_blend_stem_snap_widths     T1_BLEND_STEM_SNAP_WIDTHS
                  +#define t1_blend_stem_snap_heights    T1_BLEND_STEM_SNAP_HEIGHTS
                  +#define t1_blend_blue_scale           T1_BLEND_BLUE_SCALE
                  +#define t1_blend_blue_shift           T1_BLEND_BLUE_SHIFT
                  +#define t1_blend_family_blues         T1_BLEND_FAMILY_BLUES
                  +#define t1_blend_family_other_blues   T1_BLEND_FAMILY_OTHER_BLUES
                  +#define t1_blend_force_bold           T1_BLEND_FORCE_BOLD
                  +#define t1_blend_max                  T1_BLEND_MAX
                  +
                  + +

                  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.

                  + +

                  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 +

                  +
                  + +
                  +
                  + +
                  +

                  T1_EncodingType

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                  +  typedef enum  T1_EncodingType_
                  +  {
                  +    T1_ENCODING_TYPE_NONE = 0,
                  +    T1_ENCODING_TYPE_ARRAY,
                  +    T1_ENCODING_TYPE_STANDARD,
                  +    T1_ENCODING_TYPE_ISOLATIN1,
                  +    T1_ENCODING_TYPE_EXPERT
                  +
                  +  } T1_EncodingType;
                  +
                  + +

                  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 +

                  +
                  + +
                  +
                  + +
                  +

                  PS_Dict_Keys

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                  +  typedef enum  PS_Dict_Keys_
                  +  {
                  +    /* conventionally in the font dictionary */
                  +    PS_DICT_FONT_TYPE,              /* FT_Byte         */
                  +    PS_DICT_FONT_MATRIX,            /* FT_Fixed        */
                  +    PS_DICT_FONT_BBOX,              /* FT_Fixed        */
                  +    PS_DICT_PAINT_TYPE,             /* FT_Byte         */
                  +    PS_DICT_FONT_NAME,              /* FT_String*      */
                  +    PS_DICT_UNIQUE_ID,              /* FT_Int          */
                  +    PS_DICT_NUM_CHAR_STRINGS,       /* FT_Int          */
                  +    PS_DICT_CHAR_STRING_KEY,        /* FT_String*      */
                  +    PS_DICT_CHAR_STRING,            /* FT_String*      */
                  +    PS_DICT_ENCODING_TYPE,          /* T1_EncodingType */
                  +    PS_DICT_ENCODING_ENTRY,         /* FT_String*      */
                  +
                  +    /* conventionally in the font Private dictionary */
                  +    PS_DICT_NUM_SUBRS,              /* FT_Int     */
                  +    PS_DICT_SUBR,                   /* FT_String* */
                  +    PS_DICT_STD_HW,                 /* FT_UShort  */
                  +    PS_DICT_STD_VW,                 /* FT_UShort  */
                  +    PS_DICT_NUM_BLUE_VALUES,        /* FT_Byte    */
                  +    PS_DICT_BLUE_VALUE,             /* FT_Short   */
                  +    PS_DICT_BLUE_FUZZ,              /* FT_Int     */
                  +    PS_DICT_NUM_OTHER_BLUES,        /* FT_Byte    */
                  +    PS_DICT_OTHER_BLUE,             /* FT_Short   */
                  +    PS_DICT_NUM_FAMILY_BLUES,       /* FT_Byte    */
                  +    PS_DICT_FAMILY_BLUE,            /* FT_Short   */
                  +    PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte    */
                  +    PS_DICT_FAMILY_OTHER_BLUE,      /* FT_Short   */
                  +    PS_DICT_BLUE_SCALE,             /* FT_Fixed   */
                  +    PS_DICT_BLUE_SHIFT,             /* FT_Int     */
                  +    PS_DICT_NUM_STEM_SNAP_H,        /* FT_Byte    */
                  +    PS_DICT_STEM_SNAP_H,            /* FT_Short   */
                  +    PS_DICT_NUM_STEM_SNAP_V,        /* FT_Byte    */
                  +    PS_DICT_STEM_SNAP_V,            /* FT_Short   */
                  +    PS_DICT_FORCE_BOLD,             /* FT_Bool    */
                  +    PS_DICT_RND_STEM_UP,            /* FT_Bool    */
                  +    PS_DICT_MIN_FEATURE,            /* FT_Short   */
                  +    PS_DICT_LEN_IV,                 /* FT_Int     */
                  +    PS_DICT_PASSWORD,               /* FT_Long    */
                  +    PS_DICT_LANGUAGE_GROUP,         /* FT_Long    */
                  +
                  +    /* conventionally in the font FontInfo dictionary */
                  +    PS_DICT_VERSION,                /* FT_String* */
                  +    PS_DICT_NOTICE,                 /* FT_String* */
                  +    PS_DICT_FULL_NAME,              /* FT_String* */
                  +    PS_DICT_FAMILY_NAME,            /* FT_String* */
                  +    PS_DICT_WEIGHT,                 /* FT_String* */
                  +    PS_DICT_IS_FIXED_PITCH,         /* FT_Bool    */
                  +    PS_DICT_UNDERLINE_POSITION,     /* FT_Short   */
                  +    PS_DICT_UNDERLINE_THICKNESS,    /* FT_UShort  */
                  +    PS_DICT_FS_TYPE,                /* FT_UShort  */
                  +    PS_DICT_ITALIC_ANGLE,           /* FT_Long    */
                  +
                  +    PS_DICT_MAX = PS_DICT_ITALIC_ANGLE
                  +
                  +  } PS_Dict_Keys;
                  +
                  + +

                  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 +

                  +
                  + +
                  +
                  + +
                  +

                  T1_FontInfo

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                  +  typedef PS_FontInfoRec  T1_FontInfo;
                  +
                  + +

                  This type is equivalent to PS_FontInfoRec. It is deprecated but kept to maintain source compatibility between various versions of FreeType.

                  + +
                  +
                  + +
                  +

                  T1_Private

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                  +  typedef PS_PrivateRec  T1_Private;
                  +
                  + +

                  This type is equivalent to PS_PrivateRec. It is deprecated but kept to maintain source compatibility between various versions of FreeType.

                  + +
                  +
                  + +
                  +

                  CID_FontDict

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                  +  typedef CID_FaceDictRec  CID_FontDict;
                  +
                  + +

                  This type is equivalent to CID_FaceDictRec. It is deprecated but kept to maintain source compatibility between various versions of FreeType.

                  + +
                  +
                  + +
                  +

                  CID_Info

                  +

                  Defined in FT_TYPE1_TABLES_H (t1tables.h).

                  +
                  +  typedef CID_FaceInfoRec  CID_Info;
                  +
                  + +

                  This type is equivalent to CID_FaceInfoRec. It is deprecated but kept to maintain source compatibility between various versions of FreeType.

                  + +
                  +
                  diff --git a/freetype/docs/reference/ft2-user_allocation.html b/freetype/docs/reference/ft2-user_allocation.html index 69589a52..52bd6ec2 100644 --- a/freetype/docs/reference/ft2-user_allocation.html +++ b/freetype/docs/reference/ft2-user_allocation.html @@ -3,45 +3,108 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
                  [Index][TOC]
                  -

                  FreeType-2.5.1 API Reference

                  + +

                  FreeType-2.5.5 API Reference

                  + +

                  User allocation

                  -

                  -User allocation -

                  -

                  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 ‘calloc’ (or variants of it) instead of ‘malloc’ for allocation.

                  -

                  + diff --git a/freetype/docs/reference/ft2-version.html b/freetype/docs/reference/ft2-version.html index b698ac5c..89e3dac9 100644 --- a/freetype/docs/reference/ft2-version.html +++ b/freetype/docs/reference/ft2-version.html @@ -3,217 +3,250 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
                  [Index][TOC]
                  -

                  FreeType-2.5.1 API Reference

                  + +

                  FreeType-2.5.5 API Reference

                  -

                  -FreeType Version -

                  +

                  FreeType Version

                  Synopsis

                  - - - -
                  FREETYPE_XXXFT_Face_CheckTrueTypePatents
                  FT_Library_VersionFT_Face_SetUnpatentedHinting


                  - -
                  -

                  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.

                  -

                  -
                  -

                  FREETYPE_XXX

                  -
                  -Defined in FT_FREETYPE_H (freetype.h). -

                  -
                  -
                  -#define FREETYPE_MAJOR  2
                  -#define FREETYPE_MINOR  5
                  -#define FREETYPE_PATCH  1
                  -
                  -

                  -
                  -

                  These three macros identify the FreeType source code version. Use FT_Library_Version to access them at runtime.

                  -

                  -
                  values
                  -

                  - - - - +
                  FREETYPE_MAJOR -

                  The major version number.

                  -
                  FREETYPE_MINOR -

                  The minor version number.

                  -
                  FREETYPE_PATCH -

                  The patch level.

                  -
                  + + + + +
                  FT_Library_Version 
                   FT_Face_CheckTrueTypePatents
                  FREETYPE_MAJORFT_Face_SetUnpatentedHinting
                  FREETYPE_MINOR 
                  FREETYPE_PATCHFREETYPE_XXX
                  -
                  -
                  note
                  -

                  The version number of FreeType if built as a dynamic link library with the ‘libtool’ package is not controlled by these three macros.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Library_Version

                  -
                  -Defined in FT_FREETYPE_H (freetype.h). -

                  -
                   
                  +

                  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.

                  + +
                  +

                  FT_Library_Version

                  +

                  Defined in FT_FREETYPE_H (freetype.h).

                  +
                     FT_EXPORT( void )
                     FT_Library_Version( FT_Library   library,
                                         FT_Int      *amajor,
                                         FT_Int      *aminor,
                                         FT_Int      *apatch );
                  +
                  -

                  -

                  Return the version of the FreeType library being used. This is useful when dynamically linking to the library, since one cannot use the macros FREETYPE_MAJOR, FREETYPE_MINOR, and FREETYPE_PATCH.

                  -

                  -
                  input
                  -

                  - -
                  library + +

                  input

                  + +
                  library

                  A source library handle.

                  -
                  -
                  output
                  -

                  - -
                  amajor + +

                  output

                  + + - -
                  amajor

                  The major version number.

                  aminor +
                  aminor

                  The minor version number.

                  apatch +
                  apatch

                  The patch version number.

                  -
                  -
                  note
                  + +

                  note

                  The reason why this function takes a ‘library’ argument is because certain programs implement library initialization in a custom way that doesn't use FT_Init_FreeType.

                  In such cases, the library version might not be available before the library object has been created.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Face_CheckTrueTypePatents

                  -
                  -Defined in FT_FREETYPE_H (freetype.h). -

                  -
                  +
                  + +
                  +

                  FT_Face_CheckTrueTypePatents

                  +

                  Defined in FT_FREETYPE_H (freetype.h).

                  +
                     FT_EXPORT( FT_Bool )
                     FT_Face_CheckTrueTypePatents( FT_Face  face );
                  +
                  -

                  -

                  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 not use these opcodes.

                  Note that this function parses all glyph instructions in the font file, which may be slow.

                  -

                  -
                  input
                  -

                  - -
                  face + +

                  input

                  + +
                  face

                  A face handle.

                  -
                  -
                  return
                  + +

                  return

                  1 if this is a TrueType font that uses one of the patented opcodes, 0 otherwise.

                  -
                  -
                  note
                  + +

                  note

                  Since May 2010, TrueType hinting is no longer patented.

                  -
                  -
                  since
                  + +

                  since

                  2.3.5

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Face_SetUnpatentedHinting

                  -
                  -Defined in FT_FREETYPE_H (freetype.h). -

                  -
                  +
                  + +
                  +

                  FT_Face_SetUnpatentedHinting

                  +

                  Defined in FT_FREETYPE_H (freetype.h).

                  +
                     FT_EXPORT( FT_Bool )
                     FT_Face_SetUnpatentedHinting( FT_Face  face,
                                                   FT_Bool  value );
                  +
                  -

                  -

                  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 FT_Face_CheckTrueTypePatents).

                  -

                  -
                  input
                  -

                  - -
                  face + +

                  input

                  + + -
                  face

                  A face handle.

                  value +
                  value

                  New boolean setting.

                  -
                  -
                  return
                  + +

                  return

                  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.

                  -
                  -
                  note
                  + +

                  note

                  Since May 2010, TrueType hinting is no longer patented.

                  -
                  -
                  since
                  + +

                  since

                  2.3.5

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  + +
                  + + +
                  +

                  FREETYPE_XXX

                  +

                  Defined in FT_FREETYPE_H (freetype.h).

                  +
                  +#define FREETYPE_MAJOR  2
                  +#define FREETYPE_MINOR  5
                  +#define FREETYPE_PATCH  5
                  +
                  + +

                  These three macros identify the FreeType source code version. Use FT_Library_Version to access them at runtime.

                  + +

                  values

                  + + + + +
                  FREETYPE_MAJOR +

                  The major version number.

                  +
                  FREETYPE_MINOR +

                  The minor version number.

                  +
                  FREETYPE_PATCH +

                  The patch level.

                  +
                  + +

                  note

                  +

                  The version number of FreeType if built as a dynamic link library with the ‘libtool’ package is not controlled by these three macros.

                  + +
                  +
                  diff --git a/freetype/docs/reference/ft2-winfnt_fonts.html b/freetype/docs/reference/ft2-winfnt_fonts.html index e8b5e5fe..a17e350d 100644 --- a/freetype/docs/reference/ft2-winfnt_fonts.html +++ b/freetype/docs/reference/ft2-winfnt_fonts.html @@ -3,96 +3,154 @@ -FreeType-2.5.1 API Reference +FreeType-2.5.5 API Reference - - -
                  [Index][TOC]
                  -

                  FreeType-2.5.1 API Reference

                  + +

                  FreeType-2.5.5 API Reference

                  -

                  -Window FNT Files -

                  +

                  Window FNT Files

                  Synopsis

                  - - - -
                  FT_WinFNT_ID_XXXFT_WinFNT_Header
                  FT_WinFNT_HeaderRecFT_Get_WinFNT_Header


                  + + + +
                  FT_WinFNT_ID_XXXFT_WinFNT_Header
                  FT_WinFNT_HeaderRecFT_Get_WinFNT_Header
                  + -

                  This section contains the declaration of Windows FNT specific functions.

                  -

                  -
                  -

                  FT_WinFNT_ID_XXX

                  -
                  -Defined in FT_WINFONTS_H (ftwinfnt.h). -

                  -
                   
                  -#define FT_WinFNT_ID_CP1252    0
                  -#define FT_WinFNT_ID_DEFAULT   1
                  -#define FT_WinFNT_ID_SYMBOL    2
                  -#define FT_WinFNT_ID_MAC      77
                  -#define FT_WinFNT_ID_CP932   128
                  -#define FT_WinFNT_ID_CP949   129
                  -#define FT_WinFNT_ID_CP1361  130
                  -#define FT_WinFNT_ID_CP936   134
                  -#define FT_WinFNT_ID_CP950   136
                  -#define FT_WinFNT_ID_CP1253  161
                  -#define FT_WinFNT_ID_CP1254  162
                  -#define FT_WinFNT_ID_CP1258  163
                  -#define FT_WinFNT_ID_CP1255  177
                  -#define FT_WinFNT_ID_CP1256  178
                  -#define FT_WinFNT_ID_CP1257  186
                  -#define FT_WinFNT_ID_CP1251  204
                  -#define FT_WinFNT_ID_CP874   222
                  -#define FT_WinFNT_ID_CP1250  238
                  -#define FT_WinFNT_ID_OEM     255
                  +
                  +

                  FT_WinFNT_ID_XXX

                  +

                  Defined in FT_WINFONTS_H (ftwinfnt.h).

                  +
                  +#define FT_WinFNT_ID_CP1252    0
                  +#define FT_WinFNT_ID_DEFAULT   1
                  +#define FT_WinFNT_ID_SYMBOL    2
                  +#define FT_WinFNT_ID_MAC      77
                  +#define FT_WinFNT_ID_CP932   128
                  +#define FT_WinFNT_ID_CP949   129
                  +#define FT_WinFNT_ID_CP1361  130
                  +#define FT_WinFNT_ID_CP936   134
                  +#define FT_WinFNT_ID_CP950   136
                  +#define FT_WinFNT_ID_CP1253  161
                  +#define FT_WinFNT_ID_CP1254  162
                  +#define FT_WinFNT_ID_CP1258  163
                  +#define FT_WinFNT_ID_CP1255  177
                  +#define FT_WinFNT_ID_CP1256  178
                  +#define FT_WinFNT_ID_CP1257  186
                  +#define FT_WinFNT_ID_CP1251  204
                  +#define FT_WinFNT_ID_CP874   222
                  +#define FT_WinFNT_ID_CP1250  238
                  +#define FT_WinFNT_ID_OEM     255
                  +
                  -

                  -

                  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/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 + +

                  values

                  + + - - - - - - - - - - - - - - - - - -
                  FT_WinFNT_ID_DEFAULT

                  This is used for font enumeration and font creation as a ‘don't care’ 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.

                  FT_WinFNT_ID_SYMBOL +
                  FT_WinFNT_ID_SYMBOL

                  There is no known mapping table available.

                  FT_WinFNT_ID_MAC +
                  FT_WinFNT_ID_MAC

                  Mac Roman encoding.

                  FT_WinFNT_ID_OEM +
                  FT_WinFNT_ID_OEM

                  From Michael Pöttgen <michael@poettgen.de>:

                  The ‘Windows Font Mapping’ article says that FT_WinFNT_ID_OEM is used for the charset of vector fonts, like ‘modern.fon’, ‘roman.fon’, and ‘script.fon’ on Windows.

                  The ‘CreateFont’ documentation says: The FT_WinFNT_ID_OEM value specifies a character set that is operating-system dependent.

                  @@ -101,66 +159,60 @@ Defined in FT_WINFONTS_H (ftwinfnt.h).

                  http://www.microsoft.com/globaldev/reference/cphome.mspx,

                  and is used for the ‘DOS boxes’, to support legacy applications. A German Windows version for example usually uses ANSI codepage 1252 and OEM codepage 850.

                  FT_WinFNT_ID_CP874 +
                  FT_WinFNT_ID_CP874

                  A superset of Thai TIS 620 and ISO 8859-11.

                  FT_WinFNT_ID_CP932 +
                  FT_WinFNT_ID_CP932

                  A superset of Japanese Shift-JIS (with minor deviations).

                  FT_WinFNT_ID_CP936 +
                  FT_WinFNT_ID_CP936

                  A superset of simplified Chinese GB 2312-1980 (with different ordering and minor deviations).

                  FT_WinFNT_ID_CP949 +
                  FT_WinFNT_ID_CP949

                  A superset of Korean Hangul KS C 5601-1987 (with different ordering and minor deviations).

                  FT_WinFNT_ID_CP950 +
                  FT_WinFNT_ID_CP950

                  A superset of traditional Chinese Big 5 ETen (with different ordering and minor deviations).

                  FT_WinFNT_ID_CP1250 +
                  FT_WinFNT_ID_CP1250

                  A superset of East European ISO 8859-2 (with slightly different ordering).

                  FT_WinFNT_ID_CP1251 +
                  FT_WinFNT_ID_CP1251

                  A superset of Russian ISO 8859-5 (with different ordering).

                  FT_WinFNT_ID_CP1252 +
                  FT_WinFNT_ID_CP1252

                  ANSI encoding. A superset of ISO 8859-1.

                  FT_WinFNT_ID_CP1253 +
                  FT_WinFNT_ID_CP1253

                  A superset of Greek ISO 8859-7 (with minor modifications).

                  FT_WinFNT_ID_CP1254 +
                  FT_WinFNT_ID_CP1254

                  A superset of Turkish ISO 8859-9.

                  FT_WinFNT_ID_CP1255 +
                  FT_WinFNT_ID_CP1255

                  A superset of Hebrew ISO 8859-8 (with some modifications).

                  FT_WinFNT_ID_CP1256 +
                  FT_WinFNT_ID_CP1256

                  A superset of Arabic ISO 8859-6 (with different ordering).

                  FT_WinFNT_ID_CP1257 +
                  FT_WinFNT_ID_CP1257

                  A superset of Baltic ISO 8859-13 (with some deviations).

                  FT_WinFNT_ID_CP1258 +
                  FT_WinFNT_ID_CP1258

                  For Vietnamese. This encoding doesn't cover all necessary characters.

                  FT_WinFNT_ID_CP1361 +
                  FT_WinFNT_ID_CP1361

                  Korean (Johab).

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_WinFNT_HeaderRec

                  -
                  -Defined in FT_WINFONTS_H (ftwinfnt.h). -

                  -
                  +
                  + +
                  +

                  FT_WinFNT_HeaderRec

                  +

                  Defined in FT_WINFONTS_H (ftwinfnt.h).

                  +
                     typedef struct  FT_WinFNT_HeaderRec_
                     {
                       FT_UShort  version;
                  @@ -201,78 +253,58 @@ Defined in FT_WINFONTS_H (ftwinfnt.h).
                       FT_ULong   reserved1[4];
                   
                     } FT_WinFNT_HeaderRec;
                  +
                  -

                  -

                  Windows FNT Header info.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_WinFNT_Header

                  -
                  -Defined in FT_WINFONTS_H (ftwinfnt.h). -

                  -
                  +
                  + +
                  +

                  FT_WinFNT_Header

                  +

                  Defined in FT_WINFONTS_H (ftwinfnt.h).

                  +
                     typedef struct FT_WinFNT_HeaderRec_*  FT_WinFNT_Header;
                  +
                  -

                  -

                  A handle to an FT_WinFNT_HeaderRec structure.

                  -

                  -
                  -
                  - - -
                  [Index][TOC]
                  -
                  -

                  FT_Get_WinFNT_Header

                  -
                  -Defined in FT_WINFONTS_H (ftwinfnt.h). -

                  -
                  +
                  + +
                  +

                  FT_Get_WinFNT_Header

                  +

                  Defined in FT_WINFONTS_H (ftwinfnt.h).

                  +
                     FT_EXPORT( FT_Error )
                     FT_Get_WinFNT_Header( FT_Face               face,
                                           FT_WinFNT_HeaderRec  *aheader );
                  +
                  -

                  -

                  Retrieve a Windows FNT font info header.

                  -

                  - -
                  input
                  -

                  - -
                  face + +

                  input

                  + +
                  face

                  A handle to the input face.

                  -
                  -
                  output
                  -

                  - -
                  aheader + +

                  output

                  + +
                  aheader

                  The WinFNT header.

                  -
                  -
                  return
                  + +

                  return

                  FreeType error code. 0 means success.

                  -
                  -
                  note
                  + +

                  note

                  This function only works with Windows FNT faces, returning an error otherwise.

                  -
                  -
                  -
                  - - -
                  [Index][TOC]
                  + +
                  + diff --git a/freetype/docs/release b/freetype/docs/release index cf1f643d..98f16cd3 100644 --- a/freetype/docs/release +++ b/freetype/docs/release @@ -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- -m "" -u @@ -188,7 +189,7 @@ How to prepare a new release ---------------------------------------------------------------------- -Copyright 2003, 2005-2007, 2009, 2011-2013 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/freetype/include/PaxHeaders.18661/config b/freetype/include/PaxHeaders.18661/config deleted file mode 100644 index c8ccbc0f..00000000 --- a/freetype/include/PaxHeaders.18661/config +++ /dev/null @@ -1,3 +0,0 @@ -28 mtime=1385335772.9359936 -30 atime=1385335774.461974522 -28 ctime=1385335772.9359936 diff --git a/freetype/include/PaxHeaders.18661/freetype.h b/freetype/include/PaxHeaders.18661/freetype.h deleted file mode 100644 index e184dd05..00000000 --- a/freetype/include/PaxHeaders.18661/freetype.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385044952.783505415 -30 atime=1385335585.662334843 -30 ctime=1385044952.783505415 diff --git a/freetype/include/PaxHeaders.18661/ft2build.h b/freetype/include/PaxHeaders.18661/ft2build.h deleted file mode 100644 index 07f7cc23..00000000 --- a/freetype/include/PaxHeaders.18661/ft2build.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384332396.936809251 -30 atime=1385335758.550173447 -30 ctime=1384332396.936809251 diff --git a/freetype/include/PaxHeaders.18661/ftadvanc.h b/freetype/include/PaxHeaders.18661/ftadvanc.h deleted file mode 100644 index df1983d5..00000000 --- a/freetype/include/PaxHeaders.18661/ftadvanc.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378198946.117749881 -29 atime=1385335759.97615562 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftautoh.h b/freetype/include/PaxHeaders.18661/ftautoh.h deleted file mode 100644 index b6cad3ed..00000000 --- a/freetype/include/PaxHeaders.18661/ftautoh.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378198982.494295112 -30 atime=1385335759.998155345 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftbbox.h b/freetype/include/PaxHeaders.18661/ftbbox.h deleted file mode 100644 index bd9b5df2..00000000 --- a/freetype/include/PaxHeaders.18661/ftbbox.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378199022.993788799 -30 atime=1385335759.999155332 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftbdf.h b/freetype/include/PaxHeaders.18661/ftbdf.h deleted file mode 100644 index 7e3e49b4..00000000 --- a/freetype/include/PaxHeaders.18661/ftbdf.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.00015532 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftbitmap.h b/freetype/include/PaxHeaders.18661/ftbitmap.h deleted file mode 100644 index ec94dc31..00000000 --- a/freetype/include/PaxHeaders.18661/ftbitmap.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.018155095 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftbzip2.h b/freetype/include/PaxHeaders.18661/ftbzip2.h deleted file mode 100644 index 795d3375..00000000 --- a/freetype/include/PaxHeaders.18661/ftbzip2.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.02015507 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftcache.h b/freetype/include/PaxHeaders.18661/ftcache.h deleted file mode 100644 index 7a16e4a2..00000000 --- a/freetype/include/PaxHeaders.18661/ftcache.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378199147.436233054 -29 atime=1385335760.02015507 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftcffdrv.h b/freetype/include/PaxHeaders.18661/ftcffdrv.h deleted file mode 100644 index 9bd2d65d..00000000 --- a/freetype/include/PaxHeaders.18661/ftcffdrv.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382556660.650520795 -30 atime=1385335760.043154782 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftchapters.h b/freetype/include/PaxHeaders.18661/ftchapters.h deleted file mode 100644 index 30a3b2c9..00000000 --- a/freetype/include/PaxHeaders.18661/ftchapters.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378199283.614530591 -29 atime=1385335760.06415452 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftcid.h b/freetype/include/PaxHeaders.18661/ftcid.h deleted file mode 100644 index f885e59a..00000000 --- a/freetype/include/PaxHeaders.18661/ftcid.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.065154507 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/fterrdef.h b/freetype/include/PaxHeaders.18661/fterrdef.h deleted file mode 100644 index f885e59a..00000000 --- a/freetype/include/PaxHeaders.18661/fterrdef.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.065154507 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/fterrors.h b/freetype/include/PaxHeaders.18661/fterrors.h deleted file mode 100644 index c1f1eab6..00000000 --- a/freetype/include/PaxHeaders.18661/fterrors.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.081154307 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftgasp.h b/freetype/include/PaxHeaders.18661/ftgasp.h deleted file mode 100644 index 94e23ab9..00000000 --- a/freetype/include/PaxHeaders.18661/ftgasp.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.086154245 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftglyph.h b/freetype/include/PaxHeaders.18661/ftglyph.h deleted file mode 100644 index 50fd6f50..00000000 --- a/freetype/include/PaxHeaders.18661/ftglyph.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378199403.070037192 -29 atime=1385335760.08815422 -30 ctime=1384254877.871227088 diff --git a/freetype/include/PaxHeaders.18661/ftgxval.h b/freetype/include/PaxHeaders.18661/ftgxval.h deleted file mode 100644 index 544fb62c..00000000 --- a/freetype/include/PaxHeaders.18661/ftgxval.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378199453.443407438 -30 atime=1385335760.090154195 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftgzip.h b/freetype/include/PaxHeaders.18661/ftgzip.h deleted file mode 100644 index cb6fb537..00000000 --- a/freetype/include/PaxHeaders.18661/ftgzip.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377705527.640876835 -30 atime=1385335760.091154182 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftimage.h b/freetype/include/PaxHeaders.18661/ftimage.h deleted file mode 100644 index ae46e791..00000000 --- a/freetype/include/PaxHeaders.18661/ftimage.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255168.371595333 -30 atime=1385335759.730158695 -30 ctime=1384255168.371595333 diff --git a/freetype/include/PaxHeaders.18661/ftincrem.h b/freetype/include/PaxHeaders.18661/ftincrem.h deleted file mode 100644 index 2be574f0..00000000 --- a/freetype/include/PaxHeaders.18661/ftincrem.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.11215392 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftlcdfil.h b/freetype/include/PaxHeaders.18661/ftlcdfil.h deleted file mode 100644 index ec0f4a81..00000000 --- a/freetype/include/PaxHeaders.18661/ftlcdfil.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378199695.091386422 -30 atime=1385335760.113153907 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftlist.h b/freetype/include/PaxHeaders.18661/ftlist.h deleted file mode 100644 index f53dcd79..00000000 --- a/freetype/include/PaxHeaders.18661/ftlist.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378199736.141873221 -30 atime=1385335760.114153895 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftlzw.h b/freetype/include/PaxHeaders.18661/ftlzw.h deleted file mode 100644 index 89d5a6fc..00000000 --- a/freetype/include/PaxHeaders.18661/ftlzw.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.115153882 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftmac.h b/freetype/include/PaxHeaders.18661/ftmac.h deleted file mode 100644 index dca6dafa..00000000 --- a/freetype/include/PaxHeaders.18661/ftmac.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255220.718940901 -30 atime=1385335759.753158408 -30 ctime=1384255220.718940901 diff --git a/freetype/include/PaxHeaders.18661/ftmm.h b/freetype/include/PaxHeaders.18661/ftmm.h deleted file mode 100644 index d4dc64c1..00000000 --- a/freetype/include/PaxHeaders.18661/ftmm.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378200067.117735453 -29 atime=1385335760.11615387 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftmodapi.h b/freetype/include/PaxHeaders.18661/ftmodapi.h deleted file mode 100644 index 4c5c4a7a..00000000 --- a/freetype/include/PaxHeaders.18661/ftmodapi.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378200108.364219801 -30 atime=1385335760.118153845 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftmoderr.h b/freetype/include/PaxHeaders.18661/ftmoderr.h deleted file mode 100644 index efe72179..00000000 --- a/freetype/include/PaxHeaders.18661/ftmoderr.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.119153832 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftotval.h b/freetype/include/PaxHeaders.18661/ftotval.h deleted file mode 100644 index 60fcd8a8..00000000 --- a/freetype/include/PaxHeaders.18661/ftotval.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378200136.121872783 -29 atime=1385335760.12015382 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftoutln.h b/freetype/include/PaxHeaders.18661/ftoutln.h deleted file mode 100644 index 2d2d7497..00000000 --- a/freetype/include/PaxHeaders.18661/ftoutln.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1379654135.316917312 -29 atime=1385335760.12015382 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftpfr.h b/freetype/include/PaxHeaders.18661/ftpfr.h deleted file mode 100644 index 46f7b3cc..00000000 --- a/freetype/include/PaxHeaders.18661/ftpfr.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.145153507 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftrender.h b/freetype/include/PaxHeaders.18661/ftrender.h deleted file mode 100644 index e5db75ae..00000000 --- a/freetype/include/PaxHeaders.18661/ftrender.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.146153495 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftsizes.h b/freetype/include/PaxHeaders.18661/ftsizes.h deleted file mode 100644 index 55e5661b..00000000 --- a/freetype/include/PaxHeaders.18661/ftsizes.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378200210.892938016 -30 atime=1385335760.147153482 -30 ctime=1384254877.872227075 diff --git a/freetype/include/PaxHeaders.18661/ftsnames.h b/freetype/include/PaxHeaders.18661/ftsnames.h deleted file mode 100644 index 8ed8480b..00000000 --- a/freetype/include/PaxHeaders.18661/ftsnames.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378200265.280258081 -29 atime=1385335760.14815347 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/ftstroke.h b/freetype/include/PaxHeaders.18661/ftstroke.h deleted file mode 100644 index 1b8f1cc0..00000000 --- a/freetype/include/PaxHeaders.18661/ftstroke.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.149153457 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/ftsynth.h b/freetype/include/PaxHeaders.18661/ftsynth.h deleted file mode 100644 index dc8d986c..00000000 --- a/freetype/include/PaxHeaders.18661/ftsynth.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378200294.538892297 -29 atime=1385335760.15615337 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/ftsystem.h b/freetype/include/PaxHeaders.18661/ftsystem.h deleted file mode 100644 index 6de4c294..00000000 --- a/freetype/include/PaxHeaders.18661/ftsystem.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.15615337 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/fttrigon.h b/freetype/include/PaxHeaders.18661/fttrigon.h deleted file mode 100644 index dbc7148f..00000000 --- a/freetype/include/PaxHeaders.18661/fttrigon.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.157153357 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/ftttdrv.h b/freetype/include/PaxHeaders.18661/ftttdrv.h deleted file mode 100644 index ded8f2b5..00000000 --- a/freetype/include/PaxHeaders.18661/ftttdrv.h +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1378200326.34549466 -30 atime=1385335760.158153345 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/fttypes.h b/freetype/include/PaxHeaders.18661/fttypes.h deleted file mode 100644 index 5ba244a4..00000000 --- a/freetype/include/PaxHeaders.18661/fttypes.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378200427.480230302 -30 atime=1385335760.159153332 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/ftwinfnt.h b/freetype/include/PaxHeaders.18661/ftwinfnt.h deleted file mode 100644 index a09f9edc..00000000 --- a/freetype/include/PaxHeaders.18661/ftwinfnt.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.16015332 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/ftxf86.h b/freetype/include/PaxHeaders.18661/ftxf86.h deleted file mode 100644 index 94d56dd8..00000000 --- a/freetype/include/PaxHeaders.18661/ftxf86.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378200448.571966619 -30 atime=1385335760.161153307 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/internal b/freetype/include/PaxHeaders.18661/internal deleted file mode 100644 index 43d4a686..00000000 --- a/freetype/include/PaxHeaders.18661/internal +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335772.884994237 -30 atime=1385335774.460974535 -30 ctime=1385335772.884994237 diff --git a/freetype/include/PaxHeaders.18661/t1tables.h b/freetype/include/PaxHeaders.18661/t1tables.h deleted file mode 100644 index 171dde75..00000000 --- a/freetype/include/PaxHeaders.18661/t1tables.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.242152294 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/ttnameid.h b/freetype/include/PaxHeaders.18661/ttnameid.h deleted file mode 100644 index 839385b8..00000000 --- a/freetype/include/PaxHeaders.18661/ttnameid.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1378200484.325519638 -30 atime=1385335760.244152269 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/tttables.h b/freetype/include/PaxHeaders.18661/tttables.h deleted file mode 100644 index 6df8fd44..00000000 --- a/freetype/include/PaxHeaders.18661/tttables.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384583937.056646766 -30 atime=1385335757.129191212 -30 ctime=1384583937.056646766 diff --git a/freetype/include/PaxHeaders.18661/tttags.h b/freetype/include/PaxHeaders.18661/tttags.h deleted file mode 100644 index ea22a9a6..00000000 --- a/freetype/include/PaxHeaders.18661/tttags.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377791618.074958485 -30 atime=1385335760.247152232 -30 ctime=1384254877.873227063 diff --git a/freetype/include/PaxHeaders.18661/ttunpat.h b/freetype/include/PaxHeaders.18661/ttunpat.h deleted file mode 100644 index d43f80a5..00000000 --- a/freetype/include/PaxHeaders.18661/ttunpat.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.266151994 -30 ctime=1384254877.873227063 diff --git a/freetype/include/config/PaxHeaders.18661/ftconfig.h b/freetype/include/config/PaxHeaders.18661/ftconfig.h deleted file mode 100644 index 87f16682..00000000 --- a/freetype/include/config/PaxHeaders.18661/ftconfig.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255443.251158866 -29 atime=1385335759.62815997 -30 ctime=1384255443.251158866 diff --git a/freetype/include/config/PaxHeaders.18661/ftheader.h b/freetype/include/config/PaxHeaders.18661/ftheader.h deleted file mode 100644 index 3f7c837d..00000000 --- a/freetype/include/config/PaxHeaders.18661/ftheader.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255659.242458603 -30 atime=1385335759.673159408 -30 ctime=1384255659.242458603 diff --git a/freetype/include/config/PaxHeaders.18661/ftmodule.h b/freetype/include/config/PaxHeaders.18661/ftmodule.h deleted file mode 100644 index b6781056..00000000 --- a/freetype/include/config/PaxHeaders.18661/ftmodule.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335759.95215592 -30 ctime=1374498496.917304702 diff --git a/freetype/include/config/PaxHeaders.18661/ftoption.h b/freetype/include/config/PaxHeaders.18661/ftoption.h deleted file mode 100644 index 59a77248..00000000 --- a/freetype/include/config/PaxHeaders.18661/ftoption.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255585.439381268 -30 atime=1385335759.681159308 -30 ctime=1384255585.439381268 diff --git a/freetype/include/config/PaxHeaders.18661/ftstdlib.h b/freetype/include/config/PaxHeaders.18661/ftstdlib.h deleted file mode 100644 index 81e52661..00000000 --- a/freetype/include/config/PaxHeaders.18661/ftstdlib.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335759.966155745 -30 ctime=1374498496.920304664 diff --git a/freetype/include/config/ftconfig.h b/freetype/include/config/ftconfig.h index 0770e787..22d70fd3 100644 --- a/freetype/include/config/ftconfig.h +++ b/freetype/include/config/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* ANSI-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2004, 2006-2008, 2010-2011, 2013 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, */ @@ -266,7 +266,16 @@ FT_BEGIN_HEADER #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 @@ -300,28 +309,10 @@ FT_BEGIN_HEADER #define FT_INT64 long long int #define FT_UINT64 unsigned long long int +#endif /* _MSC_VER */ + #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 ) - -#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_LONG64 typedef FT_INT64 FT_Int64; typedef FT_UINT64 FT_UInt64; @@ -333,219 +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( __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) */ -#ifdef __clang__ - "add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ -#else - "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ -#endif - "adds %1, %1, %0\n\t" /* %1 += %0 */ - "adc %2, %2, #0\n\t" /* %2 += carry */ - "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ - "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; - - - 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_INLINED FT_MULFIX_ASSEMBLER -#endif -#endif - - #ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x diff --git a/freetype/include/config/ftoption.h b/freetype/include/config/ftoption.h index fe2ba15b..2b0b67e7 100644 --- a/freetype/include/config/ftoption.h +++ b/freetype/include/config/ftoption.h @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2013 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, */ @@ -61,7 +61,7 @@ FT_BEGIN_HEADER /* that are statically linked to the library at compile time. By */ /* default, this file is . */ /* */ - /* We highly recommend using the third method whenever possible. */ + /* We highly recommend using the third method whenever possible. */ /* */ /*************************************************************************/ @@ -216,7 +216,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* PNG bitmap support. */ + /* PNG bitmap support. */ /* */ /* FreeType now handles loading color bitmap glyphs in the PNG format. */ /* This requires help from the external libpng library. Uncompressed */ @@ -228,6 +228,19 @@ FT_BEGIN_HEADER /* #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 */ @@ -758,6 +771,30 @@ FT_BEGIN_HEADER /*************************************************************************/ + /*************************************************************************/ + /* */ + /* 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 */ @@ -807,8 +844,8 @@ FT_BEGIN_HEADER /* - * This macro is obsolete. Support has been removed in FreeType - * version 2.5. + * This macro is obsolete. Support has been removed in FreeType + * version 2.5. */ /* #define FT_CONFIG_OPTION_OLD_INTERNALS */ @@ -824,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/freetype/include/freetype.h b/freetype/include/freetype.h index 76fbda2d..27fd44bf 100644 --- a/freetype/include/freetype.h +++ b/freetype/include/freetype.h @@ -4,7 +4,7 @@ /* */ /* FreeType high-level API and common types (specification only). */ /* */ -/* Copyright 1996-2013 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, */ @@ -39,6 +39,38 @@ FT_BEGIN_HEADER + /*************************************************************************/ + /* */ + /*
                  */ + /* header_inclusion */ + /* */ + /* */ + /* 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> */ @@ -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 */ /* */ @@ -106,8 +140,22 @@ FT_BEGIN_HEADER /* 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 */ @@ -126,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 */ @@ -138,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 */ /* */ @@ -158,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 */ @@ -173,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 */ @@ -186,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 */ /* */ /*************************************************************************/ @@ -344,6 +406,13 @@ FT_BEGIN_HEADER typedef struct FT_LibraryRec_ *FT_Library; + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /*************************************************************************/ + /*************************************************************************/ /* */ /* <Type> */ @@ -383,6 +452,13 @@ FT_BEGIN_HEADER typedef struct FT_RendererRec_* FT_Renderer; + /*************************************************************************/ + /* */ + /* <Section> */ + /* base_interface */ + /* */ + /*************************************************************************/ + /*************************************************************************/ /* */ /* <Type> */ @@ -695,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 @@ -1538,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 */ @@ -1560,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' */ @@ -1751,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. */ @@ -1771,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 /*************************************************************************/ @@ -1840,22 +1901,22 @@ FT_BEGIN_HEADER /* 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 */ @@ -2273,6 +2334,8 @@ FT_BEGIN_HEADER /* 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 ); @@ -2347,6 +2410,8 @@ FT_BEGIN_HEADER /* 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, @@ -2505,11 +2570,6 @@ FT_BEGIN_HEADER * 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 @@ -2520,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. * @@ -2564,6 +2618,12 @@ FT_BEGIN_HEADER * 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 @@ -2800,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 @@ -2839,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 ); @@ -2872,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 @@ -3025,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 */ - /* `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, @@ -3475,8 +3498,8 @@ FT_BEGIN_HEADER /* */ /* http://www.unicode.org/reports/tr37/ */ /* */ - /* To date (November 2012), the character with the most variants is */ - /* U+9089, having 31 such IVS. */ + /* 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 */ @@ -3727,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> */ @@ -3766,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 - /*************************************************************************/ /* */ @@ -3789,18 +3795,12 @@ FT_BEGIN_HEADER /* 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 ); @@ -3900,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 */ + /* */ /*************************************************************************/ @@ -3925,7 +3937,7 @@ FT_BEGIN_HEADER */ #define FREETYPE_MAJOR 2 #define FREETYPE_MINOR 5 -#define FREETYPE_PATCH 1 +#define FREETYPE_PATCH 5 /*************************************************************************/ diff --git a/freetype/include/ftadvanc.h b/freetype/include/ftadvanc.h index 8f7e2fce..955f93fa 100644 --- a/freetype/include/ftadvanc.h +++ b/freetype/include/ftadvanc.h @@ -4,7 +4,7 @@ /* */ /* Quick computation of advance widths (specification only). */ /* */ -/* Copyright 2008, 2013 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 + * */ @@ -171,7 +176,7 @@ FT_BEGIN_HEADER FT_Int32 load_flags, FT_Fixed *padvances ); -/* */ + /* */ FT_END_HEADER diff --git a/freetype/include/ftautoh.h b/freetype/include/ftautoh.h index bf97b3f2..59191abb 100644 --- a/freetype/include/ftautoh.h +++ b/freetype/include/ftautoh.h @@ -245,12 +245,12 @@ FT_BEGIN_HEADER * The data exchange structure for the @glyph-to-script-map property. * */ - typedef struct FT_Prop_GlyphToScriptMap_ - { - FT_Face face; - FT_Byte* map; + typedef struct FT_Prop_GlyphToScriptMap_ + { + FT_Face face; + FT_Byte* map; - } FT_Prop_GlyphToScriptMap; + } FT_Prop_GlyphToScriptMap; /************************************************************************** @@ -287,7 +287,52 @@ FT_BEGIN_HEADER * 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 glyph will affect this face. + * 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. * */ @@ -339,15 +384,15 @@ FT_BEGIN_HEADER * The data exchange structure for the @increase-x-height property. * */ - typedef struct FT_Prop_IncreaseXHeight_ - { - FT_Face face; - FT_UInt limit; + typedef struct FT_Prop_IncreaseXHeight_ + { + FT_Face face; + FT_UInt limit; - } FT_Prop_IncreaseXHeight; + } FT_Prop_IncreaseXHeight; + /* */ - /* */ FT_END_HEADER diff --git a/freetype/include/ftbbox.h b/freetype/include/ftbbox.h index 8938841a..d6800e24 100644 --- a/freetype/include/ftbbox.h +++ b/freetype/include/ftbbox.h @@ -85,7 +85,6 @@ FT_BEGIN_HEADER FT_Outline_Get_BBox( FT_Outline* outline, FT_BBox *abbox ); - /* */ diff --git a/freetype/include/ftbdf.h b/freetype/include/ftbdf.h index 4f8baf84..6d262e41 100644 --- a/freetype/include/ftbdf.h +++ b/freetype/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/freetype/include/ftbitmap.h b/freetype/include/ftbitmap.h index 7dbf5ba3..eae71690 100644 --- a/freetype/include/ftbitmap.h +++ b/freetype/include/ftbitmap.h @@ -4,7 +4,7 @@ /* */ /* FreeType utility functions for bitmaps (specification). */ /* */ -/* Copyright 2004-2006, 2008, 2013 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, diff --git a/freetype/include/ftbzip2.h b/freetype/include/ftbzip2.h index 1bf81b15..4dce161f 100644 --- a/freetype/include/ftbzip2.h +++ b/freetype/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/freetype/include/ftcache.h b/freetype/include/ftcache.h index a5d7100a..a30e925c 100644 --- a/freetype/include/ftcache.h +++ b/freetype/include/ftcache.h @@ -4,7 +4,7 @@ /* */ /* FreeType Cache subsystem (specification). */ /* */ -/* Copyright 1996-2008, 2010, 2013 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, */ @@ -209,10 +209,10 @@ 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 ); - /* */ + /* */ /*************************************************************************/ @@ -1046,8 +1046,8 @@ FT_BEGIN_HEADER FTC_SBit *sbit, FTC_Node *anode ); + /* */ - /* */ FT_END_HEADER diff --git a/freetype/include/ftcffdrv.h b/freetype/include/ftcffdrv.h index e4d039d0..f7031bc8 100644 --- a/freetype/include/ftcffdrv.h +++ b/freetype/include/ftcffdrv.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for controlling the CFF driver (specification only). */ /* */ -/* Copyright 2013 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, */ @@ -108,6 +108,12 @@ FT_BEGIN_HEADER * 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 + * */ @@ -212,9 +218,11 @@ FT_BEGIN_HEADER * stem width >= 2.333px: darkening amount = 0px * } * - * and piecewise linear in-between. Using the `darkening-parameters' - * property, these four control points can be changed, as the following - * example demonstrates. + * 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; @@ -242,8 +250,8 @@ FT_BEGIN_HEADER * */ + /* */ - /* */ FT_END_HEADER diff --git a/freetype/include/ftchapters.h b/freetype/include/ftchapters.h index 4b1059a8..d333761c 100644 --- a/freetype/include/ftchapters.h +++ b/freetype/include/ftchapters.h @@ -15,6 +15,7 @@ /* General Remarks */ /* */ /* <Sections> */ +/* header_inclusion */ /* user_allocation */ /* */ /***************************************************************************/ diff --git a/freetype/include/ftcid.h b/freetype/include/ftcid.h index 203a30ca..17550d87 100644 --- a/freetype/include/ftcid.h +++ b/freetype/include/ftcid.h @@ -156,7 +156,8 @@ FT_BEGIN_HEADER FT_UInt glyph_index, FT_UInt *cid ); - /* */ + /* */ + FT_END_HEADER diff --git a/freetype/include/fterrdef.h b/freetype/include/fterrdef.h index 76c7b9e3..99b2fade 100644 --- a/freetype/include/fterrdef.h +++ b/freetype/include/fterrdef.h @@ -31,218 +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, \ + 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, \ + 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/freetype/include/ftgasp.h b/freetype/include/ftgasp.h index 453d4fa4..3f3d7654 100644 --- a/freetype/include/ftgasp.h +++ b/freetype/include/ftgasp.h @@ -120,7 +120,8 @@ FT_Get_Gasp( FT_Face face, FT_UInt ppem ); -/* */ + /* */ + #endif /* _FT_GASP_H_ */ diff --git a/freetype/include/ftglyph.h b/freetype/include/ftglyph.h index 2d30ed9d..15fa6a99 100644 --- a/freetype/include/ftglyph.h +++ b/freetype/include/ftglyph.h @@ -4,7 +4,7 @@ /* */ /* FreeType convenience functions to handle glyphs (specification). */ /* */ -/* Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013 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, */ @@ -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 @@ -603,7 +589,6 @@ FT_BEGIN_HEADER FT_EXPORT( FT_Error ) FT_Matrix_Invert( FT_Matrix* matrix ); - /* */ diff --git a/freetype/include/ftgxval.h b/freetype/include/ftgxval.h index 6d38e327..88c3d937 100644 --- a/freetype/include/ftgxval.h +++ b/freetype/include/ftgxval.h @@ -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: @@ -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: @@ -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/freetype/include/ftgzip.h b/freetype/include/ftgzip.h index 78e72699..eb346c6d 100644 --- a/freetype/include/ftgzip.h +++ b/freetype/include/ftgzip.h @@ -137,8 +137,7 @@ FT_BEGIN_HEADER const FT_Byte* input, FT_ULong input_len ); - - /* */ + /* */ FT_END_HEADER diff --git a/freetype/include/ftimage.h b/freetype/include/ftimage.h index ea71a78e..2f7ca2aa 100644 --- a/freetype/include/ftimage.h +++ b/freetype/include/ftimage.h @@ -5,7 +5,7 @@ /* FreeType glyph image formats and default raster interface */ /* (specification). */ /* */ -/* Copyright 1996-2010, 2013 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, */ @@ -193,67 +193,14 @@ FT_BEGIN_HEADER } 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 - /*************************************************************************/ /* */ @@ -318,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; @@ -381,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 */ @@ -402,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 @@ -411,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 */ @@ -492,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 @@ -796,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 @@ -856,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 */ + /* */ /*************************************************************************/ @@ -865,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; @@ -877,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. */ @@ -886,8 +820,7 @@ 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 */ @@ -957,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, @@ -986,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, @@ -1034,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 */ @@ -1053,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 @@ -1079,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. */ @@ -1100,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_ { @@ -1116,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; @@ -1305,7 +1204,6 @@ FT_BEGIN_HEADER } FT_Raster_Funcs; - /* */ diff --git a/freetype/include/ftincrem.h b/freetype/include/ftincrem.h index aaf689ff..4c0246c5 100644 --- a/freetype/include/ftincrem.h +++ b/freetype/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/freetype/include/ftlcdfil.h b/freetype/include/ftlcdfil.h index 39206f01..e8679c1a 100644 --- a/freetype/include/ftlcdfil.h +++ b/freetype/include/ftlcdfil.h @@ -5,7 +5,7 @@ /* FreeType API for color filtering of subpixel bitmap glyphs */ /* (specification). */ /* */ -/* Copyright 2006-2008, 2010, 2013 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, */ @@ -56,7 +56,7 @@ FT_BEGIN_HEADER * * 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 + * (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 * diff --git a/freetype/include/ftlist.h b/freetype/include/ftlist.h index 241e21e5..9950a279 100644 --- a/freetype/include/ftlist.h +++ b/freetype/include/ftlist.h @@ -4,7 +4,7 @@ /* */ /* Generic list support for FreeType (specification). */ /* */ -/* Copyright 1996-2001, 2003, 2007, 2010, 2013 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, */ @@ -248,7 +248,7 @@ 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 that handles deallocation. */ /* */ @@ -265,7 +265,6 @@ FT_BEGIN_HEADER FT_Memory memory, void* user ); - /* */ diff --git a/freetype/include/ftlzw.h b/freetype/include/ftlzw.h index 00d40169..857c0c52 100644 --- a/freetype/include/ftlzw.h +++ b/freetype/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/freetype/include/ftmm.h b/freetype/include/ftmm.h index 837975a0..2dcfd678 100644 --- a/freetype/include/ftmm.h +++ b/freetype/include/ftmm.h @@ -218,9 +218,6 @@ FT_BEGIN_HEADER } FT_MM_Var; - /* */ - - /*************************************************************************/ /* */ /* <Function> */ @@ -365,7 +362,6 @@ FT_BEGIN_HEADER FT_UInt num_coords, FT_Fixed* coords ); - /* */ diff --git a/freetype/include/ftmodapi.h b/freetype/include/ftmodapi.h index 22878f8c..980f15d3 100644 --- a/freetype/include/ftmodapi.h +++ b/freetype/include/ftmodapi.h @@ -75,6 +75,33 @@ FT_BEGIN_HEADER /* */ /* 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 */ + /* */ /*************************************************************************/ @@ -491,7 +518,7 @@ FT_BEGIN_HEADER FT_EXPORT( FT_Error ) FT_Done_Library( FT_Library library ); -/* */ + /* */ typedef void (*FT_DebugHook_Func)( void* arg ); @@ -629,7 +656,6 @@ FT_BEGIN_HEADER FT_EXPORT( FT_TrueTypeEngineType ) FT_Get_TrueType_Engine_Type( FT_Library library ); - /* */ diff --git a/freetype/include/ftotval.h b/freetype/include/ftotval.h index bb52dc4a..75ba03ee 100644 --- a/freetype/include/ftotval.h +++ b/freetype/include/ftotval.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating OpenType tables (specification). */ /* */ -/* Copyright 2004-2007, 2013 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: @@ -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/freetype/include/ftoutln.h b/freetype/include/ftoutln.h index 8c7c57d9..d3b8fbd2 100644 --- a/freetype/include/ftoutln.h +++ b/freetype/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-2013 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,7 +52,6 @@ FT_BEGIN_HEADER /* */ /* <Order> */ /* FT_Outline */ - /* FT_OUTLINE_FLAGS */ /* FT_Outline_New */ /* FT_Outline_Done */ /* FT_Outline_Copy */ @@ -68,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 */ /* */ /*************************************************************************/ @@ -355,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 ); @@ -532,7 +538,7 @@ FT_BEGIN_HEADER * * @description: * This function analyzes a glyph outline and tries to compute its - * fill orientation (see @FT_Orientation). This is done by integrating + * 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 @@ -552,7 +558,6 @@ FT_BEGIN_HEADER FT_EXPORT( FT_Orientation ) FT_Outline_Get_Orientation( FT_Outline* outline ); - /* */ diff --git a/freetype/include/ftpfr.h b/freetype/include/ftpfr.h index 0b7b7d42..7d503539 100644 --- a/freetype/include/ftpfr.h +++ b/freetype/include/ftpfr.h @@ -161,7 +161,7 @@ FT_BEGIN_HEADER FT_UInt gindex, FT_Pos *aadvance ); - /* */ + /* */ FT_END_HEADER diff --git a/freetype/include/ftrender.h b/freetype/include/ftrender.h index dd0229b8..e8d36363 100644 --- a/freetype/include/ftrender.h +++ b/freetype/include/ftrender.h @@ -226,7 +226,6 @@ FT_BEGIN_HEADER FT_UInt num_params, FT_Parameter* parameters ); - /* */ diff --git a/freetype/include/ftstroke.h b/freetype/include/ftstroke.h index a498e4a8..bd311709 100644 --- a/freetype/include/ftstroke.h +++ b/freetype/include/ftstroke.h @@ -4,7 +4,7 @@ /* */ /* FreeType path stroker (specification). */ /* */ -/* Copyright 2002-2006, 2008, 2009, 2011-2012 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; @@ -276,6 +308,8 @@ FT_BEGIN_HEADER * @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 @@ -736,7 +770,7 @@ FT_BEGIN_HEADER FT_Bool inside, FT_Bool destroy ); - /* */ + /* */ FT_END_HEADER diff --git a/freetype/include/ftsynth.h b/freetype/include/ftsynth.h index 839ab5e4..d0ea7308 100644 --- a/freetype/include/ftsynth.h +++ b/freetype/include/ftsynth.h @@ -73,6 +73,7 @@ FT_BEGIN_HEADER /* */ + FT_END_HEADER #endif /* __FTSYNTH_H__ */ diff --git a/freetype/include/ftsystem.h b/freetype/include/ftsystem.h index e07460c5..7436ed26 100644 --- a/freetype/include/ftsystem.h +++ b/freetype/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/freetype/include/fttrigon.h b/freetype/include/fttrigon.h index 65143cb8..9c7b5432 100644 --- a/freetype/include/fttrigon.h +++ b/freetype/include/fttrigon.h @@ -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/freetype/include/ftttdrv.h b/freetype/include/ftttdrv.h index 8d9c16c1..35884139 100644 --- a/freetype/include/ftttdrv.h +++ b/freetype/include/ftttdrv.h @@ -134,13 +134,33 @@ FT_BEGIN_HEADER * FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 causes an * `FT_Err_Unimplemented_Feature' error. * + * Depending on the graphics framework, Microsoft uses different + * bytecode engines. As a consequence, the version numbers returned by + * a call to the `GETINFO[1]' bytecode instruction are more convoluted + * than desired. + * + * { + * framework Windows version result of GETINFO[1] + * ---------------------------------------------------- + * GDI before XP 35 + * GDI XP and later 37 + * GDI+ old before Vista 37 + * GDI+ old Vista, 7 38 + * GDI+ after 7 40 + * DWrite before 8 39 + * DWrite 8 and later 40 + * } + * + * Since FreeType doesn't provide all capabilities of DWrite ClearType, + * using version~38 seems justified. + * */ #define TT_INTERPRETER_VERSION_35 35 #define TT_INTERPRETER_VERSION_38 38 - /* */ + FT_END_HEADER diff --git a/freetype/include/fttypes.h b/freetype/include/fttypes.h index bd944a49..2c01e873 100644 --- a/freetype/include/fttypes.h +++ b/freetype/include/fttypes.h @@ -4,7 +4,7 @@ /* */ /* FreeType simple types definitions (specification only). */ /* */ -/* Copyright 1996-2002, 2004, 2006-2009, 2012, 2013 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 */ @@ -567,9 +571,9 @@ FT_BEGIN_HEADER } FT_ListRec; - /* */ + #define FT_IS_EMPTY( list ) ( (list).head == 0 ) #define FT_BOOL( x ) ( (FT_Bool)( x ) ) diff --git a/freetype/include/ftwinfnt.h b/freetype/include/ftwinfnt.h index 0b673517..50261581 100644 --- a/freetype/include/ftwinfnt.h +++ b/freetype/include/ftwinfnt.h @@ -259,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/freetype/include/ftxf86.h b/freetype/include/ftxf86.h index 493cccdd..89d1993e 100644 --- a/freetype/include/ftxf86.h +++ b/freetype/include/ftxf86.h @@ -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/freetype/include/internal/PaxHeaders.18661/autohint.h b/freetype/include/internal/PaxHeaders.18661/autohint.h deleted file mode 100644 index 1dad3def..00000000 --- a/freetype/include/internal/PaxHeaders.18661/autohint.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.161153307 -30 ctime=1374498496.797306202 diff --git a/freetype/include/internal/PaxHeaders.18661/ftcalc.h b/freetype/include/internal/PaxHeaders.18661/ftcalc.h deleted file mode 100644 index 2f5769bc..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftcalc.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377632107.107509255 -30 atime=1385335760.171153182 -30 ctime=1377632107.107509255 diff --git a/freetype/include/internal/PaxHeaders.18661/ftdebug.h b/freetype/include/internal/PaxHeaders.18661/ftdebug.h deleted file mode 100644 index 28cd5113..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftdebug.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.186152995 -30 ctime=1374498496.799306177 diff --git a/freetype/include/internal/PaxHeaders.18661/ftdriver.h b/freetype/include/internal/PaxHeaders.18661/ftdriver.h deleted file mode 100644 index b2af8f67..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftdriver.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.186152995 -30 ctime=1374498496.795306227 diff --git a/freetype/include/internal/PaxHeaders.18661/ftgloadr.h b/freetype/include/internal/PaxHeaders.18661/ftgloadr.h deleted file mode 100644 index f70cc091..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftgloadr.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.18815297 -30 ctime=1374498496.800306165 diff --git a/freetype/include/internal/PaxHeaders.18661/ftmemory.h b/freetype/include/internal/PaxHeaders.18661/ftmemory.h deleted file mode 100644 index e65fab2f..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftmemory.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.18815297 -30 ctime=1374498496.785306352 diff --git a/freetype/include/internal/PaxHeaders.18661/ftobjs.h b/freetype/include/internal/PaxHeaders.18661/ftobjs.h deleted file mode 100644 index d4c5e6bc..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftobjs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.189152957 -29 ctime=1374498496.81030604 diff --git a/freetype/include/internal/PaxHeaders.18661/ftpic.h b/freetype/include/internal/PaxHeaders.18661/ftpic.h deleted file mode 100644 index ed78d644..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftpic.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.19215292 -29 ctime=1374498496.80230614 diff --git a/freetype/include/internal/PaxHeaders.18661/ftrfork.h b/freetype/include/internal/PaxHeaders.18661/ftrfork.h deleted file mode 100644 index fe66d3a0..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftrfork.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.193152907 -30 ctime=1374498496.776306465 diff --git a/freetype/include/internal/PaxHeaders.18661/ftserv.h b/freetype/include/internal/PaxHeaders.18661/ftserv.h deleted file mode 100644 index 3695be17..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftserv.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255710.437818573 -30 atime=1385335759.775158133 -30 ctime=1384255710.437818573 diff --git a/freetype/include/internal/PaxHeaders.18661/ftstream.h b/freetype/include/internal/PaxHeaders.18661/ftstream.h deleted file mode 100644 index 465fb1e3..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftstream.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.195152882 -30 ctime=1374498496.812306015 diff --git a/freetype/include/internal/PaxHeaders.18661/fttrace.h b/freetype/include/internal/PaxHeaders.18661/fttrace.h deleted file mode 100644 index 5f398a62..00000000 --- a/freetype/include/internal/PaxHeaders.18661/fttrace.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.19615287 -30 ctime=1374498496.817305952 diff --git a/freetype/include/internal/PaxHeaders.18661/ftvalid.h b/freetype/include/internal/PaxHeaders.18661/ftvalid.h deleted file mode 100644 index d814b096..00000000 --- a/freetype/include/internal/PaxHeaders.18661/ftvalid.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.19615287 -30 ctime=1374498496.818305939 diff --git a/freetype/include/internal/PaxHeaders.18661/internal.h b/freetype/include/internal/PaxHeaders.18661/internal.h deleted file mode 100644 index 04f5bf77..00000000 --- a/freetype/include/internal/PaxHeaders.18661/internal.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255736.909487631 -30 atime=1385335759.777158108 -30 ctime=1384255736.909487631 diff --git a/freetype/include/internal/PaxHeaders.18661/psaux.h b/freetype/include/internal/PaxHeaders.18661/psaux.h deleted file mode 100644 index a954afdb..00000000 --- a/freetype/include/internal/PaxHeaders.18661/psaux.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.197152857 -30 ctime=1374498496.814305989 diff --git a/freetype/include/internal/PaxHeaders.18661/pshints.h b/freetype/include/internal/PaxHeaders.18661/pshints.h deleted file mode 100644 index 29838158..00000000 --- a/freetype/include/internal/PaxHeaders.18661/pshints.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.198152845 -30 ctime=1374498496.804306115 diff --git a/freetype/include/internal/PaxHeaders.18661/services b/freetype/include/internal/PaxHeaders.18661/services deleted file mode 100644 index c92f69da..00000000 --- a/freetype/include/internal/PaxHeaders.18661/services +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335772.870994412 -30 atime=1385335774.460974535 -30 ctime=1385335772.870994412 diff --git a/freetype/include/internal/PaxHeaders.18661/sfnt.h b/freetype/include/internal/PaxHeaders.18661/sfnt.h deleted file mode 100644 index 22deaf7d..00000000 --- a/freetype/include/internal/PaxHeaders.18661/sfnt.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.22015257 -29 ctime=1374498496.79030629 diff --git a/freetype/include/internal/PaxHeaders.18661/t1types.h b/freetype/include/internal/PaxHeaders.18661/t1types.h deleted file mode 100644 index ddf56277..00000000 --- a/freetype/include/internal/PaxHeaders.18661/t1types.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.222152545 -30 ctime=1374498496.816305964 diff --git a/freetype/include/internal/PaxHeaders.18661/tttypes.h b/freetype/include/internal/PaxHeaders.18661/tttypes.h deleted file mode 100644 index 34081ee2..00000000 --- a/freetype/include/internal/PaxHeaders.18661/tttypes.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377801696.725958008 -30 atime=1385335760.223152532 -30 ctime=1377801696.725958008 diff --git a/freetype/include/internal/ftcalc.h b/freetype/include/internal/ftcalc.h index 03bd68eb..14ec37b9 100644 --- a/freetype/include/internal/ftcalc.h +++ b/freetype/include/internal/ftcalc.h @@ -4,7 +4,7 @@ /* */ /* Arithmetic computations (specification). */ /* */ -/* Copyright 1996-2006, 2008, 2009, 2012-2013 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, */ @@ -27,37 +27,224 @@ FT_BEGIN_HEADER -#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 */ - - /*************************************************************************/ /* */ /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */ /* */ /*************************************************************************/ +#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( __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; + + + 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 + /*************************************************************************/ /* */ @@ -124,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, @@ -139,9 +327,31 @@ FT_BEGIN_HEADER /* * 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 @@ -152,6 +362,31 @@ FT_BEGIN_HEADER 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/freetype/include/internal/ftgloadr.h b/freetype/include/internal/ftgloadr.h index ce4dc6c9..f70774f7 100644 --- a/freetype/include/internal/ftgloadr.h +++ b/freetype/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_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_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_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/freetype/include/internal/ftobjs.h b/freetype/include/internal/ftobjs.h index 701c850e..b45a5ed8 100644 --- a/freetype/include/internal/ftobjs.h +++ b/freetype/include/internal/ftobjs.h @@ -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 ) @@ -82,14 +92,6 @@ FT_BEGIN_HEADER #define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 ) - /* - * 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 diff --git a/freetype/include/internal/ftrfork.h b/freetype/include/internal/ftrfork.h index 6307f2d0..d750cbef 100644 --- a/freetype/include/internal/ftrfork.h +++ b/freetype/include/internal/ftrfork.h @@ -4,7 +4,7 @@ /* */ /* Embedded resource forks accessor (specification). */ /* */ -/* Copyright 2004, 2006, 2007, 2012 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, */ @@ -94,7 +94,7 @@ FT_BEGIN_HEADER /* 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 ) \ + FT_Init_Table_ ## name( type* storage ) \ { \ type* local = storage; \ \ @@ -224,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'. */ @@ -246,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/freetype/include/internal/fttrace.h b/freetype/include/internal/fttrace.h index a9d98b60..d5253db7 100644 --- a/freetype/include/internal/fttrace.h +++ b/freetype/include/internal/fttrace.h @@ -4,7 +4,7 @@ /* */ /* Tracing handling (specification only). */ /* */ -/* Copyright 2002, 2004-2007, 2009, 2011-2013 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, */ @@ -148,5 +148,7 @@ FT_TRACE_DEF( afcjk ) FT_TRACE_DEF( aflatin ) FT_TRACE_DEF( aflatin2 ) FT_TRACE_DEF( afwarp ) +FT_TRACE_DEF( afharfbuzz ) +FT_TRACE_DEF( afglobal ) /* END */ diff --git a/freetype/include/internal/ftvalid.h b/freetype/include/internal/ftvalid.h index 12ad0368..c281b142 100644 --- a/freetype/include/internal/ftvalid.h +++ b/freetype/include/internal/ftvalid.h @@ -4,7 +4,7 @@ /* */ /* FreeType validation support (specification). */ /* */ -/* Copyright 2004, 2013 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, */ @@ -87,13 +87,13 @@ FT_BEGIN_HEADER /* 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 ) @@ -126,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/freetype/include/internal/pshints.h b/freetype/include/internal/pshints.h index 3fb18dc2..f05ea686 100644 --- a/freetype/include/internal/pshints.h +++ b/freetype/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-2003, 2005-2007, 2009, 2012 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, diff --git a/freetype/include/internal/services/PaxHeaders.18661/svbdf.h b/freetype/include/internal/services/PaxHeaders.18661/svbdf.h deleted file mode 100644 index b094032c..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svbdf.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.199152832 -30 ctime=1374498496.828305814 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svcid.h b/freetype/include/internal/services/PaxHeaders.18661/svcid.h deleted file mode 100644 index bb1e882f..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svcid.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.20015282 -30 ctime=1374498496.823305877 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svgldict.h b/freetype/include/internal/services/PaxHeaders.18661/svgldict.h deleted file mode 100644 index ce1c463e..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svgldict.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.20015282 -30 ctime=1374498496.822305889 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svgxval.h b/freetype/include/internal/services/PaxHeaders.18661/svgxval.h deleted file mode 100644 index fc45b2eb..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svgxval.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.20015282 -30 ctime=1374498496.833305752 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svkern.h b/freetype/include/internal/services/PaxHeaders.18661/svkern.h deleted file mode 100644 index d96fa28e..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svkern.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.213152657 -30 ctime=1374498496.837305702 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svmm.h b/freetype/include/internal/services/PaxHeaders.18661/svmm.h deleted file mode 100644 index 19a49774..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svmm.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.214152645 -30 ctime=1374498496.830305789 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svotval.h b/freetype/include/internal/services/PaxHeaders.18661/svotval.h deleted file mode 100644 index 3b3662c5..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svotval.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.214152645 -30 ctime=1374498496.824305864 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svpfr.h b/freetype/include/internal/services/PaxHeaders.18661/svpfr.h deleted file mode 100644 index 8466add4..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svpfr.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.215152632 -30 ctime=1374498496.840305664 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svpostnm.h b/freetype/include/internal/services/PaxHeaders.18661/svpostnm.h deleted file mode 100644 index 12d91d7c..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svpostnm.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.215152632 -30 ctime=1374498496.826305839 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svprop.h b/freetype/include/internal/services/PaxHeaders.18661/svprop.h deleted file mode 100644 index 5f13b964..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svprop.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.21615262 -30 ctime=1374498496.827305827 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svpscmap.h b/freetype/include/internal/services/PaxHeaders.18661/svpscmap.h deleted file mode 100644 index 42c84662..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svpscmap.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.217152607 -30 ctime=1374498496.832305764 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svpsinfo.h b/freetype/include/internal/services/PaxHeaders.18661/svpsinfo.h deleted file mode 100644 index efeed4aa..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svpsinfo.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.218152595 -30 ctime=1374498496.836305714 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svsfnt.h b/freetype/include/internal/services/PaxHeaders.18661/svsfnt.h deleted file mode 100644 index 5f7a99b3..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svsfnt.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.218152595 -30 ctime=1374498496.839305677 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svttcmap.h b/freetype/include/internal/services/PaxHeaders.18661/svttcmap.h deleted file mode 100644 index 80301c12..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svttcmap.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255772.590041563 -29 atime=1385335759.78415802 -30 ctime=1384255772.590041563 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svtteng.h b/freetype/include/internal/services/PaxHeaders.18661/svtteng.h deleted file mode 100644 index 911501dc..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svtteng.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.219152582 -30 ctime=1374498496.834305739 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svttglyf.h b/freetype/include/internal/services/PaxHeaders.18661/svttglyf.h deleted file mode 100644 index 77abe2b9..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svttglyf.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335760.219152582 -30 ctime=1374498496.829305802 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svwinfnt.h b/freetype/include/internal/services/PaxHeaders.18661/svwinfnt.h deleted file mode 100644 index 8307a71c..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svwinfnt.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.22015257 -30 ctime=1374498496.838305689 diff --git a/freetype/include/internal/services/PaxHeaders.18661/svxf86nm.h b/freetype/include/internal/services/PaxHeaders.18661/svxf86nm.h deleted file mode 100644 index 7c009b6e..00000000 --- a/freetype/include/internal/services/PaxHeaders.18661/svxf86nm.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335760.22015257 -30 ctime=1374498496.831305777 diff --git a/freetype/include/internal/sfnt.h b/freetype/include/internal/sfnt.h index 6b5e41f1..d558e869 100644 --- a/freetype/include/internal/sfnt.h +++ b/freetype/include/internal/sfnt.h @@ -4,7 +4,7 @@ /* */ /* High-level `sfnt' driver interface (specification). */ /* */ -/* Copyright 1996-2006, 2009, 2012-2013 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, */ @@ -405,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, diff --git a/freetype/include/internal/tttypes.h b/freetype/include/internal/tttypes.h index f4da3f95..ad302b87 100644 --- a/freetype/include/internal/tttypes.h +++ b/freetype/include/internal/tttypes.h @@ -1479,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/freetype/include/t1tables.h b/freetype/include/t1tables.h index a14255e5..61aefdd5 100644 --- a/freetype/include/t1tables.h +++ b/freetype/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/freetype/include/ttnameid.h b/freetype/include/ttnameid.h index 9711d1d9..e65b5581 100644 --- a/freetype/include/ttnameid.h +++ b/freetype/include/ttnameid.h @@ -4,7 +4,7 @@ /* */ /* TrueType name ID definitions (specification only). */ /* */ -/* Copyright 1996-2004, 2006-2008, 2012, 2013 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, */ @@ -470,26 +470,26 @@ FT_BEGIN_HEADER #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 */ @@ -507,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 @@ -520,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 @@ -600,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 @@ -633,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 @@ -650,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 \ @@ -693,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 @@ -732,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) */ @@ -758,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 @@ -783,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 diff --git a/freetype/include/tttables.h b/freetype/include/tttables.h index bb49dc0d..e1d8b05e 100644 --- a/freetype/include/tttables.h +++ b/freetype/include/tttables.h @@ -5,7 +5,7 @@ /* Basic SFNT/TrueType tables definitions and interface */ /* (specification only). */ /* */ -/* Copyright 1996-2005, 2008-2013 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 */ + /* */ /*************************************************************************/ @@ -559,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 /*************************************************************************/ @@ -611,7 +653,7 @@ FT_BEGIN_HEADER /* */ /* */ /* vert_header = */ - /* (TT_VertHeader*)FT_Get_Sfnt_Table( face, ft_sfnt_vhea ); */ + /* (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); */ /* } */ /* */ FT_EXPORT( void* ) diff --git a/freetype/include/ttunpat.h b/freetype/include/ttunpat.h index a0162759..bf53ddd5 100644 --- a/freetype/include/ttunpat.h +++ b/freetype/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/freetype/objs/PaxHeaders.18661/README b/freetype/objs/PaxHeaders.18661/README deleted file mode 100644 index 2d39af0d..00000000 --- a/freetype/objs/PaxHeaders.18661/README +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.756820815 -29 ctime=1374498498.07329025 diff --git a/freetype/src/PaxHeaders.18661/Jamfile b/freetype/src/PaxHeaders.18661/Jamfile deleted file mode 100644 index 335b3ccc..00000000 --- a/freetype/src/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255884.620640988 -30 atime=1385335760.282151794 -30 ctime=1384255884.620640988 diff --git a/freetype/src/PaxHeaders.18661/autofit b/freetype/src/PaxHeaders.18661/autofit deleted file mode 100644 index cabc6f5b..00000000 --- a/freetype/src/PaxHeaders.18661/autofit +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.530986161 -29 atime=1385335774.08297926 -30 ctime=1385335773.530986161 diff --git a/freetype/src/PaxHeaders.18661/base b/freetype/src/PaxHeaders.18661/base deleted file mode 100644 index 8a9ac8b9..00000000 --- a/freetype/src/PaxHeaders.18661/base +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.747983448 -30 atime=1385335774.870969409 -30 ctime=1385335773.747983448 diff --git a/freetype/src/PaxHeaders.18661/bdf b/freetype/src/PaxHeaders.18661/bdf deleted file mode 100644 index 0499a480..00000000 --- a/freetype/src/PaxHeaders.18661/bdf +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335772.982993012 -30 atime=1385335774.083979248 -30 ctime=1385335772.982993012 diff --git a/freetype/src/PaxHeaders.18661/bzip2 b/freetype/src/PaxHeaders.18661/bzip2 deleted file mode 100644 index 01163011..00000000 --- a/freetype/src/PaxHeaders.18661/bzip2 +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.456987086 -30 atime=1385335774.079979298 -30 ctime=1385335773.456987086 diff --git a/freetype/src/PaxHeaders.18661/cache b/freetype/src/PaxHeaders.18661/cache deleted file mode 100644 index 6736225d..00000000 --- a/freetype/src/PaxHeaders.18661/cache +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.451987149 -30 atime=1385335774.080979285 -30 ctime=1385335773.451987149 diff --git a/freetype/src/PaxHeaders.18661/cff b/freetype/src/PaxHeaders.18661/cff deleted file mode 100644 index 8bbb875d..00000000 --- a/freetype/src/PaxHeaders.18661/cff +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.353988374 -30 atime=1385335774.087979198 -30 ctime=1385335773.353988374 diff --git a/freetype/src/PaxHeaders.18661/cid b/freetype/src/PaxHeaders.18661/cid deleted file mode 100644 index 33244f02..00000000 --- a/freetype/src/PaxHeaders.18661/cid +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.088991687 -29 atime=1385335774.08697921 -30 ctime=1385335773.088991687 diff --git a/freetype/src/PaxHeaders.18661/gxvalid b/freetype/src/PaxHeaders.18661/gxvalid deleted file mode 100644 index 8488ac3f..00000000 --- a/freetype/src/PaxHeaders.18661/gxvalid +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.205990224 -30 atime=1385335784.963843231 -30 ctime=1385335773.205990224 diff --git a/freetype/src/PaxHeaders.18661/gzip b/freetype/src/PaxHeaders.18661/gzip deleted file mode 100644 index a3af7edf..00000000 --- a/freetype/src/PaxHeaders.18661/gzip +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.569985674 -30 atime=1385335774.080979285 -30 ctime=1385335773.569985674 diff --git a/freetype/src/PaxHeaders.18661/lzw b/freetype/src/PaxHeaders.18661/lzw deleted file mode 100644 index df54faff..00000000 --- a/freetype/src/PaxHeaders.18661/lzw +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.580985536 -30 atime=1385335774.079979298 -30 ctime=1385335773.580985536 diff --git a/freetype/src/PaxHeaders.18661/otvalid b/freetype/src/PaxHeaders.18661/otvalid deleted file mode 100644 index 395f485d..00000000 --- a/freetype/src/PaxHeaders.18661/otvalid +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.235989849 -30 atime=1385335785.085841706 -30 ctime=1385335773.235989849 diff --git a/freetype/src/PaxHeaders.18661/pcf b/freetype/src/PaxHeaders.18661/pcf deleted file mode 100644 index c23e2d8a..00000000 --- a/freetype/src/PaxHeaders.18661/pcf +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.416987586 -30 atime=1385335774.083979248 -30 ctime=1385335773.416987586 diff --git a/freetype/src/PaxHeaders.18661/pfr b/freetype/src/PaxHeaders.18661/pfr deleted file mode 100644 index 0f038aa0..00000000 --- a/freetype/src/PaxHeaders.18661/pfr +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.392987886 -30 atime=1385335774.085979223 -30 ctime=1385335773.392987886 diff --git a/freetype/src/PaxHeaders.18661/psaux b/freetype/src/PaxHeaders.18661/psaux deleted file mode 100644 index 5976dad6..00000000 --- a/freetype/src/PaxHeaders.18661/psaux +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.051992149 -29 atime=1385335774.07897931 -30 ctime=1385335773.051992149 diff --git a/freetype/src/PaxHeaders.18661/pshinter b/freetype/src/PaxHeaders.18661/pshinter deleted file mode 100644 index bb997b34..00000000 --- a/freetype/src/PaxHeaders.18661/pshinter +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.021992524 -29 atime=1385335774.08297926 -30 ctime=1385335773.021992524 diff --git a/freetype/src/PaxHeaders.18661/psnames b/freetype/src/PaxHeaders.18661/psnames deleted file mode 100644 index 5ba8505a..00000000 --- a/freetype/src/PaxHeaders.18661/psnames +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.808982686 -30 atime=1385335774.077979323 -30 ctime=1385335773.808982686 diff --git a/freetype/src/PaxHeaders.18661/raster b/freetype/src/PaxHeaders.18661/raster deleted file mode 100644 index 53356a77..00000000 --- a/freetype/src/PaxHeaders.18661/raster +++ /dev/null @@ -1,3 +0,0 @@ -28 mtime=1385335772.9599933 -30 atime=1385335774.081979273 -28 ctime=1385335772.9599933 diff --git a/freetype/src/PaxHeaders.18661/sfnt b/freetype/src/PaxHeaders.18661/sfnt deleted file mode 100644 index 39aff987..00000000 --- a/freetype/src/PaxHeaders.18661/sfnt +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.139991049 -30 atime=1385335774.083979248 -30 ctime=1385335773.139991049 diff --git a/freetype/src/PaxHeaders.18661/smooth b/freetype/src/PaxHeaders.18661/smooth deleted file mode 100644 index cfa6bbc4..00000000 --- a/freetype/src/PaxHeaders.18661/smooth +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.601985274 -30 atime=1385335774.081979273 -30 ctime=1385335773.601985274 diff --git a/freetype/src/PaxHeaders.18661/tools b/freetype/src/PaxHeaders.18661/tools deleted file mode 100644 index 8b2dcccf..00000000 --- a/freetype/src/PaxHeaders.18661/tools +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.275989349 -30 atime=1385335785.125841206 -30 ctime=1385335773.275989349 diff --git a/freetype/src/PaxHeaders.18661/truetype b/freetype/src/PaxHeaders.18661/truetype deleted file mode 100644 index b7c1bd25..00000000 --- a/freetype/src/PaxHeaders.18661/truetype +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.639984799 -30 atime=1385335774.088979185 -30 ctime=1385335773.639984799 diff --git a/freetype/src/PaxHeaders.18661/type1 b/freetype/src/PaxHeaders.18661/type1 deleted file mode 100644 index 63534076..00000000 --- a/freetype/src/PaxHeaders.18661/type1 +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.790982911 -30 atime=1385335774.087979198 -30 ctime=1385335773.790982911 diff --git a/freetype/src/PaxHeaders.18661/type42 b/freetype/src/PaxHeaders.18661/type42 deleted file mode 100644 index ed5147e1..00000000 --- a/freetype/src/PaxHeaders.18661/type42 +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.664984486 -30 atime=1385335774.084979235 -30 ctime=1385335773.664984486 diff --git a/freetype/src/PaxHeaders.18661/winfonts b/freetype/src/PaxHeaders.18661/winfonts deleted file mode 100644 index 67293a9e..00000000 --- a/freetype/src/PaxHeaders.18661/winfonts +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335772.994992862 -30 atime=1385335774.084979235 -30 ctime=1385335772.994992862 diff --git a/freetype/src/autofit/PaxHeaders.18661/Jamfile b/freetype/src/autofit/PaxHeaders.18661/Jamfile deleted file mode 100644 index 937be7ae..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.806832692 -30 ctime=1374498496.503309877 diff --git a/freetype/src/autofit/PaxHeaders.18661/afangles.c b/freetype/src/autofit/PaxHeaders.18661/afangles.c deleted file mode 100644 index 3030dbd3..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afangles.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.803832729 -30 ctime=1374498496.491310028 diff --git a/freetype/src/autofit/PaxHeaders.18661/afangles.h b/freetype/src/autofit/PaxHeaders.18661/afangles.h deleted file mode 100644 index 292597ab..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afangles.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.907831429 -29 ctime=1374498496.49031004 diff --git a/freetype/src/autofit/PaxHeaders.18661/afblue.c b/freetype/src/autofit/PaxHeaders.18661/afblue.c deleted file mode 100644 index ebe439d5..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afblue.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382211920.982393921 -30 atime=1385335785.842832242 -30 ctime=1382211920.982393921 diff --git a/freetype/src/autofit/PaxHeaders.18661/afblue.cin b/freetype/src/autofit/PaxHeaders.18661/afblue.cin deleted file mode 100644 index 462b2358..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afblue.cin +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377704466.751139782 -30 atime=1385335785.921831254 -30 ctime=1377704466.767139582 diff --git a/freetype/src/autofit/PaxHeaders.18661/afblue.dat b/freetype/src/autofit/PaxHeaders.18661/afblue.dat deleted file mode 100644 index 9443a025..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afblue.dat +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382211600.478400773 -30 atime=1385335785.558835792 -30 ctime=1382211600.478400773 diff --git a/freetype/src/autofit/PaxHeaders.18661/afblue.h b/freetype/src/autofit/PaxHeaders.18661/afblue.h deleted file mode 100644 index 98b1f3ea..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afblue.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382211928.233303273 -30 atime=1385335785.852832117 -30 ctime=1382211928.233303273 diff --git a/freetype/src/autofit/PaxHeaders.18661/afblue.hin b/freetype/src/autofit/PaxHeaders.18661/afblue.hin deleted file mode 100644 index b832d043..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afblue.hin +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382211613.254241053 -29 atime=1385335785.73183363 -30 ctime=1382211613.254241053 diff --git a/freetype/src/autofit/PaxHeaders.18661/afcjk.c b/freetype/src/autofit/PaxHeaders.18661/afcjk.c deleted file mode 100644 index a2399cbb..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afcjk.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1379966645.342287229 -30 atime=1385335785.850832142 -30 ctime=1379966645.342287229 diff --git a/freetype/src/autofit/PaxHeaders.18661/afcjk.h b/freetype/src/autofit/PaxHeaders.18661/afcjk.h deleted file mode 100644 index ea79d2cd..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afcjk.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377439999.223222265 -30 atime=1385335785.857832054 -30 ctime=1377439999.223222265 diff --git a/freetype/src/autofit/PaxHeaders.18661/afdummy.c b/freetype/src/autofit/PaxHeaders.18661/afdummy.c deleted file mode 100644 index a2f06665..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afdummy.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1379859349.853547503 -30 atime=1385335785.842832242 -30 ctime=1379859349.853547503 diff --git a/freetype/src/autofit/PaxHeaders.18661/afdummy.h b/freetype/src/autofit/PaxHeaders.18661/afdummy.h deleted file mode 100644 index 599bde86..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afdummy.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375304393.063322008 -30 atime=1385335785.843832229 -30 ctime=1375304393.063322008 diff --git a/freetype/src/autofit/PaxHeaders.18661/aferrors.h b/freetype/src/autofit/PaxHeaders.18661/aferrors.h deleted file mode 100644 index f40df9e5..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/aferrors.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.806832692 -30 ctime=1374498496.507309827 diff --git a/freetype/src/autofit/PaxHeaders.18661/afglobal.c b/freetype/src/autofit/PaxHeaders.18661/afglobal.c deleted file mode 100644 index e3714878..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afglobal.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1381996950.949006809 -30 atime=1385335785.698834042 -30 ctime=1381996950.949006809 diff --git a/freetype/src/autofit/PaxHeaders.18661/afglobal.h b/freetype/src/autofit/PaxHeaders.18661/afglobal.h deleted file mode 100644 index 974f1368..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afglobal.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377620600.683359352 -30 atime=1385335785.576835567 -30 ctime=1377620600.683359352 diff --git a/freetype/src/autofit/PaxHeaders.18661/afhints.c b/freetype/src/autofit/PaxHeaders.18661/afhints.c deleted file mode 100644 index 27a5dab8..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afhints.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375700809.975347811 -30 atime=1385335785.826832442 -30 ctime=1375700809.975347811 diff --git a/freetype/src/autofit/PaxHeaders.18661/afhints.h b/freetype/src/autofit/PaxHeaders.18661/afhints.h deleted file mode 100644 index f4c65f09..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afhints.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375642144.946284475 -29 atime=1385335785.59183538 -30 ctime=1375642144.946284475 diff --git a/freetype/src/autofit/PaxHeaders.18661/afindic.c b/freetype/src/autofit/PaxHeaders.18661/afindic.c deleted file mode 100644 index e9873c6b..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afindic.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1379859349.855547478 -30 atime=1385335785.549835905 -30 ctime=1379859349.855547478 diff --git a/freetype/src/autofit/PaxHeaders.18661/afindic.h b/freetype/src/autofit/PaxHeaders.18661/afindic.h deleted file mode 100644 index fc4732b6..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afindic.h +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1375304393.06632197 -30 atime=1385335785.761833255 -29 ctime=1375304393.06632197 diff --git a/freetype/src/autofit/PaxHeaders.18661/aflatin.c b/freetype/src/autofit/PaxHeaders.18661/aflatin.c deleted file mode 100644 index 84588ef7..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/aflatin.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382211672.084505573 -30 atime=1385335785.528836167 -30 ctime=1382211672.084505573 diff --git a/freetype/src/autofit/PaxHeaders.18661/aflatin.h b/freetype/src/autofit/PaxHeaders.18661/aflatin.h deleted file mode 100644 index 0017f1de..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/aflatin.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382211661.298640415 -30 atime=1385335785.922831242 -30 ctime=1382211661.298640415 diff --git a/freetype/src/autofit/PaxHeaders.18661/aflatin2.c b/freetype/src/autofit/PaxHeaders.18661/aflatin2.c deleted file mode 100644 index 8ee8b5c4..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/aflatin2.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1382211757.961431964 -30 atime=1385335785.729833655 -30 ctime=1382211757.961431964 diff --git a/freetype/src/autofit/PaxHeaders.18661/aflatin2.h b/freetype/src/autofit/PaxHeaders.18661/aflatin2.h deleted file mode 100644 index 4a37cff3..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/aflatin2.h +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1375304393.07832182 -30 atime=1385335785.877831804 -29 ctime=1375304393.07832182 diff --git a/freetype/src/autofit/PaxHeaders.18661/afloader.c b/freetype/src/autofit/PaxHeaders.18661/afloader.c deleted file mode 100644 index 02459146..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afloader.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375436029.754509538 -30 atime=1385335785.774833092 -30 ctime=1375436029.754509538 diff --git a/freetype/src/autofit/PaxHeaders.18661/afloader.h b/freetype/src/autofit/PaxHeaders.18661/afloader.h deleted file mode 100644 index db082a3b..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afloader.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.716833817 -30 ctime=1374498496.532309515 diff --git a/freetype/src/autofit/PaxHeaders.18661/afmodule.c b/freetype/src/autofit/PaxHeaders.18661/afmodule.c deleted file mode 100644 index 5f79a427..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afmodule.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.784832967 -30 ctime=1374498496.528309565 diff --git a/freetype/src/autofit/PaxHeaders.18661/afmodule.h b/freetype/src/autofit/PaxHeaders.18661/afmodule.h deleted file mode 100644 index 88622119..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afmodule.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.816832567 -30 ctime=1374498496.527309577 diff --git a/freetype/src/autofit/PaxHeaders.18661/afpic.c b/freetype/src/autofit/PaxHeaders.18661/afpic.c deleted file mode 100644 index 7fb3ceb8..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afpic.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1381997023.395101108 -30 atime=1385335785.893831604 -30 ctime=1381997023.395101108 diff --git a/freetype/src/autofit/PaxHeaders.18661/afpic.h b/freetype/src/autofit/PaxHeaders.18661/afpic.h deleted file mode 100644 index 9e97ac4c..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afpic.h +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1375466744.48552256 -30 atime=1385335785.784832967 -29 ctime=1375466744.48552256 diff --git a/freetype/src/autofit/PaxHeaders.18661/afscript.h b/freetype/src/autofit/PaxHeaders.18661/afscript.h deleted file mode 100644 index b994d7a1..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afscript.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1381997108.525036837 -30 atime=1385335785.816832567 -30 ctime=1381997108.525036837 diff --git a/freetype/src/autofit/PaxHeaders.18661/aftypes.h b/freetype/src/autofit/PaxHeaders.18661/aftypes.h deleted file mode 100644 index e9d25673..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/aftypes.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1381996814.868708047 -29 atime=1385335785.73183363 -30 ctime=1381996814.868708047 diff --git a/freetype/src/autofit/PaxHeaders.18661/afwarp.c b/freetype/src/autofit/PaxHeaders.18661/afwarp.c deleted file mode 100644 index b4c9c12e..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afwarp.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.907831429 -29 ctime=1374498496.53830944 diff --git a/freetype/src/autofit/PaxHeaders.18661/afwarp.h b/freetype/src/autofit/PaxHeaders.18661/afwarp.h deleted file mode 100644 index 7b6801a5..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afwarp.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.816832567 -30 ctime=1374498496.531309527 diff --git a/freetype/src/autofit/PaxHeaders.18661/afwrtsys.h b/freetype/src/autofit/PaxHeaders.18661/afwrtsys.h deleted file mode 100644 index 5afc2351..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/afwrtsys.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375457090.710211359 -30 atime=1385335785.672834367 -30 ctime=1375457090.710211359 diff --git a/freetype/src/autofit/PaxHeaders.18661/autofit.c b/freetype/src/autofit/PaxHeaders.18661/autofit.c deleted file mode 100644 index dea04abb..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/autofit.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377411423.001474199 -30 atime=1385335785.656834567 -30 ctime=1377411423.019473974 diff --git a/freetype/src/autofit/PaxHeaders.18661/module.mk b/freetype/src/autofit/PaxHeaders.18661/module.mk deleted file mode 100644 index 9d9d441b..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.184003001 -29 ctime=1374498496.49830994 diff --git a/freetype/src/autofit/PaxHeaders.18661/rules.mk b/freetype/src/autofit/PaxHeaders.18661/rules.mk deleted file mode 100644 index 8035bb8f..00000000 --- a/freetype/src/autofit/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377411423.002474186 -30 atime=1385335774.571973147 -30 ctime=1377411423.020473961 diff --git a/freetype/src/autofit/afangles.c b/freetype/src/autofit/afangles.c index b44a5ba2..f8b095be 100644 --- a/freetype/src/autofit/afangles.c +++ b/freetype/src/autofit/afangles.c @@ -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... diff --git a/freetype/src/autofit/afblue.c b/freetype/src/autofit/afblue.c index 22ef6d5a..811226ea 100644 --- a/freetype/src/autofit/afblue.c +++ b/freetype/src/autofit/afblue.c @@ -26,15 +26,21 @@ af_blue_strings[] = { /* */ - 'T', 'H', 'E', 'Z', 'O', 'C', 'Q', 'S', /* THEZOCQS */ + '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\x9F', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕПЗОСЭ */ '\0', - 'H', 'E', 'Z', 'L', 'O', 'C', 'U', 'S', /* HEZLOCUS */ + '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\xA8', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕШЗОСЭ */ '\0', - 'f', 'i', 'j', 'k', 'd', 'b', 'h', /* fijkdbh */ + '\xD1', '\x85', '\xD0', '\xBF', '\xD0', '\xBD', '\xD1', '\x88', '\xD0', '\xB5', '\xD0', '\xB7', '\xD0', '\xBE', '\xD1', '\x81', /* хпншезос */ '\0', - 'x', 'z', 'r', 'o', 'e', 's', 'c', /* xzroesc */ + '\xD1', '\x80', '\xD1', '\x83', '\xD1', '\x84', /* руф */ '\0', - 'p', 'q', 'g', 'j', 'y', /* pqgjy */ + '\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', @@ -46,26 +52,31 @@ '\0', '\xCE', '\xB2', '\xCE', '\xB3', '\xCE', '\xB7', '\xCE', '\xBC', '\xCF', '\x81', '\xCF', '\x86', '\xCF', '\x87', '\xCF', '\x88', /* βγημρφχψ */ '\0', - '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\x9F', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕПЗОСЭ */ - '\0', - '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\xA8', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕШЗОСЭ */ - '\0', - '\xD1', '\x85', '\xD0', '\xBF', '\xD0', '\xBD', '\xD1', '\x88', '\xD0', '\xB5', '\xD0', '\xB7', '\xD0', '\xBE', '\xD1', '\x81', /* хпншезос */ - '\0', - '\xD1', '\x80', '\xD1', '\x83', '\xD1', '\x84', /* руф */ - '\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', /* 齊 */ - '\0', + '\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', /* 軍那配里開雷露面 */ @@ -74,8 +85,7 @@ '\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', /* 说 */ - '\0', + '\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', /* 过还进進過道還里 */ @@ -85,8 +95,7 @@ '\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', /* 通 */ - '\0', + '\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', /* 间际陈限除陳随際 */ @@ -95,8 +104,7 @@ '\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', /* 起 */ - '\0', + '\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', /* 种調调費费那都間 */ @@ -108,19 +116,26 @@ }; - /* stringsets are specific to scripts */ + /* stringsets are specific to styles */ FT_LOCAL_ARRAY_DEF( AF_Blue_StringRec ) af_blue_stringsets[] = { /* */ - { 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_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 }, @@ -129,35 +144,31 @@ { AF_BLUE_STRING_GREEK_SMALL, 0 }, { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_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_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_FILL, AF_BLUE_PROPERTY_CJK_TOP | - AF_BLUE_PROPERTY_CJK_FILL }, - { AF_BLUE_STRING_CJK_TOP_UNFILL, AF_BLUE_PROPERTY_CJK_TOP }, - { AF_BLUE_STRING_CJK_BOTTOM_FILL, AF_BLUE_PROPERTY_CJK_FILL }, - { AF_BLUE_STRING_CJK_BOTTOM_UNFILL, 0 }, + { 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_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | - AF_BLUE_PROPERTY_CJK_FILL }, - { AF_BLUE_STRING_CJK_LEFT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ }, - { AF_BLUE_STRING_CJK_RIGHT_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | - AF_BLUE_PROPERTY_CJK_RIGHT | - AF_BLUE_PROPERTY_CJK_FILL }, - { AF_BLUE_STRING_CJK_RIGHT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ | - AF_BLUE_PROPERTY_CJK_RIGHT }, + { 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 }, + { AF_BLUE_STRING_MAX, 0 }, #endif /* AF_CONFIG_OPTION_CJK */ }; diff --git a/freetype/src/autofit/afblue.cin b/freetype/src/autofit/afblue.cin index c693d89f..c6762bec 100644 --- a/freetype/src/autofit/afblue.cin +++ b/freetype/src/autofit/afblue.cin @@ -27,7 +27,7 @@ }; - /* stringsets are specific to scripts */ + /* stringsets are specific to styles */ FT_LOCAL_ARRAY_DEF( AF_Blue_StringRec ) af_blue_stringsets[] = { diff --git a/freetype/src/autofit/afblue.dat b/freetype/src/autofit/afblue.dat index d488f3fa..3f98c13b 100644 --- a/freetype/src/autofit/afblue.dat +++ b/freetype/src/autofit/afblue.dat @@ -2,7 +2,7 @@ // // Auto-fitter data for blue strings. // -// Copyright 2013 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, @@ -34,11 +34,11 @@ // 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. 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. +// 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 @@ -63,18 +63,32 @@ // 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_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" + 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 "ΓΒΕΖΘΟΩ" @@ -87,15 +101,6 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: AF_BLUE_STRING_GREEK_SMALL_DESCENDER "βγημρφχψ" - AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP - "БВЕПЗОСЭ" - AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM - "БВЕШЗОСЭ" - AF_BLUE_STRING_CYRILLIC_SMALL - "хпншезос" - AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER - "руф" - AF_BLUE_STRING_HEBREW_TOP "בדהחךכםס" AF_BLUE_STRING_HEBREW_BOTTOM @@ -103,24 +108,41 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: 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_FILL + AF_BLUE_STRING_CJK_TOP "他们你來們到和地" "对對就席我时時會" "来為能舰說说这這" - "齊" - AF_BLUE_STRING_CJK_TOP_UNFILL + "齊 |" "军同已愿既星是景" "民照现現理用置要" "軍那配里開雷露面" "顾" - AF_BLUE_STRING_CJK_BOTTOM_FILL + AF_BLUE_STRING_CJK_BOTTOM "个为人他以们你來" "個們到和大对對就" "我时時有来為要說" - "说" - AF_BLUE_STRING_CJK_BOTTOM_UNFILL + "说 |" "主些因它想意理生" "當看着置者自著裡" "过还进進過道還里" @@ -128,22 +150,20 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - AF_BLUE_STRING_CJK_LEFT_FILL + AF_BLUE_STRING_CJK_LEFT "些们你來們到和地" "她将將就年得情最" "样樣理能說说这這" - "通" - AF_BLUE_STRING_CJK_LEFT_UNFILL + "通 |" "即吗吧听呢品响嗎" "师師收断斷明眼間" "间际陈限除陳随際" "隨" - AF_BLUE_STRING_CJK_RIGHT_FILL + AF_BLUE_STRING_CJK_RIGHT "事前學将將情想或" "政斯新样樣民沒没" "然特现現球第經谁" - "起" - AF_BLUE_STRING_CJK_RIGHT_UNFILL + "起 |" "例別别制动動吗嗎" "增指明朝期构物确" "种調调費费那都間" @@ -154,17 +174,118 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: #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_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_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 } @@ -176,15 +297,6 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 } { AF_BLUE_STRING_MAX, 0 } - AF_BLUE_STRINGSET_CYRL - { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 } - { 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_HEBR { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP | AF_BLUE_PROPERTY_LATIN_LONG } @@ -192,25 +304,32 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: { AF_BLUE_STRING_HEBREW_DESCENDER, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_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_FILL, AF_BLUE_PROPERTY_CJK_TOP | - AF_BLUE_PROPERTY_CJK_FILL } - { AF_BLUE_STRING_CJK_TOP_UNFILL, AF_BLUE_PROPERTY_CJK_TOP } - { AF_BLUE_STRING_CJK_BOTTOM_FILL, AF_BLUE_PROPERTY_CJK_FILL } - { AF_BLUE_STRING_CJK_BOTTOM_UNFILL, 0 } + { 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_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | - AF_BLUE_PROPERTY_CJK_FILL } - { AF_BLUE_STRING_CJK_LEFT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ } - { AF_BLUE_STRING_CJK_RIGHT_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | - AF_BLUE_PROPERTY_CJK_RIGHT | - AF_BLUE_PROPERTY_CJK_FILL } - { AF_BLUE_STRING_CJK_RIGHT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ | - AF_BLUE_PROPERTY_CJK_RIGHT } + { 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 } + { AF_BLUE_STRING_MAX, 0 } #endif /* AF_CONFIG_OPTION_CJK */ diff --git a/freetype/src/autofit/afblue.h b/freetype/src/autofit/afblue.h index 86a36491..a8618419 100644 --- a/freetype/src/autofit/afblue.h +++ b/freetype/src/autofit/afblue.h @@ -7,7 +7,7 @@ /* */ /* Auto-fitter data for blue strings (specification). */ /* */ -/* Copyright 2013 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, */ @@ -67,49 +67,51 @@ FT_BEGIN_HEADER /* At the bottommost level, we define strings for finding blue zones. */ -#define AF_BLUE_STRING_MAX_LEN 25 +#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_LATIN_CAPITAL_TOP = 0, - AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 9, - AF_BLUE_STRING_LATIN_SMALL_F_TOP = 18, - AF_BLUE_STRING_LATIN_SMALL = 26, - AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 34, - AF_BLUE_STRING_GREEK_CAPITAL_TOP = 40, - AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 55, - AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 68, - AF_BLUE_STRING_GREEK_SMALL = 81, - AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 98, - AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 115, - AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 132, - AF_BLUE_STRING_CYRILLIC_SMALL = 149, - AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 166, - AF_BLUE_STRING_HEBREW_TOP = 173, - AF_BLUE_STRING_HEBREW_BOTTOM = 190, - AF_BLUE_STRING_HEBREW_DESCENDER = 203, - af_blue_1_1 = 213, + 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_FILL = af_blue_1_1 + 1, - AF_BLUE_STRING_CJK_TOP_UNFILL = af_blue_1_1 + 77, - AF_BLUE_STRING_CJK_BOTTOM_FILL = af_blue_1_1 + 153, - AF_BLUE_STRING_CJK_BOTTOM_UNFILL = af_blue_1_1 + 229, + 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_FILL = af_blue_1_1_1 + 1, - AF_BLUE_STRING_CJK_LEFT_UNFILL = af_blue_1_1_1 + 77, - AF_BLUE_STRING_CJK_RIGHT_FILL = af_blue_1_1_1 + 153, - AF_BLUE_STRING_CJK_RIGHT_UNFILL = af_blue_1_1_1 + 229, - af_blue_1_2_1 = af_blue_1_1_1 + 304, + 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_2_1 = af_blue_1_1_1 + 0, + 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_2_1 + 0, + af_blue_1_2 = af_blue_1_1_2 + 0, #else - af_blue_1_2 = af_blue_1_2_1 + 0, + af_blue_1_2 = af_blue_1_1 + 0, #endif /* AF_CONFIG_OPTION_CJK */ @@ -130,45 +132,47 @@ FT_BEGIN_HEADER /*************************************************************************/ /*************************************************************************/ - /* The next level is to group blue strings into script-specific sets. */ + /* 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 ) -#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 1 ) -#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 2 ) +#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_HORIZ ( 1 << 0 ) -#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 1 ) -#define AF_BLUE_PROPERTY_CJK_FILL ( 1 << 2 ) +#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 9 +#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_LATN = 0, - AF_BLUE_STRINGSET_GREK = 7, - AF_BLUE_STRINGSET_CYRL = 14, - AF_BLUE_STRINGSET_HEBR = 20, - af_blue_2_1 = 24, + 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 + 4, + af_blue_2_1_1 = af_blue_2_1 + 2, #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - af_blue_2_2_1 = af_blue_2_1_1 + 4, + af_blue_2_1_2 = af_blue_2_1_1 + 2, #else - af_blue_2_2_1 = af_blue_2_1_1 + 0, + 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_2_1 + 1, + af_blue_2_2 = af_blue_2_1_2 + 1, #else - af_blue_2_2 = af_blue_2_2_1 + 0, + af_blue_2_2 = af_blue_2_1 + 0, #endif /* AF_CONFIG_OPTION_CJK */ diff --git a/freetype/src/autofit/afblue.hin b/freetype/src/autofit/afblue.hin index 00282c3b..0b4b48d7 100644 --- a/freetype/src/autofit/afblue.hin +++ b/freetype/src/autofit/afblue.hin @@ -4,7 +4,7 @@ /* */ /* Auto-fitter data for blue strings (specification). */ /* */ -/* Copyright 2013 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, */ @@ -90,19 +90,19 @@ FT_BEGIN_HEADER /*************************************************************************/ /*************************************************************************/ - /* The next level is to group blue strings into script-specific sets. */ + /* 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 ) -#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 1 ) -#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 2 ) +#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_HORIZ ( 1 << 0 ) -#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 1 ) -#define AF_BLUE_PROPERTY_CJK_FILL ( 1 << 2 ) +#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 diff --git a/freetype/src/autofit/afcjk.c b/freetype/src/autofit/afcjk.c index 7a6f8355..048e0e7d 100644 --- a/freetype/src/autofit/afcjk.c +++ b/freetype/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-2013 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, */ @@ -27,6 +27,7 @@ #include FT_INTERNAL_DEBUG_H #include "afglobal.h" +#include "afpic.h" #include "aflatin.h" @@ -74,10 +75,10 @@ FT_TRACE5(( "\n" - "cjk standard widths computation (script `%s')\n" - "===============================================\n" + "cjk standard widths computation (style `%s')\n" + "===================================================\n" "\n", - af_script_names[metrics->root.script_class->script] )); + af_style_names[metrics->root.style_class->style] )); af_glyph_hints_init( hints, face->memory ); @@ -86,20 +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, - metrics->root.script_class->standard_char ); - 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", - metrics->root.script_class->standard_char, glyph_index )); + standard_char, glyph_index )); error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); if ( error || face->glyph->outline.n_points <= 0 ) @@ -118,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 ) @@ -138,6 +178,8 @@ goto Exit; af_latin_hints_link_segments( hints, + 0, + NULL, (AF_Dimension)dim ); seg = axhints->segments; @@ -221,34 +263,22 @@ FT_Int num_fills; FT_Int num_flats; + FT_Bool fill; + AF_CJKBlue blue; FT_Error error; AF_CJKAxis axis; FT_Outline outline; - AF_Blue_Stringset bss = metrics->root.script_class->blue_stringset; + AF_StyleClass sc = metrics->root.style_class; + + AF_Blue_Stringset bss = sc->blue_stringset; const AF_Blue_StringRec* bs = &af_blue_stringsets[bss]; -#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 */ - }; - FT_String* cjk_blue_type_name[2] = - { - (FT_String*)"unfilled", /* -- */ - (FT_String*)"filled" /* FILL */ - }; -#endif - - - /* we walk over the blue character strings as specified in the */ - /* script's entry in the `af_blue_stringset' array, computing its */ - /* extremum points (depending on the string properties) */ + /* 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) */ FT_TRACE5(( "cjk blue zones computation\n" "==========================\n" @@ -266,20 +296,35 @@ else axis = &metrics->axis[AF_DIMENSION_VERT]; - FT_TRACE5(( "blue zone %d:\n", axis->blue_count )); +#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 */ + }; + + + 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; - FT_TRACE5(( " cjk blue %s/%s\n", - cjk_blue_name[AF_CJK_IS_HORIZ_BLUE( bs ) | - AF_CJK_IS_TOP_BLUE( bs ) ], - cjk_blue_type_name[!!AF_CJK_IS_FILLED_BLUE( bs )] )); + fill = 1; /* start with characters that define fill values */ + FT_TRACE5(( " [overshoot values]\n" )); while ( *p ) { FT_ULong ch; - FT_UInt glyph_index; + 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; @@ -287,8 +332,16 @@ GET_UTF8_CHAR( ch, p ); + /* switch to characters that define flat values */ + if ( ch == '|' ) + { + fill = 0; + FT_TRACE5(( " [reference values]\n" )); + continue; + } + /* load the character in the face -- skip unknown or empty ones */ - glyph_index = FT_Get_Char_Index( face, ch ); + af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset ); if ( glyph_index == 0 ) { FT_TRACE5(( " U+%04lX unavailable\n", ch )); @@ -374,7 +427,7 @@ FT_TRACE5(( " U+%04lX: best_pos = %5ld\n", ch, best_pos )); } - if ( AF_CJK_IS_FILLED_BLUE( bs ) ) + if ( fill ) fills[num_fills++] = best_pos; else flats[num_flats++] = best_pos; @@ -386,15 +439,15 @@ * 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 zone -- */ - /* 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 ); blue = &axis->blues[axis->blue_count]; blue_ref = &blue->ref.org; @@ -433,7 +486,7 @@ *blue_ref = *blue_shoot = ( shoot + ref ) / 2; - FT_TRACE5(( " [overshoot smaller than reference," + FT_TRACE5(( " [reference smaller than overshoot," " taking mean value]\n" )); } } @@ -467,10 +520,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; @@ -711,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; @@ -974,10 +1024,11 @@ edge->first = seg; edge->last = seg; - edge->fpos = seg->pos; - edge->opos = edge->pos = FT_MulFix( seg->pos, scale ); - seg->edge_next = seg; edge->dir = seg->dir; + edge->fpos = seg->pos; + edge->opos = FT_MulFix( seg->pos, scale ); + edge->pos = edge->opos; + seg->edge_next = seg; } else { @@ -1186,8 +1237,10 @@ /* zone, check for left edges */ /* */ /* of course, that's for TrueType */ - is_top_right_blue = FT_BOOL( blue->flags & AF_CJK_BLUE_TOP ); - 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 */ @@ -1234,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 @@ -1484,6 +1537,12 @@ 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 )); } @@ -1665,9 +1724,9 @@ #endif - FT_TRACE5(( "cjk %s edge hinting (script `%s')\n", + FT_TRACE5(( "cjk %s edge hinting (style `%s')\n", dim == AF_DIMENSION_VERT ? "horizontal" : "vertical", - af_script_names[hints->metrics->script_class->script] )); + af_style_names[hints->metrics->style_class->style] )); /* we begin by aligning all stems relative to the blue zone */ @@ -2210,60 +2269,18 @@ 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 ) - /* this corresponds to Unicode 6.0 */ - - /* XXX: this should probably fine tuned to differentiate better between */ - /* scripts... */ - - static 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 ) - }; - - #else /* !AF_CONFIG_OPTION_CJK */ + AF_DEFINE_WRITING_SYSTEM_CLASS( af_cjk_writing_system_class, @@ -2271,33 +2288,16 @@ 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 ) - static const AF_Script_UniRangeRec af_hani_uniranges[] = - { - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - #endif /* !AF_CONFIG_OPTION_CJK */ - AF_DEFINE_SCRIPT_CLASS( - af_hani_script_class, - - AF_SCRIPT_HANI, - AF_BLUE_STRINGSET_HANI, - AF_WRITING_SYSTEM_CJK, - - af_hani_uniranges, - 0x7530 /* 田 */ - ) - - /* END */ diff --git a/freetype/src/autofit/afcjk.h b/freetype/src/autofit/afcjk.h index 6f5bdc53..4dd4f391 100644 --- a/freetype/src/autofit/afcjk.h +++ b/freetype/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-2013 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, */ @@ -31,11 +31,6 @@ FT_BEGIN_HEADER AF_DECLARE_WRITING_SYSTEM_CLASS( af_cjk_writing_system_class ) - /* the CJK-specific script classes */ - - AF_DECLARE_SCRIPT_CLASS( af_hani_script_class ) - - /*************************************************************************/ /*************************************************************************/ /***** *****/ @@ -55,8 +50,6 @@ FT_BEGIN_HEADER ( (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_FILLED_BLUE( b ) \ - ( (b)->properties & AF_BLUE_PROPERTY_CJK_FILL ) #define AF_CJK_IS_RIGHT_BLUE AF_CJK_IS_TOP_BLUE #define AF_CJK_MAX_WIDTHS 16 @@ -105,9 +98,9 @@ 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; diff --git a/freetype/src/autofit/afcover.h b/freetype/src/autofit/afcover.h new file mode 100644 index 00000000..d5ac9694 --- /dev/null +++ b/freetype/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/freetype/src/autofit/afdummy.c b/freetype/src/autofit/afdummy.c index aaa034d9..f8702a10 100644 --- a/freetype/src/autofit/afdummy.c +++ b/freetype/src/autofit/afdummy.c @@ -23,8 +23,8 @@ 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 ); @@ -57,26 +57,14 @@ 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_DEFINE_SCRIPT_CLASS( - af_dflt_script_class, - - AF_SCRIPT_DFLT, - (AF_Blue_Stringset)0, - AF_WRITING_SYSTEM_DUMMY, - - NULL, - '\0' + (AF_WritingSystem_InitHintsFunc) af_dummy_hints_init, + (AF_WritingSystem_ApplyHintsFunc) af_dummy_hints_apply ) diff --git a/freetype/src/autofit/afdummy.h b/freetype/src/autofit/afdummy.h index bc34ddda..ad1b0d3a 100644 --- a/freetype/src/autofit/afdummy.h +++ b/freetype/src/autofit/afdummy.h @@ -25,14 +25,10 @@ FT_BEGIN_HEADER - /* A dummy writing system and script class used when no hinting should be - * performed. - */ + /* A dummy writing system used when no hinting should be performed. */ AF_DECLARE_WRITING_SYSTEM_CLASS( af_dummy_writing_system_class ) - AF_DECLARE_SCRIPT_CLASS( af_dflt_script_class ) - /* */ FT_END_HEADER diff --git a/freetype/src/autofit/afglobal.c b/freetype/src/autofit/afglobal.c index dc62bd7a..a54c20c0 100644 --- a/freetype/src/autofit/afglobal.c +++ b/freetype/src/autofit/afglobal.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter routines to compute global hinting values (body). */ /* */ -/* Copyright 2003-2013 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,6 +17,20 @@ #include "afglobal.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 @@ -27,6 +41,30 @@ #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" + + #ifndef FT_CONFIG_OPTION_PIC #undef WRITING_SYSTEM @@ -44,7 +82,7 @@ #undef SCRIPT -#define SCRIPT( s, S, d ) \ +#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \ &af_ ## s ## _script_class, FT_LOCAL_ARRAY_DEF( AF_ScriptClass ) @@ -56,58 +94,76 @@ 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 */ #ifdef FT_DEBUG_LEVEL_TRACE -#undef SCRIPT -#define SCRIPT( s, S, d ) #s, +#undef STYLE +#define STYLE( s, S, d, ws, sc, ss, c ) #s, FT_LOCAL_ARRAY_DEF( char* ) - af_script_names[] = + af_style_names[] = { -#include "afscript.h" +#include "afstyles.h" }; #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; FT_Face face = globals->face; FT_CharMap old_charmap = face->charmap; - FT_Byte* gscripts = globals->glyph_scripts; + FT_Byte* gstyles = globals->glyph_styles; FT_UInt ss; FT_UInt i; + FT_UInt dflt = ~0U; /* a non-valid value */ - /* the value AF_SCRIPT_NONE means `uncovered glyph' */ - FT_MEM_SET( globals->glyph_scripts, - AF_SCRIPT_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 fallback script. - * XXX: Shouldn't we rather disable hinting? - */ + /* + * 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 script_class = 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; @@ -116,35 +172,60 @@ /* * Scan all Unicode points in the range and set the corresponding - * glyph script index. + * glyph style index. */ - for ( range = script_class->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; - - gindex = FT_Get_Char_Index( face, charcode ); - - if ( gindex != 0 && - gindex < (FT_ULong)globals->glyph_count && - gscripts[gindex] == AF_SCRIPT_NONE ) - gscripts[gindex] = (FT_Byte)ss; - - for (;;) + for ( range = script_class->script_uni_ranges; + range->first != 0; + range++ ) { - charcode = FT_Get_Next_Char( face, charcode, &gindex ); + FT_ULong charcode = range->first; + FT_UInt gindex; - if ( gindex == 0 || charcode > range->last ) - break; - if ( gindex < (FT_ULong)globals->glyph_count && - gscripts[gindex] == AF_SCRIPT_NONE ) - gscripts[gindex] = (FT_Byte)ss; + gindex = FT_Get_Char_Index( face, charcode ); + + 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 < (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 */ @@ -154,29 +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 fallback 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_script != AF_SCRIPT_NONE ) + 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_NONE ) + if ( ( gstyles[nn] & ~AF_DIGIT ) == AF_STYLE_UNASSIGNED ) { - gscripts[nn] &= ~AF_SCRIPT_NONE; - gscripts[nn] |= globals->module->fallback_script; + 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; } @@ -198,19 +318,23 @@ face->num_glyphs * sizeof ( FT_Byte ) ) ) goto Exit; - globals->face = face; - globals->glyph_count = face->num_glyphs; - globals->glyph_scripts = (FT_Byte*)( globals + 1 ); - globals->module = module; + globals->face = face; + globals->glyph_count = face->num_glyphs; + globals->glyph_styles = (FT_Byte*)( globals + 1 ); + globals->module = module; - error = af_face_globals_compute_script_coverage( globals ); +#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; } - - globals->increase_x_height = AF_PROP_INCREASE_X_HEIGHT_MAX; + else + globals->increase_x_height = AF_PROP_INCREASE_X_HEIGHT_MAX; Exit: *aglobals = globals; @@ -227,26 +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 script_class = - AF_SCRIPT_CLASSES_GET[nn]; + AF_StyleClass style_class = + AF_STYLE_CLASSES_GET[nn]; AF_WritingSystemClass writing_system_class = - AF_WRITING_SYSTEM_CLASSES_GET[script_class->writing_system]; + AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system]; - if ( writing_system_class->script_metrics_done ) - writing_system_class->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 ); } @@ -254,16 +383,16 @@ 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; + AF_StyleMetrics metrics = NULL; - AF_Script script = (AF_Script)( options & 15 ); + AF_Style style = (AF_Style)options; AF_WritingSystemClass writing_system_class; - AF_ScriptClass script_class; + AF_StyleClass style_class; FT_Error error = FT_Err_Ok; @@ -274,43 +403,44 @@ goto Exit; } - /* if we have a forced script (via `options'), use it, */ - /* otherwise look into `glyph_scripts' array */ - if ( script == AF_SCRIPT_DFLT || script + 1 >= AF_SCRIPT_MAX ) - script = (AF_Script)( globals->glyph_scripts[gindex] & AF_SCRIPT_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 ); - script_class = AF_SCRIPT_CLASSES_GET[script]; + style_class = AF_STYLE_CLASSES_GET[style]; writing_system_class = AF_WRITING_SYSTEM_CLASSES_GET - [script_class->writing_system]; + [style_class->writing_system]; - metrics = globals->metrics[script]; + metrics = globals->metrics[style]; if ( metrics == NULL ) { /* create the global metrics object if necessary */ FT_Memory memory = globals->face->memory; - if ( FT_ALLOC( metrics, writing_system_class->script_metrics_size ) ) + if ( FT_ALLOC( metrics, writing_system_class->style_metrics_size ) ) goto Exit; - metrics->script_class = script_class; - metrics->globals = globals; + metrics->style_class = style_class; + metrics->globals = globals; - if ( writing_system_class->script_metrics_init ) + if ( writing_system_class->style_metrics_init ) { - error = writing_system_class->script_metrics_init( metrics, - globals->face ); + error = writing_system_class->style_metrics_init( metrics, + globals->face ); if ( error ) { - if ( writing_system_class->script_metrics_done ) - writing_system_class->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[script] = metrics; + globals->metrics[style] = metrics; } Exit: @@ -325,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/freetype/src/autofit/afglobal.h b/freetype/src/autofit/afglobal.h index 227eee75..38d8d695 100644 --- a/freetype/src/autofit/afglobal.h +++ b/freetype/src/autofit/afglobal.h @@ -5,7 +5,7 @@ /* Auto-fitter routines to compute global hinting values */ /* (specification). */ /* */ -/* Copyright 2003-2005, 2007, 2009, 2011-2013 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, */ @@ -23,6 +23,7 @@ #include "aftypes.h" #include "afmodule.h" +#include "hbshim.h" FT_BEGIN_HEADER @@ -31,29 +32,50 @@ 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_script_names[]; + 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 script in `af_script_classes' */ + /* index of fallback style in `af_style_classes' */ #ifdef AF_CONFIG_OPTION_CJK -#define AF_SCRIPT_FALLBACK AF_SCRIPT_HANI +#define AF_STYLE_FALLBACK AF_STYLE_HANI_DFLT #else -#define AF_SCRIPT_FALLBACK AF_SCRIPT_DFLT +#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_SCRIPT_NONE 0x7F +#define AF_STYLE_UNASSIGNED 0x7F /* if this flag is set, we have an ASCII digit */ -#define AF_DIGIT 0x80 +#define AF_DIGIT 0x80 /* `increase-x-height' property */ #define AF_PROP_INCREASE_X_HEIGHT_MIN 6 @@ -70,29 +92,33 @@ FT_BEGIN_HEADER /* - * Note that glyph_scripts[] maps each glyph to an index into the - * `af_script_classes' array. + * Note that glyph_styles[] maps each glyph to an index into the + * `af_style_classes' array. * */ typedef struct AF_FaceGlobalsRec_ { - FT_Face face; - FT_Long glyph_count; /* same as face->num_glyphs */ - FT_Byte* glyph_scripts; + 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; + FT_UInt increase_x_height; - AF_ScriptMetrics metrics[AF_SCRIPT_MAX]; + AF_StyleMetrics metrics[AF_STYLE_MAX]; - AF_Module module; /* to access global properties */ + AF_Module module; /* to access global properties */ } AF_FaceGlobalsRec; /* * model the global hints data for a given face, decomposed into - * script-specific items + * style-specific items */ FT_LOCAL( FT_Error ) @@ -101,10 +127,10 @@ FT_BEGIN_HEADER 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/freetype/src/autofit/afhints.c b/freetype/src/autofit/afhints.c index 24184af3..f3cc50f2 100644 --- a/freetype/src/autofit/afhints.c +++ b/freetype/src/autofit/afhints.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines (body). */ /* */ -/* Copyright 2003-2007, 2009-2013 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, */ @@ -74,7 +74,8 @@ } - /* 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, @@ -130,10 +131,6 @@ axis->num_edges++; - FT_ZERO( edge ); - edge->fpos = (FT_Short)fpos; - edge->dir = (FT_Char)dir; - Exit: *anedge = edge; return error; @@ -144,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 ) { @@ -172,41 +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; - FT_TRACE7(( "Table of points:\n" - " [ 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++ ) - FT_TRACE7(( " [ %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' : ' ')); - FT_TRACE7(( "\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 } @@ -247,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; @@ -262,34 +267,34 @@ AF_Segment seg; - FT_TRACE7(( "Table of %s segments:\n", - dimension == AF_DIMENSION_HORZ ? "vertical" - : "horizontal" )); + AF_DUMP(( "Table of %s segments:\n", + dimension == AF_DIMENSION_HORZ ? "vertical" + : "horizontal" )); if ( axis->num_segments ) - FT_TRACE7(( " [ index | pos | dir | from" - " | to | link | serif | edge" - " | height | extra | flags ]\n" )); + AF_DUMP(( " [ index | pos | dir | from" + " | to | link | serif | edge" + " | height | extra | flags ]\n" )); else - FT_TRACE7(( " (none)\n" )); + AF_DUMP(( " (none)\n" )); for ( seg = segments; seg < limit; seg++ ) - FT_TRACE7(( " [ %5d | %5.2g | %5s | %4d" - " | %4d | %4d | %5d | %4d" - " | %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->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 ) )); - FT_TRACE7(( "\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 @@ -332,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; @@ -349,9 +356,18 @@ if ( idx < 0 || idx >= axis->num_segments ) return FT_THROW( Invalid_Argument ); - seg = &axis->segments[idx]; - *offset = ( dim == AF_DIMENSION_HORZ ) ? seg->first->ox - : seg->first->oy; + 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; + + if ( *is_blue ) + *blue_offset = seg->edge->blue_edge->cur; + else + *blue_offset = 0; return FT_Err_Ok; } @@ -366,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; @@ -383,94 +400,35 @@ * note: AF_DIMENSION_HORZ corresponds to _vertical_ edges * since they have a constant X coordinate. */ - FT_TRACE7(( "Table of %s edges:\n", - dimension == AF_DIMENSION_HORZ ? "vertical" - : "horizontal" )); + AF_DUMP(( "Table of %s edges:\n", + dimension == AF_DIMENSION_HORZ ? "vertical" + : "horizontal" )); if ( axis->num_edges ) - FT_TRACE7(( " [ index | pos | dir | link" - " | serif | blue | opos | pos | flags ]\n" )); + AF_DUMP(( " [ index | pos | dir | link" + " | serif | blue | opos | pos | flags ]\n" )); else - FT_TRACE7(( " (none)\n" )); + AF_DUMP(( " (none)\n" )); for ( edge = edges; edge < limit; edge++ ) - FT_TRACE7(( " [ %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 ) )); - FT_TRACE7(( "\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 */ @@ -578,8 +536,8 @@ /* 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; @@ -685,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; @@ -732,91 +693,186 @@ } } - /* 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; - - FT_Pos last_good_in_x = 0; - FT_Pos last_good_in_y = 0; + /* + * 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; + + + /* 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' */ + + point = first; + prev = first->prev; + + while ( prev != first ) + { + 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; + } + + /* adjust first point */ + first = point; + + /* now loop over all points of the contour to get */ + /* `in' and `out' vector directions */ + + curr = first; + + /* + * 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; + + out_x = 0; + out_y = 0; + + 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++ ) { - AF_Point next; - FT_Pos out_x, out_y; + if ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) + continue; - - if ( point == first ) + if ( point->in_dir == AF_DIR_NONE && + point->out_dir == AF_DIR_NONE ) { - prev = first->prev; + /* check whether both vectors point into the same quadrant */ - in_x = first->fx - prev->fx; - in_y = first->fy - prev->fy; + FT_Pos in_x, in_y; + FT_Pos out_x, out_y; - last_good_in_x = in_x; - last_good_in_y = in_y; + AF_Point next_u = point + point->u; + AF_Point prev_v = point + point->v; - if ( FT_ABS( in_x ) + FT_ABS( in_y ) < near_limit ) + + 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 ) { - /* search first non-near point to get a good `in_dir' value */ + /* yes, so tag current point as weak */ + /* and update index deltas */ - AF_Point point_ = prev; + point->flags |= AF_FLAG_WEAK_INTERPOLATION; - - while ( point_ != first ) - { - AF_Point prev_ = point_->prev; - - FT_Pos in_x_ = point_->fx - prev_->fx; - FT_Pos in_y_ = point_->fy - prev_->fy; - - - if ( FT_ABS( in_x_ ) + FT_ABS( in_y_ ) >= near_limit ) - { - last_good_in_x = in_x_; - last_good_in_y = in_y_; - - break; - } - - point_ = prev_; - } + prev_v->u = (FT_Pos)( next_u - prev_v ); + next_u->v = -prev_v->u; } - - in_dir = af_direction_compute( in_x, in_y ); - first = prev + 1; } + } - point->in_dir = (FT_Char)in_dir; + /* + * Finally, check for remaining weak points. Everything else not + * collected in edges so far is then implicitly classified as strong + * points. + */ - /* check whether the current point is near to the previous one */ - /* (value 20 in `near_limit' is heuristic; we use Taxicab */ - /* metrics for the test) */ - - if ( FT_ABS( in_x ) + FT_ABS( in_y ) < near_limit ) - point->flags |= AF_FLAG_NEAR; - else - { - last_good_in_x = in_x; - last_good_in_y = in_y; - } - - next = point->next; - out_x = next->fx - point->fx; - out_y = next->fy - point->fy; - - in_dir = af_direction_compute( out_x, out_y ); - point->out_dir = (FT_Char)in_dir; - - /* Check for weak points. The remaining points not collected */ - /* in edges are 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 ) { @@ -833,18 +889,25 @@ goto Is_Weak_Point; } - /* test whether `in' and `out' direction is approximately */ - /* the same (and use the last good `in' vector in case */ - /* the current point is near to the previous one) */ - if ( ft_corner_is_flat( - point->flags & AF_FLAG_NEAR ? last_good_in_x : in_x, - point->flags & AF_FLAG_NEAR ? last_good_in_y : in_y, - out_x, - out_y ) ) { - /* current point lies on a straight, diagonal line */ - /* (more or less) */ - 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 ) @@ -852,10 +915,6 @@ /* current point forms a spike */ goto Is_Weak_Point; } - - in_x = out_x; - in_y = out_y; - prev = point; } } } @@ -1012,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 ) @@ -1269,8 +1327,6 @@ } } - point = points; - for ( ; contour < contour_limit; contour++ ) { AF_Point first_touched, last_touched; @@ -1293,7 +1349,6 @@ } first_touched = point; - last_touched = point; for (;;) { diff --git a/freetype/src/autofit/afhints.h b/freetype/src/autofit/afhints.h index ce523254..92101de7 100644 --- a/freetype/src/autofit/afhints.h +++ b/freetype/src/autofit/afhints.h @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines (specification). */ /* */ -/* Copyright 2003-2008, 2010-2012 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_ @@ -72,13 +72,9 @@ FT_BEGIN_HEADER * `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 writing system. - * - * 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 @@ -148,7 +144,7 @@ FT_BEGIN_HEADER * Serifs are detected by `af_{cjk,latin,...}_hint_edges'. * * In comparison to a stem, a serif (as handled by the auto-hinter - * module which takes care of the `latin' writing system) has + * module that takes care of the `latin' writing system) has * * best segment_1 = segment_2 && best segment_2 != segment_1 * @@ -178,19 +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) [currently, such points - * aren't handled in the auto-hinter] + * 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. * @@ -220,26 +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, - - /* the current point is very near to another one */ - AF_FLAG_NEAR = 1 << 10 + AF_FLAG_WEAK_INTERPOLATION = 1 << 4 } AF_Flags; @@ -247,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; @@ -343,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; @@ -429,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/freetype/src/autofit/afindic.c b/freetype/src/autofit/afindic.c index ef8299f8..197881b6 100644 --- a/freetype/src/autofit/afindic.c +++ b/freetype/src/autofit/afindic.c @@ -2,7 +2,7 @@ /* */ /* afindic.c */ /* */ -/* Auto-fitter hinting routines for Indic scripts (body). */ +/* Auto-fitter hinting routines for Indic writing system (body). */ /* */ /* Copyright 2007, 2011-2013 by */ /* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */ @@ -104,32 +104,18 @@ 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 ) - /* XXX: this should probably fine tuned to differentiate better between */ - /* scripts... */ - - static const AF_Script_UniRangeRec af_deva_uniranges[] = - { - 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 ) - }; - #else /* !AF_CONFIG_OPTION_INDIC */ + AF_DEFINE_WRITING_SYSTEM_CLASS( af_indic_writing_system_class, @@ -137,33 +123,16 @@ 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 ) - static const AF_Script_UniRangeRec af_deva_uniranges[] = - { - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - #endif /* !AF_CONFIG_OPTION_INDIC */ - AF_DEFINE_SCRIPT_CLASS( - af_deva_script_class, - - AF_SCRIPT_DEVA, - (AF_Blue_Stringset)0, /* XXX */ - AF_WRITING_SYSTEM_INDIC, - - af_deva_uniranges, - 'o' /* XXX */ - ) - - /* END */ diff --git a/freetype/src/autofit/afindic.h b/freetype/src/autofit/afindic.h index db38e967..9e13cf7e 100644 --- a/freetype/src/autofit/afindic.h +++ b/freetype/src/autofit/afindic.h @@ -2,7 +2,8 @@ /* */ /* afindic.h */ /* */ -/* Auto-fitter hinting routines for Indic scripts (specification). */ +/* Auto-fitter hinting routines for Indic writing system */ +/* (specification). */ /* */ /* Copyright 2007, 2012, 2013 by */ /* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */ @@ -30,11 +31,6 @@ FT_BEGIN_HEADER AF_DECLARE_WRITING_SYSTEM_CLASS( af_indic_writing_system_class ) - /* the indic-specific script classes */ - - AF_DECLARE_SCRIPT_CLASS( af_deva_script_class ) - - /* */ FT_END_HEADER diff --git a/freetype/src/autofit/aflatin.c b/freetype/src/autofit/aflatin.c index 15a241e5..36a36896 100644 --- a/freetype/src/autofit/aflatin.c +++ b/freetype/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-2013 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, */ @@ -21,6 +21,7 @@ #include FT_INTERNAL_DEBUG_H #include "afglobal.h" +#include "afpic.h" #include "aflatin.h" #include "aferrors.h" @@ -61,10 +62,10 @@ FT_TRACE5(( "\n" - "latin standard widths computation (script `%s')\n" - "=================================================\n" + "latin standard widths computation (style `%s')\n" + "=====================================================\n" "\n", - af_script_names[metrics->root.script_class->script] )); + af_style_names[metrics->root.style_class->style] )); af_glyph_hints_init( hints, face->memory ); @@ -73,20 +74,66 @@ { FT_Error error; - FT_UInt glyph_index; + 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 - glyph_index = FT_Get_Char_Index( - face, - metrics->root.script_class->standard_char ); - 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; + + + /* + * 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", - metrics->root.script_class->standard_char, glyph_index )); + standard_char, glyph_index )); error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); if ( error || face->glyph->outline.n_points <= 0 ) @@ -105,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 ) @@ -124,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; @@ -214,12 +269,14 @@ AF_LatinAxis axis = &metrics->axis[AF_DIMENSION_VERT]; FT_Outline outline; - AF_Blue_Stringset bss = metrics->root.script_class->blue_stringset; + AF_StyleClass sc = metrics->root.style_class; + + AF_Blue_Stringset bss = sc->blue_stringset; const AF_Blue_StringRec* bs = &af_blue_stringsets[bss]; - /* we walk over the blue character strings as specified in the */ - /* script's entry in the `af_blue_stringset' array */ + /* we walk over the blue character strings as specified in the */ + /* style's entry in the `af_blue_stringset' array */ FT_TRACE5(( "latin blue zones computation\n" "============================\n" @@ -249,6 +306,14 @@ 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 ) @@ -277,7 +342,8 @@ while ( *p ) { FT_ULong ch; - FT_UInt glyph_index; + FT_ULong glyph_index; + FT_Long y_offset; FT_Pos best_y; /* same as points.y */ FT_Int best_point, best_contour_first, best_contour_last; FT_Vector* points; @@ -287,7 +353,7 @@ GET_UTF8_CHAR( ch, p ); /* load the character in the face -- skip unknown or empty ones */ - glyph_index = FT_Get_Char_Index( face, ch ); + af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset ); if ( glyph_index == 0 ) { FT_TRACE5(( " U+%04lX unavailable\n", ch )); @@ -470,6 +536,13 @@ 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; @@ -502,7 +575,6 @@ { FT_Bool l2r; FT_Pos d; - FT_Int p_first, p_last; if ( !hit ) @@ -575,7 +647,10 @@ if ( FT_ABS( points[next].x - points[first].x ) <= 20 * dist ) { - last--; + if ( last > best_contour_first ) + last--; + else + last = best_contour_last; break; } @@ -606,6 +681,12 @@ } } + /* 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: */ @@ -629,6 +710,13 @@ FT_CURVE_TAG( outline.tags[best_segment_last] ) != FT_CURVE_TAG_ON ); + 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" )); } @@ -699,6 +787,8 @@ blue->flags = 0; 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 @@ -733,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; @@ -879,11 +970,11 @@ FT_TRACE5(( "af_latin_metrics_scale_dim:" - " x height alignment (script `%s'):\n" + " x height alignment (style `%s'):\n" " " " vertical scaling changed from %.4f to %.4f (by %d%%)\n" "\n", - af_script_names[metrics->root.script_class->script], + af_style_names[metrics->root.style_class->style], axis->org_scale / 65536.0, scale / 65536.0, ( fitted - scaled ) * 100 / scaled )); @@ -906,9 +997,9 @@ metrics->root.scaler.y_delta = delta; } - FT_TRACE5(( "%s widths (script `%s')\n", + FT_TRACE5(( "%s widths (style `%s')\n", dim == AF_DIMENSION_HORZ ? "horizontal" : "vertical", - af_script_names[metrics->root.script_class->script] )); + af_style_names[metrics->root.style_class->style] )); /* scale the widths */ for ( nn = 0; nn < axis->width_count; nn++ ) @@ -933,15 +1024,15 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( axis->extra_light ) - FT_TRACE5(( "`%s' script is extra light (at current resolution)\n" + FT_TRACE5(( "`%s' style is extra light (at current resolution)\n" "\n", - af_script_names[metrics->root.script_class->script] )); + af_style_names[metrics->root.style_class->style] )); #endif if ( dim == AF_DIMENSION_VERT ) { - FT_TRACE5(( "blue zones (script `%s')\n", - af_script_names[metrics->root.script_class->script] )); + 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++ ) @@ -1202,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; @@ -1236,9 +1329,6 @@ FT_Pos last_v = last->v; - if ( first == last ) - continue; - if ( first_v < last_v ) { AF_Point p; @@ -1277,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, */ @@ -1315,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 ) @@ -1328,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; @@ -1668,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; @@ -1676,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 ); } @@ -1705,8 +1843,9 @@ for ( ; edge < edge_limit; edge++ ) { FT_UInt bb; - AF_Width best_blue = NULL; - FT_Pos best_dist; /* initial threshold */ + 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 */ @@ -1720,24 +1859,26 @@ 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, 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 ); - /* 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 ) + /* neutral blue zones are handled for both directions */ + if ( is_top_blue ^ is_major_dir || is_neutral_blue ) { FT_Pos dist; @@ -1750,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 ); @@ -1772,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; } } } @@ -1781,7 +1927,11 @@ } if ( best_blue ) + { edge->blue_edge = best_blue; + if ( best_blue_is_neutral ) + edge->flags |= AF_EDGE_NEUTRAL; + } } } @@ -1797,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 @@ -2099,7 +2249,7 @@ 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 )); } @@ -2148,9 +2298,9 @@ #endif - FT_TRACE5(( "latin %s edge hinting (script `%s')\n", + FT_TRACE5(( "latin %s edge hinting (style `%s')\n", dim == AF_DIMENSION_VERT ? "horizontal" : "vertical", - af_script_names[hints->metrics->script_class->script] )); + 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 */ @@ -2166,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; @@ -2240,7 +2417,7 @@ /* 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; @@ -2629,6 +2806,8 @@ FT_Error error; int dim; + AF_LatinAxis axis; + error = af_glyph_hints_reload( hints, outline ); if ( error ) @@ -2642,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; @@ -2709,111 +2896,12 @@ 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 - ) - - - /* XXX: this should probably fine tuned to differentiate better between */ - /* scripts... */ - - static 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, 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( 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 ) - }; - - static 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 ) - }; - - static 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 ) - }; - - static 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 ) - }; - - - AF_DEFINE_SCRIPT_CLASS( - af_latn_script_class, - - AF_SCRIPT_LATN, - AF_BLUE_STRINGSET_LATN, - AF_WRITING_SYSTEM_LATIN, - - af_latn_uniranges, - 'o' - ) - - AF_DEFINE_SCRIPT_CLASS( - af_grek_script_class, - - AF_SCRIPT_GREK, - AF_BLUE_STRINGSET_GREK, - AF_WRITING_SYSTEM_LATIN, - - af_grek_uniranges, - 0x3BF /* ο */ - ) - - AF_DEFINE_SCRIPT_CLASS( - af_cyrl_script_class, - - AF_SCRIPT_CYRL, - AF_BLUE_STRINGSET_CYRL, - AF_WRITING_SYSTEM_LATIN, - - af_cyrl_uniranges, - 0x43E /* о */ - ) - - AF_DEFINE_SCRIPT_CLASS( - af_hebr_script_class, - - AF_SCRIPT_HEBR, - AF_BLUE_STRINGSET_HEBR, - AF_WRITING_SYSTEM_LATIN, - - af_hebr_uniranges, - 0x5DD /* ם */ + (AF_WritingSystem_InitHintsFunc) af_latin_hints_init, + (AF_WritingSystem_ApplyHintsFunc) af_latin_hints_apply ) diff --git a/freetype/src/autofit/aflatin.h b/freetype/src/autofit/aflatin.h index c06cbd9a..2c0bfca1 100644 --- a/freetype/src/autofit/aflatin.h +++ b/freetype/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-2013 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, */ @@ -29,17 +30,6 @@ FT_BEGIN_HEADER AF_DECLARE_WRITING_SYSTEM_CLASS( af_latin_writing_system_class ) - /* the latin-specific script classes */ - - AF_DECLARE_SCRIPT_CLASS( af_cyrl_script_class ) - AF_DECLARE_SCRIPT_CLASS( af_grek_script_class ) - AF_DECLARE_SCRIPT_CLASS( af_latn_script_class ) - AF_DECLARE_SCRIPT_CLASS( af_hebr_script_class ) -#if 0 - AF_DECLARE_SCRIPT_CLASS( af_armn_script_class ) -#endif - - /* constants are given with units_per_em == 2048 in mind */ #define AF_LATIN_CONSTANT( metrics, c ) \ ( ( (c) * (FT_Long)( (AF_LatinMetrics)(metrics) )->units_per_em ) / 2048 ) @@ -56,13 +46,15 @@ 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. */ #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 ) \ @@ -73,10 +65,11 @@ FT_BEGIN_HEADER 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 }; @@ -113,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; @@ -171,7 +164,7 @@ FT_BEGIN_HEADER /* * The next functions shouldn't normally be exported. However, other - * scripts might like to use these functions as-is. + * writing systems might like to use these functions as-is. */ FT_LOCAL( FT_Error ) af_latin_hints_compute_segments( AF_GlyphHints hints, @@ -179,6 +172,8 @@ FT_BEGIN_HEADER FT_LOCAL( void ) af_latin_hints_link_segments( AF_GlyphHints hints, + FT_UInt width_count, + AF_WidthRec* widths, AF_Dimension dim ); FT_LOCAL( FT_Error ) @@ -187,6 +182,8 @@ FT_BEGIN_HEADER 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/freetype/src/autofit/aflatin2.c b/freetype/src/autofit/aflatin2.c index a6d564a2..07590b38 100644 --- a/freetype/src/autofit/aflatin2.c +++ b/freetype/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-2013 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, */ @@ -78,7 +78,7 @@ glyph_index = FT_Get_Char_Index( face, - metrics->root.script_class->standard_char ); + metrics->root.style_class->standard_char ); if ( glyph_index == 0 ) goto Exit; @@ -95,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 ) @@ -890,9 +890,6 @@ FT_Pos last_v = last->v; - if ( first == last ) - continue; - if ( first_v < last_v ) { p = first->prev; @@ -984,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++ ) @@ -992,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++ ) @@ -1194,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 @@ -1501,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 @@ -2387,61 +2383,12 @@ 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 - ) - - - /* XXX: this should probably fine tuned to differentiate better between */ - /* scripts... */ - - static const AF_Script_UniRangeRec af_ltn2_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( 0x2E00UL, 0x2E7FUL ), /* Supplemental Punctuation */ - 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( 0x1F100UL, 0x1F1FFUL ), /* Enclosed Alphanumeric Supplement */ - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - - - AF_DEFINE_SCRIPT_CLASS( - af_ltn2_script_class, - - AF_SCRIPT_LTN2, - AF_BLUE_STRINGSET_LATN, - AF_WRITING_SYSTEM_LATIN2, - - af_ltn2_uniranges, - 'o' + (AF_WritingSystem_InitHintsFunc) af_latin2_hints_init, + (AF_WritingSystem_ApplyHintsFunc) af_latin2_hints_apply ) diff --git a/freetype/src/autofit/aflatin2.h b/freetype/src/autofit/aflatin2.h index f7f6d8d7..b5d252a9 100644 --- a/freetype/src/autofit/aflatin2.h +++ b/freetype/src/autofit/aflatin2.h @@ -2,7 +2,8 @@ /* */ /* aflatin2.h */ /* */ -/* Auto-fitter hinting routines for latin script (specification). */ +/* Auto-fitter hinting routines for latin writing system */ +/* (specification). */ /* */ /* Copyright 2003-2007, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ @@ -30,17 +31,6 @@ FT_BEGIN_HEADER AF_DECLARE_WRITING_SYSTEM_CLASS( af_latin2_writing_system_class ) - /* the latin-specific script classes */ - - AF_DECLARE_SCRIPT_CLASS( af_ltn2_script_class ) /* XXX */ -#if 0 - AF_DECLARE_SCRIPT_CLASS( af_arm2_script_class ) - AF_DECLARE_SCRIPT_CLASS( af_cyr2_script_class ) - AF_DECLARE_SCRIPT_CLASS( af_grk2_script_class ) - AF_DECLARE_SCRIPT_CLASS( af_hbr2_script_class ) -#endif - - /* */ FT_END_HEADER diff --git a/freetype/src/autofit/afloader.c b/freetype/src/autofit/afloader.c index b49f8c09..fb15c87f 100644 --- a/freetype/src/autofit/afloader.c +++ b/freetype/src/autofit/afloader.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter glyph loading routines (body). */ /* */ -/* Copyright 2003-2009, 2011-2013 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, */ @@ -109,7 +109,7 @@ 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; @@ -131,8 +131,8 @@ 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 ); } switch ( slot->format ) @@ -183,17 +183,17 @@ /* automatic hinting process */ { #ifdef FT_CONFIG_OPTION_PIC - AF_FaceGlobals globals = loader->globals; + AF_FaceGlobals globals = loader->globals; #endif + AF_StyleClass style_class = metrics->style_class; AF_WritingSystemClass writing_system_class = - AF_WRITING_SYSTEM_CLASSES_GET - [metrics->script_class->writing_system]; + AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system]; - if ( writing_system_class->script_hints_apply ) - writing_system_class->script_hints_apply( hints, - &gloader->current.outline, - metrics ); + 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 */ @@ -318,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; @@ -513,7 +508,7 @@ if ( !size ) - return FT_THROW( Invalid_Argument ); + return FT_THROW( Invalid_Size_Handle ); FT_ZERO( &scaler ); @@ -529,14 +524,14 @@ error = af_loader_reset( module, face ); if ( !error ) { - AF_ScriptMetrics metrics; - FT_UInt options = AF_SCRIPT_DFLT; + AF_StyleMetrics metrics; + FT_UInt options = AF_STYLE_NONE_DFLT; #ifdef FT_OPTION_AUTOFIT2 /* XXX: undocumented hook to activate the latin2 writing system */ if ( load_flags & ( 1UL << 20 ) ) - options = AF_SCRIPT_LTN2; + options = AF_STYLE_LTN2_DFLT; #endif error = af_face_globals_get_metrics( loader->globals, gindex, @@ -544,27 +539,27 @@ if ( !error ) { #ifdef FT_CONFIG_OPTION_PIC - AF_FaceGlobals globals = loader->globals; + AF_FaceGlobals globals = loader->globals; #endif + AF_StyleClass style_class = metrics->style_class; AF_WritingSystemClass writing_system_class = - AF_WRITING_SYSTEM_CLASSES_GET - [metrics->script_class->writing_system]; + AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system]; loader->metrics = metrics; - if ( writing_system_class->script_metrics_scale ) - writing_system_class->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 ( writing_system_class->script_hints_init ) + if ( writing_system_class->style_hints_init ) { - error = writing_system_class->script_hints_init( &loader->hints, - metrics ); + error = writing_system_class->style_hints_init( &loader->hints, + metrics ); if ( error ) goto Exit; } diff --git a/freetype/src/autofit/afloader.h b/freetype/src/autofit/afloader.h index 1f34d17c..9601e24f 100644 --- a/freetype/src/autofit/afloader.h +++ b/freetype/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, */ @@ -44,7 +44,7 @@ FT_BEGIN_HEADER /* 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; diff --git a/freetype/src/autofit/afmodule.c b/freetype/src/autofit/afmodule.c index b1bb5ee0..641e03ea 100644 --- a/freetype/src/autofit/afmodule.c +++ b/freetype/src/autofit/afmodule.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter module implementation (body). */ /* */ -/* Copyright 2003-2006, 2009, 2011-2013 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, */ @@ -45,7 +45,7 @@ #define FT_COMPONENT trace_afmodule - FT_Error + static FT_Error af_property_get_face_globals( FT_Face face, AF_FaceGlobals* aglobals, AF_Module module ) @@ -55,13 +55,13 @@ if ( !face ) - return FT_THROW( Invalid_Argument ); + return FT_THROW( Invalid_Face_Handle ); globals = (AF_FaceGlobals)face->autohint.data; if ( !globals ) { - /* trigger computation of the global script data */ - /* in case it hasn't been done yet */ + /* 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 ) { @@ -79,7 +79,7 @@ } - FT_Error + static FT_Error af_property_set( FT_Module ft_module, const char* property_name, const void* value ) @@ -92,8 +92,40 @@ { FT_UInt* fallback_script = (FT_UInt*)value; + FT_UInt ss; - module->fallback_script = *fallback_script; + + /* 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; } @@ -116,14 +148,15 @@ } - FT_Error + 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_script = module->fallback_script; + 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" ) ) @@ -134,7 +167,7 @@ error = af_property_get_face_globals( prop->face, &globals, module ); if ( !error ) - prop->map = globals->glyph_scripts; + prop->map = globals->glyph_styles; return error; } @@ -142,8 +175,19 @@ { FT_UInt* val = (FT_UInt*)value; + AF_StyleClass style_class = AF_STYLE_CLASSES_GET[fallback_style]; - *val = fallback_script; + + *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; } @@ -182,7 +226,7 @@ af_get_interface( FT_Module module, const char* module_interface ) { - /* AF_SERVICES_GET derefers `library' in PIC mode */ + /* AF_SERVICES_GET dereferences `library' in PIC mode */ #ifdef FT_CONFIG_OPTION_PIC FT_Library library; @@ -206,7 +250,8 @@ AF_Module module = (AF_Module)ft_module; - module->fallback_script = AF_SCRIPT_FALLBACK; + module->fallback_style = AF_STYLE_FALLBACK; + module->default_script = AF_SCRIPT_DEFAULT; return af_loader_init( module ); } diff --git a/freetype/src/autofit/afmodule.h b/freetype/src/autofit/afmodule.h index c4e8f8f6..20b7b9f6 100644 --- a/freetype/src/autofit/afmodule.h +++ b/freetype/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, */ @@ -40,7 +40,8 @@ FT_BEGIN_HEADER { FT_ModuleRec root; - FT_UInt fallback_script; + FT_UInt fallback_style; + FT_UInt default_script; AF_LoaderRec loader[1]; diff --git a/freetype/src/autofit/afpic.c b/freetype/src/autofit/afpic.c index 92d696d2..cb29fd79 100644 --- a/freetype/src/autofit/afpic.c +++ b/freetype/src/autofit/afpic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for autofit module. */ /* */ -/* Copyright 2009-2013 by */ +/* Copyright 2009-2014 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,6 +20,7 @@ #include FT_FREETYPE_H #include FT_INTERNAL_OBJECTS_H #include "afpic.h" +#include "afglobal.h" #include "aferrors.h" @@ -42,7 +43,7 @@ FT_AutoHinter_InterfaceRec* clazz ); - /* forward declaration of PIC init functions from script classes */ + /* forward declaration of PIC init functions from writing system classes */ #undef WRITING_SYSTEM #define WRITING_SYSTEM( ws, WS ) /* empty */ @@ -97,15 +98,20 @@ FT_Init_Class_af_service_properties( &container->af_service_properties ); - for ( ss = 0; ss < AF_WRITING_SYSTEM_MAX - 1; ss++ ) + 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 - 1] = NULL; + container->af_writing_system_classes[AF_WRITING_SYSTEM_MAX] = NULL; - for ( ss = 0; ss < AF_SCRIPT_MAX - 1; ss++ ) + 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_MAX - 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 ) \ @@ -116,13 +122,21 @@ #include "afwrtsys.h" #undef SCRIPT -#define SCRIPT( s, S, d ) \ +#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 ); diff --git a/freetype/src/autofit/afpic.h b/freetype/src/autofit/afpic.h index 09f8258a..9a68b4a5 100644 --- a/freetype/src/autofit/afpic.h +++ b/freetype/src/autofit/afpic.h @@ -32,6 +32,7 @@ FT_BEGIN_HEADER #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 */ @@ -48,14 +49,19 @@ FT_BEGIN_HEADER FT_Service_PropertiesRec af_service_properties; AF_WritingSystemClass af_writing_system_classes - [AF_WRITING_SYSTEM_MAX]; + [AF_WRITING_SYSTEM_MAX + 1]; AF_WritingSystemClassRec af_writing_system_classes_rec - [AF_WRITING_SYSTEM_MAX - 1]; + [AF_WRITING_SYSTEM_MAX]; AF_ScriptClass af_script_classes - [AF_SCRIPT_MAX]; + [AF_SCRIPT_MAX + 1]; AF_ScriptClassRec af_script_classes_rec - [AF_SCRIPT_MAX - 1]; + [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; @@ -74,6 +80,8 @@ FT_BEGIN_HEADER ( 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 ) diff --git a/freetype/src/autofit/afranges.c b/freetype/src/autofit/afranges.c new file mode 100644 index 00000000..b2c504d4 --- /dev/null +++ b/freetype/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/freetype/src/autofit/afranges.h b/freetype/src/autofit/afranges.h new file mode 100644 index 00000000..fe5b2aa7 --- /dev/null +++ b/freetype/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/freetype/src/autofit/afscript.h b/freetype/src/autofit/afscript.h index be0169a8..efe8754d 100644 --- a/freetype/src/autofit/afscript.h +++ b/freetype/src/autofit/afscript.h @@ -4,7 +4,7 @@ /* */ /* Auto-fitter scripts (specification only). */ /* */ -/* Copyright 2013 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, */ @@ -20,18 +20,120 @@ /* Define `SCRIPT' as needed. */ - /* Add new scripts here. */ + /* 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" ) - SCRIPT( deva, DEVA, "Indic scripts" ) - SCRIPT( dflt, DFLT, "no script" ) - SCRIPT( grek, GREK, "Greek" ) - SCRIPT( hani, HANI, "CJKV ideographs" ) - SCRIPT( hebr, HEBR, "Hebrew" ) - SCRIPT( latn, LATN, "Latin" ) -#ifdef FT_OPTION_AUTOFIT2 - SCRIPT( ltn2, LTN2, "Latin 2" ) -#endif + 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/freetype/src/autofit/afstyles.h b/freetype/src/autofit/afstyles.h new file mode 100644 index 00000000..f14d354c --- /dev/null +++ b/freetype/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/freetype/src/autofit/aftypes.h b/freetype/src/autofit/aftypes.h index cda1f896..61badd1b 100644 --- a/freetype/src/autofit/aftypes.h +++ b/freetype/src/autofit/aftypes.h @@ -4,7 +4,7 @@ /* */ /* Auto-fitter types (specification only). */ /* */ -/* Copyright 2003-2009, 2011-2013 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,7 +20,7 @@ * * The auto-fitter is a complete rewrite of the old auto-hinter. * Its main feature is the ability to differentiate between different - * writing systems in order to apply script-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 @@ -197,55 +197,31 @@ extern void* _af_debug_hints; (a)->y_delta == (b)->y_delta ) - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** S C R I P T M E T R I C S *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - /* This is the main structure which combines writing systems and script */ - /* data (for a given face object, see below). */ - - typedef struct AF_WritingSystemClassRec_ const* AF_WritingSystemClass; - typedef struct AF_ScriptClassRec_ const* AF_ScriptClass; - typedef struct AF_FaceGlobalsRec_* AF_FaceGlobals; - - typedef struct AF_ScriptMetricsRec_ - { - AF_ScriptClass script_class; - AF_ScalerRec scaler; - FT_Bool digits_have_same_width; - - AF_FaceGlobals globals; /* to access properties */ - - } AF_ScriptMetricsRec, *AF_ScriptMetrics; - + typedef struct AF_StyleMetricsRec_* AF_StyleMetrics; /* This function parses an FT_Face to compute global metrics for - * a specific script. + * a specific style. */ typedef FT_Error - (*AF_Script_InitMetricsFunc)( AF_ScriptMetrics metrics, - FT_Face face ); + (*AF_WritingSystem_InitMetricsFunc)( AF_StyleMetrics metrics, + FT_Face face ); typedef void - (*AF_Script_ScaleMetricsFunc)( AF_ScriptMetrics metrics, - AF_Scaler scaler ); + (*AF_WritingSystem_ScaleMetricsFunc)( AF_StyleMetrics metrics, + AF_Scaler scaler ); typedef void - (*AF_Script_DoneMetricsFunc)( AF_ScriptMetrics metrics ); + (*AF_WritingSystem_DoneMetricsFunc)( AF_StyleMetrics metrics ); typedef FT_Error - (*AF_Script_InitHintsFunc)( AF_GlyphHints hints, - AF_ScriptMetrics metrics ); + (*AF_WritingSystem_InitHintsFunc)( AF_GlyphHints hints, + AF_StyleMetrics metrics ); typedef void - (*AF_Script_ApplyHintsFunc)( AF_GlyphHints hints, - FT_Outline* outline, - AF_ScriptMetrics metrics ); + (*AF_WritingSystem_ApplyHintsFunc)( AF_GlyphHints hints, + FT_Outline* outline, + AF_StyleMetrics metrics ); /*************************************************************************/ @@ -257,14 +233,14 @@ extern void* _af_debug_hints; /*************************************************************************/ /* - * In FreeType, a writing system consists of multiple scripts which can - * be handled similarly *in a typographical way*; the relationship is not - * based on history. For example, both the Greek and the unrelated + * 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 which computes global metrics specific to + * - a specific global analyzer that computes global metrics specific to * the script (based on script-specific characters to identify ascender * height, x-height, etc.), * @@ -297,16 +273,18 @@ extern void* _af_debug_hints; { AF_WritingSystem writing_system; - FT_Offset script_metrics_size; - AF_Script_InitMetricsFunc script_metrics_init; - AF_Script_ScaleMetricsFunc script_metrics_scale; - AF_Script_DoneMetricsFunc script_metrics_done; + FT_Offset style_metrics_size; + AF_WritingSystem_InitMetricsFunc style_metrics_init; + AF_WritingSystem_ScaleMetricsFunc style_metrics_scale; + AF_WritingSystem_DoneMetricsFunc style_metrics_done; - AF_Script_InitHintsFunc script_hints_init; - AF_Script_ApplyHintsFunc script_hints_apply; + AF_WritingSystem_InitHintsFunc style_hints_init; + AF_WritingSystem_ApplyHintsFunc style_hints_apply; } AF_WritingSystemClassRec; + typedef const AF_WritingSystemClassRec* AF_WritingSystemClass; + /*************************************************************************/ /*************************************************************************/ @@ -317,15 +295,15 @@ extern void* _af_debug_hints; /*************************************************************************/ /* - * Each script is associated with a set of Unicode ranges which gets used - * to test whether the font face supports the script. It also references - * the writing system it belongs to. + * 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. + * We use four-letter script tags from the OpenType specification, + * extended by `NONE', which indicates `no script'. */ #undef SCRIPT -#define SCRIPT( s, S, d ) \ +#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \ AF_SCRIPT_ ## S, /* The list of known scripts. */ @@ -353,15 +331,147 @@ extern void* _af_debug_hints; typedef struct AF_ScriptClassRec_ { - AF_Script script; - AF_Blue_Stringset blue_stringset; - AF_WritingSystem writing_system; + AF_Script script; AF_Script_UniRange script_uni_ranges; /* last must be { 0, 0 } */ - FT_UInt32 standard_char; /* for default width and height */ + + 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 @@ -401,19 +511,41 @@ extern void* _af_debug_hints; #define AF_DEFINE_SCRIPT_CLASS( \ script_class, \ - script_, \ - blue_stringset_, \ - writing_system_, \ + script, \ ranges, \ - std_char ) \ + std_char1, \ + std_char2, \ + std_char3 ) \ FT_CALLBACK_TABLE_DEF \ const AF_ScriptClassRec script_class = \ { \ - script_, \ - blue_stringset_, \ - writing_system_, \ + script, \ ranges, \ - std_char \ + 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 */ @@ -434,16 +566,16 @@ extern void* _af_debug_hints; FT_LOCAL_DEF( void ) \ FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec* ac ) \ { \ - ac->writing_system = system; \ + ac->writing_system = system; \ \ - ac->script_metrics_size = m_size; \ + ac->style_metrics_size = m_size; \ \ - ac->script_metrics_init = m_init; \ - ac->script_metrics_scale = m_scale; \ - ac->script_metrics_done = m_done; \ + ac->style_metrics_init = m_init; \ + ac->style_metrics_scale = m_scale; \ + ac->style_metrics_done = m_done; \ \ - ac->script_hints_init = h_init; \ - ac->script_hints_apply = h_apply; \ + ac->style_hints_init = h_init; \ + ac->style_hints_apply = h_apply; \ } @@ -454,18 +586,40 @@ extern void* _af_debug_hints; #define AF_DEFINE_SCRIPT_CLASS( \ script_class, \ script_, \ - blue_string_set_, \ - writing_system_, \ ranges, \ - std_char ) \ + std_char1, \ + std_char2, \ + std_char3 ) \ FT_LOCAL_DEF( void ) \ FT_Init_Class_ ## script_class( AF_ScriptClassRec* ac ) \ { \ ac->script = script_; \ - ac->blue_stringset = blue_stringset_; \ - ac->writing_system = writing_system_; \ ac->script_uni_ranges = ranges; \ - ac->standard_char = std_char; \ + 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/freetype/src/autofit/afwrtsys.h b/freetype/src/autofit/afwrtsys.h index 602c5588..8aa2ed9e 100644 --- a/freetype/src/autofit/afwrtsys.h +++ b/freetype/src/autofit/afwrtsys.h @@ -37,7 +37,8 @@ /* Define `WRITING_SYSTEM' as needed. */ - /* Add new writing systems here. */ + /* 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 ) diff --git a/freetype/src/autofit/autofit.c b/freetype/src/autofit/autofit.c index b23374a2..e2b9934e 100644 --- a/freetype/src/autofit/autofit.c +++ b/freetype/src/autofit/autofit.c @@ -24,6 +24,8 @@ #include "afglobal.c" #include "afhints.c" +#include "afranges.c" + #include "afdummy.c" #include "aflatin.c" #ifdef FT_OPTION_AUTOFIT2 @@ -32,6 +34,8 @@ #include "afcjk.c" #include "afindic.c" +#include "hbshim.c" + #include "afloader.c" #include "afmodule.c" diff --git a/freetype/src/autofit/hbshim.c b/freetype/src/autofit/hbshim.c new file mode 100644 index 00000000..a705cef0 --- /dev/null +++ b/freetype/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/freetype/src/autofit/hbshim.h b/freetype/src/autofit/hbshim.h new file mode 100644 index 00000000..02f1513f --- /dev/null +++ b/freetype/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/freetype/src/autofit/rules.mk b/freetype/src/autofit/rules.mk index 745adab2..658f04ea 100644 --- a/freetype/src/autofit/rules.mk +++ b/freetype/src/autofit/rules.mk @@ -36,13 +36,17 @@ 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)/afscript.h \ + $(AUTOF_DIR)/afstyles.h \ $(AUTOF_DIR)/aftypes.h \ $(AUTOF_DIR)/afwrtsys.h diff --git a/freetype/src/base/PaxHeaders.18661/Jamfile b/freetype/src/base/PaxHeaders.18661/Jamfile deleted file mode 100644 index 91abe5ff..00000000 --- a/freetype/src/base/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.332826116 -30 ctime=1374498496.068315316 diff --git a/freetype/src/base/PaxHeaders.18661/basepic.c b/freetype/src/base/PaxHeaders.18661/basepic.c deleted file mode 100644 index 1eababb3..00000000 --- a/freetype/src/base/PaxHeaders.18661/basepic.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.338826041 -30 ctime=1374498496.086315091 diff --git a/freetype/src/base/PaxHeaders.18661/basepic.h b/freetype/src/base/PaxHeaders.18661/basepic.h deleted file mode 100644 index a78b0f74..00000000 --- a/freetype/src/base/PaxHeaders.18661/basepic.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.331826129 -30 ctime=1374498496.049315553 diff --git a/freetype/src/base/PaxHeaders.18661/ftadvanc.c b/freetype/src/base/PaxHeaders.18661/ftadvanc.c deleted file mode 100644 index 0555dad6..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftadvanc.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.363825729 -30 ctime=1374498496.081315153 diff --git a/freetype/src/base/PaxHeaders.18661/ftapi.c b/freetype/src/base/PaxHeaders.18661/ftapi.c deleted file mode 100644 index 9c71ed58..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftapi.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.332826116 -30 ctime=1374498496.051315528 diff --git a/freetype/src/base/PaxHeaders.18661/ftbase.c b/freetype/src/base/PaxHeaders.18661/ftbase.c deleted file mode 100644 index a073ddf6..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftbase.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.347825929 -30 ctime=1374498496.076315216 diff --git a/freetype/src/base/PaxHeaders.18661/ftbase.h b/freetype/src/base/PaxHeaders.18661/ftbase.h deleted file mode 100644 index ae547b53..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftbase.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.364825716 -30 ctime=1374498496.104314866 diff --git a/freetype/src/base/PaxHeaders.18661/ftbbox.c b/freetype/src/base/PaxHeaders.18661/ftbbox.c deleted file mode 100644 index 2ccf4ed9..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftbbox.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377631784.058547922 -30 atime=1385335786.491824128 -30 ctime=1377631784.058547922 diff --git a/freetype/src/base/PaxHeaders.18661/ftbdf.c b/freetype/src/base/PaxHeaders.18661/ftbdf.c deleted file mode 100644 index 68e558c3..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftbdf.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.404825216 -30 ctime=1374498496.041315653 diff --git a/freetype/src/base/PaxHeaders.18661/ftbitmap.c b/freetype/src/base/PaxHeaders.18661/ftbitmap.c deleted file mode 100644 index aaf0898b..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftbitmap.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375304220.731476452 -30 atime=1385335786.435824828 -30 ctime=1375304220.731476452 diff --git a/freetype/src/base/PaxHeaders.18661/ftcalc.c b/freetype/src/base/PaxHeaders.18661/ftcalc.c deleted file mode 100644 index eefc362e..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftcalc.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377631942.251570237 -30 atime=1385335786.492824116 -30 ctime=1377631942.251570237 diff --git a/freetype/src/base/PaxHeaders.18661/ftcid.c b/freetype/src/base/PaxHeaders.18661/ftcid.c deleted file mode 100644 index 1c89fe10..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftcid.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.330826141 -30 ctime=1374498496.061315403 diff --git a/freetype/src/base/PaxHeaders.18661/ftdbgmem.c b/freetype/src/base/PaxHeaders.18661/ftdbgmem.c deleted file mode 100644 index 0d7b1d79..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftdbgmem.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.493824103 -30 ctime=1374498496.046315591 diff --git a/freetype/src/base/PaxHeaders.18661/ftdebug.c b/freetype/src/base/PaxHeaders.18661/ftdebug.c deleted file mode 100644 index cedf000d..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftdebug.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256033.751776592 -30 atime=1385335760.285151757 -30 ctime=1384256033.751776592 diff --git a/freetype/src/base/PaxHeaders.18661/ftfstype.c b/freetype/src/base/PaxHeaders.18661/ftfstype.c deleted file mode 100644 index e6854b67..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftfstype.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.323826229 -30 ctime=1374498496.103314878 diff --git a/freetype/src/base/PaxHeaders.18661/ftgasp.c b/freetype/src/base/PaxHeaders.18661/ftgasp.c deleted file mode 100644 index e9600875..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftgasp.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.414825091 -30 ctime=1374498496.096314966 diff --git a/freetype/src/base/PaxHeaders.18661/ftgloadr.c b/freetype/src/base/PaxHeaders.18661/ftgloadr.c deleted file mode 100644 index b076d9ff..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftgloadr.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.491824128 -30 ctime=1374498496.048315566 diff --git a/freetype/src/base/PaxHeaders.18661/ftglyph.c b/freetype/src/base/PaxHeaders.18661/ftglyph.c deleted file mode 100644 index edb05496..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftglyph.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375347903.743220214 -30 atime=1385335786.469824403 -30 ctime=1375347903.743220214 diff --git a/freetype/src/base/PaxHeaders.18661/ftgxval.c b/freetype/src/base/PaxHeaders.18661/ftgxval.c deleted file mode 100644 index 79b9279b..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftgxval.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.332826116 -30 ctime=1374498496.042315641 diff --git a/freetype/src/base/PaxHeaders.18661/ftinit.c b/freetype/src/base/PaxHeaders.18661/ftinit.c deleted file mode 100644 index 79dcf371..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftinit.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384256010.457067816 -30 atime=1385335760.286151744 -30 ctime=1384256010.457067816 diff --git a/freetype/src/base/PaxHeaders.18661/ftlcdfil.c b/freetype/src/base/PaxHeaders.18661/ftlcdfil.c deleted file mode 100644 index b819f041..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftlcdfil.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.329826154 -30 ctime=1374498496.054315491 diff --git a/freetype/src/base/PaxHeaders.18661/ftmac.c b/freetype/src/base/PaxHeaders.18661/ftmac.c deleted file mode 100644 index 0ca73621..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftmac.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375345578.734286825 -30 atime=1385335786.303826479 -30 ctime=1375345578.734286825 diff --git a/freetype/src/base/PaxHeaders.18661/ftmm.c b/freetype/src/base/PaxHeaders.18661/ftmm.c deleted file mode 100644 index b819ef1e..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftmm.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.347825929 -30 ctime=1374498496.011316028 diff --git a/freetype/src/base/PaxHeaders.18661/ftobjs.c b/freetype/src/base/PaxHeaders.18661/ftobjs.c deleted file mode 100644 index f527661e..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftobjs.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384973682.041658194 -29 atime=1385335737.46243708 -30 ctime=1384973682.041658194 diff --git a/freetype/src/base/PaxHeaders.18661/ftotval.c b/freetype/src/base/PaxHeaders.18661/ftotval.c deleted file mode 100644 index 41a697e1..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftotval.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.364825716 -30 ctime=1374498496.087315078 diff --git a/freetype/src/base/PaxHeaders.18661/ftoutln.c b/freetype/src/base/PaxHeaders.18661/ftoutln.c deleted file mode 100644 index a1777155..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftoutln.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375345407.291430156 -30 atime=1385335786.389825404 -30 ctime=1375345407.291430156 diff --git a/freetype/src/base/PaxHeaders.18661/ftpatent.c b/freetype/src/base/PaxHeaders.18661/ftpatent.c deleted file mode 100644 index 8ddd720a..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftpatent.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.323826229 -30 ctime=1374498496.078315191 diff --git a/freetype/src/base/PaxHeaders.18661/ftpfr.c b/freetype/src/base/PaxHeaders.18661/ftpfr.c deleted file mode 100644 index d2e189ad..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftpfr.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.343825979 -30 ctime=1374498496.059315428 diff --git a/freetype/src/base/PaxHeaders.18661/ftpic.c b/freetype/src/base/PaxHeaders.18661/ftpic.c deleted file mode 100644 index 362e4da7..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftpic.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375345558.147544195 -30 atime=1385335786.449824653 -30 ctime=1375345558.147544195 diff --git a/freetype/src/base/PaxHeaders.18661/ftrfork.c b/freetype/src/base/PaxHeaders.18661/ftrfork.c deleted file mode 100644 index 01f436e7..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftrfork.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.438824791 -30 ctime=1374498496.102314891 diff --git a/freetype/src/base/PaxHeaders.18661/ftsnames.c b/freetype/src/base/PaxHeaders.18661/ftsnames.c deleted file mode 100644 index 46d774ac..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftsnames.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.332826116 -30 ctime=1374498496.050315541 diff --git a/freetype/src/base/PaxHeaders.18661/ftstream.c b/freetype/src/base/PaxHeaders.18661/ftstream.c deleted file mode 100644 index ba0de706..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftstream.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.331826129 -30 ctime=1374498496.053315503 diff --git a/freetype/src/base/PaxHeaders.18661/ftstroke.c b/freetype/src/base/PaxHeaders.18661/ftstroke.c deleted file mode 100644 index 3699a79b..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftstroke.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.426824941 -30 ctime=1374498496.085315103 diff --git a/freetype/src/base/PaxHeaders.18661/ftsynth.c b/freetype/src/base/PaxHeaders.18661/ftsynth.c deleted file mode 100644 index b07eec96..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftsynth.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1379654413.569438677 -30 atime=1385335786.414825091 -30 ctime=1379654413.571438652 diff --git a/freetype/src/base/PaxHeaders.18661/ftsystem.c b/freetype/src/base/PaxHeaders.18661/ftsystem.c deleted file mode 100644 index c8f5d94a..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftsystem.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.502823991 -30 ctime=1374498496.056315466 diff --git a/freetype/src/base/PaxHeaders.18661/fttrigon.c b/freetype/src/base/PaxHeaders.18661/fttrigon.c deleted file mode 100644 index 83380106..00000000 --- a/freetype/src/base/PaxHeaders.18661/fttrigon.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.343825979 -30 ctime=1374498496.098314941 diff --git a/freetype/src/base/PaxHeaders.18661/fttype1.c b/freetype/src/base/PaxHeaders.18661/fttype1.c deleted file mode 100644 index 5a6f7191..00000000 --- a/freetype/src/base/PaxHeaders.18661/fttype1.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.323826229 -30 ctime=1374498496.077315203 diff --git a/freetype/src/base/PaxHeaders.18661/ftutil.c b/freetype/src/base/PaxHeaders.18661/ftutil.c deleted file mode 100644 index 7b705544..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftutil.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.493824103 -30 ctime=1374498496.095314978 diff --git a/freetype/src/base/PaxHeaders.18661/ftwinfnt.c b/freetype/src/base/PaxHeaders.18661/ftwinfnt.c deleted file mode 100644 index 020f3e55..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftwinfnt.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.449824653 -30 ctime=1374498496.071315278 diff --git a/freetype/src/base/PaxHeaders.18661/ftxf86.c b/freetype/src/base/PaxHeaders.18661/ftxf86.c deleted file mode 100644 index f6fe28ee..00000000 --- a/freetype/src/base/PaxHeaders.18661/ftxf86.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.501824003 -30 ctime=1374498496.066315341 diff --git a/freetype/src/base/PaxHeaders.18661/md5.c b/freetype/src/base/PaxHeaders.18661/md5.c deleted file mode 100644 index 3ef000ec..00000000 --- a/freetype/src/base/PaxHeaders.18661/md5.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.280826766 -30 ctime=1382396464.476505605 diff --git a/freetype/src/base/PaxHeaders.18661/md5.h b/freetype/src/base/PaxHeaders.18661/md5.h deleted file mode 100644 index d3e04569..00000000 --- a/freetype/src/base/PaxHeaders.18661/md5.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.363825729 -30 ctime=1382396466.094485378 diff --git a/freetype/src/base/PaxHeaders.18661/rules.mk b/freetype/src/base/PaxHeaders.18661/rules.mk deleted file mode 100644 index 0d2f6507..00000000 --- a/freetype/src/base/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255970.737564378 -30 atime=1385335760.287151732 -30 ctime=1384255970.737564378 diff --git a/freetype/src/base/basepic.c b/freetype/src/base/basepic.c index 0af770eb..aeb6fd57 100644 --- a/freetype/src/base/basepic.c +++ b/freetype/src/base/basepic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for base. */ /* */ -/* Copyright 2009, 2012 by */ +/* Copyright 2009, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -35,7 +35,7 @@ /* forward declaration of PIC init function from ftrfork.c */ /* (not modularized) */ void - FT_Init_Table_raccess_guess_table( ft_raccess_guess_rec* record ); + FT_Init_Table_ft_raccess_guess_table( ft_raccess_guess_rec* record ); #endif /* forward declaration of PIC init functions from ftinit.c */ @@ -92,7 +92,7 @@ FT_Init_Class_ft_bitmap_glyph_class( &container->ft_bitmap_glyph_class ); #ifdef FT_CONFIG_OPTION_MAC_FONTS - FT_Init_Table_raccess_guess_table( + FT_Init_Table_ft_raccess_guess_table( (ft_raccess_guess_rec*)&container->ft_raccess_guess_table ); #endif diff --git a/freetype/src/base/ftadvanc.c b/freetype/src/base/ftadvanc.c index 52078478..18884efe 100644 --- a/freetype/src/base/ftadvanc.c +++ b/freetype/src/base/ftadvanc.c @@ -4,7 +4,7 @@ /* */ /* Quick computation of advance widths (body). */ /* */ -/* Copyright 2008, 2009, 2011, 2013 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, */ @@ -80,6 +80,9 @@ if ( !face ) return FT_THROW( Invalid_Face_Handle ); + if ( !padvance ) + return FT_THROW( Invalid_Argument ); + if ( gindex >= (FT_UInt)face->num_glyphs ) return FT_THROW( Invalid_Glyph_Index ); @@ -118,6 +121,9 @@ if ( !face ) 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 ) diff --git a/freetype/src/base/ftbbox.c b/freetype/src/base/ftbbox.c index 8d3f383b..f9a17517 100644 --- a/freetype/src/base/ftbbox.c +++ b/freetype/src/base/ftbbox.c @@ -4,7 +4,7 @@ /* */ /* FreeType bbox computation (body). */ /* */ -/* Copyright 1996-2002, 2004, 2006, 2010, 2013 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 */ @@ -42,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. */ @@ -66,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; + } /*************************************************************************/ @@ -155,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, @@ -203,15 +247,48 @@ /* max :: The address of the current maximum. */ /* */ static FT_Pos - update_cubic_max( FT_Pos q1, - FT_Pos q2, - FT_Pos q3, - FT_Pos q4, - FT_Pos max ) + cubic_peak( FT_Pos q1, + FT_Pos q2, + FT_Pos q3, + FT_Pos q4 ) { - /* for a cubic segment to possibly reach new maximum, at least */ - /* one of its off-points must stay above the current value */ - while ( q2 > max || q3 > max ) + 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 ) + { + /* 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; + } + + /* 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 */ @@ -240,17 +317,22 @@ /* check whether either end reached the maximum */ if ( q1 == q2 && q1 >= q3 ) { - max = q1; + peak = q1; break; } if ( q3 == q4 && q2 <= q4 ) { - max = q4; + peak = q4; break; } } - return max; + if ( shift > 0 ) + peak >>= shift; + else + peak <<= -shift; + + return peak; } @@ -262,65 +344,17 @@ FT_Pos* min, FT_Pos* max ) { - FT_Pos nmin, nmax; - FT_Int shift; - - /* 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 using iterative bisection of the segment. */ - /* 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. */ - /* The control off-point outside the bbox is likely to have the top */ - /* absolute value among arguments. */ + /* 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. */ - shift = 27 - FT_MSB( FT_ABS( p2 ) | FT_ABS( p3 ) ); - - if ( shift > 0 ) - { - /* upscaling too much just wastes time */ - if ( shift > 2 ) - shift = 2; - - p1 <<= shift; - p2 <<= shift; - p3 <<= shift; - p4 <<= shift; - nmin = *min << shift; - nmax = *max << shift; - } - else - { - p1 >>= -shift; - p2 >>= -shift; - p3 >>= -shift; - p4 >>= -shift; - nmin = *min >> -shift; - nmax = *max >> -shift; - } - - nmax = update_cubic_max( p1, p2, p3, p4, nmax ); + if ( p2 > *max || p3 > *max ) + *max += cubic_peak( p1 - *max, p2 - *max, p3 - *max, p4 - *max ); /* now flip the signs to update the minimum */ - nmin = -update_cubic_max( -p1, -p2, -p3, -p4, -nmin ); - - if ( shift > 0 ) - { - nmin >>= shift; - nmax >>= shift; - } - else - { - nmin <<= -shift; - nmax <<= -shift; - } - - if ( nmin < *min ) - *min = nmin; - if ( nmax > *max ) - *max = nmax; + if ( p2 < *min || p3 < *min ) + *min -= cubic_peak( *min - p1, *min - p2, *min - p3, *min - p4 ); } @@ -385,22 +419,26 @@ 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; @@ -424,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/freetype/src/base/ftbdf.c b/freetype/src/base/ftbdf.c index 5755f855..d9dcbad5 100644 --- a/freetype/src/base/ftbdf.c +++ b/freetype/src/base/ftbdf.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing BDF-specific strings (body). */ /* */ -/* Copyright 2002-2004, 2013 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; - - error = FT_ERR( Invalid_Argument ); - - if ( face ) - { - FT_Service_BDF service; + FT_Service_BDF service; - FT_FACE_FIND_SERVICE( face, service, BDF ); + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); - if ( service && service->get_charset_id ) - error = service->get_charset_id( face, &encoding, ®istry ); - } + FT_FACE_FIND_SERVICE( face, service, BDF ); + + if ( service && service->get_charset_id ) + error = service->get_charset_id( face, &encoding, ®istry ); + 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 ); + + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + + if ( !aproperty ) + return FT_THROW( Invalid_Argument ); aproperty->type = BDF_PROPERTY_TYPE_NONE; - if ( face ) - { - FT_Service_BDF service; + FT_FACE_FIND_SERVICE( face, service, BDF ); + if ( service && service->get_property ) + error = service->get_property( face, prop_name, aproperty ); + else + error = FT_THROW( Invalid_Argument ); - FT_FACE_FIND_SERVICE( face, service, BDF ); - - if ( service && service->get_property ) - error = service->get_property( face, prop_name, aproperty ); - } - - return error; + return error; } diff --git a/freetype/src/base/ftbitmap.c b/freetype/src/base/ftbitmap.c index 182b1cc2..19a1a807 100644 --- a/freetype/src/base/ftbitmap.c +++ b/freetype/src/base/ftbitmap.c @@ -4,7 +4,7 @@ /* */ /* FreeType utility functions for bitmaps (body). */ /* */ -/* Copyright 2004-2009, 2011, 2013 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, */ @@ -33,7 +33,8 @@ FT_EXPORT_DEF( void ) FT_Bitmap_New( FT_Bitmap *abitmap ) { - *abitmap = null_bitmap; + if ( abitmap ) + *abitmap = null_bitmap; } @@ -44,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 ) { @@ -70,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 ); @@ -89,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, @@ -106,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; @@ -144,17 +184,17 @@ 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 ) @@ -168,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++ ) @@ -189,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++ ) @@ -220,7 +263,8 @@ { FT_Error error; unsigned char* p; - FT_Int i, x, y, pitch; + FT_Int i, x, pitch; + FT_UInt y; FT_Int xstr, ystr; @@ -248,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; @@ -289,6 +327,7 @@ if ( error ) return error; + /* take care of bitmap flow */ pitch = bitmap->pitch; if ( pitch > 0 ) p = bitmap->buffer + pitch * ystr; @@ -309,7 +348,7 @@ */ for ( x = pitch - 1; x >= 0; x-- ) { - unsigned char tmp; + unsigned char tmp; tmp = p[x]; @@ -324,7 +363,7 @@ p[x] |= p[x - 1] << ( 8 - i ); #if 0 - if ( p[x] == 0xff ) + if ( p[x] == 0xFF ) break; #endif } @@ -334,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; } @@ -375,17 +414,14 @@ } - FT_Byte + static FT_Byte ft_gray_for_premultiplied_srgb_bgra( const FT_Byte* bgra ) { - FT_Long a = bgra[3]; - FT_Long b = bgra[0]; - FT_Long g = bgra[1]; - FT_Long r = bgra[2]; - FT_Long l; + FT_UInt a = bgra[3]; + FT_UInt l; - /* Short-circuit transparent color to avoid div-by-zero. */ + /* Short-circuit transparent color to avoid division by zero. */ if ( !a ) return 0; @@ -395,40 +431,32 @@ * 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 + * 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. * - * We do the computation with integers only. */ - /* Undo premultification, get the number in a 16.16 form. */ - b = FT_MulDiv( b, 65536, a ); - g = FT_MulDiv( g, 65536, a ); - r = FT_MulDiv( r, 65536, a ); - a = a * 256; - - /* Apply gamma of 2.0 instead of 2.2. */ - b = FT_MulFix( b, b ); - g = FT_MulFix( g, g ); - r = FT_MulFix( r, r ); - - /* Apply coefficients. */ - b = FT_MulFix( b, 4731 /* 0.0722 * 65536 */ ); - g = FT_MulFix( g, 46871 /* 0.7152 * 65536 */ ); - r = FT_MulFix( r, 13933 /* 0.2126 * 65536 */ ); - - l = r + g + b; + 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 this way: + * 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). + * 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)( FT_MulFix( 65535 - l, a ) >> 8 ); + return (FT_Byte)( a - l / a ); } @@ -443,10 +471,16 @@ FT_Error error = FT_Err_Ok; FT_Memory memory; + FT_Byte* s; + FT_Byte* t; + if ( !library ) return FT_THROW( Invalid_Library_Handle ); + if ( !source || !target ) + return FT_THROW( Invalid_Argument ); + memory = library->memory; switch ( source->pixel_mode ) @@ -459,13 +493,15 @@ 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_size = target->rows * target->pitch; - if ( old_size < 0 ) - old_size = -old_size; + old_target_pitch = target->pitch; + if ( old_target_pitch < 0 ) + old_target_pitch = -old_target_pitch; + + old_size = target->rows * old_target_pitch; target->pixel_mode = FT_PIXEL_MODE_GRAY; target->rows = source->rows; @@ -479,16 +515,18 @@ 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 ) + 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; @@ -496,13 +534,20 @@ 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; @@ -511,7 +556,7 @@ { FT_Byte* ss = s; FT_Byte* tt = t; - FT_Int j; + FT_UInt j; /* get the full bytes */ @@ -559,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; @@ -573,8 +614,8 @@ { FT_ARRAY_COPY( t, s, width ); - s += s_pitch; - t += t_pitch; + s += source->pitch; + t += target->pitch; } } break; @@ -582,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; @@ -593,7 +632,7 @@ { FT_Byte* ss = s; FT_Byte* tt = t; - FT_Int j; + FT_UInt j; /* get the full bytes */ @@ -634,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; @@ -645,7 +682,7 @@ { FT_Byte* ss = s; FT_Byte* tt = t; - FT_Int j; + FT_UInt j; /* get the full bytes */ @@ -670,13 +707,10 @@ } break; + case FT_PIXEL_MODE_BGRA: { - 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_UInt i; target->num_grays = 256; @@ -685,7 +719,7 @@ { FT_Byte* ss = s; FT_Byte* tt = t; - FT_Int j; + FT_UInt j; for ( j = source->width; j > 0; j-- ) @@ -696,8 +730,8 @@ tt += 1; } - s += s_pitch; - t += t_pitch; + s += source->pitch; + t += target->pitch; } } break; diff --git a/freetype/src/base/ftcalc.c b/freetype/src/base/ftcalc.c index b23b4d44..57f79680 100644 --- a/freetype/src/base/ftcalc.c +++ b/freetype/src/base/ftcalc.c @@ -4,7 +4,7 @@ /* */ /* Arithmetic computations (body). */ /* */ -/* Copyright 1996-2006, 2008, 2012-2013 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, */ @@ -39,7 +39,8 @@ #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_OBJECTS_H -#ifdef FT_MULFIX_INLINED + +#ifdef FT_MULFIX_ASSEMBLER #undef FT_MulFix #endif @@ -67,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. */ @@ -75,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 ); } @@ -85,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 ); } @@ -95,46 +106,50 @@ 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 FT_BASE_DEF ( FT_Int ) FT_MSB( FT_UInt32 z ) { - FT_Int shift = 0; + FT_Int shift = 0; + /* determine msb bit index in `shift' */ - if ( z >= ( 1L << 16 ) ) + if ( z & 0xFFFF0000UL ) { z >>= 16; shift += 16; } - if ( z >= ( 1L << 8 ) ) + if ( z & 0x0000FF00UL ) { z >>= 8; shift += 8; } - if ( z >= ( 1L << 4 ) ) + if ( z & 0x000000F0UL ) { z >>= 4; shift += 4; } - if ( z >= ( 1L << 2 ) ) + if ( z & 0x0000000CUL ) { z >>= 2; shift += 2; } - if ( z >= ( 1L << 1 ) ) + if ( z & 0x00000002UL ) { - z >>= 1; + /* z >>= 1; */ shift += 1; } return shift; } +#endif /* !FT_MSB */ + /* documentation is in ftcalc.h */ @@ -162,19 +177,18 @@ 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; } @@ -185,19 +199,18 @@ 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; } @@ -217,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 */ } @@ -243,30 +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; - } + FT_MOVE_SIGN( a, s ); + FT_MOVE_SIGN( b, s ); - if ( b == 0 ) - /* check for division by 0 */ - q = 0x7FFFFFFFL; - else - /* compute result directly */ - q = (FT_UInt32)( ( ( (FT_UInt64)a << 16 ) + ( b >> 1 ) ) / b ); + q = (FT_Long)( b > 0 ? ( ( (FT_UInt64)a << 16 ) + ( b >> 1 ) ) / b + : 0x7FFFFFFFL ); - return ( s < 0 ? -(FT_Long)q : (FT_Long)q ); + return s < 0 ? -q : q; } @@ -314,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; @@ -344,7 +340,7 @@ FT_Int64* y, FT_Int64 *z ) { - register FT_UInt32 lo, hi; + FT_UInt32 lo, hi; lo = x->lo + y->lo; @@ -355,60 +351,95 @@ } - /* documentation is in freetype.h */ + /* 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) , */ + /* */ + /* 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 */ + /* */ + /* a + b <= 131071.99 - c / 122291.84 . */ + /* */ + /* In practice, we should use a faster and even stronger inequality */ + /* */ + /* a + b <= 131071 - (c >> 16) */ + /* */ + /* or, alternatively, */ + /* */ + /* 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) . */ - /* 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). */ - /* */ - /* we compute 'a*b+c/2', then divide it by 'c'. (positive values) */ - /* */ - /* 46340 is FLOOR(SQRT(2^31-1)). */ - /* */ - /* if ( a <= 46340 && b <= 46340 ) then ( a*b <= 0x7FFEA810 ) */ - /* */ - /* 0x7FFFFFFF - 0x7FFEA810 = 0x157F0 */ - /* */ - /* if ( c < 0x157F0*2 ) then ( a*b+c/2 <= 0x7FFFFFFF ) */ - /* */ - /* and 2*0x157F0 = 176096 */ - /* */ + /* 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 ( a <= 46340L && b <= 46340L && c <= 176095L && c > 0 ) - a = ( a * b + ( c >> 1 ) ) / c; + if ( c == 0 ) + a = 0x7FFFFFFFL; - else if ( (FT_Int32)c > 0 ) + else if ( (FT_ULong)a + b <= 129894UL - ( c >> 17 ) ) + a = ( (FT_ULong)a * b + ( c >> 1 ) ) / c; + + 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); - FT_Add64( &temp, &temp2, &temp ); - a = ft_div64by32( temp.hi, temp.lo, (FT_Int32)c ); - } - else - a = 0x7FFFFFFFL; + temp2.lo = c >> 1; - return ( s < 0 ? -a : a ); + FT_Add64( &temp, &temp2, &temp ); + + /* last attempt to ditch long division */ + a = temp.hi == 0 ? temp.lo / c + : ft_div64by32( temp.hi, temp.lo, c ); + } + + return s < 0 ? -a : a; } @@ -417,31 +448,35 @@ 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 ( a <= 46340L && b <= 46340L && c > 0 ) - a = a * b / c; + if ( c == 0 ) + a = 0x7FFFFFFFL; - else if ( (FT_Int32)c > 0 ) + else if ( (FT_ULong)a + b <= 131071UL ) + a = (FT_ULong)a * b / c; + + else { FT_Int64 temp; - ft_multo64( (FT_Int32)a, (FT_Int32)b, &temp ); - a = ft_div64by32( temp.hi, temp.lo, (FT_Int32)c ); - } - else - a = 0x7FFFFFFFL; + ft_multo64( a, b, &temp ); - return ( s < 0 ? -a : a ); + /* last attempt to ditch long division */ + a = temp.hi == 0 ? temp.lo / c + : ft_div64by32( temp.hi, temp.lo, c ); + } + + return s < 0 ? -a : a; } @@ -497,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 { @@ -515,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 { @@ -539,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 */ @@ -552,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)( ( (FT_ULong)a << 16 ) + ( b >> 1 ) ) / (FT_UInt32)b; + q = (FT_Long)( ( ( (FT_ULong)a << 16 ) + ( b >> 1 ) ) / b ); } else { @@ -576,139 +612,19 @@ 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 ); + temp2.lo = b >> 1; + FT_Add64( &temp, &temp2, &temp ); - q = ft_div64by32( temp.hi, temp.lo, (FT_Int32)b ); + q = (FT_Long)ft_div64by32( temp.hi, temp.lo, b ); } - return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); + return s < 0 ? -q : 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 ); - } - } - - - /* 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 ); - } - - q = ft_div64by32( x->hi, x->lo, y ); - - return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); - } - -#endif /* 0 */ - -#endif /* 0 */ - - #endif /* FT_LONG64 */ @@ -943,55 +859,40 @@ FT_Pos out_x, FT_Pos out_y ) { - FT_Pos ax = in_x; - FT_Pos ay = in_y; + FT_Pos ax = in_x + out_x; + FT_Pos ay = in_y + out_y; - FT_Pos d_in, d_out, d_corner; + FT_Pos d_in, d_out, d_hypot; - /* We approximate the Euclidean metric (sqrt(x^2 + y^2)) with */ - /* the Taxicab metric (|x| + |y|), which can be computed much */ - /* faster. If one of the two vectors is much longer than the */ - /* other one, the direction of the shorter vector doesn't */ - /* influence the result any more. */ - /* */ - /* corner */ - /* x---------------------------x */ - /* \ / */ - /* \ / */ - /* in \ / out */ - /* \ / */ - /* o */ - /* Point */ - /* */ + /* 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 */ - if ( ax < 0 ) - ax = -ax; - if ( ay < 0 ) - ay = -ay; - d_in = ax + ay; /* d_in = || in || */ - - ax = out_x; - if ( ax < 0 ) - ax = -ax; - ay = out_y; - if ( ay < 0 ) - ay = -ay; - d_out = ax + ay; /* d_out = || out || */ - - ax = out_x + in_x; - if ( ax < 0 ) - ax = -ax; - ay = out_y + in_y; - if ( ay < 0 ) - ay = -ay; - d_corner = ax + ay; /* d_corner = || in + out || */ + 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_corner */ + /* d_in + d_out < 17/16 d_hypot */ - return ( d_in + d_out - d_corner ) < ( d_corner >> 4 ); + return ( d_in + d_out - d_hypot ) < ( d_hypot >> 4 ); } diff --git a/freetype/src/base/ftfstype.c b/freetype/src/base/ftfstype.c index d0ef7b7c..6b49ef83 100644 --- a/freetype/src/base/ftfstype.c +++ b/freetype/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/freetype/src/base/ftglyph.c b/freetype/src/base/ftglyph.c index c62b3db0..ac178c41 100644 --- a/freetype/src/base/ftglyph.c +++ b/freetype/src/base/ftglyph.c @@ -4,7 +4,7 @@ /* */ /* FreeType convenience functions to handle glyphs (body). */ /* */ -/* Copyright 1996-2005, 2007, 2008, 2010, 2012, 2013 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, */ @@ -314,13 +314,13 @@ /* check arguments */ - if ( !target ) + if ( !target || !source || !source->clazz ) { error = FT_THROW( Invalid_Argument ); goto Exit; } - *target = 0; + *target = NULL; if ( !source || !source->clazz ) { @@ -359,7 +359,7 @@ FT_Error error; FT_Glyph glyph; - const FT_Glyph_Class* clazz = 0; + const FT_Glyph_Class* clazz = NULL; if ( !slot ) @@ -512,7 +512,7 @@ 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; diff --git a/freetype/src/base/ftgxval.c b/freetype/src/base/ftgxval.c index a8ec44ac..a65f4c87 100644 --- a/freetype/src/base/ftgxval.c +++ b/freetype/src/base/ftgxval.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating TrueTyepGX/AAT tables (body). */ /* */ -/* Copyright 2004-2006, 2010, 2013 by */ +/* Copyright 2004-2006, 2010, 2013, 2014 by */ /* Masatake YAMATO, Redhat K.K, */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -50,7 +50,7 @@ goto Exit; } - if ( tables == NULL ) + if ( !tables ) { error = FT_THROW( Invalid_Argument ); goto Exit; @@ -102,7 +102,7 @@ goto Exit; } - if ( ckern_table == NULL ) + if ( !ckern_table ) { error = FT_THROW( Invalid_Argument ); goto Exit; diff --git a/freetype/src/base/ftinit.c b/freetype/src/base/ftinit.c index 6176273f..c4c88201 100644 --- a/freetype/src/base/ftinit.c +++ b/freetype/src/base/ftinit.c @@ -4,7 +4,7 @@ /* */ /* FreeType initialization layer (body). */ /* */ -/* Copyright 1996-2002, 2005, 2007, 2009, 2012, 2013 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, */ @@ -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'. */ @@ -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; - /* Discard the library object */ - FT_Done_Library( library ); + if ( !library ) + return FT_THROW( Invalid_Library_Handle ); - /* discard memory manager */ - FT_Done_Memory( memory ); - } + memory = library->memory; + + /* Discard the library object */ + FT_Done_Library( library ); + + /* discard memory manager */ + FT_Done_Memory( memory ); return FT_Err_Ok; } diff --git a/freetype/src/base/ftlcdfil.c b/freetype/src/base/ftlcdfil.c index 852fb329..d8bcbbf1 100644 --- a/freetype/src/base/ftlcdfil.c +++ b/freetype/src/base/ftlcdfil.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for color filtering of subpixel bitmap glyphs (body). */ /* */ -/* Copyright 2006, 2008-2010, 2013 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, */ @@ -46,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; @@ -57,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; @@ -78,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; } @@ -87,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; } } @@ -104,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; @@ -116,7 +126,6 @@ fir[1] = weights[3] * val1; fir[2] = weights[4] * val1; fir[3] = 0; - fir[4] = 0; col += pitch; val1 = col[0]; @@ -139,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; } @@ -149,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; } } @@ -189,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; @@ -228,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; @@ -272,7 +289,10 @@ FT_Library_SetLcdFilterWeights( FT_Library library, unsigned char *weights ) { - if ( !library || !weights ) + if ( !library ) + return FT_THROW( Invalid_Library_Handle ); + + if ( !weights ) return FT_THROW( Invalid_Argument ); ft_memcpy( library->lcd_weights, weights, 5 ); @@ -294,7 +314,7 @@ if ( !library ) - return FT_THROW( Invalid_Argument ); + return FT_THROW( Invalid_Library_Handle ); switch ( filter ) { diff --git a/freetype/src/base/ftmac.c b/freetype/src/base/ftmac.c index 9b49da81..5301ab44 100644 --- a/freetype/src/base/ftmac.c +++ b/freetype/src/base/ftmac.c @@ -8,7 +8,7 @@ /* This file is for Mac OS X only; see builds/mac/ftoldmac.c for */ /* classic platforms built by MPW. */ /* */ -/* Copyright 1996-2009, 2013 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, */ @@ -227,6 +227,9 @@ FT_Error err; + if ( !fontName || !face_index ) + return FT_THROW( Invalid_Argument) ; + err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index ); if ( err ) return err; @@ -256,6 +259,9 @@ FT_Error err; + if ( !fontName || !face_index ) + return FT_THROW( Invalid_Argument ); + err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index ); if ( err ) return err; @@ -440,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]; @@ -459,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]; @@ -852,6 +859,8 @@ 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_THROW( Invalid_File_Format ); @@ -997,9 +1006,13 @@ { 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_THROW( Invalid_Argument ); @@ -1047,6 +1060,8 @@ FSRef ref; + /* check of `library' and `aface' delayed to `FT_New_Face_From_FSRef' */ + if ( !spec || FSpMakeFSRef( spec, &ref ) != noErr ) return FT_THROW( Invalid_Argument ); else diff --git a/freetype/src/base/ftmm.c b/freetype/src/base/ftmm.c index 18ff879b..056680bd 100644 --- a/freetype/src/base/ftmm.c +++ b/freetype/src/base/ftmm.c @@ -4,7 +4,7 @@ /* */ /* Multiple Master font support (body). */ /* */ -/* Copyright 1996-2001, 2003, 2004, 2009, 2013 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, */ @@ -72,6 +72,11 @@ 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 ) { @@ -94,6 +99,11 @@ 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 ) { @@ -117,6 +127,11 @@ 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 ) { @@ -140,6 +155,11 @@ 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 ) { @@ -163,6 +183,11 @@ 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 ) { @@ -189,6 +214,11 @@ 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 ) { diff --git a/freetype/src/base/ftobjs.c b/freetype/src/base/ftobjs.c index b1c2a2bf..ee15a016 100644 --- a/freetype/src/base/ftobjs.c +++ b/freetype/src/base/ftobjs.c @@ -4,7 +4,7 @@ /* */ /* The FreeType private base classes (body). */ /* */ -/* Copyright 1996-2013 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, */ @@ -408,7 +408,10 @@ FT_GlyphSlot slot = NULL; - if ( !face || !face->driver ) + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + + if ( !face->driver ) return FT_THROW( Invalid_Argument ); driver = face->driver; @@ -508,6 +511,7 @@ internal->transform_matrix.xy = 0; internal->transform_matrix.yx = 0; internal->transform_matrix.yy = 0x10000L; + matrix = &internal->transform_matrix; } else @@ -523,6 +527,7 @@ { internal->transform_delta.x = 0; internal->transform_delta.y = 0; + delta = &internal->transform_delta; } else @@ -1040,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; } @@ -1062,14 +1059,6 @@ { 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; } @@ -1111,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; @@ -1243,7 +1222,7 @@ 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_THROW( Invalid_Argument ); @@ -1269,7 +1248,7 @@ 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_THROW( Invalid_Argument ); @@ -1583,9 +1562,9 @@ 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 ) @@ -1601,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; @@ -1625,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 */ @@ -1647,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 ); @@ -1657,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; @@ -1672,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; @@ -1702,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: @@ -1801,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 ) { @@ -1816,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 ) { @@ -1878,7 +1910,7 @@ rlen = ( header[0x57] << 24 ) | ( header[0x58] << 16 ) | ( header[0x59] << 8 ) | - header[0x5a]; + header[0x5A]; #endif /* 0 */ offset = 128 + ( ( dlen + 127 ) & ~127 ); @@ -2046,8 +2078,7 @@ 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_THROW( Invalid_Argument ); @@ -2294,7 +2325,7 @@ 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_THROW( Invalid_Argument ); @@ -2320,7 +2351,7 @@ 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_THROW( Invalid_Face_Handle ); @@ -2356,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; @@ -2422,7 +2456,7 @@ return FT_THROW( Invalid_Face_Handle ); if ( !asize ) - return FT_THROW( Invalid_Size_Handle ); + return FT_THROW( Invalid_Argument ); if ( !face->driver ) return FT_THROW( Invalid_Driver_Handle ); @@ -2931,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 ) @@ -2969,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 ) @@ -3119,15 +3157,6 @@ { 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; } @@ -3151,8 +3180,9 @@ return FT_THROW( Invalid_Face_Handle ); cur = face->charmaps; - if ( !cur ) + if ( !cur || !charmap ) return FT_THROW( Invalid_CharMap_Handle ); + if ( FT_Get_CMap_Format( charmap ) == 14 ) return FT_THROW( Invalid_Argument ); @@ -3162,19 +3192,11 @@ { 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_THROW( Invalid_Argument ); } @@ -3196,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; } @@ -3357,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 ); @@ -3388,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; @@ -3412,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 ); @@ -3591,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; @@ -3616,27 +3635,30 @@ FT_Pointer buffer, FT_UInt buffer_max ) { - FT_Error error = FT_ERR( Invalid_Argument ); + FT_Error error; + FT_Service_GlyphDict service; + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + + if ( !buffer || buffer_max == 0 ) + return FT_THROW( Invalid_Argument ); + /* clean up buffer */ - if ( buffer && buffer_max > 0 ) - ((FT_Byte*)buffer)[0] = 0; + ((FT_Byte*)buffer)[0] = '\0'; - if ( face && - (FT_Long)glyph_index <= face->num_glyphs && - FT_HAS_GLYPH_NAMES( face ) ) - { - FT_Service_GlyphDict service; + if ( (FT_Long)glyph_index >= face->num_glyphs ) + return FT_THROW( Invalid_Glyph_Index ); + 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 ); - } + 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; } @@ -3677,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; @@ -3727,6 +3749,8 @@ FT_ULong offset; + /* test for valid `length' delayed to `service->table_info' */ + if ( !face || !FT_IS_SFNT( face ) ) return FT_THROW( Invalid_Face_Handle ); @@ -3794,12 +3818,12 @@ FT_Face face; - if ( size == NULL ) - return FT_THROW( Invalid_Argument ); + if ( !size ) + return FT_THROW( Invalid_Size_Handle ); face = size->face; - if ( face == NULL || face->driver == NULL ) - return FT_THROW( 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 */ @@ -3941,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 ) { @@ -3972,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 ); } @@ -3989,12 +4019,26 @@ FT_ListNode node; FT_Error error = FT_Err_Ok; + FT_Renderer_SetModeFunc set_mode; + if ( !library ) - return FT_THROW( Invalid_Library_Handle ); + { + error = FT_THROW( Invalid_Library_Handle ); + goto Exit; + } if ( !renderer ) - return FT_THROW( 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 ) @@ -4008,18 +4052,14 @@ if ( renderer->glyph_format == FT_GLYPH_FORMAT_OUTLINE ) library->cur_renderer = renderer; - if ( num_params > 0 ) + set_mode = renderer->clazz->set_mode; + + for ( ; num_params > 0; num_params-- ) { - FT_Renderer_SetModeFunc set_mode = renderer->clazz->set_mode; - - - for ( ; num_params > 0; num_params-- ) - { - error = set_mode( renderer, parameters->tag, parameters->data ); - if ( error ) - break; - parameters++; - } + error = set_mode( renderer, parameters->tag, parameters->data ); + if ( error ) + break; + parameters++; } Exit: @@ -4078,7 +4118,11 @@ /* 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; + } } } @@ -4088,6 +4132,7 @@ #define FT_COMPONENT trace_bitmap /* we convert to a single bitmap format for computing the checksum */ + if ( !error ) { FT_Bitmap bitmap; FT_Error err; @@ -4095,6 +4140,7 @@ 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 ) { @@ -4336,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; @@ -4461,7 +4507,7 @@ } - FT_Error + static FT_Error ft_property_do( FT_Library library, const FT_String* module_name, const FT_String* property_name, @@ -4591,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; @@ -4607,7 +4656,7 @@ FT_Error error; - if ( !memory ) + if ( !memory || !alibrary ) return FT_THROW( Invalid_Argument ); #ifdef FT_DEBUG_LEVEL_ERROR @@ -4869,6 +4918,8 @@ *p_arg1 = subg->arg1; *p_arg2 = subg->arg2; *p_transform = subg->transform; + + error = FT_Err_Ok; } return error; diff --git a/freetype/src/base/ftoutln.c b/freetype/src/base/ftoutln.c index 177a4cab..8749d64c 100644 --- a/freetype/src/base/ftoutln.c +++ b/freetype/src/base/ftoutln.c @@ -4,7 +4,7 @@ /* */ /* FreeType outline management (body). */ /* */ -/* Copyright 1996-2008, 2010, 2012-2013 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, */ @@ -73,7 +73,10 @@ FT_Pos delta; - if ( !outline || !func_interface ) + if ( !outline ) + return FT_THROW( Invalid_Outline ); + + if ( !func_interface ) return FT_THROW( Invalid_Argument ); shift = func_interface->shift; @@ -128,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--; @@ -362,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 ) @@ -384,7 +387,7 @@ goto Bad; /* XXX: check the tags array */ - return 0; + return FT_Err_Ok; } Bad: @@ -401,8 +404,10 @@ 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_THROW( Invalid_Argument ); @@ -430,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; - } - else + 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 ); + } + *outline = null_outline; + + return FT_Err_Ok; } @@ -614,7 +620,10 @@ if ( !library ) return FT_THROW( Invalid_Library_Handle ); - if ( !outline || !params ) + if ( !outline ) + return FT_THROW( Invalid_Outline ); + + if ( !params ) return FT_THROW( Invalid_Argument ); renderer = library->cur_renderer; @@ -643,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; } @@ -662,7 +671,7 @@ if ( !abitmap ) 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; @@ -723,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; \ @@ -910,7 +920,7 @@ if ( !outline ) - return FT_THROW( Invalid_Argument ); + return FT_THROW( Invalid_Outline ); xstrength /= 2; ystrength /= 2; @@ -1044,6 +1054,10 @@ FT_Outline_Get_CBox( outline, &cbox ); + /* Handle collapsed outlines to avoid undefined FT_MSB. */ + if ( cbox.xMin == cbox.xMax || cbox.yMin == cbox.yMax ) + return FT_ORIENTATION_NONE; + xshift = FT_MSB( FT_ABS( cbox.xMax ) | FT_ABS( cbox.xMin ) ) - 14; xshift = FT_MAX( xshift, 0 ); diff --git a/freetype/src/base/ftpfr.c b/freetype/src/base/ftpfr.c index 0ba955f0..7425abe3 100644 --- a/freetype/src/base/ftpfr.c +++ b/freetype/src/base/ftpfr.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing PFR-specific data (body). */ /* */ -/* Copyright 2002-2004, 2008, 2010, 2013 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, */ @@ -50,7 +50,7 @@ if ( !face ) - return FT_THROW( Invalid_Argument ); + return FT_THROW( Invalid_Face_Handle ); service = ft_pfr_check( face ); if ( service ) @@ -106,6 +106,9 @@ if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + + if ( !avector ) return FT_THROW( Invalid_Argument ); service = ft_pfr_check( face ); @@ -130,11 +133,15 @@ 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_THROW( Invalid_Argument ); diff --git a/freetype/src/base/ftrfork.c b/freetype/src/base/ftrfork.c index 80491172..efe24d6e 100644 --- a/freetype/src/base/ftrfork.c +++ b/freetype/src/base/ftrfork.c @@ -4,7 +4,7 @@ /* */ /* Embedded resource forks accessor (body). */ /* */ -/* Copyright 2004-2010, 2013 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 @@ -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; diff --git a/freetype/src/base/ftstream.c b/freetype/src/base/ftstream.c index d965333d..759fd8fc 100644 --- a/freetype/src/base/ftstream.c +++ b/freetype/src/base/ftstream.c @@ -728,9 +728,12 @@ FT_Byte* cursor; - if ( !fields || !stream ) + if ( !fields ) return FT_THROW( Invalid_Argument ); + if ( !stream ) + return FT_THROW( Invalid_Stream_Handle ); + cursor = stream->cursor; error = FT_Err_Ok; diff --git a/freetype/src/base/ftstroke.c b/freetype/src/base/ftstroke.c index ee61ceca..5fc41fc8 100644 --- a/freetype/src/base/ftstroke.c +++ b/freetype/src/base/ftstroke.c @@ -4,7 +4,7 @@ /* */ /* FreeType path stroker (body). */ /* */ -/* Copyright 2002-2006, 2008-2011, 2013 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, */ @@ -795,6 +795,9 @@ if ( !library ) + 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 ); } @@ -1287,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; @@ -1360,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 ) && @@ -1556,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 ) && @@ -1758,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. */ @@ -1858,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; @@ -1983,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 ) @@ -1997,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; } @@ -2010,6 +2051,9 @@ FT_StrokerBorder border, FT_Outline* outline ) { + if ( !stroker || !outline ) + return; + if ( border == FT_STROKER_BORDER_LEFT || border == FT_STROKER_BORDER_RIGHT ) { @@ -2059,7 +2103,10 @@ FT_Int tag; /* current point's state */ - if ( !outline || !stroker ) + if ( !outline ) + return FT_THROW( Invalid_Outline ); + + if ( !stroker ) return FT_THROW( Invalid_Argument ); FT_Stroker_Rewind( stroker ); @@ -2258,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; { @@ -2293,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 ); @@ -2334,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; { @@ -2379,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/freetype/src/base/ftsynth.c b/freetype/src/base/ftsynth.c index 3098a60f..0567bd53 100644 --- a/freetype/src/base/ftsynth.c +++ b/freetype/src/base/ftsynth.c @@ -4,7 +4,7 @@ /* */ /* FreeType synthesizing code for emboldening and slanting (body). */ /* */ -/* Copyright 2000-2006, 2010, 2012, 2013 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, */ @@ -48,9 +48,14 @@ 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 ) return; @@ -84,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; @@ -100,10 +111,8 @@ ystr = xstr; if ( slot->format == FT_GLYPH_FORMAT_OUTLINE ) - { - /* ignore error */ - (void)FT_Outline_EmboldenXY( &slot->outline, xstr, ystr ); - } + FT_Outline_EmboldenXY( &slot->outline, xstr, ystr ); + else /* slot->format == FT_GLYPH_FORMAT_BITMAP */ { /* round to full pixels */ diff --git a/freetype/src/base/fttrigon.c b/freetype/src/base/fttrigon.c index 4ffdcb77..22b7ecf1 100644 --- a/freetype/src/base/fttrigon.c +++ b/freetype/src/base/fttrigon.c @@ -4,7 +4,7 @@ /* */ /* FreeType trigonometric functions (body). */ /* */ -/* Copyright 2001-2005, 2012-2013 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, */ @@ -45,7 +45,7 @@ /* this table was generated for FT_PI = 180L << 16, i.e. degrees */ #define FT_TRIG_MAX_ITERS 23 - static const FT_Fixed + static const FT_Angle ft_trig_arctan_table[] = { 1740967L, 919879L, 466945L, 234379L, 117304L, 58666L, 29335L, @@ -60,17 +60,20 @@ static FT_Fixed ft_trig_downscale( FT_Fixed val ) { - FT_Fixed s; - FT_Int64 v; + FT_Int s = 1; - s = val; - val = FT_ABS( 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_LONG64 */ @@ -79,38 +82,53 @@ 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; - s = val; - val = FT_ABS( val ); + if ( val < 0 ) + { + val = -val; + s = -1; + } - v1 = (FT_UInt32)val >> 16; - v2 = (FT_UInt32)( val & 0xFFFFL ); + lo1 = val & 0x0000FFFFU; + hi1 = val >> 16; + lo2 = FT_TRIG_SCALE & 0x0000FFFFU; + hi2 = FT_TRIG_SCALE >> 16; - k1 = (FT_UInt32)FT_TRIG_SCALE >> 16; /* constant */ - k2 = (FT_UInt32)( FT_TRIG_SCALE & 0xFFFFL ); /* constant */ + lo = lo1 * lo2; + i1 = lo1 * hi2; + i2 = lo2 * hi1; + hi = hi1 * hi2; - hi = k1 * v1; - lo1 = k1 * v2 + k2 * v1; /* can't overflow */ + /* Check carry overflow of i1 + i2 */ + i1 += i2; + hi += (FT_UInt32)( i1 < i2 ) << 16; - lo2 = ( k2 * v2 ) >> 16; - lo3 = FT_MAX( lo1, lo2 ); - lo1 += lo2; + hi += i1 >> 16; + i1 = i1 << 16; - hi += lo1 >> 16; - if ( lo1 < lo3 ) - hi += (FT_UInt32)0x10000UL; + /* Check carry overflow of i1 + lo */ + lo += i1; + hi += ( lo < i1 ); + + /* 0x40000000 comes from regression analysis between true */ + /* and CORDIC hypotenuse, so it minimizes the error */ + + /* 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_LONG64 */ + /* undefined and never called for zero vector */ static FT_Int ft_trig_prenorm( FT_Vector* vec ) { @@ -147,7 +165,7 @@ { FT_Int i; FT_Fixed x, y, xtemp, b; - const FT_Fixed *arctanptr; + const FT_Angle *arctanptr; x = vec->x; @@ -202,7 +220,7 @@ FT_Angle theta; FT_Int i; FT_Fixed x, y, xtemp, b; - const FT_Fixed *arctanptr; + const FT_Angle *arctanptr; x = vec->x; @@ -261,11 +279,12 @@ } } - /* 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; @@ -340,6 +359,9 @@ FT_Vector_Unit( FT_Vector* vec, FT_Angle angle ) { + if ( !vec ) + return; + vec->x = FT_TRIG_SCALE >> 8; vec->y = 0; ft_trig_pseudo_rotate( vec, angle ); @@ -366,6 +388,9 @@ FT_Vector v; + if ( !vec ) + return; + v.x = vec->x; v.y = vec->y; @@ -403,6 +428,9 @@ FT_Vector v; + if ( !vec ) + return 0; + v = *vec; /* handle trivial cases */ @@ -439,6 +467,9 @@ FT_Vector v; + if ( !vec || !length || !angle ) + return; + v = *vec; if ( v.x == 0 && v.y == 0 ) @@ -449,8 +480,8 @@ v.x = ft_trig_downscale( v.x ); - *length = ( shift >= 0 ) ? ( v.x >> shift ) - : (FT_Fixed)( (FT_UInt32)v.x << -shift ); + *length = shift >= 0 ? ( v.x >> shift ) + : (FT_Fixed)( (FT_UInt32)v.x << -shift ); *angle = v.y; } @@ -462,6 +493,9 @@ FT_Fixed length, FT_Angle angle ) { + if ( !vec ) + return; + vec->x = length; vec->y = 0; diff --git a/freetype/src/base/fttype1.c b/freetype/src/base/fttype1.c index c1f9931d..47af19af 100644 --- a/freetype/src/base/fttype1.c +++ b/freetype/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/freetype/src/base/ftutil.c b/freetype/src/base/ftutil.c index 879d0275..56e2800e 100644 --- a/freetype/src/base/ftutil.c +++ b/freetype/src/base/ftutil.c @@ -245,6 +245,9 @@ FT_ListNode cur; + if ( !list ) + return NULL; + cur = list->head; while ( cur ) { @@ -254,7 +257,7 @@ cur = cur->next; } - return (FT_ListNode)0; + return NULL; } @@ -264,9 +267,14 @@ 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; @@ -285,9 +293,14 @@ 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; @@ -309,6 +322,9 @@ FT_ListNode before, after; + if ( !list || !node ) + return; + before = node->prev; after = node->next; @@ -333,6 +349,9 @@ FT_ListNode before, after; + if ( !list || !node ) + return; + before = node->prev; after = node->next; @@ -357,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; @@ -392,6 +416,9 @@ FT_ListNode cur; + if ( !list || !memory ) + return; + cur = list->head; while ( cur ) { @@ -411,26 +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; - } - - /* END */ diff --git a/freetype/src/base/ftwinfnt.c b/freetype/src/base/ftwinfnt.c index 463ae761..8e337fbe 100644 --- a/freetype/src/base/ftwinfnt.c +++ b/freetype/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/freetype/src/base/rules.mk b/freetype/src/base/rules.mk index 87453375..cbd81073 100644 --- a/freetype/src/base/rules.mk +++ b/freetype/src/base/rules.mk @@ -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 \ @@ -51,8 +53,9 @@ ifneq ($(ftmac_c),) endif # for simplicity, we also handle `md5.c' (which gets included by `ftobjs.h') -BASE_H := $(BASE_DIR)/ftbase.h \ - $(BASE_DIR)/md5.c \ +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/freetype/src/bdf/PaxHeaders.18661/Jamfile b/freetype/src/bdf/PaxHeaders.18661/Jamfile deleted file mode 100644 index c2d3d37b..00000000 --- a/freetype/src/bdf/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.626847444 -30 ctime=1374498496.292312515 diff --git a/freetype/src/bdf/PaxHeaders.18661/README b/freetype/src/bdf/PaxHeaders.18661/README deleted file mode 100644 index f803eac6..00000000 --- a/freetype/src/bdf/PaxHeaders.18661/README +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.626847444 -30 ctime=1374498496.285312603 diff --git a/freetype/src/bdf/PaxHeaders.18661/bdf.c b/freetype/src/bdf/PaxHeaders.18661/bdf.c deleted file mode 100644 index 340b526e..00000000 --- a/freetype/src/bdf/PaxHeaders.18661/bdf.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.650847144 -30 ctime=1374498496.297312453 diff --git a/freetype/src/bdf/PaxHeaders.18661/bdf.h b/freetype/src/bdf/PaxHeaders.18661/bdf.h deleted file mode 100644 index 969596d5..00000000 --- a/freetype/src/bdf/PaxHeaders.18661/bdf.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.626847444 -30 ctime=1374498496.296312465 diff --git a/freetype/src/bdf/PaxHeaders.18661/bdfdrivr.c b/freetype/src/bdf/PaxHeaders.18661/bdfdrivr.c deleted file mode 100644 index 0cb0bbde..00000000 --- a/freetype/src/bdf/PaxHeaders.18661/bdfdrivr.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1380086033.684114951 -30 atime=1385335784.635847331 -30 ctime=1380086033.684114951 diff --git a/freetype/src/bdf/PaxHeaders.18661/bdfdrivr.h b/freetype/src/bdf/PaxHeaders.18661/bdfdrivr.h deleted file mode 100644 index 231f0f5e..00000000 --- a/freetype/src/bdf/PaxHeaders.18661/bdfdrivr.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.626847444 -30 ctime=1374498496.289312553 diff --git a/freetype/src/bdf/PaxHeaders.18661/bdferror.h b/freetype/src/bdf/PaxHeaders.18661/bdferror.h deleted file mode 100644 index 2bfd2607..00000000 --- a/freetype/src/bdf/PaxHeaders.18661/bdferror.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.627847431 -30 ctime=1374498496.293312503 diff --git a/freetype/src/bdf/PaxHeaders.18661/bdflib.c b/freetype/src/bdf/PaxHeaders.18661/bdflib.c deleted file mode 100644 index e740f6aa..00000000 --- a/freetype/src/bdf/PaxHeaders.18661/bdflib.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.636847319 -29 ctime=1374498496.31031229 diff --git a/freetype/src/bdf/PaxHeaders.18661/module.mk b/freetype/src/bdf/PaxHeaders.18661/module.mk deleted file mode 100644 index eb7131df..00000000 --- a/freetype/src/bdf/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.169003188 -30 ctime=1374498496.288312565 diff --git a/freetype/src/bdf/PaxHeaders.18661/rules.mk b/freetype/src/bdf/PaxHeaders.18661/rules.mk deleted file mode 100644 index 4856ff31..00000000 --- a/freetype/src/bdf/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.548973435 -29 ctime=1374498496.29431249 diff --git a/freetype/src/bdf/bdfdrivr.c b/freetype/src/bdf/bdfdrivr.c index caa142b5..55a428c1 100644 --- a/freetype/src/bdf/bdfdrivr.c +++ b/freetype/src/bdf/bdfdrivr.c @@ -2,7 +2,7 @@ FreeType font driver for bdf files - Copyright (C) 2001-2008, 2011, 2013 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 @@ -182,7 +182,7 @@ THE SOFTWARE. } - FT_CALLBACK_TABLE_DEF + static const FT_CMap_ClassRec bdf_cmap_class = { sizeof ( BDF_CMapRec ), @@ -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; @@ -386,7 +384,7 @@ THE SOFTWARE. BDF_Face_Done( bdfface ); return FT_THROW( Invalid_Argument ); } - + { bdf_property_t* prop = NULL; @@ -400,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 && @@ -680,7 +679,13 @@ THE SOFTWARE. FT_UNUSED( load_flags ); - if ( !face || glyph_index >= (FT_UInt)face->num_glyphs ) + if ( !face ) + { + error = FT_THROW( Invalid_Face_Handle ); + goto Exit; + } + + if ( glyph_index >= (FT_UInt)face->num_glyphs ) { error = FT_THROW( Invalid_Argument ); goto Exit; diff --git a/freetype/src/bdf/bdflib.c b/freetype/src/bdf/bdflib.c index 0b8412d9..abcfdee7 100644 --- a/freetype/src/bdf/bdflib.c +++ b/freetype/src/bdf/bdflib.c @@ -1,6 +1,6 @@ /* * Copyright 2000 Computing Research Labs, New Mexico State University - * Copyright 2001-2013 + * 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" @@ -691,7 +703,6 @@ lineno = 1; buf[0] = 0; start = 0; - end = 0; avail = 0; cursor = 0; refill = 1; @@ -770,8 +781,8 @@ 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, (unsigned long)( end - start ), lineno, (void*)&cb, client_data ); @@ -812,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, @@ -830,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, @@ -838,8 +849,8 @@ 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, }; @@ -1409,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, @@ -1427,13 +1438,13 @@ /* 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 ) { @@ -1491,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; @@ -1508,7 +1519,7 @@ /* 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 = FT_THROW( Missing_Chars_Field ); @@ -1542,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, @@ -1556,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; @@ -1572,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. */ @@ -1606,7 +1625,7 @@ } /* Check for the ENCODING field. */ - if ( ft_memcmp( line, "ENCODING", 8 ) == 0 ) + if ( _bdf_strncmp( line, "ENCODING", 8 ) == 0 ) { if ( !( p->flags & _BDF_GLYPH ) ) { @@ -1792,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; @@ -1808,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; @@ -1836,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; @@ -1904,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; @@ -1979,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 */ @@ -2020,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; @@ -2089,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 ) { @@ -2115,7 +2134,7 @@ { 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 */ @@ -2163,7 +2182,7 @@ } /* 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 ) ) { @@ -2192,7 +2211,7 @@ } /* Check for the FONTBOUNDINGBOX field. */ - if ( ft_memcmp( line, "FONTBOUNDINGBOX", 15 ) == 0 ) + if ( _bdf_strncmp( line, "FONTBOUNDINGBOX", 15 ) == 0 ) { if ( !( p->flags & _BDF_SIZE ) ) { @@ -2223,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 ) @@ -2258,7 +2277,7 @@ } /* 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 ) ) { @@ -2312,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]; @@ -2376,8 +2395,8 @@ unsigned long lineno = 0; /* make compiler happy */ _bdf_parse_t *p = NULL; - FT_Memory memory = extmemory; - FT_Error error = FT_Err_Ok; + FT_Memory memory = extmemory; /* needed for FT_NEW */ + FT_Error error = FT_Err_Ok; if ( FT_NEW( p ) ) @@ -2399,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; diff --git a/freetype/src/bzip2/PaxHeaders.18661/Jamfile b/freetype/src/bzip2/PaxHeaders.18661/Jamfile deleted file mode 100644 index 5e9eba7d..00000000 --- a/freetype/src/bzip2/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.506836442 -30 ctime=1374498496.665307852 diff --git a/freetype/src/bzip2/PaxHeaders.18661/ftbzip2.c b/freetype/src/bzip2/PaxHeaders.18661/ftbzip2.c deleted file mode 100644 index 2f91a973..00000000 --- a/freetype/src/bzip2/PaxHeaders.18661/ftbzip2.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.506836442 -30 ctime=1374498496.664307865 diff --git a/freetype/src/bzip2/PaxHeaders.18661/rules.mk b/freetype/src/bzip2/PaxHeaders.18661/rules.mk deleted file mode 100644 index 95363fdc..00000000 --- a/freetype/src/bzip2/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.639972297 -29 ctime=1374498496.66630784 diff --git a/freetype/src/bzip2/ftbzip2.c b/freetype/src/bzip2/ftbzip2.c index 74941302..7e406b16 100644 --- a/freetype/src/bzip2/ftbzip2.c +++ b/freetype/src/bzip2/ftbzip2.c @@ -8,7 +8,7 @@ /* parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2010, 2012, 2013 by */ +/* Copyright 2010, 2012-2014 by */ /* Joel Klinghed. */ /* */ /* Based on src/gzip/ftgzip.c, Copyright 2002 - 2010 by */ @@ -131,7 +131,7 @@ /* 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 = FT_THROW( Invalid_File_Format ); @@ -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 diff --git a/freetype/src/cache/PaxHeaders.18661/Jamfile b/freetype/src/cache/PaxHeaders.18661/Jamfile deleted file mode 100644 index 08d3fbf3..00000000 --- a/freetype/src/cache/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255911.320307196 -30 atime=1385335760.287151732 -30 ctime=1384255911.320307196 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcache.c b/freetype/src/cache/PaxHeaders.18661/ftcache.c deleted file mode 100644 index 8de2a8ab..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcache.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.481836755 -30 ctime=1374498496.451310528 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcbasic.c b/freetype/src/cache/PaxHeaders.18661/ftcbasic.c deleted file mode 100644 index ce772fc3..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcbasic.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.448837168 -29 ctime=1374498496.44631059 diff --git a/freetype/src/cache/PaxHeaders.18661/ftccache.c b/freetype/src/cache/PaxHeaders.18661/ftccache.c deleted file mode 100644 index 26757916..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftccache.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.482836742 -30 ctime=1374498496.463310378 diff --git a/freetype/src/cache/PaxHeaders.18661/ftccache.h b/freetype/src/cache/PaxHeaders.18661/ftccache.h deleted file mode 100644 index 49eb61f7..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftccache.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.472836868 -30 ctime=1374498496.449310553 diff --git a/freetype/src/cache/PaxHeaders.18661/ftccback.h b/freetype/src/cache/PaxHeaders.18661/ftccback.h deleted file mode 100644 index 64852b7d..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftccback.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.472836868 -29 ctime=1374498496.45031054 diff --git a/freetype/src/cache/PaxHeaders.18661/ftccmap.c b/freetype/src/cache/PaxHeaders.18661/ftccmap.c deleted file mode 100644 index ee21c602..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftccmap.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.457837055 -30 ctime=1374498496.455310478 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcerror.h b/freetype/src/cache/PaxHeaders.18661/ftcerror.h deleted file mode 100644 index 0778641a..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcerror.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.44783718 -29 ctime=1374498496.46231039 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcglyph.c b/freetype/src/cache/PaxHeaders.18661/ftcglyph.c deleted file mode 100644 index eb31b03f..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcglyph.c +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.46383698 -29 ctime=1374498496.46631034 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcglyph.h b/freetype/src/cache/PaxHeaders.18661/ftcglyph.h deleted file mode 100644 index b1bc9900..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcglyph.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.462836993 -30 ctime=1374498496.444310615 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcimage.c b/freetype/src/cache/PaxHeaders.18661/ftcimage.c deleted file mode 100644 index b5513c5d..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcimage.c +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.47183688 -30 ctime=1374498496.448310565 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcimage.h b/freetype/src/cache/PaxHeaders.18661/ftcimage.h deleted file mode 100644 index 19a39d1f..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcimage.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.481836755 -30 ctime=1374498496.457310453 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcmanag.c b/freetype/src/cache/PaxHeaders.18661/ftcmanag.c deleted file mode 100644 index 07e8c506..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcmanag.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.449837155 -29 ctime=1374498496.45431049 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcmanag.h b/freetype/src/cache/PaxHeaders.18661/ftcmanag.h deleted file mode 100644 index b0b99838..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcmanag.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.44783718 -29 ctime=1374498496.45831044 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcmru.c b/freetype/src/cache/PaxHeaders.18661/ftcmru.c deleted file mode 100644 index f8d99aba..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcmru.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.462836993 -30 ctime=1374498496.452310515 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcmru.h b/freetype/src/cache/PaxHeaders.18661/ftcmru.h deleted file mode 100644 index 223bb1cb..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcmru.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.457837055 -30 ctime=1374498496.465310353 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcsbits.c b/freetype/src/cache/PaxHeaders.18661/ftcsbits.c deleted file mode 100644 index 218a4112..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcsbits.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.482836742 -30 ctime=1374498496.467310328 diff --git a/freetype/src/cache/PaxHeaders.18661/ftcsbits.h b/freetype/src/cache/PaxHeaders.18661/ftcsbits.h deleted file mode 100644 index c45edc75..00000000 --- a/freetype/src/cache/PaxHeaders.18661/ftcsbits.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.457837055 -30 ctime=1374498496.460310415 diff --git a/freetype/src/cache/PaxHeaders.18661/rules.mk b/freetype/src/cache/PaxHeaders.18661/rules.mk deleted file mode 100644 index 1a903e86..00000000 --- a/freetype/src/cache/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.600972785 -30 ctime=1374498496.461310403 diff --git a/freetype/src/cache/ftcbasic.c b/freetype/src/cache/ftcbasic.c index 84d336d5..6bad39d9 100644 --- a/freetype/src/cache/ftcbasic.c +++ b/freetype/src/cache/ftcbasic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType basic cache interface (body). */ /* */ -/* Copyright 2003-2007, 2009-2011, 2013 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, */ @@ -110,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; @@ -229,7 +228,7 @@ * */ - FT_CALLBACK_TABLE_DEF + static const FTC_IFamilyClassRec ftc_basic_image_family_class = { { @@ -243,7 +242,7 @@ }; - FT_CALLBACK_TABLE_DEF + static const FTC_GCacheClassRec ftc_basic_image_cache_class = { { @@ -287,7 +286,7 @@ FT_PtrDist hash; - /* some argument checks are delayed to FTC_Cache_Lookup */ + /* some argument checks are delayed to `FTC_Cache_Lookup' */ if ( !aglyph ) { error = FT_THROW( Invalid_Argument ); @@ -298,18 +297,15 @@ if ( anode ) *anode = NULL; - { - 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 */ @@ -363,7 +359,7 @@ 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 = FT_THROW( Invalid_Argument ); @@ -374,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; @@ -415,7 +410,7 @@ * */ - FT_CALLBACK_TABLE_DEF + static const FTC_SFamilyClassRec ftc_basic_sbit_family_class = { { @@ -430,7 +425,7 @@ }; - FT_CALLBACK_TABLE_DEF + static const FTC_GCacheClassRec ftc_basic_sbit_cache_class = { { @@ -477,24 +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 FT_THROW( Invalid_Argument ); *ansbit = NULL; - { - 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 */ @@ -555,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 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; diff --git a/freetype/src/cache/ftccmap.c b/freetype/src/cache/ftccmap.c index 848349be..ab223663 100644 --- a/freetype/src/cache/ftccmap.c +++ b/freetype/src/cache/ftccmap.c @@ -4,7 +4,7 @@ /* */ /* FreeType CharMap cache (body) */ /* */ -/* Copyright 2000-2013 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, */ @@ -202,7 +202,7 @@ /*************************************************************************/ - FT_CALLBACK_TABLE_DEF + static const FTC_CacheClassRec ftc_cmap_cache_class = { ftc_cmap_node_new, @@ -263,6 +263,9 @@ return 0; } + if ( !face_id ) + return 0; + query.face_id = face_id; query.cmap_index = (FT_UInt)cmap_index; query.char_code = char_code; @@ -301,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/freetype/src/cache/ftcmanag.c b/freetype/src/cache/ftcmanag.c index 4eb2c5bf..fff7a088 100644 --- a/freetype/src/cache/ftcmanag.c +++ b/freetype/src/cache/ftcmanag.c @@ -4,7 +4,7 @@ /* */ /* FreeType Cache Manager (body). */ /* */ -/* Copyright 2000-2006, 2008-2010, 2013 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,7 +186,7 @@ FTC_MruNode mrunode; - if ( asize == NULL ) + if ( !asize || !scaler ) return FT_THROW( Invalid_Argument ); *asize = NULL; @@ -290,7 +290,7 @@ } - FT_CALLBACK_TABLE_DEF + static const FTC_MruListClassRec ftc_face_list_class = { sizeof ( FTC_FaceNodeRec), @@ -313,7 +313,7 @@ FTC_MruNode mrunode; - if ( aface == NULL ) + if ( !aface || !face_id ) return FT_THROW( Invalid_Argument ); *aface = NULL; @@ -366,6 +366,9 @@ if ( !library ) return FT_THROW( Invalid_Library_Handle ); + if ( !amanager || !requester ) + return FT_THROW( Invalid_Argument ); + memory = library->memory; if ( FT_NEW( manager ) ) @@ -451,11 +454,11 @@ FT_EXPORT_DEF( void ) FTC_Manager_Reset( FTC_Manager manager ) { - if ( manager ) - { - FTC_MruList_Reset( &manager->sizes ); - FTC_MruList_Reset( &manager->faces ); - } + if ( !manager ) + return; + + FTC_MruList_Reset( &manager->sizes ); + FTC_MruList_Reset( &manager->faces ); FTC_Manager_FlushN( manager, manager->num_nodes ); } @@ -667,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 */ @@ -685,7 +692,9 @@ 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--; } diff --git a/freetype/src/cache/ftcsbits.c b/freetype/src/cache/ftcsbits.c index 6df1c199..59727d16 100644 --- a/freetype/src/cache/ftcsbits.c +++ b/freetype/src/cache/ftcsbits.c @@ -4,7 +4,7 @@ /* */ /* FreeType sbits manager (body). */ /* */ -/* Copyright 2000-2006, 2009-2011, 2013 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, */ @@ -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; diff --git a/freetype/src/cff/PaxHeaders.18661/Jamfile b/freetype/src/cff/PaxHeaders.18661/Jamfile deleted file mode 100644 index de47f011..00000000 --- a/freetype/src/cff/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.27983928 -30 ctime=1374498496.411311028 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2arrst.c b/freetype/src/cff/PaxHeaders.18661/cf2arrst.c deleted file mode 100644 index 4c193786..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2arrst.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.289839155 -29 ctime=1374498496.41031104 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2arrst.h b/freetype/src/cff/PaxHeaders.18661/cf2arrst.h deleted file mode 100644 index 4e797967..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2arrst.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.314838843 -30 ctime=1374498496.423310878 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2blues.c b/freetype/src/cff/PaxHeaders.18661/cf2blues.c deleted file mode 100644 index 33dbbea3..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2blues.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375348362.324487159 -29 atime=1385335785.30383898 -30 ctime=1375348362.324487159 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2blues.h b/freetype/src/cff/PaxHeaders.18661/cf2blues.h deleted file mode 100644 index 699e0cee..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2blues.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.229839905 -29 ctime=1374498496.39831119 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2error.c b/freetype/src/cff/PaxHeaders.18661/cf2error.c deleted file mode 100644 index ff2f7145..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2error.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.222839993 -30 ctime=1374498496.425310853 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2error.h b/freetype/src/cff/PaxHeaders.18661/cf2error.h deleted file mode 100644 index 036dab2f..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2error.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.205840205 -30 ctime=1374498496.420310915 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2fixed.h b/freetype/src/cff/PaxHeaders.18661/cf2fixed.h deleted file mode 100644 index 122683fe..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2fixed.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.229839905 -30 ctime=1374498496.397311203 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2font.c b/freetype/src/cff/PaxHeaders.18661/cf2font.c deleted file mode 100644 index 3d9e3995..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2font.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1380833910.355685291 -30 atime=1385335785.349838405 -30 ctime=1380833910.355685291 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2font.h b/freetype/src/cff/PaxHeaders.18661/cf2font.h deleted file mode 100644 index 5f644608..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2font.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.329838655 -30 ctime=1374498496.431310778 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2ft.c b/freetype/src/cff/PaxHeaders.18661/cf2ft.c deleted file mode 100644 index 77e9ebd0..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2ft.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.202840243 -29 ctime=1374498496.41431099 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2ft.h b/freetype/src/cff/PaxHeaders.18661/cf2ft.h deleted file mode 100644 index 2228248a..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2ft.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.201840255 -30 ctime=1374498496.416310965 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2glue.h b/freetype/src/cff/PaxHeaders.18661/cf2glue.h deleted file mode 100644 index 2525bc69..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2glue.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.234839843 -29 ctime=1374498496.40631109 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2hints.c b/freetype/src/cff/PaxHeaders.18661/cf2hints.c deleted file mode 100644 index bbc3b58e..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2hints.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1383904341.812149846 -30 atime=1385335761.136141118 -30 ctime=1383904341.812149846 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2hints.h b/freetype/src/cff/PaxHeaders.18661/cf2hints.h deleted file mode 100644 index da849a47..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2hints.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1380442524.247902094 -30 atime=1385335785.329838655 -30 ctime=1380442524.253902019 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2intrp.c b/freetype/src/cff/PaxHeaders.18661/cf2intrp.c deleted file mode 100644 index 7bf526b3..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2intrp.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.350838393 -30 ctime=1374498496.373311503 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2intrp.h b/freetype/src/cff/PaxHeaders.18661/cf2intrp.h deleted file mode 100644 index 15ae990e..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2intrp.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.233839855 -29 ctime=1374498496.42231089 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2read.c b/freetype/src/cff/PaxHeaders.18661/cf2read.c deleted file mode 100644 index 7843c063..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2read.c +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.31583883 -30 ctime=1374498496.440310665 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2read.h b/freetype/src/cff/PaxHeaders.18661/cf2read.h deleted file mode 100644 index 28198137..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2read.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.313838855 -30 ctime=1374498496.405311103 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2stack.c b/freetype/src/cff/PaxHeaders.18661/cf2stack.c deleted file mode 100644 index bde8e935..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2stack.c +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.27983928 -30 ctime=1374498496.409311053 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2stack.h b/freetype/src/cff/PaxHeaders.18661/cf2stack.h deleted file mode 100644 index c529efe6..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2stack.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.330838643 -30 ctime=1374498496.427310828 diff --git a/freetype/src/cff/PaxHeaders.18661/cf2types.h b/freetype/src/cff/PaxHeaders.18661/cf2types.h deleted file mode 100644 index d9c40fc4..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cf2types.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.234839843 -29 ctime=1374498496.39431124 diff --git a/freetype/src/cff/PaxHeaders.18661/cff.c b/freetype/src/cff/PaxHeaders.18661/cff.c deleted file mode 100644 index 38e9ce90..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cff.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.314838843 -29 ctime=1374498496.39431124 diff --git a/freetype/src/cff/PaxHeaders.18661/cffcmap.c b/freetype/src/cff/PaxHeaders.18661/cffcmap.c deleted file mode 100644 index 397c49d3..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffcmap.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.304838968 -30 ctime=1374498496.437310703 diff --git a/freetype/src/cff/PaxHeaders.18661/cffcmap.h b/freetype/src/cff/PaxHeaders.18661/cffcmap.h deleted file mode 100644 index 7773a77c..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffcmap.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.305838955 -30 ctime=1374498496.388311315 diff --git a/freetype/src/cff/PaxHeaders.18661/cffdrivr.c b/freetype/src/cff/PaxHeaders.18661/cffdrivr.c deleted file mode 100644 index 5af00c56..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffdrivr.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377511652.551389263 -30 atime=1385335785.373838105 -30 ctime=1377511652.551389263 diff --git a/freetype/src/cff/PaxHeaders.18661/cffdrivr.h b/freetype/src/cff/PaxHeaders.18661/cffdrivr.h deleted file mode 100644 index 35311089..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffdrivr.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.314838843 -29 ctime=1374498496.39031129 diff --git a/freetype/src/cff/PaxHeaders.18661/cfferrs.h b/freetype/src/cff/PaxHeaders.18661/cfferrs.h deleted file mode 100644 index fd4335b6..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cfferrs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.234839843 -30 ctime=1374498496.367311578 diff --git a/freetype/src/cff/PaxHeaders.18661/cffgload.c b/freetype/src/cff/PaxHeaders.18661/cffgload.c deleted file mode 100644 index b6729a87..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffgload.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377511771.625900626 -30 atime=1385335785.248839668 -30 ctime=1377511771.625900626 diff --git a/freetype/src/cff/PaxHeaders.18661/cffgload.h b/freetype/src/cff/PaxHeaders.18661/cffgload.h deleted file mode 100644 index 9ccaba67..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffgload.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.201840255 -30 ctime=1374498496.424310865 diff --git a/freetype/src/cff/PaxHeaders.18661/cffload.c b/freetype/src/cff/PaxHeaders.18661/cffload.c deleted file mode 100644 index 5467b4f2..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffload.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375771254.911548131 -30 atime=1385335785.340838518 -30 ctime=1375771254.912548119 diff --git a/freetype/src/cff/PaxHeaders.18661/cffload.h b/freetype/src/cff/PaxHeaders.18661/cffload.h deleted file mode 100644 index bc3a75ea..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffload.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.329838655 -30 ctime=1374498496.408311065 diff --git a/freetype/src/cff/PaxHeaders.18661/cffobjs.c b/freetype/src/cff/PaxHeaders.18661/cffobjs.c deleted file mode 100644 index 31f7a859..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffobjs.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.216840068 -29 ctime=1374498496.37031154 diff --git a/freetype/src/cff/PaxHeaders.18661/cffobjs.h b/freetype/src/cff/PaxHeaders.18661/cffobjs.h deleted file mode 100644 index 7dec598b..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffobjs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.234839843 -30 ctime=1374498496.421310903 diff --git a/freetype/src/cff/PaxHeaders.18661/cffparse.c b/freetype/src/cff/PaxHeaders.18661/cffparse.c deleted file mode 100644 index fe87c052..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffparse.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.206840193 -29 ctime=1374498496.43031079 diff --git a/freetype/src/cff/PaxHeaders.18661/cffparse.h b/freetype/src/cff/PaxHeaders.18661/cffparse.h deleted file mode 100644 index a04bcf28..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffparse.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.330838643 -30 ctime=1374498496.407311078 diff --git a/freetype/src/cff/PaxHeaders.18661/cffpic.c b/freetype/src/cff/PaxHeaders.18661/cffpic.c deleted file mode 100644 index 9c2b0756..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffpic.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.201840255 -30 ctime=1374498496.415310978 diff --git a/freetype/src/cff/PaxHeaders.18661/cffpic.h b/freetype/src/cff/PaxHeaders.18661/cffpic.h deleted file mode 100644 index 2fe52109..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cffpic.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.31583883 -30 ctime=1374498496.381311403 diff --git a/freetype/src/cff/PaxHeaders.18661/cfftoken.h b/freetype/src/cff/PaxHeaders.18661/cfftoken.h deleted file mode 100644 index c3af8772..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cfftoken.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.31583883 -30 ctime=1374498496.419310928 diff --git a/freetype/src/cff/PaxHeaders.18661/cfftypes.h b/freetype/src/cff/PaxHeaders.18661/cfftypes.h deleted file mode 100644 index 6f7ce7ca..00000000 --- a/freetype/src/cff/PaxHeaders.18661/cfftypes.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.304838968 -30 ctime=1374498496.428310815 diff --git a/freetype/src/cff/PaxHeaders.18661/module.mk b/freetype/src/cff/PaxHeaders.18661/module.mk deleted file mode 100644 index f40dc937..00000000 --- a/freetype/src/cff/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.018005076 -30 ctime=1374498496.399311178 diff --git a/freetype/src/cff/PaxHeaders.18661/rules.mk b/freetype/src/cff/PaxHeaders.18661/rules.mk deleted file mode 100644 index 4b43b0ca..00000000 --- a/freetype/src/cff/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.499974047 -30 ctime=1374498496.417310953 diff --git a/freetype/src/cff/cf2blues.c b/freetype/src/cff/cf2blues.c index eec589ef..250f89e0 100644 --- a/freetype/src/cff/cf2blues.c +++ b/freetype/src/cff/cf2blues.c @@ -4,7 +4,7 @@ /* */ /* Adobe's code for handling Blue Zones (body). */ /* */ -/* Copyright 2009-2013 Adobe Systems Incorporated. */ +/* 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 */ @@ -408,11 +408,10 @@ /* Note: constant changed from 0.5 to 0.6 to avoid a problem with */ /* 10ppem Arial */ - blues->boost = FT_MulFix( - cf2_floatToFixed( .6 ), - ( cf2_intToFixed( 1 ) - - FT_DivFix( blues->scale, - blues->blueScale ) ) ); + 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 */ diff --git a/freetype/src/cff/cf2font.c b/freetype/src/cff/cf2font.c index 718d1e27..83fd348f 100644 --- a/freetype/src/cff/cf2font.c +++ b/freetype/src/cff/cf2font.c @@ -4,7 +4,7 @@ /* */ /* Adobe's code for font instances (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* 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 */ @@ -36,6 +36,9 @@ /***************************************************************************/ +#include <ft2build.h> +#include FT_INTERNAL_CALC_H + #include "cf2ft.h" #include "cf2glue.h" @@ -105,6 +108,7 @@ /* adjusting for emRatio converts darkenAmount to character */ /* space (font units). */ CF2_Fixed stemWidthPer1000, scaledStem; + FT_Int logBase2; *darkenAmount = 0; @@ -131,25 +135,32 @@ /* convert from true character space to 1000 unit character space; */ /* add synthetic emboldening effect */ - /* we have to assure that the computation of `scaledStem' */ - /* and `stemWidthPer1000' don't overflow */ + /* `stemWidthPer1000' will not overflow for a legitimate font */ stemWidthPer1000 = FT_MulFix( stemWidth + boldenAmount, emRatio ); - if ( emRatio > CF2_FIXED_ONE && - stemWidthPer1000 <= ( stemWidth + boldenAmount ) ) - { - stemWidthPer1000 = 0; /* to pacify compiler */ - scaledStem = cf2_intToFixed( x4 ); - } - else - { - scaledStem = FT_MulFix( stemWidthPer1000, ppem ); + /* `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. */ - if ( ppem > CF2_FIXED_ONE && - scaledStem <= stemWidthPer1000 ) - scaledStem = cf2_intToFixed( x4 ); - } + 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 */ @@ -167,7 +178,7 @@ if ( !xdelta ) goto Try_x3; - *darkenAmount = FT_MulFix( x, FT_DivFix( ydelta, xdelta ) ) + + *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) + FT_DivFix( cf2_intToFixed( y1 ), ppem ); } @@ -184,7 +195,7 @@ if ( !xdelta ) goto Try_x4; - *darkenAmount = FT_MulFix( x, FT_DivFix( ydelta, xdelta ) ) + + *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) + FT_DivFix( cf2_intToFixed( y2 ), ppem ); } } @@ -202,7 +213,7 @@ if ( !xdelta ) goto Use_y4; - *darkenAmount = FT_MulFix( x, FT_DivFix( ydelta, xdelta ) ) + + *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) + FT_DivFix( cf2_intToFixed( y3 ), ppem ); } } @@ -233,13 +244,14 @@ /* pointer to parsed font object */ CFF_Decoder* decoder = font->decoder; - FT_Bool needExtraSetup; + FT_Bool needExtraSetup = FALSE; /* character space units */ CF2_Fixed boldenX = font->syntheticEmboldeningAmountX; CF2_Fixed boldenY = font->syntheticEmboldeningAmountY; - CF2_Fixed ppem; + CFF_SubFont subFont; + CF2_Fixed ppem; /* clear previous error */ @@ -247,8 +259,12 @@ /* if a CID fontDict has changed, we need to recompute some cached */ /* data */ - needExtraSetup = - (FT_Bool)( font->lastSubfont != cf2_getSubfont( decoder ) ); + 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 */ diff --git a/freetype/src/cff/cf2ft.c b/freetype/src/cff/cf2ft.c index 4abbc9d7..ebba4694 100644 --- a/freetype/src/cff/cf2ft.c +++ b/freetype/src/cff/cf2ft.c @@ -4,7 +4,7 @@ /* */ /* FreeType Glue Component to Adobe's Interpreter (body). */ /* */ -/* Copyright 2013 Adobe Systems Incorporated. */ +/* 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 */ @@ -61,7 +61,9 @@ FT_ASSERT( unitsPerEm > 0 ); - FT_ASSERT( transform->a > 0 && transform->d > 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 ); @@ -140,6 +142,8 @@ 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; @@ -154,15 +158,27 @@ { /* record the move before the line; also check points and set */ /* `path_begun' */ - cff_builder_start_point( builder, - params->pt0.x, - params->pt0.y ); + 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 */ - cff_builder_add_point1( builder, - params->pt1.x, - params->pt1.y ); + error = cff_builder_add_point1( builder, + params->pt1.x, + params->pt1.y ); + if ( error ) + { + if ( !*callbacks->error ) + *callbacks->error = error; + return; + } } @@ -170,6 +186,8 @@ 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; @@ -184,13 +202,25 @@ { /* record the move before the line; also check points and set */ /* `path_begun' */ - cff_builder_start_point( builder, - params->pt0.x, - params->pt0.y ); + 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 */ - cff_check_points( builder, 3 ); + error = cff_check_points( builder, 3 ); + if ( error ) + { + if ( !*callbacks->error ) + *callbacks->error = error; + return; + } cff_builder_add_point( builder, params->pt1.x, @@ -236,10 +266,8 @@ if ( *hinted ) { - *x_scale = FT_DivFix( decoder->builder.glyph->x_scale, - cf2_intToFixed( 64 ) ); - *y_scale = FT_DivFix( decoder->builder.glyph->y_scale, - cf2_intToFixed( 64 ) ); + *x_scale = ( decoder->builder.glyph->x_scale + 32 ) / 64; + *y_scale = ( decoder->builder.glyph->y_scale + 32 ) / 64; } else { @@ -357,9 +385,12 @@ /* also get units per em to validate scale */ font->unitsPerEm = (CF2_Int)cf2_getUnitsPerEm( decoder ); - error2 = cf2_checkTransform( &transform, font->unitsPerEm ); - if ( error2 ) - return error2; + if ( scaled ) + { + error2 = cf2_checkTransform( &transform, font->unitsPerEm ); + if ( error2 ) + return error2; + } error2 = cf2_getGlyphOutline( font, &buf, &transform, &glyphWidth ); if ( error2 ) @@ -389,8 +420,16 @@ FT_ASSERT( decoder && decoder->builder.face && decoder->builder.face->root.size ); - FT_ASSERT( decoder->builder.face->root.size->metrics.y_ppem ); + /* + * 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 ); } @@ -508,7 +547,7 @@ CF2_UInt idx, CF2_Buffer buf ) { - FT_ASSERT( decoder && decoder->globals ); + FT_ASSERT( decoder ); FT_ZERO( buf ); @@ -516,6 +555,8 @@ 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]; @@ -581,7 +622,7 @@ CF2_UInt idx, CF2_Buffer buf ) { - FT_ASSERT( decoder && decoder->locals ); + FT_ASSERT( decoder ); FT_ZERO( buf ); @@ -589,6 +630,8 @@ 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]; diff --git a/freetype/src/cff/cf2hints.c b/freetype/src/cff/cf2hints.c index 5f441616..040d193f 100644 --- a/freetype/src/cff/cf2hints.c +++ b/freetype/src/cff/cf2hints.c @@ -4,7 +4,7 @@ /* */ /* Adobe's code for handling CFF hints (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* 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 */ @@ -304,9 +304,6 @@ cf2_hintmap_map( CF2_HintMap hintmap, CF2_Fixed csCoord ) { - FT_ASSERT( hintmap->isValid ); /* must call Build before Map */ - FT_ASSERT( hintmap->lastIndex < CF2_MAX_HINT_EDGES ); - if ( hintmap->count == 0 || ! hintmap->hinted ) { /* there are no hints; use uniform scale and zero offset */ @@ -317,6 +314,7 @@ /* 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 && @@ -781,6 +779,8 @@ 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 */ @@ -792,9 +792,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ 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 ) { @@ -1558,7 +1561,7 @@ { /* -y */ *x = -glyphpath->xOffset; - *y = glyphpath->xOffset; + *y = glyphpath->yOffset; } else { @@ -1689,7 +1692,8 @@ if ( glyphpath->elemIsQueued ) { - FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) ); + FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) || + glyphpath->hintMap.count == 0 ); cf2_glyphpath_pushPrevElem( glyphpath, &glyphpath->hintMap, @@ -1775,7 +1779,8 @@ if ( glyphpath->elemIsQueued ) { - FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) ); + FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) || + glyphpath->hintMap.count == 0 ); cf2_glyphpath_pushPrevElem( glyphpath, &glyphpath->hintMap, diff --git a/freetype/src/cff/cf2intrp.c b/freetype/src/cff/cf2intrp.c index 5610917c..a2696066 100644 --- a/freetype/src/cff/cf2intrp.c +++ b/freetype/src/cff/cf2intrp.c @@ -4,7 +4,7 @@ /* */ /* Adobe's CFF Interpreter (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* 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 */ @@ -593,8 +593,11 @@ /* 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, @@ -614,8 +617,11 @@ /* 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, @@ -1141,15 +1147,16 @@ /* `cf2_hintmask_read' (which also traces the mask bytes) */ FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" )); - /* if there are arguments on the stack, there this is an */ - /* implied cf2_cmdVSTEMHM */ - if ( cf2_stack_count( opStack ) != 0 ) + /* never add hints after the mask is computed */ + if ( cf2_stack_count( opStack ) > 1 && + cf2_hintmask_isValid( &hintMask ) ) { - /* never add hints after the mask is computed */ - if ( cf2_hintmask_isValid( &hintMask ) ) - FT_TRACE4(( "cf2_interpT2CharString: invalid hint mask\n" )); + 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, diff --git a/freetype/src/cff/cffcmap.c b/freetype/src/cff/cffcmap.c index f6e03c64..52248b2b 100644 --- a/freetype/src/cff/cffcmap.c +++ b/freetype/src/cff/cffcmap.c @@ -33,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; @@ -135,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 ); @@ -143,6 +147,8 @@ 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. */ diff --git a/freetype/src/cff/cffdrivr.c b/freetype/src/cff/cffdrivr.c index dde7d448..3e8898e3 100644 --- a/freetype/src/cff/cffdrivr.c +++ b/freetype/src/cff/cffdrivr.c @@ -4,7 +4,7 @@ /* */ /* OpenType font driver implementation (body). */ /* */ -/* Copyright 1996-2013 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, */ @@ -753,7 +753,7 @@ FT_Module_Interface result; - /* 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; diff --git a/freetype/src/cff/cffgload.c b/freetype/src/cff/cffgload.c index c8e9f912..758a3d3b 100644 --- a/freetype/src/cff/cffgload.c +++ b/freetype/src/cff/cffgload.c @@ -4,7 +4,7 @@ /* */ /* OpenType Glyph Loader (body). */ /* */ -/* Copyright 1996-2013 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, */ @@ -703,7 +703,7 @@ /* callback function. */ if ( face->root.internal->incremental_interface ) { - FT_Data data; + FT_Data data; data.pointer = *pointer; @@ -1989,9 +1989,6 @@ } else { - if ( !error ) - error = FT_Err_Ok; - cff_builder_close_contour( builder ); /* close hints recording session */ @@ -2002,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 */ @@ -2711,10 +2710,10 @@ /* compute linear advance widths */ - ( (SFNT_Service)face->sfnt )->get_metrics( face, 0, - glyph_index, - &dummy, - &advance ); + (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 0, + glyph_index, + &dummy, + &advance ); glyph->root.linearHoriAdvance = advance; has_vertical_info = FT_BOOL( @@ -2724,10 +2723,10 @@ /* get the vertical metrics from the vtmx table if we have one */ if ( has_vertical_info ) { - ( (SFNT_Service)face->sfnt )->get_metrics( face, 1, - glyph_index, - &dummy, - &advance ); + (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1, + glyph_index, + &dummy, + &advance ); glyph->root.linearVertAdvance = advance; } else @@ -2964,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/freetype/src/cff/cffload.c b/freetype/src/cff/cffload.c index ff271f3d..d9bec596 100644 --- a/freetype/src/cff/cffload.c +++ b/freetype/src/cff/cffload.c @@ -4,7 +4,7 @@ /* */ /* OpenType and CFF data/program tables loader (body). */ /* */ -/* Copyright 1996-2013 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, */ @@ -689,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: @@ -719,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 ) { @@ -727,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; @@ -750,7 +757,7 @@ /* update cache */ fdselect->cache_first = first; - fdselect->cache_count = limit-first; + fdselect->cache_count = limit - first; fdselect->cache_fd = fd2; break; } diff --git a/freetype/src/cff/cffobjs.c b/freetype/src/cff/cffobjs.c index 29c36915..da3d0190 100644 --- a/freetype/src/cff/cffobjs.c +++ b/freetype/src/cff/cffobjs.c @@ -4,7 +4,7 @@ /* */ /* OpenType objects manager (body). */ /* */ -/* Copyright 1996-2013 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, */ @@ -866,7 +866,7 @@ flags |= FT_FACE_FLAG_KERNING; #endif - cffface->face_flags = flags; + cffface->face_flags |= flags; /*******************************************************************/ /* */ @@ -943,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; @@ -973,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; @@ -1055,22 +1036,23 @@ CFF_Driver driver = (CFF_Driver)module; - /* set default property values, cf `ftcffdrv.h' */ + /* set default property values, cf. `ftcffdrv.h' */ #ifdef CFF_CONFIG_OPTION_OLD_ENGINE - driver->hinting_engine = FT_CFF_HINTING_FREETYPE; + driver->hinting_engine = FT_CFF_HINTING_FREETYPE; #else - driver->hinting_engine = FT_CFF_HINTING_ADOBE; + driver->hinting_engine = FT_CFF_HINTING_ADOBE; #endif + driver->no_stem_darkening = FALSE; - driver->darken_params[0] = 500; - driver->darken_params[1] = 400; - driver->darken_params[2] = 1000; - driver->darken_params[3] = 275; - driver->darken_params[4] = 1667; - driver->darken_params[5] = 275; - driver->darken_params[6] = 2333; - driver->darken_params[7] = 0; + 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 FT_Err_Ok; } diff --git a/freetype/src/cff/cffparse.c b/freetype/src/cff/cffparse.c index 96222120..c79ab623 100644 --- a/freetype/src/cff/cffparse.c +++ b/freetype/src/cff/cffparse.c @@ -4,7 +4,7 @@ /* */ /* CFF token stream parser (body) */ /* */ -/* Copyright 1996-2004, 2007-2013 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, */ @@ -66,7 +66,6 @@ goto Bad; val = (FT_Short)( ( (FT_UShort)p[0] << 8 ) | p[1] ); - p += 2; } else if ( v == 29 ) { @@ -77,7 +76,6 @@ ( (FT_ULong)p[1] << 16 ) | ( (FT_ULong)p[2] << 8 ) | (FT_ULong)p[3] ); - p += 4; } 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: @@ -192,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 */ diff --git a/freetype/src/cid/PaxHeaders.18661/Jamfile b/freetype/src/cid/PaxHeaders.18661/Jamfile deleted file mode 100644 index b5a19dd7..00000000 --- a/freetype/src/cid/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.818845044 -30 ctime=1374498496.697307452 diff --git a/freetype/src/cid/PaxHeaders.18661/ciderrs.h b/freetype/src/cid/PaxHeaders.18661/ciderrs.h deleted file mode 100644 index eb788f6b..00000000 --- a/freetype/src/cid/PaxHeaders.18661/ciderrs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.819845031 -30 ctime=1374498496.693307502 diff --git a/freetype/src/cid/PaxHeaders.18661/cidgload.c b/freetype/src/cid/PaxHeaders.18661/cidgload.c deleted file mode 100644 index a4d2f910..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidgload.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377511507.779199164 -30 atime=1385335784.805845206 -30 ctime=1377511507.779199164 diff --git a/freetype/src/cid/PaxHeaders.18661/cidgload.h b/freetype/src/cid/PaxHeaders.18661/cidgload.h deleted file mode 100644 index 746692b8..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidgload.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.818845044 -29 ctime=1374498496.68230764 diff --git a/freetype/src/cid/PaxHeaders.18661/cidload.c b/freetype/src/cid/PaxHeaders.18661/cidload.c deleted file mode 100644 index a02e1b4b..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidload.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375351294.845825597 -30 atime=1385335784.845844706 -30 ctime=1375351294.845825597 diff --git a/freetype/src/cid/PaxHeaders.18661/cidload.h b/freetype/src/cid/PaxHeaders.18661/cidload.h deleted file mode 100644 index b3644641..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidload.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.799845281 -30 ctime=1374498496.683307627 diff --git a/freetype/src/cid/PaxHeaders.18661/cidobjs.c b/freetype/src/cid/PaxHeaders.18661/cidobjs.c deleted file mode 100644 index 4f98befc..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidobjs.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.825844956 -30 ctime=1374498496.691307527 diff --git a/freetype/src/cid/PaxHeaders.18661/cidobjs.h b/freetype/src/cid/PaxHeaders.18661/cidobjs.h deleted file mode 100644 index bdfed07a..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidobjs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.805845206 -30 ctime=1374498496.692307515 diff --git a/freetype/src/cid/PaxHeaders.18661/cidparse.c b/freetype/src/cid/PaxHeaders.18661/cidparse.c deleted file mode 100644 index 5cb20c73..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidparse.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.799845281 -30 ctime=1374498496.685307602 diff --git a/freetype/src/cid/PaxHeaders.18661/cidparse.h b/freetype/src/cid/PaxHeaders.18661/cidparse.h deleted file mode 100644 index 925bb1cf..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidparse.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.819845031 -30 ctime=1374498496.687307577 diff --git a/freetype/src/cid/PaxHeaders.18661/cidriver.c b/freetype/src/cid/PaxHeaders.18661/cidriver.c deleted file mode 100644 index 54411679..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidriver.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.818845044 -30 ctime=1374498496.696307465 diff --git a/freetype/src/cid/PaxHeaders.18661/cidriver.h b/freetype/src/cid/PaxHeaders.18661/cidriver.h deleted file mode 100644 index 9b4c89ff..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidriver.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.819845031 -30 ctime=1374498496.688307565 diff --git a/freetype/src/cid/PaxHeaders.18661/cidtoken.h b/freetype/src/cid/PaxHeaders.18661/cidtoken.h deleted file mode 100644 index 64470ead..00000000 --- a/freetype/src/cid/PaxHeaders.18661/cidtoken.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.805845206 -29 ctime=1374498496.69830744 diff --git a/freetype/src/cid/PaxHeaders.18661/module.mk b/freetype/src/cid/PaxHeaders.18661/module.mk deleted file mode 100644 index 8372b272..00000000 --- a/freetype/src/cid/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.028004951 -29 ctime=1374498496.68630759 diff --git a/freetype/src/cid/PaxHeaders.18661/rules.mk b/freetype/src/cid/PaxHeaders.18661/rules.mk deleted file mode 100644 index 99f523be..00000000 --- a/freetype/src/cid/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.508973935 -30 ctime=1374498496.699307427 diff --git a/freetype/src/cid/PaxHeaders.18661/type1cid.c b/freetype/src/cid/PaxHeaders.18661/type1cid.c deleted file mode 100644 index a78a71dc..00000000 --- a/freetype/src/cid/PaxHeaders.18661/type1cid.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.825844956 -30 ctime=1374498496.701307402 diff --git a/freetype/src/cid/cidload.c b/freetype/src/cid/cidload.c index 46def71b..1cda0eee 100644 --- a/freetype/src/cid/cidload.c +++ b/freetype/src/cid/cidload.c @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 font loader (body). */ /* */ -/* Copyright 1996-2006, 2009, 2011-2013 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, */ @@ -160,16 +160,26 @@ { 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] ); + 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). */ @@ -184,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]; @@ -197,8 +207,7 @@ offset->y = temp[5] >> 16; } - return FT_Err_Ok; /* this is a callback function; */ - /* we must return an error code */ + return FT_Err_Ok; } diff --git a/freetype/src/cid/cidobjs.c b/freetype/src/cid/cidobjs.c index 46555e2d..5932ffa9 100644 --- a/freetype/src/cid/cidobjs.c +++ b/freetype/src/cid/cidobjs.c @@ -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; diff --git a/freetype/src/cid/cidparse.c b/freetype/src/cid/cidparse.c index 53df3155..d8476cda 100644 --- a/freetype/src/cid/cidparse.c +++ b/freetype/src/cid/cidparse.c @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 parser (body). */ /* */ -/* Copyright 1996-2007, 2009, 2013 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, */ @@ -178,8 +178,6 @@ 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 ) diff --git a/freetype/src/cid/cidparse.h b/freetype/src/cid/cidparse.h index ca37deab..f27be65a 100644 --- a/freetype/src/cid/cidparse.h +++ b/freetype/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/freetype/src/gxvalid/PaxHeaders.18661/Jamfile b/freetype/src/gxvalid/PaxHeaders.18661/Jamfile deleted file mode 100644 index a392eb65..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.037842306 -30 ctime=1374498495.971316528 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/README b/freetype/src/gxvalid/PaxHeaders.18661/README deleted file mode 100644 index 494f07b0..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/README +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.037842306 -30 ctime=1374498495.952316766 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvalid.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvalid.c deleted file mode 100644 index 89d588f8..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvalid.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.015842581 -30 ctime=1374498495.973316503 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvalid.h b/freetype/src/gxvalid/PaxHeaders.18661/gxvalid.h deleted file mode 100644 index abfa6372..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvalid.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.015842581 -30 ctime=1374498495.972316516 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvbsln.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvbsln.c deleted file mode 100644 index 977fe425..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvbsln.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.054842093 -30 ctime=1374498495.974316491 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvcommn.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvcommn.c deleted file mode 100644 index 580af2a0..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvcommn.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375349134.065839064 -30 atime=1385335785.064841968 -30 ctime=1375349134.065839064 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvcommn.h b/freetype/src/gxvalid/PaxHeaders.18661/gxvcommn.h deleted file mode 100644 index f207803c..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvcommn.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375348687.286424576 -30 atime=1385335785.015842581 -30 ctime=1375348687.286424576 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxverror.h b/freetype/src/gxvalid/PaxHeaders.18661/gxverror.h deleted file mode 100644 index 88c55c88..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxverror.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.993842856 -30 ctime=1374498495.964316616 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvfeat.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvfeat.c deleted file mode 100644 index a72aeb65..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvfeat.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.085841706 -30 ctime=1374498495.989316303 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvfeat.h b/freetype/src/gxvalid/PaxHeaders.18661/gxvfeat.h deleted file mode 100644 index 0f2f2394..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvfeat.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.992842868 -30 ctime=1374498495.957316703 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvfgen.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvfgen.c deleted file mode 100644 index aea3eb81..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvfgen.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.017842556 -30 ctime=1374498495.959316678 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvjust.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvjust.c deleted file mode 100644 index f88fbf45..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvjust.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.073841856 -30 ctime=1374498495.988316316 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvkern.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvkern.c deleted file mode 100644 index 81b2f5ba..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvkern.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.037842306 -30 ctime=1374498495.968316566 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvlcar.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvlcar.c deleted file mode 100644 index 10d6429a..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvlcar.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.038842293 -30 ctime=1374498495.961316653 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmod.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmod.c deleted file mode 100644 index 583414a9..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmod.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.038842293 -30 ctime=1374498495.965316603 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmod.h b/freetype/src/gxvalid/PaxHeaders.18661/gxvmod.h deleted file mode 100644 index e1599ff8..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmod.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.016842568 -30 ctime=1374498495.977316453 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmort.c deleted file mode 100644 index 78af45ad..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375348907.466671944 -30 atime=1385335785.078841793 -30 ctime=1375348907.466671944 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort.h b/freetype/src/gxvalid/PaxHeaders.18661/gxvmort.h deleted file mode 100644 index ee625520..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.085841706 -30 ctime=1374498495.975316478 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort0.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmort0.c deleted file mode 100644 index fae00541..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort0.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.043842231 -30 ctime=1374498495.966316591 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort1.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmort1.c deleted file mode 100644 index c94be074..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort1.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.044842218 -30 ctime=1374498495.985316353 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort2.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmort2.c deleted file mode 100644 index b0d81c00..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort2.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.980843018 -30 ctime=1374498495.992316266 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort4.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmort4.c deleted file mode 100644 index 4e50f331..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort4.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.078841793 -30 ctime=1374498495.993316253 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort5.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmort5.c deleted file mode 100644 index 50af47c9..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmort5.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.015842581 -30 ctime=1374498495.991316278 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx.c deleted file mode 100644 index 2e1612ab..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.992842868 -30 ctime=1374498495.963316628 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx.h b/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx.h deleted file mode 100644 index 272233c7..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.077841806 -30 ctime=1374498495.994316241 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx0.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx0.c deleted file mode 100644 index 42b90f32..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx0.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.036842318 -30 ctime=1374498495.983316378 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx1.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx1.c deleted file mode 100644 index 29fcabb9..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx1.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.036842318 -30 ctime=1374498495.995316228 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx2.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx2.c deleted file mode 100644 index a195eecc..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx2.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375349276.112063242 -30 atime=1385335785.039842281 -30 ctime=1375349276.112063242 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx4.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx4.c deleted file mode 100644 index 29840948..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx4.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.016842568 -30 ctime=1374498495.937316953 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx5.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx5.c deleted file mode 100644 index a5929f43..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvmorx5.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.017842556 -30 ctime=1374498495.956316716 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvopbd.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvopbd.c deleted file mode 100644 index 1325598c..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvopbd.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.053842106 -30 ctime=1374498495.938316941 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvprop.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvprop.c deleted file mode 100644 index dcf714b3..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvprop.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.043842231 -30 ctime=1374498495.970316541 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/gxvtrak.c b/freetype/src/gxvalid/PaxHeaders.18661/gxvtrak.c deleted file mode 100644 index f7101d49..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/gxvtrak.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.016842568 -30 ctime=1374498495.941316903 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/module.mk b/freetype/src/gxvalid/PaxHeaders.18661/module.mk deleted file mode 100644 index cc1ebd61..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.993842856 -30 ctime=1374498495.960316666 diff --git a/freetype/src/gxvalid/PaxHeaders.18661/rules.mk b/freetype/src/gxvalid/PaxHeaders.18661/rules.mk deleted file mode 100644 index d68be47f..00000000 --- a/freetype/src/gxvalid/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.984842968 -30 ctime=1374498495.976316466 diff --git a/freetype/src/gxvalid/gxvbsln.c b/freetype/src/gxvalid/gxvbsln.c index 3d100315..d1651187 100644 --- a/freetype/src/gxvalid/gxvbsln.c +++ b/freetype/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/freetype/src/gxvalid/gxvcommn.c b/freetype/src/gxvalid/gxvcommn.c index 7af52342..8e72a72f 100644 --- a/freetype/src/gxvalid/gxvcommn.c +++ b/freetype/src/gxvalid/gxvcommn.c @@ -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 ) != FT_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,7 +1285,7 @@ stateSize, &maxState, &maxEntry, - valid ); + gxvalid ); else { #if 0 @@ -1306,7 +1306,7 @@ maxClassID, table, limit, - valid ); + gxvalid ); GXV_EXIT; } @@ -1322,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]; @@ -1336,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; } @@ -1384,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; @@ -1395,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 ); @@ -1412,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; @@ -1463,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; @@ -1540,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: @@ -1559,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 */ @@ -1582,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; @@ -1612,37 +1612,37 @@ &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 ); + gxvalid ); #if 0 - if ( valid->subtable_length < classTable_length ) - classTable_length = valid->subtable_length; + 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 @@ -1659,10 +1659,10 @@ &entryTable_length, maxEntry, stateArray_length, - valid->xstatetable.maxClassID, + gxvalid->xstatetable.maxClassID, table, limit, - valid ); + gxvalid ); GXV_EXIT; } @@ -1719,7 +1719,7 @@ FT_LOCAL_DEF( void ) gxv_odtect_validate( GXV_odtect_Range odtect, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UInt i, j; diff --git a/freetype/src/gxvalid/gxvcommn.h b/freetype/src/gxvalid/gxvcommn.h index 2f44a751..f1143457 100644 --- a/freetype/src/gxvalid/gxvcommn.h +++ b/freetype/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 @@ -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/freetype/src/gxvalid/gxvfeat.c b/freetype/src/gxvalid/gxvfeat.c index 6f756509..69298b28 100644 --- a/freetype/src/gxvalid/gxvfeat.c +++ b/freetype/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/freetype/src/gxvalid/gxvjust.c b/freetype/src/gxvalid/gxvjust.c index 7816e0b7..24c26a56 100644 --- a/freetype/src/gxvalid/gxvjust.c +++ b/freetype/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/freetype/src/gxvalid/gxvkern.c b/freetype/src/gxvalid/gxvkern.c index 557c5f1f..787e3db8 100644 --- a/freetype/src/gxvalid/gxvkern.c +++ b/freetype/src/gxvalid/gxvkern.c @@ -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; @@ -311,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; @@ -319,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; } @@ -373,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 ); @@ -391,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 ); @@ -408,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 = @@ -439,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] ) @@ -455,7 +455,7 @@ - GXV_KERN_FMT2_DATA( array ), "array", odtect ); - gxv_odtect_validate( odtect, valid ); + gxv_odtect_validate( odtect, gxvalid ); GXV_EXIT; } @@ -466,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; @@ -485,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 ); } @@ -509,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; @@ -524,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; @@ -549,7 +549,7 @@ } } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -558,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 @@ -567,7 +567,7 @@ FT_Bool kernVariation; #endif - FT_UNUSED( valid ); + FT_UNUSED( gxvalid ); /* reserved bits = 0 */ @@ -595,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 @@ -605,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 */ @@ -636,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 @@ -646,7 +646,7 @@ FT_Bool override; #endif - FT_UNUSED( valid ); + FT_UNUSED( gxvalid ); /* reserved bits = 0 */ @@ -686,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; @@ -695,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; @@ -739,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 @@ -761,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 @@ -785,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 @@ -806,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; } @@ -837,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; @@ -850,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 ); @@ -865,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; @@ -886,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/freetype/src/gxvalid/gxvlcar.c b/freetype/src/gxvalid/gxvlcar.c index f14fa5b1..48308b02 100644 --- a/freetype/src/gxvalid/gxvlcar.c +++ b/freetype/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/freetype/src/gxvalid/gxvmort.c b/freetype/src/gxvalid/gxvmort.c index c4d49b32..55ff5a85 100644 --- a/freetype/src/gxvalid/gxvmort.c +++ b/freetype/src/gxvalid/gxvmort.c @@ -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,22 +106,22 @@ 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 ) @@ -150,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; @@ -198,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; @@ -207,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; } @@ -222,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 @@ -246,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; @@ -261,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; @@ -270,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; @@ -288,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/freetype/src/gxvalid/gxvmort.h b/freetype/src/gxvalid/gxvmort.h index 1e5a1f5a..8e62e52d 100644 --- a/freetype/src/gxvalid/gxvmort.h +++ b/freetype/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/freetype/src/gxvalid/gxvmort0.c b/freetype/src/gxvalid/gxvmort0.c index b136ceda..f19016ef 100644 --- a/freetype/src/gxvalid/gxvmort0.c +++ b/freetype/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/freetype/src/gxvalid/gxvmort1.c b/freetype/src/gxvalid/gxvmort1.c index 1c17a5d9..0189504e 100644 --- a/freetype/src/gxvalid/gxvmort1.c +++ b/freetype/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/freetype/src/gxvalid/gxvmort2.c b/freetype/src/gxvalid/gxvmort2.c index 9e08fb79..099ffd48 100644 --- a/freetype/src/gxvalid/gxvmort2.c +++ b/freetype/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/freetype/src/gxvalid/gxvmort4.c b/freetype/src/gxvalid/gxvmort4.c index 83470988..9e86af4d 100644 --- a/freetype/src/gxvalid/gxvmort4.c +++ b/freetype/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/freetype/src/gxvalid/gxvmort5.c b/freetype/src/gxvalid/gxvmort5.c index 32cfb036..9498b108 100644 --- a/freetype/src/gxvalid/gxvmort5.c +++ b/freetype/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/freetype/src/gxvalid/gxvmorx.c b/freetype/src/gxvalid/gxvmorx.c index 5ae04d32..96dba631 100644 --- a/freetype/src/gxvalid/gxvmorx.c +++ b/freetype/src/gxvalid/gxvmorx.c @@ -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; @@ -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/freetype/src/gxvalid/gxvmorx.h b/freetype/src/gxvalid/gxvmorx.h index 28c1a44f..9ed907ac 100644 --- a/freetype/src/gxvalid/gxvmorx.h +++ b/freetype/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/freetype/src/gxvalid/gxvmorx0.c b/freetype/src/gxvalid/gxvmorx0.c index 6a736c17..db165f4e 100644 --- a/freetype/src/gxvalid/gxvmorx0.c +++ b/freetype/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/freetype/src/gxvalid/gxvmorx1.c b/freetype/src/gxvalid/gxvmorx1.c index ce0009a1..49f53d18 100644 --- a/freetype/src/gxvalid/gxvmorx1.c +++ b/freetype/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/freetype/src/gxvalid/gxvmorx2.c b/freetype/src/gxvalid/gxvmorx2.c index 95b8ea40..e44445d1 100644 --- a/freetype/src/gxvalid/gxvmorx2.c +++ b/freetype/src/gxvalid/gxvmorx2.c @@ -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,23 +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 ); #if 0 - p += valid->subtable_length; + p += gxvalid->subtable_length; #endif - gxv_morx_subtable_type2_ligatureTable_validate( table, valid ); + gxv_morx_subtable_type2_ligatureTable_validate( table, gxvalid ); GXV_EXIT; } diff --git a/freetype/src/gxvalid/gxvmorx4.c b/freetype/src/gxvalid/gxvmorx4.c index c0d2f78e..68ab6784 100644 --- a/freetype/src/gxvalid/gxvmorx4.c +++ b/freetype/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/freetype/src/gxvalid/gxvmorx5.c b/freetype/src/gxvalid/gxvmorx5.c index d8cf7007..5e095dd3 100644 --- a/freetype/src/gxvalid/gxvmorx5.c +++ b/freetype/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/freetype/src/gxvalid/gxvopbd.c b/freetype/src/gxvalid/gxvopbd.c index e1250609..ab0cd72b 100644 --- a/freetype/src/gxvalid/gxvopbd.c +++ b/freetype/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/freetype/src/gxvalid/gxvprop.c b/freetype/src/gxvalid/gxvprop.c index 0be21336..aa5c8eed 100644 --- a/freetype/src/gxvalid/gxvprop.c +++ b/freetype/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/freetype/src/gxvalid/gxvtrak.c b/freetype/src/gxvalid/gxvtrak.c index 11fbd7cc..3ec1a567 100644 --- a/freetype/src/gxvalid/gxvtrak.c +++ b/freetype/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/freetype/src/gzip/PaxHeaders.18661/Jamfile b/freetype/src/gzip/PaxHeaders.18661/Jamfile deleted file mode 100644 index 198bd772..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.960830767 -29 ctime=1374498496.55430924 diff --git a/freetype/src/gzip/PaxHeaders.18661/adler32.c b/freetype/src/gzip/PaxHeaders.18661/adler32.c deleted file mode 100644 index d58cbc5f..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/adler32.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.928831167 -30 ctime=1374498496.561309152 diff --git a/freetype/src/gzip/PaxHeaders.18661/ftgzip.c b/freetype/src/gzip/PaxHeaders.18661/ftgzip.c deleted file mode 100644 index 50301e4a..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/ftgzip.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377791593.497265748 -30 atime=1385335785.955830829 -30 ctime=1377791593.497265748 diff --git a/freetype/src/gzip/PaxHeaders.18661/infblock.c b/freetype/src/gzip/PaxHeaders.18661/infblock.c deleted file mode 100644 index c239c8f4..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/infblock.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.930831142 -29 ctime=1374498496.55030929 diff --git a/freetype/src/gzip/PaxHeaders.18661/infblock.h b/freetype/src/gzip/PaxHeaders.18661/infblock.h deleted file mode 100644 index 51d8b15a..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/infblock.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.927831179 -30 ctime=1374498496.563309127 diff --git a/freetype/src/gzip/PaxHeaders.18661/infcodes.c b/freetype/src/gzip/PaxHeaders.18661/infcodes.c deleted file mode 100644 index 96d6998a..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/infcodes.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.927831179 -30 ctime=1374498496.564309115 diff --git a/freetype/src/gzip/PaxHeaders.18661/infcodes.h b/freetype/src/gzip/PaxHeaders.18661/infcodes.h deleted file mode 100644 index 65fb7046..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/infcodes.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.938831042 -29 ctime=1374498496.56230914 diff --git a/freetype/src/gzip/PaxHeaders.18661/inffixed.h b/freetype/src/gzip/PaxHeaders.18661/inffixed.h deleted file mode 100644 index 2ee68cd5..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/inffixed.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.931831129 -30 ctime=1374498496.544309365 diff --git a/freetype/src/gzip/PaxHeaders.18661/inflate.c b/freetype/src/gzip/PaxHeaders.18661/inflate.c deleted file mode 100644 index 500c3e60..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/inflate.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377701112.458074216 -30 atime=1385335785.981830504 -30 ctime=1377701112.458074216 diff --git a/freetype/src/gzip/PaxHeaders.18661/inftrees.c b/freetype/src/gzip/PaxHeaders.18661/inftrees.c deleted file mode 100644 index 61527a0d..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/inftrees.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.928831167 -30 ctime=1374498496.553309252 diff --git a/freetype/src/gzip/PaxHeaders.18661/inftrees.h b/freetype/src/gzip/PaxHeaders.18661/inftrees.h deleted file mode 100644 index 59d48723..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/inftrees.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.962830742 -30 ctime=1374498496.557309202 diff --git a/freetype/src/gzip/PaxHeaders.18661/infutil.c b/freetype/src/gzip/PaxHeaders.18661/infutil.c deleted file mode 100644 index a5c58d4b..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/infutil.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.961830754 -30 ctime=1374498496.552309265 diff --git a/freetype/src/gzip/PaxHeaders.18661/infutil.h b/freetype/src/gzip/PaxHeaders.18661/infutil.h deleted file mode 100644 index b61e1085..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/infutil.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.931831129 -30 ctime=1374498496.556309215 diff --git a/freetype/src/gzip/PaxHeaders.18661/rules.mk b/freetype/src/gzip/PaxHeaders.18661/rules.mk deleted file mode 100644 index ce72e34d..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377705609.324855645 -30 atime=1385335774.620972534 -30 ctime=1377705609.324855645 diff --git a/freetype/src/gzip/PaxHeaders.18661/zconf.h b/freetype/src/gzip/PaxHeaders.18661/zconf.h deleted file mode 100644 index 5c59e42f..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/zconf.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.930831142 -30 ctime=1374498496.560309165 diff --git a/freetype/src/gzip/PaxHeaders.18661/zlib.h b/freetype/src/gzip/PaxHeaders.18661/zlib.h deleted file mode 100644 index 608008b9..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/zlib.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377701112.461074178 -30 atime=1385335785.926831192 -30 ctime=1377701112.461074178 diff --git a/freetype/src/gzip/PaxHeaders.18661/zutil.c b/freetype/src/gzip/PaxHeaders.18661/zutil.c deleted file mode 100644 index ef511a78..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/zutil.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.961830754 -30 ctime=1374498496.559309177 diff --git a/freetype/src/gzip/PaxHeaders.18661/zutil.h b/freetype/src/gzip/PaxHeaders.18661/zutil.h deleted file mode 100644 index 73321af4..00000000 --- a/freetype/src/gzip/PaxHeaders.18661/zutil.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.961830754 -30 ctime=1374498496.551309277 diff --git a/freetype/src/gzip/ftgzip.c b/freetype/src/gzip/ftgzip.c index 2c60b6c5..2d4200d9 100644 --- a/freetype/src/gzip/ftgzip.c +++ b/freetype/src/gzip/ftgzip.c @@ -8,7 +8,7 @@ /* parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2002-2006, 2009-2013 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, */ @@ -208,8 +208,8 @@ /* 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) ) { @@ -603,10 +603,18 @@ 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 @@ -700,6 +708,11 @@ 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; diff --git a/freetype/src/gzip/inftrees.c b/freetype/src/gzip/inftrees.c index ef536521..56f52b17 100644 --- a/freetype/src/gzip/inftrees.c +++ b/freetype/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/freetype/src/lzw/PaxHeaders.18661/Jamfile b/freetype/src/lzw/PaxHeaders.18661/Jamfile deleted file mode 100644 index 0cf60892..00000000 --- a/freetype/src/lzw/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.991830379 -30 ctime=1374498496.277312703 diff --git a/freetype/src/lzw/PaxHeaders.18661/ftlzw.c b/freetype/src/lzw/PaxHeaders.18661/ftlzw.c deleted file mode 100644 index dd5c80f8..00000000 --- a/freetype/src/lzw/PaxHeaders.18661/ftlzw.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.991830379 -30 ctime=1374498496.280312665 diff --git a/freetype/src/lzw/PaxHeaders.18661/ftzopen.c b/freetype/src/lzw/PaxHeaders.18661/ftzopen.c deleted file mode 100644 index aa712a69..00000000 --- a/freetype/src/lzw/PaxHeaders.18661/ftzopen.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.990830392 -30 ctime=1374498496.276312715 diff --git a/freetype/src/lzw/PaxHeaders.18661/ftzopen.h b/freetype/src/lzw/PaxHeaders.18661/ftzopen.h deleted file mode 100644 index e2f8f213..00000000 --- a/freetype/src/lzw/PaxHeaders.18661/ftzopen.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.991830379 -30 ctime=1374498496.279312678 diff --git a/freetype/src/lzw/PaxHeaders.18661/rules.mk b/freetype/src/lzw/PaxHeaders.18661/rules.mk deleted file mode 100644 index 95a63a9a..00000000 --- a/freetype/src/lzw/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.635972347 -29 ctime=1374498496.27831269 diff --git a/freetype/src/lzw/ftlzw.c b/freetype/src/lzw/ftlzw.c index 82e6c007..e1b3564a 100644 --- a/freetype/src/lzw/ftlzw.c +++ b/freetype/src/lzw/ftlzw.c @@ -8,7 +8,7 @@ /* be used to parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2004-2006, 2009, 2010, 2012, 2013 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,8 +96,8 @@ goto Exit; /* head[0] && head[1] are the magic numbers */ - if ( head[0] != 0x1f || - head[1] != 0x9d ) + if ( head[0] != 0x1F || + head[1] != 0x9D ) error = FT_THROW( Invalid_File_Format ); Exit: @@ -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. diff --git a/freetype/src/lzw/ftzopen.h b/freetype/src/lzw/ftzopen.h index f7d2936b..cdc8fd7c 100644 --- a/freetype/src/lzw/ftzopen.h +++ b/freetype/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/freetype/src/otvalid/PaxHeaders.18661/Jamfile b/freetype/src/otvalid/PaxHeaders.18661/Jamfile deleted file mode 100644 index fe4154e6..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.104841468 -30 ctime=1374498495.875317728 diff --git a/freetype/src/otvalid/PaxHeaders.18661/module.mk b/freetype/src/otvalid/PaxHeaders.18661/module.mk deleted file mode 100644 index d53d3223..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.095841581 -30 ctime=1374498495.864317866 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvalid.c b/freetype/src/otvalid/PaxHeaders.18661/otvalid.c deleted file mode 100644 index a115b059..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvalid.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.109841406 -30 ctime=1374498495.866317841 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvalid.h b/freetype/src/otvalid/PaxHeaders.18661/otvalid.h deleted file mode 100644 index 1ffce9a4..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvalid.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.105841456 -30 ctime=1374498495.884317616 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvbase.c b/freetype/src/otvalid/PaxHeaders.18661/otvbase.c deleted file mode 100644 index 40beb016..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvbase.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.114841343 -30 ctime=1374498495.865317853 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvcommn.c b/freetype/src/otvalid/PaxHeaders.18661/otvcommn.c deleted file mode 100644 index 2a22b006..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvcommn.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.110841393 -30 ctime=1374498495.887317578 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvcommn.h b/freetype/src/otvalid/PaxHeaders.18661/otvcommn.h deleted file mode 100644 index 040faa97..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvcommn.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.120841268 -30 ctime=1374498495.870317791 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otverror.h b/freetype/src/otvalid/PaxHeaders.18661/otverror.h deleted file mode 100644 index 04c4f031..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otverror.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.104841468 -30 ctime=1374498495.890317541 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvgdef.c b/freetype/src/otvalid/PaxHeaders.18661/otvgdef.c deleted file mode 100644 index 940650ed..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvgdef.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.109841406 -30 ctime=1374498495.891317528 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvgpos.c b/freetype/src/otvalid/PaxHeaders.18661/otvgpos.c deleted file mode 100644 index d11aad07..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvgpos.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.106841443 -30 ctime=1374498495.883317628 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvgpos.h b/freetype/src/otvalid/PaxHeaders.18661/otvgpos.h deleted file mode 100644 index e0090de8..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvgpos.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.124841218 -30 ctime=1374498495.876317716 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvgsub.c b/freetype/src/otvalid/PaxHeaders.18661/otvgsub.c deleted file mode 100644 index 5487e030..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvgsub.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.105841456 -30 ctime=1374498495.889317553 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvjstf.c b/freetype/src/otvalid/PaxHeaders.18661/otvjstf.c deleted file mode 100644 index 6861a969..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvjstf.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.114841343 -30 ctime=1374498495.878317691 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvmath.c b/freetype/src/otvalid/PaxHeaders.18661/otvmath.c deleted file mode 100644 index 8d5a3fd9..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvmath.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.086841693 -30 ctime=1374498495.868317816 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvmod.c b/freetype/src/otvalid/PaxHeaders.18661/otvmod.c deleted file mode 100644 index e660884d..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvmod.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.120841268 -30 ctime=1374498495.879317678 diff --git a/freetype/src/otvalid/PaxHeaders.18661/otvmod.h b/freetype/src/otvalid/PaxHeaders.18661/otvmod.h deleted file mode 100644 index d5e9974d..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/otvmod.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.109841406 -30 ctime=1374498495.877317703 diff --git a/freetype/src/otvalid/PaxHeaders.18661/rules.mk b/freetype/src/otvalid/PaxHeaders.18661/rules.mk deleted file mode 100644 index 5ba2c359..00000000 --- a/freetype/src/otvalid/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.086841693 -30 ctime=1374498495.880317666 diff --git a/freetype/src/otvalid/otvbase.c b/freetype/src/otvalid/otvbase.c index d742d2dc..4f9d2fa2 100644 --- a/freetype/src/otvalid/otvbase.c +++ b/freetype/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/freetype/src/otvalid/otvcommn.c b/freetype/src/otvalid/otvcommn.c index a4f885b5..3c3de63c 100644 --- a/freetype/src/otvalid/otvcommn.c +++ b/freetype/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/freetype/src/otvalid/otvcommn.h b/freetype/src/otvalid/otvcommn.h index 898887fc..5c93ba7e 100644 --- a/freetype/src/otvalid/otvcommn.h +++ b/freetype/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/freetype/src/otvalid/otvgdef.c b/freetype/src/otvalid/otvgdef.c index 3633ad0d..e60ef363 100644 --- a/freetype/src/otvalid/otvgdef.c +++ b/freetype/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/freetype/src/otvalid/otvgpos.c b/freetype/src/otvalid/otvgpos.c index 49b46183..1a9dbaaa 100644 --- a/freetype/src/otvalid/otvgpos.c +++ b/freetype/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/freetype/src/otvalid/otvgsub.c b/freetype/src/otvalid/otvgsub.c index ed499d1e..024b8ca6 100644 --- a/freetype/src/otvalid/otvgsub.c +++ b/freetype/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/freetype/src/otvalid/otvjstf.c b/freetype/src/otvalid/otvjstf.c index a616a234..f273be8b 100644 --- a/freetype/src/otvalid/otvjstf.c +++ b/freetype/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/freetype/src/otvalid/otvmath.c b/freetype/src/otvalid/otvmath.c index 96f841f2..d1791f8d 100644 --- a/freetype/src/otvalid/otvmath.c +++ b/freetype/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/freetype/src/pcf/PaxHeaders.18661/Jamfile b/freetype/src/pcf/PaxHeaders.18661/Jamfile deleted file mode 100644 index 26608ce5..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.429837405 -30 ctime=1374498496.583308877 diff --git a/freetype/src/pcf/PaxHeaders.18661/README b/freetype/src/pcf/PaxHeaders.18661/README deleted file mode 100644 index 68336b6c..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/README +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.429837405 -30 ctime=1374498496.579308927 diff --git a/freetype/src/pcf/PaxHeaders.18661/module.mk b/freetype/src/pcf/PaxHeaders.18661/module.mk deleted file mode 100644 index 7ea11ce6..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.159003313 -30 ctime=1374498496.580308915 diff --git a/freetype/src/pcf/PaxHeaders.18661/pcf.c b/freetype/src/pcf/PaxHeaders.18661/pcf.c deleted file mode 100644 index 1927cddb..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/pcf.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.437837305 -30 ctime=1374498496.585308852 diff --git a/freetype/src/pcf/PaxHeaders.18661/pcf.h b/freetype/src/pcf/PaxHeaders.18661/pcf.h deleted file mode 100644 index 0c1075c5..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/pcf.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.436837318 -30 ctime=1374498496.593308752 diff --git a/freetype/src/pcf/PaxHeaders.18661/pcfdrivr.c b/freetype/src/pcf/PaxHeaders.18661/pcfdrivr.c deleted file mode 100644 index 2ab988a6..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/pcfdrivr.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1380086033.684114951 -30 atime=1385335785.445837205 -30 ctime=1380086033.684114951 diff --git a/freetype/src/pcf/PaxHeaders.18661/pcfdrivr.h b/freetype/src/pcf/PaxHeaders.18661/pcfdrivr.h deleted file mode 100644 index 863d17e6..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/pcfdrivr.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.425837455 -29 ctime=1374498496.57830894 diff --git a/freetype/src/pcf/PaxHeaders.18661/pcferror.h b/freetype/src/pcf/PaxHeaders.18661/pcferror.h deleted file mode 100644 index 5a662ebd..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/pcferror.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.446837193 -29 ctime=1374498496.59030879 diff --git a/freetype/src/pcf/PaxHeaders.18661/pcfread.c b/freetype/src/pcf/PaxHeaders.18661/pcfread.c deleted file mode 100644 index 7356c737..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/pcfread.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375349759.573019148 -30 atime=1385335785.426837443 -30 ctime=1375349759.573019148 diff --git a/freetype/src/pcf/PaxHeaders.18661/pcfread.h b/freetype/src/pcf/PaxHeaders.18661/pcfread.h deleted file mode 100644 index f4832e24..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/pcfread.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.446837193 -30 ctime=1374498496.595308727 diff --git a/freetype/src/pcf/PaxHeaders.18661/pcfutil.c b/freetype/src/pcf/PaxHeaders.18661/pcfutil.c deleted file mode 100644 index 8b8b8a81..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/pcfutil.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375349849.755891707 -29 atime=1385335785.44783718 -30 ctime=1375349849.755891707 diff --git a/freetype/src/pcf/PaxHeaders.18661/pcfutil.h b/freetype/src/pcf/PaxHeaders.18661/pcfutil.h deleted file mode 100644 index e292e1c0..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/pcfutil.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.426837443 -29 ctime=1374498496.58630884 diff --git a/freetype/src/pcf/PaxHeaders.18661/rules.mk b/freetype/src/pcf/PaxHeaders.18661/rules.mk deleted file mode 100644 index 23a9227c..00000000 --- a/freetype/src/pcf/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.537973572 -30 ctime=1374498496.587308827 diff --git a/freetype/src/pcf/pcfdrivr.c b/freetype/src/pcf/pcfdrivr.c index 748cbca8..96f6912b 100644 --- a/freetype/src/pcf/pcfdrivr.c +++ b/freetype/src/pcf/pcfdrivr.c @@ -2,7 +2,7 @@ FreeType font driver for pcf files - Copyright (C) 2000-2004, 2006-2011, 2013 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 @@ -189,7 +189,7 @@ THE SOFTWARE. } - FT_CALLBACK_TABLE_DEF + static const FT_CMap_ClassRec pcf_cmap_class = { sizeof ( PCF_CMapRec ), @@ -494,7 +494,13 @@ THE SOFTWARE. FT_TRACE1(( "PCF_Glyph_Load: glyph index %d\n", glyph_index )); - if ( !face || glyph_index >= (FT_UInt)face->root.num_glyphs ) + if ( !face ) + { + error = FT_THROW( Invalid_Face_Handle ); + goto Exit; + } + + if ( glyph_index >= (FT_UInt)face->root.num_glyphs ) { error = FT_THROW( Invalid_Argument ); goto Exit; diff --git a/freetype/src/pcf/pcfread.c b/freetype/src/pcf/pcfread.c index ee41c5df..a29a9e37 100644 --- a/freetype/src/pcf/pcfread.c +++ b/freetype/src/pcf/pcfread.c @@ -2,7 +2,7 @@ FreeType font driver for pcf fonts - Copyright 2000-2010, 2012, 2013 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 }; @@ -95,9 +95,11 @@ THE SOFTWARE. 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 ) ) + + 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 || @@ -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 FT_THROW( 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 { @@ -631,24 +682,40 @@ THE SOFTWARE. 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 ) @@ -699,8 +766,8 @@ THE SOFTWARE. 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 ) + /* 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 ) ) @@ -812,6 +879,15 @@ THE SOFTWARE. if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_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" )); FT_TRACE4(( " firstCol %d, lastCol %d, firstRow %d, lastRow %d\n", @@ -1153,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; diff --git a/freetype/src/pfr/PaxHeaders.18661/Jamfile b/freetype/src/pfr/PaxHeaders.18661/Jamfile deleted file mode 100644 index db5358f7..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.414837593 -30 ctime=1374498495.910317291 diff --git a/freetype/src/pfr/PaxHeaders.18661/module.mk b/freetype/src/pfr/PaxHeaders.18661/module.mk deleted file mode 100644 index e0de9d2f..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.095004113 -30 ctime=1374498495.900317416 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfr.c b/freetype/src/pfr/PaxHeaders.18661/pfr.c deleted file mode 100644 index d051d31e..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfr.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.418837543 -30 ctime=1374498495.916317216 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrcmap.c b/freetype/src/pfr/PaxHeaders.18661/pfrcmap.c deleted file mode 100644 index d4be7229..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrcmap.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375350105.586693382 -30 atime=1385335785.388837918 -30 ctime=1375350105.586693382 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrcmap.h b/freetype/src/pfr/PaxHeaders.18661/pfrcmap.h deleted file mode 100644 index 79a18fe7..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrcmap.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.418837543 -30 ctime=1374498495.898317441 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrdrivr.c b/freetype/src/pfr/PaxHeaders.18661/pfrdrivr.c deleted file mode 100644 index 559ef526..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrdrivr.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.414837593 -30 ctime=1374498495.902317391 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrdrivr.h b/freetype/src/pfr/PaxHeaders.18661/pfrdrivr.h deleted file mode 100644 index f662ed16..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrdrivr.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.38783793 -30 ctime=1374498495.921317153 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrerror.h b/freetype/src/pfr/PaxHeaders.18661/pfrerror.h deleted file mode 100644 index 3bdacb0d..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrerror.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.41583758 -30 ctime=1374498495.908317316 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrgload.c b/freetype/src/pfr/PaxHeaders.18661/pfrgload.c deleted file mode 100644 index c8e3e41b..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrgload.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377512187.471701838 -29 atime=1385335785.41583758 -30 ctime=1377512187.471701838 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrgload.h b/freetype/src/pfr/PaxHeaders.18661/pfrgload.h deleted file mode 100644 index 4fc95718..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrgload.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.414837593 -30 ctime=1374498495.901317403 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrload.c b/freetype/src/pfr/PaxHeaders.18661/pfrload.c deleted file mode 100644 index a166ace3..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrload.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.374838093 -30 ctime=1374498495.904317366 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrload.h b/freetype/src/pfr/PaxHeaders.18661/pfrload.h deleted file mode 100644 index db5358f7..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrload.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.414837593 -30 ctime=1374498495.910317291 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrobjs.c b/freetype/src/pfr/PaxHeaders.18661/pfrobjs.c deleted file mode 100644 index 94c673fd..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrobjs.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377512073.592125529 -30 atime=1385335785.413837605 -30 ctime=1377512073.592125529 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrobjs.h b/freetype/src/pfr/PaxHeaders.18661/pfrobjs.h deleted file mode 100644 index b1d7e074..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrobjs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.378838043 -30 ctime=1374498495.918317191 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrsbit.c b/freetype/src/pfr/PaxHeaders.18661/pfrsbit.c deleted file mode 100644 index ee92fa7d..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrsbit.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.378838043 -30 ctime=1374498495.915317228 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrsbit.h b/freetype/src/pfr/PaxHeaders.18661/pfrsbit.h deleted file mode 100644 index f0b2c5e6..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrsbit.h +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335785.41583758 -30 ctime=1374498495.917317203 diff --git a/freetype/src/pfr/PaxHeaders.18661/pfrtypes.h b/freetype/src/pfr/PaxHeaders.18661/pfrtypes.h deleted file mode 100644 index bc4400a8..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/pfrtypes.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.388837918 -30 ctime=1374498495.922317141 diff --git a/freetype/src/pfr/PaxHeaders.18661/rules.mk b/freetype/src/pfr/PaxHeaders.18661/rules.mk deleted file mode 100644 index 1ece1a98..00000000 --- a/freetype/src/pfr/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335774.51897381 -30 ctime=1374498495.913317253 diff --git a/freetype/src/pfr/pfrcmap.c b/freetype/src/pfr/pfrcmap.c index 1f05640c..90ba0105 100644 --- a/freetype/src/pfr/pfrcmap.c +++ b/freetype/src/pfr/pfrcmap.c @@ -25,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 = 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; diff --git a/freetype/src/pfr/pfrdrivr.c b/freetype/src/pfr/pfrdrivr.c index 4c43947b..db66281a 100644 --- a/freetype/src/pfr/pfrdrivr.c +++ b/freetype/src/pfr/pfrdrivr.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR driver interface (body). */ /* */ -/* Copyright 2002-2004, 2006, 2008, 2010, 2011, 2013 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 ) @@ -134,7 +134,7 @@ } - FT_CALLBACK_TABLE_DEF + static const FT_Service_PfrMetricsRec pfr_metrics_service_rec = { pfr_get_metrics, diff --git a/freetype/src/pfr/pfrload.c b/freetype/src/pfr/pfrload.c index c19fceb1..f68d0163 100644 --- a/freetype/src/pfr/pfrload.c +++ b/freetype/src/pfr/pfrload.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR loader (body). */ /* */ -/* Copyright 2002-2005, 2007, 2009, 2010, 2013 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, */ @@ -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; } @@ -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: diff --git a/freetype/src/pfr/pfrobjs.c b/freetype/src/pfr/pfrobjs.c index 8d3cd292..0c89242c 100644 --- a/freetype/src/pfr/pfrobjs.c +++ b/freetype/src/pfr/pfrobjs.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR object methods (body). */ /* */ -/* Copyright 2002-2008, 2010-2011, 2013 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" @@ -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 */ @@ -514,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/freetype/src/pfr/pfrsbit.c b/freetype/src/pfr/pfrsbit.c index 2da15007..979bf78a 100644 --- a/freetype/src/pfr/pfrsbit.c +++ b/freetype/src/pfr/pfrsbit.c @@ -59,7 +59,7 @@ if ( !decreasing ) { - writer->line += writer->pitch * ( target->rows-1 ); + writer->line += writer->pitch * ( target->rows - 1 ); writer->pitch = -writer->pitch; } } @@ -636,7 +636,9 @@ * 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", diff --git a/freetype/src/psaux/PaxHeaders.18661/Jamfile b/freetype/src/psaux/PaxHeaders.18661/Jamfile deleted file mode 100644 index de8b821d..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.771845631 -30 ctime=1374498496.180313915 diff --git a/freetype/src/psaux/PaxHeaders.18661/afmparse.c b/freetype/src/psaux/PaxHeaders.18661/afmparse.c deleted file mode 100644 index 1c0e133a..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/afmparse.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.773845606 -30 ctime=1374498496.172314016 diff --git a/freetype/src/psaux/PaxHeaders.18661/afmparse.h b/freetype/src/psaux/PaxHeaders.18661/afmparse.h deleted file mode 100644 index 87ea67a1..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/afmparse.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.765845706 -30 ctime=1374498496.181313903 diff --git a/freetype/src/psaux/PaxHeaders.18661/module.mk b/freetype/src/psaux/PaxHeaders.18661/module.mk deleted file mode 100644 index 05413116..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.268001951 -30 ctime=1374498496.173314003 diff --git a/freetype/src/psaux/PaxHeaders.18661/psaux.c b/freetype/src/psaux/PaxHeaders.18661/psaux.c deleted file mode 100644 index 919542c5..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/psaux.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.772845619 -29 ctime=1374498496.18631384 diff --git a/freetype/src/psaux/PaxHeaders.18661/psauxerr.h b/freetype/src/psaux/PaxHeaders.18661/psauxerr.h deleted file mode 100644 index 7dbe2f62..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/psauxerr.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.771845631 -29 ctime=1374498496.19031379 diff --git a/freetype/src/psaux/PaxHeaders.18661/psauxmod.c b/freetype/src/psaux/PaxHeaders.18661/psauxmod.c deleted file mode 100644 index 9cf5eec6..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/psauxmod.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.760845769 -30 ctime=1374498496.170314041 diff --git a/freetype/src/psaux/PaxHeaders.18661/psauxmod.h b/freetype/src/psaux/PaxHeaders.18661/psauxmod.h deleted file mode 100644 index 0f122b4c..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/psauxmod.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.771845631 -30 ctime=1374498496.188313815 diff --git a/freetype/src/psaux/PaxHeaders.18661/psconv.c b/freetype/src/psaux/PaxHeaders.18661/psconv.c deleted file mode 100644 index c05c6052..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/psconv.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.760845769 -30 ctime=1374498496.187313828 diff --git a/freetype/src/psaux/PaxHeaders.18661/psconv.h b/freetype/src/psaux/PaxHeaders.18661/psconv.h deleted file mode 100644 index 585ff1aa..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/psconv.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.772845619 -30 ctime=1374498496.185313853 diff --git a/freetype/src/psaux/PaxHeaders.18661/psobjs.c b/freetype/src/psaux/PaxHeaders.18661/psobjs.c deleted file mode 100644 index e3c3cb32..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/psobjs.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.757845806 -29 ctime=1374498496.17831394 diff --git a/freetype/src/psaux/PaxHeaders.18661/psobjs.h b/freetype/src/psaux/PaxHeaders.18661/psobjs.h deleted file mode 100644 index 0fe8840f..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/psobjs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.797845306 -30 ctime=1374498496.184313865 diff --git a/freetype/src/psaux/PaxHeaders.18661/rules.mk b/freetype/src/psaux/PaxHeaders.18661/rules.mk deleted file mode 100644 index c5d3ff05..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.648972184 -30 ctime=1374498496.183313878 diff --git a/freetype/src/psaux/PaxHeaders.18661/t1cmap.c b/freetype/src/psaux/PaxHeaders.18661/t1cmap.c deleted file mode 100644 index a782a85e..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/t1cmap.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.764845719 -30 ctime=1374498496.195313728 diff --git a/freetype/src/psaux/PaxHeaders.18661/t1cmap.h b/freetype/src/psaux/PaxHeaders.18661/t1cmap.h deleted file mode 100644 index bfa2b823..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/t1cmap.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.771845631 -30 ctime=1374498496.175313978 diff --git a/freetype/src/psaux/PaxHeaders.18661/t1decode.c b/freetype/src/psaux/PaxHeaders.18661/t1decode.c deleted file mode 100644 index ae9a1934..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/t1decode.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.783845481 -30 ctime=1374498496.193313753 diff --git a/freetype/src/psaux/PaxHeaders.18661/t1decode.h b/freetype/src/psaux/PaxHeaders.18661/t1decode.h deleted file mode 100644 index 89742de8..00000000 --- a/freetype/src/psaux/PaxHeaders.18661/t1decode.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.772845619 -30 ctime=1374498496.179313928 diff --git a/freetype/src/psaux/psconv.c b/freetype/src/psaux/psconv.c index d0d8861c..22e8cf2d 100644 --- a/freetype/src/psaux/psconv.c +++ b/freetype/src/psaux/psconv.c @@ -124,7 +124,7 @@ 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; @@ -245,12 +245,13 @@ 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 ( decimal < 0xCCCCCCCL ) + /* only add digit if we don't overflow */ + if ( divider < 0xCCCCCCCL && decimal < 0xCCCCCCCL ) { decimal = decimal * 10 + c; @@ -520,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/freetype/src/psaux/psobjs.c b/freetype/src/psaux/psobjs.c index dd976d3a..7ec3b4cf 100644 --- a/freetype/src/psaux/psobjs.c +++ b/freetype/src/psaux/psobjs.c @@ -4,7 +4,7 @@ /* */ /* Auxiliary functions for PostScript fonts (body). */ /* */ -/* Copyright 1996-2013 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, */ @@ -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, @@ -1200,7 +1202,7 @@ 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" )); @@ -1230,7 +1232,7 @@ { result = ps_tofixedarray( &cur, limit, max_objects, temp + i * max_objects, 0 ); - if ( result < 0 ) + if ( result < 0 || (FT_UInt)result < max_objects ) { FT_ERROR(( "ps_parser_load_field:" " expected %d integers in the %s subarray\n" @@ -1336,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; } diff --git a/freetype/src/psaux/t1cmap.c b/freetype/src/psaux/t1cmap.c index 9e5bd34f..fb1353ae 100644 --- a/freetype/src/psaux/t1cmap.c +++ b/freetype/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/freetype/src/psaux/t1decode.c b/freetype/src/psaux/t1decode.c index 6ce370bf..d67a05eb 100644 --- a/freetype/src/psaux/t1decode.c +++ b/freetype/src/psaux/t1decode.c @@ -4,7 +4,7 @@ /* */ /* PostScript Type 1 decoding routines (body). */ /* */ -/* Copyright 2000-2013 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, */ @@ -1098,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 */ diff --git a/freetype/src/pshinter/PaxHeaders.18661/Jamfile b/freetype/src/pshinter/PaxHeaders.18661/Jamfile deleted file mode 100644 index 872f7053..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.725846206 -30 ctime=1374498496.721307152 diff --git a/freetype/src/pshinter/PaxHeaders.18661/module.mk b/freetype/src/pshinter/PaxHeaders.18661/module.mk deleted file mode 100644 index 47c95a46..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.189002938 -30 ctime=1374498496.720307165 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshalgo.c b/freetype/src/pshinter/PaxHeaders.18661/pshalgo.c deleted file mode 100644 index e6c4b4a8..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshalgo.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.683846731 -29 ctime=1374498496.71830719 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshalgo.h b/freetype/src/pshinter/PaxHeaders.18661/pshalgo.h deleted file mode 100644 index 520670ef..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshalgo.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.726846194 -29 ctime=1374498496.72230714 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshglob.c b/freetype/src/pshinter/PaxHeaders.18661/pshglob.c deleted file mode 100644 index 5cccbf81..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshglob.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375350193.009600446 -30 atime=1385335784.742845994 -30 ctime=1375350193.009600446 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshglob.h b/freetype/src/pshinter/PaxHeaders.18661/pshglob.h deleted file mode 100644 index 4d9093c1..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshglob.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.725846206 -30 ctime=1374498496.725307102 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshinter.c b/freetype/src/pshinter/PaxHeaders.18661/pshinter.c deleted file mode 100644 index 6aa68c71..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshinter.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.726846194 -30 ctime=1374498496.723307127 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshmod.c b/freetype/src/pshinter/PaxHeaders.18661/pshmod.c deleted file mode 100644 index ca6b486a..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshmod.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.722846244 -30 ctime=1374498496.711307277 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshmod.h b/freetype/src/pshinter/PaxHeaders.18661/pshmod.h deleted file mode 100644 index a4be3241..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshmod.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.698846544 -29 ctime=1374498496.72630709 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshnterr.h b/freetype/src/pshinter/PaxHeaders.18661/pshnterr.h deleted file mode 100644 index b2bd2b3b..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshnterr.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.726846194 -29 ctime=1374498496.71030729 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshpic.c b/freetype/src/pshinter/PaxHeaders.18661/pshpic.c deleted file mode 100644 index a4be3241..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshpic.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.698846544 -29 ctime=1374498496.72630709 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshpic.h b/freetype/src/pshinter/PaxHeaders.18661/pshpic.h deleted file mode 100644 index c7d9e7ef..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshpic.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.722846244 -30 ctime=1374498496.709307302 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshrec.c b/freetype/src/pshinter/PaxHeaders.18661/pshrec.c deleted file mode 100644 index b0a8cfd7..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshrec.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.722846244 -29 ctime=1374498496.71430724 diff --git a/freetype/src/pshinter/PaxHeaders.18661/pshrec.h b/freetype/src/pshinter/PaxHeaders.18661/pshrec.h deleted file mode 100644 index 1cc7a75d..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/pshrec.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.725846206 -30 ctime=1374498496.719307177 diff --git a/freetype/src/pshinter/PaxHeaders.18661/rules.mk b/freetype/src/pshinter/PaxHeaders.18661/rules.mk deleted file mode 100644 index 5883a3c6..00000000 --- a/freetype/src/pshinter/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.573973122 -30 ctime=1374498496.724307115 diff --git a/freetype/src/pshinter/pshalgo.c b/freetype/src/pshinter/pshalgo.c index 343472dd..644c76d1 100644 --- a/freetype/src/pshinter/pshalgo.c +++ b/freetype/src/pshinter/pshalgo.c @@ -4,7 +4,7 @@ /* */ /* PostScript hinting algorithm (body). */ /* */ -/* Copyright 2001-2010, 2012, 2013 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 */ @@ -1406,7 +1406,6 @@ point = first; before = point; - after = point; do { @@ -2079,8 +2078,6 @@ start = first; do { - point = first; - /* skip consecutive fitted points */ for (;;) { diff --git a/freetype/src/pshinter/pshglob.c b/freetype/src/pshinter/pshglob.c index f75bae45..1bcc481b 100644 --- a/freetype/src/pshinter/pshglob.c +++ b/freetype/src/pshinter/pshglob.c @@ -5,7 +5,7 @@ /* PostScript hinter global hinting management (body). */ /* Inspired by the new auto-hinter module. */ /* */ -/* Copyright 2001-2004, 2006, 2010, 2012, 2013 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 */ @@ -750,7 +750,7 @@ } - FT_LOCAL_DEF( FT_Error ) + FT_LOCAL_DEF( void ) psh_globals_set_scale( PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, @@ -780,8 +780,6 @@ psh_globals_scale_widths( globals, 1 ); psh_blues_scale_zones( &globals->blues, y_scale, y_delta ); } - - return 0; } diff --git a/freetype/src/pshinter/pshglob.h b/freetype/src/pshinter/pshglob.h index c5116261..94d972a9 100644 --- a/freetype/src/pshinter/pshglob.h +++ b/freetype/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/freetype/src/pshinter/pshrec.c b/freetype/src/pshinter/pshrec.c index cd66ea86..73a18ffd 100644 --- a/freetype/src/pshinter/pshrec.c +++ b/freetype/src/pshinter/pshrec.c @@ -4,7 +4,7 @@ /* */ /* FreeType PostScript hints recorder (body). */ /* */ -/* Copyright 2001-2004, 2007, 2009, 2013 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, */ @@ -797,13 +797,12 @@ } - 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 FT_Err_Ok; } diff --git a/freetype/src/pshinter/pshrec.h b/freetype/src/pshinter/pshrec.h index dcb3197f..a88fe6e8 100644 --- a/freetype/src/pshinter/pshrec.h +++ b/freetype/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/freetype/src/psnames/PaxHeaders.18661/Jamfile b/freetype/src/psnames/PaxHeaders.18661/Jamfile deleted file mode 100644 index 3818c543..00000000 --- a/freetype/src/psnames/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.747820928 -30 ctime=1374498496.267312828 diff --git a/freetype/src/psnames/PaxHeaders.18661/module.mk b/freetype/src/psnames/PaxHeaders.18661/module.mk deleted file mode 100644 index fd4fd6a3..00000000 --- a/freetype/src/psnames/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.281001788 -30 ctime=1374498496.244313115 diff --git a/freetype/src/psnames/PaxHeaders.18661/psmodule.c b/freetype/src/psnames/PaxHeaders.18661/psmodule.c deleted file mode 100644 index 66df9b9b..00000000 --- a/freetype/src/psnames/PaxHeaders.18661/psmodule.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.735821078 -30 ctime=1374498496.269312803 diff --git a/freetype/src/psnames/PaxHeaders.18661/psmodule.h b/freetype/src/psnames/PaxHeaders.18661/psmodule.h deleted file mode 100644 index 3496f812..00000000 --- a/freetype/src/psnames/PaxHeaders.18661/psmodule.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.747820928 -29 ctime=1374498496.24231314 diff --git a/freetype/src/psnames/PaxHeaders.18661/psnamerr.h b/freetype/src/psnames/PaxHeaders.18661/psnamerr.h deleted file mode 100644 index 077ca237..00000000 --- a/freetype/src/psnames/PaxHeaders.18661/psnamerr.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.747820928 -30 ctime=1374498496.271312778 diff --git a/freetype/src/psnames/PaxHeaders.18661/psnames.c b/freetype/src/psnames/PaxHeaders.18661/psnames.c deleted file mode 100644 index 3acf1233..00000000 --- a/freetype/src/psnames/PaxHeaders.18661/psnames.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.735821078 -30 ctime=1374498496.241313153 diff --git a/freetype/src/psnames/PaxHeaders.18661/pspic.c b/freetype/src/psnames/PaxHeaders.18661/pspic.c deleted file mode 100644 index a384507b..00000000 --- a/freetype/src/psnames/PaxHeaders.18661/pspic.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.736821066 -30 ctime=1374498496.240313165 diff --git a/freetype/src/psnames/PaxHeaders.18661/pspic.h b/freetype/src/psnames/PaxHeaders.18661/pspic.h deleted file mode 100644 index f318fb81..00000000 --- a/freetype/src/psnames/PaxHeaders.18661/pspic.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.748820916 -30 ctime=1374498496.245313103 diff --git a/freetype/src/psnames/PaxHeaders.18661/pstables.h b/freetype/src/psnames/PaxHeaders.18661/pstables.h deleted file mode 100644 index 0da14478..00000000 --- a/freetype/src/psnames/PaxHeaders.18661/pstables.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.602822741 -29 ctime=1374498496.26631284 diff --git a/freetype/src/psnames/PaxHeaders.18661/rules.mk b/freetype/src/psnames/PaxHeaders.18661/rules.mk deleted file mode 100644 index c24b6db8..00000000 --- a/freetype/src/psnames/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.656972084 -29 ctime=1374498496.27031279 diff --git a/freetype/src/psnames/psmodule.c b/freetype/src/psnames/psmodule.c index 0a5bcb7d..42c9aff2 100644 --- a/freetype/src/psnames/psmodule.c +++ b/freetype/src/psnames/psmodule.c @@ -4,7 +4,7 @@ /* */ /* PSNames module implementation (body). */ /* */ -/* Copyright 1996-2003, 2005-2008, 2012, 2013 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, */ @@ -563,7 +563,7 @@ psnames_get_service( FT_Module module, const char* service_id ) { - /* PSCMAPS_SERVICES_GET derefers `library' in PIC mode */ + /* PSCMAPS_SERVICES_GET dereferences `library' in PIC mode */ #ifdef FT_CONFIG_OPTION_PIC FT_Library library; diff --git a/freetype/src/psnames/rules.mk b/freetype/src/psnames/rules.mk index 4cd39a8c..f321de2d 100644 --- a/freetype/src/psnames/rules.mk +++ b/freetype/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/freetype/src/raster/PaxHeaders.18661/Jamfile b/freetype/src/raster/PaxHeaders.18661/Jamfile deleted file mode 100644 index 85fca062..00000000 --- a/freetype/src/raster/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.591847881 -30 ctime=1374498496.224313365 diff --git a/freetype/src/raster/PaxHeaders.18661/ftmisc.h b/freetype/src/raster/PaxHeaders.18661/ftmisc.h deleted file mode 100644 index 867d069f..00000000 --- a/freetype/src/raster/PaxHeaders.18661/ftmisc.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.591847881 -30 ctime=1374498496.220313415 diff --git a/freetype/src/raster/PaxHeaders.18661/ftraster.c b/freetype/src/raster/PaxHeaders.18661/ftraster.c deleted file mode 100644 index c967e40d..00000000 --- a/freetype/src/raster/PaxHeaders.18661/ftraster.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255826.851363203 -30 atime=1385335760.288151719 -30 ctime=1384255826.851363203 diff --git a/freetype/src/raster/PaxHeaders.18661/ftraster.h b/freetype/src/raster/PaxHeaders.18661/ftraster.h deleted file mode 100644 index 87ddb908..00000000 --- a/freetype/src/raster/PaxHeaders.18661/ftraster.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.592847869 -30 ctime=1374498496.211313528 diff --git a/freetype/src/raster/PaxHeaders.18661/ftrend1.c b/freetype/src/raster/PaxHeaders.18661/ftrend1.c deleted file mode 100644 index 8500cbb5..00000000 --- a/freetype/src/raster/PaxHeaders.18661/ftrend1.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.592847869 -30 ctime=1374498496.233313253 diff --git a/freetype/src/raster/PaxHeaders.18661/ftrend1.h b/freetype/src/raster/PaxHeaders.18661/ftrend1.h deleted file mode 100644 index cbf14554..00000000 --- a/freetype/src/raster/PaxHeaders.18661/ftrend1.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.592847869 -30 ctime=1374498496.236313215 diff --git a/freetype/src/raster/PaxHeaders.18661/module.mk b/freetype/src/raster/PaxHeaders.18661/module.mk deleted file mode 100644 index 1ac30484..00000000 --- a/freetype/src/raster/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.199002813 -30 ctime=1374498496.221313403 diff --git a/freetype/src/raster/PaxHeaders.18661/raster.c b/freetype/src/raster/PaxHeaders.18661/raster.c deleted file mode 100644 index 42c1f4ad..00000000 --- a/freetype/src/raster/PaxHeaders.18661/raster.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.593847856 -30 ctime=1374498496.225313353 diff --git a/freetype/src/raster/PaxHeaders.18661/rasterrs.h b/freetype/src/raster/PaxHeaders.18661/rasterrs.h deleted file mode 100644 index c6805790..00000000 --- a/freetype/src/raster/PaxHeaders.18661/rasterrs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.590847894 -30 ctime=1374498496.235313228 diff --git a/freetype/src/raster/PaxHeaders.18661/rastpic.c b/freetype/src/raster/PaxHeaders.18661/rastpic.c deleted file mode 100644 index 9c827a67..00000000 --- a/freetype/src/raster/PaxHeaders.18661/rastpic.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.591847881 -30 ctime=1374498496.223313378 diff --git a/freetype/src/raster/PaxHeaders.18661/rastpic.h b/freetype/src/raster/PaxHeaders.18661/rastpic.h deleted file mode 100644 index ab9f2206..00000000 --- a/freetype/src/raster/PaxHeaders.18661/rastpic.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.593847856 -30 ctime=1374498496.212313515 diff --git a/freetype/src/raster/PaxHeaders.18661/rules.mk b/freetype/src/raster/PaxHeaders.18661/rules.mk deleted file mode 100644 index b6b329da..00000000 --- a/freetype/src/raster/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.579973047 -29 ctime=1374498496.23431324 diff --git a/freetype/src/raster/ftraster.c b/freetype/src/raster/ftraster.c index 8aa11133..b06ac333 100644 --- a/freetype/src/raster/ftraster.c +++ b/freetype/src/raster/ftraster.c @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph rasterizer (body). */ /* */ -/* Copyright 1996-2003, 2005, 2007-2013 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, */ @@ -1874,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--; @@ -2284,6 +2284,8 @@ Long e1, e2; Byte* target; + Int dropOutControl = left->flags & 7; + FT_UNUSED( y ); FT_UNUSED( left ); FT_UNUSED( right ); @@ -2293,7 +2295,8 @@ 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 ) ); @@ -2550,7 +2553,7 @@ e1 = TRUNC( e1 ); - if ( e1 >= 0 && e1 < ras.target.rows ) + if ( e1 >= 0 && (ULong)e1 < ras.target.rows ) { PByte p; @@ -2644,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 */ @@ -2659,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 @@ -2673,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 ) @@ -3539,7 +3542,7 @@ } - static void + static int ft_black_set_mode( black_PRaster raster, unsigned long mode, const char* palette ) @@ -3563,6 +3566,8 @@ FT_UNUSED( palette ); #endif + + return 0; } diff --git a/freetype/src/sfnt/PaxHeaders.18661/Jamfile b/freetype/src/sfnt/PaxHeaders.18661/Jamfile deleted file mode 100644 index 0c032a95..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.905843956 -29 ctime=1374498496.33431199 diff --git a/freetype/src/sfnt/PaxHeaders.18661/module.mk b/freetype/src/sfnt/PaxHeaders.18661/module.mk deleted file mode 100644 index 7368620b..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.175003113 -29 ctime=1374498496.32631209 diff --git a/freetype/src/sfnt/PaxHeaders.18661/pngshim.c b/freetype/src/sfnt/PaxHeaders.18661/pngshim.c deleted file mode 100644 index dfd50431..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/pngshim.c +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1375447717.67939037 -30 atime=1385335784.905843956 -29 ctime=1375447717.67939037 diff --git a/freetype/src/sfnt/PaxHeaders.18661/pngshim.h b/freetype/src/sfnt/PaxHeaders.18661/pngshim.h deleted file mode 100644 index 4e4b8f1f..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/pngshim.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.866844443 -29 ctime=1374498496.32231214 diff --git a/freetype/src/sfnt/PaxHeaders.18661/rules.mk b/freetype/src/sfnt/PaxHeaders.18661/rules.mk deleted file mode 100644 index 67840855..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -29 atime=1385335774.55897331 -30 ctime=1374498496.341311903 diff --git a/freetype/src/sfnt/PaxHeaders.18661/sfdriver.c b/freetype/src/sfnt/PaxHeaders.18661/sfdriver.c deleted file mode 100644 index 3b486ae2..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/sfdriver.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.865844456 -30 ctime=1374498496.315312228 diff --git a/freetype/src/sfnt/PaxHeaders.18661/sfdriver.h b/freetype/src/sfnt/PaxHeaders.18661/sfdriver.h deleted file mode 100644 index 7458dfae..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/sfdriver.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.963843231 -30 ctime=1374498496.325312103 diff --git a/freetype/src/sfnt/PaxHeaders.18661/sferrors.h b/freetype/src/sfnt/PaxHeaders.18661/sferrors.h deleted file mode 100644 index 7c9e7aad..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/sferrors.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.857844556 -30 ctime=1374498496.339311928 diff --git a/freetype/src/sfnt/PaxHeaders.18661/sfnt.c b/freetype/src/sfnt/PaxHeaders.18661/sfnt.c deleted file mode 100644 index 56ff31a9..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/sfnt.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.962843243 -30 ctime=1374498496.324312115 diff --git a/freetype/src/sfnt/PaxHeaders.18661/sfntpic.c b/freetype/src/sfnt/PaxHeaders.18661/sfntpic.c deleted file mode 100644 index c64111c7..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/sfntpic.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.906843943 -29 ctime=1374498496.34231189 diff --git a/freetype/src/sfnt/PaxHeaders.18661/sfntpic.h b/freetype/src/sfnt/PaxHeaders.18661/sfntpic.h deleted file mode 100644 index 1996dd41..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/sfntpic.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.858844543 -30 ctime=1374498496.327312078 diff --git a/freetype/src/sfnt/PaxHeaders.18661/sfobjs.c b/freetype/src/sfnt/PaxHeaders.18661/sfobjs.c deleted file mode 100644 index 20f91d16..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/sfobjs.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385030964.157387307 -30 atime=1385335729.194540443 -30 ctime=1385030964.157387307 diff --git a/freetype/src/sfnt/PaxHeaders.18661/sfobjs.h b/freetype/src/sfnt/PaxHeaders.18661/sfobjs.h deleted file mode 100644 index 0584666a..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/sfobjs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.866844443 -29 ctime=1374498496.31431224 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttbdf.c b/freetype/src/sfnt/PaxHeaders.18661/ttbdf.c deleted file mode 100644 index 5fe344dd..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttbdf.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.918843793 -30 ctime=1374498496.340311915 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttbdf.h b/freetype/src/sfnt/PaxHeaders.18661/ttbdf.h deleted file mode 100644 index 5d8b03c3..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttbdf.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.962843243 -30 ctime=1374498496.321312153 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttcmap.c b/freetype/src/sfnt/PaxHeaders.18661/ttcmap.c deleted file mode 100644 index 4e621887..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttcmap.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375350734.552830224 -30 atime=1385335784.939843531 -30 ctime=1375350734.552830224 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttcmap.h b/freetype/src/sfnt/PaxHeaders.18661/ttcmap.h deleted file mode 100644 index b759c94f..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttcmap.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.963843231 -29 ctime=1374498496.33831194 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttcmapc.h b/freetype/src/sfnt/PaxHeaders.18661/ttcmapc.h deleted file mode 100644 index de245af1..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttcmapc.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.918843793 -30 ctime=1374498496.319312178 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttkern.c b/freetype/src/sfnt/PaxHeaders.18661/ttkern.c deleted file mode 100644 index 7b21919b..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttkern.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375350454.352333212 -30 atime=1385335784.865844456 -30 ctime=1375350454.352333212 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttkern.h b/freetype/src/sfnt/PaxHeaders.18661/ttkern.h deleted file mode 100644 index 0b05c457..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttkern.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.918843793 -30 ctime=1374498496.353311753 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttload.c b/freetype/src/sfnt/PaxHeaders.18661/ttload.c deleted file mode 100644 index f5b5470f..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttload.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384584291.171219724 -30 atime=1385335757.158190849 -30 ctime=1384584291.171219724 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttload.h b/freetype/src/sfnt/PaxHeaders.18661/ttload.h deleted file mode 100644 index 91d715d1..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttload.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.905843956 -30 ctime=1374498496.323312128 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttmtx.c b/freetype/src/sfnt/PaxHeaders.18661/ttmtx.c deleted file mode 100644 index 0780fbc9..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttmtx.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.906843943 -29 ctime=1374498496.31831219 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttmtx.h b/freetype/src/sfnt/PaxHeaders.18661/ttmtx.h deleted file mode 100644 index 12d8874e..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttmtx.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.858844543 -29 ctime=1374498496.33031204 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttpost.c b/freetype/src/sfnt/PaxHeaders.18661/ttpost.c deleted file mode 100644 index f666bd75..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttpost.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.864844468 -30 ctime=1374498496.332312015 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttpost.h b/freetype/src/sfnt/PaxHeaders.18661/ttpost.h deleted file mode 100644 index e2003036..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttpost.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.919843781 -30 ctime=1374498496.316312215 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttsbit.c b/freetype/src/sfnt/PaxHeaders.18661/ttsbit.c deleted file mode 100644 index f32fc450..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttsbit.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385247394.756639369 -30 atime=1385335719.093666721 -30 ctime=1385247394.756639369 diff --git a/freetype/src/sfnt/PaxHeaders.18661/ttsbit.h b/freetype/src/sfnt/PaxHeaders.18661/ttsbit.h deleted file mode 100644 index 0e1bf41b..00000000 --- a/freetype/src/sfnt/PaxHeaders.18661/ttsbit.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.946843443 -30 ctime=1374498496.320312165 diff --git a/freetype/src/sfnt/pngshim.c b/freetype/src/sfnt/pngshim.c index 878de1fe..9bfcc2a7 100644 --- a/freetype/src/sfnt/pngshim.c +++ b/freetype/src/sfnt/pngshim.c @@ -4,7 +4,7 @@ /* */ /* PNG Bitmap glyph support. */ /* */ -/* Copyright 2013 by Google, Inc. */ +/* 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, */ @@ -129,7 +129,7 @@ *error = FT_THROW( Out_Of_Memory ); #ifdef PNG_SETJMP_SUPPORTED - longjmp( png_jmpbuf( png ), 1 ); + ft_longjmp( png_jmpbuf( png ), 1 ); #endif /* if we get here, then we have no choice but to abort ... */ } @@ -205,11 +205,11 @@ goto Exit; } - if ( !populate_map_and_metrics && - ( x_offset + metrics->width > map->width || - y_offset + metrics->height > map->rows || - pix_bits != 32 || - map->pixel_mode != FT_PIXEL_MODE_BGRA ) ) + 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; @@ -269,6 +269,14 @@ 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 ); diff --git a/freetype/src/sfnt/sfdriver.c b/freetype/src/sfnt/sfdriver.c index e0132c92..badb159d 100644 --- a/freetype/src/sfnt/sfdriver.c +++ b/freetype/src/sfnt/sfdriver.c @@ -4,7 +4,7 @@ /* */ /* High-level SFNT driver interface (body). */ /* */ -/* Copyright 1996-2007, 2009-2013 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, */ @@ -75,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; @@ -266,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 ) || @@ -427,7 +427,7 @@ sfnt_get_interface( FT_Module module, const char* module_interface ) { - /* SFNT_SERVICES_GET derefers `library' in PIC mode */ + /* SFNT_SERVICES_GET dereferences `library' in PIC mode */ #ifdef FT_CONFIG_OPTION_PIC FT_Library library; diff --git a/freetype/src/sfnt/sfobjs.c b/freetype/src/sfnt/sfobjs.c index 5c0d0f61..70b988d6 100644 --- a/freetype/src/sfnt/sfobjs.c +++ b/freetype/src/sfnt/sfobjs.c @@ -4,7 +4,7 @@ /* */ /* SFNT object management (base). */ /* */ -/* Copyright 1996-2008, 2010-2013 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, */ @@ -348,29 +348,22 @@ } -#define WRITE_BYTE( p, v ) \ - do \ - { \ - *(p)++ = (v) >> 0; \ - \ +#define WRITE_USHORT( p, v ) \ + do \ + { \ + *(p)++ = (FT_Byte)( (v) >> 8 ); \ + *(p)++ = (FT_Byte)( (v) >> 0 ); \ + \ } while ( 0 ) -#define WRITE_USHORT( p, v ) \ - do \ - { \ - *(p)++ = (v) >> 8; \ - *(p)++ = (v) >> 0; \ - \ - } while ( 0 ) - -#define WRITE_ULONG( p, v ) \ - do \ - { \ - *(p)++ = (v) >> 24; \ - *(p)++ = (v) >> 16; \ - *(p)++ = (v) >> 8; \ - *(p)++ = (v) >> 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 ) @@ -574,8 +567,10 @@ if ( table->Offset != woff_offset || - table->Offset + table->CompLength > woff.length || - sfnt_offset + table->OrigLength > woff.totalSfntSize || + 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 ); @@ -661,6 +656,8 @@ } else { +#ifdef FT_CONFIG_OPTION_USE_ZLIB + /* Uncompress with zlib. */ FT_ULong output_len = table->OrigLength; @@ -675,6 +672,13 @@ 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(); @@ -717,7 +721,6 @@ } -#undef WRITE_BYTE #undef WRITE_USHORT #undef WRITE_ULONG @@ -899,7 +902,8 @@ #define LOAD_( x ) \ - do { \ + do \ + { \ FT_TRACE2(( "`" #x "' " )); \ FT_TRACE3(( "-->\n" )); \ \ @@ -914,7 +918,8 @@ } while ( 0 ) #define LOADM_( x, vertical ) \ - do { \ + do \ + { \ FT_TRACE2(( "`%s" #x "' ", \ vertical ? "vertical " : "" )); \ FT_TRACE3(( "-->\n" )); \ @@ -930,7 +935,8 @@ } while ( 0 ) #define GET_NAME( id, field ) \ - do { \ + do \ + { \ error = tt_face_get_name( face, TT_NAME_ID_ ## id, field ); \ if ( error ) \ goto Exit; \ @@ -1012,7 +1018,6 @@ if ( is_apple_sbix ) has_outline = FALSE; - /* if this font doesn't contain outlines, we try to load */ /* a `bhed' table */ if ( !has_outline && sfnt->load_bhed ) diff --git a/freetype/src/sfnt/ttcmap.c b/freetype/src/sfnt/ttcmap.c index 9b7856ba..f54de706 100644 --- a/freetype/src/sfnt/ttcmap.c +++ b/freetype/src/sfnt/ttcmap.c @@ -4,7 +4,7 @@ /* */ /* TrueType character mapping table (cmap) support (body). */ /* */ -/* Copyright 2002-2010, 2012, 2013 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, */ @@ -88,10 +88,16 @@ 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; @@ -279,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_UInt n, max_subs; - FT_Byte* keys; /* keys table */ - FT_Byte* subs; /* sub-headers */ - FT_Byte* glyph_ids; /* glyph ID array */ + 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 */ + + + 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; @@ -818,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 = 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 ) @@ -838,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 */ @@ -1649,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 */ @@ -1674,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 ); @@ -1872,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 */ @@ -2044,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 ) @@ -2059,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 */ @@ -2081,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; } @@ -2110,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; @@ -2383,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 */ @@ -2434,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; @@ -2758,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 */ @@ -2800,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 ) @@ -2827,7 +2870,8 @@ 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 ) @@ -3450,23 +3494,14 @@ /* 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 ) )); + 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)\n" - " subtable #%d and higher are loaded" - " but cannot be searched\n", - num_cmaps, FT_MAX_CHARMAP_CACHEABLE + 1 )); -#endif - for ( ; num_cmaps > 0 && p + 8 <= limit; num_cmaps-- ) { FT_CharMapRec charmap; diff --git a/freetype/src/sfnt/ttkern.c b/freetype/src/sfnt/ttkern.c index 32c4008b..455e7b5e 100644 --- a/freetype/src/sfnt/ttkern.c +++ b/freetype/src/sfnt/ttkern.c @@ -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; diff --git a/freetype/src/sfnt/ttload.c b/freetype/src/sfnt/ttload.c index 0a3cd29d..8338150a 100644 --- a/freetype/src/sfnt/ttload.c +++ b/freetype/src/sfnt/ttload.c @@ -5,7 +5,7 @@ /* Load the basic TrueType tables, i.e., tables that can be either in */ /* TTF or OTF fonts (body). */ /* */ -/* Copyright 1996-2010, 2012, 2013 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, */ @@ -207,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; @@ -395,7 +398,10 @@ 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 { diff --git a/freetype/src/sfnt/ttmtx.c b/freetype/src/sfnt/ttmtx.c index a8cc63a1..bb319577 100644 --- a/freetype/src/sfnt/ttmtx.c +++ b/freetype/src/sfnt/ttmtx.c @@ -4,7 +4,7 @@ /* */ /* Load the metrics tables common to TTF and OTF fonts (body). */ /* */ -/* Copyright 2006-2009, 2011-2013 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, */ @@ -201,7 +201,7 @@ /* aadvance :: The advance width or advance height, depending on */ /* the `vertical' flag. */ /* */ - FT_LOCAL_DEF( FT_Error ) + FT_LOCAL_DEF( void ) tt_face_get_metrics( TT_Face face, FT_Bool vertical, FT_UInt gindex, @@ -274,8 +274,6 @@ *abearing = 0; *aadvance = 0; } - - return FT_Err_Ok; } diff --git a/freetype/src/sfnt/ttmtx.h b/freetype/src/sfnt/ttmtx.h index 8b91a113..fb040394 100644 --- a/freetype/src/sfnt/ttmtx.h +++ b/freetype/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/freetype/src/sfnt/ttpost.c b/freetype/src/sfnt/ttpost.c index 47a85c0c..99d80054 100644 --- a/freetype/src/sfnt/ttpost.c +++ b/freetype/src/sfnt/ttpost.c @@ -5,7 +5,7 @@ /* Postcript name table processing for TrueType and OpenType fonts */ /* (body). */ /* */ -/* Copyright 1996-2003, 2006-2010, 2013 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", }; diff --git a/freetype/src/sfnt/ttsbit.c b/freetype/src/sfnt/ttsbit.c index 890e7947..c2db96c6 100644 --- a/freetype/src/sfnt/ttsbit.c +++ b/freetype/src/sfnt/ttsbit.c @@ -4,7 +4,7 @@ /* */ /* TrueType and OpenType embedded bitmap support (body). */ /* */ -/* Copyright 2005-2009, 2013 by */ +/* Copyright 2005-2009, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* Copyright 2013 by Google, Inc. */ @@ -150,12 +150,25 @@ error = FT_THROW( Unknown_File_Format ); goto Exit; } - if ( flags != 0x0001 || num_strikes >= 0x10000UL ) + + /* 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; } + /* 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. @@ -256,7 +269,8 @@ case TT_SBIT_TABLE_TYPE_SBIX: { FT_Stream stream = face->root.stream; - FT_UInt offset, ppem, resolution, upem; + FT_UInt offset, upem; + FT_UShort ppem, resolution; TT_HoriHeader *hori; FT_ULong table_size; @@ -380,9 +394,11 @@ 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 ) + /* 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 ); } @@ -504,13 +520,20 @@ p += 3; } + else + { + /* avoid uninitialized data in case there is no vertical info -- */ + metrics->vertBearingX = 0; + metrics->vertBearingY = 0; + metrics->vertAdvance = 0; + } decoder->metrics_loaded = 1; *pp = p; return FT_Err_Ok; Fail: - FT_TRACE1(( "tt_sbit_decoder_load_metrics: broken table" )); + FT_TRACE1(( "tt_sbit_decoder_load_metrics: broken table\n" )); return FT_THROW( Invalid_Argument ); } @@ -800,12 +823,12 @@ FT_Error error = FT_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; + 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; if ( p + 2 > limit ) @@ -967,7 +990,6 @@ break; case 2: - case 5: case 7: { /* Don't trust `glyph_format'. For example, Apple's main Korean */ @@ -976,17 +998,31 @@ /* 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 ( height * ( ( width + 7 ) >> 3 ) == (FT_UInt)( p_limit - p ) ) + + 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; + case 5: + loader = tt_sbit_decoder_load_bit_aligned; + break; + case 8: if ( p + 1 > p_limit ) goto Fail; @@ -1003,10 +1039,11 @@ 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 */ - break; default: error = FT_THROW( Invalid_Table ); @@ -1133,7 +1170,8 @@ num_glyphs = FT_NEXT_ULONG( p ); /* overflow check for p + ( num_glyphs + 1 ) * 4 */ - if ( num_glyphs > (FT_ULong)( ( ( p_limit - p ) >> 2 ) - 1 ) ) + if ( p + 4 > p_limit || + num_glyphs > (FT_ULong)( ( ( p_limit - p ) >> 2 ) - 1 ) ) goto NoBitmap; for ( mm = 0; mm < num_glyphs; mm++ ) @@ -1233,11 +1271,11 @@ FT_Bitmap *map, TT_SBit_MetricsRec *metrics ) { - FT_UInt sbix_pos, strike_offset, glyph_start, glyph_end; - FT_ULong table_size, data_size; - FT_Int originOffsetX, originOffsetY; - FT_Tag graphicType; - FT_Int recurse_depth = 0; + 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; @@ -1288,7 +1326,6 @@ originOffsetY = FT_GET_SHORT(); graphicType = FT_GET_TAG4(); - data_size = glyph_end - glyph_start - 8; switch ( graphicType ) { @@ -1312,7 +1349,7 @@ metrics, stream->memory, stream->cursor, - data_size, + glyph_end - glyph_start - 8, TRUE ); #else error = FT_THROW( Unimplemented_Feature ); @@ -1321,6 +1358,7 @@ 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; @@ -1339,10 +1377,11 @@ tt_face_get_metrics( face, FALSE, glyph_index, &abearing, &aadvance ); - metrics->horiBearingX = originOffsetX; - metrics->horiBearingY = -originOffsetY + metrics->height; - metrics->horiAdvance = aadvance * face->root.size->metrics.x_ppem / - face->header.Units_Per_EM; + 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 ); } return error; diff --git a/freetype/src/smooth/PaxHeaders.18661/Jamfile b/freetype/src/smooth/PaxHeaders.18661/Jamfile deleted file mode 100644 index 81b210f5..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.999830279 -30 ctime=1374498496.477310203 diff --git a/freetype/src/smooth/PaxHeaders.18661/ftgrays.c b/freetype/src/smooth/PaxHeaders.18661/ftgrays.c deleted file mode 100644 index 1885f27c..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/ftgrays.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255937.572978993 -30 atime=1385335760.304151519 -30 ctime=1384255937.572978993 diff --git a/freetype/src/smooth/PaxHeaders.18661/ftgrays.h b/freetype/src/smooth/PaxHeaders.18661/ftgrays.h deleted file mode 100644 index 2a7f3dcf..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/ftgrays.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.998830292 -29 ctime=1374498496.47831019 diff --git a/freetype/src/smooth/PaxHeaders.18661/ftsmerrs.h b/freetype/src/smooth/PaxHeaders.18661/ftsmerrs.h deleted file mode 100644 index d5ef2896..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/ftsmerrs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.012830117 -30 ctime=1374498496.476310215 diff --git a/freetype/src/smooth/PaxHeaders.18661/ftsmooth.c b/freetype/src/smooth/PaxHeaders.18661/ftsmooth.c deleted file mode 100644 index 1ce1c5ce..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/ftsmooth.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.998830292 -30 ctime=1374498496.479310178 diff --git a/freetype/src/smooth/PaxHeaders.18661/ftsmooth.h b/freetype/src/smooth/PaxHeaders.18661/ftsmooth.h deleted file mode 100644 index b3295901..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/ftsmooth.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.013830104 -30 ctime=1374498496.471310278 diff --git a/freetype/src/smooth/PaxHeaders.18661/ftspic.c b/freetype/src/smooth/PaxHeaders.18661/ftspic.c deleted file mode 100644 index cef7bd20..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/ftspic.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.006830192 -30 ctime=1374498496.481310153 diff --git a/freetype/src/smooth/PaxHeaders.18661/ftspic.h b/freetype/src/smooth/PaxHeaders.18661/ftspic.h deleted file mode 100644 index c404034d..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/ftspic.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.013830104 -30 ctime=1374498496.473310253 diff --git a/freetype/src/smooth/PaxHeaders.18661/module.mk b/freetype/src/smooth/PaxHeaders.18661/module.mk deleted file mode 100644 index 1a5f2f7a..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.201002788 -30 ctime=1374498496.472310265 diff --git a/freetype/src/smooth/PaxHeaders.18661/rules.mk b/freetype/src/smooth/PaxHeaders.18661/rules.mk deleted file mode 100644 index b94f2386..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.591972897 -30 ctime=1374498496.480310165 diff --git a/freetype/src/smooth/PaxHeaders.18661/smooth.c b/freetype/src/smooth/PaxHeaders.18661/smooth.c deleted file mode 100644 index 754dde80..00000000 --- a/freetype/src/smooth/PaxHeaders.18661/smooth.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.012830117 -30 ctime=1374498496.475310228 diff --git a/freetype/src/smooth/ftgrays.c b/freetype/src/smooth/ftgrays.c index 2c51e9f6..131ad27a 100644 --- a/freetype/src/smooth/ftgrays.c +++ b/freetype/src/smooth/ftgrays.c @@ -4,7 +4,7 @@ /* */ /* A new `perfect' anti-aliasing renderer (body). */ /* */ -/* Copyright 2000-2003, 2005-2013 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, */ @@ -98,6 +98,9 @@ #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 */ @@ -402,6 +405,8 @@ typedef ptrdiff_t FT_PtrDist; typedef struct gray_TWorker_ { + ft_jmp_buf jump_buffer; + TCoord ex, ey; TPos min_ex, max_ex; TPos min_ey, max_ey; @@ -437,8 +442,6 @@ typedef ptrdiff_t FT_PtrDist; int band_size; int band_shoot; - ft_jmp_buf jump_buffer; - void* buffer; long buffer_size; @@ -1088,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; + dx = dx_ = arc[3].x - arc[0].x; + dy = 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; + L = FT_HYPOT( dx_, dy_ ); /* Avoid possible arithmetic overflow below by splitting. */ if ( L > 32767 ) @@ -1364,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 @@ -1540,7 +1515,10 @@ typedef ptrdiff_t FT_PtrDist; TPos delta; - if ( !outline || !func_interface ) + if ( !outline ) + return FT_THROW( Invalid_Outline ); + + if ( !func_interface ) return FT_THROW( Invalid_Argument ); shift = func_interface->shift; @@ -2122,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/freetype/src/smooth/ftsmooth.c b/freetype/src/smooth/ftsmooth.c index 89088cd0..4e2dee56 100644 --- a/freetype/src/smooth/ftsmooth.c +++ b/freetype/src/smooth/ftsmooth.c @@ -103,25 +103,24 @@ 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 = &slot->bitmap; - FT_Memory memory = render->root.memory; FT_Int hmul = mode == FT_RENDER_MODE_LCD; FT_Int vmul = mode == FT_RENDER_MODE_LCD_V; - FT_Pos x_shift = 0; - FT_Pos y_shift = 0; - FT_Pos x_left, y_top; FT_Raster_Params params; - FT_Bool have_translated_origin = FALSE; - FT_Bool have_outline_shifted = FALSE; - FT_Bool have_buffer = FALSE; + FT_Bool have_outline_shifted = FALSE; + FT_Bool have_buffer = FALSE; /* check glyph image format */ @@ -138,73 +137,45 @@ goto Exit; } - outline = &slot->outline; - - /* translate the outline to the new origin if needed */ if ( origin ) { - FT_Outline_Translate( outline, origin->x, origin->y ); - have_translated_origin = TRUE; + 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 )); - error = FT_THROW( Raster_Overflow ); - goto Exit; - } - 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 )); - error = FT_THROW( Raster_Overflow ); - goto Exit; - } - else - height = ( cbox.yMax - cbox.yMin ) >> 6; + x_left = cbox.xMin >> 6; + y_top = cbox.yMax >> 6; + + 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 ) @@ -214,23 +185,32 @@ 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. */ @@ -242,7 +222,24 @@ 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; @@ -251,15 +248,11 @@ bitmap->pitch = pitch; /* translate outline to render it into the bitmap */ - FT_Outline_Translate( outline, -x_shift, -y_shift ); - have_outline_shifted = TRUE; - - if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) ) - goto Exit; - else - have_buffer = TRUE; - - 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; @@ -366,20 +359,6 @@ #endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ - /* - * 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 ) - { - error = FT_THROW( Invalid_Pixel_Size ); - goto Exit; - } - - slot->format = FT_GLYPH_FORMAT_BITMAP; - slot->bitmap_left = (FT_Int)x_left; - slot->bitmap_top = (FT_Int)y_top; - /* everything is fine; don't deallocate buffer */ have_buffer = FALSE; @@ -387,9 +366,7 @@ Exit: if ( have_outline_shifted ) - FT_Outline_Translate( outline, x_shift, y_shift ); - if ( have_translated_origin ) - FT_Outline_Translate( outline, -origin->x, -origin->y ); + FT_Outline_Translate( outline, -x_shift, -y_shift ); if ( have_buffer ) { FT_FREE( bitmap->buffer ); diff --git a/freetype/src/tools/PaxHeaders.18661/Jamfile b/freetype/src/tools/PaxHeaders.18661/Jamfile deleted file mode 100644 index 190ac2f4..00000000 --- a/freetype/src/tools/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.173840605 -30 ctime=1374498496.155314228 diff --git a/freetype/src/tools/PaxHeaders.18661/afblue.pl b/freetype/src/tools/PaxHeaders.18661/afblue.pl deleted file mode 100644 index e33025e7..00000000 --- a/freetype/src/tools/PaxHeaders.18661/afblue.pl +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377336560.763594459 -30 atime=1385335785.141841006 -30 ctime=1377336560.763594459 diff --git a/freetype/src/tools/PaxHeaders.18661/apinames.c b/freetype/src/tools/PaxHeaders.18661/apinames.c deleted file mode 100644 index 7eea72ce..00000000 --- a/freetype/src/tools/PaxHeaders.18661/apinames.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.182840493 -30 ctime=1374498496.164314116 diff --git a/freetype/src/tools/PaxHeaders.18661/chktrcmp.py b/freetype/src/tools/PaxHeaders.18661/chktrcmp.py deleted file mode 100644 index e9e22be1..00000000 --- a/freetype/src/tools/PaxHeaders.18661/chktrcmp.py +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384255857.233983368 -30 atime=1385335760.319151332 -30 ctime=1384255857.233983368 diff --git a/freetype/src/tools/PaxHeaders.18661/cordic.py b/freetype/src/tools/PaxHeaders.18661/cordic.py deleted file mode 100644 index 21d960e9..00000000 --- a/freetype/src/tools/PaxHeaders.18661/cordic.py +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.125841206 -30 ctime=1374498496.166314091 diff --git a/freetype/src/tools/PaxHeaders.18661/docmaker b/freetype/src/tools/PaxHeaders.18661/docmaker deleted file mode 100644 index becb228f..00000000 --- a/freetype/src/tools/PaxHeaders.18661/docmaker +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.253989624 -30 atime=1385335785.166840693 -30 ctime=1385335777.075941843 diff --git a/freetype/src/tools/PaxHeaders.18661/ftrandom b/freetype/src/tools/PaxHeaders.18661/ftrandom deleted file mode 100644 index 529697aa..00000000 --- a/freetype/src/tools/PaxHeaders.18661/ftrandom +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385335773.266989462 -30 atime=1385335785.173840605 -30 ctime=1385335773.266989462 diff --git a/freetype/src/tools/PaxHeaders.18661/glnames.py b/freetype/src/tools/PaxHeaders.18661/glnames.py deleted file mode 100644 index 951deea0..00000000 --- a/freetype/src/tools/PaxHeaders.18661/glnames.py +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.158840793 -30 ctime=1374498496.139314428 diff --git a/freetype/src/tools/PaxHeaders.18661/test_afm.c b/freetype/src/tools/PaxHeaders.18661/test_afm.c deleted file mode 100644 index bb332af7..00000000 --- a/freetype/src/tools/PaxHeaders.18661/test_afm.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.181840505 -30 ctime=1374498496.165314103 diff --git a/freetype/src/tools/PaxHeaders.18661/test_bbox.c b/freetype/src/tools/PaxHeaders.18661/test_bbox.c deleted file mode 100644 index 0fcd3fb2..00000000 --- a/freetype/src/tools/PaxHeaders.18661/test_bbox.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.181840505 -30 ctime=1374498496.140314416 diff --git a/freetype/src/tools/PaxHeaders.18661/test_trig.c b/freetype/src/tools/PaxHeaders.18661/test_trig.c deleted file mode 100644 index a3db6a69..00000000 --- a/freetype/src/tools/PaxHeaders.18661/test_trig.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.181840505 -30 ctime=1374498496.156314216 diff --git a/freetype/src/tools/afblue.pl b/freetype/src/tools/afblue.pl index 774438f8..60fe6966 100644 --- a/freetype/src/tools/afblue.pl +++ b/freetype/src/tools/afblue.pl @@ -5,7 +5,7 @@ # # Process a blue zone character data file. # -# Copyright 2013 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, @@ -17,7 +17,7 @@ use strict; use warnings; use English '-no_match_vars'; -use open ':std', ':locale'; +use open ':std', ':encoding(UTF-8)'; my $prog = $PROGRAM_NAME; @@ -63,15 +63,15 @@ my $enum_element_re = qr/ ^ \s* ( [A-Za-z0-9_]+ ) \s* $ /x; # '#' <preprocessor directive> '\n' my $preprocessor_re = qr/ ^ \# /x; -# '/' '/' <comment> '\n' -my $comment_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) @@ -159,6 +159,9 @@ 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; @@ -194,7 +197,7 @@ sub convert_literal sub aux_name { - return "af_blue_" . $num_sections. "_" . join('_', reverse @name_stack); + return "af_blue_" . $num_sections. "_" . join('_', @name_stack); } @@ -210,7 +213,7 @@ sub aux_name_next sub enum_val_string { - # Build string which holds code to save the current offset in an + # Build string that holds code to save the current offset in an # enumeration element. my $aux = shift; @@ -288,7 +291,7 @@ while (<DATA>) { # 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>_...' which store + # 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 @@ -344,24 +347,27 @@ while (<DATA>) $curr_offset = 0; } - elsif (/ ^ \# \s* endif /x) + elsif (/ ^ (\# \s*) endif /x) { my $prev_else = pop @else_stack; Die("unbalanced #endif") unless defined($prev_else); pop @name_stack; - $name_stack[$#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) { - push @{$diversions{$curr_enum}}, enum_val_string(aux_name()) - . "#else\n"; + # 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(); diff --git a/freetype/src/tools/chktrcmp.py b/freetype/src/tools/chktrcmp.py old mode 100644 new mode 100755 diff --git a/freetype/src/tools/docmaker/PaxHeaders.18661/content.py b/freetype/src/tools/docmaker/PaxHeaders.18661/content.py deleted file mode 100644 index 15a687c1..00000000 --- a/freetype/src/tools/docmaker/PaxHeaders.18661/content.py +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335775.580960533 -30 ctime=1374498496.153314253 diff --git a/freetype/src/tools/docmaker/PaxHeaders.18661/docbeauty.py b/freetype/src/tools/docmaker/PaxHeaders.18661/docbeauty.py deleted file mode 100644 index ea9b0afd..00000000 --- a/freetype/src/tools/docmaker/PaxHeaders.18661/docbeauty.py +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.166840693 -30 ctime=1374498496.150314291 diff --git a/freetype/src/tools/docmaker/PaxHeaders.18661/docmaker.py b/freetype/src/tools/docmaker/PaxHeaders.18661/docmaker.py deleted file mode 100644 index 5f80725d..00000000 --- a/freetype/src/tools/docmaker/PaxHeaders.18661/docmaker.py +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335775.510961408 -30 ctime=1374498496.154314241 diff --git a/freetype/src/tools/docmaker/PaxHeaders.18661/formatter.py b/freetype/src/tools/docmaker/PaxHeaders.18661/formatter.py deleted file mode 100644 index b02d20b2..00000000 --- a/freetype/src/tools/docmaker/PaxHeaders.18661/formatter.py +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335775.600960283 -30 ctime=1374498496.148314316 diff --git a/freetype/src/tools/docmaker/PaxHeaders.18661/sources.py b/freetype/src/tools/docmaker/PaxHeaders.18661/sources.py deleted file mode 100644 index a0cedaa8..00000000 --- a/freetype/src/tools/docmaker/PaxHeaders.18661/sources.py +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335775.519961296 -30 ctime=1374498496.145314353 diff --git a/freetype/src/tools/docmaker/PaxHeaders.18661/tohtml.py b/freetype/src/tools/docmaker/PaxHeaders.18661/tohtml.py deleted file mode 100644 index 5ea1fcb2..00000000 --- a/freetype/src/tools/docmaker/PaxHeaders.18661/tohtml.py +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335775.602960258 -30 ctime=1374498496.147314328 diff --git a/freetype/src/tools/docmaker/PaxHeaders.18661/utils.py b/freetype/src/tools/docmaker/PaxHeaders.18661/utils.py deleted file mode 100644 index 5059a528..00000000 --- a/freetype/src/tools/docmaker/PaxHeaders.18661/utils.py +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335775.588960433 -30 ctime=1374498496.151314278 diff --git a/freetype/src/tools/docmaker/content.py b/freetype/src/tools/docmaker/content.py index 98025e67..adea6f1d 100644 --- a/freetype/src/tools/docmaker/content.py +++ b/freetype/src/tools/docmaker/content.py @@ -1,57 +1,81 @@ -# Content (c) 2002, 2004, 2006-2009, 2012, 2013 -# 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. # -# note that indentation of the starting and ending accolades must be -# exactly the same. the code sequence can contain accolades at greater -# indentation +# { +# x = y + z; +# if ( zookoo == 2 ) +# { +# foobar(); +# } +# } +# +# 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 +# +# A regular expression 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 +# +# 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. +# +# Example: +# +# #define FT_FREETYPE_H <freetype.h> # re_header_macro = re.compile( r'^#define\s{1,}(\w{1,}_H)\s{1,}<(.*)>' ) -############################################################################# -# -# 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'. -# +################################################################ +## +## 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: @@ -275,7 +318,10 @@ class DocMarkup: print " " * margin + "</" + self.tag + ">" - +################################################################ +## +## DOC CHAPTER CLASS +## class DocChapter: def __init__( self, block ): @@ -291,7 +337,10 @@ class DocChapter: self.order = [] - +################################################################ +## +## DOC SECTION CLASS +## class DocSection: def __init__( self, name = "Other" ): @@ -320,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 @@ -342,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 @@ -354,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 @@ -378,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 @@ -437,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() @@ -452,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 @@ -463,7 +515,10 @@ class ContentProcessor: self.chapters.append( chap ) - +################################################################ +## +## DOC BLOCK CLASS +## class DocBlock: def __init__( self, source, follow, processor ): @@ -540,7 +595,7 @@ 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 @@ -553,6 +608,21 @@ class DocBlock: except: return [] + def get_markup_words_all( self, tag_name ): + try: + m = self.get_markup( tag_name ) + 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 [] + def get_markup_text( self, tag_name ): result = self.get_markup_words( tag_name ) return string.join( result ) diff --git a/freetype/src/tools/docmaker/docmaker.py b/freetype/src/tools/docmaker/docmaker.py index bf75c5d5..4fb1abf2 100644 --- a/freetype/src/tools/docmaker/docmaker.py +++ b/freetype/src/tools/docmaker/docmaker.py @@ -1,16 +1,26 @@ #!/usr/bin/env python # -# DocMaker (c) 2002, 2004, 2008, 2013 David Turner <david@freetype.org> +# docmaker.py # -# This program is a re-write of the original DocMaker tool 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/freetype/src/tools/docmaker/formatter.py b/freetype/src/tools/docmaker/formatter.py index f62ce676..7152c019 100644 --- a/freetype/src/tools/docmaker/formatter.py +++ b/freetype/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/freetype/src/tools/docmaker/sources.py b/freetype/src/tools/docmaker/sources.py index dab83497..61ecc22c 100644 --- a/freetype/src/tools/docmaker/sources.py +++ b/freetype/src/tools/docmaker/sources.py @@ -1,62 +1,70 @@ -# Sources (c) 2002-2004, 2006-2009, 2012, 2013 -# 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. + # -# the routines used to process the content of documentation blocks -# are not contained here, but in "content.py" +# 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 classes and methods found here only deal with text parsing -# and basic documentation block extraction +# - Normal blocks, which contain source code or ordinary comments. # +# - 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 - ################################################################ ## -## BLOCK FORMAT PATTERN +## SOURCE BLOCK FORMAT CLASS ## -## A simple class containing compiled regular expressions used -## to detect potential documentation format block comments within -## C source code +## A simple class containing compiled regular expressions to detect +## potential documentation format block comments within C source code. ## -## note that the 'column' pattern must contain a group that will -## be used to "unbox" the content of documentation comment blocks +## The `column' pattern must contain a group 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,47 +112,56 @@ 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. # -# notice how each markup tag _must_ begin a new line +# A markup tag consists of letters or character `-', to be found in group 1. +# +# 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 # -# 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] + # -# used to detect a cross-reference, after markup tags have been stripped +# 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. +# +# A cross reference consists of letters, digits, or characters `-' and `_'. # 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* # -# this regular expression code to identify an URL has been taken from +# This regular expression code to identify an URL has been taken from # # http://mail.python.org/pipermail/tutor/2002-September/017228.html # -# (with slight modifications) +# (with slight modifications). # - urls = r'(?:https?|telnet|gopher|file|wais|ftp)' ltrs = r'\w' gunk = r'/#~:.?+=&%@!\-' @@ -177,17 +191,22 @@ url = r""" re_url = re.compile( url, re.VERBOSE | re.MULTILINE ) # -# used to detect the end of commented source lines +# A regular expression that stops collection of comments for the current +# block. # -re_source_sep = re.compile( r'\s*/\*\s*\*/' ) +re_source_sep = re.compile( r'\s*/\*\s*\*/' ) # /* */ # -# used to perform cross-reference within source output +# 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 | @@ -215,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: +## There are two important fields in a `SourceBlock' object. ## -## - A documentation comment block that starts with "/**" and -## whose exact format will be discussed later +## self.lines +## A list of text lines for the corresponding block. ## -## - normal sources lines, including comments -## -## 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: @@ -269,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---" @@ -286,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 @@ -337,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 @@ -356,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() @@ -366,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 @@ -376,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/freetype/src/tools/docmaker/tohtml.py b/freetype/src/tools/docmaker/tohtml.py index 7944f1c9..05fc08a9 100644 --- a/freetype/src/tools/docmaker/tohtml.py +++ b/freetype/src/tools/docmaker/tohtml.py @@ -1,5 +1,19 @@ -# ToHTML (c) 2002, 2003, 2005-2008, 2013 -# 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 """ -html_header_3 = """ - - - -
                  [
                  [
                  [
                  [Index][TOC]
                  -

                  \ +">Index]

                  [Index]
                  -

                  \ +">TOC]

                  +

                  \ +""" + +html_header_5i = """\ +">Index]

                  +

                  \ """ html_header_6 = """\ - API Reference

                  + API Reference """ @@ -87,8 +164,8 @@ html_footer = """\ """ # The header and footer used for each section. -section_title_header = "

                  " -section_title_footer = "

                  " +section_title_header = "

                  " +section_title_footer = "

                  " # The header and footer used for code segments. code_header = '
                  '
                  @@ -99,66 +176,65 @@ para_header = "

                  " para_footer = "

                  " # Block header and footer. -block_header = '
                  ' +block_header = '
                  ' block_footer_start = """\ -
                  -
                  - - -\ +\ +
                  [
                  [Index][Index][Top][TOC]
                  +">TOC]
                  """ # Description header/footer. -description_header = '
                  ' -description_footer = "

                  " +description_header = "" +description_footer = "" # Marker header/inter/footer combination. -marker_header = '
                  ' -marker_inter = "
                  " -marker_footer = "
                  " +marker_header = "

                  " +marker_inter = "

                  " +marker_footer = "" # Header location header/footer. -header_location_header = '
                  ' -header_location_footer = "

                  " +header_location_header = "

                  " +header_location_footer = "

                  " # Source code extracts header/footer. -source_header = '
                  \n'
                  -source_footer = "\n

                  " +source_header = "
                  "
                  +source_footer = "
                  " # Chapter header/inter/footer. -chapter_header = '

                  ' -chapter_inter = '

                  • ' -chapter_footer = '
                  ' +chapter_header = """\ +
                  +

                  \ +""" +chapter_inter = '

                  ' +chapter_footer = '
                  ' # Index footer. index_footer_start = """\
                  - -
                  [
                  [TOC]
                  +">TOC]
                  """ # TOC footer. toc_footer_start = """\
                  - - -
                  [
                  [Index]
                  +">Index]
                  """ -# source language keyword coloration/styling +# Source language keyword coloration and styling. keyword_prefix = '' keyword_suffix = '' @@ -166,66 +242,78 @@ section_synopsis_header = '

                  Synopsis

                  ' section_synopsis_footer = '' -# Translate a single line of source to HTML. This will convert -# a "<" into "<.", ">" into ">.", etc. +# Translate a single line of source to HTML. This converts `<', `>', and +# `&' into `<',`>', and `&'. +# def html_quote( line ): - result = string.replace( line, "&", "&" ) - result = string.replace( result, "<", "<" ) - result = string.replace( result, ">", ">" ) + result = string.replace( line, "&", "&" ) + result = string.replace( result, "<", "<" ) + result = string.replace( result, ">", ">" ) return result - +################################################################ +## +## 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 = "
                  generated on " + \ - time.asctime( time.localtime( time.time() ) ) + \ - "
                  " + 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 = ( + '
                  generated on ' + + time.asctime( time.localtime( time.time() ) ) + + "
                  " + 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_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: @@ -236,27 +324,28 @@ class HtmlFormatter( Formatter ): return '' + name + '' + 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 '' + name + '' + rest m = re_bold.match( word ) if m: name = m.group( 1 ) - rest = m.group( 3 ) + rest = m.group( 2 ) return '' + name + '' + 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] ) @@ -265,8 +354,8 @@ class HtmlFormatter( Formatter ): # handle hyperlinks line = re_url.sub( r'\1', line ) # convert `...' quotations into real left and right single quotes - line = re.sub( r"(^|\W)`(.*?)'(\W|$)", \ - r'\1‘\2’\3', \ + line = re.sub( r"(^|\W)`(.*?)'(\W|$)", + r'\1‘\2’\3', line ) # convert tilde into non-breakable space line = string.replace( line, "~", " " ) @@ -274,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' @@ -282,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: @@ -297,7 +386,9 @@ class HtmlFormatter( Formatter ): def print_html_field( self, field ): if field.name: - print "
                  " + field.name + "" + print( '
                  ' + + field.name + + "" ) print self.make_html_items( field.items ) @@ -318,12 +409,24 @@ class HtmlFormatter( Formatter ): result = result + prefix + '' + name + '' 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 + '' + name + '' + 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 + + '' + name + '' ) else: result = result + html_quote( line[:length] ) @@ -335,15 +438,11 @@ class HtmlFormatter( Formatter ): return result def print_html_field_list( self, fields ): - print "

                  " - print "" + print '
                  ' for field in fields: - if len( field.name ) > 22: - print "" - print "" print "
                  " + field.name + "
                  " - else: - print "
                  " + field.name + "" - + print ( '
                  ' + + field.name + + '' ) self.print_html_items( field.items ) print "
                  " @@ -352,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: @@ -368,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 @@ -380,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 "" + print '
                  ' for r in range( rows ): line = "" for c in range( self.columns ): @@ -392,7 +490,8 @@ class HtmlFormatter( Formatter ): if i < count: bname = self.block_index[r + c * rows] url = self.index_items[bname] - line = line + '' + line = ( line + '' ) else: line = line + '' line = line + "" @@ -400,9 +499,9 @@ class HtmlFormatter( Formatter ): print "
                  ' + bname + '' + + bname + '
                  " - 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 @@ -415,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 "

                  Table of Contents

                  " + print "

                  Table of Contents

                  " def toc_chapter_enter( self, chapter ): - print chapter_header + string.join( chapter.title ) + chapter_inter - print "" + print chapter_header + string.join( chapter.title ) + chapter_inter + print '
                  ' def toc_section_enter( self, section ): - print '
                  ' - print '' + \ - section.title + '' - + print ( '
                  ' ) print self.make_html_para( section.abstract ) def toc_section_exit( self, section ): @@ -440,14 +538,14 @@ class HtmlFormatter( Formatter ): print chapter_footer def toc_index( self, index_filename ): - print chapter_header + \ - 'Global Index' + \ - chapter_inter + chapter_footer + print( chapter_header + + 'Global Index' + + 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 @@ -461,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(): @@ -476,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 "" + print '
                  ' - 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 = "" for c in range( columns ): i = r + c * rows - line = line + '' line = line + "" print line - print "
                  ' + line = line + '' if i < count: name = section.block_names[i] - line = line + '' + name + '' + 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 + " " + else: + line = ( line + '' + + name + '' ) line = line + '


                  " + print "
                  " print section_synopsis_footer print description_header @@ -513,7 +620,7 @@ class HtmlFormatter( Formatter ): # place html anchor if needed if block.name: - print '

                  ' + block.name + '

                  ' + print( '

                  ' + block.name + '

                  ' ) # dump the block C source lines now if block.code: @@ -521,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: @@ -552,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/freetype/src/tools/docmaker/utils.py b/freetype/src/tools/docmaker/utils.py index 1d96658c..b35823ab 100644 --- a/freetype/src/tools/docmaker/utils.py +++ b/freetype/src/tools/docmaker/utils.py @@ -1,48 +1,42 @@ -# Utils (c) 2002, 2004, 2007, 2008 David Turner # +# utils.py +# +# Auxiliary functions for the `docmaker' tool (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. + + +import string, sys, os, glob, itertools -import string, sys, os, glob # current output directory # 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. +# A function that generates a sorting key. We want lexicographical order +# (primary key) except that capital letters are sorted before lowercase +# ones (secondary key). # -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 ) - - for i in range( l1 ): - if i >= l2 or m1[i] > m2[i]: - return 1 - - if m1[i] < m2[i]: - return -1 - - if s1[i] < s2[i]: - return -1 - - if s1[i] > s2[i]: - return 1 - - if l2 > l1: - return -1 - - return 0 +# 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/freetype/src/tools/ftrandom/PaxHeaders.18661/Makefile b/freetype/src/tools/ftrandom/PaxHeaders.18661/Makefile deleted file mode 100644 index a49337cd..00000000 --- a/freetype/src/tools/ftrandom/PaxHeaders.18661/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.173840605 -30 ctime=1374498496.163314128 diff --git a/freetype/src/tools/ftrandom/PaxHeaders.18661/README b/freetype/src/tools/ftrandom/PaxHeaders.18661/README deleted file mode 100644 index 413c0707..00000000 --- a/freetype/src/tools/ftrandom/PaxHeaders.18661/README +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.173840605 -30 ctime=1374498496.161314153 diff --git a/freetype/src/tools/ftrandom/PaxHeaders.18661/ftrandom.c b/freetype/src/tools/ftrandom/PaxHeaders.18661/ftrandom.c deleted file mode 100644 index 6eee3660..00000000 --- a/freetype/src/tools/ftrandom/PaxHeaders.18661/ftrandom.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335785.173840605 -30 ctime=1374498496.162314141 diff --git a/freetype/src/tools/ftrandom/ftrandom.c b/freetype/src/tools/ftrandom/ftrandom.c index 7c979571..9a5b6326 100644 --- a/freetype/src/tools/ftrandom/ftrandom.c +++ b/freetype/src/tools/ftrandom/ftrandom.c @@ -449,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 ); diff --git a/freetype/src/tools/test_trig.c b/freetype/src/tools/test_trig.c index 49d927e3..99ac1cf1 100644 --- a/freetype/src/tools/test_trig.c +++ b/freetype/src/tools/test_trig.c @@ -20,7 +20,7 @@ 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; @@ -46,7 +46,7 @@ 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; @@ -72,7 +72,7 @@ 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; @@ -98,7 +98,7 @@ 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; @@ -133,7 +133,7 @@ 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; @@ -166,7 +166,7 @@ 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; @@ -193,7 +193,7 @@ 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; @@ -203,7 +203,7 @@ 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; diff --git a/freetype/src/truetype/PaxHeaders.18661/Jamfile b/freetype/src/truetype/PaxHeaders.18661/Jamfile deleted file mode 100644 index a6922c54..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.209827654 -30 ctime=1374498496.645308102 diff --git a/freetype/src/truetype/PaxHeaders.18661/module.mk b/freetype/src/truetype/PaxHeaders.18661/module.mk deleted file mode 100644 index 4293891d..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335771.987005464 -30 ctime=1374498496.624308365 diff --git a/freetype/src/truetype/PaxHeaders.18661/rules.mk b/freetype/src/truetype/PaxHeaders.18661/rules.mk deleted file mode 100644 index f76f9fe0..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.476974335 -29 ctime=1374498496.64630809 diff --git a/freetype/src/truetype/PaxHeaders.18661/truetype.c b/freetype/src/truetype/PaxHeaders.18661/truetype.c deleted file mode 100644 index 285d5781..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/truetype.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.242827241 -30 ctime=1374498496.625308352 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttdriver.c b/freetype/src/truetype/PaxHeaders.18661/ttdriver.c deleted file mode 100644 index 4d684ecc..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttdriver.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1383695475.310004199 -30 atime=1385335786.070829392 -30 ctime=1383695475.310004199 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttdriver.h b/freetype/src/truetype/PaxHeaders.18661/ttdriver.h deleted file mode 100644 index 528a57b1..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttdriver.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.071829379 -30 ctime=1374498496.659307927 diff --git a/freetype/src/truetype/PaxHeaders.18661/tterrors.h b/freetype/src/truetype/PaxHeaders.18661/tterrors.h deleted file mode 100644 index d4dd0703..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/tterrors.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.241827254 -30 ctime=1374498496.647308077 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttgload.c b/freetype/src/truetype/PaxHeaders.18661/ttgload.c deleted file mode 100644 index a7f8ca4f..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttgload.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1384977797.760204632 -30 atime=1385335737.495436668 -30 ctime=1384977797.760204632 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttgload.h b/freetype/src/truetype/PaxHeaders.18661/ttgload.h deleted file mode 100644 index 42d80996..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttgload.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1383695264.285642366 -30 atime=1385335786.047829679 -30 ctime=1383695264.285642366 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttgxvar.c b/freetype/src/truetype/PaxHeaders.18661/ttgxvar.c deleted file mode 100644 index b54a05c9..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttgxvar.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.023829979 -30 ctime=1374498496.655307977 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttgxvar.h b/freetype/src/truetype/PaxHeaders.18661/ttgxvar.h deleted file mode 100644 index 34868998..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttgxvar.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.054829592 -30 ctime=1374498496.644308115 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttinterp.c b/freetype/src/truetype/PaxHeaders.18661/ttinterp.c deleted file mode 100644 index 401b8770..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttinterp.c +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1383388019.90716295 -30 atime=1385335786.108828917 -29 ctime=1383388019.90716295 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttinterp.h b/freetype/src/truetype/PaxHeaders.18661/ttinterp.h deleted file mode 100644 index 08b86983..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttinterp.h +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1383307127.255389087 -30 atime=1385335786.208827666 -30 ctime=1383307127.255389087 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttobjs.c b/freetype/src/truetype/PaxHeaders.18661/ttobjs.c deleted file mode 100644 index 73d6411f..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttobjs.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1385248480.132070308 -30 atime=1385335715.997705426 -30 ctime=1385248480.132070308 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttobjs.h b/freetype/src/truetype/PaxHeaders.18661/ttobjs.h deleted file mode 100644 index 2b098af9..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttobjs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.047829679 -30 ctime=1374498496.657307952 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttpic.c b/freetype/src/truetype/PaxHeaders.18661/ttpic.c deleted file mode 100644 index be4a4ce4..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttpic.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.241827254 -30 ctime=1374498496.616308465 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttpic.h b/freetype/src/truetype/PaxHeaders.18661/ttpic.h deleted file mode 100644 index 8083c39b..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttpic.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.086829192 -30 ctime=1374498496.623308377 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttpload.c b/freetype/src/truetype/PaxHeaders.18661/ttpload.c deleted file mode 100644 index 0edb2b79..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttpload.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.242827241 -29 ctime=1374498496.62230839 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttpload.h b/freetype/src/truetype/PaxHeaders.18661/ttpload.h deleted file mode 100644 index 2a57dbdc..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttpload.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.020830017 -30 ctime=1374498496.628308315 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttsubpix.c b/freetype/src/truetype/PaxHeaders.18661/ttsubpix.c deleted file mode 100644 index cbf777a9..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttsubpix.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.160828266 -30 ctime=1374498496.620308415 diff --git a/freetype/src/truetype/PaxHeaders.18661/ttsubpix.h b/freetype/src/truetype/PaxHeaders.18661/ttsubpix.h deleted file mode 100644 index 84293833..00000000 --- a/freetype/src/truetype/PaxHeaders.18661/ttsubpix.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.240827266 -30 ctime=1374498496.617308452 diff --git a/freetype/src/truetype/ttdriver.c b/freetype/src/truetype/ttdriver.c index 36d23a28..ecf4cdcb 100644 --- a/freetype/src/truetype/ttdriver.c +++ b/freetype/src/truetype/ttdriver.c @@ -4,7 +4,7 @@ /* */ /* TrueType font driver implementation (body). */ /* */ -/* Copyright 1996-2013 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, */ @@ -267,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 { @@ -370,7 +370,7 @@ return FT_THROW( Invalid_Size_Handle ); if ( !face ) - return FT_THROW( Invalid_Argument ); + return FT_THROW( Invalid_Face_Handle ); #ifdef FT_CONFIG_OPTION_INCREMENTAL if ( glyph_index >= (FT_UInt)face->num_glyphs && @@ -481,7 +481,7 @@ SFNT_Service sfnt; - /* 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; diff --git a/freetype/src/truetype/ttgload.c b/freetype/src/truetype/ttgload.c index cc62f93b..c5841c30 100644 --- a/freetype/src/truetype/ttgload.c +++ b/freetype/src/truetype/ttgload.c @@ -4,7 +4,7 @@ /* */ /* TrueType Glyph Loader (body). */ /* */ -/* Copyright 1996-2013 */ +/* Copyright 1996-2014 */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -99,13 +99,13 @@ else if ( face->os2.version != 0xFFFFU ) { - *tsb = face->os2.sTypoAscender - yMax; + *tsb = (FT_Short)( face->os2.sTypoAscender - yMax ); *ah = face->os2.sTypoAscender - face->os2.sTypoDescender; } else { - *tsb = face->horizontal.Ascender - yMax; + *tsb = (FT_Short)( face->horizontal.Ascender - yMax ); *ah = face->horizontal.Ascender - face->horizontal.Descender; } @@ -348,8 +348,7 @@ 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, max_ins; + FT_UShort n_ins; FT_Int n_points; FT_ULong tmp; @@ -418,30 +417,6 @@ FT_TRACE5(( " Instructions size: %u\n", n_ins )); /* check it */ - max_ins = face->max_profile.maxSizeOfInstructions; - if ( n_ins > max_ins ) - { - /* don't trust `maxSizeOfInstructions'; */ - /* only do a rough safety check */ - if ( (FT_Int)n_ins > load->byte_len ) - { - FT_TRACE1(( "TT_Load_Simple_Glyph:" - " too many instructions (%d) for glyph with length %d\n", - n_ins, load->byte_len )); - return FT_THROW( Too_Many_Hints ); - } - - 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; - } - if ( ( limit - p ) < n_ins ) { FT_TRACE0(( "TT_Load_Simple_Glyph: instruction count mismatch\n" )); @@ -453,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; @@ -749,7 +738,6 @@ #endif TT_GlyphZone zone = &loader->zone; - FT_Pos origin; #ifdef TT_USE_BYTECODE_INTERPRETER FT_UInt n_ins; @@ -766,14 +754,7 @@ 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 ); @@ -799,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 ); @@ -816,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; @@ -839,13 +822,10 @@ #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]; - } + 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 ) @@ -1093,9 +1073,9 @@ if ( !x && !y ) 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 @@ -1107,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 @@ -1130,12 +1110,12 @@ 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. */ - /* */ + /*******************************************************************/ + /* */ + /* 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, @@ -1145,7 +1125,7 @@ x = FT_MulFix( x, mac_xscale ); y = FT_MulFix( y, mac_yscale ); -#endif /* 0 */ +#endif /* 1 */ } @@ -1244,12 +1224,13 @@ 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; @@ -1292,8 +1273,11 @@ * specification defines the initial position of horizontal phantom points * as * - * pp1 = (xmin - lsb, 0) , - * pp2 = (pp1 + aw, 0) . + * 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. @@ -1309,8 +1293,8 @@ * * and the initial position of vertical phantom points is * - * pp3 = (x, ymax + tsb) , - * pp4 = (x, pp3 - ah) . + * pp3 = (x, round(ymax + tsb)) , + * pp4 = (x, round(pp3 - ah)) . * * See below for value `x'. * @@ -1335,26 +1319,73 @@ * * Usually we have * - * x = aw / 2 , + * x = aw / 2 , (1) * - * but there is a compatibility case where it can be set to + * but there is one compatibility case where it can be set to * * x = -DefaultDescender - - * ((DefaultAscender - DefaultDescender - aw) / 2) . + * ((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 { \ + 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 = (loader)->advance / 2; \ + \ + (loader)->pp3.x = use_aw_2_ ? (loader)->advance / 2 : 0; \ (loader)->pp3.y = (loader)->bbox.yMax + (loader)->top_bearing; \ - (loader)->pp4.x = (loader)->advance / 2; \ + (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 \ + { \ + (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)->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 */ + /*************************************************************************/ /* */ @@ -1526,21 +1557,32 @@ 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 ); } @@ -1548,8 +1590,8 @@ 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 @@ -1622,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; @@ -1640,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 ); } @@ -1714,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]; @@ -1733,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; @@ -1743,16 +1801,17 @@ /* 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 @@ -2027,6 +2086,8 @@ FT_Int32 load_flags, FT_Bool glyf_table_only ) { + FT_Error error; + TT_Face face; FT_Stream stream; #ifdef TT_USE_BYTECODE_INTERPRETER @@ -2050,8 +2111,7 @@ #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face ); - FT_Bool subpixel_hinting = FALSE; - FT_Bool grayscale_hinting = TRUE; + FT_Bool subpixel = FALSE; #if 0 /* not used yet */ @@ -2065,14 +2125,16 @@ FT_Bool reexecute = FALSE; - if ( !size->cvt_ready ) + if ( size->bytecode_ready < 0 || size->cvt_ready < 0 ) { - FT_Error error = tt_size_ready_bytecode( size, pedantic ); - - + 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 @@ -2084,24 +2146,24 @@ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 ) { - subpixel_hinting = FT_BOOL( ( FT_LOAD_TARGET_MODE( load_flags ) - != FT_RENDER_MODE_MONO ) && - SPH_OPTION_SET_SUBPIXEL ); + subpixel = FT_BOOL( ( FT_LOAD_TARGET_MODE( load_flags ) != + FT_RENDER_MODE_MONO ) && + SPH_OPTION_SET_SUBPIXEL ); - if ( subpixel_hinting ) - grayscale = grayscale_hinting = FALSE; + if ( subpixel ) + grayscale = FALSE; else if ( SPH_OPTION_SET_GRAYSCALE ) { - grayscale = grayscale_hinting = TRUE; - subpixel_hinting = FALSE; + grayscale = TRUE; + subpixel = FALSE; } else - grayscale = grayscale_hinting = FALSE; + grayscale = FALSE; if ( FT_IS_TRICKY( glyph->face ) ) - subpixel_hinting = grayscale_hinting = FALSE; + subpixel = FALSE; - exec->ignore_x_mode = subpixel_hinting || grayscale_hinting; + 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; @@ -2136,7 +2198,9 @@ FT_RENDER_MODE_MONO ); } - TT_Load_Context( exec, face, size ); + error = TT_Load_Context( exec, face, size ); + if ( error ) + return error; #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING @@ -2144,24 +2208,24 @@ { /* a change from mono to subpixel rendering (and vice versa) */ /* requires a re-execution of the CVT program */ - if ( subpixel_hinting != exec->subpixel_hinting ) + if ( subpixel != exec->subpixel ) { FT_TRACE4(( "tt_loader_init: subpixel hinting change," " re-executing `prep' table\n" )); - exec->subpixel_hinting = subpixel_hinting; - reexecute = TRUE; + 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_hinting ) + if ( grayscale != exec->grayscale ) { FT_TRACE4(( "tt_loader_init: grayscale hinting change," " re-executing `prep' table\n" )); - exec->grayscale_hinting = grayscale_hinting; - reexecute = TRUE; + exec->grayscale = grayscale; + reexecute = TRUE; } } else @@ -2188,7 +2252,9 @@ 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 */ @@ -2219,8 +2285,7 @@ #endif { - FT_Error error = face->goto_table( face, TTAG_glyf, stream, 0 ); - + error = face->goto_table( face, TTAG_glyf, stream, 0 ); if ( FT_ERR_EQ( error, Table_Missing ) ) loader->glyf_offset = 0; @@ -2291,8 +2356,6 @@ TT_LoaderRec loader; - error = FT_Err_Ok; - FT_TRACE1(( "TT_Load_Glyph: glyph index %d\n", glyph_index )); #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS @@ -2313,15 +2376,18 @@ (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 check: if `horiAdvance' in the sbit metric */ - /* structure isn't set, use `linearHoriAdvance' */ + /* 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 FT_Err_Ok; @@ -2401,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/freetype/src/truetype/ttgxvar.c b/freetype/src/truetype/ttgxvar.c index 7899d367..1b35539f 100644 --- a/freetype/src/truetype/ttgxvar.c +++ b/freetype/src/truetype/ttgxvar.c @@ -4,7 +4,7 @@ /* */ /* TrueType GX Font Variation loader */ /* */ -/* Copyright 2004-2013 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, */ @@ -938,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: diff --git a/freetype/src/truetype/ttinterp.c b/freetype/src/truetype/ttinterp.c index 92e6d43b..eccd4aac 100644 --- a/freetype/src/truetype/ttinterp.c +++ b/freetype/src/truetype/ttinterp.c @@ -4,7 +4,7 @@ /* */ /* TrueType bytecode interpreter (body). */ /* */ -/* Copyright 1996-2013 */ +/* Copyright 1996-2014 */ /* by David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -172,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 ) @@ -184,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 ) @@ -282,10 +279,7 @@ /* */ /* exec :: The target execution context. */ /* */ - /* */ - /* 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 ) @@ -309,8 +303,6 @@ exec->codeSize = coderange->size; exec->IP = IP; exec->curRange = range; - - return FT_Err_Ok; } @@ -332,10 +324,7 @@ /* */ /* exec :: The target execution context. */ /* */ - /* */ - /* 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, @@ -345,8 +334,6 @@ exec->codeRangeTable[range - 1].base = (FT_Byte*)base; exec->codeRangeTable[range - 1].size = length; - - return FT_Err_Ok; } @@ -364,13 +351,7 @@ /* */ /* exec :: The target execution context. */ /* */ - /* */ - /* FreeType error code. 0 means success. */ - /* */ - /* */ - /* Does not set the Error variable. */ - /* */ - FT_LOCAL_DEF( FT_Error ) + FT_LOCAL_DEF( void ) TT_Clear_CodeRange( TT_ExecContext exec, FT_Int range ) { @@ -378,8 +359,6 @@ exec->codeRangeTable[range - 1].base = NULL; exec->codeRangeTable[range - 1].size = 0; - - return FT_Err_Ok; } @@ -403,13 +382,10 @@ /* */ /* memory :: A handle to the parent memory object. */ /* */ - /* */ - /* FreeType error code. 0 means success. */ - /* */ /* */ /* 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; @@ -436,8 +412,6 @@ exec->face = NULL; FT_FREE( exec ); - - return FT_Err_Ok; } @@ -664,13 +638,10 @@ /* */ /* size :: A handle to the target size object. */ /* */ - /* */ - /* FreeType error code. 0 means success. */ - /* */ /* */ /* 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 ) { @@ -688,8 +659,6 @@ for ( i = 0; i < TT_MAX_CODE_RANGES; i++ ) size->codeRangeTable[i] = exec->codeRangeTable[i]; - - return FT_Err_Ok; } @@ -721,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 ) ) - != FT_Err_Ok ) - return error; + TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 ); exec->zp0 = exec->pts; exec->zp1 = exec->pts; @@ -796,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 */ @@ -1449,7 +1415,7 @@ TT_MulFix14_arm( FT_Int32 a, FT_Int b ) { - register FT_Int32 t, t2; + FT_Int32 t, t2; #if defined( __CC_ARM ) || defined( __ARMCC__ ) @@ -1470,7 +1436,7 @@ __asm__ __volatile__ ( "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ -#ifdef __clang__ +#if defined( __clang__ ) && defined( __thumb2__ ) "add.w %0, %0, #0x2000\n\t" /* %0 += 0x2000 */ #else "add %0, %0, #0x2000\n\t" /* %0 += 0x2000 */ @@ -1709,8 +1675,15 @@ } - static FT_Long + FT_CALLBACK_DEF( FT_Long ) Current_Ppem( EXEC_OP ) + { + return CUR.tt_metrics.ppem; + } + + + FT_CALLBACK_DEF( FT_Long ) + Current_Ppem_Stretched( EXEC_OP ) { return FT_MulFix( CUR.tt_metrics.ppem, CURRENT_Ratio() ); } @@ -2050,7 +2023,7 @@ if ( distance >= 0 ) { val = distance + compensation; - if ( distance && val < 0 ) + if ( val < 0 ) val = 0; } else @@ -2090,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 @@ -2135,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; @@ -2176,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; } @@ -2220,10 +2189,8 @@ 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 @@ -2264,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 @@ -2314,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; @@ -2362,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; @@ -3080,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; */ @@ -3104,8 +3072,8 @@ #else -#define DO_MPS \ - args[0] = CURRENT_Ppem(); +#define DO_MPS \ + args[0] = CUR_Func_cur_ppem(); #endif /* 0 */ @@ -5657,7 +5625,7 @@ /*************************************************************************/ /* */ /* INSTCTRL[]: INSTruction ConTRoL */ - /* Opcode range: 0x8e */ + /* Opcode range: 0x8E */ /* Stack: int32 int32 --> */ /* */ static void @@ -7169,7 +7137,7 @@ 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 ) { @@ -7180,14 +7148,20 @@ /* This is the same as what MS does for the invalid case: */ /* */ /* delta = (Original_Pt - Original_RP1) - */ - /* (Current_Pt - Current_RP1) */ + /* (Current_Pt - Current_RP1) ; */ /* */ /* In FreeType speak: */ /* */ - /* new_dist = cur_dist - */ - /* org_dist - cur_dist; */ + /* 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; + new_dist = org_dist; } } else @@ -7484,9 +7458,9 @@ 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; @@ -7520,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 */ @@ -7564,12 +7539,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 ); #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING @@ -7578,42 +7553,33 @@ /* * Allow delta move if * - * - not using ignore_x_mode rendering - * - glyph is specifically set to allow it - * - glyph is composite and freedom vector is not subpixel - * vector + * - 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 */ - else if ( CUR.ignore_x_mode ) + /* 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 ) { - if ( CUR.GS.freeVector.y != 0 ) - B1 = CUR.zp0.cur[A].y; - else - B1 = CUR.zp0.cur[A].x; + /* save the y value of the point now; compare after move */ + B1 = (FT_UShort)CUR.zp0.cur[A].y; -#if 0 - /* Standard Subpixel Hinting: Allow y move. */ - /* This messes up dejavu and may not be needed... */ - if ( !CUR.face->sph_compatibility_mode && - CUR.GS.freeVector.y != 0 ) + /* 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 ); - else -#endif /* 0 */ - /* Compatibility Mode: Allow x or y move if point touched in */ - /* Y direction. */ - if ( CUR.face->sph_compatibility_mode && - !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) ) + /* compatibility mode */ + else if ( CUR.face->sph_compatibility_mode && + !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) ) { - /* save the y value of the point now; compare after move */ - B1 = CUR.zp0.cur[A].y; - if ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) B = FT_PIX_ROUND( B1 + B ) - B1; @@ -7624,7 +7590,7 @@ CUR_Func_move( &CUR.zp0, A, B ); } - B2 = CUR.zp0.cur[A].y; + B2 = (FT_UShort)CUR.zp0.cur[A].y; /* Reverse this move if it results in a disallowed move */ if ( CUR.GS.freeVector.y != 0 && @@ -7664,7 +7630,7 @@ Ins_DELTAC( INS_ARG ) { FT_ULong nump, k; - FT_ULong A, C; + FT_ULong A, C, P; FT_Long B; @@ -7688,6 +7654,7 @@ } #endif + P = (FT_ULong)CUR_Func_cur_ppem(); nump = (FT_ULong)args[0]; for ( k = 1; k <= nump; k++ ) @@ -7733,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 ); } @@ -7820,13 +7787,6 @@ CUR.ignore_x_mode && CUR.rasterizer_version >= TT_INTERPRETER_VERSION_35 ) { - /********************************/ - /* HINTING FOR GRAYSCALE */ - /* Selector Bit: 5 */ - /* Return Bit(s): 12 */ - /* */ - if ( ( args[0] & 32 ) != 0 && CUR.grayscale_hinting ) - K |= 1 << 12; if ( CUR.rasterizer_version >= 37 ) { @@ -7835,7 +7795,7 @@ /* Selector Bit: 6 */ /* Return Bit(s): 13 */ /* */ - if ( ( args[0] & 64 ) != 0 && CUR.subpixel_hinting ) + if ( ( args[0] & 64 ) != 0 && CUR.subpixel ) K |= 1 << 13; /********************************/ @@ -8266,6 +8226,9 @@ #ifdef TT_CONFIG_OPTION_STATIC_RASTER + if ( !exc ) + return FT_THROW( Invalid_Argument ); + cur = *exc; #endif @@ -8273,11 +8236,12 @@ CUR.iup_called = FALSE; #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ - /* set CVT functions */ + /* 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; @@ -8285,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; @@ -9039,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/freetype/src/truetype/ttinterp.h b/freetype/src/truetype/ttinterp.h index b3916acb..333decc6 100644 --- a/freetype/src/truetype/ttinterp.h +++ b/freetype/src/truetype/ttinterp.h @@ -4,7 +4,7 @@ /* */ /* TrueType bytecode interpreter (specification). */ /* */ -/* Copyright 1996-2007, 2010, 2012-2013 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 ); @@ -228,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 */ @@ -254,6 +253,8 @@ 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) */ @@ -263,12 +264,10 @@ FT_BEGIN_HEADER #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING TT_Round_Func func_round_sphn; /* subpixel rounding function */ - FT_Bool grayscale_hinting; /* Using grayscale hinting? */ - FT_Bool subpixel_hinting; /* Using subpixel hinting? */ - FT_Bool native_hinting; /* Using native hinting? */ + 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 ) */ + /* or subpixel hinting is on. */ /* The following 4 aren't fully implemented but here for MS rasterizer */ /* compatibility. */ @@ -297,18 +296,18 @@ FT_BEGIN_HEADER #ifdef TT_USE_BYTECODE_INTERPRETER - FT_LOCAL( FT_Error ) + 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 ); @@ -346,7 +345,7 @@ FT_BEGIN_HEADER #ifdef TT_USE_BYTECODE_INTERPRETER - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) TT_Done_Context( TT_ExecContext exec ); FT_LOCAL( FT_Error ) @@ -354,7 +353,7 @@ 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 ); diff --git a/freetype/src/truetype/ttobjs.c b/freetype/src/truetype/ttobjs.c index 4adba58f..4707dfe1 100644 --- a/freetype/src/truetype/ttobjs.c +++ b/freetype/src/truetype/ttobjs.c @@ -256,89 +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 */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0x4a692698, 0x000001f0 }, /* fpgm */ - { 0x340d4346, 0x00001fca } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x4A692698UL, 0x000001F0UL }, /* fpgm */ + { 0x340D4346UL, 0x00001FCAUL } /* prep */ }, { /* NEC FA-Minchou, 1996 */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0xcd34c604, 0x00000166 }, /* fpgm */ - { 0x6cf31046, 0x000022b0 } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0xCD34C604UL, 0x00000166UL }, /* fpgm */ + { 0x6CF31046UL, 0x000022B0UL } /* prep */ }, { /* NEC FA-RoundGothicB, 1996 */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0x5da75315, 0x0000019d }, /* fpgm */ - { 0x40745a5f, 0x000022e0 } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x5DA75315UL, 0x0000019DUL }, /* fpgm */ + { 0x40745A5FUL, 0x000022E0UL } /* prep */ }, { /* NEC FA-RoundGothicM, 1996 */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0xf055fc48, 0x000001c2 }, /* fpgm */ - { 0x3900ded3, 0x00001e18 } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0xF055FC48UL, 0x000001C2UL }, /* fpgm */ + { 0x3900DED3UL, 0x00001E18UL } /* prep */ } }; @@ -760,7 +760,9 @@ if ( !exec ) 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; @@ -801,18 +803,16 @@ 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 = FT_Err_Ok; + size->bytecode_ready = error; + if ( !error ) TT_Save_Context( exec, size ); @@ -854,7 +854,9 @@ if ( !exec ) 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; @@ -872,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" )); @@ -884,6 +886,8 @@ else 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. */ @@ -912,10 +916,6 @@ return error; } -#endif /* TT_USE_BYTECODE_INTERPRETER */ - - -#ifdef TT_USE_BYTECODE_INTERPRETER static void tt_size_done_bytecode( FT_Size ftsize ) @@ -953,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; } @@ -968,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; @@ -997,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 */ @@ -1052,15 +1053,14 @@ 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; @@ -1087,8 +1087,6 @@ size->GS = tt_default_graphics_state; error = tt_size_run_prep( size, pedantic ); - if ( !error ) - size->cvt_ready = 1; } Exit: @@ -1118,9 +1116,10 @@ TT_Size size = (TT_Size)ttsize; 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; @@ -1148,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; @@ -1229,7 +1227,7 @@ } #ifdef TT_USE_BYTECODE_INTERPRETER - size->cvt_ready = 0; + size->cvt_ready = -1; #endif /* TT_USE_BYTECODE_INTERPRETER */ if ( !error ) diff --git a/freetype/src/truetype/ttobjs.h b/freetype/src/truetype/ttobjs.h index a11dd375..859164f8 100644 --- a/freetype/src/truetype/ttobjs.h +++ b/freetype/src/truetype/ttobjs.h @@ -4,7 +4,7 @@ /* */ /* Objects manager (specification). */ /* */ -/* Copyright 1996-2009, 2011-2013 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' */ @@ -333,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 */ diff --git a/freetype/src/truetype/ttpload.c b/freetype/src/truetype/ttpload.c index 9723a515..99919254 100644 --- a/freetype/src/truetype/ttpload.c +++ b/freetype/src/truetype/ttpload.c @@ -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,8 +522,10 @@ 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 = FT_THROW( Invalid_File_Format ); goto Fail; diff --git a/freetype/src/truetype/ttsubpix.c b/freetype/src/truetype/ttsubpix.c index 28470ad6..ca604518 100644 --- a/freetype/src/truetype/ttsubpix.c +++ b/freetype/src/truetype/ttsubpix.c @@ -282,7 +282,7 @@ const SPH_TweakRule COMPATIBILITY_MODE_Rules [COMPATIBILITY_MODE_RULES_SIZE] = { - { "-", 0, "", 0 }, + { "Verdana Clones", 0, "", 0 }, }; @@ -956,7 +956,7 @@ if ( loader->exec->rasterizer_version != TT_INTERPRETER_VERSION_35 ) { loader->exec->rasterizer_version = TT_INTERPRETER_VERSION_35; - loader->exec->size->cvt_ready = FALSE; + loader->exec->size->cvt_ready = -1; tt_size_ready_bytecode( loader->exec->size, @@ -971,7 +971,7 @@ SPH_OPTION_SET_RASTERIZER_VERSION ) { loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION; - loader->exec->size->cvt_ready = FALSE; + loader->exec->size->cvt_ready = -1; tt_size_ready_bytecode( loader->exec->size, diff --git a/freetype/src/type1/PaxHeaders.18661/Jamfile b/freetype/src/type1/PaxHeaders.18661/Jamfile deleted file mode 100644 index f514564f..00000000 --- a/freetype/src/type1/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.531823628 -30 ctime=1374498495.835318229 diff --git a/freetype/src/type1/PaxHeaders.18661/module.mk b/freetype/src/type1/PaxHeaders.18661/module.mk deleted file mode 100644 index 6b19c35a..00000000 --- a/freetype/src/type1/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.002005276 -30 ctime=1374498495.824318366 diff --git a/freetype/src/type1/PaxHeaders.18661/rules.mk b/freetype/src/type1/PaxHeaders.18661/rules.mk deleted file mode 100644 index 8268ef86..00000000 --- a/freetype/src/type1/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.485974222 -30 ctime=1374498495.837318204 diff --git a/freetype/src/type1/PaxHeaders.18661/t1afm.c b/freetype/src/type1/PaxHeaders.18661/t1afm.c deleted file mode 100644 index 69d253e7..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1afm.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.539823528 -30 ctime=1374498495.840318166 diff --git a/freetype/src/type1/PaxHeaders.18661/t1afm.h b/freetype/src/type1/PaxHeaders.18661/t1afm.h deleted file mode 100644 index e572a5e7..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1afm.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.530823641 -30 ctime=1374498495.818318441 diff --git a/freetype/src/type1/PaxHeaders.18661/t1driver.c b/freetype/src/type1/PaxHeaders.18661/t1driver.c deleted file mode 100644 index b3c978d1..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1driver.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.532823616 -30 ctime=1374498495.830318291 diff --git a/freetype/src/type1/PaxHeaders.18661/t1driver.h b/freetype/src/type1/PaxHeaders.18661/t1driver.h deleted file mode 100644 index 7d843e76..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1driver.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.539823528 -30 ctime=1374498495.838318191 diff --git a/freetype/src/type1/PaxHeaders.18661/t1errors.h b/freetype/src/type1/PaxHeaders.18661/t1errors.h deleted file mode 100644 index 994d8779..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1errors.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.539823528 -30 ctime=1374498495.808318566 diff --git a/freetype/src/type1/PaxHeaders.18661/t1gload.c b/freetype/src/type1/PaxHeaders.18661/t1gload.c deleted file mode 100644 index 522d65e2..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1gload.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1377513021.950269421 -30 atime=1385335786.585822953 -30 ctime=1377513021.950269421 diff --git a/freetype/src/type1/PaxHeaders.18661/t1gload.h b/freetype/src/type1/PaxHeaders.18661/t1gload.h deleted file mode 100644 index feef4375..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1gload.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.529823653 -30 ctime=1374498495.839318179 diff --git a/freetype/src/type1/PaxHeaders.18661/t1load.c b/freetype/src/type1/PaxHeaders.18661/t1load.c deleted file mode 100644 index e60d87f4..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1load.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1375351140.096760227 -30 atime=1385335786.575823078 -30 ctime=1375351140.096760227 diff --git a/freetype/src/type1/PaxHeaders.18661/t1load.h b/freetype/src/type1/PaxHeaders.18661/t1load.h deleted file mode 100644 index a22e3019..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1load.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.532823616 -30 ctime=1374498495.825318354 diff --git a/freetype/src/type1/PaxHeaders.18661/t1objs.c b/freetype/src/type1/PaxHeaders.18661/t1objs.c deleted file mode 100644 index 4b5907da..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1objs.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.531823628 -30 ctime=1374498495.844318116 diff --git a/freetype/src/type1/PaxHeaders.18661/t1objs.h b/freetype/src/type1/PaxHeaders.18661/t1objs.h deleted file mode 100644 index 48d4918c..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1objs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.576823066 -30 ctime=1374498495.845318104 diff --git a/freetype/src/type1/PaxHeaders.18661/t1parse.c b/freetype/src/type1/PaxHeaders.18661/t1parse.c deleted file mode 100644 index 909bdbf1..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1parse.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.532823616 -30 ctime=1374498495.823318379 diff --git a/freetype/src/type1/PaxHeaders.18661/t1parse.h b/freetype/src/type1/PaxHeaders.18661/t1parse.h deleted file mode 100644 index 732afa9f..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1parse.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.540823516 -30 ctime=1374498495.827318329 diff --git a/freetype/src/type1/PaxHeaders.18661/t1tokens.h b/freetype/src/type1/PaxHeaders.18661/t1tokens.h deleted file mode 100644 index 3d16aab9..00000000 --- a/freetype/src/type1/PaxHeaders.18661/t1tokens.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.533823603 -30 ctime=1374498495.847318079 diff --git a/freetype/src/type1/PaxHeaders.18661/type1.c b/freetype/src/type1/PaxHeaders.18661/type1.c deleted file mode 100644 index ba8f7e13..00000000 --- a/freetype/src/type1/PaxHeaders.18661/type1.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.523823728 -30 ctime=1374498495.826318341 diff --git a/freetype/src/type1/t1driver.c b/freetype/src/type1/t1driver.c index 697288d6..2602bdb6 100644 --- a/freetype/src/type1/t1driver.c +++ b/freetype/src/type1/t1driver.c @@ -4,7 +4,7 @@ /* */ /* Type 1 driver interface (body). */ /* */ -/* Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013 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, */ @@ -557,9 +557,6 @@ if ( value && value_len >= retval ) *((FT_Long *)value) = type1->font_info.italic_angle; break; - - default: - break; } return retval; diff --git a/freetype/src/type1/t1gload.c b/freetype/src/type1/t1gload.c index 35f5b579..af102fd8 100644 --- a/freetype/src/type1/t1gload.c +++ b/freetype/src/type1/t1gload.c @@ -4,7 +4,7 @@ /* */ /* Type 1 Glyph Loader (body). */ /* */ -/* Copyright 1996-2006, 2008-2010, 2013 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, */ @@ -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; diff --git a/freetype/src/type1/t1load.c b/freetype/src/type1/t1load.c index 4b5026bf..22b3f6b3 100644 --- a/freetype/src/type1/t1load.c +++ b/freetype/src/type1/t1load.c @@ -4,7 +4,7 @@ /* */ /* Type 1 font loader (body). */ /* */ -/* Copyright 1996-2013 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, */ @@ -377,8 +377,6 @@ if ( blend && blend->num_axis == num_coords ) { /* recompute the weight vector from the blend coordinates */ - error = FT_Err_Ok; - for ( n = 0; n < blend->num_designs; n++ ) { FT_Fixed result = 0x10000L; /* 1.0 fixed */ @@ -1107,7 +1105,7 @@ result = T1_ToFixedArray( parser, 6, temp, 3 ); - if ( result < 0 ) + if ( result < 6 ) { parser->root.error = FT_THROW( Invalid_File_Format ); return; @@ -1213,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 */ @@ -1274,6 +1272,13 @@ { 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; @@ -1591,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; @@ -1599,7 +1609,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { error = FT_THROW( Invalid_File_Format ); goto Fail; diff --git a/freetype/src/type1/t1objs.c b/freetype/src/type1/t1objs.c index 837b7911..e11770fe 100644 --- a/freetype/src/type1/t1objs.c +++ b/freetype/src/type1/t1objs.c @@ -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; diff --git a/freetype/src/type1/t1parse.c b/freetype/src/type1/t1parse.c index 106e4e7e..ccf9f4cc 100644 --- a/freetype/src/type1/t1parse.c +++ b/freetype/src/type1/t1parse.c @@ -4,7 +4,7 @@ /* */ /* Type 1 parser (body). */ /* */ -/* Copyright 1996-2005, 2008, 2009, 2012, 2013 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, */ @@ -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: @@ -400,15 +402,24 @@ 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 ) { diff --git a/freetype/src/type42/PaxHeaders.18661/Jamfile b/freetype/src/type42/PaxHeaders.18661/Jamfile deleted file mode 100644 index f7bc1dee..00000000 --- a/freetype/src/type42/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.262826991 -30 ctime=1374498496.114314741 diff --git a/freetype/src/type42/PaxHeaders.18661/module.mk b/freetype/src/type42/PaxHeaders.18661/module.mk deleted file mode 100644 index 068ae279..00000000 --- a/freetype/src/type42/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.146003476 -30 ctime=1374498496.110314791 diff --git a/freetype/src/type42/PaxHeaders.18661/rules.mk b/freetype/src/type42/PaxHeaders.18661/rules.mk deleted file mode 100644 index b6d45352..00000000 --- a/freetype/src/type42/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.523973747 -30 ctime=1374498496.115314728 diff --git a/freetype/src/type42/PaxHeaders.18661/t42drivr.c b/freetype/src/type42/PaxHeaders.18661/t42drivr.c deleted file mode 100644 index 5ecf5ecb..00000000 --- a/freetype/src/type42/PaxHeaders.18661/t42drivr.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.263826979 -30 ctime=1374498496.116314716 diff --git a/freetype/src/type42/PaxHeaders.18661/t42drivr.h b/freetype/src/type42/PaxHeaders.18661/t42drivr.h deleted file mode 100644 index e199a161..00000000 --- a/freetype/src/type42/PaxHeaders.18661/t42drivr.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.263826979 -30 ctime=1374498496.108314816 diff --git a/freetype/src/type42/PaxHeaders.18661/t42error.h b/freetype/src/type42/PaxHeaders.18661/t42error.h deleted file mode 100644 index d3fd2a88..00000000 --- a/freetype/src/type42/PaxHeaders.18661/t42error.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.257827054 -30 ctime=1374498496.109314803 diff --git a/freetype/src/type42/PaxHeaders.18661/t42objs.c b/freetype/src/type42/PaxHeaders.18661/t42objs.c deleted file mode 100644 index 16a7ba5d..00000000 --- a/freetype/src/type42/PaxHeaders.18661/t42objs.c +++ /dev/null @@ -1,3 +0,0 @@ -30 mtime=1380086033.685114938 -30 atime=1385335786.262826991 -30 ctime=1380086033.685114938 diff --git a/freetype/src/type42/PaxHeaders.18661/t42objs.h b/freetype/src/type42/PaxHeaders.18661/t42objs.h deleted file mode 100644 index be7f2b36..00000000 --- a/freetype/src/type42/PaxHeaders.18661/t42objs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.258827041 -30 ctime=1374498496.111314778 diff --git a/freetype/src/type42/PaxHeaders.18661/t42parse.c b/freetype/src/type42/PaxHeaders.18661/t42parse.c deleted file mode 100644 index c29ea1eb..00000000 --- a/freetype/src/type42/PaxHeaders.18661/t42parse.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.264826966 -30 ctime=1374498496.123314628 diff --git a/freetype/src/type42/PaxHeaders.18661/t42parse.h b/freetype/src/type42/PaxHeaders.18661/t42parse.h deleted file mode 100644 index 20c7e24c..00000000 --- a/freetype/src/type42/PaxHeaders.18661/t42parse.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.258827041 -30 ctime=1374498496.119314678 diff --git a/freetype/src/type42/PaxHeaders.18661/t42types.h b/freetype/src/type42/PaxHeaders.18661/t42types.h deleted file mode 100644 index dcaf2e94..00000000 --- a/freetype/src/type42/PaxHeaders.18661/t42types.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.263826979 -30 ctime=1374498496.118314691 diff --git a/freetype/src/type42/PaxHeaders.18661/type42.c b/freetype/src/type42/PaxHeaders.18661/type42.c deleted file mode 100644 index 832c12e9..00000000 --- a/freetype/src/type42/PaxHeaders.18661/type42.c +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335786.257827054 -30 ctime=1374498496.120314666 diff --git a/freetype/src/type42/t42objs.c b/freetype/src/type42/t42objs.c index f5aa2caf..915e81fe 100644 --- a/freetype/src/type42/t42objs.c +++ b/freetype/src/type42/t42objs.c @@ -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, @@ -218,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; @@ -286,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; diff --git a/freetype/src/type42/t42parse.c b/freetype/src/type42/t42parse.c index 3cdd8a1a..50708537 100644 --- a/freetype/src/type42/t42parse.c +++ b/freetype/src/type42/t42parse.c @@ -4,7 +4,7 @@ /* */ /* Type 42 font parser (body). */ /* */ -/* Copyright 2002-2013 by */ +/* Copyright 2002-2014 by */ /* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -255,12 +255,26 @@ 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). */ @@ -275,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]; @@ -314,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; @@ -329,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 ) @@ -352,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 */ @@ -417,7 +431,7 @@ cur = parser->root.cursor; - if ( *cur == '/' && cur + 2 < limit && n < count ) + if ( cur + 2 < limit && *cur == '/' && n < count ) { FT_PtrDist len; @@ -426,6 +440,8 @@ parser->root.cursor = cur; T1_Skip_PS_Token( parser ); + if ( parser->root.cursor >= limit ) + return; if ( parser->root.error ) return; @@ -439,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 { @@ -450,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', */ @@ -471,10 +500,7 @@ face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1; else - { - FT_ERROR(( "t42_parse_encoding: invalid token\n" )); - parser->root.error = FT_THROW( Invalid_File_Format ); - } + parser->root.error = FT_THROW( Ignore ); } } @@ -498,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; @@ -554,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; @@ -591,7 +623,7 @@ if ( limit - parser->root.cursor < string_size ) { - FT_ERROR(( "t42_parse_sfnts: too many binary data\n" )); + FT_ERROR(( "t42_parse_sfnts: too much binary data\n" )); error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -631,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_REALLOC( face->ttf_data, 12, ttf_size ) ) + 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, 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; @@ -661,24 +700,23 @@ 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" )); + FT_ERROR(( "t42_parse_sfnts: too much binary data\n" )); error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -824,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; @@ -832,7 +876,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = FT_THROW( Invalid_File_Format ); diff --git a/freetype/src/winfonts/PaxHeaders.18661/Jamfile b/freetype/src/winfonts/PaxHeaders.18661/Jamfile deleted file mode 100644 index ee88026e..00000000 --- a/freetype/src/winfonts/PaxHeaders.18661/Jamfile +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.665846956 -30 ctime=1374498495.853318004 diff --git a/freetype/src/winfonts/PaxHeaders.18661/fnterrs.h b/freetype/src/winfonts/PaxHeaders.18661/fnterrs.h deleted file mode 100644 index 9d8d5195..00000000 --- a/freetype/src/winfonts/PaxHeaders.18661/fnterrs.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.665846956 -30 ctime=1374498495.852318016 diff --git a/freetype/src/winfonts/PaxHeaders.18661/module.mk b/freetype/src/winfonts/PaxHeaders.18661/module.mk deleted file mode 100644 index 486b862c..00000000 --- a/freetype/src/winfonts/PaxHeaders.18661/module.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335772.154003376 -30 ctime=1374498495.851318029 diff --git a/freetype/src/winfonts/PaxHeaders.18661/rules.mk b/freetype/src/winfonts/PaxHeaders.18661/rules.mk deleted file mode 100644 index 69436a7d..00000000 --- a/freetype/src/winfonts/PaxHeaders.18661/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335774.532973635 -30 ctime=1374498495.854317991 diff --git a/freetype/src/winfonts/PaxHeaders.18661/winfnt.c b/freetype/src/winfonts/PaxHeaders.18661/winfnt.c deleted file mode 100644 index 42635d01..00000000 --- a/freetype/src/winfonts/PaxHeaders.18661/winfnt.c +++ /dev/null @@ -1,3 +0,0 @@ -29 mtime=1377511390.75966211 -30 atime=1385335784.682846744 -29 ctime=1377511390.75966211 diff --git a/freetype/src/winfonts/PaxHeaders.18661/winfnt.h b/freetype/src/winfonts/PaxHeaders.18661/winfnt.h deleted file mode 100644 index 554073c8..00000000 --- a/freetype/src/winfonts/PaxHeaders.18661/winfnt.h +++ /dev/null @@ -1,2 +0,0 @@ -30 atime=1385335784.666846944 -30 ctime=1374498495.857317953 diff --git a/freetype/src/winfonts/winfnt.c b/freetype/src/winfonts/winfnt.c index 68432438..4705c539 100644 --- a/freetype/src/winfonts/winfnt.c +++ b/freetype/src/winfonts/winfnt.c @@ -4,7 +4,7 @@ /* */ /* FreeType font driver for Windows FNT/FON files */ /* */ -/* Copyright 1996-2004, 2006-2013 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 ), @@ -412,9 +412,9 @@ 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 = FT_THROW( Invalid_File_Format ); @@ -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 ); @@ -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; @@ -971,13 +974,13 @@ if ( !face ) { - error = FT_THROW( 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 = FT_THROW( Invalid_Argument ); @@ -989,16 +992,26 @@ 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